Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

  1. // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
  2. //
  3. // Copyright (c) 1985-2000 Microsoft Corporation
  4. //
  5. // This file is part of the Microsoft Research IPv6 Network Protocol Stack.
  6. // You should have received a copy of the Microsoft End-User License Agreement
  7. // for this software along with this release; see the file "license.txt".
  8. // If not, please see http://www.research.microsoft.com/msripv6/license.htm,
  9. // or write to Microsoft Research, One Microsoft Way, Redmond, WA 98052-6399.
  10. //
  11. // Abstract:
  12. //
  13. // Definitions shared between user/kernel IPsec code.
  14. //
  15. #ifndef IPSEC_INCLUDED
  16. #define IPSEC_INCLUDED 1
  17. //
  18. // IPsec action to take when match is found in the SPD.
  19. //
  20. #define IPSEC_BYPASS 0x1 // Bypass IPsec processing.
  21. #define IPSEC_DISCARD 0x2 // Discard packet.
  22. #define IPSEC_APPLY 0x4 // Apply IPsec processing.
  23. #define IPSEC_APPCHOICE 0x8 // Sending app determines applicable security.
  24. //
  25. // Authentication algorithms.
  26. //
  27. #define ALGORITHM_NULL 0
  28. #define ALGORITHM_HMAC_MD5 1
  29. #define ALGORITHM_HMAC_MD5_96 2
  30. #define ALGORITHM_HMAC_SHA1 3
  31. #define ALGORITHM_HMAC_SHA1_96 4
  32. #define NUM_ALGORITHMS 5
  33. //
  34. // IPsec Mode.
  35. //
  36. #define TRANSPORT 0x1
  37. #define TUNNEL 0x2
  38. //
  39. // Direction of traffic for use in SA and SP.
  40. //
  41. #define INBOUND 0x1
  42. #define OUTBOUND 0x2
  43. #define BIDIRECTIONAL 0x3
  44. // None.
  45. #define NONE 0
  46. //
  47. // Create Results.
  48. //
  49. #define CREATE_SUCCESS 1
  50. #define CREATE_MEMORY_ALLOC_ERROR 2
  51. #define CREATE_INVALID_SABUNDLE 3
  52. #define CREATE_INVALID_DIRECTION 4
  53. #define CREATE_INVALID_SEC_POLICY 5
  54. #define CREATE_INVALID_INTERFACE 6
  55. #define CREATE_INVALID_INDEX 7
  56. //
  57. // Possible IPsec field types.
  58. //
  59. #define SINGLE_VALUE 0
  60. #define RANGE_VALUE 1
  61. #define WILDCARD_VALUE 2
  62. #define POLICY_SELECTOR 0
  63. #define PACKET_SELECTOR 1
  64. #endif // IPSEC_INCLUDED