Skip to main content

Module packet_buffer

Module packet_buffer 

Source
Expand description

GeoNetworking packet buffers (ETSI TS 103 836-4-1 V2.2.1 (2026-04), clauses 8.5 and 8.6).

PacketBuffer implements the maintenance rules shared by the Location Service packet buffer (clause 8.5.3) and the UC/BC forwarding packet buffers (clause 8.6.3):

  1. packets are queued at the tail;
  2. on overflow, packets are removed from the head (head drop);
  3. a flush returns the stored packets in FIFO order;
  4. packets whose queuing time exceeds their lifetime are discarded;
  5. a flushed packet carries its lifetime reduced by the queuing time.

CbfPacketBuffer is the CBF packet buffer (clause 8.6.3), in which every packet is associated with a timer, as set by the CBF algorithms of clauses E.3 and F.3.

Both buffers are clock-agnostic: all operations take the current time in milliseconds.

Mirrors flexstack/geonet/packet_buffer.py.

Structs§

CbfPacketBuffer
CBF packet buffer (clause 8.6.3): packets keyed by their identifier (source GN_ADDR, sequence number), each with its own CBF timer.
PacketBuffer
FIFO packet buffer with head drop and lifetime expiry (clauses 8.5.3, 8.6.3).

Functions§

cbf_timeout_ms
Segment-based CBF timeout TO_CBF (equations E.1 to E.3, and F.1, F.2).
cbf_timeout_update_ms
Recalculated timeout TO_CBF_UPDATE (equation E.4) on reception of a forwarded copy from a sender that is not a better forwarder.