cpusink

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

The cpusink package subscribes to a forwarding context and writes packets to genetlink interfaces. It also configures the forwarding context with the IPs assigned to specific netdev interfaces.

Index

Constants

View Source
const (
	IP2MeTable = "ip2me"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

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

Sink is a CPU port client for a forwarding context.

func New

func New(client fwdpb.ForwardingClient) (*Sink, error)

func (*Sink) HandleIPUpdates

func (sink *Sink) HandleIPUpdates(ctx context.Context) error

HandleIPUpdates subscribe to netlink to get the IP address of the interfaces and updates the forwarding context with the addresses in the ip2me table. TODO: Add support for aggregate interfaces.

func (*Sink) ReceivePackets

func (sink *Sink) ReceivePackets(ctx context.Context) error

ReceivePackets from packets from the CPU port and sends them to the correct ports.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL