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.

124 lines
6.2 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. DhcpReleaseParameters( // release an existing lease
  24. IN LPWSTR AdapterName // adpater to release lease for
  25. );
  26. DWORD // win32 status
  27. DhcpEnableDynamicConfic( // convert from static to dhcp
  28. IN LPWSTR AdapterName // convert for this adapter
  29. );
  30. DWORD // win32 status
  31. DhcpDisableDynamicConfig( // convert from dhcp to static
  32. IN LPWSTR AdapterName // convert this adapter
  33. );
  34. DWORD // win32 status
  35. DhcpStaticRefreshParams( // some registry parameters may have changed, refresh them
  36. IN LPWSTR AdapterName
  37. );
  38. DWORD
  39. APIENTRY // Request client for options.. and get the options.
  40. DhcpRequestOptions(
  41. LPWSTR AdapterName,
  42. BYTE *pbRequestedOptions,
  43. DWORD dwNumberOfOptions,
  44. BYTE **ppOptionList, // out param
  45. DWORD *pdwOptionListSize, // out param
  46. BYTE **ppbReturnedOptions, // out param
  47. DWORD *pdwNumberOfAvailableOptions // out param
  48. );
  49. DWORD
  50. APIENTRY // Register with the client to get Event for notification.
  51. DhcpRegisterOptions(
  52. LPWSTR AdapterName , // Null implies ALL adapters.
  53. LPBYTE OptionList , // The list of options to check.
  54. DWORD OptionListSz, // The size of the above list
  55. HANDLE *pdwHandle // the handle of an event to wait for.
  56. ); // returns an event.
  57. DWORD
  58. APIENTRY // Deregister with the client..
  59. DhcpDeRegisterOptions(
  60. HANDLE Event // This MUST be the one returned by above fn.
  61. );
  62. DWORD // win32 status
  63. APIENTRY
  64. DhcpRequestParameters( // request parameters of client
  65. IN LPWSTR AdapterName, // adapter name to request for
  66. IN LPBYTE ClassId, // byte stream of class id to use
  67. IN DWORD ClassIdLen, // # of bytes of class id to use
  68. IN PDHCPAPI_PARAMS SendParams, // parameters to send to server
  69. IN DWORD nSendParams, // size of above array
  70. IN DWORD Flags, // must be zero, reserved
  71. IN OUT PDHCPAPI_PARAMS RecdParams, // fill this array with received params
  72. IN OUT LPDWORD pnRecdParamsBytes // i/p: size of above in BYTES, o/p required bytes or filled up # of elements
  73. ); // returns ERROR_MORE_DATA if o/p buffer is of insufficient size, and fills in reqd size in # of bytes
  74. DWORD // win32 status
  75. APIENTRY
  76. DhcpRegisterParameterChangeNofitication( // notify if a parameter has changed
  77. IN LPWSTR AdapterName, // adapter of interest
  78. IN LPBYTE ClassId, // byte stream of class id to use
  79. IN DWORD ClassIdLen, // # of bytes of class id
  80. IN PDHCPAPI_PARAMS Params, // params of interest
  81. IN DWORD nParams, // # of elts in above array
  82. IN DWORD Flags, // must be zero, reserved
  83. IN OUT PHANDLE hEvent // handle to event that will be SetEvent'ed in case of param change
  84. );
  85. DWORD
  86. APIENTRY
  87. DhcpDeRegisterParameterChangeNofitication( // undo the registration
  88. IN HANDLE Event // handle to event returned by DhcpRegisterParameterChangeNotification, NULL ==> everything
  89. );
  90. DWORD // win32 status
  91. APIENTRY
  92. DhcpPersistentRequestParams( // parameters to request persistently
  93. IN LPWSTR AdapterName, // adapter name to request for
  94. IN LPBYTE ClassId, // byte stream of class id to use
  95. IN DWORD ClassIdLen, // # of bytes of class id
  96. IN PDHCPAPI_PARAMS SendParams, // persistent parameters
  97. IN DWORD nSendParams, // size of above array
  98. IN DWORD Flags, // must be zero, reserved
  99. IN LPWSTR AppName // the name of the app that is to be used for this instance
  100. );
  101. DWORD // win32 status
  102. APIENTRY
  103. DhcpDelPersistentRequestParams( // undo the effect of a persistent request -- currently undo from registry
  104. IN LPWSTR AdapterName, // the name of the adpater to delete for
  105. IN LPWSTR AppName // the name used by the app
  106. );
  107. #endif APIAPPL_H_INCLUDED