ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
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 860 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 870 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 872 of file packet.h.

◆ feature_flags

uint16_t protocol_version_packet_t::feature_flags

Feature flags bitmask (FEATURE_RLE_ENCODING, etc.).

Definition at line 874 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 866 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 864 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

Major protocol version (must match for compatibility).

Definition at line 862 of file packet.h.

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

◆ reserved

uint8_t protocol_version_packet_t::reserved[5]

Reserved bytes for future expansion (must be zero).

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

Referenced by acip_security_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: