[][src]Enum lightning::ln::msgs::NetAddress

pub enum NetAddress {
    IPv4 {
        addr: [u8; 4],
        port: u16,
    },
    IPv6 {
        addr: [u8; 16],
        port: u16,
    },
    OnionV2 {
        addr: [u8; 10],
        port: u16,
    },
    OnionV3 {
        ed25519_pubkey: [u8; 32],
        checksum: u16,
        version: u8,
        port: u16,
    },
}

An address which can be used to connect to a remote peer

Variants

IPv4

An IPv4 address/port on which the peer is listening.

Fields of IPv4

addr: [u8; 4]

The 4-byte IPv4 address

port: u16

The port on which the node is listening

IPv6

An IPv6 address/port on which the peer is listening.

Fields of IPv6

addr: [u8; 16]

The 16-byte IPv6 address

port: u16

The port on which the node is listening

OnionV2

An old-style Tor onion address/port on which the peer is listening.

Fields of OnionV2

addr: [u8; 10]

The bytes (usually encoded in base32 with ".onion" appended)

port: u16

The port on which the node is listening

OnionV3

A new-style Tor onion address/port on which the peer is listening. To create the human-readable "hostname", concatenate ed25519_pubkey, checksum, and version, wrap as base32 and append ".onion".

Fields of OnionV3

ed25519_pubkey: [u8; 32]

The ed25519 long-term public key of the peer

checksum: u16

The checksum of the pubkey and version, as included in the onion address

version: u8

The version byte, as defined by the Tor Onion v3 spec.

port: u16

The port on which the node is listening

Trait Implementations

impl Clone for NetAddress[src]

impl Debug for NetAddress[src]

impl PartialEq<NetAddress> for NetAddress[src]

impl StructuralPartialEq for NetAddress[src]

impl Writeable for NetAddress[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.