github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/controller/internal/enforcer/nfqdatapath/datapath_darwin.go (about)

     1  // +build darwin
     2  
     3  package nfqdatapath
     4  
     5  import (
     6  	"context"
     7  	"net"
     8  	"syscall"
     9  
    10  	gpacket "github.com/ghedo/go.pkt/packet"
    11  	"go.aporeto.io/enforcerd/trireme-lib/controller/constants"
    12  	"go.aporeto.io/enforcerd/trireme-lib/controller/pkg/connection"
    13  	"go.aporeto.io/enforcerd/trireme-lib/controller/pkg/packet"
    14  )
    15  
    16  func adjustConntrack(mode constants.ModeType) {
    17  }
    18  
    19  func (d *Datapath) setMark(pkt *packet.Packet, mark uint32) error {
    20  	return nil
    21  }
    22  
    23  func (d *Datapath) reverseFlow(pkt *packet.Packet) error {
    24  	return nil
    25  }
    26  
    27  func (d *Datapath) drop(pkt *packet.Packet) error {
    28  	return nil
    29  }
    30  
    31  func (d *Datapath) dropFlow(pkt *packet.Packet) error {
    32  	return nil
    33  }
    34  
    35  func (d *Datapath) ignoreFlow(pkt *packet.Packet) error {
    36  	return nil
    37  }
    38  
    39  func (d *Datapath) setFlowState(pkt *packet.Packet, accepted bool) error {
    40  	return nil
    41  }
    42  
    43  func (d *Datapath) startInterceptors(ctx context.Context) {
    44  }
    45  
    46  type pingConn struct {
    47  }
    48  
    49  func dialIP(srcIP, dstIP net.IP) (PingConn, error) {
    50  
    51  	return &pingConn{}, nil
    52  }
    53  
    54  // Close not implemented.
    55  func (p *pingConn) Close() error {
    56  	return nil
    57  }
    58  
    59  // Write not implemented.
    60  func (p *pingConn) Write(data []byte) (int, error) {
    61  	return 0, nil
    62  }
    63  
    64  // ConstructWirePacket not implemented.
    65  func (p *pingConn) ConstructWirePacket(srcIP, dstIP net.IP, transport gpacket.Packet, payload gpacket.Packet) ([]byte, error) {
    66  	return nil, nil
    67  }
    68  
    69  func bindRandomPort(tcpConn *connection.TCPConnection) (uint16, error) {
    70  	return 0, nil
    71  }
    72  
    73  func closeRandomPort(tcpConn *connection.TCPConnection) error {
    74  	return nil
    75  }
    76  
    77  func isAddrInUseErrno(errNo syscall.Errno) bool {
    78  	return false
    79  }