|
Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.11.1.2
|
This document provides a brief description of the IP4DHCPClient 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.
ip4dhcpclient_example.c is a sample application that demonstrates the use of OpEN's IP4DHCPClient APIs. ip4dhcpclient_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.
| CLI Command | OpEN API Reference |
|---|---|
| (Privileged exec Mode)# show dhcp client vendor-id-option | openapiDhcpVendorClassOptionAdminModeGet() |
| (localhost)(Interface vlan 10)# dhcp client vendor-id-option | openapiDhcpVendorClassOptionAdminModeSet() |
| (Privileged exec Mode)# show dhcp client vendor-id-option | openapiDhcpVendorClassOptionStringGet() |
| (localhost)(Interface vlan 10)# dhcp client vendor-id-option-string <string> | openapiDhcpVendorClassOptionStringSet() |
| (Privileged exec Mode)# show dhcp lease interface out-of-band | openapiIpDhcpClientDhcpServerIntfIPAddressGet() |
| (Privileged exec Mode)# show dhcp lease interface out-of-band | openapiIpDhcpClientIntfStateGet() |
| (Privileged exec Mode)# show dhcp lease interface out-of-band | openapiIpDhcpClientTransactionIntfIdGet() |
| (Privileged exec Mode)# show dhcp lease interface out-of-band | openapiIpDhcpClientLeaseTimeIntfInfoGet() |
| (Privileged exec Mode)# show dhcp lease interface out-of-band | openapiIpDhcpClientIntfRetryCountGet() |
| (Privileged exec Mode)# show network show serviceport show ip interface <u/s/p> | openapiIpDhcpClientIdGeneratedGet() |
| (Privileged exec Mode)# show ip dhcp client statistics [interface <u/s/p>] | openapiDhcpClientStatsGet() |
| (Privileged exec Mode)# clear ip dhcp client statistics [interface <u/s/p>] | openapiDhcpClientStatsClear() |