Skip to main content

Module udp

Module udp 

Source
Expand description

Encoding and decoding for relay messages

Relay messages are sent along circuits, inside RELAY or RELAY_EARLY cells.

Re-exportsยง

use super::msg; ๐Ÿ”’
use crate::chancell::CELL_DATA_LEN; ๐Ÿ”’
use derive_deftly::Deftly; ๐Ÿ”’
use std::net::IpAddr; ๐Ÿ”’
use std::net::Ipv4Addr; ๐Ÿ”’
use std::net::Ipv6Addr; ๐Ÿ”’
use std::str::FromStr; ๐Ÿ”’
use tor_bytes::EncodeResult; ๐Ÿ”’
use tor_bytes::Error; ๐Ÿ”’
use tor_bytes::Result; ๐Ÿ”’
use tor_bytes::Readable; ๐Ÿ”’
use tor_bytes::Reader; ๐Ÿ”’
use tor_bytes::Writeable; ๐Ÿ”’
use tor_bytes::Writer; ๐Ÿ”’
use tor_memquota::derive_deftly_template_HasMemoryCost; ๐Ÿ”’

Structsยง

AddressPort
Address contained in a ConnectUdp and ConnectedUdp cell which can represent a hostname, IPv4 or IPv6 along a port number.
ConnectUdp
A ConnectUdp message creates a new UDP data stream.
ConnectedUdp
A ConnectedUdp cell sent in response to a ConnectUdp.
Datagram
A Datagram message represents data sent along a UDP stream.

Enumsยง

Address
Address representing either a hostname, IPv4 or IPv6.

Constantsยง

MAX_HOSTNAME_LEN ๐Ÿ”’
Maximum length of an Address::Hostname set at 255.
T_HOSTNAME ๐Ÿ”’
Indicates the payload is a hostname.
T_IPV4 ๐Ÿ”’
Indicates the payload is an IPv4.
T_IPV6 ๐Ÿ”’
Indicates the payload is an IPv6.