Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PacketCapture ¶
type PacketCapture struct {
// contains filtered or unexported fields
}
func New ¶
func New(netInterface string) *PacketCapture
New returns a new PacketCapture instance for the given netInterface
Close() must be called on the PacketCapture instance.
func (*PacketCapture) Close ¶
func (pc *PacketCapture) Close()
func (*PacketCapture) RegisterReceiver ¶
func (pc *PacketCapture) RegisterReceiver(receiver PacketReceiver)
RegisterReceiver registers a receiver for a given set of gopacket LayerTypes.
Each PacketReceiver will be called each time a packet in the set of LayerTypes is received.
Calls to PacketReceiver.Receiver happen in a separate goroutine.
func (*PacketCapture) Start ¶
func (pc *PacketCapture) Start() error
Click to show internal directories.
Click to hide internal directories.