mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:22:58 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
42
dll/win32/iphlpapi/dhcp_reactos.c
Normal file
42
dll/win32/iphlpapi/dhcp_reactos.c
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue