1dhcpinfo(1)                      User Commands                     dhcpinfo(1)
2
3
4

NAME

6       dhcpinfo - display values of parameters received through DHCP
7

SYNOPSIS

9       dhcpinfo [-c] [-i interface] [-n limit] [-v 4|6] code
10
11
12       dhcpinfo [-c] [-i interface] [-n limit] [-v 4|6] identifier
13
14

DESCRIPTION

16       The dhcpinfo utility prints the DHCP-supplied value(s) of the parameter
17       requested on the command line. The parameter can be  identified  either
18       by its numeric code in the DHCP specification, or by its mnemonic iden‐
19       tifier, as listed in dhcp_inittab(4). This command is  intended  to  be
20       used  in command substitutions in the shell scripts invoked by init(1M)
21       at system boot. It first contacts the DHCP client daemon at system boot
22       or  in  event  scripts as described in dhcpagent(1M). It first contacts
23       the DHCP client daemon dhcpagent(1M) to verify that DHCP  has  success‐
24       fully  completed  on  the requested interface. If DHCP has successfully
25       completed on the requested interface, dhcpinfo retrieves the values for
26       the requested parameter. Parameter values echoed by dhcpinfo should not
27       be used without checking its exit status. See exit(1).
28
29
30       See dhcp_inittab(4) for the list of mnemonic identifier codes  for  all
31       DHCP parameters. See RFC 2132, DHCP Options and BOOTP Vendor Extensions
32       for more details on DHCPv4 parameters, and RFC 3315, Dynamic Host  Con‐
33       figuration  Protocol  for  IPv6  (DHCPv6),  for  more details on DHCPv6
34       parameters.
35
36   Output Format
37       The output from dhcpinfo consists of one or more lines of  ASCII  text;
38       the format of the output depends upon the requested parameter. The num‐
39       ber of values returned per line and the total number  of  lines  output
40       for a given parameter are determined by the parameter's granularity and
41       maximum values, respectively, as defined by dhcp_inittab(4).
42
43
44       The format of each individual value is determined by the data  type  of
45       the  option,  as determined by dhcp_inittab(4). The possible data types
46       and their formats are listed below:
47
48
49
50
51          Data Type                 Format               dhcp_inittab(4) type
52       Unsigned Number   One or more decimal digits      UNUMBER8, UNUMBER16,
53                                                         UNUMBER32, UNUMBER64
54       Signed Number     One  or  more decimal digits,   SNUMBER8, SNUMBER16,
55                         optionally  preceded   by   a   SNUMBER32, SNUMBER64
56                         minus sign
57       IP Address        Dotted-decimal notation         IP
58       IPv6 Address      Colon-separated notation        IPv6
59       Octet             The string 0x followed  by  a   OCTET
60                         two-digit hexadecimal value
61       String            Zero or more ASCII characters   ASCII
62       DUID              DHCP Unique Identifier text     DUID
63       Domain Name       Standard dot-separated domain   DOMAIN
64                         name, RFC 1035 format
65
66

OPTIONS

68       The following options are supported:
69
70       -c              Displays the output in a canonical format. This  format
71                       is  identical to the OCTET format with a granularity of
72                       1.
73
74
75       -i interface    Specifies the interface to  retrieve  values  for  DHCP
76                       parameters  from.  If this option is not specified, the
77                       primary interface is used.
78
79                       If a primary interface has not been  selected  for  the
80                       system  by  ifconfig(1M) or for this command by -i, the
81                       system automatically selects an interface  to  consider
82                       as  primary  for  the  current  command invocation. The
83                       selection chooses the interface whose name sorts  lexi‐
84                       cally  first,  and  that  has DHCP parameters attached.
85                       This selection does not affect system state. Use ifcon‐
86                       fig(1M) to set a primary interface.
87
88                       The recommended practice in the dhcpagent(1M) eventhook
89                       scripts is to specify the desired  interface  with  -i,
90                       rather than relying on primary selection.
91
92                       For  DHCPv6, the interface name used should be the name
93                       of the physical  interface,  not  one  of  the  logical
94                       interfaces created by dhcpagent.
95
96
97       -n limit        Limits the list of values displayed to limit lines.
98
99
100       -v4 | 6         Specifies  the DHCP version to query. Use -v4for DHCPv4
101                       and -v6 for DHCPv6.
102
103

OPERANDS

105       The following operands are supported:
106
107       code          Numeric code for the requested DHCP parameter, as defined
108                     by  the  DHCP specification. Vendor options are specified
109                     by adding 256 to the actual vendor code for  DHCPv4,  and
110                     65536 for DHCPv6.
111
112
113       identifier    Mnemonic  symbol  for  the  requested  DHCP parameter, as
114                     listed in dhcp_inittab(4).
115
116

EXIT STATUS

118       The following exit values are returned:
119
120       0    Successful operation.
121
122
123       2    The operation was not successful. The DHCP client daemon might not
124            be  running,  the  interface might have failed to configure, or no
125            satisfactory DHCP responses were received.
126
127
128       3    Bad arguments.
129
130
131       4    The operation timed out.
132
133
134       6    System error (should never occur).
135
136

ATTRIBUTES

138       See attributes(5) for descriptions of the following attributes:
139
140
141
142
143       ┌─────────────────────────────┬─────────────────────────────┐
144       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
145       ├─────────────────────────────┼─────────────────────────────┤
146       │Availability                 │SUNWcsr                      │
147       ├─────────────────────────────┼─────────────────────────────┤
148       │Interface Stability          │Committed                    │
149       └─────────────────────────────┴─────────────────────────────┘
150

SEE ALSO

152       dhcpagent(1M), ifconfig(1M), init(1M), dhcp_inittab(4), attributes(5)
153
154
155       Alexander, S., and R. Droms, RFC 2132, DHCP Options  and  BOOTP  Vendor
156       Extensions, Silicon Graphics, Inc., Bucknell University, March 1997.
157
158
159       Droms,  R.  ,  RFC  3315,  Dynamic Host Configuration Protocol for IPv6
160       (DHCPv6), Cisco Systems, July 2003.
161
162
163       Mockapetris, P.V. , RFC 1035, Domain names - implementation and  speci‐
164       fication, ISI, November 1987.
165
166
167
168SunOS 5.11                        15 May 2009                      dhcpinfo(1)
Impressum