Documentation
¶
Overview ¶
Package engine contains funcs for interacting with the forwarding engine.
Index ¶
- Constants
- func AddIPRoute(ctx context.Context, c fwdpb.ServiceClient, v4 bool, ip, mask []byte, ...) error
- func AddLayer3PuntRule(ctx context.Context, c fwdpb.ServiceClient, portName string, ip []byte) error
- func AddNeighbor(ctx context.Context, c fwdpb.ServiceClient, ip, mac []byte) error
- func CreateExternalPort(ctx context.Context, c fwdpb.ServiceClient, name string) error
- func CreateLocalPort(ctx context.Context, c fwdpb.ServiceClient, name string, fd int) error
- func DeleteIPRoute(ctx context.Context, c fwdpb.ServiceClient, v4 bool, ip, mask []byte) error
- func IntfNameToTapName(name string) string
- func IsTap(name string) bool
- func RemoveNeighbor(ctx context.Context, c fwdpb.ServiceClient, ip []byte) error
- func SetupForwardingTables(ctx context.Context, c fwdpb.ServiceClient) error
- func TapNameToIntfName(name string) string
- func UpdatePortSrcMAC(ctx context.Context, c fwdpb.ServiceClient, portName string, mac []byte) error
Constants ¶
const (
DefaultContextID = "default"
)
Variables ¶
This section is empty.
Functions ¶
func AddIPRoute ¶
func AddIPRoute(ctx context.Context, c fwdpb.ServiceClient, v4 bool, ip, mask []byte, nextHops []*dpb.NextHop) error
AddIPRoute adds a route to the FIB with the input next hops.
func AddLayer3PuntRule ¶
func AddLayer3PuntRule(ctx context.Context, c fwdpb.ServiceClient, portName string, ip []byte) error
AddLayer3PuntRule adds rule to output packets to a corresponding port based on the destination IP and input port.
func AddNeighbor ¶
AddNeighbor adds a neighbor to the neighbor table.
func CreateExternalPort ¶
CreateExternalPort creates an external port (connected to other devices). TODO: layer3 punt behavior.
func CreateLocalPort ¶
CreateLocalPort creates an local (ie TAP) port for the given linux device name.
func DeleteIPRoute ¶
DeleteIPRoute deletes a route from the FIB.
func IntfNameToTapName ¶
IntfNameToTapName returns the connected tap interface of an interface.
func RemoveNeighbor ¶
RemoveNeighbor removes a neighbor from the neighbor table.
func SetupForwardingTables ¶
func SetupForwardingTables(ctx context.Context, c fwdpb.ServiceClient) error
SetupForwardingTables creates the forwarding tables.
func TapNameToIntfName ¶
TapNameToIntfName returns connected external interface from a tap interface.
func UpdatePortSrcMAC ¶
func UpdatePortSrcMAC(ctx context.Context, c fwdpb.ServiceClient, portName string, mac []byte) error
UpdatePortSrcMAC updates a port's source mac address.
Types ¶
This section is empty.