ipsec.h 947 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _LINUX_IPSEC_H
  3. #define _LINUX_IPSEC_H
  4. /* The definitions, required to talk to KAME racoon IKE. */
  5. #include <linux/pfkeyv2.h>
  6. #define IPSEC_PORT_ANY 0
  7. #define IPSEC_ULPROTO_ANY 255
  8. #define IPSEC_PROTO_ANY 255
  9. enum {
  10. IPSEC_MODE_ANY = 0, /* We do not support this for SA */
  11. IPSEC_MODE_TRANSPORT = 1,
  12. IPSEC_MODE_TUNNEL = 2,
  13. IPSEC_MODE_BEET = 3
  14. };
  15. enum {
  16. IPSEC_DIR_ANY = 0,
  17. IPSEC_DIR_INBOUND = 1,
  18. IPSEC_DIR_OUTBOUND = 2,
  19. IPSEC_DIR_FWD = 3, /* It is our own */
  20. IPSEC_DIR_MAX = 4,
  21. IPSEC_DIR_INVALID = 5
  22. };
  23. enum {
  24. IPSEC_POLICY_DISCARD = 0,
  25. IPSEC_POLICY_NONE = 1,
  26. IPSEC_POLICY_IPSEC = 2,
  27. IPSEC_POLICY_ENTRUST = 3,
  28. IPSEC_POLICY_BYPASS = 4
  29. };
  30. enum {
  31. IPSEC_LEVEL_DEFAULT = 0,
  32. IPSEC_LEVEL_USE = 1,
  33. IPSEC_LEVEL_REQUIRE = 2,
  34. IPSEC_LEVEL_UNIQUE = 3
  35. };
  36. #define IPSEC_MANUAL_REQID_MAX 0x3fff
  37. #define IPSEC_REPLAYWSIZE 32
  38. #endif /* _LINUX_IPSEC_H */