IPv4 header.
More...
#include <mitigator_bpf.h>
IPv4 header.
Access the header as follows:
void * packet_network_header(Context ctx)
Get packet network header, e.g. IPv4 header.
- Note
- This function is for advanced users. Prefer packet_flow() to get addresses. Prefer packet_transport_payload() to access payload and its length.
-
If you modify the fields of this header and return RESULT_PASS from the filter, call set_packet_mangled() to update checksums.
- See also
- packet_network_proto() to test if IPv4 header is present.
-
https://en.wikipedia.org/wiki/IPv4#Packet_structure
-
https://tools.ietf.org/html/rfc791
The documentation for this struct was generated from the following file: