Documentation
¶
Index ¶
- Constants
- func AddrRecEncodedLen(ea_iplen, gw_iplen int) int
- func AddrRecSlices(ea_iplen, gw_iplen int, arec []byte) (ea, ip, gw, refh, refl []byte)
- type AddrRec
- type IP
- func (a IP) Add(b IP) IP
- func (a IP) And(b IP) IP
- func (ip IP) AsSlice() []byte
- func (ip IP) AsSlice4() []byte
- func (ip IP) AsSlice6() []byte
- func (ip IP) AsUint32() uint32
- func (ip IP) ByteFromEnd(i int) byte
- func (ip IP) Is4() bool
- func (ip IP) Is6() bool
- func (ip IP) IsLinkLocal() bool
- func (ip IP) IsZero() bool
- func (ip IP) IsZeroAddr() bool
- func (ip IP) Len() int
- func (a IP) Not() IP
- func (a IP) Or(b IP) IP
- func (ip IP) String() string
- func (ip IP) Ver() int
- func (a IP) XOr(b IP) IP
- type IpRef
Constants ¶
View Source
const ( V1_SIG = 0x11 // v1 signature V1_HDR_LEN = 8 V1_MARK_LEN = 4 + 4 // oid + mark // v1 header offsets V1_VER = 0 // must be 0x11 V1_CMD = 1 V1_PKTID = 2 V1_IPVER = 4 // high nibble is the ea IP ver, low nibble is gw IP ver V1_RESERVED = 5 V1_PKTLEN = 6 // v1 mark offsets V1_OID = 0 V1_MARK = 4 // v1 host data offsets V1_HOST_DATA_BATCHID = 0 V1_HOST_DATA_COUNT = 0 V1_HOST_DATA_HASH = 4 V1_HOST_DATA_SOURCE = 12 // v1 save dnssource offsets V1_DNSSOURCE_MARK = 4 V1_DNSSOURCE_XMARK = 4 V1_DNSSOURCE_HASH = 8 V1_DNSSOURCE_SOURCE = 16 )
View Source
const ( V1_NOOP = 0 V1_SET_AREC = 1 V1_SET_MARK = 2 V1_GET_REF = 4 V1_GET_EA = 6 V1_MC_GET_EA = 7 V1_SAVE_OID = 8 V1_SAVE_TIME_BASE = 9 V1_RECOVER_EA = 10 V1_RECOVER_REF = 11 V1_MC_HOST_DATA = 14 V1_MC_HOST_DATA_HASH = 15 V1_SAVE_DNSSOURCE = 16 )
View Source
const ( V1_DATA = 0x00 V1_REQ = 0x40 V1_ACK = 0x80 V1_NACK = 0xC0 )
View Source
const ( //V1_TYPE_NONE = 0 //V1_TYPE_AREC = 1 //V1_TYPE_IPV4 = 3 V1_TYPE_STRING = 4 )
Variables ¶
This section is empty.
Functions ¶
func AddrRecEncodedLen ¶ added in v1.1.0
func AddrRecSlices ¶ added in v1.1.0
Types ¶
type AddrRec ¶ added in v1.1.0
func AddrRecDecode ¶ added in v1.1.0
func (AddrRec) EncodedLen ¶ added in v1.1.0
type IP ¶
func IPFromUint32 ¶
func MustParseIP ¶
func (IP) ByteFromEnd ¶
func (IP) IsLinkLocal ¶
func (IP) IsZero ¶
Tests if the IP is equal to the zero-initialized value. This is distinct from the zero IP address (eg. 0.0.0.0 or ::).
func (IP) IsZeroAddr ¶
Click to show internal directories.
Click to hide internal directories.