Versions in this module Expand all Collapse all v1 v1.9.0 Sep 17, 2023 Changes in this version + const DefaultBlockSize — linux/amd64 + const DefaultBlockTimeout — linux/amd64 + const DefaultFrameSize — linux/amd64 + const DefaultNumBlocks — linux/amd64 + const DefaultPollTimeout — linux/amd64 + const ETH_ALEN — linux/amd64 + const SocketDgram — linux/amd64 + const SocketRaw — linux/amd64 + const TPacketVersion1 — linux/amd64 + const TPacketVersion2 — linux/amd64 + const TPacketVersion3 — linux/amd64 + const TPacketVersionHighestAvailable — linux/amd64 + const VLAN_HLEN — linux/amd64 + var ErrPoll = errors.New("packet poll failed") — linux/amd64 + var ErrTimeout = errors.New("packet poll timeout expired") — linux/amd64 + type AncillaryVLAN struct — linux/amd64 + VLAN int + type FanoutType int — linux/amd64 + const FanoutCBPF + const FanoutCPU + const FanoutEBPF + const FanoutHash + const FanoutHashWithDefrag + const FanoutLoadBalance + const FanoutQueueMapping + const FanoutRandom + const FanoutRollover + type OptAddVLANHeader bool — linux/amd64 + type OptBlockSize int — linux/amd64 + type OptBlockTimeout time.Duration — linux/amd64 + type OptFrameSize int — linux/amd64 + type OptInterface string — linux/amd64 + type OptNumBlocks int — linux/amd64 + type OptPollTimeout time.Duration — linux/amd64 + type OptSocketType int — linux/amd64 + func (t OptSocketType) String() string + type OptTPacketVersion int — linux/amd64 + func (t OptTPacketVersion) String() string + type SocketStats struct — linux/amd64 + func (s *SocketStats) Drops() uint + func (s *SocketStats) Packets() uint + type SocketStatsV3 struct — linux/amd64 + func (s *SocketStatsV3) Drops() uint + func (s *SocketStatsV3) Packets() uint + func (s *SocketStatsV3) QueueFreezes() uint + type Stats struct — linux/amd64 + Packets int64 + Polls int64 + type TPacket struct — linux/amd64 + func NewTPacket(opts ...interface{}) (h *TPacket, err error) + func (h *TPacket) Close() + func (h *TPacket) InitSocketStats() error + func (h *TPacket) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) + func (h *TPacket) ReadPacketDataTo(data []byte) (ci gopacket.CaptureInfo, err error) + func (h *TPacket) SetBPF(filter []bpf.RawInstruction) error + func (h *TPacket) SetEBPF(progFd int32) error + func (h *TPacket) SetFanout(t FanoutType, id uint16) error + func (h *TPacket) SetPromiscuous(b bool) error + func (h *TPacket) SocketStats() (SocketStats, SocketStatsV3, error) + func (h *TPacket) Stats() (Stats, error) + func (h *TPacket) WritePacketData(pkt []byte) error + func (h *TPacket) ZeroCopyReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) + type TpacketReqv2 struct — linux/amd64 + type TpacketReqv3 struct — linux/amd64