Documentation ¶
Overview ¶
Package infraenv contains convenience function common to SCION infra services.
Index ¶
Constants ¶
const (
ErrAppUnableToInitMessenger common.ErrMsg = "Unable to initialize SCION Infra Messenger"
)
Variables ¶
This section is empty.
Functions ¶
func InitInfraEnvironment ¶ added in v0.4.0
func InitInfraEnvironment(topologyPath string)
func InitInfraEnvironmentFunc ¶ added in v0.4.0
func InitInfraEnvironmentFunc(topologyPath string, f func())
InitInfraEnvironmentFunc sets up the environment by first calling env.RealoadTopology and then the provided function.
Types ¶
type LegacyForwardingHandler ¶ added in v0.4.0
type LegacyForwardingHandler struct { ExpectedPayload []byte // BaseHandler is called after the payload is checked for the correct // content. BaseHandler *svc.BaseHandler }
LegacyForwardingHandler is an SVC resolution handler that only responds to packets that have an SVC destination address and contain exactly 4 0x00 bytes in their payload. All other packets are considered to originate from speakers that do not support SVC resolution, so they are forwarded to the application unchanged.
type NetworkConfig ¶ added in v0.4.0
type NetworkConfig struct { // IA is the local AS number. IA addr.IA // Public is the Internet-reachable address in the case where the service // is behind NAT. Public *snet.Addr // Bind is the local address the server should listen on. Bind *snet.Addr // SVC registers this server to receive packets with the specified SVC // destination address. SVC addr.HostSVC // TrustStore is the crypto backend for control-plane verification. TrustStore *trust.Store // ReconnectToDispatcher sets up sockets that automatically reconnect if // the dispatcher closes the connection (e.g., if the dispatcher goes // down). ReconnectToDispatcher bool // QUIC contains configuration details for QUIC servers. If the listening // address is the empty string, then no QUIC socket is opened. QUIC QUIC // SVCResolutionFraction can be used to customize whether SVC resolution is // enabled. SVCResolutionFraction float64 // Router is used by various infra modules for path-related operations. A // nil router means only intra-AS traffic is supported. Router snet.Router // SVCRouter is used to discover the overlay addresses of intra-AS SVC // servers. SVCRouter messenger.LocalSVCRouter }
NetworkConfig describes the networking configuration of a SCION control-plane RPC endpoint.
func (*NetworkConfig) AddressRewriter ¶ added in v0.4.0
func (nc *NetworkConfig) AddressRewriter( connFactory snet.PacketDispatcherService) *messenger.AddressRewriter
AddressRewriter initializes path and svc resolvers for infra servers.
The connection factory is used to open sockets for SVC resolution requests. If the connection factory is nil, the default connection factory is used.
type QUIC ¶ added in v0.4.0
type QUIC struct { // Address is the UDP address to start the QUIC server on. Address string // CertFile is the certificate to use for QUIC authentication. CertFile string // KeyFile is the private key to use for QUIC authentication. KeyFile string }
QUIC contains the QUIC configuration for control-plane speakers.