Addressing
To send a datagram you need an address for the destination. A SCION address carries more than an IP address does. It names which network the destination is in, not just a host within an assumed one. Understanding that extra piece is most of what there is to SCION addressing.
The address model
The Internet you know addresses a host by an IP and a port. It has no notion of which network that host belongs to. Routing to the target is the network's problem, decided hop by hop by BGP. SCION makes the network explicit and part of the address.
A SCION network is organized into Isolation Domains (ISDs), each containing Autonomous Systems
(ASes). An AS is identified globally by its ISD-AS, written ISD-AS, for example
1-ff00:0:110 (ISD 1, AS ff00:0:110). A full endpoint address then adds the host and port
inside that AS:
The ISD-AS names the network. The host and port name the endpoint within it. This is what makes SCION path-aware: because the destination network is named explicitly, the SDK can look up and choose among the paths that lead to it (see Paths and path policies).
Working with addresses in the SDK
The address types live in the sciparse crate, which scion-stack re-exports, so an application
that depends only on scion-stack reaches them as scion_stack::sciparse::…. Two types cover almost
everything you do:
IsdAsnidentifies an AS. It parses from and displays as the1-ff00:0:110form, and exposes the ISD and AS parts.ScionSocketIpAddris the fullISD-AS + host + portendpoint address, the type you pass tosend_toand get back fromrecv_from. It parses from and displays as1-ff00:0:110,[fd00::1]:443(an IPv4 host drops the brackets, for example1-ff00:0:110,192.0.2.1:443).
For the full type surface (accessors, conversions from std::net types, service addresses), see the
sciparse reference.
Wildcards
The ISD-AS 0 (all-zero) is the wildcard, available as IsdAsn::WILDCARD. It expresses "any
AS", for instance to bind without pinning a specific local AS, or in path-policy matching. It is a
match-any value, not a real address to send to.
Where to go next
- Paths and path policies: once you can name a destination AS, this is how the SDK finds and chooses routes to it.
- The ScionStack model: where addressing fits among the stack's responsibilities.