pub struct Message { /* private fields */ }
Expand description
A network packet with associated metadata.
Implementations
Get the queue number.
Get the nfmark (fwmark) of the packet.
Set the associated nfmark (fwmark) of the packet.
Get the interface index of the interface the packet arrived on. If the packet is locally
generated, or the input interface is no longer known (e.g. POSTROUTING
chain), 0 is
returned.
Get the interface index of the bridge port the packet arrived on. If the packet is locally
generated, or the input interface is no longer known (e.g. POSTROUTING
chain), 0 is
returned.
Get the interface index of the interface the packet is to be transmitted from. If the
packet is locally destinated, or the output interface is unknown (e.g. PREROUTING
chain),
0 is returned.
Get the interface index of the bridge port the packet is to be transmitted from. If the
packet is locally destinated, or the output interface is unknown (e.g. PREROUTING
chain),
0 is returned.
Get the original length of the packet.
Check if the packet is GSO-offloaded.
Check if the checksums are ready, e.g. due to offload.
Get the security context string of the local process sending the packet. If not applicable,
None
is returned.
Get the UID of the local process sending the packet. If not applicable, None
is returned.
Get the GID of the local process sending the packet. If not applicable, None
is returned.
Get the timestamp of the packet.
Get the hardware address associated with the packet. For Ethernet packets, the hardware address returned will be the MAC address of the packet source host, if any.
Get the packet ID that netfilter uses to track the packet.
Get the link layer protocol number, e.g. the EtherType field on Ethernet links.
Get the content of the payload.
Get the content of the payload in mutable state. If the final verdict is not
Verdict::Drop
, the change be committed to the kernel.
Note: Once the method is called, the payload will be written back regardles whether the underlying storage is actually modified, therefore it is not optimal performance-wise.
Set the content of the payload. If the final verdict is not Verdict::Drop
, the updated
payload will be committed to the kernel.
Get the current verdict.
Set the current verdict.