mongocaputils

package module
v0.0.0-...-184177a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2015 License: ISC Imports: 15 Imported by: 0

README

mongocaputils

utilities for handling mongo pcap files

license: ISC

tools

mongocapcat - turns mongo pcap files into bson/json

installation:

$ go get github.com/gabrielrussell/mongocaputils/cmd/mongocapcat

usage:

$ tcpdump -i lo0 -w some_mongo_cap.pcap 'dst port 27017'
$ mongocapcat -f=some_mongo_capture.pcap

Documentation

Overview

package mongocaputils provides utilities for working with mongodb pcap files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoOpStream

type MongoOpStream struct {
	Ops chan OpWithTime

	FirstSeen time.Time
	// contains filtered or unexported fields
}

func NewMongoOpStream

func NewMongoOpStream(heapBufSize int) *MongoOpStream

func (*MongoOpStream) Close

func (s *MongoOpStream) Close() error

func (*MongoOpStream) New

func (*MongoOpStream) SetFirstSeen

func (s *MongoOpStream) SetFirstSeen(t time.Time)

type OpWithTime

type OpWithTime struct {
	mongoproto.OpRaw
	Seen       time.Time
	PlayAt     time.Time `bson:",omitempty"`
	EOF        bool      `bson:",omitempty"`
	Connection string
}

func (*OpWithTime) Execute

func (o *OpWithTime) Execute(session *mgo.Session) error

type PacketHandler

type PacketHandler struct {
	Verbose bool
	// contains filtered or unexported fields
}

func NewPacketHandler

func NewPacketHandler(pcapHandle *pcap.Handle) *PacketHandler

func (*PacketHandler) Handle

func (p *PacketHandler) Handle(streamHandler StreamHandler, numToHandle int) error

type SetFirstSeener

type SetFirstSeener interface {
	SetFirstSeen(t time.Time)
}

type StreamHandler

type StreamHandler interface {
	tcpassembly.StreamFactory
	io.Closer
}

Directories

Path Synopsis
cmd
foo
Package mongoproto specifies the MongoDB wire protocol See http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/
Package mongoproto specifies the MongoDB wire protocol See http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/
package tcpreaderwrapper wraps a gopacket tcpassembly.tcpreader.ReaderStream and holds recent resassemblies to fetch timing information Package tcpreaderwrapper wraps a gopacket tcpassembly.tcpreader.ReaderStream
package tcpreaderwrapper wraps a gopacket tcpassembly.tcpreader.ReaderStream and holds recent resassemblies to fetch timing information Package tcpreaderwrapper wraps a gopacket tcpassembly.tcpreader.ReaderStream

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL