TCP header.
More...
#include <mitigator_bpf.h>
TCP header.
Access this header after checking transport protocol:
...
}
uint8_t packet_transport_proto(Context ctx)
Get packet transport protocol code, e.g. TCP, UDP, or ICMP.
void * packet_transport_header(Context ctx)
Get packet transport header, e.g. TCP header.
- Note
- This function is for advanced users. Prefer packet_flow() to get ports. 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
- https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure
-
https://tools.ietf.org/html/rfc793
The documentation for this struct was generated from the following file: