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.

94 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2001
  5. //
  6. // File: W 9 X D H C P . H
  7. //
  8. // Contents: Routines supporting RAS interoperability
  9. //
  10. // Notes:
  11. //
  12. // Author: billi 04 04 2001
  13. //
  14. // History:
  15. //
  16. //----------------------------------------------------------------------------
  17. #pragma once
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #ifndef IP_TYPES_INCLUDED
  22. #include <iptypes.h>
  23. #endif
  24. //
  25. // defines
  26. //
  27. #define DHCP_QUERY_INFO 1
  28. #define DHCP_RENEW_IPADDRESS 2
  29. #define DHCP_RELEASE_IPADDRESS 3
  30. #define DHCP_CLIENT_API 4
  31. #define DHCP_IS_MEDIA_DISCONNECTED 5
  32. //
  33. // types
  34. //
  35. typedef struct _DHCP_HW_INFO {
  36. DWORD OffsetHardwareAddress;
  37. DWORD HardwareLength;
  38. } DHCP_HW_INFO, *LPDHCP_HW_INFO;
  39. //
  40. // IP_ADDRESS - access an IP address as a single DWORD or 4 BYTEs
  41. //
  42. typedef union {
  43. DWORD d;
  44. BYTE b[4];
  45. } IP_ADDRESS, *PIP_ADDRESS, IP_MASK, *PIP_MASK;
  46. //
  47. // ADAPTER_INFO - per-adapter information. All IP addresses are stored as
  48. // strings
  49. //
  50. typedef struct _ADAPTER_INFO
  51. {
  52. struct _ADAPTER_INFO* Next;
  53. DWORD ComboIndex;
  54. char AdapterName[MAX_ADAPTER_NAME_LENGTH + 1];
  55. char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 1];
  56. UINT AddressLength;
  57. BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
  58. UINT Index;
  59. UINT Type;
  60. UINT DhcpEnabled;
  61. PIP_ADDR_STRING CurrentIpAddress;
  62. IP_ADDR_STRING IpAddressList;
  63. IP_ADDR_STRING GatewayList;
  64. IP_ADDR_STRING DhcpServer;
  65. BOOL HaveWins;
  66. IP_ADDR_STRING PrimaryWinsServer;
  67. IP_ADDR_STRING SecondaryWinsServer;
  68. time_t LeaseObtained;
  69. time_t LeaseExpires;
  70. BOOL fMediaDisconnected;
  71. }
  72. ADAPTER_INFO, *PADAPTER_INFO;
  73. BOOL IsMediaDisconnected( IN OUT DWORD iae_context );
  74. DWORD DhcpReleaseAdapterIpAddress( PADAPTER_INFO AdapterInfo );
  75. DWORD DhcpRenewAdapterIpAddress( PADAPTER_INFO AdapterInfo );
  76. #ifdef __cplusplus
  77. }
  78. #endif