trireme-lib: go.aporeto.io/trireme-lib/controller/pkg/flowtracking Index | Files

package flowtracking

import "go.aporeto.io/trireme-lib/controller/pkg/flowtracking"

Index

Package Files

flowtracking.go interfaces.go

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client is a flow update client

func NewClient Uses

func NewClient(ctx context.Context) (*Client, error)

NewClient creates a new flow tracking client. s

func (*Client) Close Uses

func (c *Client) Close() error

Close will close the connection of the client.

func (*Client) GetOriginalDest Uses

func (c *Client) GetOriginalDest(ipSrc, ipDst net.IP, srcport, dstport uint16, protonum uint8) (net.IP, uint16, uint32, error)

GetOriginalDest gets the original destination ip, port and the mark on the packet

func (*Client) UpdateApplicationFlowMark Uses

func (c *Client) UpdateApplicationFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error

UpdateApplicationFlowMark will update the mark for a flow based on the packet information received from an application. It will use the forward entries of conntrack for that.

func (*Client) UpdateMark Uses

func (c *Client) UpdateMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32, network bool) error

UpdateMark updates the mark of the flow. Caller must indicate if this is an application flow or a network flow.

func (*Client) UpdateNetworkFlowMark Uses

func (c *Client) UpdateNetworkFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error

UpdateNetworkFlowMark will update the mark for a flow based on packet information received from the network. It will use the reverse tables in conntrack for that.

type FlowClient Uses

type FlowClient interface {
    // Close will close the connection of the client.
    Close() error
    // UpdateMark updates the mark of the flow. Caller must indicate if this is an application
    // flow or a network flow.
    UpdateMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32, network bool) error
    // GetOriginalDest gets the original destination ip, port and the mark on the packet
    GetOriginalDest(ipSrc, ipDst net.IP, srcport, dstport uint16, protonum uint8) (net.IP, uint16, uint32, error)
    // UpdateNetworkFlowMark will update the mark for a flow based on packet information received
    // from the network. It will use the reverse tables in conntrack for that.
    UpdateNetworkFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error
    // UpdateApplicationFlowMark will update the mark for a flow based on the packet information
    // received from an application. It will use the forward entries of conntrack for that.
    UpdateApplicationFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error
}

FlowClient defines an interface that trireme uses to communicate with the conntrack

Package flowtracking imports 5 packages (graph) and is imported by 4 packages. Updated 2019-09-21. Refresh now. Tools for package owners.