Copyright (c) 1992-1996 Competitive Automation, Inc.
Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
Copyright (c) 2020 Peter Tribble
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
dhcpinfo [-c] [-i interface] [-n limit] [-v 4|6] code
dhcpinfo [-c] [-i interface] [-n limit] [-v 4|6] identifier
See dhcp_inittab(5) for the list of mnemonic identifier codes for all DHCP parameters. See RFC 2132, DHCP Options and BOOTP Vendor Extensions for more details on DHCPv4 parameters, and RFC 3315, Dynamic Host Configuration Protocol for IPv6 (DHCPv6), for more details on DHCPv6 parameters.
The format of each individual value is determined by the data type of the option, as determined by dhcp_inittab(5). The possible data types and their formats are listed below:
Data Type Format dhcp_inittab(5) type |
Unsigned Number One or more decimal digits |
UNUMBER8, UNUMBER16, UNUMBER32, UNUMBER64 |
Signed Number |
One or more decimal digits, optionally preceded by a minus sign |
SNUMBER8, SNUMBER16, SNUMBER32, SNUMBER64 |
IP Address Dotted-decimal notation IP |
IPv6 Address Colon-separated notation IPv6 |
Octet |
The string 0x followed by a two-digit hexadecimal value |
OCTET |
String Zero or more ASCII characters ASCII |
DUID DHCP Unique Identifier text DUID |
Domain Name |
Standard dot-separated domain name, RFC 1035 format |
DOMAIN |
Displays the output in a canonical format. This format is identical to the OCTET format with a granularity of 1.
Specifies the interface to retrieve values for DHCP parameters from. If this option is not specified, the primary interface is used. If a primary interface has not been selected for the system by ifconfig(8) or for this command by -i, the system automatically selects an interface to consider as primary for the current command invocation. The selection chooses the interface whose name sorts lexically first, and that has DHCP parameters attached. This selection does not affect system state. Use ifconfig(8) to set a primary interface. The recommended practice in the dhcpagent(8) eventhook scripts is to specify the desired interface with -i, rather than relying on primary selection. For DHCPv6, the interface name used should be the name of the physical interface, not one of the logical interfaces created by dhcpagent.
Limits the list of values displayed to limit lines.
Specifies the DHCP version to query. Use -v 4 for DHCPv4 and -v 6 for DHCPv6.
Numeric code for the requested DHCP parameter, as defined by the DHCP specification. Vendor options are specified by adding 256 to the actual vendor code for DHCPv4, and 65536 for DHCPv6.
Mnemonic symbol for the requested DHCP parameter, as listed in dhcp_inittab(5).
Successful operation.
The operation was not successful. The DHCP client daemon might not be running, the interface might have failed to configure, or no satisfactory DHCP responses were received.
Bad arguments.
The operation timed out.
System error (should never occur).
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
Alexander, S., and R. Droms, RFC 2132, DHCP Options and BOOTP Vendor Extensions, Silicon Graphics, Inc., Bucknell University, March 1997.
Droms, R. , RFC 3315, Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Cisco Systems, July 2003.
Mockapetris, P.V. , RFC 1035, Domain names - implementation and specification, ISI, November 1987.