Documentation ¶
Index ¶
- Constants
- type AppConnHandler
- type AppConnManager
- type AppSocketServer
- type Destination
- func ComputeDestination(packet *spkt.ScnPkt) (Destination, error)
- func ComputeSCMPDestination(packet *spkt.ScnPkt, header *scmp.Hdr) (Destination, error)
- func ComputeSCMPErrorDestination(packet *spkt.ScnPkt, header *scmp.Hdr) (Destination, error)
- func ComputeSCMPGeneralDestination(s *spkt.ScnPkt, header *scmp.Hdr) (Destination, error)
- func ComputeUDPDestination(packet *spkt.ScnPkt, header *l4.UDP) (Destination, error)
- type Dispatcher
- type IATable
- type NetToRingDataplane
- type SCMPAppDestination
- type SCMPHandlerDestination
- type SVCDestination
- type SocketMetaHandler
- type TableEntry
- type UDPDestination
Constants ¶
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" )
const OverflowLoggingInterval = 10 * time.Second
OverflowLoggingInterval is the minimum amount of time that needs to pass before another overflow logging message is printed (if needed).
const ReceiveBufferSize = 1 << 20
ReceiveBufferSize is the size of receive buffers used by the dispatcher.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConnHandler ¶
type AppConnHandler struct { RoutingTable *IATable // Conn is the local socket to which the application is connected. Conn net.PacketConn // IPv4OverlayConn is the network connection to which egress IPv4 traffic // is sent. IPv4OverlayConn net.PacketConn // IPv6OverlayConn is the network connection to which egress IPv6 traffic // is sent. IPv6OverlayConn net.PacketConn Logger log.Logger }
AppConnHandler handles a single SCION application connection.
func (*AppConnHandler) Handle ¶
func (h *AppConnHandler) Handle()
func (*AppConnHandler) RunAppToNetDataplane ¶
func (h *AppConnHandler) RunAppToNetDataplane(ref registration.RegReference, ovConn net.PacketConn)
RunAppToNetDataplane moves packets from the application's socket to the overlay socket.
func (*AppConnHandler) RunRingToAppDataplane ¶
func (h *AppConnHandler) RunRingToAppDataplane(r *ringbuf.Ring)
RunRingToAppDataplane moves packets from the application's ingress ring to the application's socket.
type AppConnManager ¶
type AppConnManager struct { RoutingTable *IATable // IPv4OverlayConn is the network connection to which IPv4 egress traffic // is sent. IPv4OverlayConn net.PacketConn // IPv6OverlayConn is the network connection to which IPv6 egress traffic // is sent. IPv6OverlayConn net.PacketConn }
AppConnManager handles new connections coming from SCION applications.
func (*AppConnManager) Handle ¶
func (h *AppConnManager) Handle(conn net.PacketConn)
Handle passes conn off to a per-connection state handler.
type AppSocketServer ¶
type AppSocketServer struct { Listener *reliable.Listener ConnManager *AppConnManager }
AppSocketServer accepts new connections coming from SCION apps, and hands them off to the registration + dataplane handler.
func (*AppSocketServer) Serve ¶
func (s *AppSocketServer) Serve() error
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) }
func ComputeDestination ¶
func ComputeDestination(packet *spkt.ScnPkt) (Destination, error)
func ComputeSCMPDestination ¶
ComputeSCMPDestination decides which application to send the SCMP packet to. It also increments SCMP-related metrics.
func ComputeUDPDestination ¶
type Dispatcher ¶
type Dispatcher struct { RoutingTable *IATable OverlaySocket string ApplicationSocket string SocketFileMode os.FileMode }
func (*Dispatcher) ListenAndServe ¶
func (d *Dispatcher) ListenAndServe() error
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 { OverlayConn net.PacketConn RoutingTable *IATable }
NetToRingDataplane reads SCION packets from the overlay 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 overlay receiver.
func (*NetToRingDataplane) Run ¶
func (dp *NetToRingDataplane) Run() error
type SCMPAppDestination ¶
type SCMPAppDestination struct {
ID uint64
}
func (*SCMPAppDestination) Send ¶
func (d *SCMPAppDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)
type SCMPHandlerDestination ¶
type SCMPHandlerDestination struct{}
func (SCMPHandlerDestination) Send ¶
func (h SCMPHandlerDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)
type SVCDestination ¶
func (SVCDestination) Send ¶
func (d SVCDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)
type SocketMetaHandler ¶
SocketMetaHandler processes OS socket metadata during reads.
type TableEntry ¶
type TableEntry struct {
// contains filtered or unexported fields
}
type UDPDestination ¶
func (*UDPDestination) Send ¶
func (d *UDPDestination) Send(dp *NetToRingDataplane, pkt *respool.Packet)