Documentation ¶
Index ¶
- Constants
- func Addr2BitString(addr netip.Addr) (result string)
- func AddrGlobalID(addr netip.Addr) (hex string, err error)
- func AddrLink(addr netip.Addr) (url string)
- func AddrMulticastGroupID(addr netip.Addr) (hex string, err error)
- func AddrMulticastNetworkPrefix(addr netip.Addr) (hex string, err error)
- func AddrSolicitedNodeMulticast(addr netip.Addr) (newAddr netip.Addr, err error)
- func AddrSubnet(addr netip.Addr) string
- func AddrTypePrefix(addr netip.Addr) (prefix netip.Prefix)
- func Arpa(addr netip.Addr) (addrStr string)
- func First(addr netip.Addr) netip.Addr
- func HasType(t int, candidates ...int) (hasType bool)
- func Interface(addr netip.Addr) string
- func IsARPA(addr netip.Addr) (is bool)
- func Last(addr netip.Addr) netip.Addr
- func LinkLocalDefaultGateway(addr netip.Addr) string
- func RandAddrGlobalUnicast() (addr netip.Addr, err error)
- func RandAddrInterfaceLocalMulticast() (addr netip.Addr, err error)
- func RandAddrLinkLocal() (addr netip.Addr, err error)
- func RandAddrLinkLocalMulticast() (addr netip.Addr, err error)
- func RandAddrMulticast() (addr netip.Addr, err error)
- func RandAddrPrivate() (addr netip.Addr, err error)
- func RoutingPrefix(addr netip.Addr) string
- type AddressInfo
- type DomainInfo
- type DomainInfoSet
- type IPSummary
- type MXRecordInfo
Constants ¶
const ( // GlobalUnicastName name for global unicast type GlobalUnicastName = "global-unicast" // LinkLocalName name for link local type LinkLocalName = "link-local" // UniqueLocalName name for unique local type UniqueLocalName = "unique-local" // PrivateName name for private type PrivateName = "private" // MulticastName name for multicast type MulticastName = "multicast" // InterfaceLocalMulticastName name for interface local multicast type InterfaceLocalMulticastName = "interface-local-multicast" // LinkLocalMulticastName name for link local multicast type LinkLocalMulticastName = "link-local-multicast" )
const ( // GlobalUnicast IPV6 type GlobalUnicast = iota // UniqueLocal IPV6 type UniqueLocal // LinkLocalUnicast IPV6 type LinkLocalUnicast // Loopback IPV6 type Loopback // Multicast IPV6 type Multicast // InterfaceLocalMulticast IPV6 type InterfaceLocalMulticast // LinkLocalMulticast IPV6 type LinkLocalMulticast // Private IPV6 type Private // Unspecified IPV6 type Unspecified // Unknown IPV6 type Unknown )
Variables ¶
This section is empty.
Functions ¶
func Addr2BitString ¶ added in v0.1.32
Addr2BitString complete address binary to 16 bit sections
func AddrGlobalID ¶ added in v0.1.32
AddrGlobalID get subsection of bits in network part of IP
func AddrMulticastGroupID ¶ added in v0.1.32
AddrMulticastGroupID id from range for multicast addresses
func AddrMulticastNetworkPrefix ¶ added in v0.1.32
AddrMulticastNetworkPrefix get prefix specific to multicast (at end of IP before Group ID)
func AddrSolicitedNodeMulticast ¶
AddrSolicitedNodeMulticast get solicited node multicast address for incoming unicast address EUI-64 compliance
func AddrSubnet ¶ added in v0.1.32
AddrSubnet get the string subnet section as a hex string
func AddrTypePrefix ¶ added in v0.1.32
AddrTypePrefix the prefix for the IP type
func Interface ¶ added in v0.1.32
Interface get the string representation in hex of the interface bits
func LinkLocalDefaultGateway ¶
LinkLocalDefaultGateway get default gateway for link local
func RandAddrGlobalUnicast ¶ added in v0.1.32
RandAddrGlobalUnicast get a global unicast random IPV6 address
func RandAddrInterfaceLocalMulticast ¶ added in v0.1.32
RandAddrInterfaceLocalMulticast get a random interface local multicast address
func RandAddrLinkLocal ¶ added in v0.1.32
RandAddrLinkLocal get a link-local random IPV6 address
func RandAddrLinkLocalMulticast ¶ added in v0.1.32
RandAddrLinkLocalMulticast get a random link local multicast address
func RandAddrMulticast ¶ added in v0.1.32
RandAddrMulticast get a random multicast address
func RandAddrPrivate ¶ added in v0.1.32
RandAddrPrivate get a unique local random IPV6 address
func RoutingPrefix ¶ added in v0.1.32
RoutingPrefix get the routing prefix as a hex string
Types ¶
type AddressInfo ¶ added in v0.1.34
type AddressInfo struct { Type string `yaml:"type,omitempty" json:"type,omitempty"` Address string `yaml:"address,omitempty" json:"address,omitempty"` }
AddressInfo information about an address
type DomainInfo ¶ added in v0.1.34
type DomainInfo struct { Domain string `yaml:"domain,omitempty" json:"domain,omitempty"` // Type string `yaml:"type,omitempty" json:"type,omitempty"` AddressInfo []AddressInfo `yaml:"addresses,omitempty" json:"addresses,omitempty"` MXRecords []MXRecordInfo `yaml:"mxrecords,omitempty" json:"mxrecords,omitempty"` }
DomainInfo a set of properties for a domain including addresses and MX records
func NewDomainInfo ¶ added in v0.1.34
func NewDomainInfo() DomainInfo
NewDomainInfo get new domain info for a single domain
type DomainInfoSet ¶ added in v0.1.34
type DomainInfoSet struct {
DomainInfo []DomainInfo `yaml:"domains,omitempty" json:"domains,omitempty"`
}
DomainInfoSet a set of information for domains
func NewDomainInfoSet ¶ added in v0.1.34
func NewDomainInfoSet() DomainInfoSet
NewDomainInfoSet get new domain info list
type IPSummary ¶ added in v0.1.34
type IPSummary struct { IPType string `yaml:"iptype,omitempty" json:"iptype,omitempty"` TypePrefix string `yaml:"typeprefix,omitempty" json:"typeprefix,omitempty"` IP string `yaml:"ip,omitempty" json:"ip,omitempty"` SolicitedNodeMulticast string `yaml:"solicitednodemulticast,omitempty" json:"solicitednodemulticast,omitempty"` Prefix string `yaml:"prefix,omitempty" json:"prefix,omitempty"` NetworkPrefix string `yaml:"networkprefix,omitempty" json:"networkprefix,omitempty"` RoutingPrefix string `yaml:"routingprefix,omitempty" json:"routingprefix,omitempty"` SubnetID string `yaml:"subnetid,omitempty" json:"subnetid,omitempty"` Subnets int64 `yaml:"subnets,omitempty" json:"subnets,omitempty"` GlobalID string `yaml:"globalid,omitempty" json:"globalid,omitempty"` GroupID string `yaml:"groupid,omitempty" json:"groupid,omitempty"` Groups int64 `yaml:"groups,omitempty" json:"groups,omitempty"` InterfaceID string `yaml:"interfaceid,omitempty" json:"interfaceid,omitempty"` Addresses int64 `yaml:"addresses,omitempty" json:"addresses,omitempty"` DefaultGateway string `yaml:"defaultgateway,omitempty" json:"defaultgateway,omitempty"` Link string `yaml:"link,omitempty" json:"link,omitempty"` IPV6Arpa string `yaml:"ipv6arpa,omitempty" json:"ipv6arpa,omitempty"` SubnetFirstAddress string `yaml:"subnetfirstaddress,omitempty" json:"subnetfirstaddress,omitempty"` SubnetLastAddress string `yaml:"subnetlastaddress,omitempty" json:"subnetlastaddress,omitempty"` FirstAddressFieldBinary string `yaml:"firstaddressbinary,omitempty" json:"firstaddressbinary,omitempty"` }
IPSummary summary of properties for an IP
type MXRecordInfo ¶ added in v0.1.34
type MXRecordInfo struct { Domain string `yaml:"domain,omitempty" json:"domain,omitempty"` Pref uint16 `yaml:"pref,omitempty" json:"pref,omitempty"` }
MXRecordInfo an MX record