Documentation ¶
Index ¶
Constants ¶
const E2EIDLen = 16
const HopFieldLen = 8
const InfoFieldLen = 8
InfoFieldLen is the length in bytes of the InfoField.
const SegmentIDLen = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationBead ¶ added in v0.6.0
AllocationBead represents an allocation resolved in an AS for a given reservation. It is used in an array to represent the allocation trail that happened for a reservation.
type AllocationBeads ¶ added in v0.6.0
type AllocationBeads []AllocationBead
func (AllocationBeads) MinMax ¶ added in v0.6.0
func (bs AllocationBeads) MinMax() BWCls
MinMax returns the minimum of all the max BW in the AllocationBeads.
type BWCls ¶
type BWCls uint8
BWCls is the bandwidth class. bandwidth = 16 * sqrt(2^(BWCls - 1)). 0 <= bwcls <= 63 kbps.
func BWClsFromBW ¶ added in v0.6.0
BWClsFromBW constructs a BWCls from the bandwidth. Given that bandwidth = 16 * sqrt(2^(BWCls - 1)) where bandwidth is kbps. We then have BWCls = 2 * log2( bandwidth/16 ) + 1 The value of BWCls will be the ceiling of the previous expression.
type E2EID ¶
E2EID identifies a COLIBRI E2E reservation. The suffix is different for each reservation for any given AS.
func E2EIDFromRaw ¶
E2EIDFromRaw constructs an E2EID parsing a buffer.
func E2EIDFromRawBuffers ¶ added in v0.6.0
E2EIDFromRawBuffers constructs a E2DID from two separate buffers.
type HopField ¶ added in v0.6.0
HopField is a COLIBRI HopField. TODO(juagargi) move to slayers
func HopFieldFromRaw ¶ added in v0.6.0
HopFieldFromRaw builds a HopField from a raw buffer.
type IndexNumber ¶ added in v0.6.0
type IndexNumber uint8
IndexNumber is a 4 bit index for a reservation.
func (IndexNumber) Add ¶ added in v0.6.0
func (i IndexNumber) Add(other IndexNumber) IndexNumber
func (IndexNumber) Sub ¶ added in v0.6.0
func (i IndexNumber) Sub(other IndexNumber) IndexNumber
func (IndexNumber) Validate ¶ added in v0.6.0
func (i IndexNumber) Validate() error
Validate will return an error for invalid values.
type InfoField ¶
type InfoField struct { ExpirationTick Tick BWCls BWCls RLC RLC Idx IndexNumber PathType PathType }
InfoField is used in the reservation token and segment request data. 0B 1 2 3 4 5 6 7 +--------+--------+--------+--------+--------+--------+--------+--------+ | Expiration time (4B) | BwCls | RTT Cls|Idx|Type| padding| +--------+--------+--------+--------+--------+--------+--------+--------+
The bandwidth class (BwCls) indicates the reserved bandwidth in an active reservation. In a steady request, it indicates the minimal bandwidth class reserved so far. In a ephemeral request, it indicates the bandwidth class that the source end host is seeking to reserve.
The round trip class (RTT Cls) allows for more granular control in the pending request garbage collection.
The reservation index (Idx) is used to allow for multiple overlapping reservations within a single path, which enables renewal and changing the bandwidth requested.
Type indicates which path type of the reservation.
func InfoFieldFromRaw ¶
InfoFieldFromRaw builds an InfoField from the InfoFieldLen bytes buffer.
type PathEndProps ¶ added in v0.6.0
type PathEndProps uint8
PathEndProps represent the zero or more properties a COLIBRI path can have at both ends.
const ( StartLocal PathEndProps = 0x10 StartTransfer PathEndProps = 0x20 EndLocal PathEndProps = 0x01 EndTransfer PathEndProps = 0x02 )
The only current properties are "Local" (can be used to create e2e rsvs) and "Transfer" (can be stiched together with another segment reservation). The first 4 bits encode the properties of the "Start" AS, and the last 4 bits encode those of the "End" AS.
func NewPathEndProps ¶ added in v0.6.0
func NewPathEndProps(startLocal, startTransfer, endLocal, endTransfer bool) PathEndProps
func (PathEndProps) Validate ¶ added in v0.6.0
func (pep PathEndProps) Validate() error
Validate will return an error for invalid values.
func (PathEndProps) ValidateWithPathType ¶ added in v0.6.0
func (pep PathEndProps) ValidateWithPathType(pt PathType) error
ValidateWithPathType checks the validity of the properties when in a path of the specified type.
type PathType ¶
type PathType uint8
PathType specifies which type of COLIBRI path this segment reservation or request refers to.
type SegmentID ¶
SegmentID identifies a COLIBRI segment reservation. The suffix differentiates reservations for the same AS.
func NewSegmentID ¶ added in v0.6.0
NewSegmentID returns a new SegmentID
func SegmentIDFromRaw ¶
SegmentIDFromRaw constructs a SegmentID parsing a raw buffer.
func SegmentIDFromRawBuffers ¶ added in v0.6.0
SegmentIDFromRawBuffers constructs a SegmentID from two separate buffers.
type SplitCls ¶
type SplitCls uint8
SplitCls is the traffic split parameter. split = sqrt(2^c). The split divides the bandwidth in control traffic (BW * split) and end to end traffic (BW * (1-s)). 0 <= splitCls <= 256 .
type Tick ¶
type Tick uint32
Tick represents a slice of time of 4 seconds.
func TickFromTime ¶
TickFromTime returns the tick for a given time.
type Token ¶ added in v0.6.0
Token is used in the data plane to forward COLIBRI packets.
func TokenFromRaw ¶ added in v0.6.0
TokenFromRaw builds a Token from the passed bytes buffer.