Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
This document provides a brief description of the DHCP Client Status OpEN APIs. It provides the following services:
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
dhcp_client_example.c is a sample application that demonstrates the use of the DHCP Client Status OpEN API. dhcp_client_example is started from the command line and exercises all the DHCP Client Status OpEN APIs one by one.
# ./dhcp_client_example
please enter internal interface number <internal interface="" number>=""> ICOS version = 1.25.18.42 Get the DHCP Client IP Address <IP address>=""> for interface number: <internal interface="" number>=""> SUCCESS Get the DHCP Client subnet mask <subnet mask>=""> for interface number: <internal interface="" number>=""> SUCCESS Get the DHCP Server IP Address <IP address>=""> for interface number: <internal interface="" number>=""> SUCCESS Get the DHCP Options returned by the DHCP Server: SUCCESS
CLI Command | OpEN API Reference ----------— | --------------—
(console)#
show dhcp lease | openapiDhcpClientIPAddrGet (console)#
show dhcp lease | openapiDhcpClientNetMaskGet (console)#
show dhcp lease | openapiDhcpClientDhcpServerIPAddrGet