ipsec.h 884 B

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