Documentation
¶
Overview ¶
Package reservation defines the dataplane representation of the bandwidth reservation token in the bandwidth allocation system for star topologies.
Index ¶
Constants ¶
const ( // PathType is the path type unique value of the reservation path. PathType path.Type = 250 // MetaLen is the length of the PathMetaHeader. MetaLen = 16 )
Variables ¶
This section is empty.
Functions ¶
func MACInput ¶
MACInput returns the MAC input data block with the following layout:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DstISD | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | DstAS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SrcISD | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | SrcAS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DstHost (var) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SrcHost (var) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ExpTime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RateLimit | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCION Path (var) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
func RegisterPath ¶
func RegisterPath()
RegisterPath registers the path type with the path package. It must be invoked to activate the reservation path type.
Types ¶
type MetaHdr ¶
type MetaHdr struct { // ID represents the unique ID of the reservation. ID uint32 // ExpTime is the time that the reservation expires, expressed in Unix time as a // 4 byte integer with 1 second granularity. ExpTime uint32 // RateLimit is the resevation rate limit with 1 Mbit/s granularity. RateLimit uint16 // MAC is the 6-byte Message Authentication Code to authenticate the reservation. MAC []byte }
MetaHdr is the PathMetaHdr of a Reservation (data-plane) path type.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ExpTime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RateLimit | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Mac | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
func (*MetaHdr) DecodeFromBytes ¶
DecodeFromBytes populates the fields from a raw buffer. The buffer must be of length >= MetaLen.
func (*MetaHdr) SerializeTo ¶
SerializeTo writes the fields into the provided buffer. The buffer must be of length >= MetaLen.
type Path ¶
Path encodes a reservation path. A reservation path is essentially a SCION path with an additional path meta header.
func (*Path) DecodeFromBytes ¶
DecodeFromBytes populates the fields from a raw buffer. The buffer must be of length >= MetaLen.
func (*Path) Reverse ¶
Reverse reverses a Reservation path. The reservation token is stripped from the returned regular SCION path.
func (*Path) SerializeTo ¶
SerializeTo writes the fields into the provided buffer. The buffer must be of length >= MetaLen.