ports

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package ports implements various types of ports supported within Lucius. Each port implements a type satisfying the interface fwdport.Port, and registers a builder to create the port.

Ports does not order packets during processing. Cable ports maintain strict ordering between packets received on the same cable (in-band packets). A packet is not processed until the previous packet is fully processed. However there are no ordering guarantees for packets injected via pakio (out-of-band packet).

Index

Constants

View Source
const AsyncPacketQueueDepth = 10

AsyncPacketQueueDepth is the number of packets buffered for the async write requests. Heuristic says 10 is sufficient.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUPort added in v0.4.0

type CPUPort struct {
	fwdobject.Base
	// contains filtered or unexported fields
}

A CPUPort is a port that receives from and transmits to the controller.

func (*CPUPort) Actions added in v0.4.0

func (p *CPUPort) Actions(dir fwdpb.PortAction) fwdaction.Actions

Actions returns the port actions of the specified type.

func (*CPUPort) Cleanup added in v0.4.0

func (p *CPUPort) Cleanup()

Cleanup releases references held by the table and its entries.

func (*CPUPort) Desc added in v0.4.0

func (p *CPUPort) Desc() *fwdpb.PortDesc

Desc returns the port description proto.

func (CPUPort) State added in v0.4.0

State implements the port interface. The CPU port state cannot be controlled (it is always enabled). It is considered to be connected if a packet sink is present in the port's context.

func (*CPUPort) String added in v0.4.0

func (p *CPUPort) String() string

String returns the port as a formatted string.

func (*CPUPort) Type added in v0.4.0

func (p *CPUPort) Type() fwdpb.PortType

func (*CPUPort) Update added in v0.4.0

func (p *CPUPort) Update(upd *fwdpb.PortUpdateDesc) error

Update updates the actions for the port.

func (*CPUPort) Write added in v0.4.0

func (p *CPUPort) Write(packet fwdpacket.Packet) (fwdaction.State, error)

Write applies output actions and writes a packet to the cable.

Jump to

Keyboard shortcuts

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