Documentation
¶
Overview ¶
Package hashable provides handy utility types for making unhashable values hashable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPMAC ¶
type IPMAC struct {
// contains filtered or unexported fields
}
IPMAC is a hashable tuple of an IP address and a MAC address suitable for use as a map key.
type MACAddr ¶
type MACAddr uint64
MACAddr is a hashable encoding of a MAC address.
func MACAddrFrom6 ¶
MACAddrFrom6 returns the address of the MAC-48 address given by the bytes in addr.
func MACAddrFromSlice ¶
func MACAddrFromSlice(slice net.HardwareAddr) (MACAddr, bool)
MACAddrFromSlice parses the 6-byte slice as a MAC-48 address. Note that a net.HardwareAddr can be passed directly as the []byte argument. If slice's length is not 6, MACAddrFromSlice returns 0, false.
func ParseMAC ¶
ParseMAC parses s as an IEEE 802 MAC-48 address using one of the formats accepted by net.ParseMAC.
Click to show internal directories.
Click to hide internal directories.