[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference decwet::nt-developers

Title:MS Windows NT Developers
Notice:See note 1222 for MS bug reporting info
Moderator:TARKIN::LINEIBER
Created:Mon Nov 11 1991
Last Modified:Tue Jun 03 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3247
Total number of notes:15633

3193.0. "how to access the DHCP data base from a program?" by ULYSSE::BALLETTA () Thu Feb 20 1997 09:44

Is there an API (or other means) that will enable a program to access the 
DHCP data base?

Thanks for the help,

    Costantino.

P.S. A look at the developer Network did not give much results.
T.RTitleUserPersonal
Name
DateLines
3193.1BHAJEE::JAERVINENOra, the Old Rural AmateurThu Feb 20 1997 10:273
    The database is in \winnt\system32\dhcp but I haven't seen the
    structure documented...
    
3193.2DHCPSAPI.DLLCHEFS::ATTWOOL_JTue Feb 25 1997 09:3313
    
    The DHCP APIs are in DHCPSAPI.DLL, undocumented to the outside world 
    I think. I also wanted to do some DHCP stuff but ended up using the 
    DHCP toolson the resource kit to do the things I wanted.
    
    It uses a number of calls:
    
    DhcpGetClientInfo
    DhcpAddSubnetElement
    DhcpServerGetConfig
    and more...
    
    Justyn k
3193.3did you manage?ULYSSE::BALLETTATue Feb 25 1997 11:2525
Justyn,

Did you manage to accomplish anything? Did you document the use of the DLL?

My intention is to build a tool that allows to handle all addresses of a network via the 
DHCP server, even for equipment like mainframe and others that do not (yet) have a DHCP 
client implemented.

The idea is to build a nice GUI that helps the Network Manager to perform either of 
two functions:

  * interrogate the DHCP database for the first available address out of a scope and then
    use the DHCP Mangaer to reserve the previously obtained IP address, or
  * to interrogate the database and then write into it, basically behaving like a DHCP 
    server for nodes without the DHCP client.

A colleague suggested to interface with the DHCP Server via the API.

This wouldn't work in all cases since the DHCP server determine the sub-net address 
(which will tell it the scope to look at) from the incoming packet which in the case 
of one application would not change between any two instances.

Can anybody suggest a Microsoft channel where to ask to?

   Costantino.
3193.4www.geo.dec.com/dhcp/dhcp.htmlLEXS01::PUCHRIKField RatWed Feb 26 1997 06:274
    You may want to look here for a public implementation of DHCP for
    UNIX systems.
    
    		http://www.geo.dec.com/dhcp/dhcp.html
3193.5the MS DHCP server use JET to access the database, but what about the database structure?ULYSSE::BALLETTAWed Feb 26 1997 11:286
Thanks for your pointer. The article is very useful but obviously does not 
talk about the structure of the database of the Microsoft implemented 
DHCP server which is an internal matter.

The only thing I know about the database is that the DHCP server 
uses JET to access it, but that tells me nothing about its internal structure.
3193.6axel.zko.dec.com::FOLEYhttp://axel.zko.dec.comWed Feb 26 1997 12:587

RE: .5

	Make a copy of the file and open with Access?

							mike