udp.h 488 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _NETINET_UDP_H
  2. #define _NETINET_UDP_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdint.h>
  7. struct udphdr {
  8. uint16_t source;
  9. uint16_t dest;
  10. uint16_t len;
  11. uint16_t check;
  12. };
  13. #define uh_sport source
  14. #define uh_dport dest
  15. #define uh_ulen len
  16. #define uh_sum check
  17. #define UDP_CORK 1
  18. #define UDP_ENCAP 100
  19. #define UDP_ENCAP_ESPINUDP_NON_IKE 1
  20. #define UDP_ENCAP_ESPINUDP 2
  21. #define UDP_ENCAP_L2TPINUDP 3
  22. #define SOL_UDP 17
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif