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.

101 lines
3.1 KiB

  1. /******************************************************************
  2. LsFn.h -- Properties action functions declarations (GET/SET)
  3. MODULE:
  4. DhcpProv.dll
  5. DESCRIPTION:
  6. Contains the declaration of the CDHCP_Lease_Parameters class, modeling all
  7. the datastructures used to retrieve the information from the DHCP Client.
  8. Contains the declarations for the action functions associated to
  9. each manageable property from the class CDHCP_Server
  10. REVISION:
  11. 08/14/98 - created
  12. ******************************************************************/
  13. #include "Props.h" // needed for MFN_PROPERTY_ACTION_DECL definition
  14. #ifndef _LSFN_H
  15. #define _LSFN_H
  16. #ifdef NT5
  17. #define LPCLIENT_INFO_ARRAY LPDHCP_CLIENT_INFO_ARRAY_V5
  18. #define LPCLIENT_INFO LPDHCP_CLIENT_INFO_V5
  19. #define CLIENT_INFO DHCP_CLIENT_INFO_V5
  20. #else if NT4
  21. #define LPCLIENT_INFO_ARRAY LPDHCP_CLIENT_INFO_ARRAY_V4
  22. #define LPCLIENT_INFO LPDHCP_CLIENT_INFO_V4
  23. #define CLIENT_INFO DHCP_CLIENT_INFO_V4
  24. #endif
  25. // gathers the data structures needed for retrieving data from the DHCP Lease.
  26. class CDHCP_Lease_Parameters
  27. {
  28. private:
  29. void DeleteClientInfo(LPCLIENT_INFO& pClientInfo);
  30. void DeleteClientInfoArray(LPCLIENT_INFO_ARRAY& pClientInfoArray);
  31. public:
  32. DHCP_IP_ADDRESS m_dwSubnetAddress;
  33. DHCP_IP_ADDRESS m_dwClientAddress;
  34. LPCLIENT_INFO_ARRAY m_pClientInfoArray;
  35. LPCLIENT_INFO m_pClientInfo;
  36. LPCLIENT_INFO m_pClientSetInfo;
  37. CDHCP_Lease_Parameters(DHCP_IP_ADDRESS dwSubnetAddress, DHCP_IP_ADDRESS dwClientAddress);
  38. ~CDHCP_Lease_Parameters();
  39. BOOL NextSubnetClients(DHCP_RESUME_HANDLE ResumeHandle);
  40. BOOL GetClientInfoFromCache(LPCLIENT_INFO& pClientInfo);
  41. BOOL GetClientInfo(LPCLIENT_INFO& pClientInfo, BOOL fRefresh);
  42. BOOL CheckExistsSetInfoPtr();
  43. BOOL CommitSet(DWORD & errCode);
  44. };
  45. // GET function for the (RO)"Subnet" property
  46. MFN_PROPERTY_ACTION_DECL(fnLsGetSubnet);
  47. // GET function for the (RO)"Address" property
  48. MFN_PROPERTY_ACTION_DECL(fnLsGetAddress);
  49. // GET function for the (RO) "Mask" property
  50. MFN_PROPERTY_ACTION_DECL(fnLsGetMask);
  51. // GET function for the (RW)"UniqueClientIdentifier" property
  52. MFN_PROPERTY_ACTION_DECL(fnLsGetHdwAddress);
  53. // SET function for the (RW)"UniqueClientIdentifier" property
  54. MFN_PROPERTY_ACTION_DECL(fnLsSetHdwAddress);
  55. // GET function for the (RW)"Name" property
  56. MFN_PROPERTY_ACTION_DECL(fnLsGetName);
  57. // SET function for the (RW)"Name" property
  58. MFN_PROPERTY_ACTION_DECL(fnLsSetName);
  59. // GET function for the (RW)"Comment" property
  60. MFN_PROPERTY_ACTION_DECL(fnLsGetComment);
  61. // SET function for the (RW)"Comment" property
  62. MFN_PROPERTY_ACTION_DECL(fnLsSetComment);
  63. // GET function for the (RO)"LeaseExpiryDate" property
  64. MFN_PROPERTY_ACTION_DECL(fnLsGetExpiry);
  65. // GET function for the (RW)"Type" property
  66. MFN_PROPERTY_ACTION_DECL(fnLsGetType);
  67. // SET function for the (RW)"Type" property
  68. MFN_PROPERTY_ACTION_DECL(fnLsSetType);
  69. #ifdef NT5
  70. // GET function for the (RO)"State" property
  71. MFN_PROPERTY_ACTION_DECL(fnLsGetState);
  72. #endif
  73. #endif