CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
NetPktInfo Struct Reference

Per-datagram information the IP layer carries alongside the payload. More...

#include <net_shared.h>

Data Fields

NetAddr local
 Receive: the local address the datagram arrived on. Send: the address to leave from.
 
uint8 ecn
 NetEcn codepoint; only meaningful when haveEcn is set.
 
bool haveLocal
 local is filled in
 
bool haveEcn
 ecn is filled in
 

Detailed Description

Per-datagram information the IP layer carries alongside the payload.

On a received datagram this says which of the machine's own addresses the datagram was sent to and how the path marked it. On a send it asks for the same two things: leave from this local address, and put this mark on the packet.

Both fields are optional and both have a have flag, because a platform that cannot report or set one must be distinguishable from one that reported "no mark" – a transport doing ECN has to know which it is before it starts marking packets.

Definition at line 328 of file net_shared.h.

Field Documentation

◆ local

NetAddr NetPktInfo::local

Receive: the local address the datagram arrived on. Send: the address to leave from.

Only meaningful when haveLocal is set. This matters for a socket bound to the wildcard address on a machine with more than one address: the reply has to leave from the address the peer sent to, and a routing table lookup will not always pick that one.

Definition at line 334 of file net_shared.h.


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