line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/bin/false |
2
|
|
|
|
|
|
|
# Net::DHCP::Constants.pm |
3
|
|
|
|
|
|
|
# Author: Dean Hamstead, Stephan Hadinger |
4
|
13
|
|
|
13
|
|
23828
|
use strict; |
|
13
|
|
|
|
|
31
|
|
|
13
|
|
|
|
|
325
|
|
5
|
13
|
|
|
13
|
|
62
|
use warnings; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
318
|
|
6
|
13
|
|
|
13
|
|
122
|
use 5.8.0; |
|
13
|
|
|
|
|
40
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Net::DHCP::Constants; |
9
|
|
|
|
|
|
|
$Net::DHCP::Constants::VERSION = '0.7_004'; |
10
|
|
|
|
|
|
|
# standard module declaration |
11
|
|
|
|
|
|
|
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS ); |
12
|
13
|
|
|
13
|
|
61
|
use Exporter; |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
4852
|
|
13
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
@EXPORT = qw(MAGIC_COOKIE); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Constants |
18
|
|
|
|
|
|
|
our ( %DHO_CODES, %REV_DHO_CODES ); |
19
|
|
|
|
|
|
|
our ( %DHCP_MESSAGE, %REV_DHCP_MESSAGE ); |
20
|
|
|
|
|
|
|
our ( %BOOTP_CODES, %REV_BOOTP_CODES ); |
21
|
|
|
|
|
|
|
our ( %HTYPE_CODES, %REV_HTYPE_CODES ); |
22
|
|
|
|
|
|
|
our ( %NWIP_CODES, %REV_NWIP_CODES ); |
23
|
|
|
|
|
|
|
our ( %CCC_CODES, %REV_CCC_CODES ); |
24
|
|
|
|
|
|
|
our ( %GEOCONF_CODES, %REV_GEOCONF_CODES ); |
25
|
|
|
|
|
|
|
our ( %RELAYAGENT_CODES, %REV_RELAYAGENT_CODES ); |
26
|
|
|
|
|
|
|
our ( %SUBOPTION_CODES, %REV_SUBOPTION_CODES ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
%EXPORT_TAGS = ( |
29
|
|
|
|
|
|
|
dho_codes => [ keys %DHO_CODES ], |
30
|
|
|
|
|
|
|
dhcp_message => [ keys %DHCP_MESSAGE ], |
31
|
|
|
|
|
|
|
bootp_codes => [ keys %BOOTP_CODES ], |
32
|
|
|
|
|
|
|
htype_codes => [ keys %HTYPE_CODES ], |
33
|
|
|
|
|
|
|
nwip_codes => [ keys %NWIP_CODES ], |
34
|
|
|
|
|
|
|
ccc_codes => [ keys %CCC_CODES ], |
35
|
|
|
|
|
|
|
geoconf_codes => [ keys %GEOCONF_CODES ], |
36
|
|
|
|
|
|
|
ra_codes => [ keys %RELAYAGENT_CODES ], |
37
|
|
|
|
|
|
|
dhcp_hashes => [ |
38
|
|
|
|
|
|
|
qw( |
39
|
|
|
|
|
|
|
%DHO_CODES %REV_DHO_CODES |
40
|
|
|
|
|
|
|
%DHCP_MESSAGE %REV_DHCP_MESSAGE |
41
|
|
|
|
|
|
|
%BOOTP_CODES %REV_BOOTP_CODES |
42
|
|
|
|
|
|
|
%NWIP_CODES %REV_NWIP_CODES |
43
|
|
|
|
|
|
|
%CCC_CODES %REV_CCC_CODES |
44
|
|
|
|
|
|
|
%HTYPE_CODES %REV_HTYPE_CODES |
45
|
|
|
|
|
|
|
%GEOCONF_CODES %REV_GEOCONF_CODES |
46
|
|
|
|
|
|
|
%RELAYAGENT_CODES %REV_RELAYAGENT_CODES |
47
|
|
|
|
|
|
|
%SUBOPTION_CODES %REV_SUBOPTION_CODES |
48
|
|
|
|
|
|
|
) |
49
|
|
|
|
|
|
|
], |
50
|
|
|
|
|
|
|
dhcp_other => [ |
51
|
|
|
|
|
|
|
qw(MAGIC_COOKIE DHCP_UDP_OVERHEAD DHCP_MAX_MTU BOOTP_MIN_LEN BOOTP_ABSOLUTE_MIN_LEN DHCP_MIN_LEN) |
52
|
|
|
|
|
|
|
] |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
@EXPORT_OK = qw( |
56
|
|
|
|
|
|
|
%DHO_CODES %REV_DHO_CODES |
57
|
|
|
|
|
|
|
%DHCP_MESSAGE %REV_DHCP_MESSAGE |
58
|
|
|
|
|
|
|
%BOOTP_CODES %REV_BOOTP_CODES |
59
|
|
|
|
|
|
|
%NWIP_CODES %REV_NWIP_CODES |
60
|
|
|
|
|
|
|
%HTYPE_CODES %REV_HTYPE_CODES |
61
|
|
|
|
|
|
|
%CCC_CODES %REV_CCC_CODES |
62
|
|
|
|
|
|
|
%DHO_FORMATS |
63
|
|
|
|
|
|
|
%GEOCONF_CODES %REV_GEOCONF_CODES |
64
|
|
|
|
|
|
|
%RELAYAGENT_CODES %REV_RELAYAGENT_CODES |
65
|
|
|
|
|
|
|
%SUBOPTION_CODES %REV_SUBOPTION_CODES |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
Exporter::export_tags('dho_codes'); |
69
|
|
|
|
|
|
|
Exporter::export_tags('dhcp_message'); |
70
|
|
|
|
|
|
|
Exporter::export_tags('bootp_codes'); |
71
|
|
|
|
|
|
|
Exporter::export_tags('htype_codes'); |
72
|
|
|
|
|
|
|
Exporter::export_tags('nwip_codes'); |
73
|
|
|
|
|
|
|
Exporter::export_tags('ccc_codes'); |
74
|
|
|
|
|
|
|
Exporter::export_tags('geoconf_codes'); |
75
|
|
|
|
|
|
|
Exporter::export_ok_tags('dhcp_other'); |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# MAGIC_COOKIE for DHCP (otherwise it is BOOTP) |
78
|
13
|
|
|
13
|
|
71
|
use constant MAGIC_COOKIE => "\x63\x82\x53\x63"; |
|
13
|
|
|
|
|
22
|
|
|
13
|
|
|
|
|
1070
|
|
79
|
|
|
|
|
|
|
|
80
|
13
|
|
|
13
|
|
59
|
use constant DHCP_UDP_OVERHEAD => ( 14 + 20 + 8 ); # Ethernet + IP + UDP |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
631
|
|
81
|
13
|
|
|
13
|
|
54
|
use constant DHCP_MAX_MTU => 1500; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
565
|
|
82
|
13
|
|
|
13
|
|
64
|
use constant BOOTP_ABSOLUTE_MIN_LEN => 236; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
619
|
|
83
|
13
|
|
|
13
|
|
60
|
use constant BOOTP_MIN_LEN => 300; |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
561
|
|
84
|
13
|
|
|
13
|
|
71
|
use constant DHCP_MIN_LEN => 548; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
7445
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
BEGIN { |
87
|
13
|
|
|
13
|
|
54
|
%BOOTP_CODES = ( |
88
|
|
|
|
|
|
|
'BOOTREQUEST' => 1, |
89
|
|
|
|
|
|
|
'BOOTREPLY' => 2, |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
13
|
|
|
|
|
55
|
%HTYPE_CODES = ( |
93
|
|
|
|
|
|
|
'HTYPE_ETHER' => 1, |
94
|
|
|
|
|
|
|
'HTYPE_IEEE802' => 6, |
95
|
|
|
|
|
|
|
'HTYPE_FDDI' => 8, |
96
|
|
|
|
|
|
|
'HTYPE_INFINIBAND' => 32, |
97
|
|
|
|
|
|
|
); |
98
|
|
|
|
|
|
|
|
99
|
13
|
|
|
|
|
1876
|
%DHO_CODES = ( # RFC 2132 |
100
|
|
|
|
|
|
|
'DHO_PAD' => 0, |
101
|
|
|
|
|
|
|
'DHO_SUBNET_MASK' => 1, |
102
|
|
|
|
|
|
|
'DHO_TIME_OFFSET' => 2, |
103
|
|
|
|
|
|
|
'DHO_ROUTERS' => 3, |
104
|
|
|
|
|
|
|
'DHO_TIME_SERVERS' => 4, |
105
|
|
|
|
|
|
|
'DHO_NAME_SERVERS' => 5, |
106
|
|
|
|
|
|
|
'DHO_DOMAIN_NAME_SERVERS' => 6, |
107
|
|
|
|
|
|
|
'DHO_LOG_SERVERS' => 7, |
108
|
|
|
|
|
|
|
'DHO_COOKIE_SERVERS' => 8, |
109
|
|
|
|
|
|
|
'DHO_LPR_SERVERS' => 9, |
110
|
|
|
|
|
|
|
'DHO_IMPRESS_SERVERS' => 10, |
111
|
|
|
|
|
|
|
'DHO_RESOURCE_LOCATION_SERVERS' => 11, |
112
|
|
|
|
|
|
|
'DHO_HOST_NAME' => 12, |
113
|
|
|
|
|
|
|
'DHO_BOOT_SIZE' => 13, |
114
|
|
|
|
|
|
|
'DHO_MERIT_DUMP' => 14, |
115
|
|
|
|
|
|
|
'DHO_DOMAIN_NAME' => 15, |
116
|
|
|
|
|
|
|
'DHO_SWAP_SERVER' => 16, |
117
|
|
|
|
|
|
|
'DHO_ROOT_PATH' => 17, |
118
|
|
|
|
|
|
|
'DHO_EXTENSIONS_PATH' => 18, |
119
|
|
|
|
|
|
|
'DHO_IP_FORWARDING' => 19, |
120
|
|
|
|
|
|
|
'DHO_NON_LOCAL_SOURCE_ROUTING' => 20, |
121
|
|
|
|
|
|
|
'DHO_POLICY_FILTER' => 21, |
122
|
|
|
|
|
|
|
'DHO_MAX_DGRAM_REASSEMBLY' => 22, |
123
|
|
|
|
|
|
|
'DHO_DEFAULT_IP_TTL' => 23, |
124
|
|
|
|
|
|
|
'DHO_PATH_MTU_AGING_TIMEOUT' => 24, |
125
|
|
|
|
|
|
|
'DHO_PATH_MTU_PLATEAU_TABLE' => 25, |
126
|
|
|
|
|
|
|
'DHO_INTERFACE_MTU' => 26, |
127
|
|
|
|
|
|
|
'DHO_ALL_SUBNETS_LOCAL' => 27, |
128
|
|
|
|
|
|
|
'DHO_BROADCAST_ADDRESS' => 28, |
129
|
|
|
|
|
|
|
'DHO_PERFORM_MASK_DISCOVERY' => 29, |
130
|
|
|
|
|
|
|
'DHO_MASK_SUPPLIER' => 30, |
131
|
|
|
|
|
|
|
'DHO_ROUTER_DISCOVERY' => 31, |
132
|
|
|
|
|
|
|
'DHO_ROUTER_SOLICITATION_ADDRESS' => 32, |
133
|
|
|
|
|
|
|
'DHO_STATIC_ROUTES' => 33, |
134
|
|
|
|
|
|
|
'DHO_TRAILER_ENCAPSULATION' => 34, |
135
|
|
|
|
|
|
|
'DHO_ARP_CACHE_TIMEOUT' => 35, |
136
|
|
|
|
|
|
|
'DHO_IEEE802_3_ENCAPSULATION' => 36, |
137
|
|
|
|
|
|
|
'DHO_DEFAULT_TCP_TTL' => 37, |
138
|
|
|
|
|
|
|
'DHO_TCP_KEEPALIVE_INTERVAL' => 38, |
139
|
|
|
|
|
|
|
'DHO_TCP_KEEPALIVE_GARBAGE' => 39, |
140
|
|
|
|
|
|
|
'DHO_NIS_DOMAIN' => 40, |
141
|
|
|
|
|
|
|
'DHO_NIS_SERVERS' => 41, |
142
|
|
|
|
|
|
|
'DHO_NTP_SERVERS' => 42, |
143
|
|
|
|
|
|
|
'DHO_VENDOR_ENCAPSULATED_OPTIONS' => 43, |
144
|
|
|
|
|
|
|
'DHO_NETBIOS_NAME_SERVERS' => 44, |
145
|
|
|
|
|
|
|
'DHO_NETBIOS_DD_SERVER' => 45, |
146
|
|
|
|
|
|
|
'DHO_NETBIOS_NODE_TYPE' => 46, |
147
|
|
|
|
|
|
|
'DHO_NETBIOS_SCOPE' => 47, |
148
|
|
|
|
|
|
|
'DHO_FONT_SERVERS' => 48, |
149
|
|
|
|
|
|
|
'DHO_X_DISPLAY_MANAGER' => 49, |
150
|
|
|
|
|
|
|
'DHO_DHCP_REQUESTED_ADDRESS' => 50, |
151
|
|
|
|
|
|
|
'DHO_DHCP_LEASE_TIME' => 51, |
152
|
|
|
|
|
|
|
'DHO_DHCP_OPTION_OVERLOAD' => 52, |
153
|
|
|
|
|
|
|
'DHO_DHCP_MESSAGE_TYPE' => 53, |
154
|
|
|
|
|
|
|
'DHO_DHCP_SERVER_IDENTIFIER' => 54, |
155
|
|
|
|
|
|
|
'DHO_DHCP_PARAMETER_REQUEST_LIST' => 55, |
156
|
|
|
|
|
|
|
'DHO_DHCP_MESSAGE' => 56, |
157
|
|
|
|
|
|
|
'DHO_DHCP_MAX_MESSAGE_SIZE' => 57, |
158
|
|
|
|
|
|
|
'DHO_DHCP_RENEWAL_TIME' => 58, |
159
|
|
|
|
|
|
|
'DHO_DHCP_REBINDING_TIME' => 59, |
160
|
|
|
|
|
|
|
'DHO_VENDOR_CLASS_IDENTIFIER' => 60, |
161
|
|
|
|
|
|
|
'DHO_DHCP_CLIENT_IDENTIFIER' => 61, |
162
|
|
|
|
|
|
|
'DHO_NWIP_DOMAIN_NAME' => 62, |
163
|
|
|
|
|
|
|
'DHO_NWIP_SUBOPTIONS' => 63, |
164
|
|
|
|
|
|
|
'DHO_NISV3_DOMAIN' => 64, |
165
|
|
|
|
|
|
|
'DHO_NISV3_SERVER' => 65, |
166
|
|
|
|
|
|
|
'DHO_TFTP_SERVER' => 66, # actually named 'server name' by IANA |
167
|
|
|
|
|
|
|
'DHO_BOOTFILE' => 67, |
168
|
|
|
|
|
|
|
'DHO_MOBILE_IP_HOME_AGENT' => 68, |
169
|
|
|
|
|
|
|
'DHO_SMTP_SERVER' => 69, |
170
|
|
|
|
|
|
|
'DHO_POP3_SERVER' => 70, |
171
|
|
|
|
|
|
|
'DHO_NNTP_SERVER' => 71, |
172
|
|
|
|
|
|
|
'DHO_WWW_SERVER' => 72, |
173
|
|
|
|
|
|
|
'DHO_FINGER_SERVER' => 73, |
174
|
|
|
|
|
|
|
'DHO_IRC_SERVER' => 74, |
175
|
|
|
|
|
|
|
'DHO_STREETTALK_SERVER' => 75, |
176
|
|
|
|
|
|
|
'DHO_STDA_SERVER' => 76, |
177
|
|
|
|
|
|
|
'DHO_USER_CLASS' => 77, |
178
|
|
|
|
|
|
|
'DHO_DIRECTORY_AGENT' => 78, |
179
|
|
|
|
|
|
|
'DHO_SERVICE_SCOPE' => 79, |
180
|
|
|
|
|
|
|
'DHO_RAPID_COMMIT' => 80, |
181
|
|
|
|
|
|
|
'DHO_FQDN' => 81, |
182
|
|
|
|
|
|
|
'DHO_DHCP_AGENT_OPTIONS' => 82, |
183
|
|
|
|
|
|
|
'DHO_ISNS' => 83, |
184
|
|
|
|
|
|
|
'DHO_NDS_SERVERS' => 85, |
185
|
|
|
|
|
|
|
'DHO_NDS_TREE_NAME' => 86, |
186
|
|
|
|
|
|
|
'DHO_NDS_CONTEXT' => 87, |
187
|
|
|
|
|
|
|
'DHO_BCMCS_CONTROLLER_DOMAIN_NAME_LIST' => 88, |
188
|
|
|
|
|
|
|
'DHO_BCMCS_CONTROLLER_IPV4_ADDRESS' => 89, |
189
|
|
|
|
|
|
|
'DHO_AUTHENTICATION' => 90, |
190
|
|
|
|
|
|
|
'DHO_CLIENT_LAST_TRANSACTION_TIME' => 91, |
191
|
|
|
|
|
|
|
'DHO_ASSOCIATED_IP' => 92, |
192
|
|
|
|
|
|
|
'DHO_CLIENT_SYSTEM' => 93, |
193
|
|
|
|
|
|
|
'DHO_CLIENT_NDI' => 94, |
194
|
|
|
|
|
|
|
'DHO_LDAP' => 95, |
195
|
|
|
|
|
|
|
'DHO_UUID_GUID' => 97, |
196
|
|
|
|
|
|
|
'DHO_USER_AUTHENTICATION_PROTOCOL' => 98, |
197
|
|
|
|
|
|
|
'DHO_GEOCONF_CIVIC' => 99, |
198
|
|
|
|
|
|
|
'DHO_PCODE' => 100, |
199
|
|
|
|
|
|
|
'DHO_TCODE' => 101, |
200
|
|
|
|
|
|
|
'DHO_NETINFO_ADDRESS' => 112, |
201
|
|
|
|
|
|
|
'DHO_NETINFO_TAG' => 113, |
202
|
|
|
|
|
|
|
'DHO_URL' => 114, |
203
|
|
|
|
|
|
|
'DHO_AUTO_CONFIGURE' => 116, |
204
|
|
|
|
|
|
|
'DHO_NAME_SERVICE_SEARCH' => 117, |
205
|
|
|
|
|
|
|
'DHO_SUBNET_SELECTION' => 118, |
206
|
|
|
|
|
|
|
'DHO_DOMAIN_SEARCH' => 119, |
207
|
|
|
|
|
|
|
'DHO_SIP_SERVERS' => 120, |
208
|
|
|
|
|
|
|
'DHO_CLASSLESS_STATIC_ROUTE' => 121, |
209
|
|
|
|
|
|
|
'DHO_CCC' => 122, |
210
|
|
|
|
|
|
|
'DHO_GEOCONF' => 123, |
211
|
|
|
|
|
|
|
'DHO_VI_VENDOR_CLASS' => 124, |
212
|
|
|
|
|
|
|
'DHO_VI_VENDOR_SPECIFIC_INFOMATION' => 125, |
213
|
|
|
|
|
|
|
'DHO_DOCSIS_FULL_SECURITY_SERVER_ADDRESS' => 128, |
214
|
|
|
|
|
|
|
'DHO_TFTP_SERVER_IPPHONE' => 128, |
215
|
|
|
|
|
|
|
'DHO_ETHERBOOT_SIGNATURE' => 128, |
216
|
|
|
|
|
|
|
'DHO_CALL_SERVER_ADDRESS' => 129, |
217
|
|
|
|
|
|
|
'DHO_KERNEL_OPTIONS' => 129, |
218
|
|
|
|
|
|
|
'DHO_DISCRIMINATION_STRING' => 130, |
219
|
|
|
|
|
|
|
'DHO_ETHERNET_INTERFACE' => 130, |
220
|
|
|
|
|
|
|
'DHO_REMOTE_STATISTICS_SERVER' => 131, |
221
|
|
|
|
|
|
|
'DHO_VLAN_ID' => 132, |
222
|
|
|
|
|
|
|
'DHO_L2_PRIORITY' => 133, |
223
|
|
|
|
|
|
|
'DHO_DSCP' => 134, |
224
|
|
|
|
|
|
|
'DHO_PXE' => 135, |
225
|
|
|
|
|
|
|
'DHO_HTTP_PROXY_FORPHONES' => 135, |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
'DHO_OPTION_PANA_AGENT' => 136, |
228
|
|
|
|
|
|
|
'DHO_OPTION_PANA_V4_LOST' => 137, |
229
|
|
|
|
|
|
|
'DHO_OPTION_CAPWAP_AC_V4' => 138, |
230
|
|
|
|
|
|
|
'DHO_OPTION_IPV4_ADDRESS_MOS' => 139, |
231
|
|
|
|
|
|
|
'DHO_OPTION_IPV4_FQDN_MOS' => 140, |
232
|
|
|
|
|
|
|
'DHO_SIP_UA_CONFIGURATION_SERVICE_DOMAINS' => 141, |
233
|
|
|
|
|
|
|
'DHO_GRUB_CONF_PATH' => 150, |
234
|
|
|
|
|
|
|
'DHO_TFTP_SERVER_ADDRESS' => 150, # not to be confused with 66 |
235
|
|
|
|
|
|
|
'DHO_ETHERBOOT' => 150, |
236
|
|
|
|
|
|
|
'DHO_IP_TELEPHONE' => 176, |
237
|
|
|
|
|
|
|
'DHO_PACKETCABLE_DEPRECATED' => 177, |
238
|
|
|
|
|
|
|
'DHO_ETHERBOOT_TENTATIVE' => 177, |
239
|
|
|
|
|
|
|
'DHO_PXELINUX_MAGIC' => 208, |
240
|
|
|
|
|
|
|
'DHO_CONFIGURATION_FILE' => 209, |
241
|
|
|
|
|
|
|
'DHO_PATH_PREFIX' => 210, |
242
|
|
|
|
|
|
|
'DHO_REBOOT_TIME' => 211, |
243
|
|
|
|
|
|
|
'DHO_OPTION_6RD' => 212, |
244
|
|
|
|
|
|
|
'DHO_OPTION_V4_ACCESS_DOMAIN' => 213, |
245
|
|
|
|
|
|
|
'DHO_SUBNET_ALLOCATION' => 220, |
246
|
|
|
|
|
|
|
'DHO_VIRTUAL_SUBNET' => 221, |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
'DHO_CLASSLESS_STATIC_ROUTE_MS' => 249, |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
'DHO_END' => 255 |
251
|
|
|
|
|
|
|
); |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
# Type 53 codes... |
254
|
13
|
|
|
|
|
177
|
%DHCP_MESSAGE = ( |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
# RFC2132 |
257
|
|
|
|
|
|
|
'DHCPDISCOVER' => 1, |
258
|
|
|
|
|
|
|
'DHCPOFFER' => 2, |
259
|
|
|
|
|
|
|
'DHCPREQUEST' => 3, |
260
|
|
|
|
|
|
|
'DHCPDECLINE' => 4, |
261
|
|
|
|
|
|
|
'DHCPACK' => 5, |
262
|
|
|
|
|
|
|
'DHCPNAK' => 6, |
263
|
|
|
|
|
|
|
'DHCPRELEASE' => 7, |
264
|
|
|
|
|
|
|
'DHCPINFORM' => 8, |
265
|
|
|
|
|
|
|
'DHCPFORCERENEW' => 9, |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
# RFC4388 |
268
|
|
|
|
|
|
|
'DHCPLEASEQUERY' => 10 |
269
|
|
|
|
|
|
|
, # This is now ratified in RFC4388. If you have an old crappy CMTS you might need to change it with 13 |
270
|
|
|
|
|
|
|
'DHCPLEASEUNASSIGNED' => 11, |
271
|
|
|
|
|
|
|
'DHCPLEASEUNKNOWN' => 12, |
272
|
|
|
|
|
|
|
'DHCPLEASEACTIVE' => 13, |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
); |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
# Type 63 sub-option codes... |
277
|
13
|
|
|
|
|
189
|
%NWIP_CODES = ( |
278
|
|
|
|
|
|
|
'NWIP_DOES_NOT_EXIST' => 1, |
279
|
|
|
|
|
|
|
'NWIP_EXIST_IN_OPTIONS_AREA' => 2, |
280
|
|
|
|
|
|
|
'NWIP_EXIST_IN_SNAME_FILE' => 3, |
281
|
|
|
|
|
|
|
'NWIP_EXIST_BUT_TOO_BIG' => 4, |
282
|
|
|
|
|
|
|
'NWIP_NSQ_BROADCAST' => 5, |
283
|
|
|
|
|
|
|
'NWIP_PREFERRED_DSS' => 6, |
284
|
|
|
|
|
|
|
'NWIP_NEAREST_NWIP_SERVER' => 7, |
285
|
|
|
|
|
|
|
'NWIP_AUTORETRIES' => 8, |
286
|
|
|
|
|
|
|
'NWIP_AUTORETRY_SECS' => 9, |
287
|
|
|
|
|
|
|
'NWIP_1_1' => 10, |
288
|
|
|
|
|
|
|
'NWIP_PRIMARY_DSS' => 11, |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
#'Unassigned' => '12-255' |
291
|
|
|
|
|
|
|
); |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
# Type 122 sub option codes |
294
|
13
|
|
|
|
|
2084
|
%CCC_CODES = ( |
295
|
|
|
|
|
|
|
'CCC_PRIMARY_DHCP_SERVER' => 1, |
296
|
|
|
|
|
|
|
'CCC_SECONDARY_DHCP_SERVER' => 2, |
297
|
|
|
|
|
|
|
'CCC_PROVISIONING_SERVER' => 3, |
298
|
|
|
|
|
|
|
'CCC_AS_REQ_AS_REP_BACKOFFRETRY' => 4, |
299
|
|
|
|
|
|
|
'CCC_AP_REQ_AS_REP_BACKOFFRETRY' => 5, |
300
|
|
|
|
|
|
|
'CCC_KERBEROS_REALM' => 6, |
301
|
|
|
|
|
|
|
'CCC_TICKET_SERVER_UTILIZATION' => 7, |
302
|
|
|
|
|
|
|
'CCC_PROVISIONING_TIMER' => 8, |
303
|
|
|
|
|
|
|
'CCC_SECURITY_TICKET_CONTROL' => 9, |
304
|
|
|
|
|
|
|
'CCC_KDC_SERVER' => 10, |
305
|
|
|
|
|
|
|
); |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
# Type 123 sub option codes (there are more, but im not sure how to deal with them) |
308
|
13
|
|
|
|
|
1044
|
%GEOCONF_CODES = ( |
309
|
|
|
|
|
|
|
'GEO_METERS' => 1, |
310
|
|
|
|
|
|
|
'GEO_FLOORS' => 2, |
311
|
|
|
|
|
|
|
); |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
# Type 82 sub option codes |
314
|
13
|
|
|
|
|
453
|
%RELAYAGENT_CODES = ( |
315
|
|
|
|
|
|
|
'RAI_CIRCUIT_ID' => 1, |
316
|
|
|
|
|
|
|
'RAI_REMOTE_ID' => 2, |
317
|
|
|
|
|
|
|
'RAI_AGENT_ID' => 3, |
318
|
|
|
|
|
|
|
'RAI_DOCSIS_CLASS' => 4, |
319
|
|
|
|
|
|
|
'RAI_LINK_SELECTION' => 5, |
320
|
|
|
|
|
|
|
'RAI_SUBSCRIBER_ID' => 6, |
321
|
|
|
|
|
|
|
'RAI_RADIUS_ATTRIBUTES' => 7, |
322
|
|
|
|
|
|
|
'RAI_AUTHENTICATION' => 8, |
323
|
|
|
|
|
|
|
'RAI_VENDOR_INFO' => 9, |
324
|
|
|
|
|
|
|
'RAI_FLAGS' => 10, |
325
|
|
|
|
|
|
|
'RAI_SERVER_ID_OVERRIDE' => 11, |
326
|
|
|
|
|
|
|
'RAI_DHCPV4_VIRTUAL_SUBNET_SELECTION' => 151, # rfc 6607 |
327
|
|
|
|
|
|
|
'RAI_DHCPV4_VIRTUAL_SUBNET_SELECTION_CONTROL' => 152, # rfc 6607 |
328
|
|
|
|
|
|
|
); |
329
|
|
|
|
|
|
|
} |
330
|
|
|
|
|
|
|
|
331
|
13
|
|
|
13
|
|
64
|
use constant \%DHO_CODES; |
|
13
|
|
|
|
|
488
|
|
|
13
|
|
|
|
|
20007
|
|
332
|
|
|
|
|
|
|
%REV_DHO_CODES = reverse %DHO_CODES; |
333
|
|
|
|
|
|
|
|
334
|
13
|
|
|
13
|
|
63
|
use constant \%DHCP_MESSAGE; |
|
13
|
|
|
|
|
19
|
|
|
13
|
|
|
|
|
2049
|
|
335
|
|
|
|
|
|
|
%REV_DHCP_MESSAGE = reverse %DHCP_MESSAGE; |
336
|
|
|
|
|
|
|
|
337
|
13
|
|
|
13
|
|
60
|
use constant \%BOOTP_CODES; |
|
13
|
|
|
|
|
39
|
|
|
13
|
|
|
|
|
813
|
|
338
|
|
|
|
|
|
|
%REV_BOOTP_CODES = reverse %BOOTP_CODES; # for reverse lookup |
339
|
|
|
|
|
|
|
|
340
|
13
|
|
|
13
|
|
56
|
use constant \%HTYPE_CODES; |
|
13
|
|
|
|
|
17
|
|
|
13
|
|
|
|
|
1101
|
|
341
|
|
|
|
|
|
|
%REV_HTYPE_CODES = reverse %HTYPE_CODES; # for reverse lookup |
342
|
|
|
|
|
|
|
|
343
|
13
|
|
|
13
|
|
54
|
use constant \%NWIP_CODES; |
|
13
|
|
|
|
|
17
|
|
|
13
|
|
|
|
|
1758
|
|
344
|
|
|
|
|
|
|
%REV_NWIP_CODES = reverse %NWIP_CODES; |
345
|
|
|
|
|
|
|
|
346
|
13
|
|
|
13
|
|
57
|
use constant \%CCC_CODES; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
1682
|
|
347
|
|
|
|
|
|
|
%REV_CCC_CODES = reverse %CCC_CODES; |
348
|
|
|
|
|
|
|
|
349
|
13
|
|
|
13
|
|
58
|
use constant \%GEOCONF_CODES; |
|
13
|
|
|
|
|
17
|
|
|
13
|
|
|
|
|
859
|
|
350
|
|
|
|
|
|
|
%REV_GEOCONF_CODES = reverse %GEOCONF_CODES; |
351
|
|
|
|
|
|
|
|
352
|
13
|
|
|
13
|
|
54
|
use constant \%RELAYAGENT_CODES; |
|
13
|
|
|
|
|
19
|
|
|
13
|
|
|
|
|
8899
|
|
353
|
|
|
|
|
|
|
%REV_RELAYAGENT_CODES = reverse %RELAYAGENT_CODES; |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
# |
356
|
|
|
|
|
|
|
# Format of DHCP options : for pretty-printing |
357
|
|
|
|
|
|
|
# void : no parameter |
358
|
|
|
|
|
|
|
# inet : 4 bytes IP address |
359
|
|
|
|
|
|
|
# inets : list of 4 bytes IP addresses |
360
|
|
|
|
|
|
|
# inets2 : list of 4 bytes IP addresses pairs (multiple of 8 bytes) |
361
|
|
|
|
|
|
|
# int : 4 bytes integer |
362
|
|
|
|
|
|
|
# short : 2 bytes integer |
363
|
|
|
|
|
|
|
# shorts : list of 2 bytes integers |
364
|
|
|
|
|
|
|
# byte : 1 byte int |
365
|
|
|
|
|
|
|
# bytes : list of 1 byte code |
366
|
|
|
|
|
|
|
# string : char* (just kidding) |
367
|
|
|
|
|
|
|
# relays : DHCP sub-options (rfc 3046) |
368
|
|
|
|
|
|
|
# ids : client identifier : byte (htype) + string (chaddr) |
369
|
|
|
|
|
|
|
# csr : classless static routes (rfc 3442) |
370
|
|
|
|
|
|
|
# suboptions : hex encoded sub options |
371
|
|
|
|
|
|
|
# |
372
|
|
|
|
|
|
|
our %DHO_FORMATS = ( |
373
|
|
|
|
|
|
|
DHO_PAD() => 'void', |
374
|
|
|
|
|
|
|
DHO_SUBNET_MASK() => 'inet', |
375
|
|
|
|
|
|
|
DHO_TIME_OFFSET() => 'int', |
376
|
|
|
|
|
|
|
DHO_ROUTERS() => 'inets', |
377
|
|
|
|
|
|
|
DHO_TIME_SERVERS() => 'inets', |
378
|
|
|
|
|
|
|
DHO_NAME_SERVERS() => 'inets', |
379
|
|
|
|
|
|
|
DHO_DOMAIN_NAME_SERVERS() => 'inets', |
380
|
|
|
|
|
|
|
DHO_LOG_SERVERS() => 'inets', |
381
|
|
|
|
|
|
|
DHO_COOKIE_SERVERS() => 'inets', |
382
|
|
|
|
|
|
|
DHO_LPR_SERVERS() => 'inets', |
383
|
|
|
|
|
|
|
DHO_IMPRESS_SERVERS() => 'inets', |
384
|
|
|
|
|
|
|
DHO_RESOURCE_LOCATION_SERVERS() => 'inets', |
385
|
|
|
|
|
|
|
DHO_HOST_NAME() => 'string', |
386
|
|
|
|
|
|
|
DHO_BOOT_SIZE() => 'short', |
387
|
|
|
|
|
|
|
DHO_MERIT_DUMP() => 'string', |
388
|
|
|
|
|
|
|
DHO_DOMAIN_NAME() => 'string', |
389
|
|
|
|
|
|
|
DHO_SWAP_SERVER() => 'inet', |
390
|
|
|
|
|
|
|
DHO_ROOT_PATH() => 'string', |
391
|
|
|
|
|
|
|
DHO_EXTENSIONS_PATH() => 'string', |
392
|
|
|
|
|
|
|
DHO_IP_FORWARDING() => 'byte', |
393
|
|
|
|
|
|
|
DHO_NON_LOCAL_SOURCE_ROUTING() => 'byte', |
394
|
|
|
|
|
|
|
DHO_POLICY_FILTER() => 'inets2', |
395
|
|
|
|
|
|
|
DHO_MAX_DGRAM_REASSEMBLY() => 'short', |
396
|
|
|
|
|
|
|
DHO_DEFAULT_IP_TTL() => 'byte', |
397
|
|
|
|
|
|
|
DHO_PATH_MTU_AGING_TIMEOUT() => 'int', |
398
|
|
|
|
|
|
|
DHO_PATH_MTU_PLATEAU_TABLE() => 'shorts', |
399
|
|
|
|
|
|
|
DHO_INTERFACE_MTU() => 'short', |
400
|
|
|
|
|
|
|
DHO_ALL_SUBNETS_LOCAL() => 'byte', |
401
|
|
|
|
|
|
|
DHO_BROADCAST_ADDRESS() => 'inet', |
402
|
|
|
|
|
|
|
DHO_PERFORM_MASK_DISCOVERY() => 'byte', |
403
|
|
|
|
|
|
|
DHO_MASK_SUPPLIER() => 'byte', |
404
|
|
|
|
|
|
|
DHO_ROUTER_DISCOVERY() => 'byte', |
405
|
|
|
|
|
|
|
DHO_ROUTER_SOLICITATION_ADDRESS() => 'inet', |
406
|
|
|
|
|
|
|
DHO_STATIC_ROUTES() => 'inets2', |
407
|
|
|
|
|
|
|
DHO_TRAILER_ENCAPSULATION() => 'byte', |
408
|
|
|
|
|
|
|
DHO_ARP_CACHE_TIMEOUT() => 'int', |
409
|
|
|
|
|
|
|
DHO_IEEE802_3_ENCAPSULATION() => 'byte', |
410
|
|
|
|
|
|
|
DHO_DEFAULT_TCP_TTL() => 'byte', |
411
|
|
|
|
|
|
|
DHO_TCP_KEEPALIVE_INTERVAL() => 'int', |
412
|
|
|
|
|
|
|
DHO_TCP_KEEPALIVE_GARBAGE() => 'byte', |
413
|
|
|
|
|
|
|
DHO_NIS_DOMAIN() => 'string', |
414
|
|
|
|
|
|
|
DHO_NIS_SERVERS() => 'inets', |
415
|
|
|
|
|
|
|
DHO_NTP_SERVERS() => 'inets', |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
DHO_VENDOR_ENCAPSULATED_OPTIONS() => 'suboptions', |
418
|
|
|
|
|
|
|
DHO_NETBIOS_NAME_SERVERS() => 'inets', |
419
|
|
|
|
|
|
|
DHO_NETBIOS_DD_SERVER() => 'inets', |
420
|
|
|
|
|
|
|
DHO_NETBIOS_NODE_TYPE() => 'byte', |
421
|
|
|
|
|
|
|
DHO_NETBIOS_SCOPE() => 'string', |
422
|
|
|
|
|
|
|
DHO_FONT_SERVERS() => 'inets', |
423
|
|
|
|
|
|
|
DHO_X_DISPLAY_MANAGER() => 'inets', |
424
|
|
|
|
|
|
|
DHO_DHCP_REQUESTED_ADDRESS() => 'inet', |
425
|
|
|
|
|
|
|
DHO_DHCP_LEASE_TIME() => 'int', |
426
|
|
|
|
|
|
|
DHO_DHCP_OPTION_OVERLOAD() => 'byte', |
427
|
|
|
|
|
|
|
DHO_DHCP_MESSAGE_TYPE() => 'byte', |
428
|
|
|
|
|
|
|
DHO_DHCP_SERVER_IDENTIFIER() => 'inet', |
429
|
|
|
|
|
|
|
DHO_DHCP_PARAMETER_REQUEST_LIST() => 'bytes', |
430
|
|
|
|
|
|
|
DHO_DHCP_MESSAGE() => 'string', |
431
|
|
|
|
|
|
|
DHO_DHCP_MAX_MESSAGE_SIZE() => 'short', |
432
|
|
|
|
|
|
|
DHO_DHCP_RENEWAL_TIME() => 'int', |
433
|
|
|
|
|
|
|
DHO_DHCP_REBINDING_TIME() => 'int', |
434
|
|
|
|
|
|
|
DHO_VENDOR_CLASS_IDENTIFIER() => 'string', |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
DHO_DHCP_CLIENT_IDENTIFIER() => 'clientid', |
437
|
|
|
|
|
|
|
DHO_NWIP_DOMAIN_NAME() => 'string', # rfc 2242 |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
DHO_NWIP_SUBOPTIONS() => 'suboptions', # rfc 2242 |
440
|
|
|
|
|
|
|
DHO_NISV3_DOMAIN() => 'string', |
441
|
|
|
|
|
|
|
DHO_NISV3_SERVER() => 'string', |
442
|
|
|
|
|
|
|
DHO_TFTP_SERVER() => 'string', |
443
|
|
|
|
|
|
|
DHO_BOOTFILE() => 'string', # 67 |
444
|
|
|
|
|
|
|
DHO_MOBILE_IP_HOME_AGENT() => 'inets', |
445
|
|
|
|
|
|
|
DHO_SMTP_SERVER() => 'inets', |
446
|
|
|
|
|
|
|
DHO_POP3_SERVER() => 'inets', |
447
|
|
|
|
|
|
|
DHO_NNTP_SERVER() => 'inets', |
448
|
|
|
|
|
|
|
DHO_WWW_SERVER() => 'inets', |
449
|
|
|
|
|
|
|
DHO_FINGER_SERVER() => 'inets', |
450
|
|
|
|
|
|
|
DHO_IRC_SERVER() => 'inets', |
451
|
|
|
|
|
|
|
DHO_STREETTALK_SERVER() => 'inets', |
452
|
|
|
|
|
|
|
DHO_STDA_SERVER() => 'inets', |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
DHO_SIP_SERVERS() => 'sipserv', |
455
|
|
|
|
|
|
|
DHO_CLASSLESS_STATIC_ROUTE() => 'csr', # rfc 3442 |
456
|
|
|
|
|
|
|
DHO_CCC => 'suboptions', # 122 |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
# DHO_USER_CLASS() => '', # rfc 3004 |
459
|
|
|
|
|
|
|
# DHO_FQDN() => '', # draft-ietf-dhc-fqdn-option-10.txt |
460
|
|
|
|
|
|
|
DHO_DHCP_AGENT_OPTIONS() => 'suboptions', # rfc 3046 |
461
|
|
|
|
|
|
|
# DHO_DHCP_AGENT_OPTIONS() => 'string', # rfc 3046 |
462
|
|
|
|
|
|
|
DHO_NDS_SERVERS() => 'inets', # rfc 2241 |
463
|
|
|
|
|
|
|
DHO_NDS_TREE_NAME() => 'string', # rfc 2241 |
464
|
|
|
|
|
|
|
DHO_USER_AUTHENTICATION_PROTOCOL() => 'string', # rfc 2485 |
465
|
|
|
|
|
|
|
DHO_AUTO_CONFIGURE() => 'byte', # rfc 2563 |
466
|
|
|
|
|
|
|
DHO_NAME_SERVICE_SEARCH() => 'shorts', # rfc 2937 |
467
|
|
|
|
|
|
|
DHO_SUBNET_SELECTION() => 'inet', # rfc 3011 |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
DHO_CLASSLESS_STATIC_ROUTE_MS() => 'csr', |
470
|
|
|
|
|
|
|
); |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
# Links option codes with their suboption values |
473
|
|
|
|
|
|
|
%SUBOPTION_CODES = ( |
474
|
|
|
|
|
|
|
$DHO_CODES{'DHO_NWIP_SUBOPTIONS'} => \%NWIP_CODES, # option 63 |
475
|
|
|
|
|
|
|
$DHO_CODES{'DHO_DHCP_AGENT_OPTIONS'} => \%RELAYAGENT_CODES, # option 82 |
476
|
|
|
|
|
|
|
$DHO_CODES{'DHO_CCC'} => \%CCC_CODES, # option 122 |
477
|
|
|
|
|
|
|
$DHO_CODES{'DHO_GEOCONF'} => \%GEOCONF_CODES, # option 123 |
478
|
|
|
|
|
|
|
); |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
# Links option codes with their reverse suboption values |
481
|
|
|
|
|
|
|
%REV_SUBOPTION_CODES = ( |
482
|
|
|
|
|
|
|
$DHO_CODES{'DHO_NWIP_SUBOPTIONS'} => \%REV_NWIP_CODES, # option 63 |
483
|
|
|
|
|
|
|
$DHO_CODES{'DHO_DHCP_AGENT_OPTIONS'} => \%REV_RELAYAGENT_CODES, # option 82 |
484
|
|
|
|
|
|
|
$DHO_CODES{'DHO_CCC'} => \%REV_CCC_CODES, # option 122 |
485
|
|
|
|
|
|
|
$DHO_CODES{'DHO_GEOCONF'} => \%REV_GEOCONF_CODES, # option 123 |
486
|
|
|
|
|
|
|
); |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
1; |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
=pod |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
=head1 NAME |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
Net::DHCP::Constants - Constants for DHCP codes and options |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
=head1 VERSION |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
version 0.7_004 |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
=head1 SYNOPSIS |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
use Net::DHCP::Constants; |
503
|
|
|
|
|
|
|
print "DHCP option SUBNET_MASK is ", DHO_SUBNET_MASK(); |
504
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
=head1 DESCRIPTION |
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
Represents constants used in DHCP protocol, defined in RFC 1533, RFC 2132, |
508
|
|
|
|
|
|
|
RFC 2241, RFC 2485, RFC 2563, RFC 2937, RFC 3004, RFC 3011, RFC 3046. |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
=head1 TAGS |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
As mentioned above, constants can either be imported individually |
513
|
|
|
|
|
|
|
or in sets grouped by tag names. The tag names are: |
514
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
=over 4 |
516
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
=item * bootp_codes |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
Imports all of the basic I constants. |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
(01) BOOTREQUEST |
522
|
|
|
|
|
|
|
(02) BOOTREPLY |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
=item * htype_codes |
525
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
Imports all I (hardware address type) codes. |
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
(01) HTYPE_ETHER |
529
|
|
|
|
|
|
|
(06) HTYPE_IEEE802 |
530
|
|
|
|
|
|
|
(08) HTYPE_FDDI |
531
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
Most common value is HTYPE_ETHER for C. |
533
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
=item * dhcp_message |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
Import all DHCP Message codes. |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
(rfc2132) |
539
|
|
|
|
|
|
|
|
540
|
|
|
|
|
|
|
(01) DHCPDISCOVER |
541
|
|
|
|
|
|
|
(02) DHCPOFFER |
542
|
|
|
|
|
|
|
(03) DHCPREQUEST |
543
|
|
|
|
|
|
|
(04) DHCPDECLINE |
544
|
|
|
|
|
|
|
(05) DHCPACK |
545
|
|
|
|
|
|
|
(06) DHCPNAK |
546
|
|
|
|
|
|
|
(07) DHCPRELEASE |
547
|
|
|
|
|
|
|
(08) DHCPINFORM |
548
|
|
|
|
|
|
|
(09) DHCPFORCERENEW |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
(rfc4388) |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
(10) DHCPLEASEQUERY |
553
|
|
|
|
|
|
|
(11) DHCPLEASEUNASSIGNED |
554
|
|
|
|
|
|
|
(12) DHCPLEASEUNKNOWN |
555
|
|
|
|
|
|
|
(13) DHCPLEASEACTIVE |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
Nb. Previously Cisco used 13 for DHCPLEASEQUERY. If you need to decode |
558
|
|
|
|
|
|
|
or encode packets to communicate with such a system, you might simply |
559
|
|
|
|
|
|
|
use the integer rather than the constant - or use the updated constant |
560
|
|
|
|
|
|
|
and comment in your code appropriately. |
561
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
=item * dho_codes |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
Import all DHCP option codes. |
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
(000) DHO_PAD |
567
|
|
|
|
|
|
|
(001) DHO_SUBNET_MASK |
568
|
|
|
|
|
|
|
(002) DHO_TIME_OFFSET |
569
|
|
|
|
|
|
|
(003) DHO_ROUTERS |
570
|
|
|
|
|
|
|
(004) DHO_TIME_SERVERS |
571
|
|
|
|
|
|
|
(005) DHO_NAME_SERVERS |
572
|
|
|
|
|
|
|
(006) DHO_DOMAIN_NAME_SERVERS |
573
|
|
|
|
|
|
|
(007) DHO_LOG_SERVERS |
574
|
|
|
|
|
|
|
(008) DHO_COOKIE_SERVERS |
575
|
|
|
|
|
|
|
(009) DHO_LPR_SERVERS |
576
|
|
|
|
|
|
|
(010) DHO_IMPRESS_SERVERS |
577
|
|
|
|
|
|
|
(011) DHO_RESOURCE_LOCATION_SERVERS |
578
|
|
|
|
|
|
|
(012) DHO_HOST_NAME |
579
|
|
|
|
|
|
|
(013) DHO_BOOT_SIZE |
580
|
|
|
|
|
|
|
(014) DHO_MERIT_DUMP |
581
|
|
|
|
|
|
|
(015) DHO_DOMAIN_NAME |
582
|
|
|
|
|
|
|
(016) DHO_SWAP_SERVER |
583
|
|
|
|
|
|
|
(017) DHO_ROOT_PATH |
584
|
|
|
|
|
|
|
(018) DHO_EXTENSIONS_PATH |
585
|
|
|
|
|
|
|
(019) DHO_IP_FORWARDING |
586
|
|
|
|
|
|
|
(020) DHO_NON_LOCAL_SOURCE_ROUTING |
587
|
|
|
|
|
|
|
(021) DHO_POLICY_FILTER |
588
|
|
|
|
|
|
|
(022) DHO_MAX_DGRAM_REASSEMBLY |
589
|
|
|
|
|
|
|
(023) DHO_DEFAULT_IP_TTL |
590
|
|
|
|
|
|
|
(024) DHO_PATH_MTU_AGING_TIMEOUT |
591
|
|
|
|
|
|
|
(025) DHO_PATH_MTU_PLATEAU_TABLE |
592
|
|
|
|
|
|
|
(026) DHO_INTERFACE_MTU |
593
|
|
|
|
|
|
|
(027) DHO_ALL_SUBNETS_LOCAL |
594
|
|
|
|
|
|
|
(028) DHO_BROADCAST_ADDRESS |
595
|
|
|
|
|
|
|
(029) DHO_PERFORM_MASK_DISCOVERY |
596
|
|
|
|
|
|
|
(030) DHO_MASK_SUPPLIER |
597
|
|
|
|
|
|
|
(031) DHO_ROUTER_DISCOVERY |
598
|
|
|
|
|
|
|
(032) DHO_ROUTER_SOLICITATION_ADDRESS |
599
|
|
|
|
|
|
|
(033) DHO_STATIC_ROUTES |
600
|
|
|
|
|
|
|
(034) DHO_TRAILER_ENCAPSULATION |
601
|
|
|
|
|
|
|
(035) DHO_ARP_CACHE_TIMEOUT |
602
|
|
|
|
|
|
|
(036) DHO_IEEE802_3_ENCAPSULATION |
603
|
|
|
|
|
|
|
(037) DHO_DEFAULT_TCP_TTL |
604
|
|
|
|
|
|
|
(038) DHO_TCP_KEEPALIVE_INTERVAL |
605
|
|
|
|
|
|
|
(039) DHO_TCP_KEEPALIVE_GARBAGE |
606
|
|
|
|
|
|
|
(040) DHO_NIS_DOMAIN |
607
|
|
|
|
|
|
|
(041) DHO_NIS_SERVERS |
608
|
|
|
|
|
|
|
(042) DHO_NTP_SERVERS |
609
|
|
|
|
|
|
|
(043) DHO_VENDOR_ENCAPSULATED_OPTIONS |
610
|
|
|
|
|
|
|
(044) DHO_NETBIOS_NAME_SERVERS |
611
|
|
|
|
|
|
|
(045) DHO_NETBIOS_DD_SERVER |
612
|
|
|
|
|
|
|
(046) DHO_NETBIOS_NODE_TYPE |
613
|
|
|
|
|
|
|
(047) DHO_NETBIOS_SCOPE |
614
|
|
|
|
|
|
|
(048) DHO_FONT_SERVERS |
615
|
|
|
|
|
|
|
(049) DHO_X_DISPLAY_MANAGER |
616
|
|
|
|
|
|
|
(050) DHO_DHCP_REQUESTED_ADDRESS |
617
|
|
|
|
|
|
|
(051) DHO_DHCP_LEASE_TIME |
618
|
|
|
|
|
|
|
(052) DHO_DHCP_OPTION_OVERLOAD |
619
|
|
|
|
|
|
|
(053) DHO_DHCP_MESSAGE_TYPE |
620
|
|
|
|
|
|
|
(054) DHO_DHCP_SERVER_IDENTIFIER |
621
|
|
|
|
|
|
|
(055) DHO_DHCP_PARAMETER_REQUEST_LIST |
622
|
|
|
|
|
|
|
(056) DHO_DHCP_MESSAGE |
623
|
|
|
|
|
|
|
(057) DHO_DHCP_MAX_MESSAGE_SIZE |
624
|
|
|
|
|
|
|
(058) DHO_DHCP_RENEWAL_TIME |
625
|
|
|
|
|
|
|
(059) DHO_DHCP_REBINDING_TIME |
626
|
|
|
|
|
|
|
(060) DHO_VENDOR_CLASS_IDENTIFIER |
627
|
|
|
|
|
|
|
(061) DHO_DHCP_CLIENT_IDENTIFIER |
628
|
|
|
|
|
|
|
(062) DHO_NWIP_DOMAIN_NAME |
629
|
|
|
|
|
|
|
(063) DHO_NWIP_SUBOPTIONS |
630
|
|
|
|
|
|
|
(064) DHO_NISV3_DOMAIN |
631
|
|
|
|
|
|
|
(065) DHO_NISV3_SERVER |
632
|
|
|
|
|
|
|
(066) DHO_TFTP_SERVER |
633
|
|
|
|
|
|
|
(067) DHO_BOOTFILE |
634
|
|
|
|
|
|
|
(068) DHO_MOBILE_IP_HOME_AGENT |
635
|
|
|
|
|
|
|
(069) DHO_SMTP_SERVER |
636
|
|
|
|
|
|
|
(070) DHO_POP3_SERVER |
637
|
|
|
|
|
|
|
(071) DHO_NNTP_SERVER |
638
|
|
|
|
|
|
|
(072) DHO_WWW_SERVER |
639
|
|
|
|
|
|
|
(073) DHO_FINGER_SERVER |
640
|
|
|
|
|
|
|
(074) DHO_IRC_SERVER |
641
|
|
|
|
|
|
|
(075) DHO_STREETTALK_SERVER |
642
|
|
|
|
|
|
|
(076) DHO_STDA_SERVER |
643
|
|
|
|
|
|
|
(077) DHO_USER_CLASS |
644
|
|
|
|
|
|
|
(078) DHO_DIRECTORY_AGENT |
645
|
|
|
|
|
|
|
(079) DHO_SERVICE_SCOPE |
646
|
|
|
|
|
|
|
(080) DHO_RAPID_COMMIT |
647
|
|
|
|
|
|
|
(081) DHO_FQDN |
648
|
|
|
|
|
|
|
(082) DHO_DHCP_AGENT_OPTIONS |
649
|
|
|
|
|
|
|
(083) DHO_ISNS |
650
|
|
|
|
|
|
|
(085) DHO_NDS_SERVERS |
651
|
|
|
|
|
|
|
(086) DHO_NDS_TREE_NAME |
652
|
|
|
|
|
|
|
(087) DHO_NDS_CONTEXT |
653
|
|
|
|
|
|
|
(088) DHO_BCMCS_CONTROLLER_DOMAIN_NAME_LIST |
654
|
|
|
|
|
|
|
(089) DHO_BCMCS_CONTROLLER_IPV4_ADDRESS |
655
|
|
|
|
|
|
|
(090) DHO_AUTHENTICATION |
656
|
|
|
|
|
|
|
(091) DHO_CLIENT_LAST_TRANSACTION_TIME |
657
|
|
|
|
|
|
|
(092) DHO_ASSOCIATED_IP |
658
|
|
|
|
|
|
|
(093) DHO_CLIENT_SYSTEM |
659
|
|
|
|
|
|
|
(094) DHO_CLIENT_NDI |
660
|
|
|
|
|
|
|
(095) DHO_LDAP |
661
|
|
|
|
|
|
|
(097) DHO_UUID_GUID |
662
|
|
|
|
|
|
|
(098) DHO_USER_AUTHENTICATION_PROTOCOL |
663
|
|
|
|
|
|
|
(099) DHO_GEOCONF_CIVIC |
664
|
|
|
|
|
|
|
(100) DHO_PCODE |
665
|
|
|
|
|
|
|
(101) DHO_TCODE |
666
|
|
|
|
|
|
|
(112) DHO_NETINFO_ADDRESS |
667
|
|
|
|
|
|
|
(113) DHO_NETINFO_TAG |
668
|
|
|
|
|
|
|
(114) DHO_URL |
669
|
|
|
|
|
|
|
(116) DHO_AUTO_CONFIGURE |
670
|
|
|
|
|
|
|
(117) DHO_NAME_SERVICE_SEARCH |
671
|
|
|
|
|
|
|
(118) DHO_SUBNET_SELECTION |
672
|
|
|
|
|
|
|
(119) DHO_DOMAIN_SEARCH |
673
|
|
|
|
|
|
|
(120) DHO_SIP_SERVERS |
674
|
|
|
|
|
|
|
(121) DHO_CLASSLESS_STATIC_ROUTE |
675
|
|
|
|
|
|
|
(122) DHO_CCC |
676
|
|
|
|
|
|
|
(123) DHO_GEOCONF |
677
|
|
|
|
|
|
|
(124) DHO_VI_VENDOR_CLASS |
678
|
|
|
|
|
|
|
(125) DHO_VI_VENDOR_SPECIFIC_INFOMATION |
679
|
|
|
|
|
|
|
(128) DHO_ETHERBOOT_SIGNATURE |
680
|
|
|
|
|
|
|
(129) DHO_CALL_SERVER_ADDRESS |
681
|
|
|
|
|
|
|
(130) DHO_DISCRIMINATION_STRING |
682
|
|
|
|
|
|
|
(131) DHO_REMOTE_STATISTICS_SERVER |
683
|
|
|
|
|
|
|
(132) DHO_VLAN_ID |
684
|
|
|
|
|
|
|
(133) DHO_L2_PRIORITY |
685
|
|
|
|
|
|
|
(134) DHO_DSCP |
686
|
|
|
|
|
|
|
(135) DHO_HTTP_PROXY_FORPHONES |
687
|
|
|
|
|
|
|
(136) DHO_OPTION_PANA_AGENT |
688
|
|
|
|
|
|
|
(137) DHO_OPTION_PANA_V4_LOST |
689
|
|
|
|
|
|
|
(138) DHO_OPTION_CAPWAP_AC_V4 |
690
|
|
|
|
|
|
|
(139) DHO_OPTION_IPV4_ADDRESS_MOS |
691
|
|
|
|
|
|
|
(140) DHO_OPTION_IPV4_FQDN_MOS |
692
|
|
|
|
|
|
|
(141) DHO_SIP_UA_CONFIGURATION_SERVICE_DOMAINS |
693
|
|
|
|
|
|
|
(150) DHO_ETHERBOOT |
694
|
|
|
|
|
|
|
(176) DHO_IP_TELEPHONE |
695
|
|
|
|
|
|
|
(177) DHO_PACKETCABLE_DEPRECATED |
696
|
|
|
|
|
|
|
(208) DHO_PXELINUX_MAGIC |
697
|
|
|
|
|
|
|
(209) DHO_CONFIGURATION_FILE |
698
|
|
|
|
|
|
|
(210) DHO_PATH_PREFIX |
699
|
|
|
|
|
|
|
(211) DHO_REBOOT_TIME |
700
|
|
|
|
|
|
|
(212) DHO_OPTION_6RD |
701
|
|
|
|
|
|
|
(213) DHO_OPTION_V4_ACCESS_DOMAIN |
702
|
|
|
|
|
|
|
(220) DHO_SUBNET_ALLOCATION |
703
|
|
|
|
|
|
|
(221) DHO_VIRTUAL_SUBNET |
704
|
|
|
|
|
|
|
(249) DHO_CLASSLESS_STATIC_ROUTE_MS |
705
|
|
|
|
|
|
|
(255) DHO_END |
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
=item * ccc_codes |
708
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
Import all CableLabs Client Configuration |
710
|
|
|
|
|
|
|
|
711
|
|
|
|
|
|
|
(001) CCC_PRIMARY_DHCP_SERVER |
712
|
|
|
|
|
|
|
(002) CCC_SECONDARY_DHCP_SERVER |
713
|
|
|
|
|
|
|
(003) CCC_PROVISIONING_SERVER |
714
|
|
|
|
|
|
|
(004) CCC_AS_REQ_AS_REP_BACKOFFRETRY |
715
|
|
|
|
|
|
|
(005) CCC_AP_REQ_AS_REP_BACKOFFRETRY |
716
|
|
|
|
|
|
|
(006) CCC_KERBEROS_REALM |
717
|
|
|
|
|
|
|
(007) CCC_TICKET_SERVER_UTILIZATION |
718
|
|
|
|
|
|
|
(008) CCC_PROVISIONING_TIMER |
719
|
|
|
|
|
|
|
(009) CCC_SECURITY_TICKET_CONTROL |
720
|
|
|
|
|
|
|
(010) CCC_KDC_SERVER |
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
=item * ra_codes |
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
Import all DHCP Agenet (aka Relay Agent) Codes |
725
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
(001) RAI_CIRCUIT_ID |
727
|
|
|
|
|
|
|
(002) RAI_REMOTE_ID |
728
|
|
|
|
|
|
|
(004) RAI_DOCSIS_CLASS |
729
|
|
|
|
|
|
|
(005) RAI_LINK_SELECTION |
730
|
|
|
|
|
|
|
(006) RAI_SUBSCRIBER_ID |
731
|
|
|
|
|
|
|
(007) RAI_RADIUS_ATTRIBUTES |
732
|
|
|
|
|
|
|
(008) RAI_AUTHENTICATION |
733
|
|
|
|
|
|
|
(009) RAI_VENDOR_INFO |
734
|
|
|
|
|
|
|
(010) RAI_FLAGS |
735
|
|
|
|
|
|
|
(011) RAI_SERVER_ID_OVERRIDE |
736
|
|
|
|
|
|
|
(151) RAI_DHCPV4_VIRTUAL_SUBNET_SELECTION |
737
|
|
|
|
|
|
|
(152) RAI_DHCPV4_VIRTUAL_SUBNET_SELECTION_CONTROL |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
=item * CABLELABS_OPTION43 |
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
(002) DEVICE_TYPE |
742
|
|
|
|
|
|
|
3 ECM |
743
|
|
|
|
|
|
|
4 SERIAL_NUMBER |
744
|
|
|
|
|
|
|
5 HW_VERSION |
745
|
|
|
|
|
|
|
6 SW_VERSION |
746
|
|
|
|
|
|
|
7 BOOT_ROM_VERSION |
747
|
|
|
|
|
|
|
8 OUI |
748
|
|
|
|
|
|
|
9 MODEL_NUMBER |
749
|
|
|
|
|
|
|
10 VENDOR_NAME |
750
|
|
|
|
|
|
|
11 PS_WAN_MAN_DATA |
751
|
|
|
|
|
|
|
12 CM_PS_SYSTEM_DESCRIPTION |
752
|
|
|
|
|
|
|
13 CM_PS_FIRMWARE_REV |
753
|
|
|
|
|
|
|
14 FIREWALL_POLICY_FILE_VERSION |
754
|
|
|
|
|
|
|
15 ESAFES |
755
|
|
|
|
|
|
|
16 DEVICE_TPID |
756
|
|
|
|
|
|
|
17 DEVICE SMID |
757
|
|
|
|
|
|
|
18 VIDEOSECURITYELEMENT |
758
|
|
|
|
|
|
|
31 MTA_MAC_ADDRESS |
759
|
|
|
|
|
|
|
32 MTA_CORRELATION_ID |
760
|
|
|
|
|
|
|
51 CARD_VENDOR_NAME |
761
|
|
|
|
|
|
|
52 CARD_CAPABILITY |
762
|
|
|
|
|
|
|
53 CARD_VENDOR_DEVICE_ID |
763
|
|
|
|
|
|
|
54 CARD_ID |
764
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
=back |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
=head1 TO DO, LIMITATIONS |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
Automatic parsing of DHO_VENDOR_ENCAPSULATED_OPTIONS (code 43) is unsupported. |
772
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
Automatic parsing of DHO_NWIP_SUBOPTIONS (code 63 - rfc 2242) is unsupported. |
774
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
Automatic parsing of DHO_USER_CLASS (code 77 - rfc 3004) is unsupported. |
776
|
|
|
|
|
|
|
|
777
|
|
|
|
|
|
|
Automatic parsing of DHO_CCC (code 122 - rfc 3495) is unsupported. |
778
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
Automatic parsing of DHO_PACKETCABLE_DEPRECATED (code 177 - rfc 3495) is unsupported. |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
=head1 SEE ALSO |
782
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
L, L |
784
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
=head1 AUTHOR |
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
Dean Hamstead Edean@bytefoundy.com.au and past Authors (see README) |
788
|
|
|
|
|
|
|
|
789
|
|
|
|
|
|
|
=head1 GOT PATCHES? |
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
Many young people like to use Github, so by all means send me pull requests at |
792
|
|
|
|
|
|
|
|
793
|
|
|
|
|
|
|
https://github.com/djzort/Net-DHCP |
794
|
|
|
|
|
|
|
|
795
|
|
|
|
|
|
|
=head1 COPYRIGHT |
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
798
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
799
|
|
|
|
|
|
|
|
800
|
|
|
|
|
|
|
=cut |