msDHCP

所属分类:网络编程
开发工具:WINDOWS
文件大小:15KB
下载次数:90
上传日期:2004-12-18 16:46:54
上 传 者llemmx
说明:  微软的DHCP服务器实例
(Microsoft's DHCP server examples)

文件列表:
DHCP (0, 2004-12-03)
DHCP\DHCPNotify (0, 2004-12-03)
DHCP\DHCPNotify\dhcpnotify.cpp (7209, 2003-02-26)
DHCP\DHCPNotify\Makefile (660, 2003-02-26)
DHCP\DHCPPersist (0, 2004-12-03)
DHCP\DHCPPersist\dhcppersist.cpp (7955, 2003-02-26)
DHCP\DHCPPersist\Makefile (651, 2003-02-26)
DHCP\DHCPRequest (0, 2004-12-03)
DHCP\DHCPRequest\dhcprequest.cpp (7018, 2003-02-26)
DHCP\DHCPRequest\Makefile (651, 2003-02-26)
DHCP\makefile (1292, 2003-02-26)

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. DHCP Client Options API Samples ------------------------------- The DHCP Client Options API provides an API that allows an application to hook into the DHCP Client of a machine to request additional options from a DHCP Server or receive notification of options when they change. DHCPNotify ---------- Abstract: This sample demonstrates obtaining notification of parameters when they change. This example monitors the change of the Gateway address (OPTION_ROUTER_ADDRESS = 3) in a DHCP Client. The DHCP Client Options API will signal an application via an Event handle whenever this value changes. This change can occur during the renew or release state of a DHCP Client. This sample shows how to use the API to register for this event. It then will sit in a loop waiting for the parameter to change or for the exit event to become signaled. If the DHCP Client Options API signals the application, the value could then be read and changed in the application relying on the information. The reading of the value is not demonstrated here as that is in the DHCPRequest sample located in the Platform SDK. If an exit event is received the sample will break out of the loop and unregister the notification and exit. Supported OS: Windows 2000, Windows *** Building: Build the sample using the latest Platform SDK via the MAKEFILE included. When using the sample code in a project, be sure to link with the DHCPCSVC.LIB and the IPHLPAPI.LIB libraries. Usage: The sample can be run directly on the command-line by typing 'DHCPNOTIFY'. An adapter can be specified on the command-line. To specify an adapter on Windows 2000, use the adapter GUID, on Windows ***, the adapter index. These are the values that are obtained via the IP Helper API, GetInterfaceInfo() as demonstrated in the code included. To provide the sample with an event, use the IPCONFIG utility to release or renew the adapter information. For example 'IPCONFIG /RENEW' will cause the event to trigger. Press CTRL-C to end the sample application.

近期下载者

相关文件


收藏者