dhcpinfo(1)
NAME
dhcpinfo − display value of parameters received through DHCP
SYNOPSIS
dhcpinfo [ −i interface ] [ −n limit ] tag | identifier | name
DESCRIPTION
dhcpinfo prints the value(s) of the parameter requested on the command line as supplied by the DHCP protocol. If the DHCP parameter implies more than one value (that is, a list of gateways), the values are printed separated by newline characters. The parameter may be identified either by its numeric value in the DHCP protocol, or by its mnemonic identifier, or by its long name. It is intended to be used in command substitutions in the shell scripts invoked by init(1M) at system boot. It first contacts the DHCP agent daemon dhcpagent(1M) to verify that DHCP has successfully completed. When a particular interface is given with the −i option, the daemon verifies successful DHCP configuration of that specific interface; otherwise, the client verifies that the interface marked as the "primary" has successfully configured, and supplies the name of that interface back to dhcpinfo. Parameter values echoed by dhcpinfo should not be used without checking its exit status. (See EXIT STATUS.)
See dhcptags(4) for the list of mnemonic identifier codes and names of all DHCP parameters. See DHCP Options and BOOTP Vendor Extensions (RFC 2132) for more detail.
OPTIONS
−i interface In general, it is not necessary to use this option, except on hardware with two or more interfaces configurable by DHCP, and for a parameter that is interface specific.
−n limit When the tag is one with a list of values, this option limits the number printed.
OPERANDS
tag Numeric value of the parameter (or option) returned to the client by the DHCP protocol.
identifier Mnemonic symbol of the parameter returned to the client by the DHCP protocol.
name Long name of the parameter returned to the client by the DHCP protocol.
EXIT STATUS
Exit codes are as follows:
0 Successful operation.
2 DHCP was not successful. The DHCP agent may not be running, the interface might have failed to configure, or no satisfactory DHCP responses were received.
3 Bad arguments.
4 A timer was set, using wait (see ifconfig(1M)), and the interface had not configured before it expired.
6 Some system error (should never occur).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| Availability | SUNWcsr |
SEE ALSO
dhcpagent(1M), ifconfig(1M), init(1M), dhcptags(4), attributes(5)
Alexander, S., and R. Droms, DHCP Options and BOOTP Vendor Extensions, RFC 2132, Silicon Graphics, Inc., Bucknell University, March 1997.
SunOS 5.6 — Last change: 9 May 1997