ReactOS 0.4.16-dev-334-g4d9f67c
dhcp_reactos.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Networking
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/iphlpapi/dhcp_reactos.c
5 * PURPOSE: DHCP helper functions for ReactOS
6 * COPYRIGHT: Copyright 2006 Ge van Geldorp <gvg@reactos.org>
7 */
8
9#include "iphlpapi_private.h"
10
12 PBOOL DhcpEnabled,
13 PDWORD DhcpServer,
14 time_t *LeaseObtained,
15 time_t *LeaseExpires);
16
18 PBOOL DhcpEnabled,
19 PDWORD DhcpServer,
20 time_t *LeaseObtained,
21 time_t *LeaseExpires)
22{
23 DWORD Status, Version = 0;
24
26 if (Status != ERROR_SUCCESS)
27 {
28 /* We assume that the DHCP service isn't running yet */
29 *DhcpEnabled = FALSE;
30 *DhcpServer = htonl(INADDR_NONE);
31 *LeaseObtained = 0;
32 *LeaseExpires = 0;
33 return ERROR_SUCCESS;
34 }
35
36 Status = DhcpRosGetAdapterInfo(AdapterIndex, DhcpEnabled, DhcpServer,
37 LeaseObtained, LeaseExpires);
38
40
41 return Status;
42}
#define INADDR_NONE
Definition: tcp.c:42
#define ERROR_SUCCESS
Definition: deptool.c:10
DWORD APIENTRY DhcpRosGetAdapterInfo(DWORD AdapterIndex, PBOOL DhcpEnabled, PDWORD DhcpServer, time_t *LeaseObtained, time_t *LeaseExpires)
Definition: dhcpcsvc.c:300
DWORD getDhcpInfoForAdapter(DWORD AdapterIndex, PBOOL DhcpEnabled, PDWORD DhcpServer, time_t *LeaseObtained, time_t *LeaseExpires)
Definition: dhcp_reactos.c:17
void WINAPI DhcpCApiCleanup(void)
Definition: dhcpcsvc.c:71
DWORD APIENTRY DhcpCApiInitialize(LPDWORD Version)
Definition: dhcpcsvc.c:26
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
__kernel_time_t time_t
Definition: linux.h:252
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:25
#define htonl(x)
Definition: module.h:214
DWORD * PDWORD
Definition: pedump.c:68
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
BOOL * PBOOL
Definition: windef.h:161