Documentation ¶
Index ¶
- Constants
- Variables
- func FlowIDsEqual(f1, f2 *FlowID) bool
- type Float
- type Flow
- type FlowID
- func (f *FlowID) AddConnectionID(id uint64)
- func (f *FlowID) AddEth(src, dst net.HardwareAddr)
- func (f *FlowID) AddICMPv4Request(id uint16)
- func (f *FlowID) AddICMPv4Response(id uint16)
- func (f *FlowID) AddICMPv6Request(id uint16)
- func (f *FlowID) AddICMPv6Response(id uint16)
- func (f *FlowID) AddIPv4(src, dst net.IP)
- func (f *FlowID) AddIPv6(src, dst net.IP)
- func (f *FlowID) AddTCP(src, dst uint16)
- func (f *FlowID) AddUDP(src, dst uint16)
- func (f *FlowID) AddVLan(id uint16)
- func (f *FlowID) ConnectionID() []byte
- func (f *FlowID) Eth() []byte
- func (f FlowID) EthAddr() ([]byte, []byte, bool)
- func (f *FlowID) Flags() FlowIDFlag
- func (f *FlowID) Get(i FlowIDFlag) []byte
- func (f *FlowID) ICMPv4() []byte
- func (f *FlowID) ICMPv6() []byte
- func (f *FlowID) IPv4() []byte
- func (f *FlowID) IPv4Addr() ([]byte, []byte, bool)
- func (f *FlowID) IPv6() []byte
- func (f *FlowID) IPv6Addr() ([]byte, []byte, bool)
- func (f *FlowID) OutterIPv4() []byte
- func (f *FlowID) OutterIPv4Addr() ([]byte, []byte, bool)
- func (f *FlowID) OutterIPv6() []byte
- func (f *FlowID) OutterIPv6Addr() ([]byte, []byte, bool)
- func (f *FlowID) OutterVLan() []byte
- func (f *FlowID) Reset(buf []byte)
- func (f *FlowID) Serialize() []byte
- func (f *FlowID) TCP() []byte
- func (f *FlowID) TCPAddr() ([]byte, []byte, bool)
- func (f *FlowID) UDP() []byte
- func (f *FlowID) UDPAddr() ([]byte, []byte, bool)
- func (f *FlowID) VLan() []byte
- type FlowIDFlag
- type Flows
- type Int
- type Reporter
- type Uint
- type Var
Constants ¶
View Source
const ( SizeEthAddr = 6 SizeVlan = 2 SizeIPv4Addr = 4 SizeIPv6Addr = 16 SizeICMPID = 2 SizePortNumber = 2 SizeEthFlowID = 2 * SizeEthAddr // source + dest mac address SizeVlanFlowID = SizeVlan // raw vlan id SizeIPv4FlowID = 2 * SizeIPv4Addr // source + dest ip SizeIPv6FlowID = 2 * SizeIPv6Addr // source + dest ip SizeICMPFlowID = SizeICMPID // icmp identifier (if present) SizeTCPFlowID = 2 * SizePortNumber // source + dest port SizeUDPFlowID = 2 * SizePortNumber // source + dest port SizeConnectionID = 8 // 64bit internal connection id SizeFlowIDMax int = SizeEthFlowID + 2*(SizeVlanFlowID+SizeIPv4FlowID+SizeIPv6FlowID) + SizeICMPFlowID + SizeTCPFlowID + SizeUDPFlowID + SizeConnectionID )
Variables ¶
View Source
var ( ErrInvalidTimeout = errors.New("timeout must not >= 1s") ErrInvalidPeriod = errors.New("report period must be -1 or >= 1s") )
Functions ¶
func FlowIDsEqual ¶
Types ¶
type FlowID ¶
type FlowID struct {
// contains filtered or unexported fields
}
func (*FlowID) AddConnectionID ¶
func (*FlowID) AddEth ¶
func (f *FlowID) AddEth(src, dst net.HardwareAddr)
func (*FlowID) AddICMPv4Request ¶
func (*FlowID) AddICMPv4Response ¶
func (*FlowID) AddICMPv6Request ¶
func (*FlowID) AddICMPv6Response ¶
func (*FlowID) ConnectionID ¶
func (f *FlowID) ConnectionID() []byte
func (*FlowID) Flags ¶
func (f *FlowID) Flags() FlowIDFlag
func (*FlowID) Get ¶
func (f *FlowID) Get(i FlowIDFlag) []byte
func (*FlowID) OutterIPv4 ¶
func (f *FlowID) OutterIPv4() []byte
func (*FlowID) OutterIPv4Addr ¶
func (*FlowID) OutterIPv6 ¶
func (f *FlowID) OutterIPv6() []byte
func (*FlowID) OutterIPv6Addr ¶
func (*FlowID) OutterVLan ¶
func (f *FlowID) OutterVLan() []byte
type FlowIDFlag ¶
type FlowIDFlag uint16
const ( EthFlow FlowIDFlag = (1 << iota) OutterVlanFlow VLanFlow OutterIPv4Flow IPv4Flow OutterIPv6Flow IPv6Flow ICMPv4Flow ICMPv6Flow UDPFlow TCPFlow ConnectionID )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.