Source code of Windows XP (NT5)
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.

106 lines
2.2 KiB

  1. /////////////////////////////////////////////////////////////
  2. // Copyright(c) 1998, Microsoft Corporation
  3. //
  4. // ipseccmd.h
  5. //
  6. // Created on 4/5/98 by Randyram
  7. // Revisions:
  8. //
  9. // Includes all the necessary header files and definitions
  10. // for the policy automation tool.
  11. //
  12. /////////////////////////////////////////////////////////////
  13. #ifndef _IPSECCMD_H_
  14. #define _IPSECCMD_H_
  15. #include <windows.h>
  16. #include <tchar.h>
  17. #include <iostream.h>
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #include <winsock2.h>
  21. #include <assert.h>
  22. #include <limits.h>
  23. #include <objbase.h>
  24. #include <ipexport.h>
  25. #include <time.h>
  26. #include "t2pmsgs.h"
  27. extern "C" {
  28. #include <dsgetdc.h>
  29. #include <lm.h>
  30. #include <rpc.h>
  31. #include <winldap.h>
  32. #include <time.h>
  33. #include "winipsec.h"
  34. #include <ipsec.h>
  35. #include <oakdefs.h>
  36. #include "polstore2.h"
  37. }
  38. // my includes
  39. #include "text2pol.h"
  40. #include "pol2stor.h"
  41. #include "usepa.h"
  42. #include "print.h"
  43. #include "query.h"
  44. #include "externs.h"
  45. // my constants
  46. #define IPSECCMD_USAGE (-1)
  47. // used for printing in PrintFilter
  48. #define DebugPrint(X) _tprintf(TEXT("%s\n"),X)
  49. // this is for calling HrSetActivePolicy explicitly
  50. typedef HRESULT (*LPHRSETACTIVEPOLICY)(GUID *);
  51. const char POTF_VERSION[] = "v1.51 Copyright(c) 1998-2001, Microsoft Corporation";
  52. // XX todo: make these real hresults
  53. const HRESULT POTF_NO_FILTERS = 0x80001102;
  54. const HRESULT POTF_STORAGE_OPEN_FAILED = 0x80001103;
  55. const BSTR POTF_DEFAULT_POLNAME = L"ipseccmd";
  56. // sleep time to wait for PA RPC to come up, in milliseconds
  57. const UINT POTF_PARPC_SLEEPTIME = 60000;
  58. // starting GUID for policies
  59. // {fa56f258-f6ac-11d1-92a3-0000f806bfbc}
  60. const GUID POTF_START_GUID = {
  61. 0xfa56f258, // Data1
  62. 0xf6ac, // Data2
  63. 0x0, // Data3 for our own use
  64. {
  65. // Data4
  66. 0x92, 0xa3, 0x0, 0x0, 0xf8, 0x06, 0xbf, 0xbc
  67. }
  68. };
  69. const unsigned short MAX_GUID_DATA3 = USHRT_MAX;
  70. // forward declarations
  71. void usage(FILE *, bool bExtendedUsage = false);
  72. HRESULT
  73. StorePolicy(
  74. IN STORAGE_INFO StoreInfo,
  75. IN IPSEC_IKE_POLICY PolicyToStore
  76. );
  77. int InitWinsock(
  78. WORD wVersionRequested
  79. );
  80. #endif
  81.