package
0.0.1
Repository: https://github.com/libonomy/libonomy-p2p.git
Documentation: pkg.go.dev

# Functions

GroupKey returns a string representing the network group an address is part of.
IsIPv4 returns whether or not the given address is an IPv4 address.
IsLocal returns whether or not the given address is a localNode address.
IsOnionCatTor returns whether or not the passed address is in the IPv6 range used by bitcoin to support Tor (fd87:d87e:eb43::/48).
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 localNode 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 creates a new Discovery.

# Constants

GetAddresses is the findnode protocol ID.
MessageBufSize is the buf size we give to the messages channel.
TODO: Parametrize.
Name is the name if the protocol.
PingPong is the ping protocol ID.

# Variables

ErrBootAbort is returned when when bootstrap is canceled by context cancel.
ErrEmptyRoutingTable means that our routing table is empty thus we can't lookup any node (so we can't query any).
ErrLookupFailed determines that we could'nt lookup this node in the routing table or network.

# Structs

Discovery is struct that holds the protocol components, the protocol definition, the addr book data structure and more.
KnownAddress tracks information about a known network address that is used to determine how viable an address is.
MockPeerStore is a mocked discovery.

# Interfaces

PeerStore is an interface to the discovery protocol.
Protocol is the API of node messages used to discover new nodes.