Documentation ¶
Index ¶
- Constants
- Variables
- func HostEq(a, b HostAddr) bool
- func HostLen(htype HostAddrType) (uint8, error)
- func HostTypeCheck(t HostAddrType) bool
- type HostAddr
- type HostAddrType
- type HostIPv4
- type HostIPv6
- type HostNone
- type HostSVC
- func (h HostSVC) Base() HostSVC
- func (h HostSVC) Copy() HostAddr
- func (h HostSVC) IP() net.IP
- func (h HostSVC) IsMulticast() bool
- func (h HostSVC) Multicast() HostSVC
- func (h HostSVC) Pack() common.RawBytes
- func (h HostSVC) Size() int
- func (h HostSVC) String() string
- func (h HostSVC) Type() HostAddrType
- type IAInt
- type ISD_AS
- func (ia *ISD_AS) Copy() *ISD_AS
- func (ia *ISD_AS) Eq(other *ISD_AS) bool
- func (ia *ISD_AS) IAInt() IAInt
- func (ia ISD_AS) MarshalText() ([]byte, error)
- func (ia *ISD_AS) Parse(b common.RawBytes)
- func (ia *ISD_AS) SizeOf() int
- func (ia ISD_AS) String() string
- func (ia *ISD_AS) UnmarshalText(text []byte) error
- func (ia *ISD_AS) Write(b common.RawBytes)
Constants ¶
View Source
const ( HostLenNone = 0 HostLenIPv4 = net.IPv4len HostLenIPv6 = net.IPv6len HostLenSVC = 2 )
View Source
const ( IABytes = 4 MaxISD = (1 << 12) - 1 MaxAS = (1 << 20) - 1 )
View Source
const (
ErrorBadHostAddrType = "Unsupported host address type"
)
View Source
const (
ErrorIAUnpack = "Unable to unpack ISD-AS"
)
View Source
const SVCMcast = 0x8000
Variables ¶
Functions ¶
func HostLen ¶
func HostLen(htype HostAddrType) (uint8, error)
func HostTypeCheck ¶
func HostTypeCheck(t HostAddrType) bool
Types ¶
type HostAddr ¶
type HostAddr interface { Size() int Type() HostAddrType Pack() common.RawBytes IP() net.IP Copy() HostAddr fmt.Stringer }
func HostFromIP ¶
func HostFromRaw ¶
func HostFromRaw(b common.RawBytes, htype HostAddrType) (HostAddr, error)
type HostAddrType ¶
type HostAddrType uint8
const ( HostTypeNone HostAddrType = iota HostTypeIPv4 HostTypeIPv6 HostTypeSVC )
func (HostAddrType) String ¶
func (t HostAddrType) String() string
type HostSVC ¶
type HostSVC uint16
func (HostSVC) IsMulticast ¶
func (HostSVC) Type ¶
func (h HostSVC) Type() HostAddrType
type ISD_AS ¶
func IAFromString ¶
func (ISD_AS) MarshalText ¶
func (*ISD_AS) UnmarshalText ¶
allows ISD_AS to be used as a map key in JSON.
Click to show internal directories.
Click to hide internal directories.