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.

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