Documentation ¶
Index ¶
- type BatchConn
- type Connector
- func (c *Connector) AddExternalInterface(localIfID iface.ID, link control.LinkInfo, owned bool) error
- func (c *Connector) AddInternalInterface(ia addr.IA, local netip.AddrPort) error
- func (c *Connector) AddSvc(ia addr.IA, svc addr.SVC, a netip.AddrPort) error
- func (c *Connector) CreateIACtx(ia addr.IA) error
- func (c *Connector) DelSvc(ia addr.IA, svc addr.SVC, a netip.AddrPort) error
- func (c *Connector) ListExternalInterfaces() ([]control.ExternalInterface, error)
- func (c *Connector) ListInternalInterfaces() ([]control.InternalInterface, error)
- func (c *Connector) ListSiblingInterfaces() ([]control.SiblingInterface, error)
- func (c *Connector) SetKey(ia addr.IA, index int, key []byte) error
- func (c *Connector) SetPortRange(start, end uint16)
- type DataPlane
- func (d *DataPlane) AddExternalInterface(ifID uint16, conn BatchConn, src, dst control.LinkEnd, cfg control.BFD) error
- func (d *DataPlane) AddInternalInterface(conn BatchConn, ip netip.Addr) error
- func (d *DataPlane) AddLinkType(ifID uint16, linkTo topology.LinkType) error
- func (d *DataPlane) AddNeighborIA(ifID uint16, remote addr.IA) error
- func (d *DataPlane) AddNextHop(ifID uint16, src, dst netip.AddrPort, cfg control.BFD, sibling string) error
- func (d *DataPlane) AddRemotePeer(local, remote uint16) error
- func (d *DataPlane) AddSvc(svc addr.SVC, a netip.AddrPort) error
- func (d *DataPlane) DelSvc(svc addr.SVC, a netip.AddrPort) error
- func (d *DataPlane) IsRunning() bool
- func (d *DataPlane) Run(ctx context.Context, cfg *RunConfig) error
- func (d *DataPlane) SetIA(ia addr.IA) error
- func (d *DataPlane) SetKey(key []byte) error
- func (d *DataPlane) SetPortRange(start, end uint16)
- func (d *DataPlane) Shutdown()
- type Metrics
- type RunConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchConn ¶
type BatchConn interface { ReadBatch(underlayconn.Messages) (int, error) WriteTo([]byte, netip.AddrPort) (int, error) WriteBatch(msgs underlayconn.Messages, flags int) (int, error) Close() error }
BatchConn is a connection that supports batch reads and writes.
type Connector ¶
type Connector struct { DataPlane DataPlane ReceiveBufferSize int SendBufferSize int BFD config.BFD DispatchedPortStart *int DispatchedPortEnd *int // contains filtered or unexported fields }
Connector implements the Dataplane API of the router control process. It sets up connections for the DataPlane.
func (*Connector) AddExternalInterface ¶
func (c *Connector) AddExternalInterface(localIfID iface.ID, link control.LinkInfo, owned bool) error
AddExternalInterface adds a link between the local and remote address.
func (*Connector) AddInternalInterface ¶
AddInternalInterface adds the internal interface.
func (*Connector) CreateIACtx ¶
CreateIACtx creates the context for ISD-AS.
func (*Connector) ListExternalInterfaces ¶
func (c *Connector) ListExternalInterfaces() ([]control.ExternalInterface, error)
func (*Connector) ListInternalInterfaces ¶
func (c *Connector) ListInternalInterfaces() ([]control.InternalInterface, error)
func (*Connector) ListSiblingInterfaces ¶
func (c *Connector) ListSiblingInterfaces() ([]control.SiblingInterface, error)
func (*Connector) SetPortRange ¶ added in v0.12.0
type DataPlane ¶
type DataPlane struct { Metrics *Metrics ExperimentalSCMPAuthentication bool // contains filtered or unexported fields }
DataPlane contains a SCION Border Router's forwarding logic. It reads packets from multiple sockets, performs routing, and sends them to their destinations (after updating the path, if that is needed).
func (*DataPlane) AddExternalInterface ¶
func (d *DataPlane) AddExternalInterface(ifID uint16, conn BatchConn, src, dst control.LinkEnd, cfg control.BFD) error
AddExternalInterface adds the inter AS connection for the given interface ID. If a connection for the given ID is already set this method will return an error. This can only be called on a not yet running dataplane.
func (*DataPlane) AddInternalInterface ¶
AddInternalInterface sets the interface the data-plane will use to send/receive traffic in the local AS. This can only be called once; future calls will return an error. This can only be called on a not yet running dataplane.
func (*DataPlane) AddLinkType ¶
AddLinkType adds the link type for a given interface ID. If a link type for the given ID is already set, this method will return an error. This can only be called on a not yet running dataplane.
func (*DataPlane) AddNeighborIA ¶
AddNeighborIA adds the neighboring IA for a given interface ID. If an IA for the given ID is already set, this method will return an error. This can only be called on a yet running dataplane.
func (*DataPlane) AddNextHop ¶
func (d *DataPlane) AddNextHop(ifID uint16, src, dst netip.AddrPort, cfg control.BFD, sibling string) error
AddNextHop sets the next hop address for the given interface ID. If the interface ID already has an address associated this operation fails. This can only be called on a not yet running dataplane.
func (*DataPlane) AddRemotePeer ¶ added in v0.9.0
AddRemotePeer adds the remote peering interface ID for local interface ID. If the link type for the given ID is already set to a different type, this method will return an error. This can only be called on a not yet running dataplane.
func (*DataPlane) AddSvc ¶
AddSvc adds the address for the given service. This can be called multiple times for the same service, with the address added to the list of addresses that provide the service.
func (*DataPlane) IsRunning ¶ added in v0.12.0
IsRunning() Indicates the running state of the data plane. If true, the dataplane is initialized and ready to process or already processing packets. In this case some configuration changes are not permitted. If false, the data plane is not ready to process packets yet, or is shutting down.
func (*DataPlane) SetKey ¶
SetKey sets the key used for MAC verification. The key provided here should already be derived as in scrypto.HFMacFactory.
func (*DataPlane) SetPortRange ¶ added in v0.12.0
type Metrics ¶
type Metrics struct { InputBytesTotal *prometheus.CounterVec OutputBytesTotal *prometheus.CounterVec InputPacketsTotal *prometheus.CounterVec OutputPacketsTotal *prometheus.CounterVec ProcessedPackets *prometheus.CounterVec DroppedPacketsTotal *prometheus.CounterVec InterfaceUp *prometheus.GaugeVec BFDInterfaceStateChanges *prometheus.CounterVec BFDPacketsSent *prometheus.CounterVec BFDPacketsReceived *prometheus.CounterVec ServiceInstanceCount *prometheus.GaugeVec ServiceInstanceChanges *prometheus.CounterVec SiblingReachable *prometheus.GaugeVec SiblingBFDPacketsSent *prometheus.CounterVec SiblingBFDPacketsReceived *prometheus.CounterVec SiblingBFDStateChanges *prometheus.CounterVec }
Metrics defines the data-plane metrics for the BR.
func NewMetrics ¶
func NewMetrics() *Metrics
NewMetrics initializes the metrics for the Border Router, and registers them with the default registry.
Directories ¶
Path | Synopsis |
---|---|
Package bfd implements Bidirectional Forwarding Detection as defined in RFC 5880.
|
Package bfd implements Bidirectional Forwarding Detection as defined in RFC 5880. |
mock_bfd
Package mock_bfd is a generated GoMock package.
|
Package mock_bfd is a generated GoMock package. |
cmd
|
|
Package config defines the router's configuration file.
|
Package config defines the router's configuration file. |
internal/metrics
Package metrics defines and exports router metrics to be scraped by prometheus.
|
Package metrics defines and exports router metrics to be scraped by prometheus. |
mock_api
Package mock_api is a generated GoMock package.
|
Package mock_api is a generated GoMock package. |
Package mgmtapi provides primitives to interact with the openapi HTTP API.
|
Package mgmtapi provides primitives to interact with the openapi HTTP API. |
Package mock_router is a generated GoMock package.
|
Package mock_router is a generated GoMock package. |