ctrl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package ctrl handles SCION control-plane payloads, which are encoded as capnp proto messages. Each ctrl payload has a 4B length field prefixed to the start of the capnp message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ReqId   uint64
	TraceId common.RawBytes
}

Data holds all non-union entries from CtrlPld

type Pld

type Pld struct {
	*Data
	// contains filtered or unexported fields
}

func NewPld

func NewPld(u proto.Cerealizable, d *Data) (*Pld, error)

NewPld creates a new control payload, containing the supplied Cerealizable instance.

func NewPldFromRaw

func NewPldFromRaw(b common.RawBytes) (*Pld, error)

func (*Pld) Copy

func (p *Pld) Copy() (*Pld, error)

func (*Pld) Len

func (p *Pld) Len() int

func (*Pld) ProtoId

func (p *Pld) ProtoId() proto.ProtoIdType

func (*Pld) String

func (p *Pld) String() string

func (*Pld) Union

func (p *Pld) Union() (proto.Cerealizable, error)

func (*Pld) Write

func (p *Pld) Write(b common.RawBytes) (int, error)

type X509SignSrc added in v0.6.0

type X509SignSrc struct {
	IA           addr.IA
	Base         scrypto.Version
	Serial       scrypto.Version
	SubjectKeyID []byte
}

X509SignSrc identifes what x509 certificate can be used to verify the signature.

func NewX509SignSrc added in v0.6.0

func NewX509SignSrc(raw []byte) (X509SignSrc, error)

NewX509SignSrc creates a X509SignSrc from a raw buffer.

func (X509SignSrc) Equal added in v0.6.0

func (s X509SignSrc) Equal(o X509SignSrc) bool

Equal indicates whether the contents of the two sources are the same.

func (X509SignSrc) IsZero added in v0.6.0

func (s X509SignSrc) IsZero() bool

IsZero indicates whether the source is equal to the zero value.

func (X509SignSrc) Pack added in v0.6.0

func (s X509SignSrc) Pack() []byte

Pack packs the source in a byte slice.

func (X509SignSrc) String added in v0.6.0

func (s X509SignSrc) String() string

Directories

Path Synopsis
seg
extensions/staticinfo
Package staticinfo contains the internal representation of the StaticInfoExtension path segment extension, and conversion from and to the corresponding protobuf representation.
Package staticinfo contains the internal representation of the StaticInfoExtension path segment extension, and conversion from and to the corresponding protobuf representation.
mock_seg
Package mock_seg is a generated GoMock package.
Package mock_seg is a generated GoMock package.

Jump to

Keyboard shortcuts

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