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
- type CPUPort
- func (p *CPUPort) Actions(dir fwdpb.PortAction) fwdaction.Actions
- func (p *CPUPort) Cleanup()
- func (p *CPUPort) Desc() *fwdpb.PortDesc
- func (CPUPort) State(*fwdpb.PortInfo) (*fwdpb.PortStateReply, error)
- func (p *CPUPort) String() string
- func (p *CPUPort) Type() fwdpb.PortType
- func (p *CPUPort) Update(upd *fwdpb.PortUpdateDesc) error
- func (p *CPUPort) Write(packet fwdpacket.Packet) (fwdaction.State, error)
Constants ¶
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
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) 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.