ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
nat_quality_t Struct Reference

NAT quality assessment result. More...

#include <src/discovery/nat.h>

Data Fields

bool has_public_ip
 STUN reflexive == local IP.
 
bool upnp_available
 UPnP/NAT-PMP mapping succeeded.
 
uint16_t upnp_mapped_port
 Mapped external port (if upnp_available)
 
acip_nat_type_t nat_type
 NAT classification.
 
bool lan_reachable
 Same subnet as peer.
 
uint64_t stun_latency_ns
 RTT to STUN server in nanoseconds.
 
char public_address [64]
 Public IP address.
 
uint16_t public_port
 Public port.
 
uint32_t upload_kbps
 Upload bandwidth in Kbps.
 
uint32_t download_kbps
 Download bandwidth in Kbps.
 
uint64_t rtt_to_acds_ns
 Latency to ACDS in nanoseconds.
 
uint64_t jitter_ns
 Packet timing variance in nanoseconds.
 
uint8_t packet_loss_pct
 Packet loss percentage.
 
bool has_host_candidates
 Local IP reachable.
 
bool has_srflx_candidates
 STUN worked.
 
bool has_relay_candidates
 TURN available.
 
bool detection_complete
 All probes finished.
 
asciichat_error_t error
 Error if detection failed.
 

Detailed Description

NAT quality assessment result.

Contains all information needed to determine hosting suitability.

Definition at line 27 of file nat.h.

Field Documentation

◆ detection_complete

bool nat_quality_t::detection_complete

All probes finished.

Definition at line 51 of file nat.h.

Referenced by nat_detect_quality(), nat_quality_from_acip(), negotiate_determine_result(), and negotiate_receive_peer_quality().

◆ download_kbps

uint32_t nat_quality_t::download_kbps

Download bandwidth in Kbps.

Definition at line 40 of file nat.h.

Referenced by nat_measure_bandwidth(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ error

asciichat_error_t nat_quality_t::error

Error if detection failed.

Definition at line 52 of file nat.h.

◆ has_host_candidates

bool nat_quality_t::has_host_candidates

Local IP reachable.

Definition at line 46 of file nat.h.

Referenced by nat_detect_quality(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ has_public_ip

bool nat_quality_t::has_public_ip

STUN reflexive == local IP.

Definition at line 29 of file nat.h.

Referenced by nat_compute_tier(), nat_detect_quality(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ has_relay_candidates

bool nat_quality_t::has_relay_candidates

TURN available.

Definition at line 48 of file nat.h.

Referenced by nat_detect_quality(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ has_srflx_candidates

bool nat_quality_t::has_srflx_candidates

STUN worked.

Definition at line 47 of file nat.h.

Referenced by nat_detect_quality(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ jitter_ns

uint64_t nat_quality_t::jitter_ns

Packet timing variance in nanoseconds.

Definition at line 42 of file nat.h.

Referenced by nat_measure_bandwidth(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ lan_reachable

bool nat_quality_t::lan_reachable

Same subnet as peer.

Definition at line 33 of file nat.h.

Referenced by nat_compute_tier(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ nat_type

acip_nat_type_t nat_quality_t::nat_type

NAT classification.

Definition at line 32 of file nat.h.

Referenced by nat_compute_tier(), nat_detect_quality(), nat_quality_from_acip(), nat_quality_init(), and nat_quality_to_acip().

◆ packet_loss_pct

uint8_t nat_quality_t::packet_loss_pct

Packet loss percentage.

Definition at line 43 of file nat.h.

Referenced by nat_measure_bandwidth(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ public_address

char nat_quality_t::public_address[64]

Public IP address.

Definition at line 35 of file nat.h.

Referenced by nat_detect_quality(), nat_quality_from_acip(), nat_quality_to_acip(), and negotiate_determine_result().

◆ public_port

uint16_t nat_quality_t::public_port

Public port.

Definition at line 36 of file nat.h.

Referenced by nat_quality_from_acip(), and nat_quality_to_acip().

◆ rtt_to_acds_ns

uint64_t nat_quality_t::rtt_to_acds_ns

Latency to ACDS in nanoseconds.

Definition at line 41 of file nat.h.

Referenced by nat_compare_quality(), nat_measure_bandwidth(), nat_quality_from_acip(), and nat_quality_to_acip().

◆ stun_latency_ns

uint64_t nat_quality_t::stun_latency_ns

RTT to STUN server in nanoseconds.

Definition at line 34 of file nat.h.

Referenced by nat_quality_from_acip(), and nat_quality_to_acip().

◆ upload_kbps

uint32_t nat_quality_t::upload_kbps

Upload bandwidth in Kbps.

Definition at line 39 of file nat.h.

Referenced by nat_compare_quality(), nat_measure_bandwidth(), nat_quality_from_acip(), nat_quality_to_acip(), and negotiate_receive_peer_quality().

◆ upnp_available

bool nat_quality_t::upnp_available

UPnP/NAT-PMP mapping succeeded.

Definition at line 30 of file nat.h.

Referenced by nat_compute_tier(), nat_detect_quality(), nat_quality_from_acip(), nat_quality_to_acip(), and negotiate_determine_result().

◆ upnp_mapped_port

uint16_t nat_quality_t::upnp_mapped_port

Mapped external port (if upnp_available)

Definition at line 31 of file nat.h.

Referenced by nat_detect_quality(), nat_quality_from_acip(), nat_quality_to_acip(), and negotiate_determine_result().


The documentation for this struct was generated from the following file: