Documentation ¶
Index ¶
- func HeliosFlowToAntreaConnection(conn *conntrack.Flow) *flowexporter.Connection
- func NetlinkFlowToAntreaConnection(conn *conntrack.Flow) *flowexporter.Connection
- func NewConnTrackSystem(nodeConfig *config.NodeConfig, serviceCIDRv4 *net.IPNet, ...) *connTrackSystem
- func NewConnectionStore(connTrackDumper ConnTrackDumper, flowRecords *flowrecords.FlowRecords, ...) *connectionStore
- func SetupConntrackParameters() error
- type ConnTrackDumper
- type ConnectionStore
- type NetFilterConnTrack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HeliosFlowToAntreaConnection ¶
func HeliosFlowToAntreaConnection(conn *conntrack.Flow) *flowexporter.Connection
func NetlinkFlowToAntreaConnection ¶
func NetlinkFlowToAntreaConnection(conn *conntrack.Flow) *flowexporter.Connection
func NewConnTrackSystem ¶
func NewConnTrackSystem(nodeConfig *config.NodeConfig, serviceCIDRv4 *net.IPNet, serviceCIDRv6 *net.IPNet, isAntreaProxyEnabled bool) *connTrackSystem
TODO: detect the endianness of the system when initializing conntrack dumper to handle situations on big-endian platforms. All connection labels are required to store in little endian format in conntrack dumper.
func NewConnectionStore ¶
func NewConnectionStore( connTrackDumper ConnTrackDumper, flowRecords *flowrecords.FlowRecords, ifaceStore interfacestore.InterfaceStore, v4Enabled bool, v6Enabled bool, pollInterval time.Duration, ) *connectionStore
func SetupConntrackParameters ¶
func SetupConntrackParameters() error
Types ¶
type ConnTrackDumper ¶
type ConnTrackDumper interface { // DumpFlows returns a list of filtered connections and the number of total connections. DumpFlows(zoneFilter uint16) ([]*flowexporter.Connection, int, error) // GetMaxConnections returns the size of the connection tracking table. GetMaxConnections() (int, error) }
ConnTrackDumper is an interface that is used to dump connections from conntrack module. This supports dumping through netfilter socket (OVS kernel datapath) and ovs-appctl command (OVS userspace datapath). In future, support will be extended to Windows.
func InitializeConnTrackDumper ¶
func InitializeConnTrackDumper(nodeConfig *config.NodeConfig, serviceCIDRv4 *net.IPNet, serviceCIDRv6 *net.IPNet, isAntreaProxyEnabled bool) ConnTrackDumper
InitializeConnTrackDumper initializes the ConnTrackDumper interface for different OS and datapath types.
type ConnectionStore ¶
type ConnectionStore interface { // Run enables the periodical polling of conntrack connections at a given flowPollInterval. Run(stopCh <-chan struct{}) // GetConnByKey gets the connection in connection map given the connection key. GetConnByKey(connKey flowexporter.ConnectionKey) (*flowexporter.Connection, bool) // SetExportDone sets DoneExport field of connection to true given the connection key. SetExportDone(connKey flowexporter.ConnectionKey) error // ForAllConnectionsDo execute the callback for each connection in connection map. ForAllConnectionsDo(callback flowexporter.ConnectionMapCallBack) error }
type NetFilterConnTrack ¶
type NetFilterConnTrack interface { Dial() error DumpFlowsInCtZone(zoneFilter uint16) ([]*flowexporter.Connection, error) }
NetFilterConnTrack interface helps for testing the code that contains the third party library functions ("github.com/ti-mo/conntrack")