QUIC Protocol Implementation 1.0
A Python implementation of the QUIC (Quick UDP Internet Connections) protocol.
Loading...
Searching...
No Matches
packet.PacketHeader Class Reference
Collaboration diagram for packet.PacketHeader:

Public Member Functions

bytes pack (self)
 
'PacketHeaderunpack (cls, bytes header)
 

Public Attributes

 header_form
 
 fixed_bit
 
 spin_bit
 
 key_phase
 

Static Public Attributes

int packet_number_length
 
bool header_form = False
 
bool fixed_bit = False
 
bool spin_bit = False
 
bool key_phase = False
 
int reserved_bits = Constants.ZERO
 

Detailed Description

@brief Represents the header of a QUIC packet.

@details Contains fields specified in QUIC protocol for packet headers.

Definition at line 15 of file packet.py.

Member Function Documentation

◆ pack()

bytes packet.PacketHeader.pack (   self)
@brief Packs the PacketHeader into bytes.

@details Shifts and combines the header attributes into a single byte.

@return The packed header as bytes.

Definition at line 29 of file packet.py.

◆ unpack()

'PacketHeader' packet.PacketHeader.unpack (   cls,
bytes  header 
)
@brief Unpacks bytes into a PacketHeader.

@details Extracts each field from the header byte using bitwise operations.

@param header The packed header as bytes.
@return The unpacked PacketHeader object.

Definition at line 48 of file packet.py.

Member Data Documentation

◆ fixed_bit [1/2]

bool packet.PacketHeader.fixed_bit = False
static

Definition at line 24 of file packet.py.

◆ fixed_bit [2/2]

packet.PacketHeader.fixed_bit

Definition at line 39 of file packet.py.

◆ header_form [1/2]

bool packet.PacketHeader.header_form = False
static

Definition at line 23 of file packet.py.

◆ header_form [2/2]

packet.PacketHeader.header_form

Definition at line 38 of file packet.py.

◆ key_phase [1/2]

bool packet.PacketHeader.key_phase = False
static

Definition at line 26 of file packet.py.

◆ key_phase [2/2]

packet.PacketHeader.key_phase

Definition at line 42 of file packet.py.

◆ packet_number_length

int packet.PacketHeader.packet_number_length
static

Definition at line 22 of file packet.py.

◆ reserved_bits

int packet.PacketHeader.reserved_bits = Constants.ZERO
static

Definition at line 27 of file packet.py.

◆ spin_bit [1/2]

bool packet.PacketHeader.spin_bit = False
static

Definition at line 25 of file packet.py.

◆ spin_bit [2/2]

packet.PacketHeader.spin_bit

Definition at line 40 of file packet.py.


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