Documentation ¶
Index ¶
- Constants
- type Conn
- func (ac *Conn) Close() error
- func (ac *Conn) LocalAddr() net.Addr
- func (ac *Conn) Read() *respool.Packet
- func (ac *Conn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (ac *Conn) SVCAddr() addr.SVC
- func (ac *Conn) SetDeadline(t time.Time) error
- func (ac *Conn) SetReadDeadline(t time.Time) error
- func (ac *Conn) SetWriteDeadline(t time.Time) error
- func (ac *Conn) Write(pkt *respool.Packet) (int, error)
- func (ac *Conn) WriteTo(p []byte, addr net.Addr) (int, error)
- type Destination
- type IATable
- type NetToRingDataplane
- type SCMPDestination
- type SCMPHandler
- type SVCDestination
- type Server
- type TableEntry
- type UDPDestination
Constants ¶
const ( // ReceiveBufferSize is the size of receive buffers used by the dispatcher. ReceiveBufferSize = 1 << 20 // SendBufferSize is the size of the send buffers used by the dispatcher. SendBufferSize = 1 << 20 )
const ( ErrUnsupportedL4 common.ErrMsg = "unsupported SCION L4 protocol" ErrUnsupportedDestination common.ErrMsg = "unsupported destination address type" ErrUnsupportedSCMPDestination common.ErrMsg = "unsupported SCMP destination address type" ErrUnsupportedQuotedL4Type common.ErrMsg = "unsupported quoted L4 protocol type" ErrMalformedL4Quote common.ErrMsg = "malformed L4 quote" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a connection bound to a specific SCION port/SVC.
type Destination ¶
type Destination interface { // Send takes ownership of pkt, and then sends it to the location described // by this destination. Send(dp *NetToRingDataplane, pkt *respool.Packet) }
type IATable ¶
type IATable struct {
registration.IATable
}
IATable is a type-safe convenience wrapper around a generic routing table.
func NewIATable ¶
func (*IATable) LookupPublic ¶
func (*IATable) LookupService ¶
type NetToRingDataplane ¶
type NetToRingDataplane struct { UnderlayConn net.PacketConn RoutingTable *IATable }
NetToRingDataplane reads SCION packets from the underlay socket, routes them to determine the destination process, and then enqueues the packets on the application's ingress ring.
The rings are used to provide non-blocking IO for the underlay receiver.
func (*NetToRingDataplane) Run ¶
func (dp *NetToRingDataplane) Run() error
type SCMPDestination ¶
func (SCMPDestination) Send ¶
func (d SCMPDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)
type SCMPHandler ¶
type SCMPHandler struct{}
SCMPHandler replies to SCMP echo and traceroute requests.
func (SCMPHandler) Send ¶
func (h SCMPHandler) Send(dp *NetToRingDataplane, pkt *respool.Packet)
type SVCDestination ¶
SVCDestination delivers packets to apps that registered for the configured service.
func (SVCDestination) Send ¶
func (d SVCDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the main object allowing to create new SCION connections.
func NewServer ¶
func NewServer(address string, ipv4Conn, ipv6Conn net.PacketConn) (*Server, error)
NewServer creates new instance of Server. Internally, it opens the dispatcher ports for both IPv4 and IPv6. Returns error if the ports can't be opened.
type TableEntry ¶
type TableEntry struct {
// contains filtered or unexported fields
}
type UDPDestination ¶
UDPDestination delivers packets to the app that registered for the configured public address.
func (UDPDestination) Send ¶
func (d UDPDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package config contains the configuration of the SCION dispatcher.
|
Package config contains the configuration of the SCION dispatcher. |
internal
|
|
respool
Package respool contains the Dispatcher's pool of free buffers/packets.
|
Package respool contains the Dispatcher's pool of free buffers/packets. |
Package mgmtapi provides primitives to interact with the openapi HTTP API.
|
Package mgmtapi provides primitives to interact with the openapi HTTP API. |