Versions in this module Expand all Collapse all v0 v0.0.1 Apr 19, 2015 Changes in this version + const BlockForever + var CannotSetRFMon = errors.New("Cannot set rfmon for this handle") + func Version() string + type BPF struct + func (b *BPF) Matches(ci gopacket.CaptureInfo, data []byte) bool + func (b *BPF) String() string + type Datalink struct + Description string + Name string + type Direction uint8 + const DirectionIn + const DirectionInOut + const DirectionOut + type Handle struct + func OpenLive(device string, snaplen int32, promisc bool, timeout time.Duration) (handle *Handle, _ error) + func OpenOffline(file string) (handle *Handle, err error) + func (p *Handle) Close() + func (p *Handle) Error() error + func (p *Handle) LinkType() layers.LinkType + func (p *Handle) ListDataLinks() (datalinks []Datalink, err error) + func (p *Handle) NewBPF(expr string) (*BPF, error) + func (p *Handle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) + func (p *Handle) SetBPFFilter(expr string) (err error) + func (p *Handle) SetDirection(direction Direction) error + func (p *Handle) SetLinkType(dlt layers.LinkType) error + func (p *Handle) Stats() (stat *Stats, err error) + func (p *Handle) WritePacketData(data []byte) (err error) + func (p *Handle) ZeroCopyReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) + type InactiveHandle struct + func NewInactiveHandle(device string) (*InactiveHandle, error) + func (p *InactiveHandle) Activate() (*Handle, error) + func (p *InactiveHandle) CleanUp() + func (p *InactiveHandle) SetBufferSize(bufferSize int) error + func (p *InactiveHandle) SetImmediateMode(mode bool) error + func (p *InactiveHandle) SetPromisc(promisc bool) error + func (p *InactiveHandle) SetRFMon(monitor bool) error + func (p *InactiveHandle) SetSnapLen(snaplen int) error + func (p *InactiveHandle) SetTimeout(timeout time.Duration) error + func (p *InactiveHandle) SetTimestampSource(t TimestampSource) error + func (p *InactiveHandle) SupportedTimestamps() (out []TimestampSource) + type Interface struct + Addresses []InterfaceAddress + Description string + Name string + func FindAllDevs() (ifs []Interface, err error) + type InterfaceAddress struct + IP net.IP + Netmask net.IPMask + type NextError int32 + const NextErrorNoMorePackets + const NextErrorNotActivated + const NextErrorOk + const NextErrorReadError + const NextErrorTimeoutExpired + func (n NextError) Error() string + type Stats struct + PacketsDropped int + PacketsIfDropped int + PacketsReceived int + type TimestampSource C.int + func TimestampSourceFromString(s string) (TimestampSource, error) + func (t TimestampSource) String() string