Documentation ¶
Index ¶
- Constants
- func NewError(class Class, type_ Type, info Info, e error) error
- type Class
- type ClassType
- type Error
- type Extn
- func (e *Extn) Class() common.L4ProtocolType
- func (e *Extn) Copy() common.Extension
- func (e *Extn) Len() int
- func (e *Extn) Pack() (common.RawBytes, error)
- func (e *Extn) Reverse() (bool, error)
- func (e *Extn) String() string
- func (e *Extn) Type() common.ExtnType
- func (e *Extn) Write(b common.RawBytes) error
- type Hdr
- func (h *Hdr) Copy() l4.L4Header
- func (h *Hdr) GetCSum() common.RawBytes
- func (h *Hdr) L4Len() int
- func (h *Hdr) L4Type() common.L4ProtocolType
- func (h *Hdr) Pack(csum bool) (common.RawBytes, error)
- func (h *Hdr) Reverse()
- func (h *Hdr) SetCSum(csum common.RawBytes)
- func (h *Hdr) SetPldLen(l int)
- func (h *Hdr) SetTime(t time.Time)
- func (h *Hdr) String() string
- func (h *Hdr) Time() time.Time
- func (h *Hdr) Validate(plen int) error
- func (h *Hdr) Write(b common.RawBytes) error
- type Info
- type InfoEcho
- type InfoExtIdx
- type InfoPathOffsets
- type InfoPktSize
- type InfoRecordPath
- type InfoRevocation
- type InfoString
- type InfoTraceRoute
- type Meta
- type Payload
- type QuoteFunc
- type RawBlock
- type RecordPathEntry
- type Type
Constants ¶
View Source
const ( ExtnErrorFlag = 0x1 ExtnHBHFlag = 0x2 )
View Source
const (
ErrorSCMPHdrUnpack = "Failed to unpack SCMP header"
)
View Source
const (
HdrLen = 16
)
View Source
const (
MetaLen = 8
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
Error represents an SCMP error, with an optional nested error.
type Hdr ¶
type Hdr struct { Class Class // SCMP message class Type Type // SCMP message type TotalLen uint16 // Length of SCMP header + payload Checksum common.RawBytes `struct:"[2]byte"` Timestamp uint64 // Time in µs since unix epoch }
func (*Hdr) L4Type ¶
func (h *Hdr) L4Type() common.L4ProtocolType
type InfoExtIdx ¶
type InfoExtIdx struct {
Idx uint8
}
func InfoExtIdxFromRaw ¶
func InfoExtIdxFromRaw(b common.RawBytes) (*InfoExtIdx, error)
func (*InfoExtIdx) Copy ¶
func (e *InfoExtIdx) Copy() Info
func (*InfoExtIdx) Len ¶
func (r *InfoExtIdx) Len() int
func (*InfoExtIdx) String ¶
func (e *InfoExtIdx) String() string
type InfoPathOffsets ¶
func InfoPathOffsetsFromRaw ¶
func InfoPathOffsetsFromRaw(b common.RawBytes) (*InfoPathOffsets, error)
func (*InfoPathOffsets) Copy ¶
func (p *InfoPathOffsets) Copy() Info
func (*InfoPathOffsets) Len ¶
func (p *InfoPathOffsets) Len() int
func (*InfoPathOffsets) String ¶
func (p *InfoPathOffsets) String() string
type InfoPktSize ¶
func InfoPktSizeFromRaw ¶
func InfoPktSizeFromRaw(b common.RawBytes) (*InfoPktSize, error)
func (*InfoPktSize) Copy ¶
func (p *InfoPktSize) Copy() Info
func (*InfoPktSize) Len ¶
func (p *InfoPktSize) Len() int
func (*InfoPktSize) String ¶
func (p *InfoPktSize) String() string
type InfoRecordPath ¶
type InfoRecordPath struct { Id uint64 Entries []*RecordPathEntry }
func InfoRecordPathFromRaw ¶
func InfoRecordPathFromRaw(b common.RawBytes) (*InfoRecordPath, error)
func (*InfoRecordPath) Copy ¶
func (rec *InfoRecordPath) Copy() Info
func (*InfoRecordPath) Len ¶
func (rec *InfoRecordPath) Len() int
func (*InfoRecordPath) NumHops ¶
func (rec *InfoRecordPath) NumHops() int
func (*InfoRecordPath) String ¶
func (rec *InfoRecordPath) String() string
func (*InfoRecordPath) TotalHops ¶
func (rec *InfoRecordPath) TotalHops() int
type InfoRevocation ¶
type InfoRevocation struct { *InfoPathOffsets RawSRev common.RawBytes }
func InfoRevocationFromRaw ¶
func InfoRevocationFromRaw(b common.RawBytes) (*InfoRevocation, error)
func NewInfoRevocation ¶
func NewInfoRevocation(infoF, hopF, ifID uint16, ingress bool, rawSRev common.RawBytes) *InfoRevocation
func (*InfoRevocation) Copy ¶
func (r *InfoRevocation) Copy() Info
func (*InfoRevocation) Len ¶
func (r *InfoRevocation) Len() int
func (*InfoRevocation) String ¶
func (r *InfoRevocation) String() string
type InfoString ¶
type InfoString string
func (InfoString) Copy ¶
func (s InfoString) Copy() Info
func (InfoString) Len ¶
func (s InfoString) Len() int
func (InfoString) String ¶
func (s InfoString) String() string
type InfoTraceRoute ¶
func InfoTraceRouteFromRaw ¶
func InfoTraceRouteFromRaw(b common.RawBytes) (*InfoTraceRoute, error)
func (*InfoTraceRoute) Copy ¶
func (e *InfoTraceRoute) Copy() Info
func (*InfoTraceRoute) Len ¶
func (e *InfoTraceRoute) Len() int
func (*InfoTraceRoute) String ¶
func (e *InfoTraceRoute) String() string
type Meta ¶
type Meta struct { InfoLen uint8 CmnHdrLen uint8 AddrHdrLen uint8 PathHdrLen uint8 ExtHdrsLen uint8 L4HdrLen uint8 L4Proto common.L4ProtocolType }
func MetaFromRaw ¶
type Payload ¶
type Payload struct { Meta *Meta Info Info CmnHdr common.RawBytes AddrHdr common.RawBytes PathHdr common.RawBytes ExtHdrs common.RawBytes L4Hdr common.RawBytes // contains filtered or unexported fields }
func PldFromQuotes ¶
type RecordPathEntry ¶
func (*RecordPathEntry) String ¶
func (entry *RecordPathEntry) String() string
type Type ¶
type Type uint16
const ( T_G_Unspecified Type = iota T_G_EchoRequest T_G_EchoReply T_G_TraceRouteRequest T_G_TraceRouteReply T_G_RecordPathRequest T_G_RecordPathReply )
C_General types
const ( T_R_UnreachNet Type = iota T_R_UnreachHost T_R_L2Error T_R_UnreachProto T_R_UnreachPort T_R_UnknownHost T_R_BadHost T_R_OversizePkt T_R_AdminDenied )
C_Routing types
const ( T_C_BadVersion Type = iota T_C_BadDstType T_C_BadSrcType T_C_BadPktLen T_C_BadInfoFOffset T_C_BadHopFOffset )
C_CmnHdr types
const ( T_P_PathRequired Type = iota T_P_BadMac T_P_ExpiredHopF T_P_BadIF T_P_RevokedIF T_P_NonRoutingHopF T_P_DeliveryNonLocal T_P_BadSegment T_P_BadInfoField T_P_BadHopField )
C_Path types
C_Ext types
Click to show internal directories.
Click to hide internal directories.