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.

135 lines
6.7 KiB

  1. //================================================================================
  2. // Copyright (C) 1997 Microsoft Corporation
  3. // Author: RameshV
  4. // Description: these are the exported dhcp client api function definitions
  5. //================================================================================
  6. #ifndef APIAPPL_H_INCLUDED
  7. #define APIAPPL_H_INCLUDED
  8. #ifndef DHCPAPI_PARAMS_DEFINED
  9. #define DHCPAPI_PARAMS_DEFINED
  10. typedef struct _DHCPAPI_PARAMS { // use this structure to request params
  11. ULONG Flags; // for future use
  12. ULONG OptionId; // what option is this?
  13. BOOL IsVendor; // is this vendor specific?
  14. LPBYTE Data; // the actual data
  15. DWORD nBytesData; // how many bytes of data are there in Data?
  16. } DHCPAPI_PARAMS, *PDHCPAPI_PARAMS, *LPDHCPAPI_PARAMS;
  17. #endif DHCPAPI_PARAMS_DEFINED
  18. DWORD // win32 status
  19. DhcpAcquireParameters( // acquire/renew a lease
  20. IN LPWSTR AdapterName // adapter to acquire lease on
  21. );
  22. DWORD // win32 status
  23. DhcpFallbackRefreshParams( // something has changed in the fallback settings
  24. IN LPWSTR AdapterName
  25. );
  26. DWORD // win32 status
  27. DhcpReleaseParameters( // release an existing lease
  28. IN LPWSTR AdapterName // adpater to release lease for
  29. );
  30. DWORD // win32 status
  31. DhcpEnableDynamicConfic( // convert from static to dhcp
  32. IN LPWSTR AdapterName // convert for this adapter
  33. );
  34. DWORD // win32 status
  35. DhcpDisableDynamicConfig( // convert from dhcp to static
  36. IN LPWSTR AdapterName // convert this adapter
  37. );
  38. DWORD // win32 status
  39. DhcpStaticRefreshParams( // some registry parameters may have changed, refresh them
  40. IN LPWSTR AdapterName
  41. );
  42. DWORD // win32 status
  43. DhcpStaticRefreshParamsInternal( // some registry parameters may have changed, refresh them
  44. IN LPWSTR AdapterName,
  45. IN BOOL fDoDns
  46. );
  47. DWORD
  48. APIENTRY // Request client for options.. and get the options.
  49. DhcpRequestOptions(
  50. LPWSTR AdapterName,
  51. BYTE *pbRequestedOptions,
  52. DWORD dwNumberOfOptions,
  53. BYTE **ppOptionList, // out param
  54. DWORD *pdwOptionListSize, // out param
  55. BYTE **ppbReturnedOptions, // out param
  56. DWORD *pdwNumberOfAvailableOptions // out param
  57. );
  58. DWORD
  59. APIENTRY // Register with the client to get Event for notification.
  60. DhcpRegisterOptions(
  61. LPWSTR AdapterName , // Null implies ALL adapters.
  62. LPBYTE OptionList , // The list of options to check.
  63. DWORD OptionListSz, // The size of the above list
  64. HANDLE *pdwHandle // the handle of an event to wait for.
  65. ); // returns an event.
  66. DWORD
  67. APIENTRY // Deregister with the client..
  68. DhcpDeRegisterOptions(
  69. HANDLE Event // This MUST be the one returned by above fn.
  70. );
  71. DWORD // win32 status
  72. APIENTRY
  73. DhcpRequestParameters( // request parameters of client
  74. IN LPWSTR AdapterName, // adapter name to request for
  75. IN LPBYTE ClassId, // byte stream of class id to use
  76. IN DWORD ClassIdLen, // # of bytes of class id to use
  77. IN PDHCPAPI_PARAMS SendParams, // parameters to send to server
  78. IN DWORD nSendParams, // size of above array
  79. IN DWORD Flags, // must be zero, reserved
  80. IN OUT PDHCPAPI_PARAMS RecdParams, // fill this array with received params
  81. IN OUT LPDWORD pnRecdParamsBytes // i/p: size of above in BYTES, o/p required bytes or filled up # of elements
  82. ); // returns ERROR_MORE_DATA if o/p buffer is of insufficient size, and fills in reqd size in # of bytes
  83. DWORD // win32 status
  84. APIENTRY
  85. DhcpRegisterParameterChangeNofitication( // notify if a parameter has changed
  86. IN LPWSTR AdapterName, // adapter of interest
  87. IN LPBYTE ClassId, // byte stream of class id to use
  88. IN DWORD ClassIdLen, // # of bytes of class id
  89. IN PDHCPAPI_PARAMS Params, // params of interest
  90. IN DWORD nParams, // # of elts in above array
  91. IN DWORD Flags, // must be zero, reserved
  92. IN OUT PHANDLE hEvent // handle to event that will be SetEvent'ed in case of param change
  93. );
  94. DWORD
  95. APIENTRY
  96. DhcpDeRegisterParameterChangeNofitication( // undo the registration
  97. IN HANDLE Event // handle to event returned by DhcpRegisterParameterChangeNotification, NULL ==> everything
  98. );
  99. DWORD // win32 status
  100. APIENTRY
  101. DhcpPersistentRequestParams( // parameters to request persistently
  102. IN LPWSTR AdapterName, // adapter name to request for
  103. IN LPBYTE ClassId, // byte stream of class id to use
  104. IN DWORD ClassIdLen, // # of bytes of class id
  105. IN PDHCPAPI_PARAMS SendParams, // persistent parameters
  106. IN DWORD nSendParams, // size of above array
  107. IN DWORD Flags, // must be zero, reserved
  108. IN LPWSTR AppName // the name of the app that is to be used for this instance
  109. );
  110. DWORD // win32 status
  111. APIENTRY
  112. DhcpDelPersistentRequestParams( // undo the effect of a persistent request -- currently undo from registry
  113. IN LPWSTR AdapterName, // the name of the adpater to delete for
  114. IN LPWSTR AppName // the name used by the app
  115. );
  116. #endif APIAPPL_H_INCLUDED