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.

579 lines
18 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. dhcpdef.h
  5. Abstract:
  6. This module contains data type definitions for the DHCP client.
  7. Author:
  8. Madan Appiah (madana) 31-Oct-1993
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _DHCPDEF_
  14. #define _DHCPDEF_
  15. //
  16. // the registry key is of different type between NT and Memphis.
  17. //
  18. #ifdef VXD
  19. typedef VMMHKEY DHCPKEY;
  20. #else // NT
  21. typedef HKEY DHCPKEY;
  22. #endif
  23. //
  24. // The amount of time to wait for a retry if we have no IP address
  25. //
  26. #define ADDRESS_ALLOCATION_RETRY 300 // 5 minutes
  27. #define EASYNET_ALLOCATION_RETRY 300 // 5 minutes
  28. //
  29. // The amount of time to wait for a retry if we have an IP address,
  30. // but the renewal on startup failed.
  31. //
  32. #if !DBG
  33. #define RENEWAL_RETRY 600 // 10 minutes
  34. #else
  35. #define RENEWAL_RETRY 60 // 1 minute
  36. #endif
  37. //
  38. // The number of times to send a request before giving up waiting
  39. // for a response.
  40. //
  41. #define DHCP_MAX_RETRIES 4
  42. #define DHCP_ACCEPT_RETRIES 2
  43. #define DHCP_MAX_RENEW_RETRIES 3
  44. //
  45. // amount of time required between consequtive send_informs..
  46. //
  47. #define DHCP_DEFAULT_INFORM_SEPARATION_INTERVAL 60 // one minute
  48. //
  49. // amount of time to wait after an address conflict is detected
  50. //
  51. #define ADDRESS_CONFLICT_RETRY 10 // 10 seconds
  52. //
  53. //
  54. // Expoenential backoff delay.
  55. //
  56. #define DHCP_EXPO_DELAY 4
  57. //
  58. // The maximum total amount of time to spend trying to obtain an
  59. // initial address.
  60. //
  61. // This delay is computed as below:
  62. //
  63. // DHCP_MAX_RETRIES - n
  64. // DHCP_EXPO_DELAY - m
  65. // WAIT_FOR_RESPONSE_TIME - w
  66. // MAX_STARTUP_DELAY - t
  67. //
  68. // Binary Exponential backup Algorithm.
  69. //
  70. // t > m * (n*(n+1)/2) + n + w*n
  71. // ------------------- ---
  72. // random wait + response wait
  73. //
  74. #define MAX_STARTUP_DELAY \
  75. DHCP_EXPO_DELAY * \
  76. (( DHCP_MAX_RETRIES * (DHCP_MAX_RETRIES + 1)) / 2) + \
  77. DHCP_MAX_RETRIES + DHCP_MAX_RETRIES * WAIT_FOR_RESPONSE_TIME
  78. #define MAX_RENEW_DELAY \
  79. DHCP_EXPO_DELAY * \
  80. (( DHCP_MAX_RENEW_RETRIES * (DHCP_MAX_RENEW_RETRIES + 1)) / 2) + \
  81. DHCP_MAX_RENEW_RETRIES + DHCP_MAX_RENEW_RETRIES * \
  82. WAIT_FOR_RESPONSE_TIME
  83. //
  84. // The maximum amount of time to wait between renewal retries, if the
  85. // lease period is between T1 and T2.
  86. //
  87. #define MAX_RETRY_TIME 3600 // 1 hour
  88. //
  89. // Minimum time to sleep between retries.
  90. //
  91. #if DBG
  92. #define MIN_SLEEP_TIME 1 // 1 sec.
  93. #else
  94. #define MIN_SLEEP_TIME 5 // 5 sec.
  95. #endif
  96. //
  97. // Minimum lease time.
  98. //
  99. #define DHCP_MINIMUM_LEASE 60*60 // 1 hour.
  100. #define DHCP_DNS_TTL 0 // let the DNS api decide..
  101. //
  102. // IP Autoconfiguration defaults
  103. //
  104. #define DHCP_IPAUTOCONFIGURATION_DEFAULT_SUBNET "169.254.0.0"
  105. #define DHCP_IPAUTOCONFIGURATION_DEFAULT_MASK "255.255.0.0"
  106. // define the reserved range of autonet addresses..
  107. #define DHCP_RESERVED_AUTOCFG_SUBNET "169.254.255.0"
  108. #define DHCP_RESERVED_AUTOCFG_MASK "255.255.255.0"
  109. // will dhcp pick any reserved autonet addr? NO!
  110. #define DHCP_RESERVED_AUTOCFG_FLAG (1)
  111. // self default route (0,0,<self>) will have a metric of (3)
  112. #define DHCP_SELF_DEFAULT_METRIC (3)
  113. //
  114. // General purpose macros
  115. //
  116. #define MIN(a,b) ((a) < (b) ? (a) : (b))
  117. #define MAX(a,b) ((a) > (b) ? (a) : (b))
  118. #if DBG
  119. #define STATIC
  120. #else
  121. #define STATIC static
  122. #endif
  123. #define LOCK_RENEW_LIST() EnterCriticalSection(&DhcpGlobalRenewListCritSect)
  124. #define UNLOCK_RENEW_LIST() LeaveCriticalSection(&DhcpGlobalRenewListCritSect)
  125. #define LOCK_INTERFACE() EnterCriticalSection(&DhcpGlobalSetInterfaceCritSect)
  126. #define UNLOCK_INTERFACE() LeaveCriticalSection(&DhcpGlobalSetInterfaceCritSect)
  127. #define LOCK_OPTIONS_LIST() EnterCriticalSection(&DhcpGlobalOptionsListCritSect)
  128. #define UNLOCK_OPTIONS_LIST() LeaveCriticalSection(&DhcpGlobalOptionsListCritSect)
  129. #define ZERO_TIME 0x0 // in secs.
  130. //
  131. // length of the time string returned by ctime.
  132. // actually it is 26.
  133. //
  134. #define TIME_STRING_LEN 32
  135. //
  136. // String size when a long converted to printable string.
  137. // 2^32 = 4294967295 (10 digits) + termination char.
  138. //
  139. #define LONG_STRING_SIZE 12
  140. //
  141. // A renewal function.
  142. //
  143. typedef
  144. DWORD
  145. (*PRENEWAL_FUNCTION) (
  146. IN PVOID Context,
  147. LPDWORD Sleep
  148. );
  149. //
  150. // DHCP Client-Identifier (option 61)
  151. //
  152. typedef struct _DHCP_CLIENT_IDENTIFIER
  153. {
  154. BYTE *pbID;
  155. DWORD cbID;
  156. BYTE bType;
  157. BOOL fSpecified;
  158. } DHCP_CLIENT_IDENTIFIER;
  159. //
  160. // state information for IP autoconfiguration
  161. //
  162. typedef struct _DHCP_IPAUTOCONFIGURATION_CONTEXT
  163. {
  164. DHCP_IP_ADDRESS Address;
  165. DHCP_IP_ADDRESS Subnet;
  166. DHCP_IP_ADDRESS Mask;
  167. DWORD Seed;
  168. } DHCP_IPAUTOCONFIGURATION_CONTEXT;
  169. //
  170. // A DHCP context block. One block is maintained per NIC (network
  171. // interface Card).
  172. //
  173. typedef struct _DHCP_CONTEXT {
  174. // list of adapters.
  175. LIST_ENTRY NicListEntry;
  176. // to place in renewal list.
  177. LIST_ENTRY RenewalListEntry;
  178. // Ref count
  179. LONG RefCount;
  180. // failed to renew because of lack of resources?
  181. BOOL bFailedRenewal;
  182. // hardware type.
  183. BYTE HardwareAddressType;
  184. // HW address, just follows this context structure.
  185. LPBYTE HardwareAddress;
  186. // Length of HW address.
  187. DWORD HardwareAddressLength;
  188. // Selected IpAddress, NetworkOrder.
  189. DHCP_IP_ADDRESS IpAddress;
  190. // Selected subnet mask. NetworkOrder.
  191. DHCP_IP_ADDRESS SubnetMask;
  192. // Selected DHCP server address. Network Order.
  193. DHCP_IP_ADDRESS DhcpServerAddress;
  194. // Desired IpAddress the client request in next discover.
  195. DHCP_IP_ADDRESS DesiredIpAddress;
  196. // The ip address that was used just before losing this..
  197. DHCP_IP_ADDRESS NackedIpAddress;
  198. // The ip address that just resulted in address conflict
  199. DHCP_IP_ADDRESS ConflictAddress;
  200. // current domain name for this adapter.
  201. BYTE DomainName[260];
  202. // IP Autoconfiguration state
  203. DHCP_IPAUTOCONFIGURATION_CONTEXT IPAutoconfigurationContext;
  204. DHCP_CLIENT_IDENTIFIER ClientIdentifier;
  205. // Lease time in seconds.
  206. DWORD Lease;
  207. // Time the lease was obtained.
  208. time_t LeaseObtained;
  209. // Time the client should start renew its address.
  210. time_t T1Time;
  211. // Time the client should start broadcast to renew address.
  212. time_t T2Time;
  213. // Time the lease expires. The clinet should stop using the
  214. // IpAddress.
  215. // LeaseObtained < T1Time < T2Time < LeaseExpires
  216. time_t LeaseExpires;
  217. // when was the last time an inform was sent?
  218. time_t LastInformSent;
  219. // how many seconds between consecutive informs?
  220. DWORD InformSeparationInterval;
  221. // # of gateways and the currently plumbed gateways are stored here
  222. DWORD nGateways;
  223. DHCP_IP_ADDRESS *GatewayAddresses;
  224. // # of static routes and the actual static routes are stored here
  225. DWORD nStaticRoutes;
  226. DHCP_IP_ADDRESS *StaticRouteAddresses;
  227. // Time for next renewal state.
  228. time_t RunTime;
  229. // seconds passed since boot.
  230. DWORD SecondsSinceBoot;
  231. // should we ping the g/w or always assume g/w is NOT present?
  232. BOOL DontPingGatewayFlag;
  233. // can we use DHCP_INFORM packets or should we use DHCP_REQUEST instead?
  234. BOOL UseInformFlag;
  235. // Release on shutdown?
  236. ULONG ReleaseOnShutdown;
  237. // turn timers on off?
  238. BOOL fTimersEnabled;
  239. #ifdef BOOTPERF
  240. // allow saving of quickboot information?
  241. ULONG fQuickBootEnabled;
  242. #endif BOOTPERF
  243. // what to function at next renewal state.
  244. PRENEWAL_FUNCTION RenewalFunction;
  245. // A semaphore for synchronization to this structure
  246. HANDLE RenewHandle;
  247. // the list of options to send and the list of options received
  248. LIST_ENTRY SendOptionsList;
  249. LIST_ENTRY RecdOptionsList;
  250. // the list of options defining the fallback configuration
  251. LIST_ENTRY FbOptionsList;
  252. // the opened key to the adapter info storage location
  253. DHCPKEY AdapterInfoKey;
  254. // the class this adapter belongs to
  255. LPBYTE ClassId;
  256. DWORD ClassIdLength;
  257. // Message buffer to send and receive DHCP message.
  258. union {
  259. PDHCP_MESSAGE MessageBuffer;
  260. PMADCAP_MESSAGE MadcapMessageBuffer;
  261. };
  262. // state information for this interface. see below for manifests
  263. struct /* anonymous */ {
  264. unsigned Plumbed : 1 ; // is this interface plumbed
  265. unsigned ServerReached : 1 ; // Did we reach the server ever
  266. unsigned AutonetEnabled: 1 ; // Autonet enabled?
  267. unsigned HasBeenLooked : 1 ; // Has this context been looked at?
  268. unsigned DhcpEnabled : 1 ; // Is this context dhcp enabled?
  269. unsigned AutoMode : 1 ; // Currently in autonet mode?
  270. unsigned MediaState : 2 ; // One of connected, disconnected, reconnected, unbound
  271. unsigned MDhcp : 1 ; // Is this context created for Mdhcp?
  272. unsigned PowerResumed : 1 ; // Was power just resumed on this interface?
  273. unsigned Fallback : 1 ; // Is fallback configuration available?
  274. unsigned ApiContext : 1 ; // Is this context created by an API call?
  275. unsigned UniDirectional: 1 ; // Is this context created for a unidirectional adapter?
  276. } State;
  277. //
  278. // The following 2 fields are for the cancellation mechanism.
  279. //
  280. DWORD NumberOfWaitingThreads;
  281. WSAEVENT CancelEvent;
  282. // machine specific information
  283. PVOID LocalInformation;
  284. } DHCP_CONTEXT, *PDHCP_CONTEXT;
  285. #define ADDRESS_PLUMBED(Ctxt) ((Ctxt)->State.Plumbed = 1)
  286. #define ADDRESS_UNPLUMBED(Ctxt) ((Ctxt)->State.Plumbed = 0)
  287. #define IS_ADDRESS_PLUMBED(Ctxt) ((Ctxt)->State.Plumbed)
  288. #define IS_ADDRESS_UNPLUMBED(Ctxt) (!(Ctxt)->State.Plumbed)
  289. #define SERVER_REACHED(Ctxt) ((Ctxt)->State.ServerReached = 1)
  290. #define SERVER_UNREACHED(Ctxt) ((Ctxt)->State.ServerReached = 0)
  291. #define IS_SERVER_REACHABLE(Ctxt) ((Ctxt)->State.ServerReached)
  292. #define IS_SERVER_UNREACHABLE(Ctxt) (!(Ctxt)->State.ServerReached)
  293. #define AUTONET_ENABLED(Ctxt) ((Ctxt)->State.AutonetEnabled = 1)
  294. #define AUTONET_DISABLED(Ctxt) ((Ctxt)->State.AutonetEnabled = 0)
  295. #define IS_AUTONET_ENABLED(Ctxt) ((Ctxt)->State.AutonetEnabled)
  296. #define IS_AUTONET_DISABLED(Ctxt) (!(Ctxt)->State.AutonetEnabled)
  297. #define CTXT_WAS_LOOKED(Ctxt) ((Ctxt)->State.HasBeenLooked = 1)
  298. #define CTXT_WAS_NOT_LOOKED(Ctxt) ((Ctxt)->State.HasBeenLooked = 0)
  299. #define WAS_CTXT_LOOKED(Ctxt) ((Ctxt)->State.HasBeenLooked)
  300. #define WAS_CTXT_NOT_LOOKED(Ctxt) (!(Ctxt)->State.HasBeenLooked)
  301. #define DHCP_ENABLED(Ctxt) ((Ctxt)->State.DhcpEnabled = 1)
  302. #define DHCP_DISABLED(Ctxt) ((Ctxt)->State.DhcpEnabled = 0)
  303. #define IS_DHCP_ENABLED(Ctxt) ((Ctxt)->State.DhcpEnabled )
  304. #define IS_DHCP_DISABLED(Ctxt) (!(Ctxt)->State.DhcpEnabled )
  305. #define FALLBACK_ENABLED(Ctxt) ((Ctxt)->State.Fallback = 1)
  306. #define FALLBACK_DISABLED(Ctxt) ((Ctxt)->State.Fallback = 0)
  307. #define IS_FALLBACK_ENABLED(Ctxt) ((Ctxt)->State.Fallback)
  308. #define IS_FALLBACK_DISABLED(Ctxt) (!(Ctxt)->State.Fallback)
  309. #define APICTXT_ENABLED(Ctxt) ((Ctxt)->State.ApiContext = 1)
  310. #define APICTXT_DISABLED(Ctxt) ((Ctxt)->State.ApiContext = 0)
  311. #define IS_APICTXT_ENABLED(Ctxt) ((Ctxt)->State.ApiContext)
  312. #define IS_APICTXT_DISABLED(Ctxt) (!(Ctxt)->State.ApiContext)
  313. #define IS_UNIDIRECTIONAL(Ctxt) ((Ctxt)->State.UniDirectional)
  314. //
  315. // DNS resolver uses these without defines. So, don't change them.
  316. //
  317. #define ADDRESS_TYPE_AUTO 1
  318. #define ADDRESS_TYPE_DHCP 0
  319. #define ACQUIRED_DHCP_ADDRESS(Ctxt) ((Ctxt)->State.AutoMode = 0 )
  320. #define ACQUIRED_AUTO_ADDRESS(Ctxt) ((Ctxt)->State.AutoMode = 1 )
  321. #define IS_ADDRESS_DHCP(Ctxt) (!(Ctxt)->State.AutoMode)
  322. #define IS_ADDRESS_AUTO(Ctxt) ((Ctxt)->State.AutoMode)
  323. #define MEDIA_CONNECTED(Ctxt) ((Ctxt)->State.MediaState = 0)
  324. #define MEDIA_RECONNECTED(Ctxt) ((Ctxt)->State.MediaState = 1)
  325. #define MEDIA_DISCONNECTED(Ctxt) ((Ctxt)->State.MediaState = 2)
  326. #define MEDIA_UNBOUND(Ctxt) ((Ctxt)->State.MediaState = 3)
  327. #define IS_MEDIA_CONNECTED(Ctxt) ((Ctxt)->State.MediaState == 0)
  328. #define IS_MEDIA_RECONNECTED(Ctxt) ((Ctxt)->State.MediaState == 1)
  329. #define IS_MEDIA_DISCONNECTED(Ctxt) ((Ctxt)->State.MediaState == 2)
  330. #define IS_MEDIA_UNBOUND(Ctxt) ((Ctxt)->State.MediaState == 3)
  331. #define _INIT_STATE1(Ctxt) do{(Ctxt)->State.Plumbed = 0; (Ctxt)->State.AutonetEnabled=0;}while(0)
  332. #define _INIT_STATE2(Ctxt) do{(Ctxt)->State.HasBeenLooked = 0; (Ctxt)->State.DhcpEnabled=1;}while(0)
  333. #define _INIT_STATE3(Ctxt) do{(Ctxt)->State.AutoMode = 0; (Ctxt)->State.MediaState = 0;}while(0)
  334. #define INIT_STATE(Ctxt) do{_INIT_STATE1(Ctxt);_INIT_STATE2(Ctxt);_INIT_STATE3(Ctxt);}while(0)
  335. #define MDHCP_CTX(Ctxt) ((Ctxt)->State.MDhcp = 1)
  336. #define NONMDHCP_CTX(Ctxt) ((Ctxt)->State.MDhcp = 0)
  337. #define IS_MDHCP_CTX(Ctxt) ((Ctxt)->State.MDhcp )
  338. #define SET_MDHCP_STATE( Ctxt ) { \
  339. ADDRESS_PLUMBED( Ctxt ), MDHCP_CTX( Ctxt ); \
  340. }
  341. #define POWER_RESUMED(Ctxt) ((Ctxt)->State.PowerResumed = 1)
  342. #define POWER_NOT_RESUMED(Ctxt) ((Ctxt)->State.PowerResumed = 0)
  343. #define IS_POWER_RESUMED(Ctxt) ((Ctxt)->State.PowerResumed )
  344. LPSTR _inline // the string'ed version of state (same as Buffer)
  345. ConvertStateToString( // convert from bits to string
  346. IN PDHCP_CONTEXT Ctxt, // The context to print state for
  347. IN LPBYTE Buffer // The input buffer to write state into
  348. ) {
  349. strcpy(Buffer, IS_DHCP_ENABLED(Ctxt)?"DhcpEnabled ":"DhcpDisabled ");
  350. strcat(Buffer, IS_AUTONET_ENABLED(Ctxt)?"AutonetEnabled ":"AutonetDisabled ");
  351. strcat(Buffer, IS_ADDRESS_DHCP(Ctxt)?"DhcpMode ":"AutoMode ");
  352. strcat(Buffer, IS_ADDRESS_PLUMBED(Ctxt)?"Plumbed ":"UnPlumbed ");
  353. strcat(Buffer, IS_SERVER_REACHABLE(Ctxt)?"(server-present) ":"(server-absent) ");
  354. strcat(Buffer, WAS_CTXT_LOOKED(Ctxt)? "(seen) ":"(not-seen) ");
  355. if(IS_MEDIA_CONNECTED(Ctxt) ) strcat(Buffer, "MediaConnected\n");
  356. else if(IS_MEDIA_RECONNECTED(Ctxt)) strcat(Buffer, "MediaReConnected\n");
  357. else if(IS_MEDIA_DISCONNECTED(Ctxt)) strcat(Buffer, "MediaDisConnected\n");
  358. else strcat(Buffer, "MediaUnknownState\n");
  359. strcat(Buffer, IS_MDHCP_CTX(Ctxt)? "(MDhcp) ":"");
  360. strcat(Buffer, IS_POWER_RESUMED(Ctxt)? "Pwr Resumed ":"");
  361. return Buffer;
  362. }
  363. //
  364. // Release on shutdown values..
  365. //
  366. #define RELEASE_ON_SHUTDOWN_OBEY_DHCP_SERVER 2
  367. #define RELEASE_ON_SHUTDOWN_ALWAYS 1
  368. #define RELEASE_ON_SHUTDOWN_NEVER 0
  369. //
  370. // The types of machines.. laptop would have aggressive EASYNET behaviour.
  371. //
  372. #define MACHINE_NONE 0
  373. #define MACHINE_LAPTOP 1
  374. //
  375. // Here is the set of expected options by the client -- If they are absent, not much can be done
  376. //
  377. typedef struct _DHCP_EXPECTED_OPTIONS {
  378. BYTE UNALIGNED* MessageType;
  379. DHCP_IP_ADDRESS UNALIGNED* SubnetMask;
  380. DHCP_IP_ADDRESS UNALIGNED* LeaseTime;
  381. DHCP_IP_ADDRESS UNALIGNED* ServerIdentifier;
  382. BYTE UNALIGNED* AutoconfOption;
  383. BYTE UNALIGNED* DomainName;
  384. DWORD DomainNameSize;
  385. } DHCP_EXPECTED_OPTIONS, *PDHCP_EXPECTED_OPTIONS, *LPDHCP_EXPECTED_OPTIONS;
  386. //
  387. // Here is the set of options understood by the client
  388. //
  389. typedef struct _DHCP_FULL_OPTIONS {
  390. BYTE UNALIGNED* MessageType; // What kind of message is this?
  391. // Basic IP Parameters
  392. DHCP_IP_ADDRESS UNALIGNED* SubnetMask;
  393. DHCP_IP_ADDRESS UNALIGNED* LeaseTime;
  394. DHCP_IP_ADDRESS UNALIGNED* T1Time;
  395. DHCP_IP_ADDRESS UNALIGNED* T2Time;
  396. DHCP_IP_ADDRESS UNALIGNED* GatewayAddresses;
  397. DWORD nGateways;
  398. DHCP_IP_ADDRESS UNALIGNED* ClassedRouteAddresses;
  399. DWORD nClassedRoutes;
  400. BYTE UNALIGNED* ClasslessRouteAddresses;
  401. DWORD nClasslessRoutes;
  402. DHCP_IP_ADDRESS UNALIGNED* ServerIdentifier;
  403. // DNS parameters
  404. BYTE UNALIGNED* DnsFlags;
  405. BYTE UNALIGNED* DnsRcode1;
  406. BYTE UNALIGNED* DnsRcode2;
  407. BYTE UNALIGNED* DomainName;
  408. DWORD DomainNameSize;
  409. DHCP_IP_ADDRESS UNALIGNED* DnsServerList;
  410. DWORD nDnsServers;
  411. // Server message is something that the server may inform us of
  412. BYTE UNALIGNED* ServerMessage;
  413. DWORD ServerMessageLength;
  414. } DHCP_FULL_OPTIONS, *PDHCP_FULL_OPTIONS, *LPDHCP_FULL_OPTIONS;
  415. typedef DHCP_FULL_OPTIONS DHCP_OPTIONS, *PDHCP_OPTIONS;
  416. typedef struct _MADCAP_OPTIONS {
  417. DWORD UNALIGNED* LeaseTime;
  418. DWORD UNALIGNED* Time;
  419. DWORD UNALIGNED* RetryTime;
  420. DHCP_IP_ADDRESS UNALIGNED* ServerIdentifier;
  421. BYTE * ClientGuid;
  422. WORD ClientGuidLength;
  423. BYTE * MScopeList;
  424. WORD MScopeListLength;
  425. DWORD UNALIGNED* MCastLeaseStartTime;
  426. BYTE * AddrRangeList;
  427. WORD AddrRangeListSize;
  428. DWORD UNALIGNED* McastScope;
  429. DWORD UNALIGNED* Error;
  430. } MADCAP_OPTIONS, *PMADCAP_OPTIONS, *LPMADCAP_OPTIONS;
  431. //
  432. // structure for a list of messages
  433. //
  434. typedef struct _MSG_LIST {
  435. LIST_ENTRY MessageListEntry;
  436. DWORD ServerIdentifier;
  437. DWORD MessageSize;
  438. DWORD LeaseExpirationTime;
  439. DHCP_MESSAGE Message;
  440. } MSGLIST, *PMSGLIST, *LPMSGLIST;
  441. //
  442. // structure for IP/Subnet pair
  443. //
  444. typedef struct {
  445. DHCP_IP_ADDRESS IpAddress;
  446. DHCP_IP_ADDRESS SubnetMask;
  447. } IP_SUBNET, *PIP_SUBNET;
  448. #endif // _DHCPDEF_