github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/controller/pkg/flowtracking/interfaces.go (about)

     1  package flowtracking
     2  
     3  import "net"
     4  
     5  // FlowClient defines an interface that trireme uses to communicate with the conntrack
     6  type FlowClient interface {
     7  	// Close will close the connection of the client.
     8  	Close() error
     9  	// UpdateMark updates the mark of the flow. Caller must indicate if this is an application
    10  	// flow or a network flow.
    11  	UpdateMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32, network bool) error
    12  	// GetOriginalDest gets the original destination ip, port and the mark on the packet
    13  	GetOriginalDest(ipSrc, ipDst net.IP, srcport, dstport uint16, protonum uint8) (net.IP, uint16, uint32, error)
    14  	// UpdateNetworkFlowMark will update the mark for a flow based on packet information received
    15  	// from the network. It will use the reverse tables in conntrack for that.
    16  	UpdateNetworkFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error
    17  	// UpdateApplicationFlowMark will update the mark for a flow based on the packet information
    18  	// received from an application. It will use the forward entries of conntrack for that.
    19  	UpdateApplicationFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error
    20  }