addressing

package
v0.0.0-...-2ba7037 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressToUints

func AddressToUints(toProcess net.IP) (uint64, uint64)

func BytesToIPv6Networks

func BytesToIPv6Networks(toParse []byte) ([]*net.IPNet, error)

func FlipBitsInAddress

func FlipBitsInAddress(toFlip *net.IP, startIndex uint8, endIndex uint8) *net.IP

func GenerateRandomAddress

func GenerateRandomAddress() *net.IP

func GenerateRandomAddressInNetwork

func GenerateRandomAddressInNetwork(network *net.IPNet) *net.IP

func GenerateRandomAddressesInNetwork

func GenerateRandomAddressesInNetwork(network *net.IPNet, addrCount int) []*net.IP

func GenerateRandomNetworks

func GenerateRandomNetworks(toGenerate int, minMaskLen int32) []*net.IPNet

func GetAdjacentNetworkAddressesFromIP

func GetAdjacentNetworkAddressesFromIP(toParse *net.IP, fromNybble int, toNybble int) ([]*net.IP, error)

func GetAdjacentNetworkAddressesFromIPs

func GetAdjacentNetworkAddressesFromIPs(toParse []*net.IP, fromNybble int, toNybble int) ([]*net.IP, error)

func GetBaseAddressString

func GetBaseAddressString(network *net.IPNet) string

func GetBorderAddressesFromNetwork

func GetBorderAddressesFromNetwork(network *net.IPNet) (*net.IP, *net.IP)

func GetByteMask

func GetByteMask(maskLength uint8) []byte

func GetByteWithBitsMasked

func GetByteWithBitsMasked(bitMaskLength uint) byte

func GetFirst64BitsOfIP

func GetFirst64BitsOfIP(ip *net.IP) uint64

func GetIPSet

func GetIPSet(ips []*net.IP) map[string]*internal.Empty

func GetIPsFromStrings

func GetIPsFromStrings(toParse []string) []*net.IP

func GetIPv6NetworkFromBytes

func GetIPv6NetworkFromBytes(toProcess []byte, maskLength uint8) (*net.IPNet, error)

func GetIPv6NetworkFromBytesIncLength

func GetIPv6NetworkFromBytesIncLength(toProcess []byte) (*net.IPNet, error)

func GetNetworkFromUints

func GetNetworkFromUints(uints [2]uint64, length uint8) *net.IPNet

func GetNetworksFromStrings

func GetNetworksFromStrings(toParse []string) []*net.IPNet

func GetNybbleFromIP

func GetNybbleFromIP(ip *net.IP, index int) uint8

func GetNybblesFromIP

func GetNybblesFromIP(ip *net.IP, nybbleCount int) []uint8

func GetNybblesFromNetwork

func GetNybblesFromNetwork(network *net.IPNet) []uint8

func GetTextLinesFromIPs

func GetTextLinesFromIPs(addrs []*net.IP) string

func GetUniqueIPs

func GetUniqueIPs(ips []*net.IP, updateFreq int) []*net.IP

func GetUniqueNetworks

func GetUniqueNetworks(networks []*net.IPNet, updateFreq int) []*net.IPNet

func IsAddressIPv4

func IsAddressIPv4(toCheck *net.IP) bool

func NetworkToUints

func NetworkToUints(toProcess *net.IPNet) (uint64, uint64, uint64, uint64)

func NybblesToIP

func NybblesToIP(nybbles []uint8) *net.IP

func ReadIPsFromBinaryFile

func ReadIPsFromBinaryFile(filePath string) ([]*net.IP, error)

func ReadIPv6NetworksFromFile

func ReadIPv6NetworksFromFile(filePath string) ([]*net.IPNet, error)

func ReadIPv6NetworksFromHexFile

func ReadIPv6NetworksFromHexFile(filePath string) ([]*net.IPNet, error)

func UintsToAddress

func UintsToAddress(first uint64, second uint64) *net.IP

func WriteIPsToBinaryFile

func WriteIPsToBinaryFile(filePath string, addrs []*net.IP) error

func WriteIPsToFatHexFile

func WriteIPsToFatHexFile(filePath string, addrs []*net.IP) error

func WriteIPsToHexFile

func WriteIPsToHexFile(filePath string, addrs []*net.IP) error

func WriteIPv6NetworksToFile

func WriteIPv6NetworksToFile(filePath string, networks []*net.IPNet) error

func WriteIPv6NetworksToHexFile

func WriteIPv6NetworksToHexFile(filePath string, networks []*net.IPNet) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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