1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#include <features.h>
8#include <stdint.h>
9
10#ifdef _GNU_SOURCE
11#define uh_sport source
12#define uh_dport dest
13#define uh_ulen len
14#define uh_sum check
15#endif
16
17struct udphdr {
18    uint16_t uh_sport;
19    uint16_t uh_dport;
20    uint16_t uh_ulen;
21    uint16_t uh_sum;
22};
23
24#define UDP_CORK 1
25#define UDP_ENCAP 100
26
27#define UDP_ENCAP_ESPINUDP_NON_IKE 1
28#define UDP_ENCAP_ESPINUDP 2
29#define UDP_ENCAP_L2TPINUDP 3
30
31#define SOL_UDP 17
32
33#ifdef __cplusplus
34}
35#endif
36