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.

97 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. dhcpauto.h
  5. Abstract:
  6. This module contains declarations for generation of a client address
  7. from a given scope of addresses.
  8. Author:
  9. Abolade Gbadegesin (aboladeg) 10-Mar-1998
  10. Revision History:
  11. --*/
  12. #ifndef _NATHLP_DHCPAUTO_H_
  13. #define _NATHLP_DHCPAUTO_H_
  14. #define MAX_HARDWARE_ADDRESS_LENGTH 32
  15. ULONG
  16. DhcpAcquireUniqueAddress(
  17. PCHAR Name,
  18. ULONG NameLength,
  19. PUCHAR HardwareAddress,
  20. ULONG HardwareAddressLength
  21. );
  22. ULONG
  23. DhcpGenerateAddress(
  24. PULONG Seed,
  25. PUCHAR HardwareAddress,
  26. ULONG HardwareAddressLength,
  27. ULONG ScopeNetwork,
  28. ULONG ScopeMask
  29. );
  30. BOOLEAN
  31. DhcpIsReservedAddress(
  32. ULONG Address,
  33. PCHAR Name OPTIONAL,
  34. ULONG NameLength OPTIONAL
  35. );
  36. BOOLEAN
  37. DhcpIsUniqueAddress(
  38. ULONG Address,
  39. PBOOLEAN IsLocal,
  40. PUCHAR ConflictAddress OPTIONAL,
  41. PULONG ConflictAddressLength OPTIONAL
  42. );
  43. ULONG
  44. DhcpQueryReservedAddress(
  45. PCHAR Name,
  46. ULONG NameLength
  47. );
  48. ULONG
  49. DhcpConvertHostNametoUnicode(
  50. UINT CodePage,
  51. CHAR *pHostName,
  52. ULONG HostNameLength,
  53. PWCHAR *ppszUnicode
  54. );
  55. extern
  56. BOOL
  57. ConvertToUtf8(
  58. IN UINT CodePage,
  59. IN LPSTR pszName,
  60. OUT PCHAR *ppszUtf8Name,
  61. OUT ULONG *pUtf8NameSize
  62. );
  63. extern
  64. BOOL
  65. ConvertUTF8ToUnicode(
  66. IN LPBYTE UTF8String,
  67. OUT LPWSTR *ppszUnicodeName,
  68. OUT DWORD *pUnicodeNameSize
  69. );
  70. BOOL
  71. DhcpGetLocalMacAddr(
  72. ULONG Address,
  73. PUCHAR MacAddr,
  74. PULONG MacAddrLength
  75. );
  76. #endif // _NATHLP_DHCPAUTO_H_