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
- type Data
- type Pld
- func (p *Pld) Copy() (*Pld, error)
- func (p *Pld) GetCertMgmt() (*cert_mgmt.Pld, *Data, error)
- func (p *Pld) GetPathMgmt() (*path_mgmt.Pld, *Data, error)
- func (p *Pld) Len() int
- func (p *Pld) ProtoId() proto.ProtoIdType
- func (p *Pld) SignedPld(signer Signer) (*SignedPld, error)
- func (p *Pld) String() string
- func (p *Pld) Union() (proto.Cerealizable, error)
- func (p *Pld) Write(b common.RawBytes) (int, error)
- type SignSrcDef
- type SignedPld
- func (sp *SignedPld) Copy() (common.Payload, error)
- func (sp *SignedPld) GetVerifiedPld(ctx context.Context, verifier Verifier) (*Pld, error)
- func (sp *SignedPld) Len() int
- func (sp *SignedPld) PackPld() (common.RawBytes, error)
- func (sp *SignedPld) ProtoId() proto.ProtoIdType
- func (sp *SignedPld) String() string
- func (sp *SignedPld) UnsafePld() (*Pld, error)
- func (sp *SignedPld) WritePld(b common.RawBytes) (int, error)
- type Signer
- type Verifier
Constants ¶
const ( // SrcDefaultPrefix is the default prefix for proto.SignS.Src. SrcDefaultPrefix = "DEFAULT: " // SrcDefaultFmt is the default format for proto.SignS.Src. SrcDefaultFmt = `^` + SrcDefaultPrefix + `IA: (\S+) CHAIN: (\d+) TRC: (\d+)$` )
const LenSize = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pld ¶
type Pld struct { *Data // contains filtered or unexported fields }
func NewCertMgmtPld ¶
NewCertMgmtPld creates a new control payload, containing a new cert_mgmt payload, which in turn contains the supplied Cerealizable instance.
func NewPathMgmtPld ¶
NewPathMgmtPld creates a new control payload, containing a new path_mgmt payload, which in turn contains the supplied Cerealizable instance.
func NewPld ¶
func NewPld(u proto.Cerealizable, d *Data) (*Pld, error)
NewPld creates a new control payload, containing the supplied Cerealizable instance.
func (*Pld) GetCertMgmt ¶
GetCertMgmt returns the CertMgmt payload and the CtrlPld's non-union Data. If the union type is not CertMgmt, an error is returned.
func (*Pld) GetPathMgmt ¶
GetPathMgmt returns the PathMgmt payload and the CtrlPld's non-union Data. If the union type is not PathMgmt, an error is returned.
func (*Pld) ProtoId ¶
func (p *Pld) ProtoId() proto.ProtoIdType
type SignSrcDef ¶
SignSrcDef is the default format for signature source. It states the signing entity, and the certificate chain authenticating the public key. The TRC version is a hint for the TRC that can currently be used to verify the chain.
func NewSignSrcDefFromRaw ¶
func NewSignSrcDefFromRaw(b common.RawBytes) (SignSrcDef, error)
func (*SignSrcDef) IsUninitialized ¶ added in v0.4.0
func (s *SignSrcDef) IsUninitialized() bool
IsUninitialized indicates whether the source is equal to the zero value.
func (*SignSrcDef) Pack ¶
func (s *SignSrcDef) Pack() common.RawBytes
func (*SignSrcDef) String ¶
func (s *SignSrcDef) String() string
type SignedPld ¶
type SignedPld struct { Blob common.RawBytes Sign *proto.SignS // contains filtered or unexported fields }
func (*SignedPld) GetVerifiedPld ¶ added in v0.4.0
GetVerifiedPld extracts the control payload and verifies it. If verification fails, an error is returned instead.
func (*SignedPld) ProtoId ¶
func (sp *SignedPld) ProtoId() proto.ProtoIdType
Directories ¶
Path | Synopsis |
---|---|
Package ctrl_msg implements a layer for sending SCION Ctrl payload requests/notifications via the infra dispatcher, including integrated signing and signature verification of ctrl payloads.
|
Package ctrl_msg implements a layer for sending SCION Ctrl payload requests/notifications via the infra dispatcher, including integrated signing and signature verification of ctrl payloads. |
Package ifid contains the Go representation of an IFID keepalive packet.
|
Package ifid contains the Go representation of an IFID keepalive packet. |
mock_seg
Package mock_seg is a generated GoMock package.
|
Package mock_seg is a generated GoMock package. |