ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
protocol_version_packet_t Struct Reference

Protocol version negotiation packet structure (Packet Type 1). More...

#include <include/ascii-chat/network/packet/packet.h>

Data Fields

uint16_t protocol_version
 Major protocol version (must match for compatibility).
uint16_t protocol_revision
 Minor protocol revision (server can be newer).
uint16_t protocol_patch
 Patch protocol revision.
uint8_t supports_encryption
 Encryption & authentication mode bitmask (ACIP_CRYPTO_* constants: NONE, ENCRYPT, AUTH, or FULL).
uint8_t compression_algorithms
 Supported compression algorithms bitmask (COMPRESS_ALGO_*).
uint8_t compression_threshold
 Compression threshold percentage (0-100, e.g., 80 = compress if >80% size reduction).
uint16_t feature_flags
 Feature flags bitmask (FEATURE_RLE_ENCODING, etc.).
uint8_t reserved [5]
 Reserved bytes for future expansion (must be zero).

Detailed Description

Protocol version negotiation packet structure (Packet Type 1).

Initial handshake packet sent by both client and server to negotiate protocol capabilities, version, compression, and optional features.

Note
This is the first packet exchanged in every connection.
Structure is 16 bytes total (packed).

Definition at line 871 of file packet.h.

Field Documentation

◆ compression_algorithms

uint8_t protocol_version_packet_t::compression_algorithms

Supported compression algorithms bitmask (COMPRESS_ALGO_*).

Definition at line 881 of file packet.h.

Referenced by handle_protocol_version_packet().

◆ compression_threshold

uint8_t protocol_version_packet_t::compression_threshold

Compression threshold percentage (0-100, e.g., 80 = compress if >80% size reduction).

Definition at line 883 of file packet.h.

◆ feature_flags

uint16_t protocol_version_packet_t::feature_flags

Feature flags bitmask (FEATURE_RLE_ENCODING, etc.).

Definition at line 885 of file packet.h.

Referenced by handle_protocol_version_packet().

◆ protocol_patch

uint16_t protocol_version_packet_t::protocol_patch

Patch protocol revision.

Definition at line 877 of file packet.h.

Referenced by acip_security_receive(), handle_protocol_version_packet(), and protocol_version_packet_init().

◆ protocol_revision

uint16_t protocol_version_packet_t::protocol_revision

Minor protocol revision (server can be newer).

Definition at line 875 of file packet.h.

Referenced by acip_security_receive(), handle_protocol_version_packet(), and protocol_version_packet_init().

◆ protocol_version

uint16_t protocol_version_packet_t::protocol_version

◆ reserved

uint8_t protocol_version_packet_t::reserved[5]

Reserved bytes for future expansion (must be zero).

Definition at line 887 of file packet.h.

Referenced by handle_protocol_version_packet().

◆ supports_encryption

uint8_t protocol_version_packet_t::supports_encryption

Encryption & authentication mode bitmask (ACIP_CRYPTO_* constants: NONE, ENCRYPT, AUTH, or FULL).

Definition at line 879 of file packet.h.

Referenced by acip_security_receive(), browser_client_handshake_receive(), client_handshake_receive(), handle_protocol_version_packet(), network_negotiation_receive(), and protocol_version_packet_init().


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