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.

123 lines
2.0 KiB

  1. /*--
  2. Copyright (C) Microsoft Corporation, 1999 - 1999
  3. Module Name:
  4. dhcptest.h
  5. Abstract:
  6. Contains function prototypes, defines and data structures used in dhcp test as part of
  7. autonet test.
  8. Author:
  9. 4-Aug-1998 (t-rajkup)
  10. Environment:
  11. User mode only.
  12. Revision History:
  13. None.
  14. --*/
  15. #ifndef HEADER_DHCPTEST
  16. #define HEADER_DHCPTEST
  17. #define OPTION_MSFT_CONTINUED 250
  18. #define OPTION_USER_CLASS 77
  19. #define MAX_DISCOVER_RETRIES 4
  20. //
  21. // The format of Adapter Status responses
  22. //
  23. typedef struct
  24. {
  25. ADAPTER_STATUS AdapterInfo;
  26. NAME_BUFFER Names[32];
  27. } tADAPTERSTATUS;
  28. UCHAR nameToQry[NETBIOS_NAME_SIZE + 1];
  29. /*
  30. VOID
  31. ExtractDhcpResponse(
  32. IN PDHCP_MESSAGE pDhcpMessage
  33. );
  34. */
  35. /*=======================< Dhcp related function prototypes >================*/
  36. /*
  37. DWORD
  38. DhcpCalculateWaitTime(
  39. IN DWORD RoundNum,
  40. OUT DWORD *WaitMilliSecs
  41. );
  42. BOOL
  43. GetSpecifiedDhcpMessage(
  44. IN SOCKET sock,
  45. IN PIP_ADAPTER_INFO pAdapterInfo,
  46. OUT PDHCP_MESSAGE pDhcpMessage,
  47. IN DWORD Xid,
  48. IN DWORD TimeToWait
  49. );
  50. VOID
  51. SendDhcpMessage(
  52. IN SOCKET sock,
  53. IN PDHCP_MESSAGE pDhcpMessage,
  54. IN DWORD MessageLength,
  55. IN DWORD TransactionId,
  56. IN PIP_ADAPTER_INFO pAdapterInfo
  57. );
  58. LPBYTE
  59. DhcpAppendMagicCookie(
  60. OUT LPBYTE Option,
  61. IN LPBYTE OptionEnd
  62. );
  63. LPOPTION
  64. DhcpAppendClassIdOption(
  65. IN OUT PDHCP_CONTEXT DhcpContext,
  66. OUT LPBYTE BufStart,
  67. IN LPBYTE BufEnd
  68. );
  69. LPOPTION
  70. DhcpAppendClientIDOption(
  71. OUT LPOPTION Option,
  72. IN BYTE ClientHWType,
  73. IN LPBYTE ClientHWAddr,
  74. IN BYTE ClientHWAddrLength,
  75. IN LPBYTE OptionEnd
  76. );
  77. DWORD
  78. OpenDriver(
  79. OUT HANDLE *Handle,
  80. IN LPWSTR DriverName
  81. );
  82. LPOPTION
  83. DhcpAppendOption(
  84. OUT LPOPTION Option,
  85. IN BYTE OptionType,
  86. IN PVOID OptionValue,
  87. IN ULONG OptionLength,
  88. IN LPBYTE OptionEnd
  89. );
  90. */
  91. #endif