package
0.0.0-20240106054325-8321ad0eda4c
Repository: https://github.com/kash-protocol/kashd.git
Documentation: pkg.go.dev
# Functions
AddAddressByIP adds an address where we are given an ip:port and not a appmessage.NetAddress.
IsIPv4 returns whether or not the given address is an IPv4 address.
IsLocal returns whether or not the given address is a local address.
IsRFC1918 returns whether or not the passed address is part of the IPv4 private network address space as defined by RFC1918 (10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16).
IsRFC2544 returns whether or not the passed address is part of the IPv4 address space as defined by RFC2544 (198.18.0.0/15).
IsRFC3849 returns whether or not the passed address is part of the IPv6 documentation range as defined by RFC3849 (2001:DB8::/32).
IsRFC3927 returns whether or not the passed address is part of the IPv4 autoconfiguration range as defined by RFC3927 (169.254.0.0/16).
IsRFC3964 returns whether or not the passed address is part of the IPv6 to IPv4 encapsulation range as defined by RFC3964 (2002::/16).
IsRFC4193 returns whether or not the passed address is part of the IPv6 unique local range as defined by RFC4193 (FC00::/7).
IsRFC4380 returns whether or not the passed address is part of the IPv6 teredo tunneling over UDP range as defined by RFC4380 (2001::/32).
IsRFC4843 returns whether or not the passed address is part of the IPv6 ORCHID range as defined by RFC4843 (2001:10::/28).
IsRFC4862 returns whether or not the passed address is part of the IPv6 stateless address autoconfiguration range as defined by RFC4862 (FE80::/64).
IsRFC5737 returns whether or not the passed address is part of the IPv4 documentation address space as defined by RFC5737 (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24).
IsRFC6052 returns whether or not the passed address is part of the IPv6 well-known prefix range as defined by RFC6052 (64:FF9B::/96).
IsRFC6145 returns whether or not the passed address is part of the IPv6 to IPv4 translated address range as defined by RFC6145 (::FFFF:0:0:0/96).
IsRFC6598 returns whether or not the passed address is part of the IPv4 shared address space specified by RFC6598 (100.64.0.0/10).
IsRoutable returns whether or not the passed address is routable over the public internet.
IsValid returns whether or not the passed address is valid.
New returns a new Kash address manager.
NewAddressRandomize returns a new RandomizeAddress.
NewConfig returns a new address manager Config.
# Constants
BoundPrio signifies the address has been explicitly bounded to.
GetAddressesMax is the most addresses that we will send in response to a getAddress (in practise the most addresses we will return from a call to AddressCache()).
HTTPPrio signifies the address was obtained from an external HTTP service.
InterfacePrio signifies the address is on a local interface.
ManualPrio signifies the address was provided by --externalip.
UpnpPrio signifies the address was obtained from UPnP.
# Variables
ErrAddressNotFound is an error returned from some functions when a given address is not found in the address manager.
# Structs
AddressManager provides a concurrency safe address manager for caching potential peers on the Kash network.
AddressRandomize implement addressRandomizer interface.
Config is a descriptor which specifies the AddressManager instance configuration.
# Type aliases
AddressPriority type is used to describe the hierarchy of local address discovery methods.