Module strict_encoding::net
source · Expand description
Network addresses uniform encoding (LNPBP-42).
Implementation of network address uniform encoding standard (LMPBP-42), which allows representation of any kind of network address as a fixed-size byte string occupying 37 bytes. This standard is used for the strict encoding of networking addresses.
Currently supported networking address protocols (see AddrFormat
):
- IPv4 and IPv6
- Tor, both ONION v2 and v3 addresses
- Lightning peer network addresses (Secp256k1 public keys) This list may be extended with future LNPBP-42 revisions
Currently supported transport protocols (see Transport
):
- TCP
- UDP
- MTCP (multi-path TCP)
- QUIC (more efficient UDP version) This list may be extended with future LNPBP-42 revisions
Structs
Structured uniform address representation, consisting of host address,
(conforming a given address format) optional port and optional transport
protocol
Enums
Format of the host address
Uniform ecoding error types
Supported transport protocols
Constants
Standard length of the host-specific part of the encoding, in bytes
Standard length for the whole uniformly-encoded address data, including
host and protocol parts.
Traits
Uniform encoding trait, which should be implemented by different address
structures which allow representation as
UniformAddr
and encoding to
RawUniformAddr
.Type Definitions
Type representing host-specific address part
Type representing whole uniformly-encoded address, with all host and
protocol-specific parts put together