seg

package
v0.0.0-...-c8fc2fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASEntry

type ASEntry struct {
	RawIA        addr.IAInt `capnp:"isdas"`
	TrcVer       uint64
	CertVer      uint64
	IfIDSize     uint8
	HopEntries   []*HopEntry `capnp:"hops"`
	HashTreeRoot common.RawBytes
	MTU          uint16 `capnp:"mtu"`
	Exts         struct {
		RoutingPolicy common.RawBytes `capnp:"-"` // Not supported yet
		Sibra         common.RawBytes `capnp:"-"` // Not supported yet
	}
}

func (*ASEntry) IA

func (ase *ASEntry) IA() *addr.ISD_AS

func (*ASEntry) Pack

func (ase *ASEntry) Pack() (common.RawBytes, error)

func (*ASEntry) ProtoId

func (ase *ASEntry) ProtoId() proto.ProtoIdType

func (*ASEntry) String

func (ase *ASEntry) String() string

func (*ASEntry) Validate

func (ase *ASEntry) Validate(prevIA *addr.ISD_AS, nextIA *addr.ISD_AS) error

type HopEntry

type HopEntry struct {
	RawInIA     addr.IAInt `capnp:"inIA"`
	RemoteInIF  common.IFIDType
	InMTU       uint16     `capnp:"inMTU"`
	RawOutIA    addr.IAInt `capnp:"outIA"`
	RemoteOutIF common.IFIDType
	RawHopField []byte `capnp:"hopF"`
}

func (*HopEntry) HopField

func (e *HopEntry) HopField() (*spath.HopField, error)

func (*HopEntry) InIA

func (e *HopEntry) InIA() *addr.ISD_AS

func (*HopEntry) OutIA

func (e *HopEntry) OutIA() *addr.ISD_AS

type Meta

type Meta struct {
	Type    Type
	Segment PathSegment `capnp:"pcb"`
}

func (*Meta) String

func (m *Meta) String() string

type PathSegment

type PathSegment struct {
	RawSData     common.RawBytes        `capnp:"sdata"`
	SData        *PathSegmentSignedData `capnp:"-"`
	RawASEntries []*proto.SignedBlobS   `capnp:"asEntries"`
	ASEntries    []*ASEntry             `capnp:"-"`
	// contains filtered or unexported fields
}

func NewSeg

func NewSeg(infoF *spath.InfoField) (*PathSegment, error)

func NewSegFromRaw

func NewSegFromRaw(b common.RawBytes) (*PathSegment, error)

func (*PathSegment) AddASEntry

func (ps *PathSegment) AddASEntry(ase *ASEntry, signType proto.SignType,
	signSrc common.RawBytes) error

func (*PathSegment) ID

func (ps *PathSegment) ID() (common.RawBytes, error)

func (*PathSegment) InfoF

func (ps *PathSegment) InfoF() (*spath.InfoField, error)

func (*PathSegment) MaxAEIdx

func (ps *PathSegment) MaxAEIdx() int

func (*PathSegment) Pack

func (ps *PathSegment) Pack() (common.RawBytes, error)

func (*PathSegment) ProtoId

func (ps *PathSegment) ProtoId() proto.ProtoIdType

func (*PathSegment) SignLastASEntry

func (ps *PathSegment) SignLastASEntry(key common.RawBytes) error

func (*PathSegment) String

func (ps *PathSegment) String() string

func (*PathSegment) Validate

func (ps *PathSegment) Validate() error

func (*PathSegment) VerifyASEntry

func (ps *PathSegment) VerifyASEntry(key common.RawBytes, idx int) error

func (*PathSegment) Write

func (ps *PathSegment) Write(b common.RawBytes) (int, error)

type PathSegmentSignedData

type PathSegmentSignedData struct {
	RawInfo common.RawBytes `capnp:"infoF"`
}

func NewPathSegmentSignedDataFromRaw

func NewPathSegmentSignedDataFromRaw(b common.RawBytes) (*PathSegmentSignedData, error)

func (*PathSegmentSignedData) InfoF

func (pss *PathSegmentSignedData) InfoF() (*spath.InfoField, error)

func (*PathSegmentSignedData) ProtoId

func (pss *PathSegmentSignedData) ProtoId() proto.ProtoIdType

func (*PathSegmentSignedData) String

func (pss *PathSegmentSignedData) String() string

type Type

type Type uint8
const (
	UpSegment   Type = 0
	DownSegment Type = 1
	CoreSegment Type = 2
)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL