Documentation ¶
Overview ¶
Package lemming provides reference device to be used with ondatra.
Index ¶
- type Device
- func (d *Device) Dataplane() *dataplane.Dataplane
- func (d *Device) GNMI() *fgnmi.Server
- func (d *Device) GNMIAddr() string
- func (d *Device) GNMIListener() net.Listener
- func (d *Device) GNSI() *fgnsi.Server
- func (d *Device) GRIBIAddr() string
- func (d *Device) GRIBIListener() net.Listener
- func (d *Device) P4RTAddr() string
- func (d *Device) P4RTListener() net.Listener
- func (d *Device) Stop() error
- type Option
- func WithBGPPort(port uint16) Option
- func WithDataplane(enable bool) Option
- func WithDataplaneOpts(opts ...dplaneopts.Option) Option
- func WithGNMIAddr(addr string) Option
- func WithGRIBIAddr(addr string) Option
- func WithGRIBIOpts(opts ...gribis.ServerOpt) Option
- func WithInitialConfig(c []byte) Option
- func WithP4RTAddr(addr string) Option
- func WithSysribAddr(sysribAddr string) Option
- func WithTLSCredsFromFile(certFile, keyFile string) (Option, error)
- func WithTransportCreds(c credentials.TransportCredentials) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device is the reference device implementation.
func (*Device) GNMIAddr ¶ added in v0.2.0
GNMIAddr returns the address that the gNMI/gNOI/gNSI server is listening on.
func (*Device) GNMIListener ¶ added in v0.2.0
GNMIListener returns the listener that the gNMI/gNOI/gNSI server is listening on.
func (*Device) GRIBIAddr ¶ added in v0.2.0
GRIBIAddr returns the address that the gRIBI server is listening on.
func (*Device) GRIBIListener ¶ added in v0.2.0
GRIBIListener returns the listener that the gRIBI server is listening on.
func (*Device) P4RTAddr ¶ added in v0.2.0
P4RTAddr returns the address that the P4RT server is listening on.
func (*Device) P4RTListener ¶ added in v0.2.0
P4RTListener returns the listener that the P4RT server is listening on.
type Option ¶ added in v0.2.0
type Option func(*opt)
Option are device startup options for lemming.
func WithBGPPort ¶ added in v0.4.0
WithBGPPort is a device option that specifies that the BGP port.
func WithDataplane ¶ added in v0.4.0
func WithDataplaneOpts ¶ added in v0.4.0
func WithDataplaneOpts(opts ...dplaneopts.Option) Option
func WithGNMIAddr ¶ added in v0.2.0
WithGNMIAddr is a device option that specifies that the gRIBI address.
func WithGRIBIAddr ¶ added in v0.2.0
WithGRIBIAddr is a device option that specifies that the gRIBI address.
func WithGRIBIOpts ¶ added in v0.5.0
WithGRIBIOpts specifies the set of gRIBI options that should be passed to the gRIBI server that lemming runs.
func WithInitialConfig ¶ added in v0.2.0
WithInitialConfig sets the startup config of the device to c. Today we do not allow the configuration to be changed in flight, but this can be implemented in the future.
This option is intended for standalone device testing.
func WithP4RTAddr ¶ added in v0.2.0
WithP4RTAddr is a device option that specifies that the P4RT address.
func WithSysribAddr ¶ added in v0.4.0
WithSysribAddr specifies a unix domain socket path for sysrib. Default: "/tmp/sysrib.api"
func WithTLSCredsFromFile ¶ added in v0.2.0
WithTLSCredsFromFile loads the credentials from the specified cert and key file and returns them such that they can be used for the gNMI and gRIBI servers.
func WithTransportCreds ¶ added in v0.2.0
func WithTransportCreds(c credentials.TransportCredentials) Option
WithTransportCreds returns a wrapper of TransportCredentials into a DevOpt.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
packet
Package packet takes a packet hex string and prints the decoded packet.
|
Package packet takes a packet hex string and prints the decoded packet. |
Package dataplane is an implementation of the dataplane HAL API.
|
Package dataplane is an implementation of the dataplane HAL API. |
apigen
The apigen command generates C++ and protobuf code for the SAI API.
|
The apigen command generates C++ and protobuf code for the SAI API. |
apigen/docparser
Package docparser implements a parser for Doxygen xml.
|
Package docparser implements a parser for Doxygen xml. |
apigen/protogen
Package protogen implements a generator for SAI to protobuf.
|
Package protogen implements a generator for SAI to protobuf. |
apigen/saiast
Package saiast contains information parsed from AST of the SAI header.
|
Package saiast contains information parsed from AST of the SAI header. |
cpusink
The cpusink package subscribes to a forwarding context and writes packets to genetlink interfaces.
|
The cpusink package subscribes to a forwarding context and writes packets to genetlink interfaces. |
dplanerc
Package dplanerc contains gNMI task handlers.
|
Package dplanerc contains gNMI task handlers. |
forwarding
Package forwarding manages forwarding contexts and forwarding objects.
|
Package forwarding manages forwarding contexts and forwarding objects. |
forwarding/fwdaction
Package fwdaction contains routines and types to manage forwarding actions.
|
Package fwdaction contains routines and types to manage forwarding actions. |
forwarding/fwdaction/actions
Package actions implements various types of actions supported within Lucius.
|
Package actions implements various types of actions supported within Lucius. |
forwarding/fwdaction/mock_fwdpacket
Package mock_fwdpacket is a generated GoMock package.
|
Package mock_fwdpacket is a generated GoMock package. |
forwarding/fwdaction/mock_fwdport
Package mock_fwdport is a generated GoMock package.
|
Package mock_fwdport is a generated GoMock package. |
forwarding/fwdaction/mock_fwdtable
Package mock_fwdtable is a generated GoMock package.
|
Package mock_fwdtable is a generated GoMock package. |
forwarding/fwdconfig
Package fwdconfig contains builders for varius proto types.
|
Package fwdconfig contains builders for varius proto types. |
forwarding/fwdport
Package fwdport contains routines and types to manage forwarding ports.
|
Package fwdport contains routines and types to manage forwarding ports. |
forwarding/fwdport/mock_fwdpacket
Package mock_fwdpacket is a generated GoMock package.
|
Package mock_fwdpacket is a generated GoMock package. |
forwarding/fwdport/ports
Package ports implements various types of ports supported within Lucius.
|
Package ports implements various types of ports supported within Lucius. |
forwarding/fwdport/porttestutil
Package porttestutil contains routines used to create and manage ports for test cases.
|
Package porttestutil contains routines used to create and manage ports for test cases. |
forwarding/fwdtable
Package fwdtable contains routines and types to manage forwarding tables.
|
Package fwdtable contains routines and types to manage forwarding tables. |
forwarding/fwdtable/bridge
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. |
forwarding/fwdtable/exact
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. |
forwarding/fwdtable/flow
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. |
forwarding/fwdtable/mock_fwdpacket
Package mock_fwdpacket is a generated GoMock package.
|
Package mock_fwdpacket is a generated GoMock package. |
forwarding/fwdtable/prefix
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. |
forwarding/fwdtable/tabletestutil
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. |
forwarding/fwdtable/tableutil
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. |
forwarding/infra/deadlock
Package deadlock is a set of simple utilities meant to detect deadlocks based on timeouts.
|
Package deadlock is a set of simple utilities meant to detect deadlocks based on timeouts. |
forwarding/infra/fwdattribute
Package fwdattribute provides types and mechanisms used to manage attributes for forwarding objects.
|
Package fwdattribute provides types and mechanisms used to manage attributes for forwarding objects. |
forwarding/infra/fwdcontext
Package fwdcontext contains routines for managing the context of the forwarding engine.
|
Package fwdcontext contains routines for managing the context of the forwarding engine. |
forwarding/infra/fwdflowcounter
Package fwdflowcounter implements the functionality of Flow Counters.
|
Package fwdflowcounter implements the functionality of Flow Counters. |
forwarding/infra/fwdobject
Package fwdobject contains routines and interfaces used to implement various forwarding objects.
|
Package fwdobject contains routines and interfaces used to implement various forwarding objects. |
forwarding/infra/fwdpacket
Package fwdpacket contains routines and types for manipulating packets.
|
Package fwdpacket contains routines and types for manipulating packets. |
forwarding/infra/fwdset
Package fwdset implements a set of members.
|
Package fwdset implements a set of members. |
forwarding/protocol
Package protocol enables Lucius to uniformly query and mutate network packets containing various protocols.
|
Package protocol enables Lucius to uniformly query and mutate network packets containing various protocols. |
forwarding/protocol/arp
Package arp implements the ARP header.
|
Package arp implements the ARP header. |
forwarding/protocol/ethernet
Package ethernet implements the Ethernet header.
|
Package ethernet implements the Ethernet header. |
forwarding/protocol/icmp
Package icmp implements the ICMP header support in Lucius.
|
Package icmp implements the ICMP header support in Lucius. |
forwarding/protocol/ip
Package ip handles the IP L3 portion of the packet.
|
Package ip handles the IP L3 portion of the packet. |
forwarding/protocol/metadata
Package metadata implements the metadata packet header.
|
Package metadata implements the metadata packet header. |
forwarding/protocol/opaque
Package opaque implements the opaque packet header.
|
Package opaque implements the opaque packet header. |
forwarding/protocol/packettestutil
Package packettestutil contains a set of routines used to test the processing of packet headers and fields.
|
Package packettestutil contains a set of routines used to test the processing of packet headers and fields. |
forwarding/protocol/tcp
Package tcp implements the TCP header support in Lucius.
|
Package tcp implements the TCP header support in Lucius. |
forwarding/protocol/udp
Package udp implements the UDP header support in Lucius.
|
Package udp implements the UDP header support in Lucius. |
forwarding/util/frame
Package frame contains utilities to implement various network protocols and describe their relationship within Lucius.
|
Package frame contains utilities to implement various network protocols and describe their relationship within Lucius. |
forwarding/util/hash/crc16
Package crc16 computes the 16 bit checksum over a series of bytes.
|
Package crc16 computes the 16 bit checksum over a series of bytes. |
forwarding/util/hash/csum16
Package csum16 computes the 16 bit Internet checksum.
|
Package csum16 computes the 16 bit Internet checksum. |
forwarding/util/hash/hash16
Package hash16 provides interfaces for functions computing 16 bit hashes.
|
Package hash16 provides interfaces for functions computing 16 bit hashes. |
forwarding/util/queue
Package queue provides a queue to processes elements in FIFO order using a specified handler, while allowing non-blocking writes to the queue.
|
Package queue provides a queue to processes elements in FIFO order using a specified handler, while allowing non-blocking writes to the queue. |
forwarding/util/stats
Package stats implements Stats that collects data.
|
Package stats implements Stats that collects data. |
kernel
Package kernel contains funcs that interact with the kernel (sycalls, netlink).
|
Package kernel contains funcs that interact with the kernel (sycalls, netlink). |
kernel/kerneltest
package kerneltest contains fake implemetation of structs in kernel package
|
package kerneltest contains fake implemetation of structs in kernel package |
saiserver/attrmgr
Package attrmgr contains a SAI attribute key/value store.
|
Package attrmgr contains a SAI attribute key/value store. |
Package gnmi contains a reference on-device gNMI implementation.
|
Package gnmi contains a reference on-device gNMI implementation. |
gnmiclient
Package gnmiclient contains a funcs to create gNMI for the local cache.
|
Package gnmiclient contains a funcs to create gNMI for the local cache. |
oc
Package oc is a generated package which contains definitions of structs which represent a YANG schema.
|
Package oc is a generated package which contains definitions of structs which represent a YANG schema. |
oc/acl
Package acl is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package acl is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/bgpgue
Package bgpgue is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package bgpgue is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/definedsets
Package definedsets is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package definedsets is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/interfaces
Package interfaces is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package interfaces is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/keychain
Package keychain is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package keychain is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/lacp
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/lldp
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/netinstbgp
Package netinstbgp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package netinstbgp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/netinstisis
Package netinstisis is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package netinstisis is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/networkinstance
Package networkinstance is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package networkinstance is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/ocpath
Package ocpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package ocpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/platform
Package platform is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package platform is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/qos
Package qos is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package qos is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/routingpolicy
Package routingpolicy is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package routingpolicy is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/system
Package system is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package system is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
reconciler
Package reconciler contains a common interface for gNMI reconciler.
|
Package reconciler contains a common interface for gNMI reconciler. |
acltrie
Package acltrie contains a trie for gNMI path with a corresponding policy.
|
Package acltrie contains a trie for gNMI path with a corresponding policy. |
pathz
Package pathz is a gNSI pathz server.
|
Package pathz is a gNSI pathz server. |
internal
|
|
attrs
Package attrs bundles some common interface attributes and provides helpers to generate the appropriate OpenConfig and ATETopology.
|
Package attrs bundles some common interface attributes and provides helpers to generate the appropriate OpenConfig and ATETopology. |
binding
Package binding wraps knebind to allow running integration tests without the need to supply kne/ondatra flags for configuration files.
|
Package binding wraps knebind to allow running integration tests without the need to supply kne/ondatra flags for configuration files. |
debug
Package debug contains flags for turning on or off debug messages.
|
Package debug contains flags for turning on or off debug messages. |
lemmingutil
Package lemmingutil implements some utilities for lemming.
|
Package lemmingutil implements some utilities for lemming. |
packetutil
Package packetutil contains utilities for packets.
|
Package packetutil contains utilities for packets. |
operator
module
|
|
proto
|
|
Package sysrib implements a system-level RIB that is populated initially using an OpenConfig configuration.
|
Package sysrib implements a system-level RIB that is populated initially using an OpenConfig configuration. |