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.

134 lines
3.7 KiB

  1. #pragma once
  2. // Filename : nlasvc.h
  3. // Description : Structures necessary to connect to and communicate with the
  4. // Network Location Awareness (NLA) system service via LPC.
  5. // Author : Jeffrey C. Venable, Sr. ([email protected])
  6. // Revision : 14 June 2000
  7. //
  8. // Type thunks for 32 bit clients on 64 bit machines.
  9. //
  10. #include <iptypes.h>
  11. #if defined(USE_LPC6432)
  12. #define NLA_HWND ULONGLONG
  13. #define NLA_PVOID ULONGLONG
  14. #define NLA_WPARAM ULONGLONG
  15. #define NLA_HANDLE ULONGLONG
  16. #define NLA_ULONG_PTR ULONGLONG
  17. #define NLA_HKEY ULONGLONG
  18. #define NLA_PIO_STATUS_BLOCK ULONGLONG
  19. #define NLA_PPS_APC_ROUTINE ULONGLONG
  20. #else
  21. #define NLA_HWND HWND
  22. #define NLA_PVOID PVOID
  23. #define NLA_WPARAM WPARAM
  24. #define NLA_HANDLE HANDLE
  25. #define NLA_ULONG_PTR ULONG_PTR
  26. #define NLA_HKEY HKEY
  27. #define NLA_PIO_STATUS_BLOCK PIO_STATUS_BLOCK
  28. #define NLA_PPS_APC_ROUTINE PPS_APC_ROUTINE
  29. #endif // defined(USE_LPC6432)
  30. typedef struct _LOCATION_802_1X {
  31. CHAR adapterName[MAX_ADAPTER_NAME_LENGTH + 4];
  32. WCHAR information[2048];
  33. } LOCATION_802_1X, *PLOCATION_802_1X;
  34. typedef struct _WSM_NOTIFY {
  35. ULONG serialNumber;
  36. WSACOMPLETIONTYPE Type;
  37. union {
  38. NLA_HANDLE hThread;
  39. NLA_HANDLE hEvent;
  40. NLA_HWND hWnd;
  41. };
  42. union {
  43. NLA_ULONG_PTR Key;
  44. UINT uMsg;
  45. NLA_PVOID ApcRoutine;
  46. };
  47. union {
  48. NLA_PPS_APC_ROUTINE ApcCompletion;
  49. NLA_HANDLE hPort;
  50. NLA_WPARAM context;
  51. };
  52. NLA_PIO_STATUS_BLOCK pIoStatusBlock;
  53. NLA_HKEY userNetworks;
  54. FILETIME lastModification;
  55. NLA_PVOID query;
  56. } WSM_NOTIFY, *PWSM_NOTIFY;
  57. typedef enum _WSM_LPC_REQUEST_TYPE {
  58. // Requests:
  59. REQUEST_DATA_MAPPING_HANDLE = 0x00000001,
  60. REQUEST_DATA_MAPPING_HANDLE_SLOW = 0x00000002,
  61. REQUEST_DATA_MAPPING_HANDLE_SLOW_WITH_UPDATE = 0x00000003,
  62. REQUEST_CHANGE_NOTIFICATION = 0x00000004,
  63. REQUEST_CHANGE_NOTIFICATION_SLOW = 0x00000005,
  64. REQUEST_CANCEL_CHANGE_NOTIFICATION = 0x00000006,
  65. // Notifies:
  66. DHCP_NOTIFY_CHANGE = 0x00000010,
  67. // Asynchronous information:
  68. LOCATION_802_1X_REGISTER = 0x00000020,
  69. LOCATION_802_1X_DELETE = 0x00000021,
  70. } WSM_LPC_REQUEST_TYPE, *PWSM_LPC_REQUEST_TYPE, FAR * LPWSM_LPC_REQUEST_TYPE;
  71. typedef struct _WSM_LPC_CONNECT {
  72. struct {
  73. USHORT major;
  74. USHORT minor;
  75. } version;
  76. #if defined(_WIN64) || defined (USE_LPC6432)
  77. BOOLEAN client32;
  78. #endif
  79. } WSM_LPC_CONNECT, *PWSM_LPC_CONNECT;
  80. typedef struct _WSM_LPC_REQUEST {
  81. WSM_LPC_REQUEST_TYPE type;
  82. union {
  83. WSM_NOTIFY notification;
  84. };
  85. } WSM_LPC_REQUEST, *PWSM_LPC_REQUEST;
  86. typedef struct _WSM_LPC_REPLY {
  87. union {
  88. NLA_HANDLE hNetworkHeader; // returned on connection reply
  89. NLA_HANDLE hNetworkData; // returned on REQUEST_DATA_MAPPING_HANDLE
  90. };
  91. NTSTATUS status; // always returned to indicate success/failure
  92. } WSM_LPC_REPLY, *PWSM_LPC_REPLY;
  93. typedef struct _WSM_LPC_DATA {
  94. ULONG signature;
  95. union {
  96. WSM_LPC_CONNECT connect;
  97. WSM_LPC_REQUEST request;
  98. WSM_LPC_REPLY reply;
  99. };
  100. } WSM_LPC_DATA, * PWSM_LPC_DATA;
  101. typedef struct _WSM_LPC_MESSAGE {
  102. PORT_MESSAGE portMsg;
  103. WSM_LPC_DATA data;
  104. } WSM_LPC_MESSAGE, *PWSM_LPC_MESSAGE;
  105. #define WSM_SIGNATURE 'bMsW'
  106. #define WSM_VERSION_MAJOR 1
  107. #define WSM_VERSION_MINOR 0
  108. #define WSM_PORT_NAME L"\\NLAPublicPort"
  109. #define WSM_PRIVATE_PORT_NAME L"\\NLAPrivatePort"