Documentation ¶
Index ¶
- type BatchConn
- type Connector
- func (c *Connector) AddExternalInterface(localIfID common.IFIDType, link control.LinkInfo, owned bool) error
- func (c *Connector) AddInternalInterface(ia addr.IA, local net.UDPAddr) error
- func (c *Connector) AddSvc(ia addr.IA, svc addr.HostSVC, ip net.IP) error
- func (c *Connector) CreateIACtx(ia addr.IA) error
- func (c *Connector) DelSvc(ia addr.IA, svc addr.HostSVC, ip net.IP) 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
- type DataPlane
- func (d *DataPlane) AddExternalInterface(ifID uint16, conn BatchConn) error
- func (d *DataPlane) AddExternalInterfaceBFD(ifID uint16, conn BatchConn, src, dst control.LinkEnd, cfg control.BFD) error
- func (d *DataPlane) AddInternalInterface(conn BatchConn, ip net.IP) 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, a *net.UDPAddr) error
- func (d *DataPlane) AddNextHopBFD(ifID uint16, src, dst *net.UDPAddr, cfg control.BFD, sibling string) error
- func (d *DataPlane) AddSvc(svc addr.HostSVC, a *net.UDPAddr) error
- func (d *DataPlane) DelSvc(svc addr.HostSVC, a *net.UDPAddr) error
- func (d *DataPlane) Run(ctx context.Context) error
- func (d *DataPlane) SetIA(ia addr.IA) error
- func (d *DataPlane) SetKey(key []byte) error
- type Metrics
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, *net.UDPAddr) (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 // 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 common.IFIDType, 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 ¶ added in v0.7.0
func (c *Connector) ListExternalInterfaces() ([]control.ExternalInterface, error)
func (*Connector) ListInternalInterfaces ¶ added in v0.7.0
func (c *Connector) ListInternalInterfaces() ([]control.InternalInterface, error)
func (*Connector) ListSiblingInterfaces ¶ added in v0.7.0
func (c *Connector) ListSiblingInterfaces() ([]control.SiblingInterface, error)
type DataPlane ¶
type DataPlane struct { Metrics *Metrics // 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).
XXX(lukedirtwalker): this is still in development and not feature complete. Currently, only the following features are supported:
- initializing connections; MUST be done prior to calling Run
func (*DataPlane) AddExternalInterface ¶
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) AddExternalInterfaceBFD ¶
func (d *DataPlane) AddExternalInterfaceBFD(ifID uint16, conn BatchConn, src, dst control.LinkEnd, cfg control.BFD) error
AddExternalInterfaceBFD adds the inter AS connection BFD session.
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 ¶
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) AddNextHopBFD ¶
func (d *DataPlane) AddNextHopBFD(ifID uint16, src, dst *net.UDPAddr, cfg control.BFD, sibling string) error
AddNextHopBFD adds the BFD session for the next hop address. If the remote ifID belongs to an existing address, the existing BFD session will be re-used.
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) Run ¶
Run starts running the dataplane. Note that configuration is not possible after calling this method.
type Metrics ¶
type Metrics struct { InputBytesTotal *prometheus.CounterVec OutputBytesTotal *prometheus.CounterVec InputPacketsTotal *prometheus.CounterVec OutputPacketsTotal *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 api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
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. |
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 mock_router is a generated GoMock package.
|
Package mock_router is a generated GoMock package. |