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

     1  // +build !linux
     2  
     3  package flowtracking
     4  
     5  import (
     6  	"context"
     7  	"net"
     8  )
     9  
    10  // Client is a flow update client.
    11  // For Windows, we can't use conntrack.
    12  type Client struct {
    13  }
    14  
    15  // NewClient creates a new flow tracking client.
    16  func NewClient(ctx context.Context) (*Client, error) {
    17  	return &Client{}, nil
    18  }
    19  
    20  // Close will close the connection of the client.
    21  func (c *Client) Close() error {
    22  	return nil
    23  }
    24  
    25  // UpdateMark updates the mark of the flow. Caller must indicate if this is an application
    26  // flow or a network flow. Not used in Windows.
    27  func (c *Client) UpdateMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32, network bool) error {
    28  	return nil
    29  }
    30  
    31  // UpdateNetworkFlowMark will update the mark for a flow based on packet information received
    32  // from the network. It will use the reverse tables in conntrack for that. Not used in Windows.
    33  func (c *Client) UpdateNetworkFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error {
    34  	return nil
    35  }
    36  
    37  // UpdateApplicationFlowMark will update the mark for a flow based on the packet information
    38  // received from an application. It will use the forward entries of conntrack for that. Not used in Windows.
    39  func (c *Client) UpdateApplicationFlowMark(ipSrc, ipDst net.IP, protonum uint8, srcport, dstport uint16, newmark uint32) error {
    40  	return nil
    41  }
    42  
    43  // GetOriginalDest gets the original destination ip, port and the mark on the packet. Not used in Windows.
    44  // TODO(windows): we may need to support this?
    45  func (c *Client) GetOriginalDest(ipSrc, ipDst net.IP, srcport, dstport uint16, protonum uint8) (net.IP, uint16, uint32, error) {
    46  	return nil, 0, 0, nil
    47  }