reactos/dll/win32/iphlpapi/dhcp_reactos.c
Cameron Gutman c2d0d784c7 [USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This leads to merge problems!

svn path=/branches/usb-bringup-trunk/; revision=55018
2012-01-20 20:58:46 +00:00

42 lines
1.3 KiB
C

/*
* PROJECT: ReactOS Networking
* LICENSE: GPL - See COPYING in the top level directory
* FILE: lib/iphlpapi/dhcp_reactos.c
* PURPOSE: DHCP helper functions for ReactOS
* COPYRIGHT: Copyright 2006 Ge van Geldorp <gvg@reactos.org>
*/
#include "iphlpapi_private.h"
DWORD APIENTRY DhcpRosGetAdapterInfo(DWORD AdapterIndex,
PBOOL DhcpEnabled,
PDWORD DhcpServer,
time_t *LeaseObtained,
time_t *LeaseExpires);
DWORD getDhcpInfoForAdapter(DWORD AdapterIndex,
PBOOL DhcpEnabled,
PDWORD DhcpServer,
time_t *LeaseObtained,
time_t *LeaseExpires)
{
DWORD Status, Version = 0;
Status = DhcpCApiInitialize(&Version);
if (Status != ERROR_SUCCESS)
{
/* We assume that the DHCP service isn't running yet */
*DhcpEnabled = FALSE;
*DhcpServer = htonl(INADDR_NONE);
*LeaseObtained = 0;
*LeaseExpires = 0;
return ERROR_SUCCESS;
}
Status = DhcpRosGetAdapterInfo(AdapterIndex, DhcpEnabled, DhcpServer,
LeaseObtained, LeaseExpires);
DhcpCApiCleanup();
return Status;
}