ipv6

package
v0.0.0-...-d09d56a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPv6

type IPv6 struct {
	// contains filtered or unexported fields
}

IPv6 is an IPv6 address

func Parse

func Parse(s string) *IPv6

Parse parses and returns the IPv6 address in s

func Random

func Random() *IPv6

Random returns a random IPv6 address

func (*IPv6) Addr

func (ip *IPv6) Addr() netip.Addr

Addr returns ip as Addr

func (*IPv6) Binary

func (ip *IPv6) Binary() string

Binary returns ip as a binary string

func (*IPv6) ExplainBin

func (ip *IPv6) ExplainBin() string

ExplainBin returns an explanation of the IP and its structure as string

func (*IPv6) GlobalUnicast

func (ip *IPv6) GlobalUnicast() bool

GlobalUnicast returns wether ip is a global unicast address

func (*IPv6) Hex

func (ip *IPv6) Hex() string

Hex returns ip as a hexadecimal string

func (*IPv6) IID

func (ip *IPv6) IID() string

IID returns the interface identifier of ip as string

func (*IPv6) IPv4Mapped

func (ip *IPv6) IPv4Mapped() bool

IPv4Mapped returns wether ip is an IPv4-mapped IPv6 address

func (*IPv6) InterfaceLocalMulticast

func (ip *IPv6) InterfaceLocalMulticast() bool

InterfaceLocalMulticast returns wether ip is an interface local multicast address

func (*IPv6) LinkLocalMulticast

func (ip *IPv6) LinkLocalMulticast() bool

LinkLocalMulticast returns wether ip is a local multicast address

func (*IPv6) LinkLocalUnicast

func (ip *IPv6) LinkLocalUnicast() bool

LinkLocalUnicast returns wether ip is a local unicast address

func (*IPv6) Loopback

func (ip *IPv6) Loopback() bool

Loopback returns wether ip is a loopback address

func (*IPv6) Multicast

func (ip *IPv6) Multicast() bool

Multicast returns wether ip is a multicast address

func (*IPv6) Network

func (ip *IPv6) Network() string

Network returns the network part of ip as string

func (*IPv6) Prefix

func (ip *IPv6) Prefix() netip.Prefix

Prefix returns ip as Prefix

func (*IPv6) Private

func (ip *IPv6) Private() bool

Private returns wether ip is a private address

func (*IPv6) SetPrefix

func (ip *IPv6) SetPrefix(prefix string)

SetPrefix sets prefix in ip

func (*IPv6) SetPrefixLength

func (ip *IPv6) SetPrefixLength(numBits int)

SetPrefixLength sets prefix length of ip in number of bits

func (*IPv6) String

func (ip *IPv6) String() string

String returns ip as String

func (*IPv6) Subnet

func (ip *IPv6) Subnet() string

Subnet returns the subnet part of ip as string

func (*IPv6) Type

func (ip *IPv6) Type() string

Type return the type of ip

func (*IPv6) Unicast

func (ip *IPv6) Unicast() bool

Unicast returns wether ip is a unicast address

func (*IPv6) Unspecified

func (ip *IPv6) Unspecified() bool

Unspecified returns wether ip is the unspecified address

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL