Documentation
¶
Index ¶
Constants ¶
View Source
const ( IPPROTO_TCP = 6 IPPROTO_UDP = 17 )
View Source
const ( TCPHDR_FIN = 0x01 TCPHDR_SYN = 0x02 TCPHDR_RST = 0x04 TCPHDR_PSH = 0x08 TCPHDR_ACK = 0x10 TCPHDR_URG = 0x20 TCPHDR_ECE = 0x40 TCPHDR_CWR = 0x80 )
View Source
const DevNameMaxSize = 64
Variables ¶
This section is empty.
Functions ¶
func HandleEvent ¶
Types ¶
type ActionType ¶
type ActionType uint8
const ( Unspec ActionType = iota Output Userspace Set PushVlan PopVlan Sample Recirc Hash PushMpls PopMpls SetMasked Ct Trunc PushEth PopEth CtClear PushNsh PopNsh Meter Clone CheckPktLen AddMpls DecTTL Max SetToMasked )
func (ActionType) String ¶
func (a ActionType) String() string
type Event ¶
type Event struct { Timestamp uint64 `json:"timestamp"` Type EventType `json:"type"` SubAction ActionType `json:"subaction,omitempty"` DevName string `json:"devname,omitempty"` Hash uint32 `json:"hash,omitempty"` TCP *TCPInfo `json:"tcp,omitempty"` UDP *UDPInfo `json:"udp,omitempty"` Protocol uint8 `json:"protocol,omitempty"` }
type EventBytes ¶
type EventBytes struct { Timestamp uint64 Type uint8 SubAction uint8 DevName [DevNameMaxSize]byte Hash uint32 Sport uint16 Dport uint16 Seq uint32 AckSeq uint32 TCPFlags uint8 Protocol uint8 IPVersion uint8 }
Event from eBPF program.
type Filter ¶
type Filter struct { //Mark uint32 Eth Ethhdr EthMask Ethhdr IPv4 IPv4hdr IPv4Mask IPv4hdr IPv6 IPv6hdr IPv6Mask IPv6hdr Tcp Tcphdr TcpMask Tcphdr Udp Udphdr UdpMask Udphdr DevName [DevNameMaxSize]byte }
func ParseFilter ¶
type TCPInfo ¶
Click to show internal directories.
Click to hide internal directories.