ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
__attribute__ Struct Reference

Network quality metrics for a single participant. More...

#include <include/ascii-chat/network/consensus/metrics.h>

Data Fields

uint8_t participant_id [16]
 UUID of participant.
 
uint8_t nat_tier
 0=LAN, 1=Public, 2=UPnP, 3=STUN, 4=TURN
 
uint32_t upload_kbps
 Upload bandwidth in Kbps (network byte order)
 
uint32_t rtt_ns
 RTT to current host in nanoseconds (network byte order)
 
uint8_t stun_probe_success_pct
 0-100: percentage of successful STUN probes
 
char public_address [64]
 Detected public IP address.
 
uint16_t public_port
 Detected public port (network byte order)
 
uint8_t connection_type
 Direct=0, UPnP=1, STUN=2, TURN=3.
 
uint64_t measurement_time_ns
 Unix ns when measured (network byte order)
 
uint64_t measurement_window_ns
 Duration of measurement in ns (network byte order)
 

Detailed Description

Network quality metrics for a single participant.

Used for host selection in consensus algorithm. Includes NAT classification, bandwidth estimates, latency, and probe success rates.

Definition at line 33 of file metrics.h.

Field Documentation

◆ connection_type

uint8_t __attribute__::connection_type

Direct=0, UPnP=1, STUN=2, TURN=3.

Definition at line 41 of file metrics.h.

◆ measurement_time_ns

uint64_t __attribute__::measurement_time_ns

Unix ns when measured (network byte order)

Definition at line 42 of file metrics.h.

◆ measurement_window_ns

uint64_t __attribute__::measurement_window_ns

Duration of measurement in ns (network byte order)

Definition at line 43 of file metrics.h.

◆ nat_tier

uint8_t __attribute__::nat_tier

0=LAN, 1=Public, 2=UPnP, 3=STUN, 4=TURN

Definition at line 35 of file metrics.h.

◆ participant_id

uint8_t __attribute__::participant_id[16]

UUID of participant.

Definition at line 34 of file metrics.h.

◆ public_address

char __attribute__::public_address[64]

Detected public IP address.

Definition at line 39 of file metrics.h.

◆ public_port

uint16_t __attribute__::public_port

Detected public port (network byte order)

Definition at line 40 of file metrics.h.

◆ rtt_ns

uint32_t __attribute__::rtt_ns

RTT to current host in nanoseconds (network byte order)

Definition at line 37 of file metrics.h.

◆ stun_probe_success_pct

uint8_t __attribute__::stun_probe_success_pct

0-100: percentage of successful STUN probes

Definition at line 38 of file metrics.h.

◆ upload_kbps

uint32_t __attribute__::upload_kbps

Upload bandwidth in Kbps (network byte order)

Definition at line 36 of file metrics.h.


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