UDP header.  
 More...
#include <mitigator_bpf.h>
UDP 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/User_Datagram_Protocol#UDP_datagram_structure 
 
- 
https://tools.ietf.org/html/rfc768 
 
The documentation for this struct was generated from the following file: