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

Consolidated options structure. More...

#include <lib/options/options.h>

Data Fields

asciichat_mode_t detected_mode
 Mode detected from command-line arguments.
 
bool help
 Show help message.
 
bool version
 Show version information.
 
unsigned short int width
 Terminal width in characters.
 
unsigned short int height
 Terminal height in characters.
 
bool auto_width
 Auto-detect width from terminal.
 
bool auto_height
 Auto-detect height from terminal.
 
char address [256]
 Server address (client) or bind address (server)
 
char address6 [256]
 IPv6 bind address (server only)
 
char port [256]
 Server port number.
 
int max_clients
 Maximum concurrent clients (server only)
 
char session_string [64]
 Session string for ACDS discovery (client only)
 
bool acds
 Enable ACDS session registration (default: false)
 
char acds_server [256]
 ACDS server address (default: 127.0.0.1)
 
int acds_port
 ACDS server port (default: 27225)
 
bool webrtc
 Enable WebRTC mode for ACDS session (default: false, Direct TCP)
 
char acds_key_path [256]
 ACDS identity key file path (default: ~/.ascii-chat/acds_identity)
 
char acds_database_path [256]
 ACDS database file path (default: ~/.ascii-chat/acds.db)
 
bool lan_discovery
 Enable LAN service discovery via mDNS (client only)
 
bool no_mdns_advertise
 Disable mDNS service advertisement (server only)
 
int compression_level
 zstd compression level (1-9)
 
bool no_compress
 Disable compression entirely.
 
bool encode_audio
 Enable Opus audio encoding.
 
int reconnect_attempts
 Number of reconnection attempts (-1=infinite, 0=none)
 
unsigned short int webcam_index
 Webcam device index (0 = first)
 
bool webcam_flip
 Flip webcam image horizontally.
 
bool test_pattern
 Use test pattern instead of webcam.
 
bool no_audio_mixer
 Disable audio mixer (debug)
 
terminal_color_mode_t color_mode
 Color mode (auto/none/16/256/truecolor)
 
render_mode_t render_mode
 Render mode (foreground/background/half-block)
 
unsigned short int show_capabilities
 Show terminal capabilities and exit.
 
unsigned short int force_utf8
 Force UTF-8 support.
 
int fps
 Target framerate (1-144, 0=use default)
 
unsigned short int audio_enabled
 Enable audio streaming.
 
int microphone_index
 Microphone device index (-1 = default)
 
int speakers_index
 Speakers device index (-1 = default)
 
unsigned short int audio_analysis_enabled
 Enable audio analysis (debug)
 
unsigned short int audio_no_playback
 Disable speaker playback (debug)
 
unsigned short int stretch
 Allow aspect ratio distortion.
 
unsigned short int quiet
 Quiet mode (suppress logs)
 
unsigned short int verbose_level
 Verbosity level (stackable -V)
 
unsigned short int snapshot_mode
 Snapshot mode (one frame and exit)
 
double snapshot_delay
 Snapshot delay in seconds.
 
unsigned short int strip_ansi
 Strip ANSI escape sequences.
 
char log_file [256]
 Log file path.
 
log_level_t log_level
 Log level threshold.
 
unsigned short int encrypt_enabled
 Enable encryption.
 
char encrypt_key [256]
 SSH/GPG key file path.
 
char password [256]
 Password string.
 
char encrypt_keyfile [256]
 Alternative key file path.
 
unsigned short int no_encrypt
 Disable encryption (opt-out)
 
char server_key [256]
 Expected server public key (client)
 
char client_keys [256]
 Allowed client keys (server)
 
bool require_server_identity
 ACDS: require servers to provide signed Ed25519 identity.
 
bool require_client_identity
 ACDS: require clients to provide signed Ed25519 identity.
 
bool require_server_verify
 Server: only accept clients who verified via ACDS.
 
bool require_client_verify
 Client: only connect to servers whose identity was verified by ACDS.
 
bool acds_expose_ip
 ACDS: explicitly allow public IP disclosure without verification (opt-in)
 
bool acds_insecure
 ACDS: skip server key verification (MITM-vulnerable, requires explicit opt-in)
 
bool prefer_webrtc
 –prefer-webrtc: Try WebRTC before Direct TCP
 
bool no_webrtc
 –no-webrtc: Disable WebRTC, use Direct TCP only
 
bool webrtc_skip_stun
 –webrtc-skip-stun: Skip Stage 2 (STUN), go to TURN
 
bool webrtc_disable_turn
 –webrtc-disable-turn: Disable Stage 3 (TURN), use STUN only
 
bool enable_upnp
 ACDS: Enable UPnP/NAT-PMP port mapping for direct TCP.
 
bool no_upnp
 ACDS: Explicitly disable UPnP/NAT-PMP port mapping.
 
char stun_servers [256]
 ACDS: Comma-separated list of STUN server URLs.
 
char turn_servers [256]
 ACDS: Comma-separated list of TURN server URLs.
 
char turn_username [256]
 ACDS: Username for TURN authentication.
 
char turn_credential [256]
 ACDS: Credential/password for TURN authentication.
 
char turn_secret [256]
 ACDS: Shared secret for dynamic TURN credential generation (HMAC-SHA1)
 
palette_type_t palette_type
 Selected palette type.
 
char palette_custom [256]
 Custom palette characters.
 
bool palette_custom_set
 True if custom palette was set.
 

Detailed Description

Consolidated options structure.

All options from the scattered extern globals are now in a single struct. This struct is immutable once published via RCU - modifications create a new copy.

Definition at line 439 of file options.h.

Field Documentation

◆ acds

bool options_state::acds

Enable ACDS session registration (default: false)

Definition at line 471 of file options.h.

◆ acds_database_path

char options_state::acds_database_path[256]

ACDS database file path (default: ~/.ascii-chat/acds.db)

Definition at line 476 of file options.h.

Referenced by parse_acds_options().

◆ acds_expose_ip

bool options_state::acds_expose_ip

ACDS: explicitly allow public IP disclosure without verification (opt-in)

Definition at line 556 of file options.h.

◆ acds_insecure

bool options_state::acds_insecure

ACDS: skip server key verification (MITM-vulnerable, requires explicit opt-in)

Definition at line 557 of file options.h.

Referenced by client_main().

◆ acds_key_path

char options_state::acds_key_path[256]

ACDS identity key file path (default: ~/.ascii-chat/acds_identity)

Definition at line 475 of file options.h.

Referenced by parse_acds_options().

◆ acds_port

int options_state::acds_port

ACDS server port (default: 27225)

Definition at line 473 of file options.h.

Referenced by client_main().

◆ acds_server

char options_state::acds_server[256]

ACDS server address (default: 127.0.0.1)

Definition at line 472 of file options.h.

Referenced by client_main().

◆ address

char options_state::address[256]

Server address (client) or bind address (server)

Definition at line 462 of file options.h.

Referenced by client_crypto_init(), client_main(), config_create_default(), main(), options_init(), and options_state_init().

◆ address6

char options_state::address6[256]

IPv6 bind address (server only)

Definition at line 463 of file options.h.

Referenced by main(), options_init(), and options_state_init().

◆ audio_analysis_enabled

unsigned short int options_state::audio_analysis_enabled

Enable audio analysis (debug)

Definition at line 519 of file options.h.

◆ audio_enabled

unsigned short int options_state::audio_enabled

Enable audio streaming.

Definition at line 516 of file options.h.

Referenced by config_create_default().

◆ audio_no_playback

unsigned short int options_state::audio_no_playback

Disable speaker playback (debug)

Definition at line 520 of file options.h.

◆ auto_height

bool options_state::auto_height

Auto-detect height from terminal.

Definition at line 457 of file options.h.

Referenced by options_init(), parse_height_option(), update_dimensions_for_full_height(), and update_dimensions_to_terminal_size().

◆ auto_width

bool options_state::auto_width

Auto-detect width from terminal.

Definition at line 456 of file options.h.

Referenced by options_init(), parse_width_option(), update_dimensions_for_full_height(), and update_dimensions_to_terminal_size().

◆ client_keys

char options_state::client_keys[256]

Allowed client keys (server)

Definition at line 547 of file options.h.

Referenced by config_create_default(), and options_init().

◆ color_mode

terminal_color_mode_t options_state::color_mode

Color mode (auto/none/16/256/truecolor)

Definition at line 507 of file options.h.

Referenced by main(), options_init(), options_state_init(), and parse_color_mode_option().

◆ compression_level

int options_state::compression_level

zstd compression level (1-9)

Definition at line 487 of file options.h.

Referenced by options_init(), and options_state_init().

◆ detected_mode

asciichat_mode_t options_state::detected_mode

Mode detected from command-line arguments.

Definition at line 443 of file options.h.

Referenced by main(), and options_init().

◆ enable_upnp

bool options_state::enable_upnp

ACDS: Enable UPnP/NAT-PMP port mapping for direct TCP.

Definition at line 570 of file options.h.

◆ encode_audio

bool options_state::encode_audio

Enable Opus audio encoding.

Definition at line 489 of file options.h.

Referenced by options_init().

◆ encrypt_enabled

unsigned short int options_state::encrypt_enabled

Enable encryption.

Definition at line 541 of file options.h.

Referenced by config_create_default().

◆ encrypt_key

char options_state::encrypt_key[256]

SSH/GPG key file path.

Definition at line 542 of file options.h.

Referenced by client_crypto_init(), config_create_default(), and options_init().

◆ encrypt_keyfile

char options_state::encrypt_keyfile[256]

Alternative key file path.

Definition at line 544 of file options.h.

Referenced by config_create_default(), and options_init().

◆ force_utf8

unsigned short int options_state::force_utf8

Force UTF-8 support.

Definition at line 510 of file options.h.

Referenced by config_create_default().

◆ fps

int options_state::fps

Target framerate (1-144, 0=use default)

Definition at line 511 of file options.h.

Referenced by main().

◆ height

unsigned short int options_state::height

◆ help

bool options_state::help

Show help message.

Definition at line 448 of file options.h.

Referenced by main(), main(), and options_init().

◆ lan_discovery

bool options_state::lan_discovery

Enable LAN service discovery via mDNS (client only)

Definition at line 481 of file options.h.

Referenced by client_main().

◆ log_file

char options_state::log_file[256]

Log file path.

Definition at line 535 of file options.h.

Referenced by asciichat_shared_init(), config_create_default(), main(), main(), and options_init().

◆ log_level

log_level_t options_state::log_level

Log level threshold.

Definition at line 536 of file options.h.

Referenced by parse_log_level_option().

◆ max_clients

int options_state::max_clients

Maximum concurrent clients (server only)

Definition at line 465 of file options.h.

Referenced by options_init(), and options_state_init().

◆ microphone_index

int options_state::microphone_index

Microphone device index (-1 = default)

Definition at line 517 of file options.h.

Referenced by config_create_default(), options_init(), and options_state_init().

◆ no_audio_mixer

bool options_state::no_audio_mixer

Disable audio mixer (debug)

Definition at line 502 of file options.h.

◆ no_compress

bool options_state::no_compress

Disable compression entirely.

Definition at line 488 of file options.h.

Referenced by options_init().

◆ no_encrypt

unsigned short int options_state::no_encrypt

Disable encryption (opt-out)

Definition at line 545 of file options.h.

Referenced by config_create_default(), and options_init().

◆ no_mdns_advertise

bool options_state::no_mdns_advertise

Disable mDNS service advertisement (server only)

Definition at line 482 of file options.h.

◆ no_upnp

bool options_state::no_upnp

ACDS: Explicitly disable UPnP/NAT-PMP port mapping.

Definition at line 571 of file options.h.

◆ no_webrtc

bool options_state::no_webrtc

–no-webrtc: Disable WebRTC, use Direct TCP only

Definition at line 563 of file options.h.

◆ palette_custom

char options_state::palette_custom[256]

Custom palette characters.

Definition at line 582 of file options.h.

Referenced by asciichat_shared_init(), options_init(), and parse_palette_chars_option().

◆ palette_custom_set

bool options_state::palette_custom_set

True if custom palette was set.

Definition at line 583 of file options.h.

Referenced by asciichat_shared_init(), and parse_palette_chars_option().

◆ palette_type

palette_type_t options_state::palette_type

Selected palette type.

Definition at line 581 of file options.h.

Referenced by parse_palette_chars_option(), and parse_palette_option().

◆ password

char options_state::password[256]

Password string.

Definition at line 543 of file options.h.

Referenced by client_crypto_init(), client_main(), config_create_default(), options_init(), and server_crypto_handshake().

◆ port

char options_state::port[256]

Server port number.

Definition at line 464 of file options.h.

Referenced by client_crypto_init(), client_main(), config_create_default(), options_init(), and options_state_init().

◆ prefer_webrtc

bool options_state::prefer_webrtc

–prefer-webrtc: Try WebRTC before Direct TCP

Definition at line 562 of file options.h.

◆ quiet

unsigned short int options_state::quiet

Quiet mode (suppress logs)

Definition at line 530 of file options.h.

Referenced by config_create_default(), and log_set_terminal_output().

◆ reconnect_attempts

int options_state::reconnect_attempts

Number of reconnection attempts (-1=infinite, 0=none)

Definition at line 494 of file options.h.

Referenced by options_init(), and options_state_init().

◆ render_mode

render_mode_t options_state::render_mode

Render mode (foreground/background/half-block)

Definition at line 508 of file options.h.

Referenced by options_init(), and parse_render_mode_option().

◆ require_client_identity

bool options_state::require_client_identity

ACDS: require clients to provide signed Ed25519 identity.

Definition at line 553 of file options.h.

◆ require_client_verify

bool options_state::require_client_verify

Client: only connect to servers whose identity was verified by ACDS.

Definition at line 555 of file options.h.

◆ require_server_identity

bool options_state::require_server_identity

ACDS: require servers to provide signed Ed25519 identity.

Definition at line 552 of file options.h.

◆ require_server_verify

bool options_state::require_server_verify

Server: only accept clients who verified via ACDS.

Definition at line 554 of file options.h.

◆ server_key

char options_state::server_key[256]

Expected server public key (client)

Definition at line 546 of file options.h.

Referenced by client_crypto_init(), client_main(), config_create_default(), and options_init().

◆ session_string

char options_state::session_string[64]

Session string for ACDS discovery (client only)

Definition at line 466 of file options.h.

Referenced by client_main(), and options_init().

◆ show_capabilities

unsigned short int options_state::show_capabilities

Show terminal capabilities and exit.

Definition at line 509 of file options.h.

Referenced by config_create_default(), and main().

◆ snapshot_delay

double options_state::snapshot_delay

Snapshot delay in seconds.

Definition at line 533 of file options.h.

Referenced by config_create_default(), options_state_init(), and parse_snapshot_delay_option().

◆ snapshot_mode

unsigned short int options_state::snapshot_mode

Snapshot mode (one frame and exit)

Definition at line 532 of file options.h.

Referenced by config_create_default().

◆ speakers_index

int options_state::speakers_index

Speakers device index (-1 = default)

Definition at line 518 of file options.h.

Referenced by config_create_default(), options_init(), and options_state_init().

◆ stretch

unsigned short int options_state::stretch

Allow aspect ratio distortion.

Definition at line 525 of file options.h.

Referenced by config_create_default().

◆ strip_ansi

unsigned short int options_state::strip_ansi

Strip ANSI escape sequences.

Definition at line 534 of file options.h.

◆ stun_servers

char options_state::stun_servers[256]

ACDS: Comma-separated list of STUN server URLs.

Definition at line 572 of file options.h.

◆ test_pattern

bool options_state::test_pattern

Use test pattern instead of webcam.

Definition at line 501 of file options.h.

Referenced by config_create_default(), and options_init().

◆ turn_credential

char options_state::turn_credential[256]

ACDS: Credential/password for TURN authentication.

Definition at line 575 of file options.h.

◆ turn_secret

char options_state::turn_secret[256]

ACDS: Shared secret for dynamic TURN credential generation (HMAC-SHA1)

Definition at line 576 of file options.h.

◆ turn_servers

char options_state::turn_servers[256]

ACDS: Comma-separated list of TURN server URLs.

Definition at line 573 of file options.h.

◆ turn_username

char options_state::turn_username[256]

ACDS: Username for TURN authentication.

Definition at line 574 of file options.h.

◆ verbose_level

unsigned short int options_state::verbose_level

Verbosity level (stackable -V)

Definition at line 531 of file options.h.

Referenced by options_init().

◆ version

bool options_state::version

Show version information.

Definition at line 449 of file options.h.

Referenced by main(), main(), and options_init().

◆ webcam_flip

bool options_state::webcam_flip

Flip webcam image horizontally.

Definition at line 500 of file options.h.

Referenced by config_create_default(), and options_init().

◆ webcam_index

unsigned short int options_state::webcam_index

Webcam device index (0 = first)

Definition at line 499 of file options.h.

Referenced by config_create_default(), options_state_init(), and parse_webcam_index_option().

◆ webrtc

bool options_state::webrtc

Enable WebRTC mode for ACDS session (default: false, Direct TCP)

Definition at line 474 of file options.h.

◆ webrtc_disable_turn

bool options_state::webrtc_disable_turn

–webrtc-disable-turn: Disable Stage 3 (TURN), use STUN only

Definition at line 565 of file options.h.

◆ webrtc_skip_stun

bool options_state::webrtc_skip_stun

–webrtc-skip-stun: Skip Stage 2 (STUN), go to TURN

Definition at line 564 of file options.h.

◆ width

unsigned short int options_state::width

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