Documentation
¶
Index ¶
Constants ¶
View Source
const ( //EndOfOptionList indicates the end of the option list. This is used at the // end of all options. EndOfOptionList = 0 //NoOperation is used between options. NoOperation = 1 //Security provides a way for hosts to send security compartmentation. Security = 130 //LooseSourceRecordRoute provides a means for the sources of an //internet datagram to supply routing information to be used in the //gateways in forwarding the datagram to the destination, and to //record the route information. LooseSourceRecordRoute = 131 //StrictSourceRecordRoute provides a means for the source of an internet //datagram to supply routing information to be used by the gateways //in forwardig the datagram to the destination, and to record the route information. StrictSourceRecordRoute = 137 //RecordRoute provides a means to record the route of an internet datagram. RecordRoute = 7 //StreamIdentifier provides a way for the 16-bit SATNET stream identifier //to be carried through networks that do not support the stream concept. StreamIdentifier = 136 //InternetTimestamp records timestamps along the path of the datagram. InternetTimestamp = 68 //MaxOptionsLen is the maximum length of an IPv4 option section. MaxOptionsLen int = 40 // 60 Byte maximum size - 20 bytes for manditory fields //Unclassified security level. Unclassified SecurityLevel = 0x0 //Confidential security level. Confidential = 0xF135 //EFTO security level. EFTO = 0x789A //MMMM security level. MMMM = 0xBC4D // PROG security level. PROG = 0x5E26 // Restricted security level. Restricted = 0xAF13 // Secret security level. Secret = 0xD788 // TopSecret security level TopSecret = 0x6BC5 //Reserved0 (reserved for future use). Reserved0 = 0x35E2 //Reserved1 (reserved for future use). Reserved1 = 0x9AF1 //Reserved2 (reserved for future use). Reserved2 = 0x4D78 //Reserved3 (reserved for future use). Reserved3 = 0x24BD //Reserved4 (reserved for future use). Reserved4 = 0x135E //Reserved5 (reserved for future use). Reserved5 = 0x89AF //Reserved6 (reserved for future use). Reserved6 = 0xC4D6 //Reserved7 (reserved for future use). Reserved7 = 0xE26B )
View Source
const ( //TSOnly specifies that only timestamps should be included in the //timestamp option. TSOnly = 0 //TSAndAddr specifies that each timestamp is preceded with the ip //address of the registering entity. TSAndAddr = 1 //TSPrespec specifies that the ip address fields are prespecified. TSPrespec = 3 )
Variables ¶
View Source
var ( //ErrOptionDataTooLarge is returned when the length of the option data is //greater than the maximum option size. ErrOptionDataTooLarge = fmt.Errorf("The length of the options data is larger than the max options length") //ErrOptionType is returned when an invalid option type is found. ErrOptionType = fmt.Errorf("Invalid option type") //ErrIncorrectRRLength is returned when an RR option has route data with a length //that is not a multiple of 4. ErrIncorrectRRLength = fmt.Errorf("The length of the RR data is not a multiple of 4") )
Functions ¶
This section is empty.
Types ¶
type EOOList ¶
type EOOList struct {
// contains filtered or unexported fields
}
EOOList is the EndOfOptionsList option
func (EOOList) Type ¶
func (o EOOList) Type() OptionType
type IPOption ¶
type IPOption interface {
Type() OptionType
Length() int
Data() []byte
}
IPOption is the interface for an IPv4 option.
type NoOp ¶
type NoOp struct {
// contains filtered or unexported fields
}
NoOp is the NoOperation option
func (NoOp) Type ¶
func (o NoOp) Type() OptionType
type Sec ¶
type Sec struct {
Level SecurityLevel
Compartment SecurityCompartment
Restriction SecurityHandlingRestriction
TCC SecurityTCC
// contains filtered or unexported fields
}
Sec is the ipv4 security option
func (Sec) Type ¶
func (o Sec) Type() OptionType
type SecurityHandlingRestriction ¶
type SecurityHandlingRestriction uint16
SecurityHandlingRestriction ...
type SecurityLevel ¶
type SecurityLevel uint16
SecurityLevel is the security level from a security option.
type StreamID ¶
type StreamID struct {
ID uint16
// contains filtered or unexported fields
}
StreamID is an ipv4 stream id option
func (StreamID) Type ¶
func (o StreamID) Type() OptionType
Click to show internal directories.
Click to hide internal directories.