ReactOS  0.4.15-dev-1152-g6c94e4f
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 }
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
#define ERROR_SUCCESS
Definition: deptool.c:10
#define htonl(x)
Definition: module.h:212
#define INADDR_NONE
Definition: tcp.c:42
DWORD getDhcpInfoForAdapter(DWORD AdapterIndex, PBOOL DhcpEnabled, PDWORD DhcpServer, time_t *LeaseObtained, time_t *LeaseExpires)
Definition: dhcp_reactos.c:17
#define FALSE
Definition: types.h:117
BOOL * PBOOL
Definition: windef.h:161
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:24
DWORD APIENTRY DhcpCApiInitialize(LPDWORD Version)
Definition: dhcpcsvc.c:24
DWORD APIENTRY DhcpRosGetAdapterInfo(DWORD AdapterIndex, PBOOL DhcpEnabled, PDWORD DhcpServer, time_t *LeaseObtained, time_t *LeaseExpires)
Definition: dhcpcsvc.c:298
__kernel_time_t time_t
Definition: linux.h:252
DWORD * PDWORD
Definition: pedump.c:68
#define APIENTRY
Definition: api.h:79
VOID APIENTRY DhcpCApiCleanup(VOID)
Definition: dhcpcsvc.c:69