ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

dhcp_reactos.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:     ReactOS Networking
00003  * LICENSE:     GPL - See COPYING in the top level directory
00004  * FILE:        lib/iphlpapi/dhcp_reactos.c
00005  * PURPOSE:     DHCP helper functions for ReactOS
00006  * COPYRIGHT:   Copyright 2006 Ge van Geldorp <gvg@reactos.org>
00007  */
00008 
00009 #include "iphlpapi_private.h"
00010 
00011 DWORD APIENTRY DhcpRosGetAdapterInfo(DWORD AdapterIndex,
00012                                      PBOOL DhcpEnabled,
00013                                      PDWORD DhcpServer,
00014                                      time_t *LeaseObtained,
00015                                      time_t *LeaseExpires);
00016 
00017 DWORD getDhcpInfoForAdapter(DWORD AdapterIndex,
00018                             PBOOL DhcpEnabled,
00019                             PDWORD DhcpServer,
00020                             time_t *LeaseObtained,
00021                             time_t *LeaseExpires)
00022 {
00023     DWORD Status, Version = 0;
00024 
00025     Status = DhcpCApiInitialize(&Version);
00026     if (Status != ERROR_SUCCESS)
00027     {
00028         /* We assume that the DHCP service isn't running yet */
00029         *DhcpEnabled = FALSE;
00030         *DhcpServer = htonl(INADDR_NONE);
00031         *LeaseObtained = 0;
00032         *LeaseExpires = 0;
00033         return ERROR_SUCCESS;
00034     }
00035 
00036     Status = DhcpRosGetAdapterInfo(AdapterIndex, DhcpEnabled, DhcpServer,
00037                                    LeaseObtained, LeaseExpires);
00038 
00039     DhcpCApiCleanup();
00040 
00041     return Status;
00042 }

Generated on Sun May 27 2012 04:24:09 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.