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.

401 lines
10 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. ipnathlp.h
  5. Abstract:
  6. This module contains declarations for user-mode home-networking components.
  7. These include the DNS proxy, the DHCP allocator, and the DirectPlay
  8. transparent proxy.
  9. Author:
  10. Abolade Gbadegesin (aboladeg) 2-Mar-1998
  11. Revision History:
  12. Abolade Gbadegesin (aboladeg) 24-May-1999
  13. Added declarations for the DirectPlay transparent proxy.
  14. --*/
  15. #ifndef _IPNATHLP_H_
  16. #define _IPNATHLP_H_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #pragma warning(push)
  21. #pragma warning(disable:4200)
  22. //
  23. // COMMON DECLARATIONS
  24. //
  25. #define IPNATHLP_LOGGING_NONE 0
  26. #define IPNATHLP_LOGGING_ERROR 1
  27. #define IPNATHLP_LOGGING_WARN 2
  28. #define IPNATHLP_LOGGING_INFO 3
  29. #define IPNATHLP_INTERFACE_FLAG_DISABLED 0x00000001
  30. #define IPNATHLP_CONTROL_UPDATE_SETTINGS 128
  31. #define IPNATHLP_CONTROL_UPDATE_CONNECTION 129
  32. #define IPNATHLP_CONTROL_UPDATE_AUTODIAL 130
  33. #define IPNATHLP_CONTROL_UPDATE_FWLOGGER 131
  34. #define IPNATHLP_CONTROL_UPDATE_DNS_DISABLE 132
  35. #define IPNATHLP_CONTROL_UPDATE_DNS_ENABLE 133
  36. #define IPNATHLP_CONTROL_UPDATE_POLICY 134
  37. //
  38. // NAT MIB-ACCESS DECLARATIONS (alphabetically)
  39. //
  40. //
  41. // Structure: IP_NAT_MIB_QUERY
  42. //
  43. // This structure is passed to 'MibGet' to retrieve NAT information.
  44. //
  45. typedef struct _IP_NAT_MIB_QUERY {
  46. ULONG Oid;
  47. union {
  48. ULONG Index[0];
  49. UCHAR Data[0];
  50. };
  51. } IP_NAT_MIB_QUERY, *PIP_NAT_MIB_QUERY;
  52. #define IP_NAT_INTERFACE_STATISTICS_OID 0
  53. #define IP_NAT_INTERFACE_MAPPING_TABLE_OID 1
  54. #define IP_NAT_MAPPING_TABLE_OID 2
  55. //
  56. // DHCP ALLOCATOR DECLARATIONS (alphabetically)
  57. //
  58. //
  59. // Structure: IP_AUTO_DHCP_GLOBAL_INFO
  60. //
  61. // This structure holds global configuration for the DHCP allocator.
  62. // The configuration consists of
  63. // (a) the network and mask from which addresses are to be allocated
  64. // (b) an optional list of addresses to be excluded from allocation.
  65. //
  66. typedef struct _IP_AUTO_DHCP_GLOBAL_INFO {
  67. ULONG LoggingLevel;
  68. ULONG Flags;
  69. ULONG LeaseTime;
  70. ULONG ScopeNetwork;
  71. ULONG ScopeMask;
  72. ULONG ExclusionCount;
  73. ULONG ExclusionArray[0];
  74. } IP_AUTO_DHCP_GLOBAL_INFO, *PIP_AUTO_DHCP_GLOBAL_INFO;
  75. //
  76. // Structure: IP_AUTO_DHCP_INTERFACE_INFO
  77. //
  78. // This structure holds per-interface configuration for the DHCP allocator.
  79. // The configuration currently only allows the allocator to be disabled
  80. // on the given interface. Since the allocator runs in promiscuous-interface
  81. // mode, it is enabled by default on all interfaces. Thus, the only interfaces
  82. // which require any configuration are those on which the allocator is to be
  83. // disabled.
  84. //
  85. typedef struct _IP_AUTO_DHCP_INTERFACE_INFO {
  86. ULONG Flags;
  87. } IP_AUTO_DHCP_INTERFACE_INFO, *PIP_AUTO_DHCP_INTERFACE_INFO;
  88. #define IP_AUTO_DHCP_INTERFACE_FLAG_DISABLED \
  89. IPNATHLP_INTERFACE_FLAG_DISABLED
  90. //
  91. // Structure: IP_AUTO_DHCP_MIB_QUERY
  92. //
  93. // This structure is passed to 'MibGet' to retrieve DHCP allocator information.
  94. //
  95. typedef struct _IP_AUTO_DHCP_MIB_QUERY {
  96. ULONG Oid;
  97. union {
  98. ULONG Index[0];
  99. UCHAR Data[0];
  100. };
  101. } IP_AUTO_DHCP_MIB_QUERY, *PIP_AUTO_DHCP_MIB_QUERY;
  102. //
  103. // Structure : IP_AUTO_DHCP_STATISTICS
  104. //
  105. // This structure defines the statistics kept by the DHCP allocator,
  106. // and accessible via 'MibGet'.
  107. //
  108. typedef struct _IP_AUTO_DHCP_STATISTICS {
  109. ULONG MessagesIgnored;
  110. ULONG BootpOffersSent;
  111. ULONG DiscoversReceived;
  112. ULONG InformsReceived;
  113. ULONG OffersSent;
  114. ULONG RequestsReceived;
  115. ULONG AcksSent;
  116. ULONG NaksSent;
  117. ULONG DeclinesReceived;
  118. ULONG ReleasesReceived;
  119. } IP_AUTO_DHCP_STATISTICS, *PIP_AUTO_DHCP_STATISTICS;
  120. #define IP_AUTO_DHCP_STATISTICS_OID 0
  121. //
  122. // DNS PROXY DECLARATIONS (alphabetically)
  123. //
  124. //
  125. // Structure: IP_DNS_PROXY_GLOBAL_INFO
  126. //
  127. // This structure holds global configuration for the DNS proxy.
  128. //
  129. typedef struct _IP_DNS_PROXY_GLOBAL_INFO {
  130. ULONG LoggingLevel;
  131. ULONG Flags;
  132. ULONG TimeoutSeconds;
  133. } IP_DNS_PROXY_GLOBAL_INFO, *PIP_DNS_PROXY_GLOBAL_INFO;
  134. #define IP_DNS_PROXY_FLAG_ENABLE_DNS 0x00000001
  135. #define IP_DNS_PROXY_FLAG_ENABLE_WINS 0x00000002
  136. //
  137. // Structure: IP_DNS_PROXY_INTERFACE_INFO
  138. //
  139. // This structure holds per-interface configuration for the DNS proxy.
  140. // The configuration currently only allows the proxy to be disabled
  141. // on a given interface. The proxy runs in promiscuous-interface mode
  142. // so that all interfaces are added to it and it is enabled on all of them
  143. // by default. Hence, the configuration need only be present for those
  144. // interfaces on which the proxy is not to be run.
  145. //
  146. typedef struct _IP_DNS_PROXY_INTERFACE_INFO {
  147. ULONG Flags;
  148. } IP_DNS_PROXY_INTERFACE_INFO, *PIP_DNS_PROXY_INTERFACE_INFO;
  149. #define IP_DNS_PROXY_INTERFACE_FLAG_DISABLED \
  150. IPNATHLP_INTERFACE_FLAG_DISABLED
  151. #define IP_DNS_PROXY_INTERFACE_FLAG_DEFAULT 0x00000002
  152. //
  153. // Structure: IP_DNS_PROXY_MIB_QUERY
  154. //
  155. // This structure is passed to 'MibGet' to retrieve DNS proxy information.
  156. //
  157. typedef struct _IP_DNS_PROXY_MIB_QUERY {
  158. ULONG Oid;
  159. union {
  160. ULONG Index[0];
  161. UCHAR Data[0];
  162. };
  163. } IP_DNS_PROXY_MIB_QUERY, *PIP_DNS_PROXY_MIB_QUERY;
  164. //
  165. // Structure: IP_DNS_PROXY_STATISTICS
  166. //
  167. typedef struct _IP_DNS_PROXY_STATISTICS {
  168. ULONG MessagesIgnored;
  169. ULONG QueriesReceived;
  170. ULONG ResponsesReceived;
  171. ULONG QueriesSent;
  172. ULONG ResponsesSent;
  173. } IP_DNS_PROXY_STATISTICS, *PIP_DNS_PROXY_STATISTICS;
  174. #define IP_DNS_PROXY_STATISTICS_OID 0
  175. //
  176. // Structure: IP_FTP_GLOBAL_INFO
  177. //
  178. // This structure holds global configuration for the DirectPlay transparent
  179. // proxy.
  180. //
  181. typedef struct IP_FTP_GLOBAL_INFO {
  182. ULONG LoggingLevel;
  183. ULONG Flags;
  184. } IP_FTP_GLOBAL_INFO, *PIP_FTP_GLOBAL_INFO;
  185. //
  186. // Structure: IP_FTP_INTERFACE_INFO
  187. //
  188. // This structure holds per-interface configuration for the transparent proxy.
  189. // The configuration currently only allows the proxy to be disabled
  190. // on a given interface. The proxy runs in promiscuous-interface mode
  191. // so that all interfaces are added to it and it is enabled on all of them
  192. // by default. Hence, the configuration need only be present for those
  193. // interfaces on which the proxy is not to be run.
  194. //
  195. typedef struct _IP_FTP_INTERFACE_INFO {
  196. ULONG Flags;
  197. } IP_FTP_INTERFACE_INFO, *PIP_FTP_INTERFACE_INFO;
  198. #define IP_FTP_INTERFACE_FLAG_DISABLED IPNATHLP_INTERFACE_FLAG_DISABLED
  199. //
  200. // Structure: IP_FTP_MIB_QUERY
  201. //
  202. // This structure is passed to 'MibGet' to retrieve transparent proxy
  203. // information.
  204. //
  205. typedef struct _IP_FTP_MIB_QUERY {
  206. ULONG Oid;
  207. union {
  208. ULONG Index[0];
  209. UCHAR Data[0];
  210. };
  211. } IP_FTP_MIB_QUERY, *PIP_FTP_MIB_QUERY;
  212. //
  213. // Structure: IP_FTP_STATISTICS
  214. //
  215. typedef struct _IP_FTP_STATISTICS {
  216. ULONG ConnectionsAccepted;
  217. ULONG ConnectionsDropped;
  218. ULONG ConnectionsActive;
  219. ULONG PlayersActive;
  220. } IP_FTP_STATISTICS, *PIP_FTP_STATISTICS;
  221. #define IP_FTP_STATISTICS_OID 0
  222. //
  223. // DIRECTPLAY TRANSPARENT PROXY DECLARATIONS (alphabetically)
  224. //
  225. //
  226. // Structure: IP_H323_GLOBAL_INFO
  227. //
  228. // This structure holds global configuration for the H.323 transparent
  229. // proxy.
  230. //
  231. typedef struct IP_H323_GLOBAL_INFO {
  232. ULONG LoggingLevel;
  233. ULONG Flags;
  234. } IP_H323_GLOBAL_INFO, *PIP_H323_GLOBAL_INFO;
  235. //
  236. // Structure: IP_H323_INTERFACE_INFO
  237. //
  238. // This structure holds per-interface configuration for the transparent proxy.
  239. // The configuration currently only allows the proxy to be disabled
  240. // on a given interface. The proxy runs in promiscuous-interface mode
  241. // so that all interfaces are added to it and it is enabled on all of them
  242. // by default. Hence, the configuration need only be present for those
  243. // interfaces on which the proxy is not to be run.
  244. //
  245. typedef struct _IP_H323_INTERFACE_INFO {
  246. ULONG Flags;
  247. } IP_H323_INTERFACE_INFO, *PIP_H323_INTERFACE_INFO;
  248. #define IP_H323_INTERFACE_FLAG_DISABLED IPNATHLP_INTERFACE_FLAG_DISABLED
  249. //
  250. // Structure: IP_H323_MIB_QUERY
  251. //
  252. // This structure is passed to 'MibGet' to retrieve transparent proxy
  253. // information.
  254. //
  255. typedef struct _IP_H323_MIB_QUERY {
  256. ULONG Oid;
  257. union {
  258. ULONG Index[0];
  259. UCHAR Data[0];
  260. };
  261. } IP_H323_MIB_QUERY, *PIP_H323_MIB_QUERY;
  262. //
  263. // Application Level Gateway
  264. //
  265. //
  266. // Structure: IP_ALG_GLOBAL_INFO
  267. //
  268. // This structure holds global configuration for the ALG transparent proxy.
  269. //
  270. typedef struct IP_ALG_GLOBAL_INFO {
  271. ULONG LoggingLevel;
  272. ULONG Flags;
  273. } IP_ALG_GLOBAL_INFO, *PIP_ALG_GLOBAL_INFO;
  274. //
  275. // Structure: IP_ALG_INTERFACE_INFO
  276. //
  277. // This structure holds per-interface configuration for the transparent proxy.
  278. // The configuration currently only allows the proxy to be disabled
  279. // on a given interface. The proxy runs in promiscuous-interface mode
  280. // so that all interfaces are added to it and it is enabled on all of them
  281. // by default. Hence, the configuration need only be present for those
  282. // interfaces on which the proxy is not to be run.
  283. //
  284. typedef struct _IP_ALG_INTERFACE_INFO {
  285. ULONG Flags;
  286. } IP_ALG_INTERFACE_INFO, *PIP_ALG_INTERFACE_INFO;
  287. #define IP_ALG_INTERFACE_FLAG_DISABLED IPNATHLP_INTERFACE_FLAG_DISABLED
  288. //
  289. // Structure: IP_ALG_MIB_QUERY
  290. //
  291. // This structure is passed to 'MibGet' to retrieve transparent proxy
  292. // information.
  293. //
  294. typedef struct _IP_ALG_MIB_QUERY {
  295. ULONG Oid;
  296. union {
  297. ULONG Index[0];
  298. UCHAR Data[0];
  299. };
  300. } IP_ALG_MIB_QUERY, *PIP_ALG_MIB_QUERY;
  301. //
  302. // Structure: IP_ALG_STATISTICS
  303. //
  304. typedef struct _IP_ALG_STATISTICS {
  305. ULONG ConnectionsAccepted;
  306. ULONG ConnectionsDropped;
  307. ULONG ConnectionsActive;
  308. ULONG PlayersActive;
  309. } IP_ALG_STATISTICS, *PIP_ALG_STATISTICS;
  310. #define IP_ALG_STATISTICS_OID 0
  311. #pragma warning(pop)
  312. #ifdef __cplusplus
  313. } // extern "C"
  314. #endif
  315. #endif // _IPNATHLP_H_