ascii-chat 0.11.33
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)
 
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 [7]
 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 818 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 826 of file packet.h.

Referenced by client_crypto_handshake(), discovery_session_process(), discovery_session_start(), handle_protocol_version_packet(), and server_crypto_handshake().

◆ 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 828 of file packet.h.

Referenced by client_crypto_handshake(), discovery_session_process(), discovery_session_start(), and server_crypto_handshake().

◆ feature_flags

uint16_t protocol_version_packet_t::feature_flags

Feature flags bitmask (FEATURE_RLE_ENCODING, etc.)

Definition at line 830 of file packet.h.

Referenced by client_crypto_handshake(), discovery_session_process(), discovery_session_start(), handle_protocol_version_packet(), and server_crypto_handshake().

◆ protocol_revision

uint16_t protocol_version_packet_t::protocol_revision

Minor protocol revision (server can be newer)

Definition at line 822 of file packet.h.

Referenced by client_crypto_handshake(), discovery_session_process(), discovery_session_start(), handle_protocol_version_packet(), and server_crypto_handshake().

◆ protocol_version

uint16_t protocol_version_packet_t::protocol_version

Major protocol version (must match for compatibility)

Definition at line 820 of file packet.h.

Referenced by client_crypto_handshake(), discovery_session_process(), discovery_session_start(), handle_protocol_version_packet(), and server_crypto_handshake().

◆ reserved

uint8_t protocol_version_packet_t::reserved[7]

Reserved bytes for future expansion (must be zero)

Definition at line 832 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 824 of file packet.h.

Referenced by client_crypto_handshake(), discovery_session_process(), discovery_session_start(), handle_protocol_version_packet(), and server_crypto_handshake().


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