Documentation ¶
Overview ¶
Package fwdtable contains routines and types to manage forwarding tables.
A forwarding table is a mapping of entries to a set of actions. Packets are matched to entries within the table using an algorithm specific to the table. Lucius has a variety of forwarding tables (implemented by various types). All ports are created by provisioning.
This package defines the following mechanisms to manage tables
- It allows different types of tables to register builders during package initialization.
- Provisioning can create tables using the registered builders.
- It defines an interface that can be used to operate on a table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CounterList = []fwdpb.CounterId{ fwdpb.CounterId_COUNTER_ID_ERROR_PACKETS, fwdpb.CounterId_COUNTER_ID_ERROR_OCTETS, }
CounterList is a set of counters incremented by tables.
Functions ¶
Types ¶
type Builder ¶
type Builder interface { // Build builds a table. Build(ctx *fwdcontext.Context, desc *fwdpb.TableDesc) (Table, error) }
A Builder can build a Table of the specified type.
type Table ¶
type Table interface { fwdobject.Object // Process processes the packet using the specified counters. // Process returns an updated processing state for the packet. // It may also return new Actions that are used to process the packet. // Process assumes that counters are always valid (not nil). Process(packet fwdpacket.Packet, counters fwdobject.Counters) (fwdaction.Actions, fwdaction.State) // Add adds or updates a table entry. AddEntry(entryDesc *fwdpb.EntryDesc, descs []*fwdpb.ActionDesc) error // Remove removes a table entry. RemoveEntry(entryDesc *fwdpb.EntryDesc) error // Entries lists all entries in a table. Entries() []string // Clear removes all entries in the table. Clear() }
A Table is a mapping of entries to a set of actions. It is used to match entries to packets to determine the actions to be performed on the packet.
Tables are always created by provisioning.
Directories ¶
Path | Synopsis |
---|---|
Package bridge implements an exact match table that operates on the packet's mac address.
|
Package bridge implements an exact match table that operates on the packet's mac address. |
Package exact implements a Lucius table that performs packet matches using an exact match match and satisfies the interface fwdtable.Table.
|
Package exact implements a Lucius table that performs packet matches using an exact match match and satisfies the interface fwdtable.Table. |
Package flow implements a Lucius table that performs packet matches using an flow matching and satisfies the interface fwdtable.Table.
|
Package flow implements a Lucius table that performs packet matches using an flow matching and satisfies the interface fwdtable.Table. |
Package mock_fwdpacket is a generated GoMock package.
|
Package mock_fwdpacket is a generated GoMock package. |
Package prefix implements a Lucius table that performs packet matches using the longest prefix match and satisfies the interface fwdtable.Table.
|
Package prefix implements a Lucius table that performs packet matches using the longest prefix match and satisfies the interface fwdtable.Table. |
Package tabletestutil consists of routines used to test Lucius tables like prefix match, exact match and flow match tables.
|
Package tabletestutil consists of routines used to test Lucius tables like prefix match, exact match and flow match tables. |
Package tableutil contains utilites used to implement tables in Lucius like prefix, flow and exact match.
|
Package tableutil contains utilites used to implement tables in Lucius like prefix, flow and exact match. |