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.

123 lines
4.8 KiB

  1. /*++
  2. Copyright (C) 1995 Microsoft Corporation
  3. Module:
  4. apiimpl.h
  5. Abstract:
  6. routines for API -- renew, release, inform, etc
  7. Environment:
  8. Win32 user mode, Win98 VxD
  9. --*/
  10. #ifndef DHCP_APIIMPL_H
  11. #define DHCP_APIIMPL_H
  12. #include <dhcpcli.h>
  13. #include <apiargs.h>
  14. #define DHCP_PIPE_NAME L"\\\\.\\Pipe\\DhcpClient"
  15. DWORD // win32 status
  16. DhcpApiInit( // Initialize API datastructures
  17. VOID
  18. );
  19. VOID
  20. DhcpApiCleanup( // Cleanup API data structures
  21. VOID
  22. );
  23. DWORD // win32 status
  24. AcquireParameters( // renew or obtain a lease
  25. IN OUT PDHCP_CONTEXT DhcpContext
  26. );
  27. DWORD // win32 status
  28. AcquireParametersByBroadcast( // renew or obtain a lease
  29. IN OUT PDHCP_CONTEXT DhcpContext
  30. );
  31. DWORD // win32 status
  32. FallbackRefreshParams( // refresh all the fallback parameters for this adapter
  33. IN OUT PDHCP_CONTEXT DhcpContext
  34. );
  35. DWORD // win32 status
  36. ReleaseParameters( // release existing lease
  37. IN OUT PDHCP_CONTEXT DhcpContext
  38. );
  39. DWORD // win32 status
  40. EnableDhcp( // convert a static adapter to use dhcp
  41. IN OUT PDHCP_CONTEXT DhcpContext
  42. );
  43. DWORD // win32 status
  44. DisableDhcp( // convert a dhcp-enabled adapter to static
  45. IN OUT PDHCP_CONTEXT DhcpContext
  46. );
  47. DWORD // win32 status
  48. StaticRefreshParamsEx( // refresh all the static parameters for this adapter
  49. IN OUT PDHCP_CONTEXT DhcpContext,
  50. IN ULONG Flags
  51. );
  52. DWORD // win32 status
  53. StaticRefreshParams( // refresh all the static parameters for this adapter
  54. IN OUT PDHCP_CONTEXT DhcpContext
  55. );
  56. DWORD // win32 status
  57. RequestParams( // request some params
  58. IN PDHCP_CONTEXT AdapterName, // for which adapter?
  59. IN PDHCP_API_ARGS ArgArray, // other arguments
  60. IN DWORD nArgs, // size of above array
  61. IN OUT LPBYTE Buffer, // buffer to fill with options
  62. IN OUT LPDWORD BufferSize // size of above buffer in bytes
  63. ) ;
  64. DWORD // win32 status
  65. PersistentRequestParams( // keep this request persistent -- request some params
  66. IN PDHCP_CONTEXT AdapterName, // for which adapter?
  67. IN PDHCP_API_ARGS ArgArray, // other arguments
  68. IN DWORD nArgs, // size of above array
  69. IN OUT LPBYTE Buffer, // buffer to fill with options
  70. IN OUT LPDWORD BufferSize // size of above buffer in bytes
  71. ) ;
  72. DWORD // win32 status
  73. RegisterParams( // register some params for notification
  74. IN LPWSTR AdapterName, // adapter name to use
  75. IN PDHCP_API_ARGS ArgArray, // other parameters
  76. IN DWORD nArgs // size of above array
  77. );
  78. DWORD // win32 status
  79. DeRegisterParams( // undo the effects of the above
  80. IN LPWSTR AdapterName, // which adapter name, NULL ==> all
  81. IN PDHCP_API_ARGS ArgArray, // other parameters
  82. IN DWORD nArgs // size of above array
  83. );
  84. DWORD // error status
  85. ExecuteApiRequest( // execute an api request
  86. IN LPBYTE InBuffer, // buffer to process
  87. OUT LPBYTE OutBuffer, // place to copy the output data
  88. IN OUT LPDWORD OutBufSize // ip: how big can the outbuf be, o/p: how big it really is
  89. );
  90. DWORD // win32 status
  91. DhcpDoInform( // send an inform packet if necessary
  92. IN PDHCP_CONTEXT DhcpContext, // input context to do inform on
  93. IN BOOL fBroadcast // Do we broadcast this inform, or unicast to server?
  94. );
  95. #endif DHCP_APIIMPL_H