2 * Routines for BOOTP/DHCP packet disassembly
4 * Copyright 1998, Gilbert Ramirez <gram@alumni.rice.edu>
5 * Copyright 2004, Thomas Anders <thomas.anders [AT] blue-cable.de>
7 * Added option field filters
8 * Copyright 2011, Michael Mann
10 * Added option 77 : RFC 3004 - The User Class Option for DHCP
11 * Added option 117 : RFC 2937 - The Name Service Search Option for DHCP
12 * Added option 119 : RFC 3397 - Dynamic Host Configuration Protocol (DHCP) Domain Search Option
13 * RFC 3396 - Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)
14 * Improved opt 120 : Add support of RFC 3396 - Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)
15 * Add support compression according to the encoding in Section 4.1.4 of RFC 1035 - DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION
18 * Copyright 2012, Jerome LAFORGE <jerome.laforge [AT] gmail.com>
22 * The information used comes from:
23 * RFC 951: Bootstrap Protocol
24 * RFC 1035: Domain Names - Implementation And Specification
25 * RFC 1497: BOOTP extensions
26 * RFC 1542: Clarifications and Extensions for the Bootstrap Protocol
27 * RFC 2131: Dynamic Host Configuration Protocol
28 * RFC 2132: DHCP Options and BOOTP Vendor Extensions
29 * RFC 2241: DHCP Options for Novell Directory Services
30 * RFC 2242: NetWare/IP Domain Name and Information
31 * RFC 2489: Procedure for Defining New DHCP Options
32 * RFC 2610: DHCP Options for Service Location Protocol
33 * RFC 2685: Virtual Private Networks Identifier
34 * RFC 2937: The Name Service Search Option for DHCP
35 * RFC 3004: The User Class Option for DHCP
36 * RFC 3046: DHCP Relay Agent Information Option
37 * RFC 3118: Authentication for DHCP Messages
38 * RFC 3203: DHCP reconfigure extension
39 * RFC 3315: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
40 * RFC 3396: Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)
41 * RFC 3397: Dynamic Host Configuration Protocol (DHCP) Domain Search Option
42 * RFC 3495: DHCP Option (122) for CableLabs Client Configuration
43 * RFC 3594: PacketCable Security Ticket Control Sub-Option (122.9)
44 * RFC 3442: Classless Static Route Option for DHCP version 4
45 * RFC 3825: Dynamic Host Configuration Protocol Option for Coordinate-based Location Configuration Information
46 * RFC 3925: Vendor-Identifying Vendor Options for Dynamic Host Configuration Protocol version 4 (DHCPv4)
47 * RFC 3942: Reclassifying DHCPv4 Options
48 * RFC 4243: Vendor-Specific Information Suboption for the Dynamic Host Configuration Protocol (DHCP) Relay Agent Option
49 * RFC 4361: Node-specific Client Identifiers for Dynamic Host Configuration Protocol Version Four (DHCPv4)
50 * RFC 4388: Dynamic Host Configuration Protocol (DHCP) Leasequery
51 * RFC 4578: Dynamic Host Configuration Protocol (DHCP) Options for PXE
52 * RFC 4776: Dynamic Host Configuration Protocol (DHCPv4 and DHCPv6) Option for Civic Addresses Configuration Information
53 * RFC 5223: Discovering Location-to-Service Translation (LoST) Servers Using the Dynamic Host Configuration Protocol (DHCP)
54 * RFC 5417: CAPWAP Access Controller DHCP Option
55 * RFC 5969: IPv6 Rapid Deployment on IPv4 Infrastructures (6rd)
56 * draft-ietf-dhc-fqdn-option-07.txt
57 * TFTP Server Address Option for DHCPv4 [draft-raj-dhc-tftp-addr-option-06.txt: http://tools.ietf.org/html/draft-raj-dhc-tftp-addr-option-06]
58 * BOOTP and DHCP Parameters
59 * http://www.iana.org/assignments/bootp-dhcp-parameters
60 * DOCSIS(TM) 2.0 Radio Frequency Interface Specification
61 * http://www.cablelabs.com/specifications/CM-SP-RFI2.0-I11-060602.pdf
62 * DOCSIS(TM) 3.0 MAC and Upper Layer Protocols Interface Specification
63 * http://www.cablelabs.com/specifications/CM-SP-MULPIv3.0-I20-121113.pdf
64 * PacketCable(TM) 1.0 MTA Device Provisioning Specification
65 * http://www.cablelabs.com/packetcable/downloads/specs/PKT-SP-PROV-I11-050812.pdf
66 * http://www.cablelabs.com/specifications/archives/PKT-SP-PROV-I05-021127.pdf (superseded by above)
67 * PacketCable(TM) 1.5 MTA Device Provisioning Specification
68 * http://www.cablelabs.com/packetcable/downloads/specs/PKT-SP-PROV1.5-I02-050812.pdf
69 * PacketCable(TM) 2.0 EUE Device Provisioning Specification
70 * http://www.cablelabs.com/specifications/PKT-SP-EUE-DATA-I03-090528.pdf
71 * Business Services over DOCSIS(R) Layer 2 Virtual Private Networks
72 * http://www.cablelabs.com/specifications/CM-SP-L2VPN-I09-100611.pdf
73 * CableHome(TM) 1.1 Specification
74 * http://www.cablelabs.com/projects/cablehome/downloads/specs/CH-SP-CH1.1-I11-060407.pdf
75 * Broadband Forum TR-111
76 * http://www.broadband-forum.org/technical/download/TR-111.pdf
78 * Wireshark - Network traffic analyzer
79 * By Gerald Combs <gerald@wireshark.org>
80 * Copyright 1998 Gerald Combs
82 * This program is free software; you can redistribute it and/or
83 * modify it under the terms of the GNU General Public License
84 * as published by the Free Software Foundation; either version 2
85 * of the License, or (at your option) any later version.
87 * This program is distributed in the hope that it will be useful,
88 * but WITHOUT ANY WARRANTY; without even the implied warranty of
89 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90 * GNU General Public License for more details.
92 * You should have received a copy of the GNU General Public License
93 * along with this program; if not, write to the Free Software
94 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
98 * Some of the development of the BOOTP/DHCP protocol decoder was sponsored by
99 * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary
100 * CableLabs' specifications. Your license and use of this protocol decoder
101 * does not mean that you are licensed to use the CableLabs'
102 * specifications. If you have questions about this protocol, contact
103 * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional
116 #include <epan/packet.h>
117 #include <epan/exceptions.h>
118 #include "packet-arp.h"
119 #include "packet-dns.h" /* for get_dns_name() */
120 #include <epan/addr_resolv.h>
121 #include <epan/prefs.h>
122 #include <epan/tap.h>
123 #include <epan/arptypes.h>
124 #include <epan/sminmpec.h>
125 #include <epan/expert.h>
126 #include <epan/uat.h>
127 #include <epan/wmem/wmem.h>
129 void proto_register_bootp(void);
130 void proto_reg_handoff_bootp(void);
132 static int bootp_dhcp_tap
= -1;
133 static int proto_bootp
= -1;
134 static int hf_bootp_type
= -1;
135 static int hf_bootp_hw_type
= -1;
136 static int hf_bootp_hw_len
= -1;
137 static int hf_bootp_hops
= -1;
138 static int hf_bootp_id
= -1;
139 static int hf_bootp_secs
= -1;
140 static int hf_bootp_flags
= -1;
141 static int hf_bootp_flags_broadcast
= -1;
142 static int hf_bootp_flags_reserved
= -1;
143 static int hf_bootp_ip_client
= -1;
144 static int hf_bootp_ip_your
= -1;
145 static int hf_bootp_ip_server
= -1;
146 static int hf_bootp_ip_relay
= -1;
147 static int hf_bootp_hw_addr
= -1;
148 static int hf_bootp_hw_addr_padding
= -1;
149 static int hf_bootp_hw_ether_addr
= -1;
150 static int hf_bootp_server
= -1;
151 static int hf_bootp_file
= -1;
152 static int hf_bootp_cookie
= -1;
153 static int hf_bootp_dhcp
= -1;
154 static int hf_bootp_fqdn_s
= -1;
155 static int hf_bootp_fqdn_o
= -1;
156 static int hf_bootp_fqdn_e
= -1;
157 static int hf_bootp_fqdn_n
= -1;
158 static int hf_bootp_fqdn_mbz
= -1;
159 static int hf_bootp_fqdn_rcode1
= -1;
160 static int hf_bootp_fqdn_rcode2
= -1;
161 static int hf_bootp_fqdn_name
= -1;
162 static int hf_bootp_fqdn_asciiname
= -1;
163 static int hf_bootp_pkt_mta_cap_len
= -1;
164 static int hf_bootp_docsis_cm_cap_type
= -1;
165 static int hf_bootp_docsis_cm_cap_len
= -1;
166 static int hf_bootp_client_identifier_uuid
= -1;
167 static int hf_bootp_client_identifier_duid_llt_hw_type
= -1;
168 static int hf_bootp_client_identifier_duid_ll_hw_type
= -1;
169 static int hf_bootp_option_type
= -1;
170 static int hf_bootp_option_length
= -1;
171 static int hf_bootp_option_value
= -1;
172 static int hf_bootp_option_value_8
= -1;
173 static int hf_bootp_option_value_16
= -1;
174 static int hf_bootp_option_value_u32
= -1;
175 static int hf_bootp_option_value_i32
= -1;
176 static int hf_bootp_option_value_stringz
= -1;
177 static int hf_bootp_option_value_ip_address
= -1;
178 static int hf_bootp_option_value_boolean
= -1;
179 static int hf_bootp_suboption_length
= -1;
181 static int hf_bootp_option_padding
= -1; /* 0 */
182 static int hf_bootp_option_subnet_mask
= -1; /* 1 */
183 static int hf_bootp_option_time_offset
= -1; /* 2 */
184 static int hf_bootp_option_router
= -1; /* 3 */
185 static int hf_bootp_option_time_server
= -1; /* 4 */
186 static int hf_bootp_option_name_server
= -1; /* 5 */
187 static int hf_bootp_option_domain_name_server
= -1; /* 6 */
188 static int hf_bootp_option_log_server
= -1; /* 7 */
189 static int hf_bootp_option_quotes_server
= -1; /* 8 */
190 static int hf_bootp_option_lpr_server
= -1; /* 9 */
191 static int hf_bootp_option_impress_server
= -1; /* 10 */
192 static int hf_bootp_option_resource_location_server
= -1; /* 11 */
193 static int hf_bootp_option_hostname
= -1; /* 12 */
194 static int hf_bootp_option_boot_file_size
= -1; /* 13 */
195 static int hf_bootp_option_merit_dump_file
= -1; /* 14 */
196 static int hf_bootp_option_domain_name
= -1; /* 15 */
197 static int hf_bootp_option_swap_server
= -1; /* 16 */
198 static int hf_bootp_option_root_path
= -1; /* 17 */
199 static int hf_bootp_option_extension_path
= -1; /* 18 */
200 static int hf_bootp_option_ip_forwarding
= -1; /* 19 */
201 static int hf_bootp_option_non_local_source_routing
= -1; /* 20 */
202 static int hf_bootp_option_policy_filter_ip
= -1; /* 21 - IP address */
203 static int hf_bootp_option_policy_filter_subnet_mask
= -1; /* 21 - Subnet mask */
204 static int hf_bootp_option_max_datagram_reassembly_size
= -1; /* 22 */
205 static int hf_bootp_option_default_ip_ttl
= -1; /* 23 */
206 static int hf_bootp_option_path_mtu_aging_timeout
= -1; /* 24 */
207 static int hf_bootp_option_path_mtu_plateau_table_item
= -1; /* 25 */
208 static int hf_bootp_option_interface_mtu
= -1; /* 26 */
209 static int hf_bootp_option_all_subnets_are_local
= -1; /* 27 */
210 static int hf_bootp_option_broadcast_address
= -1; /* 28 */
211 static int hf_bootp_option_perform_mask_discovery
= -1; /* 29 */
212 static int hf_bootp_option_mask_supplier
= -1; /* 30 */
213 static int hf_bootp_option_perform_router_discover
= -1; /* 31 */
214 static int hf_bootp_option_router_solicitation_address
= -1; /* 32 */
215 static int hf_bootp_option_static_route_ip
= -1; /* 33 - Destination IP */
216 static int hf_bootp_option_static_route_router
= -1; /* 33 - Router */
217 static int hf_bootp_option_trailer_encapsulation
= -1; /* 34 */
218 static int hf_bootp_option_arp_cache_timeout
= -1; /* 35 */
219 static int hf_bootp_option_ethernet_encapsulation
= -1; /* 36 */
220 static int hf_bootp_option_tcp_default_ttl
= -1; /* 37 */
221 static int hf_bootp_option_tcp_keepalive_interval
= -1; /* 38 */
222 static int hf_bootp_option_tcp_keepalive_garbage
= -1; /* 39 */
223 static int hf_bootp_option_nis_domain
= -1; /* 40 */
224 static int hf_bootp_option_nis_server
= -1; /* 41 */
225 static int hf_bootp_option_ntp_server
= -1; /* 42 */
227 static int hf_bootp_option43_value
= -1; /* 43 suboption value */
228 static int hf_bootp_option43_value_8
= -1; /* 43 suboption value */
229 static int hf_bootp_option43_value_32
= -1; /* 43 suboption value */
230 static int hf_bootp_option43_value_stringz
= -1; /* 43 suboption value */
231 static int hf_bootp_option43_value_ip_address
= -1; /* 43 suboption value */
233 static int hf_bootp_option43_pxeclient_suboption
= -1; /* 43 suboption */
234 static int hf_bootp_option43_pxeclient_padding
= -1; /* 43:0 PXE */
235 static int hf_bootp_option43_pxeclient_mtftp_ip
= -1; /* 43:1 PXE */
236 static int hf_bootp_option43_pxeclient_mtftp_client_port
= -1; /* 43:2 PXE */
237 static int hf_bootp_option43_pxeclient_mtftp_server_port
= -1; /* 43:3 PXE */
238 static int hf_bootp_option43_pxeclient_mtftp_timeout
= -1; /* 43:4 PXE */
239 static int hf_bootp_option43_pxeclient_mtftp_delay
= -1; /* 43:5 PXE */
240 static int hf_bootp_option43_pxeclient_discovery_control
= -1; /* 43:6 PXE */
241 static int hf_bootp_option43_pxeclient_multicast_address
= -1; /* 43:7 PXE */
242 static int hf_bootp_option43_pxeclient_boot_servers
= -1; /* 43:8 PXE */
243 static int hf_bootp_option43_pxeclient_boot_menu
= -1; /* 43:9 PXE */
244 static int hf_bootp_option43_pxeclient_menu_prompt
= -1; /* 43:10 PXE */
245 static int hf_bootp_option43_pxeclient_multicast_address_alloc
= -1; /* 43:11 PXE */
246 static int hf_bootp_option43_pxeclient_credential_types
= -1; /* 43:12 PXE */
247 static int hf_bootp_option43_pxeclient_boot_item
= -1; /* 43:71 PXE */
248 static int hf_bootp_option43_pxeclient_end
= -1; /* 43:255 PXE */
250 static int hf_bootp_option43_cl_suboption
= -1; /* 43 suboption */
251 static int hf_bootp_option43_cl_padding
= -1; /* 43:0 CL */
252 static int hf_bootp_option43_cl_suboption_request_list
= -1; /* 43:1 CL */
253 static int hf_bootp_option43_cl_device_type
= -1; /* 43:2 CL */
254 static int hf_bootp_option43_cl_esafe_type
= -1; /* 43:3 CL */
255 static int hf_bootp_option43_cl_serial_number
= -1; /* 43:4 CL */
256 static int hf_bootp_option43_cl_hardware_version
= -1; /* 43:5 CL */
257 static int hf_bootp_option43_cl_software_version
= -1; /* 43:6 CL */
258 static int hf_bootp_option43_cl_boot_rom_version
= -1; /* 43:7 CL */
259 static int hf_bootp_option43_cl_oui_bytes
= -1; /* 43:8 CL */
260 static int hf_bootp_option43_cl_oui_string
= -1; /* 43:8 CL */
261 static int hf_bootp_option43_cl_model_number
= -1; /* 43:9 CL */
262 static int hf_bootp_option43_cl_vendor_name10
= -1; /* 43:10 CL */
263 static int hf_bootp_option43_cl_address_realm
= -1; /* 43:11 CL */
264 static int hf_bootp_option43_cl_cm_ps_system_desc
= -1; /* 43:12 CL */
265 static int hf_bootp_option43_cl_cm_ps_firmware_revision
= -1; /* 43:13 CL */
266 static int hf_bootp_option43_cl_firewall_policy_file_version
= -1; /* 43:14 CL */
267 static int hf_bootp_option43_cl_esafe_config_file_devices
= -1; /* 43:15 CL */
268 static int hf_bootp_option43_cl_video_security_tape
= -1; /* 43:18 CL */
269 static int hf_bootp_option43_cl_mta_mac_address
= -1; /* 43:31 CL */
270 static int hf_bootp_option43_cl_correlation_ID
= -1; /* 43:32 CL */
271 static int hf_bootp_option43_cl_vendor_name51
= -1; /* 43:51 CL */
272 static int hf_bootp_option43_cl_cablecard_capability
= -1; /* 43:52 CL */
273 static int hf_bootp_option43_cl_device_id_ca
= -1; /* 43:53 CL */
274 static int hf_bootp_option43_cl_device_id_x509
= -1; /* 43:54 CL */
275 static int hf_bootp_option43_cl_end
= -1; /* 43:255 CL */
277 static int hf_bootp_option43_alcatel_suboption
= -1; /* 43 suboption */
278 static int hf_bootp_option43_alcatel_padding
= -1; /* 43:0 Alcatel */
279 static int hf_bootp_option43_alcatel_vlan_id
= -1; /* 43:58 Alcatel */
280 static int hf_bootp_option43_alcatel_tftp1
= -1; /* 43:64 Alcatel */
281 static int hf_bootp_option43_alcatel_tftp2
= -1; /* 43:65 Alcatel */
282 static int hf_bootp_option43_alcatel_app_type
= -1; /* 43:66 Alcatel */
283 static int hf_bootp_option43_alcatel_sip_url
= -1; /* 43:67 Alcatel */
284 static int hf_bootp_option43_alcatel_end
= -1; /* 43:255 Alcatel */
287 static int hf_bootp_option_netbios_over_tcpip_name_server
= -1; /* 44 */
288 static int hf_bootp_option_netbios_over_tcpip_dd_name_server
= -1; /* 45 */
289 static int hf_bootp_option_netbios_over_tcpip_node_type
= -1; /* 46 */
290 static int hf_bootp_option_netbios_over_tcpip_scope
= -1; /* 47 */
291 static int hf_bootp_option_xwindows_system_font_server
= -1; /* 48 */
292 static int hf_bootp_option_xwindows_system_display_manager
= -1; /* 49 */
293 static int hf_bootp_option_requested_ip_address
= -1; /* 50 */
294 static int hf_bootp_option_ip_address_lease_time
= -1; /* 51 */
295 static int hf_bootp_option_option_overload
= -1; /* 52 */
296 static int hf_bootp_option_dhcp
= -1; /* 53 */
297 static int hf_bootp_option_dhcp_server_id
= -1; /* 54 */
298 static int hf_bootp_option_parameter_request_list_item
= -1; /* 55 */
299 static int hf_bootp_option_message
= -1; /* 56 */
300 static int hf_bootp_option_dhcp_max_message_size
= -1; /* 57 */
301 static int hf_bootp_option_renewal_time_value
= -1; /* 58 */
302 static int hf_bootp_option_rebinding_time_value
= -1; /* 59 */
303 static int hf_bootp_option_vendor_class_id
= -1; /* 60 */
305 static int hf_bootp_option_novell_netware_ip_domain
= -1; /* 62 */
307 static int hf_bootp_option63_suboption
= -1; /* 63 suboption */
308 static int hf_bootp_option63_value
= -1; /* 63 suboption value */
309 static int hf_bootp_option63_value_8
= -1; /* 63 suboption value */
310 static int hf_bootp_option63_value_ip_address
= -1; /* 63 suboption value */
311 static int hf_bootp_option63_value_boolean
= -1; /* 63 suboption value */
312 static int hf_bootp_option63_broadcast
= -1; /* 63:5 */
313 static int hf_bootp_option63_preferred_dss_server
= -1; /* 63:6 */
314 static int hf_bootp_option63_nearest_nwip_server
= -1; /* 63:7 */
315 static int hf_bootp_option63_autoretries
= -1; /* 63:8 */
316 static int hf_bootp_option63_autoretry_delay
= -1; /* 63:9 */
317 static int hf_bootp_option63_support_netware_v1_1
= -1; /* 63:10 */
318 static int hf_bootp_option63_primary_dss
= -1; /* 63:11 */
320 static int hf_bootp_option_nis_plus_domain
= -1; /* 64 */
321 static int hf_bootp_option_nis_plus_server
= -1; /* 65 */
322 static int hf_bootp_option_tftp_server_name
= -1; /* 66 */
323 static int hf_bootp_option_bootfile_name
= -1; /* 67 */
324 static int hf_bootp_option_mobile_ip_home_agent
= -1; /* 68 */
325 static int hf_bootp_option_smtp_server
= -1; /* 69 */
326 static int hf_bootp_option_pop3_server
= -1; /* 70 */
327 static int hf_bootp_option_nntp_server
= -1; /* 71 */
328 static int hf_bootp_option_default_www_server
= -1; /* 72 */
329 static int hf_bootp_option_default_finger_server
= -1; /* 73 */
330 static int hf_bootp_option_default_irc_server
= -1; /* 74 */
331 static int hf_bootp_option_streettalk_server
= -1; /* 75 */
332 static int hf_bootp_option_streettalk_da_server
= -1; /* 76 */
333 static int hf_bootp_option77_user_class
= -1; /* 77 User Class instance */
334 static int hf_bootp_option77_user_class_length
= -1; /* 77 length of User Class instance */
335 static int hf_bootp_option77_user_class_data
= -1; /* 77 data of User Class instance */
336 static int hf_bootp_option_slp_directory_agent_value
= -1; /* 78 */
337 static int hf_bootp_option_slp_directory_agent_slpda_address
= -1; /* 78 */
338 static int hf_bootp_option_slp_service_scope_value
= -1; /* 79 */
339 static int hf_bootp_option_slp_service_scope_string
= -1; /* 79 */
341 static int hf_bootp_option82_suboption
= -1; /* 82 suboption */
342 static int hf_bootp_option82_value
= -1; /* 82 suboption value */
343 static int hf_bootp_option82_value_8
= -1; /* 82 suboption value */
344 static int hf_bootp_option82_value_32
= -1; /* 82 suboption value */
345 static int hf_bootp_option82_value_ip_address
= -1; /* 82 suboption value */
346 static int hf_bootp_option82_value_stringz
= -1; /* 82 suboption value */
347 static int hf_bootp_option82_padding
= -1; /* 82:0 */
348 static int hf_bootp_option82_agent_circuit_id
= -1; /* 82:1 */
349 static int hf_bootp_option82_agent_remote_id
= -1; /* 82:2 */
350 static int hf_bootp_option82_reserved
= -1; /* 82:3 */
351 static int hf_bootp_option82_docsis_device_class
= -1; /* 82:4 */
352 static int hf_bootp_option82_link_selection
= -1; /* 82:5 */
353 static int hf_bootp_option82_subscriber_id
= -1; /* 82:6 */
354 static int hf_bootp_option82_radius_attributes
= -1; /* 82:7 */
355 static int hf_bootp_option82_authentication
= -1; /* 82:8 */
356 static int hf_bootp_option82_vi
= -1; /* 82:9 */
357 /* 82:9 suboptions */
358 static int hf_bootp_option82_vi_enterprise
= -1;
359 static int hf_bootp_option82_vi_data_length
= -1;
360 static int hf_bootp_option82_vi_cl_option
= -1;
361 static int hf_bootp_option82_vi_cl_length
= -1;
362 static int hf_bootp_option82_vi_cl_tag
= -1;
363 static int hf_bootp_option82_vi_cl_tag_length
= -1;
364 static int hf_bootp_option82_vi_cl_docsis_version
= -1;
365 /* 82:9 suboptions end */
366 static int hf_bootp_option82_flags
= -1; /* 82:10 */
367 static int hf_bootp_option82_server_id_override
= -1; /* 82:11 */
368 static int hf_bootp_option82_link_selection_cisco
= -1; /* 82:150 */
369 static int hf_bootp_option82_vrf_name_vpn_id
= -1; /* 82:151 */
370 /* 82:151 suboptions */
371 static int hf_bootp_option82_vrf_name_vpn_id_oui
= -1;
372 static int hf_bootp_option82_vrf_name_vpn_id_index
= -1;
373 /* 82:151 suboptions end */
374 static int hf_bootp_option82_server_id_override_cisco
= -1; /* 82:152 */
376 static int hf_bootp_option_novell_dss_string
= -1; /* 85 */
377 static int hf_bootp_option_novell_dss_ip
= -1; /* 85 */
378 static int hf_bootp_option_novell_ds_tree_name
= -1; /* 86 */
379 static int hf_bootp_option_novell_ds_context
= -1; /* 87 */
380 static int hf_bootp_option_dhcp_authentication_protocol
= -1; /* 90 */
381 static int hf_bootp_option_dhcp_authentication_alg_delay
= -1; /* 90 */
382 static int hf_bootp_option_dhcp_authentication_algorithm
= -1; /* 90 */
383 static int hf_bootp_option_dhcp_authentication_rdm
= -1; /* 90 */
384 static int hf_bootp_option_dhcp_authentication_rdm_replay_detection
= -1; /* 90 */
385 static int hf_bootp_option_dhcp_authentication_rdm_rdv
= -1; /* 90 */
386 static int hf_bootp_option_dhcp_authentication_secret_id
= -1; /* 90 */
387 static int hf_bootp_option_dhcp_authentication_hmac_md5_hash
= -1; /* 90 */
388 static int hf_bootp_option_dhcp_authentication_information
= -1; /* 90 */
389 static int hf_bootp_option_client_last_transaction_time
= -1; /* 91 */
390 static int hf_bootp_option_associated_ip_option
= -1; /* 92 */
391 static int hf_bootp_option_client_system_architecture
= -1; /* 93 */
392 static int hf_bootp_option_client_network_id_major_ver
= -1; /* 94 */
393 static int hf_bootp_option_client_network_id_minor_ver
= -1; /* 94 */
394 static int hf_bootp_option_civic_location_what
= -1; /* 99 */
395 static int hf_bootp_option_civic_location_country
= -1; /* 99 */
396 static int hf_bootp_option_civic_location_ca_type
= -1; /* 99 */
397 static int hf_bootp_option_civic_location_ca_length
= -1; /* 99 */
398 static int hf_bootp_option_civic_location_ca_value
= -1; /* 99 */
399 static int hf_bootp_option_netinfo_parent_server_address
= -1; /* 112 */
400 static int hf_bootp_option_netinfo_parent_server_tag
= -1; /* 113 */
401 static int hf_bootp_option_dhcp_auto_configuration
= -1; /* 116 */
402 static int hf_bootp_option_dhcp_name_service_search_option
= -1; /* 117 */
403 static int hf_bootp_option_dhcp_dns_domain_search_list_rfc_3396_detected
= -1; /* 119 */
404 static int hf_bootp_option_dhcp_dns_domain_search_list_refer_last_option
= -1; /* 119 */
405 static int hf_bootp_option_dhcp_dns_domain_search_list_fqdn
= -1; /* 119 */
406 static int hf_bootp_option_sip_server_rfc_3396_detected
= -1; /* 120 */
407 static int hf_bootp_option_sip_server_refer_last_option
= -1; /* 120 */
408 static int hf_bootp_option_sip_server_enc
= -1; /* 120 */
409 static int hf_bootp_option_sip_server_name
= -1; /* 120 */
410 static int hf_bootp_option_sip_server_address
= -1; /* 120 */
411 static int hf_bootp_option_sip_server_address_stringz
= -1; /* 120 */
412 static int hf_bootp_option_cl_dss_id_option
= -1; /* 123 CL */
413 static int hf_bootp_option_cl_dss_id_len
= -1; /* 123 CL */
414 static int hf_bootp_option_cl_dss_id
= -1; /* 123 CL */
415 static int hf_bootp_option_vi_class_cl_address_mode
= -1; /* 124 */
416 static int hf_bootp_option_vi_class_enterprise
= -1; /* 124 */
417 static int hf_bootp_option_vi_class_data_length
= -1; /* 124 */
418 static int hf_bootp_option_vi_class_data
= -1; /* 124 */
420 static int hf_bootp_option125_enterprise
= -1;
421 static int hf_bootp_option125_value
= -1; /* 125 suboption value */
422 static int hf_bootp_option125_value_8
= -1; /* 125 suboption value */
423 static int hf_bootp_option125_value_16
= -1; /* 125 suboption value */
424 static int hf_bootp_option125_value_ip_address
= -1; /* 125 suboption value */
425 static int hf_bootp_option125_value_stringz
= -1; /* 125 suboption value */
426 static int hf_bootp_option125_tr111_suboption
= -1; /* 125 suboption */
427 static int hf_bootp_option125_tr111_device_manufacturer_oui
= -1; /* 125:TR-111 1 */
428 static int hf_bootp_option125_tr111_device_serial_number
= -1; /* 125:TR-111 2 */
429 static int hf_bootp_option125_tr111_device_product_class
= -1; /* 125:TR-111 3 */
430 static int hf_bootp_option125_tr111_gateway_manufacturer_oui
= -1; /* 125:TR-111 4 */
431 static int hf_bootp_option125_tr111_gateway_serial_number
= -1; /* 125:TR-111 5 */
432 static int hf_bootp_option125_tr111_gateway_product_class
= -1; /* 125:TR-111 6 */
433 static int hf_bootp_option125_cl_suboption
= -1; /* 125 suboption */
434 static int hf_bootp_option125_cl_option_request
= -1; /* 125:CL 1 */
435 static int hf_bootp_option125_cl_tftp_server_addresses
= -1; /* 125:CL 2 */
436 static int hf_bootp_option125_cl_erouter_container_option
= -1; /* 125:CL 3 */
437 static int hf_bootp_option125_cl_mib_environment_indicator_option
= -1; /* 125:CL 4 */
438 static int hf_bootp_option125_cl_modem_capabilities
= -1; /* 125:CL 5 */
440 static int hf_bootp_option_subnet_selection_option
= -1; /* 118 */
441 static int hf_bootp_option_lost_server_domain_name
= -1; /* 137 */
442 static int hf_bootp_option_capwap_access_controller
= -1; /* 138 */
443 static int hf_bootp_option_tftp_server_address
= -1; /* 150 */
444 static int hf_bootp_option_6RD_ipv4_mask_len
= -1; /* 212 */
445 static int hf_bootp_option_6RD_prefix_len
= -1; /* 212 */
446 static int hf_bootp_option_6RD_prefix
= -1; /* 212 */
447 static int hf_bootp_option_6RD_border_relay_ip
= -1; /* 212 */
448 static int hf_bootp_option_private_proxy_autodiscovery
= -1; /* 252 */
449 static int hf_bootp_option_end
= -1; /* 255 */
450 static int hf_bootp_option_end_overload
= -1; /* 255 (with overload)*/
455 static gint ett_bootp
= -1;
456 static gint ett_bootp_flags
= -1;
457 static gint ett_bootp_option
= -1;
458 static gint ett_bootp_option43_suboption
= -1;
459 static gint ett_bootp_option63_suboption
= -1;
460 static gint ett_bootp_option77_instance
= -1;
461 static gint ett_bootp_option82_suboption
= -1;
462 static gint ett_bootp_option82_suboption9
= -1;
463 static gint ett_bootp_option125_suboption
= -1;
464 static gint ett_bootp_fqdn
= -1;
466 static expert_field ei_bootp_bad_length
= EI_INIT
;
467 static expert_field ei_bootp_missing_subopt_length
= EI_INIT
;
468 static expert_field ei_bootp_missing_subopt_value
= EI_INIT
;
469 static expert_field ei_bootp_mal_duid
= EI_INIT
;
470 static expert_field hf_bootp_opt_overload_file_end_missing
= EI_INIT
;
471 static expert_field hf_bootp_opt_overload_sname_end_missing
= EI_INIT
;
472 static expert_field hf_bootp_subopt_unknown_type
= EI_INIT
;
473 static expert_field ei_bootp_option77_user_class_malformed
= EI_INIT
;
474 static expert_field ei_bootp_option_civic_location_bad_cattype
= EI_INIT
;
475 static expert_field ei_bootp_option_dhcp_name_service_invalid
= EI_INIT
;
476 static expert_field ei_bootp_option_sip_server_address_encoding
= EI_INIT
;
477 static expert_field ei_bootp_option_classless_static_route
= EI_INIT
;
478 static expert_field ei_bootp_option125_enterprise_malformed
= EI_INIT
;
479 static expert_field ei_bootp_option_6RD_malformed
= EI_INIT
;
480 static expert_field ei_bootp_option82_vi_cl_tag_unknown
= EI_INIT
;
481 static expert_field ei_bootp_suboption_invalid
= EI_INIT
;
482 static expert_field ei_bootp_secs_le
= EI_INIT
;
483 static expert_field ei_bootp_end_option_missing
= EI_INIT
;
485 static dissector_handle_t bootp_handle
;
487 /* RFC2937 The Name Service Search Option for DHCP */
488 #define RFC2937_LOCAL_NAMING_INFORMATION 0
489 #define RFC2937_DOMAIN_NAME_SERVER_OPTION 6
490 #define RFC2937_NETWORK_INFORMATION_SERVERS_OPTION 41
491 #define RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION 44
492 #define RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION 65
494 /* RFC3825decoder error codes of the conversion function */
495 #define RFC3825_NOERROR 0
496 #define RFC3825_LATITUDE_OUTOFRANGE 1
497 #define RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE 2
498 #define RFC3825_LONGITUDE_OUTOFRANGE 3
499 #define RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE 4
500 #define RFC3825_ALTITUDE_OUTOFRANGE 5
501 #define RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE 6
502 #define RFC3825_ALTITUDE_TYPE_OUTOFRANGE 7
503 #define RFC3825_DATUM_TYPE_OUTOFRANGE 8
509 struct rfc3825_location_fixpoint_t
{
511 gint64 latitude
; /* latitude in degrees, allowed range from -90deg to 90deg.
512 Fixpoint A(8,25) with 34 bits */
513 guint8 latitude_res
; /* the resolution of the latitude in bits, allowed range is from 0 to 34.
515 gint64 longitude
; /* longitude in degrees, range from -180deg to 180deg.
516 Fixpoint A(8,25) with 34 bits */
517 guint8 longitude_res
; /* the resolution of the longitude in bits, allowed range is from 0 to 34.
519 gint32 altitude
; /* the altitude, 30 bits.
520 Depending on alt_type this are meters or floors, no range limit.
521 altitude_type==1: A(13,8) with 22 bits
522 altitude_type==2: A(13,8) with 22 bits */
523 guint8 altitude_res
; /* the resolution of the altitude in bits, allowed range is from 0 to 30.
525 altitude_type==1: any value between 0 and 30
526 altitude_type==2: either 0 (floor unknown) or 30 */
527 guint8 altitude_type
; /* the type of the altitude, 4 bits. allowed values are:
529 1: altitude in meters
530 2: altitude in floors */
531 guint8 datum_type
; /* the map datum used for the coordinates. 8 bits.
532 All values are allowed although currently only the
533 following ones are defined:
539 /* The rfc3825_location_decimal_t structure holds the location parameters
540 * in decimal (floating point) format.
542 struct rfc3825_location_decimal_t
{
544 double latitude
; /* latitude in degrees, allowed range from -90deg to 90deg */
545 double latitude_res
; /* the uncertainty of the latitude in grad, "0.01" means +-0.01deg
546 from the altitude. During conversion this will be rounded to
547 next smaller value which can be represented in fixpoint arithmetic */
548 double longitude
; /* longitude in degrees, range from -180deg to 180deg */
549 double longitude_res
; /* the uncertainty of the longitude in grad, "0.01" means +-0.01deg
550 from the longitude. During conversion this will be rounded to
551 next smaller value which can be represented in fixpoint arithmetic */
552 double altitude
; /* the altitude, depending on alt_type this are meters or floors, no range limit */
553 double altitude_res
; /* the uncertainty of the altitude in either:
554 - altitude-type=meters: "10" means 10 meters which means +-10 meters from the altitude
555 - altitude-type=floors: either 0 (unknown) or 30 (exact) */
556 int altitude_type
; /* the type of the altitude, allowed values are
558 1: altitude in meters
559 2: altitude in floors */
560 int datum_type
; /* the map datum used for the coordinates.
561 All values are allowed although currently only the
562 following ones are defined:
568 /* For managing split options with RFC 3396 */
569 struct rfc3396_for_option_t
{
570 unsigned int total_number_of_block
;
571 unsigned int index_current_block
;
572 tvbuff_t
* tvb_composite
;
575 /* The RFC 3397 allows to cut long option (RFC 3396). */
576 struct rfc3396_for_option_t rfc3396_dns_domain_search_list
;
578 /* The RFC 3361 allows to cut long option (RFC 3396). */
579 struct rfc3396_for_option_t rfc3396_sip_server
;
586 /* converts fixpoint presentation into decimal presentation
587 also converts values which are out of range to allow decoding of received data */
588 static int rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t
*fixpoint
, struct rfc3825_location_decimal_t
*decimal
);
590 /* decodes the LCI string received from DHCP into the fixpoint values */
591 static void rfc3825_lci_to_fixpoint(const unsigned char lci
[16], struct rfc3825_location_fixpoint_t
*fixpoint
);
594 /* Map Datum Types used for the coordinates (RFC 3825) */
595 static const value_string map_datum_type_values
[] = {
597 { 2, "NAD83 (NAVD88)" },
598 { 3, "NAD83 (MLLW)" },
603 /* Altitude Types used for the coordinates (RFC 3825) */
604 static const value_string altitude_type_values
[] = {
610 /* AutoConfigure (RFC 2563) */
611 static const value_string dhcp_autoconfig
[] = {
612 { 0, "DoNotAutoConfigure"},
613 { 1, "AutoConfigure"},
617 /* Error Types for RFC 3825 coordinate location decoding */
618 static const value_string rfc3825_error_types
[] = {
619 { 1, "Latitude is out of range [-90,90]"},
620 { 2, "Latitude Uncertainty is out of range [0,90]"},
621 { 3, "Longitude is out of range [-180,180]"},
622 { 4, "Longitude Uncertainty is out of range [0,180]"},
623 { 5, "Altitude is out of range [-(2^21),(2^21)-1]"},
624 { 6, "Altitude Uncertainty is out of range [0,2^20]"},
625 { 7, "Altitude Type is out of range [0,2]"},
626 { 8, "Datum is out of range [1,3]"},
632 /* Civic Address What field (RFC 4776) */
633 static const value_string civic_address_what_values
[] = {
634 { 0, "Location of the DHCP server" },
635 { 1, "Location of the network element believed to be closest to the client" },
636 { 2, "Location of the client"},
640 /* Civic Address Type field (RFC 4119, RFC 4776, RFC 5139) */
641 static const value_string civic_address_type_values
[] = {
649 { 16, "PRD (Leading street direction)" },
650 { 17, "POD (Trailing street suffix)" },
651 { 18, "STS (Street suffix)" },
652 { 19, "HNO (House number)" },
653 { 20, "HNS (House number suffix)" },
654 { 21, "LMK (Landmark or vanity address)" },
655 { 22, "LOC (Additional location information)" },
657 { 24, "PC (Postal/ZIP code)" },
658 { 25, "BLD (Building)" },
660 { 27, "FLR (Floor)" },
662 { 29, "PLC (Place-type)" },
663 { 30, "PCN (Postal community name)" },
665 { 32, "ADDCODE (Additional Code)" },
667 { 34, "RD (Primary road or street)" },
668 { 35, "RDSEC (Road section)" },
669 { 36, "RDBR (Road branch)" },
670 { 37, "RDSUBBR (Road sub-branch)" },
671 { 38, "PRM (Road pre-modifier)" },
672 { 39, "POM (Road post-modifier" },
677 static const value_string cablelab_ipaddr_mode_vals
[] = {
683 static const value_string duidtype_vals
[] =
685 { DUID_LLT
, "link-layer address plus time" },
686 { DUID_EN
, "assigned by vendor based on Enterprise number" },
687 { DUID_LL
, "link-layer address" },
691 static gboolean novell_string
= FALSE
;
693 #define UDP_PORT_BOOTPS 67
694 #define UDP_PORT_BOOTPC 68
696 #define BOOTP_BC 0x8000
697 #define BOOTP_MBZ 0x7FFF
700 #define F_FQDN_S 0x01
701 #define F_FQDN_O 0x02
702 #define F_FQDN_E 0x04
703 #define F_FQDN_N 0x08
704 #define F_FQDN_MBZ 0xf0
706 static const true_false_string tfs_fqdn_s
= {
711 static const true_false_string tfs_fqdn_o
= {
716 static const true_false_string tfs_fqdn_e
= {
721 static const true_false_string tfs_fqdn_n
= {
723 "Some server updates"
730 ipv4
, /* single IPv4 address */
731 ipv4_list
, /* list of IPv4 addresses */
741 time_in_s_secs
, /* Signed */
742 time_in_u_secs
, /* Unsigned (not micro) */
749 enum field_type ftype
;
753 static const true_false_string flag_set_broadcast
= {
758 #define BOOTP_MAX_NO_CHAR 64
760 /* PacketCable/DOCSIS definitions */
761 #define PACKETCABLE_MTA_CAP10 "pktc1.0:"
762 #define PACKETCABLE_MTA_CAP15 "pktc1.5:"
763 #define PACKETCABLE_MTA_CAP20 "pktc2.0:"
764 #define PACKETCABLE_CM_CAP11 "docsis1.1:"
765 #define PACKETCABLE_CM_CAP20 "docsis2.0:"
766 #define PACKETCABLE_CM_CAP30 "docsis3.0:"
768 #define PACKETCABLE_CCC_I05 1
769 #define PACKETCABLE_CCC_DRAFT5 2
770 #define PACKETCABLE_CCC_RFC_3495 3
772 static const enum_val_t pkt_ccc_protocol_versions
[] = {
773 { "ccc_i05", "PKT-SP-PROV-I05-021127", PACKETCABLE_CCC_I05
},
774 { "ccc_draft_5", "IETF Draft 5", PACKETCABLE_CCC_DRAFT5
},
775 { "rfc_3495", "RFC 3495", PACKETCABLE_CCC_RFC_3495
},
779 static gint pkt_ccc_protocol_version
= PACKETCABLE_CCC_RFC_3495
;
780 static guint pkt_ccc_option
= 122;
783 static int dissect_vendor_pxeclient_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
784 tvbuff_t
*tvb
, int optoff
, int optend
);
785 static int dissect_vendor_cablelabs_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
786 tvbuff_t
*tvb
, int optoff
, int optend
);
787 static int dissect_vendor_alcatel_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
788 tvbuff_t
*tvb
, int optoff
, int optend
);
789 static int dissect_netware_ip_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
790 tvbuff_t
*tvb
, int optoff
, int optend
);
791 static int dissect_vendor_tr111_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
792 tvbuff_t
*tvb
, int optoff
, int optend
);
793 static int bootp_dhcp_decode_agent_info(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
794 tvbuff_t
*tvb
, int optoff
, int optend
);
795 static void dissect_packetcable_mta_cap(proto_tree
*v_tree
, tvbuff_t
*tvb
,
797 static void dissect_docsis_cm_cap(proto_tree
*v_tree
, tvbuff_t
*tvb
,
798 int voff
, int len
, gboolean opt125
);
799 static int dissect_packetcable_i05_ccc(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
800 tvbuff_t
*tvb
, int optoff
, int optend
);
801 static int dissect_packetcable_ietf_ccc(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
802 tvbuff_t
*tvb
, int optoff
, int optend
, int revision
);
803 static int dissect_vendor_cl_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
804 tvbuff_t
*tvb
, int optoff
, int optend
);
806 #define OPT53_DISCOVER "Discover"
807 /* http://www.iana.org/assignments/bootp-dhcp-parameters */
808 static const value_string opt53_text
[] = {
809 { 1, OPT53_DISCOVER
},
817 { 9, "Force Renew" },
818 { 10, "Lease query" }, /* RFC4388 */
819 { 11, "Lease Unassigned" }, /* RFC4388 */
820 { 12, "Lease Unknown" }, /* RFC4388 */
821 { 13, "Lease Active" }, /* RFC4388 */
822 /* draft-ietf-dhc-leasequery-09.txt
823 { 13, "Lease query" }, */
824 { 14, "Lease known" },
825 { 15, "Lease unknown" },
826 { 16, "Lease active" },
827 { 17, "Unimplemented" },
832 /* DHCP Authentication protocols */
833 #define AUTHEN_PROTO_CONFIG_TOKEN 0
834 #define AUTHEN_PROTO_DELAYED_AUTHEN 1
836 /* DHCP Authentication algorithms for delayed authentication */
837 #define AUTHEN_DELAYED_ALGO_HMAC_MD5 1
839 /* DHCP Authentication Replay Detection Methods */
840 #define AUTHEN_RDM_MONOTONIC_COUNTER 0x00
842 /* DHCP Option Overload (option code 52) */
843 #define OPT_OVERLOAD_FILE 1
844 #define OPT_OVERLOAD_SNAME 2
845 #define OPT_OVERLOAD_BOTH 3
847 /* Server name and boot file offsets and lengths */
848 #define SERVER_NAME_OFFSET 44
849 #define SERVER_NAME_LEN 64
850 #define FILE_NAME_OFFSET 108
851 #define FILE_NAME_LEN 128
852 #define VENDOR_INFO_OFFSET 236
854 static const value_string bootp_nbnt_vals
[] = {
862 static const value_string bootp_client_arch
[] = {
863 { 0x0000, "IA x86 PC" },
864 { 0x0001, "NEC/PC98" },
865 { 0x0002, "IA64 PC" },
866 { 0x0003, "DEC Alpha" },
867 { 0x0004, "ArcX86" },
868 { 0x0005, "Intel Lean Client" },
869 { 0x0006, "EFI IA32" },
870 { 0x0007, "EFI BC" },
871 { 0x0008, "EFI Xscale" },
872 { 0x0009, "EFI x86-64" },
876 static const value_string opt_overload_vals
[] = {
877 { OPT_OVERLOAD_FILE
, "Boot file name holds options", },
878 { OPT_OVERLOAD_SNAME
, "Server host name holds options", },
879 { OPT_OVERLOAD_BOTH
, "Boot file and server host names hold options" },
882 static const value_string slpda_vals
[] = {
883 {0x00, "Dynamic Discovery" },
884 {0x01, "Static Discovery" },
885 {0x80, "Backwards compatibility" },
888 static const value_string slp_scope_vals
[] = {
889 {0x00, "Preferred Scope" },
890 {0x01, "Mandatory Scope" },
893 static const value_string authen_protocol_vals
[] = {
894 {AUTHEN_PROTO_CONFIG_TOKEN
, "configuration token" },
895 {AUTHEN_PROTO_DELAYED_AUTHEN
, "delayed authentication" },
898 static const value_string authen_da_algo_vals
[] = {
899 {AUTHEN_DELAYED_ALGO_HMAC_MD5
, "HMAC_MD5" },
902 static const value_string authen_rdm_vals
[] = {
903 {AUTHEN_RDM_MONOTONIC_COUNTER
, "Monotonically-increasing counter" },
906 static const value_string cl_dss_id_type_vals
[] = {
907 {1, "Primary DSS_ID" },
908 {2, "Secondary DSS_ID" },
912 static const value_string sip_server_enc_vals
[] = {
913 {0, "Fully Qualified Domain Name" },
914 {1, "IPv4 Address" },
917 /* bootp options administration */
918 #define BOOTP_OPT_NUM 256
920 /* Re-define structure. Values to be updated by bootp_init_protocol */
921 static struct opt_info bootp_opt
[BOOTP_OPT_NUM
];
923 static struct opt_info default_bootp_opt
[BOOTP_OPT_NUM
] = {
924 /* 0 */ { "Padding", none
, &hf_bootp_option_padding
},
925 /* 1 */ { "Subnet Mask", ipv4
, &hf_bootp_option_subnet_mask
},
926 /* 2 */ { "Time Offset", time_in_s_secs
, &hf_bootp_option_time_offset
},
927 /* 3 */ { "Router", ipv4_list
, &hf_bootp_option_router
},
928 /* 4 */ { "Time Server", ipv4_list
, &hf_bootp_option_time_server
},
929 /* 5 */ { "Name Server", ipv4_list
, &hf_bootp_option_name_server
},
930 /* 6 */ { "Domain Name Server", ipv4_list
, &hf_bootp_option_domain_name_server
},
931 /* 7 */ { "Log Server", ipv4_list
, &hf_bootp_option_log_server
},
932 /* 8 */ { "Quotes Server", ipv4_list
, &hf_bootp_option_quotes_server
},
933 /* 9 */ { "LPR Server", ipv4_list
, &hf_bootp_option_lpr_server
},
934 /* 10 */ { "Impress Server", ipv4_list
, &hf_bootp_option_impress_server
},
935 /* 11 */ { "Resource Location Server", ipv4_list
, &hf_bootp_option_resource_location_server
},
936 /* 12 */ { "Host Name", string
, &hf_bootp_option_hostname
},
937 /* 13 */ { "Boot File Size", val_u_short
, &hf_bootp_option_boot_file_size
},
938 /* 14 */ { "Merit Dump File", string
, &hf_bootp_option_merit_dump_file
},
939 /* 15 */ { "Domain Name", string
, &hf_bootp_option_domain_name
},
940 /* 16 */ { "Swap Server", ipv4
, &hf_bootp_option_swap_server
},
941 /* 17 */ { "Root Path", string
, &hf_bootp_option_root_path
},
942 /* 18 */ { "Extensions Path", string
, &hf_bootp_option_extension_path
},
943 /* 19 */ { "IP Forwarding", val_boolean
, &hf_bootp_option_ip_forwarding
},
944 /* 20 */ { "Non-Local Source Routing", val_boolean
, &hf_bootp_option_non_local_source_routing
},
945 /* 21 */ { "Policy Filter", special
, NULL
},
946 /* 22 */ { "Maximum Datagram Reassembly Size", val_u_short
, &hf_bootp_option_max_datagram_reassembly_size
},
947 /* 23 */ { "Default IP Time-to-Live", val_u_byte
, &hf_bootp_option_default_ip_ttl
},
948 /* 24 */ { "Path MTU Aging Timeout", time_in_u_secs
, &hf_bootp_option_path_mtu_aging_timeout
},
949 /* 25 */ { "Path MTU Plateau Table", val_u_short_list
, &hf_bootp_option_path_mtu_plateau_table_item
},
950 /* 26 */ { "Interface MTU", val_u_short
, &hf_bootp_option_interface_mtu
},
951 /* 27 */ { "All Subnets are Local", val_boolean
, &hf_bootp_option_all_subnets_are_local
},
952 /* 28 */ { "Broadcast Address", ipv4
, &hf_bootp_option_broadcast_address
},
953 /* 29 */ { "Perform Mask Discovery", val_boolean
, &hf_bootp_option_perform_mask_discovery
},
954 /* 30 */ { "Mask Supplier", val_boolean
, &hf_bootp_option_mask_supplier
},
955 /* 31 */ { "Perform Router Discover", val_boolean
, &hf_bootp_option_perform_router_discover
},
956 /* 32 */ { "Router Solicitation Address", ipv4
, &hf_bootp_option_router_solicitation_address
},
957 /* 33 */ { "Static Route", special
, NULL
},
958 /* 34 */ { "Trailer Encapsulation", val_boolean
, &hf_bootp_option_trailer_encapsulation
},
959 /* 35 */ { "ARP Cache Timeout", time_in_u_secs
, &hf_bootp_option_arp_cache_timeout
},
960 /* 36 */ { "Ethernet Encapsulation", val_boolean
, &hf_bootp_option_ethernet_encapsulation
},
961 /* 37 */ { "TCP Default TTL", val_u_byte
, &hf_bootp_option_tcp_default_ttl
},
962 /* 38 */ { "TCP Keepalive Interval", time_in_u_secs
, &hf_bootp_option_tcp_keepalive_interval
},
963 /* 39 */ { "TCP Keepalive Garbage", val_boolean
, &hf_bootp_option_tcp_keepalive_garbage
},
964 /* 40 */ { "Network Information Service Domain", string
, &hf_bootp_option_nis_domain
},
965 /* 41 */ { "Network Information Service Servers", ipv4_list
, &hf_bootp_option_nis_server
},
966 /* 42 */ { "Network Time Protocol Servers", ipv4_list
, &hf_bootp_option_ntp_server
},
967 /* 43 */ { "Vendor-Specific Information", special
, NULL
},
968 /* 44 */ { "NetBIOS over TCP/IP Name Server", ipv4_list
, &hf_bootp_option_netbios_over_tcpip_name_server
},
969 /* 45 */ { "NetBIOS over TCP/IP Datagram Distribution Name Server", ipv4_list
, &hf_bootp_option_netbios_over_tcpip_dd_name_server
},
970 /* 46 */ { "NetBIOS over TCP/IP Node Type", val_u_byte
, &hf_bootp_option_netbios_over_tcpip_node_type
},
971 /* 47 */ { "NetBIOS over TCP/IP Scope", string
, &hf_bootp_option_netbios_over_tcpip_scope
},
972 /* 48 */ { "X Window System Font Server", ipv4_list
, &hf_bootp_option_xwindows_system_font_server
},
973 /* 49 */ { "X Window System Display Manager", ipv4_list
, &hf_bootp_option_xwindows_system_display_manager
},
974 /* 50 */ { "Requested IP Address", ipv4
, &hf_bootp_option_requested_ip_address
},
975 /* 51 */ { "IP Address Lease Time", time_in_u_secs
, &hf_bootp_option_ip_address_lease_time
},
976 /* 52 */ { "Option Overload", special
, &hf_bootp_option_option_overload
},
977 /* 53 */ { "DHCP Message Type", val_u_byte
, &hf_bootp_option_dhcp
},
978 /* 54 */ { "DHCP Server Identifier", ipv4
, &hf_bootp_option_dhcp_server_id
},
979 /* 55 */ { "Parameter Request List", special
, &hf_bootp_option_parameter_request_list_item
},
980 /* 56 */ { "Message", string
, &hf_bootp_option_message
},
981 /* 57 */ { "Maximum DHCP Message Size", val_u_short
, &hf_bootp_option_dhcp_max_message_size
},
982 /* 58 */ { "Renewal Time Value", time_in_u_secs
, &hf_bootp_option_renewal_time_value
},
983 /* 59 */ { "Rebinding Time Value", time_in_u_secs
, &hf_bootp_option_rebinding_time_value
},
984 /* 60 */ { "Vendor class identifier", special
, NULL
},
985 /* 61 */ { "Client identifier", special
, NULL
},
986 /* 62 */ { "Novell/Netware IP domain", string
, &hf_bootp_option_novell_netware_ip_domain
},
987 /* 63 */ { "Novell Options", special
, NULL
},
988 /* 64 */ { "Network Information Service+ Domain", string
, &hf_bootp_option_nis_plus_domain
},
989 /* 65 */ { "Network Information Service+ Servers", ipv4_list
, &hf_bootp_option_nis_plus_server
},
990 /* 66 */ { "TFTP Server Name", string
, &hf_bootp_option_tftp_server_name
},
991 /* 67 */ { "Bootfile name", string
, &hf_bootp_option_bootfile_name
},
992 /* 68 */ { "Mobile IP Home Agent", ipv4_list
, &hf_bootp_option_mobile_ip_home_agent
},
993 /* 69 */ { "SMTP Server", ipv4_list
, &hf_bootp_option_smtp_server
},
994 /* 70 */ { "POP3 Server", ipv4_list
, &hf_bootp_option_pop3_server
},
995 /* 71 */ { "NNTP Server", ipv4_list
, &hf_bootp_option_nntp_server
},
996 /* 72 */ { "Default WWW Server", ipv4_list
, &hf_bootp_option_default_www_server
},
997 /* 73 */ { "Default Finger Server", ipv4_list
, &hf_bootp_option_default_finger_server
},
998 /* 74 */ { "Default IRC Server", ipv4_list
, &hf_bootp_option_default_irc_server
},
999 /* 75 */ { "StreetTalk Server", ipv4_list
, &hf_bootp_option_streettalk_server
},
1000 /* 76 */ { "StreetTalk Directory Assistance Server", ipv4_list
, &hf_bootp_option_streettalk_da_server
},
1001 /* 77 */ { "User Class Information", special
, NULL
},
1002 /* 78 */ { "Directory Agent Information", special
, NULL
},
1003 /* 79 */ { "Service Location Agent Scope", special
, NULL
},
1004 /* 80 */ { "Rapid commit", opaque
, NULL
},
1005 /* 81 */ { "Client Fully Qualified Domain Name", special
, NULL
},
1006 /* 82 */ { "Agent Information Option", special
, NULL
},
1007 /* 83 */ { "iSNS [TODO:RFC4174]", opaque
, NULL
},
1008 /* 84 */ { "Removed/Unassigned", opaque
, NULL
},
1009 /* 85 */ { "Novell Directory Services Servers", special
, NULL
},
1010 /* 86 */ { "Novell Directory Services Tree Name", string
, &hf_bootp_option_novell_ds_tree_name
},
1011 /* 87 */ { "Novell Directory Services Context", string
, &hf_bootp_option_novell_ds_context
},
1012 /* 88 */ { "BCMCS Controller Domain Name [TODO:RFC4280]", opaque
, NULL
},
1013 /* 89 */ { "BCMCS Controller IPv4 address [TODO:RFC4280]", opaque
, NULL
},
1014 /* 90 */ { "Authentication", special
, NULL
},
1015 /* 91 */ { "Client last transaction time", time_in_u_secs
, &hf_bootp_option_client_last_transaction_time
},
1016 /* 92 */ { "Associated IP option", ipv4_list
, &hf_bootp_option_associated_ip_option
},
1017 /* 93 */ { "Client System Architecture", val_u_short
, &hf_bootp_option_client_system_architecture
},
1018 /* 94 */ { "Client Network Device Interface", special
, NULL
},
1019 /* 95 */ { "LDAP [TODO:RFC3679]", opaque
, NULL
},
1020 /* 96 */ { "Removed/Unassigned", opaque
, NULL
},
1021 /* 97 */ { "UUID/GUID-based Client Identifier", special
, NULL
},
1022 /* 98 */ { "Open Group's User Authentication [TODO:RFC2485]", opaque
, NULL
},
1023 /* 99 */ { "Civic Addresses Configuration", special
, NULL
},
1024 /* 100 */ { "PCode [TODO:RFC4833]", opaque
, NULL
},
1025 /* 101 */ { "TCode [TODO:RFC4833]", opaque
, NULL
},
1026 /* 102 */ { "Removed/unassigned", opaque
, NULL
},
1027 /* 103 */ { "Removed/unassigned", opaque
, NULL
},
1028 /* 104 */ { "Removed/unassigned", opaque
, NULL
},
1029 /* 105 */ { "Removed/unassigned", opaque
, NULL
},
1030 /* 106 */ { "Removed/unassigned", opaque
, NULL
},
1031 /* 107 */ { "Removed/unassigned", opaque
, NULL
},
1032 /* 108 */ { "Removed/Unassigned", opaque
, NULL
},
1033 /* 109 */ { "Unassigned", opaque
, NULL
},
1034 /* 110 */ { "Removed/Unassigned", opaque
, NULL
},
1035 /* 111 */ { "Unassigned", opaque
, NULL
},
1036 /* 112 */ { "NetInfo Parent Server Address", ipv4_list
, &hf_bootp_option_netinfo_parent_server_address
},
1037 /* 113 */ { "NetInfo Parent Server Tag", string
, &hf_bootp_option_netinfo_parent_server_tag
},
1038 /* 114 */ { "URL [TODO:RFC3679]", opaque
, NULL
},
1039 /* 115 */ { "Removed/Unassigned", opaque
, NULL
},
1040 /* 116 */ { "DHCP Auto-Configuration", val_u_byte
, &hf_bootp_option_dhcp_auto_configuration
},
1041 /* 117 */ { "Name Service Search", special
, NULL
},
1042 /* 118 */ { "Subnet Selection Option", ipv4_list
, &hf_bootp_option_subnet_selection_option
},
1043 /* 119 */ { "Domain Search", special
, NULL
},
1044 /* 120 */ { "SIP Servers", special
, NULL
},
1045 /* 121 */ { "Classless Static Route", special
, NULL
},
1046 /* 122 */ { "CableLabs Client Configuration [TODO:RFC3495]", opaque
, NULL
},
1047 /* 123 */ { "Coordinate-based Location Configuration", special
, NULL
},
1048 /* 124 */ { "V-I Vendor Class", special
, NULL
},
1049 /* 125 */ { "V-I Vendor-specific Information", special
, NULL
},
1050 /* 126 */ { "Removed/Unassigned", opaque
, NULL
},
1051 /* 127 */ { "Removed/Unassigned", opaque
, NULL
},
1052 /* 128 */ { "DOCSIS full security server IP [TODO]", opaque
, NULL
},
1053 /* 129 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1054 /* 130 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1055 /* 131 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1056 /* 132 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1057 /* 133 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1058 /* 134 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1059 /* 135 */ { "PXE - undefined (vendor specific)", opaque
, NULL
},
1060 /* 136 */ { "OPTION_PANA_AGENT [TODO:RFC5192]", opaque
, NULL
},
1061 /* 137 */ { "LoST Server Domain Name", string
, &hf_bootp_option_lost_server_domain_name
},
1062 /* 138 */ { "CAPWAP Access Controllers", ipv4_list
, &hf_bootp_option_capwap_access_controller
},
1063 /* 139 */ { "IPv4 Address-MoS", opaque
, NULL
},
1064 /* 140 */ { "IPv4 FQDN-MoS", opaque
, NULL
},
1065 /* 141 */ { "SIP UA Configuration Domains", opaque
, NULL
},
1066 /* 142 */ { "Unassigned", opaque
, NULL
},
1067 /* 143 */ { "Unassigned", opaque
, NULL
},
1068 /* 144 */ { "Unassigned", opaque
, NULL
},
1069 /* 145 */ { "Unassigned", opaque
, NULL
},
1070 /* 146 */ { "Unassigned", opaque
, NULL
},
1071 /* 147 */ { "Unassigned", opaque
, NULL
},
1072 /* 148 */ { "Unassigned", opaque
, NULL
},
1073 /* 149 */ { "Unassigned", opaque
, NULL
},
1074 /* 150 */ { "TFTP Server Address", ipv4_list
, &hf_bootp_option_tftp_server_address
},
1075 /* 151 */ { "Unassigned", opaque
, NULL
},
1076 /* 152 */ { "Unassigned", opaque
, NULL
},
1077 /* 153 */ { "Unassigned", opaque
, NULL
},
1078 /* 154 */ { "Unassigned", opaque
, NULL
},
1079 /* 155 */ { "Unassigned", opaque
, NULL
},
1080 /* 156 */ { "Unassigned", opaque
, NULL
},
1081 /* 157 */ { "Unassigned", opaque
, NULL
},
1082 /* 158 */ { "Unassigned", opaque
, NULL
},
1083 /* 159 */ { "Unassigned", opaque
, NULL
},
1084 /* 160 */ { "Unassigned", opaque
, NULL
},
1085 /* 161 */ { "Unassigned", opaque
, NULL
},
1086 /* 162 */ { "Unassigned", opaque
, NULL
},
1087 /* 163 */ { "Unassigned", opaque
, NULL
},
1088 /* 164 */ { "Unassigned", opaque
, NULL
},
1089 /* 165 */ { "Unassigned", opaque
, NULL
},
1090 /* 166 */ { "Unassigned", opaque
, NULL
},
1091 /* 167 */ { "Unassigned", opaque
, NULL
},
1092 /* 168 */ { "Unassigned", opaque
, NULL
},
1093 /* 169 */ { "Unassigned", opaque
, NULL
},
1094 /* 170 */ { "Unassigned", opaque
, NULL
},
1095 /* 171 */ { "Unassigned", opaque
, NULL
},
1096 /* 172 */ { "Unassigned", opaque
, NULL
},
1097 /* 173 */ { "Unassigned", opaque
, NULL
},
1098 /* 174 */ { "Unassigned", opaque
, NULL
},
1099 /* 175 */ { "Etherboot", opaque
, NULL
},
1100 /* 176 */ { "IP Telephone", opaque
, NULL
},
1101 /* 177 */ { "Etherboot", opaque
, NULL
},
1102 /* 178 */ { "Unassigned", opaque
, NULL
},
1103 /* 179 */ { "Unassigned", opaque
, NULL
},
1104 /* 180 */ { "Unassigned", opaque
, NULL
},
1105 /* 181 */ { "Unassigned", opaque
, NULL
},
1106 /* 182 */ { "Unassigned", opaque
, NULL
},
1107 /* 183 */ { "Unassigned", opaque
, NULL
},
1108 /* 184 */ { "Unassigned", opaque
, NULL
},
1109 /* 185 */ { "Unassigned", opaque
, NULL
},
1110 /* 186 */ { "Unassigned", opaque
, NULL
},
1111 /* 187 */ { "Unassigned", opaque
, NULL
},
1112 /* 188 */ { "Unassigned", opaque
, NULL
},
1113 /* 189 */ { "Unassigned", opaque
, NULL
},
1114 /* 190 */ { "Unassigned", opaque
, NULL
},
1115 /* 191 */ { "Unassigned", opaque
, NULL
},
1116 /* 192 */ { "Unassigned", opaque
, NULL
},
1117 /* 193 */ { "Unassigned", opaque
, NULL
},
1118 /* 194 */ { "Unassigned", opaque
, NULL
},
1119 /* 195 */ { "Unassigned", opaque
, NULL
},
1120 /* 196 */ { "Unassigned", opaque
, NULL
},
1121 /* 197 */ { "Unassigned", opaque
, NULL
},
1122 /* 198 */ { "Unassigned", opaque
, NULL
},
1123 /* 199 */ { "Unassigned", opaque
, NULL
},
1124 /* 200 */ { "Unassigned", opaque
, NULL
},
1125 /* 201 */ { "Unassigned", opaque
, NULL
},
1126 /* 202 */ { "Unassigned", opaque
, NULL
},
1127 /* 203 */ { "Unassigned", opaque
, NULL
},
1128 /* 204 */ { "Unassigned", opaque
, NULL
},
1129 /* 205 */ { "Unassigned", opaque
, NULL
},
1130 /* 206 */ { "Unassigned", opaque
, NULL
},
1131 /* 207 */ { "Unassigned", opaque
, NULL
},
1132 /* 208 */ { "PXELINUX Magic", opaque
, NULL
},
1133 /* 209 */ { "Configuration file", opaque
, NULL
},
1134 /* 210 */ { "Authentication", special
, NULL
}, /* Path Prefix rfc5071 */
1135 /* 211 */ { "Reboot Time", opaque
, NULL
},
1136 /* 212 */ { "6RD", opaque
, NULL
},
1137 /* 213 */ { "V4 Access Domain", opaque
, NULL
},
1138 /* 214 */ { "Unassigned", opaque
, NULL
},
1139 /* 215 */ { "Unassigned", opaque
, NULL
},
1140 /* 216 */ { "Unassigned", opaque
, NULL
},
1141 /* 217 */ { "Unassigned", opaque
, NULL
},
1142 /* 218 */ { "Unassigned", opaque
, NULL
},
1143 /* 219 */ { "Unassigned", opaque
, NULL
},
1144 /* 220 */ { "Subnet Allocation", opaque
, NULL
},
1145 /* 221 */ { "Virtual Subnet Selection", opaque
, NULL
},
1146 /* 222 */ { "Unassigned", opaque
, NULL
},
1147 /* 223 */ { "Unassigned", opaque
, NULL
},
1148 /* 224 */ { "Private", opaque
, NULL
},
1149 /* 225 */ { "Private", opaque
, NULL
},
1150 /* 226 */ { "Private", opaque
, NULL
},
1151 /* 227 */ { "Private", opaque
, NULL
},
1152 /* 228 */ { "Private", opaque
, NULL
},
1153 /* 229 */ { "Private", opaque
, NULL
},
1154 /* 230 */ { "Private", opaque
, NULL
},
1155 /* 231 */ { "Private", opaque
, NULL
},
1156 /* 232 */ { "Private", opaque
, NULL
},
1157 /* 233 */ { "Private", opaque
, NULL
},
1158 /* 234 */ { "Private", opaque
, NULL
},
1159 /* 235 */ { "Private", opaque
, NULL
},
1160 /* 236 */ { "Private", opaque
, NULL
},
1161 /* 237 */ { "Private", opaque
, NULL
},
1162 /* 238 */ { "Private", opaque
, NULL
},
1163 /* 239 */ { "Private", opaque
, NULL
},
1164 /* 240 */ { "Private", opaque
, NULL
},
1165 /* 241 */ { "Private", opaque
, NULL
},
1166 /* 242 */ { "Private", opaque
, NULL
},
1167 /* 243 */ { "Private", opaque
, NULL
},
1168 /* 244 */ { "Private", opaque
, NULL
},
1169 /* 245 */ { "Private", opaque
, NULL
},
1170 /* 246 */ { "Private", opaque
, NULL
},
1171 /* 247 */ { "Private", opaque
, NULL
},
1172 /* 248 */ { "Private", opaque
, NULL
},
1173 /* 249 */ { "Private/Classless Static Route (Microsoft)", special
, NULL
},
1174 /* 250 */ { "Private", opaque
, NULL
},
1175 /* 251 */ { "Private", opaque
, NULL
},
1176 /* 252 */ { "Private/Proxy autodiscovery", string
, &hf_bootp_option_private_proxy_autodiscovery
},
1177 /* 253 */ { "Private", opaque
, NULL
},
1178 /* 254 */ { "Private", opaque
, NULL
},
1179 /* 255 */ { "End", opaque
, NULL
}
1182 /*-------------------------------------
1184 *-------------------------------------
1186 /* UAT entry structure. */
1190 enum field_type ftype
;
1192 } uat_bootp_record_t
;
1194 static uat_bootp_record_t
*uat_bootp_records
= NULL
;
1195 static uat_t
*bootp_uat
= NULL
;
1196 static guint num_bootp_records_uat
= 0;
1198 static void* uat_bootp_record_copy_cb(void* n
, const void* o
, size_t siz _U_
) {
1199 uat_bootp_record_t
* new_record
= (uat_bootp_record_t
*)n
;
1200 const uat_bootp_record_t
* old_record
= (const uat_bootp_record_t
*)o
;
1202 if (old_record
->text
) {
1203 new_record
->text
= g_strdup(old_record
->text
);
1205 new_record
->text
= NULL
;
1211 static void uat_bootp_record_update_cb(void* r
, const char** err
) {
1212 uat_bootp_record_t
* rec
= (uat_bootp_record_t
*)r
;
1214 if ((rec
->opt
== 0) || (rec
->opt
>=BOOTP_OPT_NUM
-1))
1215 *err
= g_strdup_printf("Option must be between 1 and %d", BOOTP_OPT_NUM
-2);
1218 static void uat_bootp_record_free_cb(void*r
) {
1219 uat_bootp_record_t
* rec
= (uat_bootp_record_t
*)r
;
1221 if (rec
->text
) g_free(rec
->text
);
1224 UAT_DEC_CB_DEF(uat_bootp_records
, opt
, uat_bootp_record_t
)
1225 UAT_CSTRING_CB_DEF(uat_bootp_records
, text
, uat_bootp_record_t
)
1226 UAT_VS_DEF(uat_bootp_records
, ftype
, uat_bootp_record_t
, enum field_type
, special
, "string")
1229 static struct opt_info
* bootp_get_opt(unsigned int idx
)
1231 if(idx
>=BOOTP_OPT_NUM
)
1234 return &bootp_opt
[idx
];
1238 bootp_get_opt_text(unsigned int idx
)
1240 if(idx
>=BOOTP_OPT_NUM
)
1242 return bootp_opt
[idx
].text
;
1245 struct basic_types_hfs
{
1253 gint
* val_u_short_list
;
1255 gint
* time_in_s_secs
;
1256 gint
* time_in_u_secs
;
1259 /* Handle "basic" datatypes adding to a tree */
1261 bootp_handle_basic_types(packet_info
*pinfo
, proto_tree
*tree
, proto_item
*item
, tvbuff_t
*tvb
,
1262 enum field_type ftype
, int offset
, int total_len
,
1263 gint
*hf
, struct basic_types_hfs
* hf_default
)
1267 guint32 time_u_secs
;
1273 proto_tree_add_item(tree
, *hf
, tvb
, offset
, total_len
, ENC_BIG_ENDIAN
);
1274 else if (hf_default
->bytes
!= NULL
)
1275 proto_tree_add_item(tree
, *hf_default
->bytes
, tvb
, offset
, total_len
, ENC_BIG_ENDIAN
);
1276 consumed
= total_len
;
1280 if (total_len
!= 4) {
1281 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 4");
1286 proto_tree_add_item(tree
, *hf
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1287 else if (hf_default
->ipv4
!= NULL
)
1288 proto_tree_add_item(tree
, *hf_default
->ipv4
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1293 for (i
= offset
, left
= total_len
; left
> 0; i
+= 4, left
-= 4) {
1295 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "Option length isn't a multiple of 4");
1300 proto_tree_add_item(tree
, *hf
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
1301 else if (hf_default
->ipv4_list
!= NULL
)
1302 proto_tree_add_item(tree
, *hf_default
->ipv4_list
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
1310 proto_tree_add_item(tree
, *hf
, tvb
, offset
, total_len
, ENC_BIG_ENDIAN
);
1311 else if (hf_default
->string
!= NULL
)
1312 proto_tree_add_item(tree
, *hf_default
->string
, tvb
, offset
, total_len
, ENC_BIG_ENDIAN
);
1313 consumed
= total_len
;
1317 if (total_len
!= 1) {
1318 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 1");
1323 proto_tree_add_item(tree
, *hf
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1324 else if (hf_default
->val_boolean
!= NULL
)
1325 proto_tree_add_item(tree
, *hf_default
->val_boolean
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1330 if (total_len
!= 1) {
1331 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 1");
1336 proto_tree_add_item(tree
, *hf
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1337 else if (hf_default
->val_u_byte
!= NULL
)
1338 proto_tree_add_item(tree
, *hf_default
->val_u_byte
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1343 if (total_len
!= 2) {
1344 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 2");
1349 proto_tree_add_item(tree
, *hf
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1350 else if (hf_default
->val_u_short
!= NULL
)
1351 proto_tree_add_item(tree
, *hf_default
->val_u_short
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1355 case val_u_le_short
:
1356 if (total_len
!= 2) {
1357 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 2");
1362 proto_tree_add_item(tree
, *hf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1363 else if (hf_default
->val_u_short
!= NULL
)
1364 proto_tree_add_item(tree
, *hf_default
->val_u_short
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1368 case val_u_short_list
:
1369 for (i
= offset
, left
= total_len
; left
> 0; i
+= 2, left
-= 2) {
1371 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "Option length isn't a multiple of 2");
1376 proto_tree_add_item(tree
, *hf
, tvb
, i
, 2, ENC_BIG_ENDIAN
);
1377 else if (hf_default
->val_u_short_list
!= NULL
)
1378 proto_tree_add_item(tree
, *hf_default
->val_u_short_list
, tvb
, i
, 2, ENC_BIG_ENDIAN
);
1384 if (total_len
!= 4) {
1385 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 4");
1390 proto_tree_add_item(tree
, *hf
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1391 else if (hf_default
->val_u_long
!= NULL
)
1392 proto_tree_add_item(tree
, *hf_default
->val_u_long
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1396 case time_in_s_secs
:
1397 if (total_len
!= 4) {
1398 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 4");
1403 time_s_secs
= (gint32
) tvb_get_ntohl(tvb
, offset
);
1404 proto_tree_add_int_format_value(tree
, *hf
,
1405 tvb
, offset
, 4, time_s_secs
, "(%ds) %s", time_s_secs
, time_secs_to_str(time_s_secs
));
1407 else if (hf_default
->time_in_s_secs
!= NULL
)
1408 proto_tree_add_item(tree
, *hf_default
->time_in_s_secs
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1413 case time_in_u_secs
:
1414 if (total_len
!= 4) {
1415 expert_add_info_format(pinfo
, item
, &ei_bootp_bad_length
, "length isn't 4");
1420 time_u_secs
= tvb_get_ntohl(tvb
, offset
);
1421 proto_tree_add_uint_format_value(tree
, *hf
,
1422 tvb
, offset
, 4, time_u_secs
, "(%us) %s", time_u_secs
,
1423 ((time_u_secs
== 0xffffffff) ? "infinity" : time_secs_to_str_unsigned(time_u_secs
)));
1425 else if (hf_default
->time_in_u_secs
!= NULL
)
1426 proto_tree_add_item(tree
, *hf_default
->time_in_u_secs
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1430 /* Ignore other field_types */
1437 /* Returns the number of bytes consumed by this option. */
1439 bootp_option(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*bp_tree
, int voff
,
1440 int eoff
, gboolean first_pass
, gboolean
*at_end
, const char **dhcp_type_p
,
1441 const guint8
**vendor_class_id_p
, guint8
*overload_p
)
1443 struct opt_info
*opt
;
1444 enum field_type ftype
;
1445 guchar code
= tvb_get_guint8(tvb
, voff
);
1448 int i
, consumed
, basictype_consumed
;
1449 int optoff
, optleft
, optend
;
1451 proto_item
*vti
, *ti
;
1456 int o52voff
, o52eoff
;
1460 const guchar
*dns_name
;
1461 gboolean option_handled
= TRUE
;
1463 struct basic_types_hfs default_hfs
= {
1464 &hf_bootp_option_value
,
1465 &hf_bootp_option_value_ip_address
,
1466 &hf_bootp_option_value_ip_address
,
1467 &hf_bootp_option_value_stringz
,
1468 &hf_bootp_option_value_boolean
,
1469 &hf_bootp_option_value_8
,
1470 &hf_bootp_option_value_16
,
1471 &hf_bootp_option_value_16
,
1472 &hf_bootp_option_value_u32
,
1473 &hf_bootp_option_value_i32
,
1474 &hf_bootp_option_value_u32
1477 /* Options whose length isn't "optlen + 2". */
1480 case 0: /* Padding */
1481 /* check how much padding we have */
1482 for (i
= voff
+ 1; i
< eoff
; i
++ ) {
1483 if (tvb_get_guint8(tvb
, i
) != 0) {
1489 if (bp_tree
!= NULL
) {
1490 vti
= proto_tree_add_uint_format_value(bp_tree
, hf_bootp_option_type
,
1491 tvb
, voff
, 1, 0, "(0) Padding");
1492 v_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
1493 proto_tree_add_item(v_tree
, hf_bootp_option_padding
, tvb
, voff
, i
, ENC_NA
);
1499 case 255: /* End Option */
1501 if (bp_tree
!= NULL
) {
1502 vti
= proto_tree_add_uint_format_value(bp_tree
, hf_bootp_option_type
,
1503 tvb
, voff
, 1, 0, "(255) End");
1504 v_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
1506 proto_tree_add_item(v_tree
, hf_bootp_option_end_overload
, tvb
, voff
, 1, ENC_BIG_ENDIAN
);
1508 proto_tree_add_item(v_tree
, hf_bootp_option_end
, tvb
, voff
, 1, ENC_BIG_ENDIAN
);
1517 * Get the length of the option, and the number of bytes it
1518 * consumes (the length doesn't include the option code or
1521 * On the first pass, check first whether we have the length
1522 * byte, so that we don't throw an exception; if we throw an
1523 * exception in the first pass, which is only checking for options
1524 * whose values we need in order to properly dissect the packet
1525 * on the second pass, we won't actually dissect the options, so
1526 * you won't be able to see which option had the problem.
1529 if (!tvb_bytes_exist(tvb
, voff
+1, 1)) {
1531 * We don't have the length byte; just return 1
1532 * as the number of bytes we consumed, to count
1538 optlen
= tvb_get_guint8(tvb
, voff
+1);
1539 consumed
= optlen
+ 2;
1542 * In the first pass, we don't put anything into the protocol
1543 * tree; we just check for some options we have to look at
1544 * in order to properly process the packet:
1546 * 52 (Overload) - we need this to properly dissect the
1547 * file and sname fields
1549 * 53 (DHCP message type) - if this is present, this is DHCP
1551 * 60 (Vendor class identifier) - we need this in order to
1552 * interpret the vendor-specific info
1554 * We also check, before fetching anything, to make sure we
1555 * have the entire item we're fetching, so that we don't throw
1559 if (tvb_bytes_exist(tvb
, voff
+2, consumed
-2)) {
1563 *overload_p
= tvb_get_guint8(tvb
, voff
+2);
1568 val_to_str(tvb_get_guint8(tvb
, voff
+2),
1570 "Unknown Message Type (0x%02x)");
1574 *vendor_class_id_p
=
1575 tvb_get_ptr(tvb
, voff
+2, consumed
-2);
1578 rfc3396_dns_domain_search_list
.total_number_of_block
++;
1581 rfc3396_sip_server
.total_number_of_block
++;
1587 * We don't do anything else here.
1593 opt
= bootp_get_opt(code
);
1596 /* THIS SHOULD NEVER HAPPEN!!! */
1600 /* function type may be overridden and that shouldn't be a 'saved' change */
1605 vti
= proto_tree_add_uint_format_value(bp_tree
, hf_bootp_option_type
,
1606 tvb
, voff
, consumed
, code
, "(%d) %s", code
, opt
->text
);
1607 v_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
1608 proto_tree_add_item(v_tree
, hf_bootp_option_length
, tvb
, voff
+1, 1, ENC_BIG_ENDIAN
);
1610 ti
= proto_tree_add_item(v_tree
, hf_bootp_option_value
, tvb
, voff
+2, optlen
, ENC_NA
);
1611 PROTO_ITEM_SET_HIDDEN(ti
);
1616 case 21: /* Policy Filter */
1617 for (i
= optoff
, optleft
= optlen
;
1618 optleft
> 0; i
+= 8, optleft
-= 8) {
1620 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Option length isn't a multiple of 8");
1624 proto_tree_add_item(v_tree
, hf_bootp_option_policy_filter_ip
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
1625 proto_tree_add_item(v_tree
, hf_bootp_option_policy_filter_subnet_mask
, tvb
, i
+4, 4, ENC_BIG_ENDIAN
);
1629 case 33: /* Static Route */
1630 for (i
= optoff
, optleft
= optlen
;
1631 optleft
> 0; i
+= 8, optleft
-= 8) {
1633 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Option length isn't a multiple of 8");
1637 proto_tree_add_item(v_tree
, hf_bootp_option_static_route_ip
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
1638 proto_tree_add_item(v_tree
, hf_bootp_option_static_route_router
, tvb
, i
+4, 4, ENC_BIG_ENDIAN
);
1642 case 43: /* Vendor-Specific Info */
1643 s_option
= tvb_get_guint8(tvb
, optoff
);
1645 /* PXE protocol 2.1 as described in the Intel specs */
1646 if (*vendor_class_id_p
!= NULL
&&
1647 strncmp((const gchar
*)*vendor_class_id_p
, "PXEClient", strlen("PXEClient")) == 0) {
1648 proto_item_append_text(vti
, " (PXEClient)");
1649 v_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
1651 optend
= optoff
+ optlen
;
1652 while (optoff
< optend
) {
1653 optoff
= dissect_vendor_pxeclient_suboption(pinfo
, vti
, v_tree
,
1654 tvb
, optoff
, optend
);
1656 } else if (*vendor_class_id_p
!= NULL
&&
1657 ((strncmp((const gchar
*)*vendor_class_id_p
, "pktc", strlen("pktc")) == 0) ||
1658 (strncmp((const gchar
*)*vendor_class_id_p
, "docsis", strlen("docsis")) == 0) ||
1659 (strncmp((const gchar
*)*vendor_class_id_p
, "OpenCable2.0", strlen("OpenCable2.0")) == 0) ||
1660 (strncmp((const gchar
*)*vendor_class_id_p
, "CableHome", strlen("CableHome")) == 0))) {
1661 /* CableLabs standard - see www.cablelabs.com/projects */
1662 proto_item_append_text(vti
, " (CableLabs)");
1664 optend
= optoff
+ optlen
;
1665 while (optoff
< optend
) {
1666 optoff
= dissect_vendor_cablelabs_suboption(pinfo
, vti
, v_tree
,
1667 tvb
, optoff
, optend
);
1669 } else if (s_option
==58 || s_option
==64 || s_option
==65
1670 || s_option
==66 || s_option
==67) {
1671 /* Note that this is a rather weak (permissive) heuristic, */
1672 /* but since it comes last, I guess this is OK. */
1673 /* Add any stronger (less permissive) heuristics before this! */
1674 /* Alcatel-Lucent DHCP Extensions */
1675 proto_item_append_text(vti
, " (Alcatel-Lucent)");
1676 optend
= optoff
+ optlen
;
1677 while (optoff
< optend
) {
1678 optoff
= dissect_vendor_alcatel_suboption(pinfo
, vti
, v_tree
,
1679 tvb
, optoff
, optend
);
1684 case 52: /* Option Overload */
1686 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 1");
1690 byte
= tvb_get_guint8(tvb
, optoff
);
1691 proto_tree_add_item(v_tree
, *opt
->phf
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
1693 /* Just in case we find an option 52 in sname or file */
1694 if (voff
> VENDOR_INFO_OFFSET
&& byte
>= 1 && byte
<= 3) {
1695 if (byte
& OPT_OVERLOAD_FILE
) {
1697 oti
= proto_tree_add_text (bp_tree
, tvb
,
1698 FILE_NAME_OFFSET
, FILE_NAME_LEN
,
1699 "Boot file name option overload");
1700 o52voff
= FILE_NAME_OFFSET
;
1701 o52eoff
= FILE_NAME_OFFSET
+ FILE_NAME_LEN
;
1703 rfc3396_dns_domain_search_list
.index_current_block
= 0;
1704 rfc3396_sip_server
.index_current_block
= 0;
1705 while (o52voff
< o52eoff
&& !o52at_end
) {
1706 o52voff
+= bootp_option(tvb
, pinfo
, bp_tree
, o52voff
,
1707 o52eoff
, FALSE
, &o52at_end
,
1708 dhcp_type_p
, vendor_class_id_p
,
1713 expert_add_info(pinfo
, oti
, &hf_bootp_opt_overload_file_end_missing
);
1716 if (byte
& OPT_OVERLOAD_SNAME
) {
1718 oti
= proto_tree_add_text (bp_tree
, tvb
,
1719 SERVER_NAME_OFFSET
, SERVER_NAME_LEN
,
1720 "Server host name option overload");
1721 o52voff
= SERVER_NAME_OFFSET
;
1722 o52eoff
= SERVER_NAME_OFFSET
+ SERVER_NAME_LEN
;
1724 rfc3396_dns_domain_search_list
.index_current_block
= 0;
1725 rfc3396_sip_server
.index_current_block
= 0;
1726 while (o52voff
< o52eoff
&& !o52at_end
) {
1727 o52voff
+= bootp_option(tvb
, pinfo
, bp_tree
, o52voff
,
1728 o52eoff
, FALSE
, &o52at_end
,
1729 dhcp_type_p
, vendor_class_id_p
,
1734 expert_add_info(pinfo
, oti
, &hf_bootp_opt_overload_sname_end_missing
);
1737 /* The final end option is not in overload */
1742 case 55: /* Parameter Request List */
1743 for (i
= 0; i
< optlen
; i
++) {
1744 byte
= tvb_get_guint8(tvb
, optoff
+i
);
1745 proto_tree_add_uint_format_value(v_tree
, hf_bootp_option_parameter_request_list_item
,
1746 tvb
, optoff
+i
, 1, byte
, "(%d) %s", byte
, bootp_get_opt_text(byte
));
1750 case 60: /* Vendor class identifier */
1752 * XXX - RFC 2132 says this is a string of octets;
1753 * should we check for non-printables?
1756 proto_tree_add_item(v_tree
, hf_bootp_option_vendor_class_id
, tvb
, optoff
, consumed
-2, ENC_ASCII
|ENC_NA
);
1757 if ((tvb_memeql(tvb
, optoff
, (const guint8
*)PACKETCABLE_MTA_CAP10
,
1758 (int)strlen(PACKETCABLE_MTA_CAP10
)) == 0)
1760 (tvb_memeql(tvb
, optoff
, (const guint8
*)PACKETCABLE_MTA_CAP15
,
1761 (int)strlen(PACKETCABLE_MTA_CAP15
)) == 0)
1763 (tvb_memeql(tvb
, optoff
, (const guint8
*)PACKETCABLE_MTA_CAP20
,
1764 (int)strlen(PACKETCABLE_MTA_CAP20
)) == 0))
1766 dissect_packetcable_mta_cap(v_tree
, tvb
, optoff
, optlen
);
1768 if ((tvb_memeql(tvb
, optoff
, (const guint8
*)PACKETCABLE_CM_CAP11
,
1769 (int)strlen(PACKETCABLE_CM_CAP11
)) == 0)
1771 (tvb_memeql(tvb
, optoff
, (const guint8
*)PACKETCABLE_CM_CAP20
,
1772 (int)strlen(PACKETCABLE_CM_CAP20
)) == 0 ))
1774 dissect_docsis_cm_cap(v_tree
, tvb
, optoff
, optlen
, FALSE
);
1776 if (tvb_memeql(tvb
, optoff
, (const guint8
*)PACKETCABLE_CM_CAP30
,
1777 (int)strlen(PACKETCABLE_CM_CAP30
)) == 0 )
1779 proto_tree_add_text(v_tree
, tvb
, optoff
, optlen
,
1780 "vendor-class-data: \"%s\"", tvb_format_stringzpad(tvb
, optoff
, optlen
));
1784 case 61: /* Client Identifier */
1786 byte
= tvb_get_guint8(tvb
, optoff
);
1790 /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll
1791 guess that the first is the hwtype, and the last 6
1793 /* See http://www.iana.org/assignments/arp-parameters */
1794 /* RFC2132 9.14 Client-identifier has the following to say:
1795 A hardware type of 0 (zero) should be used when the value
1796 field contains an identifier other than a hardware address
1797 (e.g. a fully qualified domain name). */
1799 if (optlen
== 7 && byte
> 0 && byte
< 48) {
1800 proto_tree_add_item(v_tree
,
1801 hf_bootp_hw_type
, tvb
, optoff
, 1,
1804 if (byte
== ARPHRD_ETHER
|| byte
== ARPHRD_IEEE802
)
1805 proto_tree_add_item(v_tree
,
1806 hf_bootp_hw_ether_addr
, tvb
, optoff
+1, 6,
1809 proto_tree_add_text(v_tree
, tvb
, optoff
+1, 6,
1810 "Client hardware address: %s",
1811 tvb_arphrdaddr_to_str(tvb
, optoff
+1, 6, byte
));
1812 } else if (optlen
== 17 && byte
== 0) {
1813 /* Identifier is a UUID */
1814 proto_tree_add_item(v_tree
, hf_bootp_client_identifier_uuid
,
1815 tvb
, optoff
+ 1, 16, ENC_LITTLE_ENDIAN
);
1816 /* From RFC 4631 paragraph 6.1 DHCPv4 Client Behavior:
1817 To send an RFC 3315-style binding identifier in a DHCPv4 'client
1818 identifier' option, the type of the 'client identifier' option is set
1820 } else if (byte
== 255) {
1826 /* The type field is immediately followed by the IAID, which is
1827 an opaque 32-bit quantity */
1828 proto_tree_add_text(v_tree
, tvb
, optoff
+1, 4,
1830 tvb_arphrdaddr_to_str(tvb
, optoff
+1, 4, byte
));
1831 optoff
= optoff
+ 5;
1832 duidtype
= tvb_get_ntohs(tvb
, optoff
);
1833 proto_tree_add_text(v_tree
, tvb
, optoff
, 2,
1834 "DUID type: %s (%u)",
1835 val_to_str_const(duidtype
, duidtype_vals
, "Unknown"),
1840 expert_add_info(pinfo
, vti
, &ei_bootp_mal_duid
);
1843 hwtype
=tvb_get_ntohs(tvb
, optoff
+ 2);
1844 proto_tree_add_item(v_tree
, hf_bootp_client_identifier_duid_llt_hw_type
,
1845 tvb
, optoff
+ 2, 2, ENC_BIG_ENDIAN
);
1847 /* XXX seconds since Jan 1 2000 */
1848 proto_tree_add_text(v_tree
, tvb
, optoff
+ 4, 4,
1849 "Time: %u", tvb_get_ntohl(tvb
, optoff
+ 4));
1851 proto_tree_add_text(v_tree
, tvb
, optoff
+ 8,
1852 optlen
- 13, "Link-layer address: %s",
1853 tvb_arphrdaddr_to_str(tvb
, optoff
+8, optlen
-13, hwtype
));
1858 expert_add_info(pinfo
, vti
, &ei_bootp_mal_duid
);
1861 enterprise
= tvb_get_ntohl(tvb
, optoff
+2);
1862 proto_tree_add_text(v_tree
, tvb
, optoff
+ 2, 4,
1863 "Enterprise-number: %s (%u)",
1864 val_to_str_ext_const( enterprise
, &sminmpec_values_ext
, "Unknown"),
1867 buf
= tvb_bytes_to_str(tvb
, optoff
+ 6, optlen
- 11);
1868 proto_tree_add_text(v_tree
, tvb
, optoff
+ 6,
1869 optlen
- 11, "identifier: %s", buf
);
1874 expert_add_info(pinfo
, vti
, &ei_bootp_mal_duid
);
1877 hwtype
=tvb_get_ntohs(tvb
, optoff
+ 2);
1878 proto_tree_add_item(v_tree
, hf_bootp_client_identifier_duid_ll_hw_type
,
1879 tvb
, optoff
+ 2, 2, ENC_BIG_ENDIAN
);
1882 proto_tree_add_text(v_tree
, tvb
, optoff
+ 4,
1883 optlen
- 9, "Link-layer address: %s",
1884 tvb_arphrdaddr_to_str(tvb
, optoff
+4, optlen
-9, hwtype
));
1889 /* otherwise, it's opaque data */
1892 case 77: { /* User Class Information RFC 3004 */
1893 guchar user_class_instance_index
;
1895 proto_tree
*o77_v_tree
;
1897 expert_add_info_format(pinfo
, v_tree
, &ei_bootp_bad_length
, "length isn't >= 2");
1901 for (user_class_instance_index
= 0, i
= 0, byte
= tvb_get_guint8(tvb
, optoff
); i
< optlen
; byte
= tvb_get_guint8(tvb
, optoff
+ i
), user_class_instance_index
++) {
1902 /* Create subtree for instance of User Class. */
1903 vtix
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option77_user_class
,
1904 tvb
, optoff
+ i
, byte
+ 1, user_class_instance_index
, "[%d]", user_class_instance_index
);
1905 o77_v_tree
= proto_item_add_subtree(vtix
, ett_bootp_option77_instance
);
1907 /* Add length for instance of User Class. */
1908 proto_tree_add_item(o77_v_tree
, hf_bootp_option77_user_class_length
,
1909 tvb
, optoff
+ i
, 1, ENC_BIG_ENDIAN
);
1912 expert_add_info_format(pinfo
, vtix
, &ei_bootp_bad_length
, "UC_Len_%u isn't >= 1 (UC_Len_%u = 0)", user_class_instance_index
, user_class_instance_index
);
1915 optleft
-= byte
+ 1;
1917 expert_add_info(pinfo
, vtix
, &ei_bootp_option77_user_class_malformed
);
1921 /* Add data for instance of User Class. */
1922 proto_tree_add_item(o77_v_tree
, hf_bootp_option77_user_class_data
,
1923 tvb
, optoff
+ i
+ 1, byte
, ENC_BIG_ENDIAN
);
1925 /* Slide to next instance of User Class if any. */
1930 case 97: /* Client Identifier (UUID) */
1932 byte
= tvb_get_guint8(tvb
, optoff
);
1936 /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll
1937 guess that the first is the hwtype, and the last 6
1939 /* See http://www.iana.org/assignments/arp-parameters */
1940 /* RFC2132 9.14 Client-identifier has the following to say:
1941 A hardware type of 0 (zero) should be used when the value
1942 field contains an identifier other than a hardware address
1943 (e.g. a fully qualified domain name). */
1945 if (optlen
== 7 && byte
> 0 && byte
< 48) {
1946 proto_tree_add_item(v_tree
,
1947 hf_bootp_hw_type
, tvb
, optoff
, 1,
1949 if (byte
== ARPHRD_ETHER
|| byte
== ARPHRD_IEEE802
)
1950 proto_tree_add_item(v_tree
,
1951 hf_bootp_hw_ether_addr
, tvb
, optoff
+1, 6,
1954 proto_tree_add_text(v_tree
, tvb
, optoff
+1, 6,
1955 "Client hardware address: %s",
1956 tvb_arphrdaddr_to_str(tvb
, optoff
+1, 6, byte
));
1957 } else if (optlen
== 17 && byte
== 0) {
1958 /* Identifier is a UUID */
1959 proto_tree_add_item(v_tree
, hf_bootp_client_identifier_uuid
,
1960 tvb
, optoff
+ 1, 16, ENC_LITTLE_ENDIAN
);
1962 /* otherwise, it's opaque data */
1966 case 63: /* NetWare/IP options (RFC 2242) */
1968 optend
= optoff
+ optlen
;
1969 while (optoff
< optend
)
1970 optoff
= dissect_netware_ip_suboption(pinfo
, vti
, v_tree
, tvb
, optoff
, optend
);
1973 case 78: /* SLP Directory Agent Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/
1975 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 1");
1979 byte
= tvb_get_guint8(tvb
, optoff
);
1980 proto_tree_add_item(v_tree
, hf_bootp_option_slp_directory_agent_value
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
1990 for (i
= optoff
; optleft
> 0; i
+= 4, optleft
-= 4) {
1992 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Option length isn't a multiple of 4");
1996 proto_tree_add_item(v_tree
, hf_bootp_option_slp_directory_agent_slpda_address
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
2000 case 79: /* SLP Service Scope Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/
2001 proto_tree_add_item(v_tree
, hf_bootp_option_slp_service_scope_value
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2004 optleft
= optlen
- 1;
2005 proto_tree_add_item(v_tree
, hf_bootp_option_slp_service_scope_string
, tvb
, optoff
, optleft
, ENC_ASCII
|ENC_NA
);
2008 case 81: /* Client Fully Qualified Domain Name */
2010 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 3");
2013 fqdn_flags
= tvb_get_guint8(tvb
, optoff
);
2014 proto_tree_add_text(v_tree
, tvb
, optoff
, 1, "Flags: 0x%02x", fqdn_flags
);
2015 proto_tree_add_item(v_tree
, hf_bootp_fqdn_mbz
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2016 proto_tree_add_item(v_tree
, hf_bootp_fqdn_n
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2017 proto_tree_add_item(v_tree
, hf_bootp_fqdn_e
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2018 proto_tree_add_item(v_tree
, hf_bootp_fqdn_o
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2019 proto_tree_add_item(v_tree
, hf_bootp_fqdn_s
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2020 /* XXX: use code from packet-dns for return code decoding */
2021 proto_tree_add_item(v_tree
, hf_bootp_fqdn_rcode1
, tvb
, optoff
+1, 1, ENC_BIG_ENDIAN
);
2022 /* XXX: use code from packet-dns for return code decoding */
2023 proto_tree_add_item(v_tree
, hf_bootp_fqdn_rcode2
, tvb
, optoff
+2, 1, ENC_BIG_ENDIAN
);
2025 if (fqdn_flags
& F_FQDN_E
) {
2026 get_dns_name(tvb
, optoff
+3, optlen
-3, optoff
+3, &dns_name
);
2027 proto_tree_add_string(v_tree
, hf_bootp_fqdn_name
,
2028 tvb
, optoff
+3, optlen
-3, dns_name
);
2030 proto_tree_add_item(v_tree
, hf_bootp_fqdn_asciiname
,
2031 tvb
, optoff
+3, optlen
-3, ENC_ASCII
|ENC_NA
);
2036 case 82: /* Relay Agent Information Option */
2037 optend
= optoff
+ optlen
;
2038 while (optoff
< optend
)
2039 optoff
= bootp_dhcp_decode_agent_info(pinfo
, vti
, v_tree
, tvb
, optoff
, optend
);
2042 case 85: /* Novell Servers (RFC 2241) */
2043 /* Option 85 can be sent as a string */
2044 /* Added by Greg Morris (gmorris[AT]novell.com) */
2045 if (novell_string
) {
2046 proto_tree_add_item(v_tree
, hf_bootp_option_novell_dss_string
, tvb
, optoff
, optlen
, ENC_ASCII
|ENC_NA
);
2049 for (i
= optoff
, optleft
= optlen
; optleft
> 0;
2050 i
+= 4, optleft
-= 4) {
2052 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Option length isn't a multiple of 4");
2056 proto_tree_add_item(v_tree
, hf_bootp_option_novell_dss_ip
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
2061 case 94: { /* Client network interface identifier */
2064 id_type
= tvb_get_guint8(tvb
, optoff
);
2066 if (id_type
== 0x01) {
2067 proto_tree_add_item(v_tree
, hf_bootp_option_client_network_id_major_ver
,
2068 tvb
, optoff
+ 1, 1, ENC_LITTLE_ENDIAN
);
2069 proto_tree_add_item(v_tree
, hf_bootp_option_client_network_id_minor_ver
,
2070 tvb
, optoff
+ 2, 1, ENC_LITTLE_ENDIAN
);
2076 case 90: /* DHCP Authentication */
2077 case 210: /* Was this used for authentication at one time? */
2079 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 11");
2083 protocol
= tvb_get_guint8(tvb
, optoff
);
2085 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_protocol
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2089 algorithm
= tvb_get_guint8(tvb
, optoff
);
2092 case AUTHEN_PROTO_DELAYED_AUTHEN
:
2093 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_alg_delay
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2097 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_algorithm
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2103 rdm
= tvb_get_guint8(tvb
, optoff
);
2104 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_rdm
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2110 case AUTHEN_RDM_MONOTONIC_COUNTER
:
2111 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_rdm_replay_detection
, tvb
, optoff
, 8, ENC_BIG_ENDIAN
);
2115 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_rdm_rdv
, tvb
, optoff
, 8, ENC_ASCII
|ENC_NA
);
2123 case AUTHEN_PROTO_DELAYED_AUTHEN
:
2124 switch (algorithm
) {
2126 case AUTHEN_DELAYED_ALGO_HMAC_MD5
:
2127 if (*dhcp_type_p
&& !strcmp(*dhcp_type_p
, OPT53_DISCOVER
)) {
2128 /* Discover has no Secret ID nor HMAC MD5 Hash */
2132 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 31");
2136 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_secret_id
, tvb
, optoff
, 4, ENC_BIG_ENDIAN
);
2139 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_hmac_md5_hash
, tvb
, optoff
, 16, ENC_ASCII
|ENC_NA
);
2147 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_information
, tvb
, optoff
, optleft
, ENC_ASCII
|ENC_NA
);
2156 proto_tree_add_item(v_tree
, hf_bootp_option_dhcp_authentication_information
, tvb
, optoff
, optleft
, ENC_ASCII
|ENC_NA
);
2161 case 99: /* civic location (RFC 4776) */
2166 proto_tree_add_item(v_tree
, hf_bootp_option_civic_location_what
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2167 proto_tree_add_item(v_tree
, hf_bootp_option_civic_location_country
, tvb
, optoff
+1, 2, ENC_ASCII
|ENC_NA
);
2168 optleft
= optleft
- 3;
2169 optoff
= optoff
+ 3;
2171 while (optleft
>= 2)
2173 int calength
= tvb_get_guint8(tvb
, optoff
+1);
2174 proto_tree_add_item(v_tree
, hf_bootp_option_civic_location_ca_type
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2175 proto_tree_add_item(v_tree
, hf_bootp_option_civic_location_ca_length
, tvb
, optoff
+1, 1, ENC_BIG_ENDIAN
);
2183 if (optleft
>= calength
)
2185 proto_tree_add_item(v_tree
, hf_bootp_option_civic_location_ca_value
, tvb
, optoff
, calength
, ENC_ASCII
|ENC_NA
);
2187 optoff
= optoff
+ calength
;
2188 optleft
= optleft
- calength
;
2193 expert_add_info(pinfo
, vti
, &ei_bootp_option_civic_location_bad_cattype
);
2199 case 117: /* The Name Service Search Option for DHCP (RFC 2937) */
2201 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 2");
2202 } else if (optlen
& 1) {
2203 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length (%u) isn't even number", optlen
);
2206 for (i
= 0, ns
= tvb_get_ntohs(tvb
, optoff
); i
< optlen
; i
+= 2, ns
= tvb_get_ntohs(tvb
, optoff
+ i
)) {
2208 case RFC2937_LOCAL_NAMING_INFORMATION
:
2209 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_name_service_search_option
, tvb
, optoff
+ i
, 2, "Local naming information (e.g., an /etc/hosts file on a UNIX machine) (0)");
2211 case RFC2937_DOMAIN_NAME_SERVER_OPTION
:
2212 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_name_service_search_option
, tvb
, optoff
+ i
, 2, "Domain Name Server Option (6)");
2214 case RFC2937_NETWORK_INFORMATION_SERVERS_OPTION
:
2215 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_name_service_search_option
, tvb
, optoff
+ i
, 2, "Network Information Servers Option (41)");
2217 case RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION
:
2218 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_name_service_search_option
, tvb
, optoff
+ i
, 2, "NetBIOS over TCP/IP Name Server Option (44)");
2220 case RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION
:
2221 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_name_service_search_option
, tvb
, optoff
+ i
, 2, "Network Information Service+ Servers Option (65)");
2224 expert_add_info_format(pinfo
, vti
, &ei_bootp_option_dhcp_name_service_invalid
,
2225 "Invalid Name Service (%u). RFC 2937 defines only 0, 6, 41, 44, and 65 as possible values.", ns
);
2232 case 119: { /* Dynamic Host Configuration Protocol (DHCP) Domain Search Option (RFC 3397) */
2233 /* Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4) (RFC 3396) */
2234 /* Domain Names - Implementation And Specification (RFC 1035) */
2235 char tmpChar
[BOOTP_MAX_NO_CHAR
];
2236 rfc3396_dns_domain_search_list
.index_current_block
++;
2237 if (rfc3396_dns_domain_search_list
.total_number_of_block
> 1) {
2238 g_snprintf(tmpChar
, BOOTP_MAX_NO_CHAR
, "%u/%u", rfc3396_dns_domain_search_list
.index_current_block
, rfc3396_dns_domain_search_list
.total_number_of_block
);
2239 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_dns_domain_search_list_rfc_3396_detected
, tvb
, optoff
, optlen
, tmpChar
);
2240 if (rfc3396_dns_domain_search_list
.index_current_block
!= rfc3396_dns_domain_search_list
.total_number_of_block
) {
2241 g_snprintf(tmpChar
, BOOTP_MAX_NO_CHAR
, "%u/%u", rfc3396_dns_domain_search_list
.total_number_of_block
, rfc3396_dns_domain_search_list
.total_number_of_block
);
2242 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_dns_domain_search_list_refer_last_option
, tvb
, optoff
, optlen
, tmpChar
);
2246 if (rfc3396_dns_domain_search_list
.tvb_composite
== NULL
&& optlen
) {
2247 /* We use composite tvb for managing RFC 3396 */
2248 rfc3396_dns_domain_search_list
.tvb_composite
= tvb_new_composite();
2251 /* Concatenate the block before being interpreted for managing RFC 3396 */
2253 tvb_composite_append(rfc3396_dns_domain_search_list
.tvb_composite
, tvb_new_subset(tvb
, optoff
, optlen
, optlen
));
2255 if (rfc3396_dns_domain_search_list
.index_current_block
== rfc3396_dns_domain_search_list
.total_number_of_block
2256 && rfc3396_dns_domain_search_list
.tvb_composite
) {
2257 /* Here, we are into the last (or unique) option 119. */
2258 /* We will display the information about fqdn */
2259 unsigned int consumedx
= 0;
2260 unsigned int offset
= 0;
2261 tvb_composite_finalize(rfc3396_dns_domain_search_list
.tvb_composite
);
2263 while (offset
< tvb_length(rfc3396_dns_domain_search_list
.tvb_composite
)) {
2264 /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */
2265 consumedx
= get_dns_name(rfc3396_dns_domain_search_list
.tvb_composite
, offset
, tvb_length(rfc3396_dns_domain_search_list
.tvb_composite
), 0, &dns_name
);
2266 if (rfc3396_dns_domain_search_list
.total_number_of_block
== 1) {
2267 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2268 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_dns_domain_search_list_fqdn
, tvb
, optoff
+ offset
, consumedx
, dns_name
);
2270 /* RFC 3396 is used, so the option is split into several option 119. We don't link fqdn with v_tree. */
2271 proto_tree_add_string(v_tree
, hf_bootp_option_dhcp_dns_domain_search_list_fqdn
, tvb
, 0, 0, dns_name
);
2273 offset
+= consumedx
;
2275 rfc3396_dns_domain_search_list
.tvb_composite
= NULL
;
2279 case 120: { /* SIP Servers (RFC 3361) */
2280 /* Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4) (RFC 3396) */
2281 /* Domain Names - Implementation And Specification (RFC 1035) */
2282 char tmpChar
[BOOTP_MAX_NO_CHAR
];
2283 rfc3396_sip_server
.index_current_block
++;
2284 if (rfc3396_sip_server
.total_number_of_block
> 1) {
2285 g_snprintf(tmpChar
, BOOTP_MAX_NO_CHAR
, "%u/%u", rfc3396_sip_server
.index_current_block
, rfc3396_sip_server
.total_number_of_block
);
2286 proto_tree_add_string(v_tree
, hf_bootp_option_sip_server_rfc_3396_detected
, tvb
, optoff
, optlen
, tmpChar
);
2287 if (rfc3396_sip_server
.index_current_block
!= rfc3396_sip_server
.total_number_of_block
) {
2288 g_snprintf(tmpChar
, BOOTP_MAX_NO_CHAR
, "%u/%u", rfc3396_sip_server
.total_number_of_block
, rfc3396_sip_server
.total_number_of_block
);
2289 proto_tree_add_string(v_tree
, hf_bootp_option_sip_server_refer_last_option
, tvb
, optoff
, optlen
, tmpChar
);
2293 if (rfc3396_sip_server
.tvb_composite
== NULL
&& optlen
) {
2294 /* We use composite tvb for managing RFC 3396 */
2295 rfc3396_sip_server
.tvb_composite
= tvb_new_composite();
2298 /* Concatenate the block before being interpreted for managing RFC 3396 */
2300 tvb_composite_append(rfc3396_sip_server
.tvb_composite
, tvb_new_subset(tvb
, optoff
, optlen
, optlen
));
2302 if (rfc3396_sip_server
.index_current_block
== rfc3396_sip_server
.total_number_of_block
2303 && rfc3396_sip_server
.tvb_composite
) {
2304 /* Here, we are into the last (or unique) option 120. */
2305 /* We will display the information about SIP server */
2307 unsigned int offset
= 1; /* ignore enc */
2308 tvb_composite_finalize(rfc3396_sip_server
.tvb_composite
);
2310 enc
= tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, 0);
2311 if (rfc3396_sip_server
.total_number_of_block
== 1) {
2312 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2313 proto_tree_add_uint(v_tree
, hf_bootp_option_sip_server_enc
, tvb
, optoff
, 1, enc
);
2315 /* RFC 3396 is used, so the option is split into several option 120. We don't link fqdn with v_tree. */
2316 proto_tree_add_uint(v_tree
, hf_bootp_option_sip_server_enc
, tvb
, 0, 0, enc
);
2320 case RFC_3361_ENC_FQDN
: {
2321 unsigned int consumedx
= 0;
2322 if (tvb_length(rfc3396_sip_server
.tvb_composite
) < 3) {
2323 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 3 (len = %u)", tvb_length(rfc3396_sip_server
.tvb_composite
));
2327 while (offset
< tvb_length(rfc3396_sip_server
.tvb_composite
)) {
2328 /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */
2329 consumedx
= get_dns_name(rfc3396_sip_server
.tvb_composite
, offset
, tvb_length(rfc3396_sip_server
.tvb_composite
), 1 /* ignore enc */, &dns_name
);
2331 if (rfc3396_sip_server
.total_number_of_block
== 1) {
2332 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2333 proto_tree_add_string(v_tree
, hf_bootp_option_sip_server_name
, tvb
, optoff
+ offset
, consumedx
, dns_name
);
2335 /* RFC 3396 is used, so the option is split into several option 120. We don't link fqdn with v_tree. */
2336 proto_tree_add_string(v_tree
, hf_bootp_option_sip_server_name
, tvb
, 0, 0, dns_name
);
2338 offset
+= consumedx
;
2340 rfc3396_sip_server
.tvb_composite
= NULL
;
2343 case RFC_3361_ENC_IPADDR
:
2344 if (tvb_length(rfc3396_sip_server
.tvb_composite
) < 5) {
2345 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 5 (len = %u)", tvb_length(rfc3396_sip_server
.tvb_composite
));
2348 /* x % 2^n == x & (2^n - 1) note : (assuming x is a positive integer) */
2349 if ((tvb_length(rfc3396_sip_server
.tvb_composite
) - 1) & 3) {
2350 if (rfc3396_sip_server
.total_number_of_block
== 1)
2351 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't a multiple of 4 plus 1 (len = %u).", tvb_length(rfc3396_sip_server
.tvb_composite
));
2353 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
,
2354 "length isn't a multiple of 4 plus 1 (len = %u). For your information with RFC 3396, the length is the length sum of all options 120 into this BOOTP packet.",
2355 tvb_length(rfc3396_sip_server
.tvb_composite
));
2358 while (offset
< tvb_length(rfc3396_sip_server
.tvb_composite
)) {
2359 if (rfc3396_sip_server
.total_number_of_block
== 1) {
2360 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2361 proto_tree_add_item(v_tree
, hf_bootp_option_sip_server_address
, rfc3396_sip_server
.tvb_composite
, offset
, 4, ENC_BIG_ENDIAN
);
2363 /* RFC 3396 is used, so the option is split into several option 120. We don't link fqdn with v_tree. */
2364 /* Since we don't use the "numbered argument" as described by README.developer, we have to repeat the arguments :( */
2365 g_snprintf(tmpChar
, BOOTP_MAX_NO_CHAR
, "%u.%u.%u.%u (%u.%u.%u.%u)",
2366 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
),
2367 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
+ 1),
2368 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
+ 2),
2369 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
+ 3),
2370 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
),
2371 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
+ 1),
2372 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
+ 2),
2373 tvb_get_guint8(rfc3396_sip_server
.tvb_composite
, offset
+ 3)
2375 proto_tree_add_string(v_tree
, hf_bootp_option_sip_server_address_stringz
, tvb
, 0, 0, tmpChar
);
2381 expert_add_info_format(pinfo
, vti
, &ei_bootp_option_sip_server_address_encoding
, "RFC 3361 defines only 0 and 1 for Encoding byte (Encoding = %u).", enc
);
2387 case 121: /* Classless Static Route */
2388 case 249: { /* Classless Static Route (Microsoft) */
2389 int mask_width
, significant_octets
;
2390 optend
= optoff
+ optlen
;
2391 /* minimum length is 5 bytes */
2393 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't >= 5");
2396 while (optoff
< optend
) {
2397 mask_width
= tvb_get_guint8(tvb
, optoff
);
2398 /* mask_width <= 32 */
2399 if (mask_width
> 32) {
2400 expert_add_info_format(pinfo
, vti
, &ei_bootp_option_classless_static_route
, "Mask width (%d) > 32", mask_width
);
2403 significant_octets
= (mask_width
+ 7) / 8;
2404 vti
= proto_tree_add_text(v_tree
, tvb
, optoff
,
2405 1 + significant_octets
+ 4,
2406 "Subnet/MaskWidth-Router: ");
2408 /* significant octets + router(4) */
2409 if (optend
< optoff
+ significant_octets
+ 4) {
2410 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Remaining length (%d) < %d bytes", optend
- optoff
, significant_octets
+ 4);
2414 proto_item_append_text(vti
, "default");
2416 for(i
= 0 ; i
< significant_octets
; i
++) {
2418 proto_item_append_text(vti
, ".");
2419 byte
= tvb_get_guint8(tvb
, optoff
++);
2420 proto_item_append_text(vti
, "%d", byte
);
2422 for(i
= significant_octets
; i
< 4 ; i
++)
2423 proto_item_append_text(vti
, ".0");
2424 proto_item_append_text(vti
, "/%d", mask_width
);
2426 proto_item_append_text(vti
, "-%s", tvb_ip_to_str(tvb
, optoff
));
2432 case 123: /* coordinate based location RFC 3825 or CableLabs DSS_ID */
2435 unsigned char lci
[16];
2436 struct rfc3825_location_fixpoint_t location_fp
;
2437 struct rfc3825_location_decimal_t location
;
2439 for (c
=0; c
< 16;c
++)
2440 lci
[c
] = (unsigned char) tvb_get_guint8(tvb
, optoff
+ c
);
2442 /* convert lci encoding into fixpoint location */
2443 rfc3825_lci_to_fixpoint(lci
, &location_fp
);
2445 /* convert location from decimal to fixpoint */
2446 i
= rfc3825_fixpoint_to_decimal(&location_fp
, &location
);
2448 if (i
!= RFC3825_NOERROR
) {
2449 proto_tree_add_text(v_tree
, tvb
, optoff
, optlen
, "Error: %s", val_to_str_const(i
, rfc3825_error_types
, "Unknown"));
2451 proto_tree_add_text(v_tree
, tvb
, optoff
, 5, "Latitude: %15.10f", location
.latitude
);
2452 proto_tree_add_text(v_tree
, tvb
, optoff
+5, 5, "Longitude: %15.10f", location
.longitude
);
2453 proto_tree_add_text(v_tree
, tvb
, optoff
, 1, "Latitude resolution: %15.10f", location
.latitude_res
);
2454 proto_tree_add_text(v_tree
, tvb
, optoff
+5, 1, "Longitude resolution: %15.10f", location
.longitude_res
);
2455 proto_tree_add_text(v_tree
, tvb
, optoff
+12, 4, "Altitude: %15.10f", location
.altitude
);
2456 proto_tree_add_text(v_tree
, tvb
, optoff
+10, 2, "Altitude resolution: %15.10f", location
.altitude_res
);
2457 proto_tree_add_text(v_tree
, tvb
, optoff
+10, 1, "Altitude type: %s (%d)", val_to_str_const(location
.altitude_type
, altitude_type_values
, "Unknown"), location
.altitude_type
);
2458 proto_tree_add_text(v_tree
, tvb
, optoff
+15, 1, "Map Datum: %s (%d)", val_to_str_const(location
.datum_type
, map_datum_type_values
, "Unknown"), location
.datum_type
);
2460 } else if (optlen
< 69) { /* CableLabs DSS_ID */
2462 proto_tree_add_item(v_tree
, hf_bootp_option_cl_dss_id_option
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2463 proto_tree_add_item(v_tree
, hf_bootp_option_cl_dss_id_len
, tvb
, optoff
+1, 1, ENC_BIG_ENDIAN
);
2464 s_len
= tvb_get_guint8(tvb
, optoff
+1);
2465 proto_tree_add_item(v_tree
, hf_bootp_option_cl_dss_id
, tvb
, optoff
+2, s_len
, ENC_ASCII
|ENC_NA
);
2467 if (optlen
> s_len
+2) { /* Second DSS_ID*/
2469 proto_tree_add_item(v_tree
, hf_bootp_option_cl_dss_id_option
, tvb
, optoff
+2+s_len
, 1, ENC_BIG_ENDIAN
);
2470 proto_tree_add_item(v_tree
, hf_bootp_option_cl_dss_id_len
, tvb
, optoff
+1+2+s_len
, 1, ENC_BIG_ENDIAN
);
2471 s_len
= tvb_get_guint8(tvb
, optoff
+1+2+s_len
);
2472 proto_tree_add_item(v_tree
, hf_bootp_option_cl_dss_id
, tvb
, optoff
+2+2+s_len
, s_len
, ENC_ASCII
|ENC_NA
);
2475 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Invalid length of DHCP option!");
2479 case 124: { /* V-I Vendor Class */
2483 /* CableLab specific */
2484 proto_tree_add_item(v_tree
, hf_bootp_option_vi_class_cl_address_mode
, tvb
, optoff
, optlen
, ENC_BIG_ENDIAN
);
2490 while (optleft
> 0) {
2493 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length < 5");
2497 proto_tree_add_item(v_tree
, hf_bootp_option_vi_class_enterprise
, tvb
, optoff
, 4, ENC_BIG_ENDIAN
);
2498 proto_tree_add_item(v_tree
, hf_bootp_option_vi_class_data_length
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2499 data_len
= tvb_get_guint8(tvb
, optoff
+ 4);
2504 proto_tree_add_item(v_tree
, hf_bootp_option_vi_class_data
, tvb
, optoff
, data_len
, ENC_ASCII
|ENC_NA
);
2506 /* look for next enterprise number */
2508 optleft
-= data_len
;
2513 case 125: { /* V-I Vendor-specific Information */
2516 int s_option_len
= 0;
2517 proto_tree
*e_tree
= 0;
2519 optend
= optoff
+ optlen
;
2522 while (optleft
> 0) {
2525 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length < 5");
2529 enterprise
= tvb_get_ntohl(tvb
, optoff
);
2530 vti
= proto_tree_add_item(v_tree
, hf_bootp_option125_enterprise
, tvb
, optoff
, 4, ENC_BIG_ENDIAN
);
2532 s_option_len
= tvb_get_guint8(tvb
, optoff
+ 4);
2537 /* Handle DSL Forum TR-111 Option 125 */
2538 switch (enterprise
) {
2540 case 3561: /* ADSL Forum */
2541 s_end
= optoff
+ s_option_len
;
2542 if ( s_end
> optend
) {
2543 expert_add_info_format(pinfo
, vti
, &ei_bootp_option125_enterprise_malformed
, "no room left in option for enterprise %u data", enterprise
);
2547 e_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
2548 while (optoff
< s_end
) {
2550 optoff
= dissect_vendor_tr111_suboption(pinfo
, vti
, e_tree
, tvb
, optoff
, s_end
);
2554 case 4491: /* CableLab */
2555 s_end
= optoff
+ s_option_len
;
2556 if ( s_end
> optend
) {
2557 expert_add_info_format(pinfo
, vti
, &ei_bootp_option125_enterprise_malformed
, "no room left in option for enterprise %u data", enterprise
);
2561 e_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
2562 while (optoff
< s_end
) {
2563 optoff
= dissect_vendor_cl_suboption(pinfo
, vti
, e_tree
, tvb
, optoff
, s_end
);
2568 /* skip over the data and look for next enterprise number */
2569 optoff
+= s_option_len
;
2572 optleft
-= s_option_len
;
2577 case 212: { /* 6RD option (RFC 5969) */
2579 expert_add_info(pinfo
, vti
, &ei_bootp_option_6RD_malformed
);
2583 proto_tree_add_item(v_tree
, hf_bootp_option_6RD_ipv4_mask_len
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2584 proto_tree_add_item(v_tree
, hf_bootp_option_6RD_prefix_len
, tvb
, optoff
+1, 1, ENC_BIG_ENDIAN
);
2585 proto_tree_add_item(v_tree
, hf_bootp_option_6RD_prefix
, tvb
, optoff
+2, 16, ENC_NA
);
2586 proto_tree_add_item(v_tree
, hf_bootp_option_6RD_border_relay_ip
, tvb
, optoff
+18, 4, ENC_BIG_ENDIAN
);
2588 /* More Border Relay IPv4 addresses included */
2591 for (i
= optoff
, optleft
= optlen
- 22; optleft
> 0; i
+= 4, optleft
-= 4) {
2593 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "Option length isn't a multiple of 4");
2597 proto_tree_add_item(v_tree
, hf_bootp_option_6RD_border_relay_ip
, tvb
, i
, 4, ENC_BIG_ENDIAN
);
2603 default: /* not special */
2604 /* The PacketCable CCC option number can vary. If this is a CCC option,
2605 handle it as a special.
2607 if (code
== pkt_ccc_option
) {
2609 proto_item_append_text(vti
,
2610 "CableLabs Client Configuration (%d bytes)",
2612 optend
= optoff
+ optlen
;
2613 while (optoff
< optend
) {
2614 switch (pkt_ccc_protocol_version
) {
2616 case PACKETCABLE_CCC_I05
:
2617 optoff
= dissect_packetcable_i05_ccc(pinfo
, vti
, v_tree
, tvb
, optoff
, optend
);
2619 case PACKETCABLE_CCC_DRAFT5
:
2620 case PACKETCABLE_CCC_RFC_3495
:
2621 optoff
= dissect_packetcable_ietf_ccc(pinfo
, vti
, v_tree
, tvb
, optoff
, optend
, pkt_ccc_protocol_version
);
2623 default: /* XXX Should we do something here? */
2628 option_handled
= FALSE
;
2634 basictype_consumed
= bootp_handle_basic_types(pinfo
, v_tree
, vti
, tvb
, ftype
,
2635 optoff
, optlen
, opt
->phf
, &default_hfs
);
2637 if ((basictype_consumed
== 0) && (option_handled
== FALSE
) &&
2638 (opt
->phf
== NULL
) && (optlen
> 0)) {
2639 proto_tree_add_item(v_tree
, hf_bootp_option_value
, tvb
, voff
+2, optlen
, ENC_NA
);
2645 static const value_string option82_suboption_vals
[] = {
2647 { 1, "Agent Circuit ID" },
2648 { 2, "Agent Remote ID" },
2650 { 4, "DOCSIS Device Class" },
2651 { 5, "Link selection" },
2652 { 6, "Subscriber ID" },
2653 { 7, "RADIUS Attributes" },
2654 { 8, "Authentication" },
2655 { 9, "Vendor-Specific Information" },
2657 { 11, "Server ID Override" },
2658 { 150, "Link selection (Cisco proprietary)" },
2659 { 151, "VRF name/VPN ID" },
2660 { 152, "Server ID Override (Cisco proprietary)" },
2665 bootp_dhcp_decode_agent_info(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
, tvbuff_t
*tvb
, int optoff
,
2668 int suboptoff
= optoff
;
2669 guint8 subopt
, idx
, vs_opt
, vs_len
;
2670 int subopt_len
, subopt_end
, datalen
;
2672 proto_item
*vti
, *ti
;
2673 proto_tree
*o82_v_tree
, *o82_sub_tree
;
2674 guint8 tag
, tag_len
;
2676 struct basic_types_hfs default_hfs
= {
2677 &hf_bootp_option82_value
,
2678 &hf_bootp_option82_value_ip_address
,
2679 &hf_bootp_option82_value_ip_address
,
2680 &hf_bootp_option82_value_stringz
,
2682 &hf_bootp_option82_value_8
,
2685 &hf_bootp_option82_value_32
,
2692 struct opt_info info
;
2694 static struct opt82_info o82_opt
[]= {
2695 {0, {"nop", bytes
, &hf_bootp_option82_padding
}}, /* dummy */
2696 {1, {"Agent Circuit ID", bytes
, &hf_bootp_option82_agent_circuit_id
}}, /* [RFC3046] */
2697 {2, {"Agent Remote ID", bytes
, &hf_bootp_option82_agent_remote_id
}}, /* [RFC3046] */
2698 {3, {"Reserved", bytes
, &hf_bootp_option82_reserved
}},
2699 {4, {"DOCSIS Device Class", val_u_long
, &hf_bootp_option82_docsis_device_class
}}, /* [RFC3256] */
2700 {5, {"Link selection", ipv4
, &hf_bootp_option82_link_selection
}}, /* [RFC3527] */
2701 {6, {"Subscriber ID", string
, &hf_bootp_option82_subscriber_id
}}, /* [RFC3993] */ /***** CHECK STRING TYPE */
2702 {7, {"RADIUS Attributes", bytes
, &hf_bootp_option82_radius_attributes
}}, /* [RFC4014] */
2703 {8, {"Authentication", bytes
, &hf_bootp_option82_authentication
}}, /* [RFC4030] */
2704 {9, {"Vendor-Specific Information", special
, &hf_bootp_option82_vi
}}, /* [RFC 4243] */
2705 {10, {"Flags", val_u_byte
, &hf_bootp_option82_flags
}}, /* [RFC5010] */
2706 {11, {"Server ID Override", ipv4
, &hf_bootp_option82_server_id_override
}}, /* [RFC 5107] */
2707 {150, {"Link selection (Cisco proprietary)", ipv4
, &hf_bootp_option82_link_selection_cisco
}}, /* [RFC3527] */
2708 {151, {"VRF name/VPN ID", special
, &hf_bootp_option82_vrf_name_vpn_id
}}, /* [RFC2685] */
2709 {152, {"Server ID Override (Cisco proprietary)", ipv4
, &hf_bootp_option82_server_id_override_cisco
}} /* [RFC 5107] */
2712 subopt
= tvb_get_guint8(tvb
, optoff
);
2715 if (suboptoff
>= optend
) {
2716 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
2717 "Suboption %d: no room left in option for suboption length", subopt
);
2721 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
2722 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option82_suboption
,
2723 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s", subopt
, val_to_str_const(subopt
, option82_suboption_vals
, "Unknown"));
2725 o82_v_tree
= proto_item_add_subtree(vti
, ett_bootp_option82_suboption
);
2726 proto_tree_add_item(o82_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
2729 subopt_end
= suboptoff
+subopt_len
;
2730 if (subopt_end
> optend
) {
2731 expert_add_info_format(pinfo
, vti
, &ei_bootp_missing_subopt_value
,
2732 "Suboption %d: no room left in option for suboption value", subopt
);
2736 for (idx
= 0; idx
< array_length(o82_opt
); idx
++) {
2737 if (o82_opt
[idx
].id
== subopt
) {
2742 ti
= proto_tree_add_item(o82_v_tree
, hf_bootp_option82_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
2744 if ( (idx
>= 1 ) && (idx
< array_length(o82_opt
)) ) {
2745 PROTO_ITEM_SET_HIDDEN(ti
);
2746 if (o82_opt
[idx
].info
.ftype
== special
) {
2750 while (suboptoff
< subopt_end
) {
2751 enterprise
= tvb_get_ntohl(tvb
, suboptoff
);
2752 vti
= proto_tree_add_item(o82_v_tree
, hf_bootp_option82_vi_enterprise
, tvb
, suboptoff
, 4, ENC_BIG_ENDIAN
);
2755 o82_sub_tree
= proto_item_add_subtree(vti
, ett_bootp_option82_suboption9
);
2756 datalen
= tvb_get_guint8(tvb
, suboptoff
);
2757 proto_tree_add_item(o82_sub_tree
, hf_bootp_option82_vi_data_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
2760 switch (enterprise
) {
2761 case 4491: /* CableLab */
2762 vs_opt
= tvb_get_guint8(tvb
, suboptoff
);
2763 proto_tree_add_item(o82_sub_tree
, hf_bootp_option82_vi_cl_option
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
2765 vs_len
= tvb_get_guint8(tvb
, suboptoff
);
2766 proto_tree_add_item(o82_sub_tree
, hf_bootp_option82_vi_cl_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
2773 tag
= tvb_get_guint8(tvb
, suboptoff
);
2774 proto_tree_add_item(o82_sub_tree
, hf_bootp_option82_vi_cl_tag
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
2775 tag_len
= tvb_get_guint8(tvb
, suboptoff
+1);
2776 proto_tree_add_item(o82_sub_tree
, hf_bootp_option82_vi_cl_tag_length
, tvb
, suboptoff
+1, 1, ENC_BIG_ENDIAN
);
2779 proto_tree_add_uint_format_value(o82_sub_tree
, hf_bootp_option82_vi_cl_docsis_version
,
2780 tvb
, suboptoff
, 2, 0, "%d.%d",
2781 tvb_get_guint8(tvb
, suboptoff
), tvb_get_guint8(tvb
, suboptoff
+1));
2784 expert_add_info_format(pinfo
, vti
, &ei_bootp_option82_vi_cl_tag_unknown
, "Unknown tag %d (%d bytes)", tag
, tag_len
);
2785 suboptoff
+= tag_len
;
2788 suboptoff
+= vs_len
;
2793 expert_add_info_format(pinfo
, vti
, &ei_bootp_suboption_invalid
, "Invalid suboption %d (%d bytes)", vs_opt
, vs_len
);
2794 suboptoff
+= vs_len
;
2799 proto_tree_add_item(o82_v_tree
, hf_bootp_option82_value
, tvb
, suboptoff
, datalen
, ENC_NA
);
2800 suboptoff
+= datalen
;
2806 if (subopt_len
!= 7) {
2807 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 7");
2810 proto_tree_add_item(o82_v_tree
, hf_bootp_option82_vrf_name_vpn_id_oui
, tvb
, suboptoff
, 3, ENC_BIG_ENDIAN
);
2811 proto_tree_add_item(o82_v_tree
, hf_bootp_option82_vrf_name_vpn_id_index
, tvb
, suboptoff
+3, 4, ENC_BIG_ENDIAN
);
2814 if (o82_opt
[idx
].info
.phf
!= NULL
)
2815 proto_tree_add_item(o82_v_tree
, *o82_opt
[idx
].info
.phf
, tvb
, suboptoff
, subopt_len
, ENC_BIG_ENDIAN
);
2817 proto_tree_add_item(o82_v_tree
, hf_bootp_option82_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
2822 if (bootp_handle_basic_types(pinfo
, o82_v_tree
, vti
, tvb
, o82_opt
[idx
].info
.ftype
,
2823 suboptoff
, subopt_len
, o82_opt
[idx
].info
.phf
, &default_hfs
) == 0) {
2824 expert_add_info_format(pinfo
, vti
, &hf_bootp_subopt_unknown_type
, "ERROR, please report: Unknown subopt type handler %d", subopt
);
2829 optoff
+= (subopt_len
+ 2);
2833 static const value_string option43_pxeclient_suboption_vals
[] = {
2835 { 1, "PXE mtftp IP" },
2836 { 2, "PXE mtftp client port" },
2837 { 3, "PXE mtftp server port" },
2838 { 4, "PXE mtftp timeout" },
2839 { 5, "PXE mtftp delay" },
2840 { 6, "PXE discovery control" },
2841 { 7, "PXE multicast address" },
2842 { 8, "PXE boot servers" },
2843 { 9, "PXE boot menu" },
2844 { 10, "PXE menu prompt" },
2845 { 11, "PXE multicast address alloc", },
2846 { 12, "PXE credential types" },
2847 { 71, "PXE boot item" },
2853 dissect_vendor_pxeclient_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
2854 tvbuff_t
*tvb
, int optoff
, int optend
)
2856 int suboptoff
= optoff
;
2859 proto_tree
*o43pxeclient_v_tree
;
2860 proto_item
*vti
, *ti
;
2862 struct basic_types_hfs default_hfs
= {
2864 &hf_bootp_option43_value_ip_address
,
2865 &hf_bootp_option43_value_ip_address
,
2868 &hf_bootp_option43_value_8
,
2876 static struct opt_info o43pxeclient_opt
[]= {
2877 /* 0 */ {"nop", special
, &hf_bootp_option43_pxeclient_padding
}, /* dummy */
2878 /* 1 */ {"PXE mtftp IP", ipv4_list
, &hf_bootp_option43_pxeclient_mtftp_ip
},
2879 /* 2 */ {"PXE mtftp client port", val_u_le_short
, &hf_bootp_option43_pxeclient_mtftp_client_port
},
2880 /* 3 */ {"PXE mtftp server port",val_u_le_short
, &hf_bootp_option43_pxeclient_mtftp_server_port
},
2881 /* 4 */ {"PXE mtftp timeout", val_u_byte
, &hf_bootp_option43_pxeclient_mtftp_timeout
},
2882 /* 5 */ {"PXE mtftp delay", val_u_byte
, &hf_bootp_option43_pxeclient_mtftp_delay
},
2883 /* 6 */ {"PXE discovery control", val_u_byte
, &hf_bootp_option43_pxeclient_discovery_control
},
2885 * Correct: b0 (lsb): disable broadcast discovery
2886 * b1: disable multicast discovery
2887 * b2: only use/accept servers in boot servers
2888 * b3: download bootfile without prompt/menu/disc
2890 /* 7 */ {"PXE multicast address", ipv4_list
, &hf_bootp_option43_pxeclient_multicast_address
},
2891 /* 8 */ {"PXE boot servers", special
, &hf_bootp_option43_pxeclient_boot_servers
},
2892 /* 9 */ {"PXE boot menu", special
, &hf_bootp_option43_pxeclient_boot_menu
},
2893 /* 10 */ {"PXE menu prompt", special
, &hf_bootp_option43_pxeclient_menu_prompt
},
2894 /* 11 */ {"PXE multicast address alloc", special
, &hf_bootp_option43_pxeclient_multicast_address_alloc
},
2895 /* 12 */ {"PXE credential types", special
, &hf_bootp_option43_pxeclient_credential_types
}
2896 /* 71 {"PXE boot item", bytes, &hf_bootp_option43_pxeclient_boot_item}, */
2897 /* 255 {"PXE end options", special, &hf_bootp_option43_pxeclient_end} */
2900 subopt
= tvb_get_guint8(tvb
, optoff
);
2904 proto_tree_add_item(v_tree
, hf_bootp_option43_pxeclient_padding
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2906 } else if (subopt
== 255) { /* End Option */
2907 proto_tree_add_item(v_tree
, hf_bootp_option43_pxeclient_end
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
2908 /* Make sure we skip any junk left this option */
2912 if (suboptoff
>= optend
) {
2913 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
2914 "Suboption %d: no room left in option for suboption length", subopt
);
2918 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
2919 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option43_pxeclient_suboption
,
2920 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s",
2921 subopt
, val_to_str_const(subopt
, option43_pxeclient_suboption_vals
, "Unknown"));
2923 o43pxeclient_v_tree
= proto_item_add_subtree(vti
, ett_bootp_option43_suboption
);
2924 proto_tree_add_item(o43pxeclient_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
2927 ti
= proto_tree_add_item(o43pxeclient_v_tree
, hf_bootp_option43_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
2928 PROTO_ITEM_SET_HIDDEN(ti
);
2930 if ( subopt
== 71 ) { /* 71 {"PXE boot item", special} */
2932 /* I may need to decode that properly one day */
2933 proto_tree_add_item(o43pxeclient_v_tree
, hf_bootp_option43_pxeclient_boot_item
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
2934 } else if ((subopt
< 1) || (subopt
>= array_length(o43pxeclient_opt
))) {
2935 expert_add_info_format(pinfo
, vti
, &ei_bootp_suboption_invalid
, "Unknown suboption %d (%d bytes)", subopt
, subopt_len
);
2936 } else if (o43pxeclient_opt
[subopt
].ftype
== special
) {
2937 /* I may need to decode that properly one day */
2938 if (o43pxeclient_opt
[subopt
].phf
!= NULL
)
2939 proto_tree_add_item(o43pxeclient_v_tree
, *o43pxeclient_opt
[subopt
].phf
, tvb
, suboptoff
, subopt_len
, ENC_BIG_ENDIAN
);
2941 proto_tree_add_item(o43pxeclient_v_tree
, hf_bootp_option43_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
2943 if (bootp_handle_basic_types(pinfo
, o43pxeclient_v_tree
, vti
, tvb
, o43pxeclient_opt
[subopt
].ftype
,
2944 suboptoff
, subopt_len
, o43pxeclient_opt
[subopt
].phf
, &default_hfs
) == 0)
2946 expert_add_info_format(pinfo
, vti
, &hf_bootp_subopt_unknown_type
, "ERROR, please report: Unknown subopt type handler %d", subopt
);
2950 optoff
+= (subopt_len
+ 2);
2954 /* RFC3825Decoder: http://www.enum.at/rfc3825encoder.529.0.html */
2956 rfc3825_lci_to_fixpoint(const unsigned char lci
[16], struct rfc3825_location_fixpoint_t
*fixpoint
)
2958 fixpoint
->latitude_res
= (lci
[0]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */
2959 if (lci
[0] & 2) { /* LSB<<1 contains the sign of the latitude */
2960 /* Latitude is negative, expand two's complement */
2961 fixpoint
->latitude
= (((gint64
)lci
[0] & 3)<<32) | ((gint64
)lci
[1]<<24) |
2962 ((gint64
)lci
[2]<<16) | ((gint64
)lci
[3]<<8) |
2963 (gint64
)lci
[4] | ((gint64
)0x3FFFFFFF<<34);
2966 /* Latitude is positive */
2967 fixpoint
->latitude
= (((gint64
)lci
[0] & 3)<<32) | ((gint64
)lci
[1]<<24) |
2968 ((gint64
)lci
[2]<<16) | ((gint64
)lci
[3]<<8) |
2971 fixpoint
->longitude_res
= (lci
[5]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */
2972 if (lci
[5] & 2) { /* LSB<<1 contains the sign of the latitude */
2973 /* Longitude is negative, expand two's complement */
2974 fixpoint
->longitude
= (((gint64
)lci
[5] & 3)<<32) | ((gint64
)lci
[6]<<24) |
2975 ((gint64
)lci
[7]<<16) | ((gint64
)lci
[8]<<8) |
2976 (gint64
)lci
[9] | ((gint64
)0x3FFFFFFF<<34);
2979 /* Longitude is positive */
2980 fixpoint
->longitude
= (((gint64
)lci
[5] & 3)<<32) | ((gint64
)lci
[6]<<24) |
2981 ((gint64
)lci
[7]<<16) | ((gint64
)lci
[8]<<8) |
2984 fixpoint
->altitude_type
= (lci
[10]>>4) & 0x0F; /* make sure that right-shift does not copy sign bit */
2985 fixpoint
->altitude_res
= ((lci
[10] & 0x0F) << 2) | ((lci
[11]>>6) & 0x03);
2986 if (lci
[11] & 0x20) { /* LSB<<1 contains the sign of the latitude */
2987 /* Altitude is negative, expand two's complement */
2988 fixpoint
->altitude
= (((gint32
)lci
[11] & 0x3F)<<24) | ((gint32
)lci
[12]<<16) |
2989 ((gint32
)lci
[13]<<8) | ((gint32
)lci
[14]) |
2993 /* Altitude is positive */
2994 fixpoint
->altitude
= (((gint32
)lci
[11] & 0x3F)<<24) | ((gint32
)lci
[12]<<16) |
2995 ((gint32
)lci
[13]<<8) | ((gint32
)lci
[14]);
2998 fixpoint
->datum_type
= lci
[15];
3002 /* RFC3825Decoder: http://www.enum.at/rfc3825encoder.529.0.html */
3004 rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t
*fixpoint
, struct rfc3825_location_decimal_t
*decimal
)
3007 decimal
->latitude
= (double) fixpoint
->latitude
/ (1 << 25);
3008 if ((decimal
->latitude
> 90) || (decimal
->latitude
< -90)) {
3009 return RFC3825_LATITUDE_OUTOFRANGE
;
3012 /* Latitude Uncertainty */
3013 if (fixpoint
->latitude_res
> 34) {
3014 return RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE
;
3016 if (fixpoint
->latitude_res
> 8 ) {
3017 decimal
->latitude_res
= (double) 1 / (1 << (fixpoint
->latitude_res
- 8));
3019 decimal
->latitude_res
= 1 << (8 - fixpoint
->latitude_res
);
3023 decimal
->longitude
= (double) fixpoint
->longitude
/ (1 << 25);
3024 if ((decimal
->longitude
> 180) || (decimal
->longitude
< -180)) {
3025 return RFC3825_LONGITUDE_OUTOFRANGE
;
3028 /* Longitude Uncertainty */
3029 if (fixpoint
->longitude_res
> 34) {
3030 return RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE
;
3032 if (fixpoint
->longitude_res
> 8 ) {
3033 decimal
->longitude_res
= (double) 1 / (1 << (fixpoint
->longitude_res
- 8));
3035 decimal
->longitude_res
= 1 << (8 - fixpoint
->longitude_res
);
3039 decimal
->altitude_type
= fixpoint
->altitude_type
;
3040 decimal
->altitude
= 0;
3041 decimal
->altitude_res
= 0;
3043 if (decimal
->altitude_type
== 0) { /* Unknown */
3044 } else if (decimal
->altitude_type
== 1) { /* Meters */
3046 decimal
->altitude
= (double) fixpoint
->altitude
/ (1 << 8);
3047 if ((decimal
->altitude
> ((gint32
) 1<<21)-1) || (decimal
->altitude
< ((gint32
) -(1<<21))))
3048 return RFC3825_ALTITUDE_OUTOFRANGE
;
3050 /* Altitude Uncertainty */
3051 if (fixpoint
->altitude_res
> 30) {
3052 return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE
;
3054 if (fixpoint
->altitude_res
> 21 ) {
3055 decimal
->altitude_res
= (double) 1 / (1 << (fixpoint
->altitude_res
- 21));
3057 decimal
->altitude_res
= 1 << (21 - fixpoint
->altitude_res
);
3059 } else if (decimal
->altitude_type
== 2) { /* Floors */
3061 if ((fixpoint
->altitude_res
!= 30) && (fixpoint
->altitude_res
!= 0)) {
3062 return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE
;
3064 decimal
->altitude
= (double) fixpoint
->altitude
/ (1 << 8);
3065 } else { /* invalid type */
3066 return RFC3825_ALTITUDE_TYPE_OUTOFRANGE
;
3070 decimal
->datum_type
= 0;
3071 if ((fixpoint
->datum_type
> 3) || (fixpoint
->datum_type
< 1)) {
3072 return RFC3825_DATUM_TYPE_OUTOFRANGE
;
3074 decimal
->datum_type
= fixpoint
->datum_type
;
3076 return RFC3825_NOERROR
;
3079 static const value_string option43_cl_suboption_vals
[] = {
3081 { 1, "Suboption Request List" },
3082 { 2, "Device Type" },
3083 { 3, "eSAFE Types" },
3084 { 4, "Serial Number" },
3085 { 5, "Hardware Version" },
3086 { 6, "Software Version" },
3087 { 7, "Boot ROM version" },
3088 { 8, "Organizationally Unique Identifier" },
3089 { 9, "Model Number" },
3090 { 10, "Vendor Name" },
3091 { 11, "Address Realm" },
3092 { 12, "CM/PS System Description" },
3093 { 13, "CM/PS Firmware Revision" },
3094 { 14, "Firewall Policy File Version" },
3095 { 15, "eSafe Config File Devices" },
3096 { 18, "Video Security Type" },
3097 { 31, "MTA MAC Address" },
3098 { 32, "Correlation ID" },
3099 { 51, "Vendor Name" },
3100 { 52, "CableCARD Capability" },
3101 { 53, "Device Identification (CA)" },
3102 { 54, "Device Identification (X.509)" },
3107 static const value_string cablehome_subopt11_vals
[] = {
3108 { 1, "PS WAN-Man" },
3109 { 2, "PS WAN-Data" },
3114 dissect_vendor_cablelabs_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
3115 tvbuff_t
*tvb
, int optoff
, int optend
)
3117 int suboptoff
= optoff
;
3120 proto_tree
*o43cl_v_tree
;
3123 struct basic_types_hfs default_hfs
= {
3124 &hf_bootp_option43_value
,
3127 &hf_bootp_option43_value_stringz
,
3129 &hf_bootp_option43_value_8
,
3132 &hf_bootp_option43_value_32
,
3137 static struct opt_info o43cablelabs_opt
[]= {
3138 /* 0 */ {"nop", special
, &hf_bootp_option43_cl_padding
}, /* dummy */
3139 /* 1 */ {"Suboption Request List", string
, &hf_bootp_option43_cl_suboption_request_list
},
3140 /* 2 */ {"Device Type", string
, &hf_bootp_option43_cl_device_type
},
3141 /* 3 */ {"eSAFE Types", string
, &hf_bootp_option43_cl_esafe_type
},
3142 /* 4 */ {"Serial Number", string
, &hf_bootp_option43_cl_serial_number
},
3143 /* 5 */ {"Hardware Version", string
, &hf_bootp_option43_cl_hardware_version
},
3144 /* 6 */ {"Software Version", string
, &hf_bootp_option43_cl_software_version
},
3145 /* 7 */ {"Boot ROM version", string
, &hf_bootp_option43_cl_boot_rom_version
},
3146 /* 8 */ {"Organizationally Unique Identifier", special
, &hf_bootp_option43_cl_oui_bytes
},
3147 /* 9 */ {"Model Number", string
, &hf_bootp_option43_cl_model_number
},
3148 /* 10 */ {"Vendor Name", string
, &hf_bootp_option43_cl_vendor_name10
},
3149 /* *** 11-30: CableHome *** */
3150 /* 11 */ {"Address Realm", val_u_byte
, &hf_bootp_option43_cl_address_realm
},
3151 /* 12 */ {"CM/PS System Description", string
, &hf_bootp_option43_cl_cm_ps_system_desc
},
3152 /* 13 */ {"CM/PS Firmware Revision", string
, &hf_bootp_option43_cl_cm_ps_firmware_revision
},
3153 /* 14 */ {"Firewall Policy File Version", string
, &hf_bootp_option43_cl_firewall_policy_file_version
},
3154 /* 15 */ {"eSafe Config File Devices", string
, &hf_bootp_option43_cl_esafe_config_file_devices
},
3155 /* 16 */ {"Unassigned (CableHome)", special
, NULL
},
3156 /* 17 */ {"Unassigned (CableHome)", special
, NULL
},
3157 /* 18 */ {"Video Security Type", string
, &hf_bootp_option43_cl_video_security_tape
},
3158 /* 19 */ {"Unassigned (CableHome)", special
, NULL
},
3159 /* 20 */ {"Unassigned (CableHome)", special
, NULL
},
3160 /* 21 */ {"Unassigned (CableHome)", special
, NULL
},
3161 /* 22 */ {"Unassigned (CableHome)", special
, NULL
},
3162 /* 23 */ {"Unassigned (CableHome)", special
, NULL
},
3163 /* 24 */ {"Unassigned (CableHome)", special
, NULL
},
3164 /* 25 */ {"Unassigned (CableHome)", special
, NULL
},
3165 /* 26 */ {"Unassigned (CableHome)", special
, NULL
},
3166 /* 27 */ {"Unassigned (CableHome)", special
, NULL
},
3167 /* 28 */ {"Unassigned (CableHome)", special
, NULL
},
3168 /* 29 */ {"Unassigned (CableHome)", special
, NULL
},
3169 /* 30 */ {"Unassigned (CableHome)", special
, NULL
},
3170 /* *** 31-50: PacketCable *** */
3171 /* 31 */ {"MTA MAC Address", special
, &hf_bootp_option43_cl_mta_mac_address
},
3172 /* 32 */ {"Correlation ID", val_u_long
, &hf_bootp_option43_cl_correlation_ID
},
3173 /* 33 */ {"Unassigned (PacketCable)", special
, NULL
},
3174 /* 34 */ {"Unassigned (PacketCable)", special
, NULL
},
3175 /* 35 */ {"Unassigned (PacketCable)", special
, NULL
},
3176 /* 36 */ {"Unassigned (PacketCable)", special
, NULL
},
3177 /* 37 */ {"Unassigned (PacketCable)", special
, NULL
},
3178 /* 38 */ {"Unassigned (PacketCable)", special
, NULL
},
3179 /* 39 */ {"Unassigned (PacketCable)", special
, NULL
},
3180 /* 40 */ {"Unassigned (PacketCable)", special
, NULL
},
3181 /* 41 */ {"Unassigned (PacketCable)", special
, NULL
},
3182 /* 42 */ {"Unassigned (PacketCable)", special
, NULL
},
3183 /* 43 */ {"Unassigned (PacketCable)", special
, NULL
},
3184 /* 44 */ {"Unassigned (PacketCable)", special
, NULL
},
3185 /* 45 */ {"Unassigned (PacketCable)", special
, NULL
},
3186 /* 46 */ {"Unassigned (PacketCable)", special
, NULL
},
3187 /* 47 */ {"Unassigned (PacketCable)", special
, NULL
},
3188 /* 48 */ {"Unassigned (PacketCable)", special
, NULL
},
3189 /* 49 */ {"Unassigned (PacketCable)", special
, NULL
},
3190 /* 50 */ {"Unassigned (PacketCable)", special
, NULL
},
3191 /* *** 51-127: CableLabs *** */
3192 /* 51 */ {"Vendor Name", string
, &hf_bootp_option43_cl_vendor_name51
},
3193 /* 52 */ {"CableCARD Capability", special
, &hf_bootp_option43_cl_cablecard_capability
},
3194 /* 53 */ {"Device Identification (CA)", special
, &hf_bootp_option43_cl_device_id_ca
},
3195 /* 54 */ {"Device Identification (X.509)", string
, &hf_bootp_option43_cl_device_id_x509
},
3196 /* 55 */ {"Unassigned (CableLabs)", special
, NULL
},
3197 /* *** 128-254: Vendors *** */
3198 /* 128-254 {"Unassigned (Vendors)", special, NULL}, */
3199 /* 255 {"end options", special, &hf_bootp_option43_cl_end} */
3202 subopt
= tvb_get_guint8(tvb
, optoff
);
3206 proto_tree_add_item(v_tree
, hf_bootp_option43_cl_padding
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
3208 } else if (subopt
== 255) { /* End Option */
3209 proto_tree_add_item(v_tree
, hf_bootp_option43_cl_end
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
3210 /* Make sure we skip any junk left this option */
3214 if (suboptoff
>= optend
) {
3215 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
3216 "Suboption %d: no room left in option for suboption length", subopt
);
3220 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
3221 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option43_cl_suboption
,
3222 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s",
3223 subopt
, val_to_str_const(subopt
, option43_cl_suboption_vals
, "Unknown"));
3225 o43cl_v_tree
= proto_item_add_subtree(vti
, ett_bootp_option43_suboption
);
3226 proto_tree_add_item(o43cl_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
3229 if (suboptoff
+subopt_len
> optend
) {
3230 expert_add_info_format(pinfo
, vti
, &ei_bootp_missing_subopt_value
,
3231 "Suboption %d: no room left in option for suboption value", subopt
);
3235 if ( (subopt
< 1 ) || (subopt
>= array_length(o43cablelabs_opt
)) ) {
3236 proto_tree_add_item(o43cl_v_tree
, hf_bootp_option43_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3237 } else if (o43cablelabs_opt
[subopt
].ftype
== special
) {
3241 /* CableLabs specs treat 43.8 inconsistently
3242 * as either binary (3b) or string (6b) */
3243 if (subopt_len
== 3) {
3244 proto_tree_add_bytes_format_value(o43cl_v_tree
, hf_bootp_option43_cl_oui_bytes
, tvb
, suboptoff
, subopt_len
, NULL
,
3245 "%02x:%02x:%02x", tvb_get_guint8(tvb
, suboptoff
), tvb_get_guint8(tvb
, suboptoff
+1), tvb_get_guint8(tvb
, suboptoff
+2));
3246 } else if (subopt_len
== 6) {
3247 proto_tree_add_item(o43cl_v_tree
, hf_bootp_option43_cl_oui_string
, tvb
, suboptoff
, subopt_len
, ENC_ASCII
|ENC_NA
);
3249 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 3 or 6");
3252 case 31: /* MTA MAC address */
3253 if (subopt_len
!= 6) {
3254 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 6");
3258 proto_tree_add_item(o43cl_v_tree
, hf_bootp_option43_cl_mta_mac_address
, tvb
, suboptoff
, 6, ENC_NA
);
3261 if (o43cablelabs_opt
[subopt
].phf
!= NULL
)
3262 proto_tree_add_item(o43cl_v_tree
, *o43cablelabs_opt
[subopt
].phf
, tvb
, suboptoff
, subopt_len
, ENC_BIG_ENDIAN
);
3264 proto_tree_add_item(o43cl_v_tree
, hf_bootp_option43_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3268 if (bootp_handle_basic_types(pinfo
, o43cl_v_tree
, vti
, tvb
, o43cablelabs_opt
[subopt
].ftype
,
3269 suboptoff
, subopt_len
, o43cablelabs_opt
[subopt
].phf
, &default_hfs
) == 0) {
3270 expert_add_info_format(pinfo
, vti
, &hf_bootp_subopt_unknown_type
, "ERROR, please report: Unknown subopt type handler %d", subopt
);
3274 optoff
+= (subopt_len
+ 2);
3278 static const value_string option43_alcatel_suboption_vals
[] = {
3280 { 58, "Voice VLAN ID" },
3281 { 64, "Spatial Redundancy TFTP1" },
3282 { 65, "Spatial Redundancy TFTP2" },
3283 { 66, "Application Type" },
3285 { 255, "Alcatel-Lucent End" },
3289 static const value_string option43_alcatel_app_type_vals
[] = {
3296 dissect_vendor_alcatel_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
3297 tvbuff_t
*tvb
, int optoff
, int optend
)
3299 int suboptoff
= optoff
;
3303 proto_tree
*o43alcatel_v_tree
;
3305 subopt
= tvb_get_guint8(tvb
, optoff
);
3309 proto_tree_add_item(v_tree
, hf_bootp_option43_alcatel_padding
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
3311 } else if (subopt
== 255) { /* End Option */
3312 proto_tree_add_item(v_tree
, hf_bootp_option43_alcatel_end
, tvb
, optoff
, 1, ENC_BIG_ENDIAN
);
3313 /* Make sure we skip any junk left this option */
3317 if (suboptoff
>= optend
) {
3318 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
3319 "Suboption %d: no room left in option for suboption length", subopt
);
3323 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
3324 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option43_alcatel_suboption
,
3325 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s",
3326 subopt
, val_to_str_const(subopt
, option43_alcatel_suboption_vals
, "Unknown"));
3328 o43alcatel_v_tree
= proto_item_add_subtree(vti
, ett_bootp_option43_suboption
);
3329 proto_tree_add_item(o43alcatel_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
3332 if (suboptoff
+subopt_len
> optend
) {
3333 expert_add_info_format(pinfo
, vti
, &ei_bootp_missing_subopt_value
,
3334 "Suboption %d: no room left in option for suboption value", subopt
);
3340 case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */
3341 if (subopt_len
!= 2) {
3342 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 2");
3346 proto_tree_add_item(o43alcatel_v_tree
, hf_bootp_option43_alcatel_vlan_id
, tvb
, suboptoff
, 2, ENC_BIG_ENDIAN
);
3348 case 64: /* 0x40 - Alcatel-Lucent TFTP1 */
3349 if (subopt_len
!= 4) {
3350 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 4");
3354 proto_tree_add_item(o43alcatel_v_tree
, hf_bootp_option43_alcatel_tftp1
, tvb
, suboptoff
, 4, ENC_BIG_ENDIAN
);
3356 case 65: /* 0x41 - Alcatel-Lucent TFTP2 */
3357 if (subopt_len
!= 4) {
3358 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 4");
3362 proto_tree_add_item(o43alcatel_v_tree
, hf_bootp_option43_alcatel_tftp2
, tvb
, suboptoff
, 4, ENC_BIG_ENDIAN
);
3364 case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */
3365 if (subopt_len
!= 1) {
3366 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 1");
3369 proto_tree_add_item(o43alcatel_v_tree
, hf_bootp_option43_alcatel_app_type
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
3371 case 67: /* 0x43 - Alcatel-Lucent SIP URL */
3372 proto_tree_add_item(o43alcatel_v_tree
, hf_bootp_option43_alcatel_sip_url
, tvb
, suboptoff
, subopt_len
, ENC_ASCII
|ENC_NA
);
3375 expert_add_info_format(pinfo
, vti
, &hf_bootp_subopt_unknown_type
, "ERROR, please report: Unknown subopt type handler %d", subopt
);
3379 optoff
+= (subopt_len
+ 2);
3383 static const value_string option63_suboption_vals
[] = {
3384 { 1, "NWIP does not exist on subnet" },
3385 { 2, "NWIP exists in options area" },
3386 { 3, "NWIP exists in sname/file" },
3387 { 4, "NWIP exists, but too big" },
3388 { 5, "Broadcast for nearest Netware server" },
3389 { 6, "Preferred DSS server" },
3390 { 7, "Nearest NWIP server" },
3391 { 8, "Autoretries" },
3392 { 9, "Autoretry delay, secs" },
3393 { 10, "Support NetWare/IP v1.1" },
3394 { 11, "Primary DSS" },
3399 dissect_netware_ip_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
3400 tvbuff_t
*tvb
, int optoff
, int optend
)
3402 int suboptoff
= optoff
;
3403 guint8 subopt
, subopt_len
;
3404 proto_tree
*o63_v_tree
;
3405 proto_item
*vti
, *ti
;
3407 struct basic_types_hfs default_hfs
= {
3409 &hf_bootp_option63_value_ip_address
,
3410 &hf_bootp_option63_value_ip_address
,
3412 &hf_bootp_option63_value_boolean
,
3413 &hf_bootp_option63_value_8
,
3421 static struct opt_info o63_opt
[]= {
3422 /* 0 */ {"",none
,NULL
},
3423 /* 1 */ {"NWIP does not exist on subnet",presence
,NULL
},
3424 /* 2 */ {"NWIP exists in options area",presence
,NULL
},
3425 /* 3 */ {"NWIP exists in sname/file",presence
,NULL
},
3426 /* 4 */ {"NWIP exists, but too big",presence
,NULL
},
3427 /* 5 */ {"Broadcast for nearest Netware server",val_boolean
, &hf_bootp_option63_broadcast
},
3428 /* 6 */ {"Preferred DSS server",ipv4_list
,&hf_bootp_option63_preferred_dss_server
},
3429 /* 7 */ {"Nearest NWIP server",ipv4_list
,&hf_bootp_option63_nearest_nwip_server
},
3430 /* 8 */ {"Autoretries",val_u_byte
,&hf_bootp_option63_autoretries
},
3431 /* 9 */ {"Autoretry delay, secs",val_u_byte
,&hf_bootp_option63_autoretry_delay
},
3432 /* 10*/ {"Support NetWare/IP v1.1",val_boolean
,&hf_bootp_option63_support_netware_v1_1
},
3433 /* 11*/ {"Primary DSS",ipv4
,&hf_bootp_option63_primary_dss
}
3436 subopt
= tvb_get_guint8(tvb
, optoff
);
3439 if (suboptoff
>= optend
) {
3440 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
3441 "Suboption %d: no room left in option for suboption length", subopt
);
3445 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
3446 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option63_suboption
,
3447 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s",
3448 subopt
, val_to_str_const(subopt
, option63_suboption_vals
, "Unknown"));
3450 o63_v_tree
= proto_item_add_subtree(vti
, ett_bootp_option63_suboption
);
3451 proto_tree_add_item(o63_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
3454 ti
= proto_tree_add_item(o63_v_tree
, hf_bootp_option63_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3455 PROTO_ITEM_SET_HIDDEN(ti
);
3457 if (subopt
< array_length(o63_opt
)) {
3458 if (bootp_handle_basic_types(pinfo
, o63_v_tree
, vti
, tvb
, o63_opt
[subopt
].ftype
,
3459 suboptoff
, subopt_len
, o63_opt
[subopt
].phf
, &default_hfs
) == 0) {
3460 switch(o63_opt
[subopt
].ftype
)
3463 if (subopt_len
!= 0) {
3464 expert_add_info_format(pinfo
, vti
, &ei_bootp_bad_length
, "length isn't 0");
3468 if (o63_opt
[subopt
].phf
== NULL
)
3469 proto_tree_add_item(o63_v_tree
, hf_bootp_option63_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3474 optoff
+= (subopt_len
+ 2);
3478 static const value_string option125_tr111_suboption_vals
[] = {
3479 { 1, "DeviceManufacturerOUI" },
3480 { 2, "DeviceSerialNumber" },
3481 { 3, "DeviceProductClass" },
3482 { 4, "GatewayManufacturerOUI" },
3483 { 5, "GatewaySerialNumber" },
3484 { 6, "GatewayProductClass" },
3489 dissect_vendor_tr111_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
3490 tvbuff_t
*tvb
, int optoff
, int optend
)
3492 int suboptoff
= optoff
;
3493 proto_tree
*o125_v_tree
;
3494 proto_item
*vti
, *ti
;
3495 guint8 subopt
, subopt_len
;
3497 struct basic_types_hfs default_hfs
= {
3501 &hf_bootp_option125_value_stringz
,
3511 /* Reference: TR-111 DHCP Option 125 Sub-Option Data Fields
3515 static struct opt_info o125_tr111_opt
[]= {
3516 /* 0 */ {"nop", special
, NULL
}, /* dummy */
3517 /* 1 */ {"DeviceManufacturerOUI", string
, &hf_bootp_option125_tr111_device_manufacturer_oui
},
3518 /* 2 */ {"DeviceSerialNumber", string
, &hf_bootp_option125_tr111_device_serial_number
},
3519 /* 3 */ {"DeviceProductClass", string
, &hf_bootp_option125_tr111_device_product_class
},
3520 /* 4 */ {"GatewayManufacturerOUI", string
, &hf_bootp_option125_tr111_gateway_manufacturer_oui
},
3521 /* 5 */ {"GatewaySerialNumber", string
, &hf_bootp_option125_tr111_gateway_serial_number
},
3522 /* 6 */ {"GatewayProductClass", string
, &hf_bootp_option125_tr111_gateway_product_class
},
3525 subopt
= tvb_get_guint8(tvb
, optoff
);
3528 if (suboptoff
>= optend
) {
3529 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
3530 "Suboption %d: no room left in option for suboption length", subopt
);
3534 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
3535 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option125_tr111_suboption
,
3536 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s",
3537 subopt
, val_to_str_const(subopt
, option125_tr111_suboption_vals
, "Unknown"));
3539 o125_v_tree
= proto_item_add_subtree(vti
, hf_bootp_option125_tr111_suboption
);
3540 proto_tree_add_item(o125_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
3543 if (suboptoff
+subopt_len
> optend
) {
3544 expert_add_info_format(pinfo
, vti
, &ei_bootp_missing_subopt_value
,
3545 "Suboption %d: no room left in option for suboption value", subopt
);
3549 ti
= proto_tree_add_item(v_tree
, hf_bootp_option125_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3550 PROTO_ITEM_SET_HIDDEN(ti
);
3552 if (subopt
< array_length(o125_tr111_opt
)) {
3553 if (bootp_handle_basic_types(pinfo
, o125_v_tree
, vti
, tvb
, o125_tr111_opt
[subopt
].ftype
,
3554 suboptoff
, subopt_len
, o125_tr111_opt
[subopt
].phf
, &default_hfs
) == 0) {
3555 if (o125_tr111_opt
[subopt
].ftype
== special
) {
3556 if (o125_tr111_opt
[subopt
].phf
!= NULL
)
3557 proto_tree_add_item(v_tree
, *o125_tr111_opt
[subopt
].phf
, tvb
, suboptoff
, subopt_len
, ENC_BIG_ENDIAN
);
3559 proto_tree_add_item(v_tree
, hf_bootp_option125_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3560 } else if (o125_tr111_opt
[subopt
].phf
== NULL
)
3561 proto_tree_add_item(v_tree
, hf_bootp_option125_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3565 optoff
+= (subopt_len
+ 2);
3569 static const value_string option125_cl_suboption_vals
[] = {
3570 { 1, "Option Request" },
3571 { 2, "TFTP Server Addresses" },
3572 { 3, "eRouter Container Option" },
3573 { 4, "MIB Environment Indicator Option" },
3574 { 5, "Modem Capabilities" },
3578 static const value_string pkt_mib_env_ind_opt_vals
[] = {
3579 { 0x00, "Reserved" },
3580 { 0x01, "CableLabs" },
3582 { 0x03, "EuroCableLabs" },
3587 dissect_vendor_cl_suboption(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
3588 tvbuff_t
*tvb
, int optoff
, int optend
)
3590 int suboptoff
= optoff
;
3591 guint8 subopt
, subopt_len
;
3592 proto_tree
*o125_v_tree
;
3595 struct basic_types_hfs default_hfs
= {
3596 &hf_bootp_option125_value
,
3597 &hf_bootp_option125_value_ip_address
,
3598 &hf_bootp_option125_value_ip_address
,
3599 &hf_bootp_option125_value_stringz
,
3601 &hf_bootp_option125_value_8
,
3602 &hf_bootp_option125_value_16
,
3609 static struct opt_info o125_cl_opt
[]= {
3610 /* 0 */ {"nop", special
, NULL
}, /* dummy */
3611 /* 1 */ {"Option Request = ", val_u_byte
, &hf_bootp_option125_cl_option_request
},
3612 /* 2 */ {"TFTP Server Addresses : ", ipv4_list
, &hf_bootp_option125_cl_tftp_server_addresses
},
3613 /* 3 */ {"eRouter Container Option : ", bytes
, &hf_bootp_option125_cl_erouter_container_option
},
3614 /* 4 */ {"MIB Environment Indicator Option = ", val_u_byte
, &hf_bootp_option125_cl_mib_environment_indicator_option
},
3615 /* 5 */ {"Modem Capabilities : ", special
, &hf_bootp_option125_cl_modem_capabilities
},
3618 subopt
= tvb_get_guint8(tvb
, optoff
);
3621 if (suboptoff
>= optend
) {
3622 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
3623 "Suboption %d: no room left in option for suboption length", subopt
);
3627 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
3628 vti
= proto_tree_add_uint_format_value(v_tree
, hf_bootp_option125_cl_suboption
,
3629 tvb
, optoff
, subopt_len
+2, subopt
, "(%d) %s",
3630 subopt
, val_to_str_const(subopt
, option125_cl_suboption_vals
, "Unknown"));
3632 o125_v_tree
= proto_item_add_subtree(vti
, hf_bootp_option125_cl_suboption
);
3633 proto_tree_add_item(o125_v_tree
, hf_bootp_suboption_length
, tvb
, suboptoff
, 1, ENC_BIG_ENDIAN
);
3636 if (suboptoff
+subopt_len
> optend
) {
3637 expert_add_info_format(pinfo
, vti
, &ei_bootp_missing_subopt_value
,
3638 "Suboption %d: no room left in option for suboption value", subopt
);
3642 if (subopt
< array_length(o125_cl_opt
)) {
3643 if (bootp_handle_basic_types(pinfo
, o125_v_tree
, vti
, tvb
, o125_cl_opt
[subopt
].ftype
,
3644 suboptoff
, subopt_len
, o125_cl_opt
[subopt
].phf
, &default_hfs
) == 0) {
3646 switch(o125_cl_opt
[subopt
].ftype
) {
3648 if (o125_cl_opt
[subopt
].phf
!= NULL
)
3649 proto_tree_add_item(o125_v_tree
, *o125_cl_opt
[subopt
].phf
, tvb
, suboptoff
, subopt_len
, ENC_BIG_ENDIAN
);
3651 proto_tree_add_item(o125_v_tree
, hf_bootp_option125_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3653 dissect_docsis_cm_cap(o125_v_tree
, tvb
, optoff
, subopt_len
+2, TRUE
);
3656 if (o125_cl_opt
[subopt
].phf
== NULL
)
3657 proto_tree_add_item(o125_v_tree
, hf_bootp_option125_value
, tvb
, suboptoff
, subopt_len
, ENC_NA
);
3663 optoff
+= (subopt_len
+ 2);
3667 /* PacketCable Multimedia Terminal Adapter device capabilities (option 60).
3668 Ref: PKT-SP-I05-021127 sections 8.2 and 10 */
3670 #define PKT_MDC_TLV_OFF 10
3673 /* These are ASCII-encoded hexadecimal digits. We use the raw hex equivalent for
3675 #define PKT_MDC_VERSION 0x3031 /* "01" */
3676 #define PKT_MDC_TEL_END 0x3032 /* "02" */
3677 #define PKT_MDC_TGT 0x3033 /* "03" */
3678 #define PKT_MDC_HTTP_ACC 0x3034 /* "04" */
3679 #define PKT_MDC_SYSLOG 0x3035 /* "05" */
3680 #define PKT_MDC_NCS 0x3036 /* "06" */
3681 #define PKT_MDC_PRI_LINE 0x3037 /* "07" */
3682 #define PKT_MDC_VENDOR_TLV 0x3038 /* "08" */
3683 #define PKT_MDC_NVRAM_STOR 0x3039 /* "09" */
3684 #define PKT_MDC_PROV_REP 0x3041 /* "0A" */
3685 #define PKT_MDC_PROV_REP_LC 0x3061 /* "0a" */
3686 #define PKT_MDC_SUPP_CODECS 0x3042 /* "0B" */
3687 #define PKT_MDC_SUPP_CODECS_LC 0x3062 /* "0b" */
3688 #define PKT_MDC_SILENCE 0x3043 /* "0C" */
3689 #define PKT_MDC_SILENCE_LC 0x3063 /* "0c" */
3690 #define PKT_MDC_ECHO_CANCEL 0x3044 /* "0D" */
3691 #define PKT_MDC_ECHO_CANCEL_LC 0x3064 /* "0d" */
3692 #define PKT_MDC_RSVP 0x3045 /* "0E" */
3693 #define PKT_MDC_RSVP_LC 0x3065 /* "0e" */
3694 #define PKT_MDC_UGS_AD 0x3046 /* "0F" */
3695 #define PKT_MDC_UGS_AD_LC 0x3066 /* "0f" */
3696 #define PKT_MDC_IF_INDEX 0x3130 /* "10" */
3697 #define PKT_MDC_FLOW_LOG 0x3131 /* "11" */
3698 #define PKT_MDC_PROV_FLOWS 0x3132 /* "12" */
3699 /* PacketCable 1.5: */
3700 #define PKT_MDC_T38_VERSION 0x3133 /* "13" */
3701 #define PKT_MDC_T38_EC 0x3134 /* "14" */
3702 #define PKT_MDC_RFC2833_DTMF 0x3135 /* "15" */
3703 #define PKT_MDC_VOICE_METRICS 0x3136 /* "16" */
3704 #define PKT_MDC_MIBS 0x3137 /* "17" */
3705 #define PKT_MDC_MGPI 0x3138 /* "18" */
3706 #define PKT_MDC_V152 0x3139 /* "19" */
3707 #define PKT_MDC_CBS 0x3141 /* "1A" */
3708 #define PKT_MDC_CBS_LC 0x3161 /* "1a" */
3710 static const value_string pkt_mdc_type_vals
[] = {
3711 { PKT_MDC_VERSION
, "PacketCable Version" },
3712 { PKT_MDC_TEL_END
, "Number Of Telephony Endpoints" },
3713 { PKT_MDC_TGT
, "TGT Support" },
3714 { PKT_MDC_HTTP_ACC
, "HTTP Download File Access Method Support" },
3715 { PKT_MDC_SYSLOG
, "MTA-24 Event SYSLOG Notification Support" },
3716 { PKT_MDC_NCS
, "NCS Service Flow Support" },
3717 { PKT_MDC_PRI_LINE
, "Primary Line Support" },
3718 { PKT_MDC_VENDOR_TLV
, "Vendor Specific TLV Type(s)" },
3719 { PKT_MDC_NVRAM_STOR
, "NVRAM Ticket/Session Keys Storage Support" },
3720 { PKT_MDC_PROV_REP
, "Provisioning Event Reporting Support" },
3721 { PKT_MDC_PROV_REP_LC
, "Provisioning Event Reporting Support" },
3722 { PKT_MDC_SUPP_CODECS
, "Supported CODEC(s)" },
3723 { PKT_MDC_SUPP_CODECS_LC
, "Supported CODEC(s)" },
3724 { PKT_MDC_SILENCE
, "Silence Suppression Support" },
3725 { PKT_MDC_SILENCE_LC
, "Silence Suppression Support" },
3726 { PKT_MDC_ECHO_CANCEL
, "Echo Cancellation Support" },
3727 { PKT_MDC_ECHO_CANCEL_LC
, "Echo Cancellation Support" },
3728 { PKT_MDC_RSVP
, "RSVP Support/ Reserved" },
3729 { PKT_MDC_RSVP_LC
, "RSVP Support/ Reserved" },
3730 { PKT_MDC_UGS_AD
, "UGS-AD Support" },
3731 { PKT_MDC_UGS_AD_LC
, "UGS-AD Support" },
3732 { PKT_MDC_IF_INDEX
, "MTA's \"ifIndex\" starting number in \"ifTable\"" },
3733 { PKT_MDC_FLOW_LOG
, "Provisioning Flow Logging Support" },
3734 { PKT_MDC_PROV_FLOWS
, "Supported Provisioning Flows" },
3735 /* PacketCable 1.5: */
3736 { PKT_MDC_T38_VERSION
, "T38 Version Support" },
3737 { PKT_MDC_T38_EC
, "T38 Error Correction Support" },
3738 { PKT_MDC_RFC2833_DTMF
, "RFC 2833 DTMF Support" },
3739 { PKT_MDC_VOICE_METRICS
, "Voice Metrics Support" },
3740 { PKT_MDC_MIBS
, "MIB Support" },
3741 { PKT_MDC_MGPI
, "Multiple Grants Per Interval Support" },
3742 { PKT_MDC_V152
, "V.152 Support" },
3743 /* PacketCable 2.0: */
3744 { PKT_MDC_CBS
, "Certificate Bootstrapping Support" },
3745 { PKT_MDC_CBS_LC
, "Certificate Bootstrapping Support" },
3749 static const value_string pkt_mdc_version_vals
[] = {
3750 { 0x3030, "PacketCable 1.0" },
3751 { 0x3031, "PacketCable 1.1/1.5" }, /* 1.5 replaces 1.1-1.3 */
3752 { 0x3032, "PacketCable 2.0" },
3756 static const value_string pkt_mdc_boolean_vals
[] = {
3762 static const value_string pkt_mdc_codec_vals
[] = {
3763 { 0x3031, "other" }, /* "01" */
3764 { 0x3032, "unknown" },
3765 { 0x3033, "G.729" },
3766 { 0x3034, "reserved" },
3767 { 0x3035, "G.729E" },
3769 { 0x3037, "G.726-32" },
3770 { 0x3038, "G.728" },
3771 { 0x3039, "PCMA" }, /* "09" */
3772 { 0x3041, "G.726-16" }, /* "0A" */
3773 { 0x3042, "G.726-24" },
3774 { 0x3043, "G.726-40" },
3777 { 0x3046, "telephone-event" }, /* "0F" */
3781 static const value_string pkt_mdc_t38_version_vals
[] = {
3782 { 0x3030, "Unsupported" },
3783 { 0x3031, "T.38 Version Zero" }, /* default */
3784 { 0x3032, "T.38 Version One" },
3785 { 0x3033, "T.38 Version Two" },
3786 { 0x3035, "T.38 Version Three" },
3790 static const value_string pkt_mdc_t38_ec_vals
[] = {
3792 { 0x3031, "Redundancy" }, /* default */
3797 static const value_string pkt_mdc_mib_orgs
[] = {
3798 { 0x3030, "CableLabs" },
3800 { 0x3032, "EuroCableLabs" },
3801 { 0x3033, "Reserved" },
3802 { 0x3034, "Reserved" },
3803 { 0x3035, "Reserved" },
3804 { 0x3036, "Reserved" },
3805 { 0x3037, "Reserved" },
3806 { 0x3038, "Reserved" },
3807 { 0x3039, "Reserved" },
3811 static const value_string pkt_mdc_supp_flow_vals
[] = {
3812 { 1 << 0, "Secure Flow (Full Secure Provisioning Flow)" },
3813 { 1 << 1, "Hybrid Flow" },
3814 { 1 << 2, "Basic Flow" },
3818 #define PKT_MDC_MIB_CL 0x3030
3819 static const value_string pkt_mdc_cl_mib_vals
[] = {
3820 { 1 << 0, "PacketCable 1.5 MTA MIB" },
3821 { 1 << 1, "PacketCable 1.5 Signaling MIB" },
3822 { 1 << 2, "PacketCable 1.5 Management Event MIB" },
3823 { 1 << 3, "PacketCable 1.5 MTA Extension MIB" },
3824 { 1 << 4, "PacketCable 1.5 Signaling Extension MIB" },
3825 { 1 << 5, "PacketCable 1.5 MEM Extension MIB" },
3826 { 1 << 6, "Reserved" },
3827 { 1 << 7, "Reserved" },
3831 #define PKT_MDC_MIB_IETF 0x3031
3832 static const value_string pkt_mdc_ietf_mib_vals
[] = {
3833 { 1 << 0, "IETF MTA MIB" },
3834 { 1 << 1, "IETF Signaling MIB" },
3835 { 1 << 2, "IETF Management Event MIB" },
3836 { 1 << 3, "Reserved" },
3837 { 1 << 4, "Reserved" },
3838 { 1 << 5, "Reserved" },
3839 { 1 << 6, "Reserved" },
3840 { 1 << 7, "Reserved" },
3844 #define PKT_MDC_MIB_EURO 0x3032
3845 static const value_string pkt_mdc_euro_mib_vals
[] = {
3846 { 1 << 0, "PacketCable 1.5 MTA MIB" },
3847 { 1 << 1, "PacketCable 1.5 Signaling MIB" },
3848 { 1 << 2, "PacketCable 1.5 Management Event MIB" },
3849 { 1 << 3, "PacketCable 1.5 MTA Extension MIB" },
3850 { 1 << 4, "PacketCable 1.5 Signaling Extension MIB" },
3851 { 1 << 5, "PacketCable 1.5 MEM Extension MIB" },
3852 { 1 << 6, "Reserved" },
3853 { 1 << 7, "Reserved" },
3859 dissect_packetcable_mta_cap(proto_tree
*v_tree
, tvbuff_t
*tvb
, int voff
, int len
)
3862 unsigned long flow_val
= 0;
3863 int off
= PKT_MDC_TLV_OFF
+ voff
;
3864 int subopt_off
, max_len
;
3865 guint tlv_len
, i
, mib_val
;
3866 guint8 asc_val
[3] = " ", flow_val_str
[5];
3868 proto_item
*ti
, *mib_ti
;
3869 proto_tree
*subtree
, *subtree2
;
3871 tvb_memcpy (tvb
, asc_val
, off
, 2);
3872 if (sscanf((gchar
*)asc_val
, "%x", &tlv_len
) != 1 || tlv_len
> 0xff) {
3873 proto_tree_add_text(v_tree
, tvb
, off
, len
- off
,
3874 "Bogus length: %s", asc_val
);
3877 proto_tree_add_uint_format_value(v_tree
, hf_bootp_pkt_mta_cap_len
, tvb
, off
, 2,
3878 tlv_len
, "%d", tlv_len
);
3881 while (off
- voff
< len
) {
3883 raw_val
= tvb_get_ntohs (tvb
, off
);
3886 tvb_memcpy(tvb
, asc_val
, off
+ 2, 2);
3887 if (sscanf((gchar
*)asc_val
, "%x", &tlv_len
) != 1
3888 || tlv_len
< 1 || tlv_len
> G_MAXUINT16
) {
3889 proto_tree_add_text(v_tree
, tvb
, off
, len
- off
,
3890 "[Bogus length: %s]", asc_val
);
3895 ti
= proto_tree_add_text(v_tree
,
3896 tvb
, off
, (tlv_len
* 2) + 4,
3898 tvb_format_text(tvb
, off
, 2),
3899 val_to_str_const(raw_val
, pkt_mdc_type_vals
, "unknown"));
3902 case PKT_MDC_VERSION
:
3903 raw_val
= tvb_get_ntohs(tvb
, off
+ 4);
3904 proto_item_append_text(ti
,
3906 val_to_str_const(raw_val
, pkt_mdc_version_vals
, "Reserved"),
3907 tvb_format_stringzpad(tvb
, off
+ 4, 2) );
3910 case PKT_MDC_TEL_END
:
3911 case PKT_MDC_IF_INDEX
:
3912 proto_item_append_text(ti
,
3914 tvb_format_stringzpad(tvb
, off
+ 4, 2) );
3918 case PKT_MDC_HTTP_ACC
:
3919 case PKT_MDC_SYSLOG
:
3921 case PKT_MDC_PRI_LINE
:
3922 case PKT_MDC_NVRAM_STOR
:
3923 case PKT_MDC_PROV_REP
:
3924 case PKT_MDC_PROV_REP_LC
:
3925 case PKT_MDC_SILENCE
:
3926 case PKT_MDC_SILENCE_LC
:
3927 case PKT_MDC_ECHO_CANCEL
:
3928 case PKT_MDC_ECHO_CANCEL_LC
:
3930 case PKT_MDC_RSVP_LC
:
3931 case PKT_MDC_UGS_AD
:
3932 case PKT_MDC_UGS_AD_LC
:
3933 case PKT_MDC_FLOW_LOG
:
3934 case PKT_MDC_RFC2833_DTMF
:
3935 case PKT_MDC_VOICE_METRICS
:
3939 case PKT_MDC_CBS_LC
:
3940 raw_val
= tvb_get_ntohs(tvb
, off
+ 4);
3941 proto_item_append_text(ti
,
3943 val_to_str_const(raw_val
, pkt_mdc_boolean_vals
, "unknown"),
3944 tvb_format_stringzpad(tvb
, off
+ 4, 2) );
3947 case PKT_MDC_SUPP_CODECS
:
3948 case PKT_MDC_SUPP_CODECS_LC
:
3949 for (i
= 0; i
< tlv_len
; i
++) {
3950 raw_val
= tvb_get_ntohs(tvb
, off
+ 4 + (i
* 2) );
3951 proto_item_append_text(ti
,
3953 plurality(i
+ 1, "", ", "),
3954 val_to_str_const(raw_val
, pkt_mdc_codec_vals
, "unknown"),
3955 tvb_format_stringzpad(tvb
, off
+ 4 + (i
* 2), 2) );
3959 case PKT_MDC_PROV_FLOWS
:
3960 tvb_memcpy(tvb
, flow_val_str
, off
+ 4, 4);
3961 flow_val_str
[4] = '\0';
3962 flow_val
= strtoul((gchar
*)flow_val_str
, NULL
, 16);
3963 proto_item_append_text(ti
,
3964 "0x%04lx", flow_val
);
3967 case PKT_MDC_T38_VERSION
:
3968 raw_val
= tvb_get_ntohs(tvb
, off
+ 4);
3969 proto_item_append_text(ti
,
3971 val_to_str_const(raw_val
, pkt_mdc_t38_version_vals
, "unknown"),
3972 tvb_format_stringzpad(tvb
, off
+ 4, 2) );
3975 case PKT_MDC_T38_EC
:
3976 raw_val
= tvb_get_ntohs(tvb
, off
+ 4);
3977 proto_item_append_text(ti
,
3979 val_to_str_const(raw_val
, pkt_mdc_t38_ec_vals
, "unknown"),
3980 tvb_format_stringzpad(tvb
, off
+ 4, 2) );
3986 case PKT_MDC_VENDOR_TLV
:
3988 proto_item_append_text(ti
,
3990 tvb_format_stringzpad(tvb
, off
+ 4, tlv_len
* 2) );
3994 subtree
= proto_item_add_subtree(ti
, ett_bootp_option
);
3995 if (raw_val
== PKT_MDC_PROV_FLOWS
) {
3996 for (i
= 0 ; i
< 3; i
++) {
3997 if (flow_val
& pkt_mdc_supp_flow_vals
[i
].value
) {
3998 decode_bitfield_value(bit_fld
, (guint32
)flow_val
, pkt_mdc_supp_flow_vals
[i
].value
, 16);
3999 proto_tree_add_text(subtree
, tvb
, off
+ 4, 4, "%s%s",
4000 bit_fld
, pkt_mdc_supp_flow_vals
[i
].strptr
);
4003 } else if (raw_val
== PKT_MDC_MIBS
) {
4004 /* 17 06 02 00 38 02 01 07 */
4005 subopt_off
= off
+ 4;
4006 max_len
= subopt_off
+ (tlv_len
* 2);
4007 while (subopt_off
< max_len
) {
4008 raw_val
= tvb_get_ntohs(tvb
, subopt_off
);
4009 if (raw_val
!= 0x3032) { /* We only know how to handle a length of 2 */
4010 tvb_memcpy(tvb
, asc_val
, subopt_off
, 2);
4011 proto_tree_add_text(subtree
, tvb
, subopt_off
, 2,
4012 "[Bogus length: %s]", asc_val
);
4017 raw_val
= tvb_get_ntohs(tvb
, subopt_off
);
4018 tvb_memcpy(tvb
, asc_val
, subopt_off
, 2);
4020 mib_ti
= proto_tree_add_text(subtree
, tvb
, subopt_off
, 2, "%s (%s)",
4021 val_to_str_const(raw_val
, pkt_mdc_mib_orgs
, "Unknown"), asc_val
);
4022 if (subopt_off
> off
+ 4 + 2) {
4023 proto_item_append_text(ti
, ", ");
4025 proto_item_append_text(ti
, "%s", val_to_str_const(raw_val
, pkt_mdc_mib_orgs
, "Unknown"));
4028 tvb_memcpy(tvb
, asc_val
, subopt_off
, 2);
4029 if (sscanf((gchar
*)asc_val
, "%x", &mib_val
) != 1) {
4030 proto_tree_add_text(v_tree
, tvb
, subopt_off
, 2,
4031 "[Bogus bitfield: %s]", asc_val
);
4036 case PKT_MDC_MIB_CL
:
4037 subtree2
= proto_item_add_subtree(mib_ti
, ett_bootp_option
);
4039 for (i
= 0; i
< 8; i
++) {
4040 if (mib_val
& pkt_mdc_cl_mib_vals
[i
].value
) {
4041 decode_bitfield_value(bit_fld
, mib_val
, pkt_mdc_cl_mib_vals
[i
].value
, 8);
4042 proto_tree_add_text(subtree2
, tvb
, subopt_off
, 2,
4043 "%s%s", bit_fld
, pkt_mdc_cl_mib_vals
[i
].strptr
);
4048 case PKT_MDC_MIB_IETF
:
4049 subtree2
= proto_item_add_subtree(mib_ti
, ett_bootp_option
);
4051 for (i
= 0; i
< 8; i
++) {
4052 if (mib_val
& pkt_mdc_ietf_mib_vals
[i
].value
) {
4053 decode_bitfield_value(bit_fld
, mib_val
, pkt_mdc_ietf_mib_vals
[i
].value
, 8);
4054 proto_tree_add_text(subtree2
, tvb
, subopt_off
, 2,
4055 "%s%s", bit_fld
, pkt_mdc_ietf_mib_vals
[i
].strptr
);
4060 case PKT_MDC_MIB_EURO
:
4061 subtree2
= proto_item_add_subtree(mib_ti
, ett_bootp_option
);
4063 for (i
= 0; i
< 8; i
++) {
4064 if (mib_val
& pkt_mdc_euro_mib_vals
[i
].value
) {
4065 decode_bitfield_value(bit_fld
, mib_val
, pkt_mdc_euro_mib_vals
[i
].value
, 8);
4066 proto_tree_add_text(subtree2
, tvb
, subopt_off
, 2,
4067 "%s%s", bit_fld
, pkt_mdc_euro_mib_vals
[i
].strptr
);
4079 off
+= (tlv_len
* 2) + 4;
4084 /* DOCSIS Cable Modem device capabilities (option 60/option 125). */
4085 #define DOCSIS_CM_CAP_TLV_OFF 12
4087 #define DOCSIS_CM_CAP_CONCAT_SUP 0x01
4088 #define DOCSIS_CM_CAP_DOCSIS_VER 0x02
4089 #define DOCSIS_CM_CAP_FRAG_SUP 0x03
4090 #define DOCSIS_CM_CAP_PHS_SUP 0x04
4091 #define DOCSIS_CM_CAP_IGMP_SUP 0x05
4092 #define DOCSIS_CM_CAP_PRIV_SUP 0x06
4093 #define DOCSIS_CM_CAP_DSAID_SUP 0x07
4094 #define DOCSIS_CM_CAP_USSF_SUP 0x08
4095 #define DOCSIS_CM_CAP_FILT_SUP 0x09
4096 #define DOCSIS_CM_CAP_TET_MI 0x0a
4097 #define DOCSIS_CM_CAP_TET 0x0b
4098 #define DOCSIS_CM_CAP_DCC_SUP 0x0c
4099 #define DOCSIS_CM_CAP_IPFILT_SUP 0x0d
4100 #define DOCSIS_CM_CAP_LLCFILT_SUP 0x0e
4101 #define DOCSIS_CM_CAP_EXPUNI_SPACE 0x0f
4102 #define DOCSIS_CM_CAP_RNGHLDOFF_SUP 0x10
4103 #define DOCSIS_CM_CAP_L2VPN_SUP 0x11
4104 #define DOCSIS_CM_CAP_L2VPN_HOST_SUP 0x12
4105 #define DOCSIS_CM_CAP_DUTFILT_SUP 0x13
4106 #define DOCSIS_CM_CAP_USFREQRNG_SUP 0x14
4107 #define DOCSIS_CM_CAP_USSYMRATE_SUP 0x15
4108 #define DOCSIS_CM_CAP_SACM2_SUP 0x16
4109 #define DOCSIS_CM_CAP_SACM2HOP_SUP 0x17
4110 #define DOCSIS_CM_CAP_MULTTXCHAN_SUP 0x18
4111 #define DOCSIS_CM_CAP_512USTXCHAN_SUP 0x19
4112 #define DOCSIS_CM_CAP_256USTXCHAN_SUP 0x1a
4113 #define DOCSIS_CM_CAP_TOTALSIDCLU_SUP 0x1b
4114 #define DOCSIS_CM_CAP_SIDCLUPERSF_SUP 0x1c
4115 #define DOCSIS_CM_CAP_MULTRXCHAN_SUP 0x1d
4116 #define DOCSIS_CM_CAP_TOTALDSID_SUP 0x1e
4117 #define DOCSIS_CM_CAP_RESEQDSID_SUP 0x1f
4118 #define DOCSIS_CM_CAP_MULTDSID_SUP 0x20
4119 #define DOCSIS_CM_CAP_MULTDSIDFW_SUP 0x21
4120 #define DOCSIS_CM_CAP_FCTF_SUP 0x22
4121 #define DOCSIS_CM_CAP_DPV_SUP 0x23
4122 #define DOCSIS_CM_CAP_UGSPERUSFLOW_SUP 0x24
4123 #define DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP 0x25
4124 #define DOCSIS_CM_CAP_USDROPCLASSIF_SUP 0x26
4125 #define DOCSIS_CM_CAP_IPV6_SUP 0x27
4126 #define DOCSIS_CM_CAP_ExUsTrPow 0x28
4127 #define DOCSIS_CM_CAP_Opt802MPLSSup 0x29
4128 #define DOCSIS_CM_CAP_DounEnc 0x2a
4129 #define DOCSIS_CM_CAP_EnrgMang 0x2c
4131 static const value_string docsis_cm_cap_type_vals
[] = {
4132 { DOCSIS_CM_CAP_CONCAT_SUP
, "Concatenation Support" },
4133 { DOCSIS_CM_CAP_DOCSIS_VER
, "DOCSIS Version" },
4134 { DOCSIS_CM_CAP_FRAG_SUP
, "Fragmentation Support" },
4135 { DOCSIS_CM_CAP_PHS_SUP
, "Payload Header Suppression Support" },
4136 { DOCSIS_CM_CAP_IGMP_SUP
, "IGMP Support" },
4137 { DOCSIS_CM_CAP_PRIV_SUP
, "Privacy Support" },
4138 { DOCSIS_CM_CAP_DSAID_SUP
, "Downstream SAID Support" },
4139 { DOCSIS_CM_CAP_USSF_SUP
, "Upstream Service Flow Support" },
4140 { DOCSIS_CM_CAP_FILT_SUP
, "Optional Filtering Support" },
4141 { DOCSIS_CM_CAP_TET_MI
, "Transmit Equalizer Taps per Modulation Interval" },
4142 { DOCSIS_CM_CAP_TET
, "Number of Transmit Equalizer Taps" },
4143 { DOCSIS_CM_CAP_DCC_SUP
, "DCC Support" },
4144 { DOCSIS_CM_CAP_IPFILT_SUP
, "IP Filters Support" },
4145 { DOCSIS_CM_CAP_LLCFILT_SUP
, "LLC Filters Support" },
4146 { DOCSIS_CM_CAP_EXPUNI_SPACE
, "Expanded Unicast SID Space" },
4147 { DOCSIS_CM_CAP_RNGHLDOFF_SUP
, "Ranging Hold-Off Support" },
4148 { DOCSIS_CM_CAP_L2VPN_SUP
, "L2VPN Capability" },
4149 { DOCSIS_CM_CAP_L2VPN_HOST_SUP
, "L2VPN eSAFE Host Capability" },
4150 { DOCSIS_CM_CAP_DUTFILT_SUP
, "Downstream Unencrypted Traffic (DUT) Filtering" },
4151 { DOCSIS_CM_CAP_USFREQRNG_SUP
, "Upstream Frequency Range Support" },
4152 { DOCSIS_CM_CAP_USSYMRATE_SUP
, "Upstream Symbol Rate Support" },
4153 { DOCSIS_CM_CAP_SACM2_SUP
, "Selectable Active Code Mode 2 Support" },
4154 { DOCSIS_CM_CAP_SACM2HOP_SUP
, "Code Hopping Mode 2 Support" },
4155 { DOCSIS_CM_CAP_MULTTXCHAN_SUP
, "Multiple Transmit Channel Support" },
4156 { DOCSIS_CM_CAP_512USTXCHAN_SUP
, "5.12 Msps Upstream Transmit Channel Support" },
4157 { DOCSIS_CM_CAP_256USTXCHAN_SUP
, "2.56 Msps Upstream Transmit Channel Support" },
4158 { DOCSIS_CM_CAP_TOTALSIDCLU_SUP
, "Total SID Cluster Support" },
4159 { DOCSIS_CM_CAP_SIDCLUPERSF_SUP
, "SID Clusters per Service Flow Support" },
4160 { DOCSIS_CM_CAP_MULTRXCHAN_SUP
, "Multiple Receive Channel Support" },
4161 { DOCSIS_CM_CAP_TOTALDSID_SUP
, "Total Downstream Service ID (DSID) Support" },
4162 { DOCSIS_CM_CAP_RESEQDSID_SUP
, "Resequencing Downstream Service ID (DSID) Support" },
4163 { DOCSIS_CM_CAP_MULTDSID_SUP
, "Multicast Downstream Service ID (DSID) Support" },
4164 { DOCSIS_CM_CAP_MULTDSIDFW_SUP
, "Multicast DSID Forwarding" },
4165 { DOCSIS_CM_CAP_FCTF_SUP
, "Frame Control Type Forwarding Capability" },
4166 { DOCSIS_CM_CAP_DPV_SUP
, "DPV Capability" },
4167 { DOCSIS_CM_CAP_UGSPERUSFLOW_SUP
, "Unsolicited Grant Service/Upstream Service Flow Support" },
4168 { DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP
, "MAP and UCD Receipt Support" },
4169 { DOCSIS_CM_CAP_USDROPCLASSIF_SUP
, "Upstream Drop Classifier Support" },
4170 { DOCSIS_CM_CAP_IPV6_SUP
, "IPv6 Support" },
4171 { DOCSIS_CM_CAP_ExUsTrPow
, "Extended Upstream Transmit Power Capability (1/4 dB)" },
4172 { DOCSIS_CM_CAP_Opt802MPLSSup
, "Optional 802.1ad, 802.1ah, MPLS Classification Support" },
4173 { DOCSIS_CM_CAP_DounEnc
, "D-ONU Capabilities Encoding" },
4174 { DOCSIS_CM_CAP_EnrgMang
, "Energy Management Capabilities" },
4178 static const value_string docsis_cm_cap_supported_vals
[] = {
4179 { 0x00, "Not Support" },
4180 { 0x01, "Supported" },
4184 static const value_string docsis_cm_cap_version_vals
[] = {
4185 { 0x00, "DOCSIS 1.0" },
4186 { 0x01, "DOCSIS 1.1" },
4187 { 0x02, "DOCSIS 2.0" },
4188 { 0x03, "DOCSIS 3.0" },
4192 static const value_string docsis_cm_cap_privacy_vals
[] = {
4193 { 0x00, "BPI Support" },
4194 { 0x01, "BPI Plus Support" },
4198 static const value_string docsis_cm_cap_ranging_hold_off_vals
[] = {
4200 { 1 << 1, "ePS or eRouter" },
4201 { 1 << 2, "EMTA or EDVA" },
4202 { 1 << 3, "DSG/eSTB" },
4206 static const value_string docsis_cm_cap_l2vpn_vals
[] = {
4207 { 0x00, "CM not compliant with DOCSIS L2VPN Section 7 (default)" },
4208 { 0x01, "CM compliant with DOCSIS L2VPN Section 7" },
4212 static const value_string docsis_cm_cap_filt_vals
[] = {
4213 { 0x00, "802.1P Filtering" },
4214 { 0x01, "802.1Q Filtering" },
4218 static const value_string docsis_cm_cap_mpls_vals
[] = {
4219 { 1 << 0, "[IEEE 802.1ad] S-TPID" },
4220 { 1 << 1, "[IEEE 802.1ad] S-VID" },
4221 { 1 << 2, "[IEEE 802.1ad] S-PCP" },
4222 { 1 << 3, "[IEEE 802.1ad] S-DEI" },
4223 { 1 << 4, "[IEEE 802.1ad] C-TPID" },
4224 { 1 << 5, "[IEEE 802.1ad] C-VID" },
4225 { 1 << 6, "[IEEE 802.1ad] C-PCP" },
4226 { 1 << 7, "[IEEE 802.1ad] C-CFI" },
4227 { 1 << 8, "[IEEE 802.1ad] S-TCI" },
4228 { 1 << 9, "[IEEE 802.1ad] C-TCI" },
4229 { 1 << 10, "[IEEE 802.1ah] I-TPID" },
4230 { 1 << 11, "[IEEE 802.1ah] I-SID" },
4231 { 1 << 12, "[IEEE 802.1ah] I-TCI" },
4232 { 1 << 13, "[IEEE 802.1ah] I-PCP" },
4233 { 1 << 14, "[IEEE 802.1ah] I-DEI" },
4234 { 1 << 15, "[IEEE 802.1ah] I-UCA" },
4235 { 1 << 16, "[IEEE 802.1ah] B-TPID" },
4236 { 1 << 17, "[IEEE 802.1ah] B-TCI" },
4237 { 1 << 18, "[IEEE 802.1ah] B-PCP" },
4238 { 1 << 19, "[IEEE 802.1ah] B-DEI" },
4239 { 1 << 20, "[IEEE 802.1ah] B-VID" },
4240 { 1 << 21, "[IEEE 802.1ah] B-DA" },
4241 { 1 << 22, "[IEEE 802.1ah] B-SA" },
4242 { 1 << 23, "MPLS TC" },
4243 { 1 << 24, "MPLS Label" },
4247 static const value_string docsis_cm_cap_enrgmang_vals
[] = {
4248 { 0x00, "Energy Management 1x1 Feature" },
4252 static const value_string docsis_cm_cap_usfreqrng_vals
[] = {
4253 { 0x00, "Standard Upstream Frequency Range" },
4254 { 0x01, "Standard Upstream Frequency Range and Extended Upstream Frequency Range" },
4258 static const value_string docsis_cm_cap_map_ucd_receipt_vals
[] = {
4259 { 0x00, "CM cannot support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" },
4260 { 0x01, "CM can support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" },
4264 static const value_string docsis_cm_cap_map_dpv_support_vals
[] = {
4265 { 0x00, "U1 supported as a Start Reference Point for DPV per Path" },
4266 { 0x01, "U1 supported as a Start Reference Point for DPV per Packet" },
4270 static const value_string docsis_cm_cap_map_multDsidForward_support_vals
[] = {
4271 { 0x00, "No support for multicast DSID forwarding" },
4272 { 0x01, "Support for GMAC explicit multicast DSID forwarding" },
4273 { 0x02, "Support for GMAC promiscuous multicast DSID forwarding" },
4277 static const value_string docsis_cm_cap_map_fctfc_support_vals
[] = {
4278 { 0x00, "Isolation Packet PDU MAC Header (FC_Type of 10) is not forwarded" },
4279 { 0x01, "Isolation Packet PDU MAC Header (FC_Type of 10) is forwarded" },
4283 static const value_string docsis_cm_cap_map_l2vpn_esafe_index_support_vals
[] = {
4284 { 0x01, "ePs or eRouter" },
4286 { 0x11, "eSTB-IP" },
4287 { 0x12, "eSTB-DSG" },
4292 static const value_string docsis_cm_cap_ussymrate_vals
[] = {
4293 { 1 << 0, "160 ksps symbol rate supported" },
4294 { 1 << 1, "320 ksps symbol rate supported" },
4295 { 1 << 2, "640 ksps symbol rate supported" },
4296 { 1 << 3, "1280 ksps symbol rate supported" },
4297 { 1 << 4, "2560 ksps symbol rate supported" },
4298 { 1 << 5, "5120 ksps symbol rate supported" },
4303 display_uint_with_range_checking(proto_item
*ti
, guint8 val_byte
, guint16 val_uint16
, int min_value
, int max_value
)
4315 proto_item_append_text(ti
, "%i", value
);
4316 if ((value
< min_value
) ||
4317 (value
> max_value
))
4319 proto_item_append_text(ti
, " (Value Out-of-Range [%i..%i])", min_value
, max_value
);
4323 static void get_opt125_tlv(tvbuff_t
*tvb
, guint off
, guint8
*tlvtype
, guint8
*tlvlen
, guint8
**value
)
4326 *tlvtype
= tvb_get_guint8(tvb
, off
);
4328 *tlvlen
= tvb_get_guint8(tvb
, off
+1);
4330 *value
= (guint8
*)tvb_memdup(wmem_packet_scope(), tvb
, off
+ 2, *tlvlen
);
4333 static void get_opt60_tlv(tvbuff_t
*tvb
, guint off
, guint8
*tlvtype
, guint8
*tlvlen
, guint8
**value
)
4338 val_asc
= (guint8
*)wmem_alloc0(wmem_packet_scope(), 4);
4340 tvb_memcpy(tvb
, val_asc
, off
, 2);
4341 *tlvtype
= (guint8
)strtoul((gchar
*)val_asc
, NULL
, 16);
4343 tvb_memcpy(tvb
, val_asc
, off
+ 2, 2);
4344 *tlvlen
= (guint8
)strtoul((gchar
*)val_asc
, NULL
, 16);
4346 *value
= (guint8
*)wmem_alloc0(wmem_packet_scope(), *tlvlen
);
4347 for (i
=0; i
<*tlvlen
; i
++)
4349 memset(val_asc
, 0, 4);
4350 tvb_memcpy(tvb
, val_asc
, off
+ ((i
*2) + 4), 2);
4351 (*value
)[i
] = (guint8
)strtoul((gchar
*)val_asc
, NULL
, 16);
4356 dissect_docsis_cm_cap(proto_tree
*v_tree
, tvbuff_t
*tvb
, int voff
, int len
, gboolean opt125
)
4361 proto_tree
*subtree
;
4365 guint8 val_byte
= 0;
4366 guint16 val_uint16
= 0;
4367 guint8
*val_other
= NULL
;
4370 asc_val
= (guint8
*)wmem_alloc0(wmem_packet_scope(), 4);
4374 /* Option 125 is formatted as uint8's */
4376 tlv_type
= tvb_get_guint8(tvb
, off
);
4378 tlv_len
= tvb_get_guint8(tvb
, off
+1);
4379 proto_tree_add_uint_format_value(v_tree
, hf_bootp_docsis_cm_cap_len
, tvb
, off
+1, 1,
4380 tlv_len
, "%d", tlv_len
);
4384 /* Option 60 is formatted as an ASCII string.
4385 Since the capabilities are the same for both options
4386 I am converting the Option 60 values from ASCII to
4387 uint8s to allow the same parser to work for both */
4388 off
+= DOCSIS_CM_CAP_TLV_OFF
;
4389 tvb_memcpy (tvb
, asc_val
, off
, 2);
4390 tlv_len
= (guint8
)strtoul((gchar
*)asc_val
, NULL
, 16);
4391 proto_tree_add_uint_format_value(v_tree
, hf_bootp_docsis_cm_cap_len
, tvb
, off
+2, 2,
4392 tlv_len
, "%d", tlv_len
);
4397 while (off
- ((guint
) voff
) < ((guint
) len
))
4406 get_opt125_tlv(tvb
, off
, &tlv_type
, &tlv_len
, &val_other
);
4407 ti
= proto_tree_add_uint_format(v_tree
, hf_bootp_docsis_cm_cap_type
, tvb
, off
,
4412 val_to_str_const(tlv_type
, docsis_cm_cap_type_vals
, "unknown"));
4416 /* Option 60 is formatted as an ASCII string. Since the capabilities
4417 are the same for both options I am converting the Option 60 values
4418 from ASCII to uint8s to allow the same parser to work for both */
4419 get_opt60_tlv(tvb
, off
, &tlv_type
, &tlv_len
, &val_other
);
4420 ti
= proto_tree_add_uint_format(v_tree
, hf_bootp_docsis_cm_cap_type
, tvb
, off
,
4425 val_to_str_const(tlv_type
, docsis_cm_cap_type_vals
, "unknown"));
4430 /* The value refers to a byte. */
4431 val_byte
= val_other
[0];
4437 /* The value refers to a uint16. */
4438 val_uint16
= (val_other
[0] << 8) + val_other
[1];
4444 case DOCSIS_CM_CAP_CONCAT_SUP
:
4445 case DOCSIS_CM_CAP_FRAG_SUP
:
4446 case DOCSIS_CM_CAP_PHS_SUP
:
4447 case DOCSIS_CM_CAP_IGMP_SUP
:
4448 case DOCSIS_CM_CAP_DCC_SUP
:
4449 case DOCSIS_CM_CAP_EXPUNI_SPACE
:
4450 case DOCSIS_CM_CAP_DUTFILT_SUP
:
4451 case DOCSIS_CM_CAP_SACM2_SUP
:
4452 case DOCSIS_CM_CAP_SACM2HOP_SUP
:
4453 case DOCSIS_CM_CAP_IPV6_SUP
:
4454 proto_item_append_text(ti
,
4456 val_to_str_const(val_byte
, docsis_cm_cap_supported_vals
, "Reserved"));
4458 case DOCSIS_CM_CAP_DOCSIS_VER
:
4459 proto_item_append_text(ti
,
4461 val_to_str_const(val_byte
, docsis_cm_cap_version_vals
, "Reserved"));
4463 case DOCSIS_CM_CAP_PRIV_SUP
:
4464 proto_item_append_text(ti
,
4466 val_to_str_const(val_byte
, docsis_cm_cap_privacy_vals
, "Reserved"));
4468 case DOCSIS_CM_CAP_FILT_SUP
:
4469 proto_item_append_text(ti
,
4471 val_to_str_const(val_byte
, docsis_cm_cap_filt_vals
, "Reserved"));
4473 case DOCSIS_CM_CAP_L2VPN_SUP
:
4474 proto_item_append_text(ti
,
4476 val_to_str_const(val_byte
, docsis_cm_cap_l2vpn_vals
, "Reserved"));
4478 case DOCSIS_CM_CAP_L2VPN_HOST_SUP
:
4480 proto_item_append_text(ti
,
4481 "eSAFE ifIndex %s (%i)/eSAFE MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",
4482 val_to_str_const(val_other
[0], docsis_cm_cap_map_l2vpn_esafe_index_support_vals
, "Reserved"),
4491 proto_item_append_text(ti
,
4492 "Invalid (length should be 7, is %d)",
4496 case DOCSIS_CM_CAP_USFREQRNG_SUP
:
4497 proto_item_append_text(ti
,
4499 val_to_str_const(val_byte
, docsis_cm_cap_usfreqrng_vals
, "Reserved"));
4501 case DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP
:
4502 proto_item_append_text(ti
,
4504 val_to_str_const(val_byte
, docsis_cm_cap_map_ucd_receipt_vals
, "Reserved"));
4506 case DOCSIS_CM_CAP_DPV_SUP
:
4507 proto_item_append_text(ti
,
4509 val_to_str_const(val_byte
, docsis_cm_cap_map_dpv_support_vals
, "Reserved"));
4511 case DOCSIS_CM_CAP_DSAID_SUP
:
4512 case DOCSIS_CM_CAP_MULTTXCHAN_SUP
:
4513 case DOCSIS_CM_CAP_512USTXCHAN_SUP
:
4514 case DOCSIS_CM_CAP_256USTXCHAN_SUP
:
4515 case DOCSIS_CM_CAP_TOTALSIDCLU_SUP
:
4516 case DOCSIS_CM_CAP_MULTRXCHAN_SUP
:
4517 case DOCSIS_CM_CAP_UGSPERUSFLOW_SUP
:
4518 case DOCSIS_CM_CAP_USSF_SUP
:
4519 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 0, 255);
4521 case DOCSIS_CM_CAP_RESEQDSID_SUP
:
4522 case DOCSIS_CM_CAP_MULTDSID_SUP
:
4523 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 16, 255);
4525 case DOCSIS_CM_CAP_SIDCLUPERSF_SUP
:
4526 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 2, 8);
4528 case DOCSIS_CM_CAP_TOTALDSID_SUP
:
4529 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 32, 255);
4531 case DOCSIS_CM_CAP_TET
:
4532 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 8, 64);
4534 case DOCSIS_CM_CAP_TET_MI
:
4535 if ((val_byte
== 1) ||
4539 proto_item_append_text(ti
,
4545 proto_item_append_text(ti
,
4546 " (Invalid Value %i : Should be [1,2,4]",
4550 case DOCSIS_CM_CAP_IPFILT_SUP
:
4551 case DOCSIS_CM_CAP_USDROPCLASSIF_SUP
:
4552 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 64, 65535);
4554 case DOCSIS_CM_CAP_LLCFILT_SUP
:
4555 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 10, 65535);
4557 case DOCSIS_CM_CAP_ExUsTrPow
:
4560 proto_item_append_text(ti
, "%i", val_byte
);
4564 display_uint_with_range_checking(ti
, val_byte
, val_uint16
, 205, 244);
4567 case DOCSIS_CM_CAP_Opt802MPLSSup
:
4568 proto_item_append_text(ti
,
4569 "0x%02x", val_byte
);
4570 case DOCSIS_CM_CAP_DounEnc
:
4571 /* TODO: add D-ONU Capabilities Encoding according DPoE-SP-MULPIv1.0-I02-120607 */
4573 case DOCSIS_CM_CAP_EnrgMang
:
4574 proto_item_append_text(ti
,
4576 val_to_str_const(val_byte
, docsis_cm_cap_enrgmang_vals
, "Reserved"));
4578 case DOCSIS_CM_CAP_RNGHLDOFF_SUP
:
4579 proto_item_append_text(ti
,
4583 proto_item_append_text(ti
,
4584 "(0x%04x)", (val_other
[0] << sizeof(guint8
)) + val_other
[1]);
4585 proto_item_append_text(ti
,
4586 " Component Bit Mask ");
4587 proto_item_append_text(ti
,
4588 "(0x%04x)", (val_other
[2] << sizeof(guint8
)) + val_other
[3]);
4592 proto_item_append_text(ti
,
4593 " (Invalid Length %u : Should be 4",
4597 case DOCSIS_CM_CAP_USSYMRATE_SUP
:
4598 proto_item_append_text(ti
,
4599 "0x%02x", val_byte
);
4601 case DOCSIS_CM_CAP_FCTF_SUP
:
4602 proto_item_append_text(ti
,
4604 val_to_str_const(val_byte
, docsis_cm_cap_map_fctfc_support_vals
, "Reserved"));
4606 case DOCSIS_CM_CAP_MULTDSIDFW_SUP
:
4607 proto_item_append_text(ti
,
4609 val_to_str_const(val_byte
, docsis_cm_cap_map_multDsidForward_support_vals
, "Reserved"));
4613 subtree
= proto_item_add_subtree(ti
, ett_bootp_option
);
4614 if (tlv_type
== DOCSIS_CM_CAP_RNGHLDOFF_SUP
&& tlv_len
>= 4)
4616 for (i
= 0 ; i
< 4; i
++)
4618 decode_bitfield_value(bit_fld
,
4619 (val_other
[2] << sizeof(guint8
)) + val_other
[3],
4620 docsis_cm_cap_ranging_hold_off_vals
[i
].value
,
4622 proto_tree_add_text(subtree
, tvb
, off
+ 2, 4, "%s%s",
4623 bit_fld
, docsis_cm_cap_ranging_hold_off_vals
[i
].strptr
);
4626 if (tlv_type
== DOCSIS_CM_CAP_USSYMRATE_SUP
)
4628 for (i
= 0 ; i
< 6; i
++)
4630 decode_bitfield_value(bit_fld
, val_byte
,docsis_cm_cap_ussymrate_vals
[i
].value
, 8);
4631 proto_tree_add_text(subtree
, tvb
, off
+ 2, 1, "%s%s",
4632 bit_fld
, docsis_cm_cap_ussymrate_vals
[i
].strptr
);
4636 if (tlv_type
== DOCSIS_CM_CAP_Opt802MPLSSup
&& tlv_len
>= 4)
4638 for (i
= 0 ; i
< 25; i
++)
4640 decode_bitfield_value(bit_fld
,
4641 (val_other
[2] << sizeof(guint8
)) + val_other
[3],
4642 docsis_cm_cap_mpls_vals
[i
].value
,
4644 proto_tree_add_text(subtree
, tvb
, off
+ 2, 4, "%s%s",
4645 bit_fld
, docsis_cm_cap_mpls_vals
[i
].strptr
);
4650 off
+= (tlv_len
) + 2;
4654 off
+= (tlv_len
*2) + 4;
4660 /* Definitions specific to PKT-SP-PROV-I05-021127 begin with "PKT_CCC_I05".
4661 Definitions specific to IETF draft 5 and RFC 3495 begin with "PKT_CCC_IETF".
4662 Shared definitions begin with "PKT_CCC".
4664 #define PKT_CCC_PRI_DHCP 1
4665 #define PKT_CCC_SEC_DHCP 2
4666 #define PKT_CCC_I05_SNMP 3
4667 #define PKT_CCC_IETF_PROV_SRV 3
4668 #define PKT_CCC_I05_PRI_DNS 4
4669 #define PKT_CCC_IETF_AS_KRB 4
4670 #define PKT_CCC_I05_SEC_DNS 5
4671 #define PKT_CCC_IETF_AP_KRB 5
4672 #define PKT_CCC_KRB_REALM 6
4673 #define PKT_CCC_TGT_FLAG 7
4674 #define PKT_CCC_PROV_TIMER 8
4675 #define PKT_CCC_CMS_FQDN 9
4676 #define PKT_CCC_IETF_SEC_TKT 9
4677 #define PKT_CCC_AS_KRB 10
4678 #define PKT_CCC_AP_KRB 11
4679 #define PKT_CCC_MTA_KRB_CLEAR 12
4681 static const value_string pkt_i05_ccc_opt_vals
[] = {
4682 { PKT_CCC_PRI_DHCP
, "Primary DHCP Server" },
4683 { PKT_CCC_SEC_DHCP
, "Secondary DHCP Server" },
4684 { PKT_CCC_I05_SNMP
, "SNMP Entity" },
4685 { PKT_CCC_I05_PRI_DNS
, "Primary DNS Server" },
4686 { PKT_CCC_I05_SEC_DNS
, "Secondary DNS Server" },
4687 { PKT_CCC_KRB_REALM
, "Kerberos Realm" },
4688 { PKT_CCC_TGT_FLAG
, "MTA should fetch TGT?" },
4689 { PKT_CCC_PROV_TIMER
, "Provisioning Timer" },
4690 { PKT_CCC_CMS_FQDN
, "CMS FQDN" },
4691 { PKT_CCC_AS_KRB
, "AS-REQ/AS-REP Backoff and Retry" },
4692 { PKT_CCC_AP_KRB
, "AP-REQ/AP-REP Backoff and Retry" },
4693 { PKT_CCC_MTA_KRB_CLEAR
, "MTA should clear Kerberos tickets?" },
4697 static const value_string pkt_draft5_ccc_opt_vals
[] = {
4698 { PKT_CCC_PRI_DHCP
, "TSP's Primary DHCP Server" },
4699 { PKT_CCC_SEC_DHCP
, "TSP's Secondary DHCP Server" },
4700 { PKT_CCC_IETF_PROV_SRV
, "TSP's Provisioning Server" },
4701 { PKT_CCC_IETF_AS_KRB
, "TSP's AS-REQ/AS-REP Backoff and Retry" },
4702 { PKT_CCC_IETF_AP_KRB
, "TSP's AP-REQ/AP-REP Backoff and Retry" },
4703 { PKT_CCC_KRB_REALM
, "TSP's Kerberos Realm Name" },
4704 { PKT_CCC_TGT_FLAG
, "TSP's Ticket Granting Server Utilization" },
4705 { PKT_CCC_PROV_TIMER
, "TSP's Provisioning Timer Value" },
4706 { PKT_CCC_IETF_SEC_TKT
, "PacketCable Security Ticket Control" },
4710 static const value_string pkt_i05_ccc_ticket_ctl_vals
[] = {
4711 { 1, "Invalidate Provisioning Application Server's ticket" },
4712 { 2, "Invalidate all CMS Application Server tickets" },
4713 { 3, "Invalidate all Application Server tickets" },
4718 dissect_packetcable_i05_ccc(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
4719 tvbuff_t
*tvb
, int optoff
, int optend
)
4721 int suboptoff
= optoff
;
4722 guint8 subopt
, subopt_len
, fetch_tgt
, timer_val
, ticket_ctl
;
4723 proto_tree
*pkt_s_tree
;
4726 subopt
= tvb_get_guint8(tvb
, optoff
);
4729 if (suboptoff
>= optend
) {
4730 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
4731 "Suboption %d: no room left in option for suboption length", subopt
);
4735 subopt_len
= tvb_get_guint8(tvb
, optoff
);
4738 vti
= proto_tree_add_text(v_tree
, tvb
, optoff
, subopt_len
+ 2,
4739 "Suboption %u: %s: ", subopt
,
4740 val_to_str_const(subopt
, pkt_i05_ccc_opt_vals
, "unknown/reserved") );
4744 case PKT_CCC_PRI_DHCP
: /* String values */
4745 case PKT_CCC_SEC_DHCP
:
4746 case PKT_CCC_I05_SNMP
:
4747 case PKT_CCC_I05_PRI_DNS
:
4748 case PKT_CCC_I05_SEC_DNS
:
4749 case PKT_CCC_KRB_REALM
:
4750 case PKT_CCC_CMS_FQDN
:
4751 proto_item_append_text(vti
, "%s (%u byte%s)",
4752 tvb_format_stringzpad(tvb
, suboptoff
, subopt_len
),
4754 plurality(subopt_len
, "", "s") );
4755 suboptoff
+= subopt_len
;
4758 case PKT_CCC_TGT_FLAG
:
4759 if (suboptoff
+1 > optend
) {
4760 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4763 fetch_tgt
= tvb_get_guint8(tvb
, suboptoff
);
4764 proto_item_append_text(vti
, "%s (%u byte%s%s)",
4765 fetch_tgt
? "Yes" : "No",
4767 plurality(subopt_len
, "", "s"),
4768 subopt_len
!= 1 ? " [Invalid]" : "");
4769 suboptoff
+= subopt_len
;
4772 case PKT_CCC_PROV_TIMER
:
4773 if (suboptoff
+1 > optend
) {
4774 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4777 timer_val
= tvb_get_guint8(tvb
, suboptoff
);
4778 proto_item_append_text(vti
, "%u%s (%u byte%s%s)", timer_val
,
4779 timer_val
> 30 ? " [Invalid]" : "",
4781 plurality(subopt_len
, "", "s"),
4782 subopt_len
!= 1 ? " [Invalid]" : "");
4783 suboptoff
+= subopt_len
;
4786 case PKT_CCC_AS_KRB
:
4787 if (suboptoff
+12 > optend
) {
4788 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4791 proto_item_append_text(vti
, "(%u byte%s%s)", subopt_len
,
4792 plurality(subopt_len
, "", "s"),
4793 subopt_len
!= 12 ? " [Invalid]" : "");
4794 if (subopt_len
== 12) {
4795 pkt_s_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
4796 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
, 4,
4797 "pktcMtaDevRealmUnsolicitedKeyNomTimeout: %u",
4798 tvb_get_ntohl(tvb
, suboptoff
));
4799 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 4, 4,
4800 "pktcMtaDevRealmUnsolicitedKeyMaxTimeout: %u",
4801 tvb_get_ntohl(tvb
, suboptoff
+ 4));
4802 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 8, 4,
4803 "pktcMtaDevRealmUnsolicitedKeyMaxRetries: %u",
4804 tvb_get_ntohl(tvb
, suboptoff
+ 8));
4806 suboptoff
+= subopt_len
;
4809 case PKT_CCC_AP_KRB
:
4810 if (suboptoff
+12 > optend
) {
4811 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4814 proto_item_append_text(vti
, "(%u byte%s%s)", subopt_len
,
4815 plurality(subopt_len
, "", "s"),
4816 subopt_len
!= 12 ? " [Invalid]" : "");
4817 if (subopt_len
== 12) {
4818 pkt_s_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
4819 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
, 4,
4820 "pktcMtaDevProvUnsolicitedKeyNomTimeout: %u",
4821 tvb_get_ntohl(tvb
, suboptoff
));
4822 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 4, 4,
4823 "pktcMtaDevProvUnsolicitedKeyMaxTimeout: %u",
4824 tvb_get_ntohl(tvb
, suboptoff
+ 4));
4825 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 8, 4,
4826 "pktcMtaDevProvUnsolicitedKeyMaxRetries: %u",
4827 tvb_get_ntohl(tvb
, suboptoff
+ 8));
4829 suboptoff
+= subopt_len
;
4832 case PKT_CCC_MTA_KRB_CLEAR
:
4833 if (suboptoff
+1 > optend
) {
4834 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4837 ticket_ctl
= tvb_get_guint8(tvb
, suboptoff
);
4838 proto_item_append_text(vti
, "%s (%u) (%u byte%s%s)",
4839 val_to_str_const (ticket_ctl
, pkt_i05_ccc_ticket_ctl_vals
, "unknown/invalid"),
4842 plurality(subopt_len
, "", "s"),
4843 subopt_len
!= 1 ? " [Invalid]" : "");
4844 suboptoff
+= subopt_len
;
4848 suboptoff
+= subopt_len
;
4856 static const value_string sec_tcm_vals
[] = {
4857 { 1 << 0, "PacketCable Provisioning Server" },
4858 { 1 << 1, "All PacketCable Call Management Servers" },
4863 dissect_packetcable_ietf_ccc(packet_info
*pinfo
, proto_item
*v_ti
, proto_tree
*v_tree
,
4864 tvbuff_t
*tvb
, int optoff
, int optend
, int revision
)
4866 int suboptoff
= optoff
;
4867 guint8 subopt
, subopt_len
;
4869 guint8 prov_type
, fetch_tgt
, timer_val
;
4871 proto_tree
*pkt_s_tree
;
4873 int max_timer_val
= 255, i
;
4874 const guchar
*dns_name
;
4877 subopt
= tvb_get_guint8(tvb
, suboptoff
);
4880 if (suboptoff
>= optend
) {
4881 expert_add_info_format(pinfo
, v_ti
, &ei_bootp_missing_subopt_length
,
4882 "Suboption %d: no room left in option for suboption length", subopt
);
4885 subopt_len
= tvb_get_guint8(tvb
, suboptoff
);
4888 vti
= proto_tree_add_text(v_tree
, tvb
, optoff
, subopt_len
+ 2,
4889 "Suboption %u: %s: ", subopt
,
4890 val_to_str_const(subopt
, pkt_draft5_ccc_opt_vals
, "unknown/reserved") );
4894 case PKT_CCC_PRI_DHCP
: /* IPv4 values */
4895 case PKT_CCC_SEC_DHCP
:
4896 if (suboptoff
+4 > optend
) {
4897 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4900 ipv4addr
= tvb_get_ipv4(tvb
, suboptoff
);
4901 proto_item_append_text(vti
, "%s (%u byte%s%s)",
4902 ip_to_str((guint8
*)&ipv4addr
),
4904 plurality(subopt_len
, "", "s"),
4905 subopt_len
!= 4 ? " [Invalid]" : "");
4906 suboptoff
+= subopt_len
;
4909 case PKT_CCC_IETF_PROV_SRV
:
4910 if (suboptoff
+1 > optend
) {
4911 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4914 prov_type
= tvb_get_guint8(tvb
, suboptoff
);
4916 switch (prov_type
) {
4919 get_dns_name(tvb
, suboptoff
, subopt_len
, suboptoff
, &dns_name
);
4920 proto_item_append_text(vti
, "%s (%u byte%s)", dns_name
,
4921 subopt_len
- 1, plurality(subopt_len
, "", "s") );
4925 if (suboptoff
+4 > optend
) {
4926 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4929 ipv4addr
= tvb_get_ipv4(tvb
, suboptoff
);
4930 proto_item_append_text(vti
, "%s (%u byte%s%s)",
4931 ip_to_str((guint8
*)&ipv4addr
),
4933 plurality(subopt_len
, "", "s"),
4934 subopt_len
!= 5 ? " [Invalid]" : "");
4938 proto_item_append_text(vti
, "Invalid type: %u (%u byte%s)",
4941 plurality(subopt_len
, "", "s") );
4944 suboptoff
+= subopt_len
- 1;
4947 case PKT_CCC_IETF_AS_KRB
:
4948 if (suboptoff
+12 > optend
) {
4949 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
4952 proto_item_append_text(vti
, "(%u byte%s%s)", subopt_len
,
4953 plurality(subopt_len
, "", "s"),
4954 subopt_len
!= 12 ? " [Invalid]" : "");
4955 if (subopt_len
== 12) {
4956 pkt_s_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
4957 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
, 4,
4958 "pktcMtaDevRealmUnsolicitedKeyNomTimeout: %u",
4959 tvb_get_ntohl(tvb
, suboptoff
));
4960 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 4, 4,
4961 "pktcMtaDevRealmUnsolicitedKeyMaxTimeout: %u",
4962 tvb_get_ntohl(tvb
, suboptoff
+ 4));
4963 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 8, 4,
4964 "pktcMtaDevRealmUnsolicitedKeyMaxRetries: %u",
4965 tvb_get_ntohl(tvb
, suboptoff
+ 8));
4967 suboptoff
+= subopt_len
;
4970 case PKT_CCC_IETF_AP_KRB
:
4971 proto_item_append_text(vti
, "(%u byte%s%s)", subopt_len
,
4972 plurality(subopt_len
, "", "s"),
4973 subopt_len
!= 12 ? " [Invalid]" : "");
4974 if (subopt_len
== 12) {
4975 pkt_s_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
4976 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
, 4,
4977 "pktcMtaDevProvUnsolicitedKeyNomTimeout: %u",
4978 tvb_get_ntohl(tvb
, suboptoff
));
4979 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 4, 4,
4980 "pktcMtaDevProvUnsolicitedKeyMaxTimeout: %u",
4981 tvb_get_ntohl(tvb
, suboptoff
+ 4));
4982 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
+ 8, 4,
4983 "pktcMtaDevProvUnsolicitedKeyMaxRetries: %u",
4984 tvb_get_ntohl(tvb
, suboptoff
+ 8));
4986 suboptoff
+= subopt_len
;
4989 case PKT_CCC_KRB_REALM
: /* String values */
4990 get_dns_name(tvb
, suboptoff
, subopt_len
, suboptoff
, &dns_name
);
4991 proto_item_append_text(vti
, "%s (%u byte%s)", dns_name
,
4992 subopt_len
, plurality(subopt_len
, "", "s") );
4993 suboptoff
+= subopt_len
;
4996 case PKT_CCC_TGT_FLAG
:
4997 if (suboptoff
+1 > optend
) {
4998 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
5001 fetch_tgt
= tvb_get_guint8(tvb
, suboptoff
);
5002 proto_item_append_text(vti
, "%s (%u byte%s%s)",
5003 fetch_tgt
? "Yes" : "No",
5005 plurality(subopt_len
, "", "s"),
5006 subopt_len
!= 1 ? " [Invalid]" : "");
5010 case PKT_CCC_PROV_TIMER
:
5011 if (suboptoff
+1 > optend
) {
5012 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
5015 if (revision
== PACKETCABLE_CCC_DRAFT5
)
5017 timer_val
= tvb_get_guint8(tvb
, suboptoff
);
5018 proto_item_append_text(vti
, "%u%s (%u byte%s%s)", timer_val
,
5019 timer_val
> max_timer_val
? " [Invalid]" : "",
5021 plurality(subopt_len
, "", "s"),
5022 subopt_len
!= 1 ? " [Invalid]" : "");
5026 case PKT_CCC_IETF_SEC_TKT
:
5027 if (suboptoff
+2 > optend
) {
5028 expert_add_info(pinfo
, vti
, &ei_bootp_missing_subopt_value
);
5031 sec_tcm
= tvb_get_ntohs(tvb
, suboptoff
);
5032 proto_item_append_text(vti
, "0x%04x (%u byte%s%s)", sec_tcm
, subopt_len
,
5033 plurality(subopt_len
, "", "s"),
5034 subopt_len
!= 2 ? " [Invalid]" : "");
5035 if (subopt_len
== 2) {
5036 pkt_s_tree
= proto_item_add_subtree(vti
, ett_bootp_option
);
5037 for (i
= 0; i
< 2; i
++) {
5038 if (sec_tcm
& sec_tcm_vals
[i
].value
) {
5039 decode_bitfield_value(bit_fld
, sec_tcm
, sec_tcm_vals
[i
].value
, 16);
5040 proto_tree_add_text(pkt_s_tree
, tvb
, suboptoff
, 2, "%sInvalidate %s",
5041 bit_fld
, sec_tcm_vals
[i
].strptr
);
5045 suboptoff
+= subopt_len
;
5049 suboptoff
+= subopt_len
;
5055 #define BOOTREQUEST 1
5058 static const value_string op_vals
[] = {
5059 { BOOTREQUEST
, "Boot Request" },
5060 { BOOTREPLY
, "Boot Reply" },
5065 dissect_bootp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
5067 proto_tree
*bp_tree
;
5069 proto_tree
*flag_tree
;
5070 proto_item
*fi
, *hidden_item
;
5073 int voff
, eoff
, tmpvoff
; /* vendor offset, end offset */
5076 const char *dhcp_type
= NULL
;
5077 const guint8
*vendor_class_id
= NULL
;
5078 guint16 flags
, secs
;
5080 guint8 overload
= 0; /* DHCP option overload */
5081 rfc3396_dns_domain_search_list
.total_number_of_block
= 0;
5082 rfc3396_dns_domain_search_list
.tvb_composite
= NULL
;
5083 rfc3396_sip_server
.total_number_of_block
= 0;
5084 rfc3396_sip_server
.tvb_composite
= NULL
;
5086 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "BOOTP");
5088 * In case we throw an exception fetching the opcode, etc.
5090 col_clear(pinfo
->cinfo
, COL_INFO
);
5092 op
= tvb_get_guint8(tvb
, 0);
5093 htype
= tvb_get_guint8(tvb
, 1);
5094 hlen
= tvb_get_guint8(tvb
, 2);
5098 if ((htype
== ARPHRD_ETHER
|| htype
== ARPHRD_IEEE802
)
5100 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Boot Request from %s (%s)",
5101 tvb_arphrdaddr_to_str(tvb
, 28, hlen
, htype
),
5102 get_ether_name(tvb_get_ptr(tvb
, 28, hlen
)));
5105 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Boot Request from %s",
5106 tvb_arphrdaddr_to_str(tvb
, 28, hlen
, htype
));
5111 col_set_str(pinfo
->cinfo
, COL_INFO
, "Boot Reply");
5115 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown BOOTP message type (%u)", op
);
5119 voff
= VENDOR_INFO_OFFSET
;
5121 /* rfc2132 says it SHOULD exist, not that it MUST exist */
5122 if (tvb_bytes_exist(tvb
, voff
, 4) &&
5123 (tvb_get_ntohl(tvb
, voff
) == 0x63825363)) {
5128 eoff
= tvb_reported_length(tvb
);
5131 * In the first pass, we just look for the DHCP message type
5132 * and Vendor class identifier options.
5136 rfc3396_dns_domain_search_list
.index_current_block
= 0;
5137 rfc3396_sip_server
.index_current_block
= 0;
5138 while (tmpvoff
< eoff
&& !at_end
) {
5139 offset_delta
= bootp_option(tvb
, pinfo
, 0, tmpvoff
, eoff
, TRUE
, &at_end
,
5140 &dhcp_type
, &vendor_class_id
, &overload
);
5141 if (offset_delta
<= 0) {
5142 THROW(ReportedBoundsError
);
5144 tmpvoff
+= offset_delta
;
5148 * If there was a DHCP message type option, flag this packet
5151 if (dhcp_type
!= NULL
) {
5153 * Yes, this is a DHCP packet, and "dhcp_type" is the
5156 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "DHCP");
5158 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "DHCP %-8s - Transaction ID 0x%x",
5159 dhcp_type
, tvb_get_ntohl(tvb
, 4));
5160 tap_queue_packet( bootp_dhcp_tap
, pinfo
, dhcp_type
);
5164 * OK, now build the protocol tree.
5167 ti
= proto_tree_add_item(tree
, proto_bootp
, tvb
, 0, -1, ENC_NA
);
5168 bp_tree
= proto_item_add_subtree(ti
, ett_bootp
);
5170 proto_tree_add_uint(bp_tree
, hf_bootp_type
, tvb
,
5173 proto_tree_add_item(bp_tree
, hf_bootp_hw_type
, tvb
,
5174 1, 1, ENC_BIG_ENDIAN
);
5175 proto_tree_add_uint(bp_tree
, hf_bootp_hw_len
, tvb
,
5177 proto_tree_add_item(bp_tree
, hf_bootp_hops
, tvb
,
5178 3, 1, ENC_BIG_ENDIAN
);
5179 proto_tree_add_item(bp_tree
, hf_bootp_id
, tvb
,
5180 4, 4, ENC_BIG_ENDIAN
);
5182 * Windows (98, XP and Vista tested) sends the "secs" value on
5183 * the wire formatted as little-endian. See if the LE value
5186 secs
= tvb_get_letohs(tvb
, 8);
5187 if (secs
> 0 && secs
<= 0xff) {
5188 ti
= proto_tree_add_uint_format_value(bp_tree
, hf_bootp_secs
, tvb
,
5189 8, 2, secs
, "%u", secs
);
5190 expert_add_info_format(pinfo
, ti
, &ei_bootp_secs_le
, "Seconds elapsed appears to be encoded as little-endian");
5192 proto_tree_add_item(bp_tree
, hf_bootp_secs
, tvb
,
5193 8, 2, ENC_BIG_ENDIAN
);
5195 flags
= tvb_get_ntohs(tvb
, 10);
5196 fi
= proto_tree_add_uint(bp_tree
, hf_bootp_flags
, tvb
,
5198 proto_item_append_text(fi
, " (%s)",
5199 (flags
& BOOTP_BC
) ? "Broadcast" : "Unicast");
5200 flag_tree
= proto_item_add_subtree(fi
, ett_bootp_flags
);
5201 proto_tree_add_boolean(flag_tree
, hf_bootp_flags_broadcast
, tvb
,
5203 proto_tree_add_uint(flag_tree
, hf_bootp_flags_reserved
, tvb
,
5205 proto_tree_add_item(bp_tree
, hf_bootp_ip_client
, tvb
,
5206 12, 4, ENC_BIG_ENDIAN
);
5207 proto_tree_add_item(bp_tree
, hf_bootp_ip_your
, tvb
,
5208 16, 4, ENC_BIG_ENDIAN
);
5209 proto_tree_add_item(bp_tree
, hf_bootp_ip_server
, tvb
,
5210 20, 4, ENC_BIG_ENDIAN
);
5211 proto_tree_add_item(bp_tree
, hf_bootp_ip_relay
, tvb
,
5212 24, 4, ENC_BIG_ENDIAN
);
5214 if (hlen
> 0 && hlen
<= 16) {
5215 if ((htype
== ARPHRD_ETHER
|| htype
== ARPHRD_IEEE802
)
5217 proto_tree_add_item(bp_tree
, hf_bootp_hw_ether_addr
, tvb
, 28, 6, ENC_NA
);
5219 /* The chaddr element is 16 bytes in length,
5220 although only the first hlen bytes are used */
5221 proto_tree_add_bytes_format_value(bp_tree
, hf_bootp_hw_addr
, tvb
, 28, 16,
5222 NULL
, "%s", tvb_arphrdaddr_to_str(tvb
, 28, hlen
, htype
));
5223 if ((16 - hlen
) > 0)
5224 proto_tree_add_item(bp_tree
, hf_bootp_hw_addr_padding
, tvb
, 28+hlen
, 16-hlen
, ENC_NA
);
5226 proto_tree_add_text(bp_tree
, tvb
,
5227 28, 16, "Client address not given");
5230 if (overload
& OPT_OVERLOAD_SNAME
) {
5231 proto_tree_add_text (bp_tree
, tvb
,
5232 SERVER_NAME_OFFSET
, SERVER_NAME_LEN
,
5233 "Server name option overloaded by DHCP");
5235 /* The server host name is optional */
5236 if (tvb_get_guint8(tvb
, SERVER_NAME_OFFSET
) != '\0') {
5237 proto_tree_add_item(bp_tree
, hf_bootp_server
, tvb
,
5239 SERVER_NAME_LEN
, ENC_ASCII
|ENC_NA
);
5242 proto_tree_add_string_format(bp_tree
, hf_bootp_server
, tvb
,
5245 "", "Server host name not given");
5249 if (overload
& OPT_OVERLOAD_FILE
) {
5250 proto_tree_add_text (bp_tree
, tvb
,
5251 FILE_NAME_OFFSET
, FILE_NAME_LEN
,
5252 "Boot file name option overloaded by DHCP");
5254 /* Boot file is optional */
5255 if (tvb_get_guint8(tvb
, FILE_NAME_OFFSET
) != '\0') {
5256 proto_tree_add_item(bp_tree
, hf_bootp_file
, tvb
,
5258 FILE_NAME_LEN
, ENC_ASCII
|ENC_NA
);
5260 proto_tree_add_string_format(bp_tree
, hf_bootp_file
, tvb
,
5263 "", "Boot file name not given");
5267 voff
= VENDOR_INFO_OFFSET
;
5268 if (dhcp_type
!= NULL
) {
5269 hidden_item
= proto_tree_add_boolean(bp_tree
, hf_bootp_dhcp
, tvb
, 0, 0, 1);
5270 PROTO_ITEM_SET_HIDDEN(hidden_item
);
5272 if (tvb_bytes_exist(tvb
, voff
, 4) &&
5273 (tvb_get_ntohl(tvb
, voff
) == 0x63825363)) {
5274 ip_addr
= tvb_get_ipv4(tvb
, voff
);
5275 proto_tree_add_ipv4_format_value(bp_tree
, hf_bootp_cookie
, tvb
,
5276 voff
, 4, ip_addr
, "DHCP");
5279 proto_tree_add_text(bp_tree
, tvb
,
5280 voff
, 64, "Bootp vendor specific options");
5285 rfc3396_dns_domain_search_list
.index_current_block
= 0;
5286 rfc3396_sip_server
.index_current_block
= 0;
5287 while (voff
< eoff
&& !at_end
) {
5288 offset_delta
= bootp_option(tvb
, pinfo
, bp_tree
, voff
, eoff
, FALSE
, &at_end
,
5289 &dhcp_type
, &vendor_class_id
, &overload
);
5290 if (offset_delta
<= 0) {
5291 THROW(ReportedBoundsError
);
5293 voff
+= offset_delta
;
5295 if ((dhcp_type
!= NULL
) && (!at_end
))
5297 expert_add_info(pinfo
, ti
, &ei_bootp_end_option_missing
);
5301 * Padding after the end option.
5303 proto_tree_add_text(bp_tree
, tvb
, voff
, eoff
- voff
, "Padding");
5308 bootp_init_protocol(void)
5312 /* first copy default_bootp_opt[] to bootp_opt[]. This resets all values to default */
5313 for(i
=0; i
<BOOTP_OPT_NUM
; i
++)
5315 bootp_opt
[i
].text
= default_bootp_opt
[i
].text
;
5316 bootp_opt
[i
].ftype
= default_bootp_opt
[i
].ftype
;
5317 bootp_opt
[i
].phf
= default_bootp_opt
[i
].phf
;
5320 /* Now apply the custom options */
5321 for (i
= 0; i
< num_bootp_records_uat
; i
++)
5323 bootp_opt
[uat_bootp_records
[i
].opt
].text
= wmem_strdup(wmem_file_scope(), uat_bootp_records
[i
].text
);
5324 bootp_opt
[uat_bootp_records
[i
].opt
].ftype
= uat_bootp_records
[i
].ftype
;
5325 bootp_opt
[uat_bootp_records
[i
].opt
].phf
= NULL
;
5330 proto_register_bootp(void)
5332 static const value_string bootp_custom_type_vals
[] = {
5333 { ipv4
, "IP Address"},
5334 { ipv4_list
, "IP Address List" },
5335 { string
, "string" },
5337 { val_boolean
, "boolean" },
5338 { val_u_byte
, "byte" },
5339 { val_u_short
, "unsigned short" },
5340 { val_u_short_list
, "unsigned short list" },
5341 { val_u_long
, "unsigned long" },
5342 { time_in_s_secs
, "integer time in seconds" },
5343 { time_in_u_secs
, "unsigned integer time in seconds" },
5347 static hf_register_info hf
[] = {
5349 { "Frame is DHCP", "bootp.dhcp",
5350 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
5354 { "Message type", "bootp.type",
5355 FT_UINT8
, BASE_DEC
, VALS(op_vals
), 0x0,
5358 { &hf_bootp_hw_type
,
5359 { "Hardware type", "bootp.hw.type",
5360 FT_UINT8
, BASE_HEX
, VALS(arp_hrd_vals
), 0x0,
5364 { "Hardware address length", "bootp.hw.len",
5365 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5369 { "Hops", "bootp.hops",
5370 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5374 { "Transaction ID", "bootp.id",
5375 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
5379 { "Seconds elapsed", "bootp.secs",
5380 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5384 { "Bootp flags", "bootp.flags",
5385 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5388 { &hf_bootp_flags_broadcast
,
5389 { "Broadcast flag", "bootp.flags.bc",
5390 FT_BOOLEAN
, 16, TFS(&flag_set_broadcast
), BOOTP_BC
,
5393 { &hf_bootp_flags_reserved
,
5394 { "Reserved flags", "bootp.flags.reserved",
5395 FT_UINT16
, BASE_HEX
, NULL
, BOOTP_MBZ
,
5398 { &hf_bootp_ip_client
,
5399 { "Client IP address", "bootp.ip.client",
5400 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
5403 { &hf_bootp_ip_your
,
5404 { "Your (client) IP address", "bootp.ip.your",
5405 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
5408 { &hf_bootp_ip_server
,
5409 { "Next server IP address", "bootp.ip.server",
5410 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
5413 { &hf_bootp_ip_relay
,
5414 { "Relay agent IP address", "bootp.ip.relay",
5415 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
5418 { &hf_bootp_hw_addr
,
5419 { "Client hardware address", "bootp.hw.addr",
5420 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5423 { &hf_bootp_hw_addr_padding
,
5424 { "Client hardware address padding", "bootp.hw.addr_padding",
5425 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5428 { &hf_bootp_hw_ether_addr
,
5429 { "Client MAC address", "bootp.hw.mac_addr",
5430 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
5434 { "Server host name", "bootp.server",
5435 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5439 { "Boot file name", "bootp.file",
5440 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5444 { "Magic cookie", "bootp.cookie",
5445 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
5449 { "Server", "bootp.fqdn.s",
5450 FT_BOOLEAN
, 8, TFS(&tfs_fqdn_s
), F_FQDN_S
,
5451 "If true, server should do DDNS update", HFILL
}},
5454 { "Server overrides", "bootp.fqdn.o",
5455 FT_BOOLEAN
, 8, TFS(&tfs_fqdn_o
), F_FQDN_O
,
5456 "If true, server insists on doing DDNS update", HFILL
}},
5459 { "Encoding", "bootp.fqdn.e",
5460 FT_BOOLEAN
, 8, TFS(&tfs_fqdn_e
), F_FQDN_E
,
5461 "If true, name is binary encoded", HFILL
}},
5464 { "Server DDNS", "bootp.fqdn.n",
5465 FT_BOOLEAN
, 8, TFS(&tfs_fqdn_n
), F_FQDN_N
,
5466 "If true, server should not do any DDNS updates", HFILL
}},
5468 { &hf_bootp_fqdn_mbz
,
5469 { "Reserved flags", "bootp.fqdn.mbz",
5470 FT_UINT8
, BASE_HEX
, NULL
, F_FQDN_MBZ
,
5473 { &hf_bootp_fqdn_rcode1
,
5474 { "A-RR result", "bootp.fqdn.rcode1",
5475 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5476 "Result code of A-RR update", HFILL
}},
5478 { &hf_bootp_fqdn_rcode2
,
5479 { "PTR-RR result", "bootp.fqdn.rcode2",
5480 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5481 "Result code of PTR-RR update", HFILL
}},
5483 { &hf_bootp_fqdn_name
,
5484 { "Client name", "bootp.fqdn.name",
5485 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5486 "Name to register via DDNS", HFILL
}},
5488 { &hf_bootp_fqdn_asciiname
,
5489 { "Client name", "bootp.fqdn.name",
5490 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5491 "Name to register via DDNS", HFILL
}},
5493 { &hf_bootp_pkt_mta_cap_len
,
5494 { "MTA DC Length", "bootp.vendor.pktc.mta_cap_len",
5495 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5496 "PacketCable MTA Device Capabilities Length", HFILL
}},
5498 { &hf_bootp_docsis_cm_cap_len
,
5499 { "CM DC Length", "bootp.vendor.docsis.cm_cap_len",
5500 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5501 "DOCSIS Cable Modem Device Capabilities Length", HFILL
}},
5503 { &hf_bootp_docsis_cm_cap_type
,
5504 { "CM DC Type", "bootp.docsis_cm_cap_type",
5505 FT_UINT16
, BASE_DEC
, VALS(docsis_cm_cap_type_vals
), 0x0,
5506 "Docsis Cable Modem Device Capability type", HFILL
}},
5508 { &hf_bootp_client_identifier_uuid
,
5509 { "Client Identifier (UUID)", "bootp.client_id_uuid",
5510 FT_GUID
, BASE_NONE
, NULL
, 0x0,
5511 "Client Machine Identifier (UUID)", HFILL
}},
5513 { &hf_bootp_client_identifier_duid_llt_hw_type
,
5514 { "Hardware type", "bootp.client_id_duid_llt_hw_type",
5515 FT_UINT16
, BASE_DEC
, VALS(arp_hrd_vals
), 0x0,
5516 "Client Identifier DUID LLT Hardware type", HFILL
}},
5518 { &hf_bootp_client_identifier_duid_ll_hw_type
,
5519 { "Hardware type", "bootp.client_id_duid_ll_hw_type",
5520 FT_UINT16
, BASE_DEC
, VALS(arp_hrd_vals
), 0x0,
5521 "Client Identifier DUID LL Hardware type", HFILL
}},
5523 { &hf_bootp_option_type
,
5524 { "Option", "bootp.option.type",
5525 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5526 "Bootp/Dhcp option type", HFILL
}},
5528 { &hf_bootp_option_length
,
5529 { "Length", "bootp.option.length",
5530 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5531 "Bootp/Dhcp option length", HFILL
}},
5533 { &hf_bootp_suboption_length
,
5534 { "Length", "bootp.option.suboption_length",
5535 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5536 "Suboption length", HFILL
}},
5538 { &hf_bootp_option_value
,
5539 { "Value", "bootp.option.value",
5540 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5541 "Bootp/Dhcp option value", HFILL
}},
5543 { &hf_bootp_option_value_8
,
5544 { "Value", "bootp.option.value.uint",
5545 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5546 "8-bit Bootp/Dhcp option value", HFILL
}},
5548 { &hf_bootp_option_value_16
,
5549 { "Value", "bootp.option.value.uint",
5550 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5551 "16-bit Bootp/Dhcp option value", HFILL
}},
5553 { &hf_bootp_option_value_u32
,
5554 { "Value", "bootp.option.value.uint",
5555 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
5556 "32-bit Bootp/Dhcp option value", HFILL
}},
5558 { &hf_bootp_option_value_i32
,
5559 { "Value", "bootp.option.value.int",
5560 FT_INT32
, BASE_DEC
, NULL
, 0x0,
5561 "32-bit Bootp/Dhcp option value", HFILL
}},
5563 { &hf_bootp_option_value_stringz
,
5564 { "Value", "bootp.option.value.string",
5565 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5566 "Z-String Bootp/Dhcp option value", HFILL
}},
5568 { &hf_bootp_option_value_ip_address
,
5569 { "Value", "bootp.option.value.address",
5570 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5571 "IP address Bootp/Dhcp option value", HFILL
}},
5573 { &hf_bootp_option_value_boolean
,
5574 { "Value", "bootp.option.value.bool",
5575 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_true_false
), 0x00,
5576 "Boolean Bootp/Dhcp option value", HFILL
}},
5578 { &hf_bootp_option_padding
,
5579 { "Padding", "bootp.option.padding",
5580 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5581 "Option 0: Padding", HFILL
}},
5583 { &hf_bootp_option_subnet_mask
,
5584 { "Subnet Mask", "bootp.option.subnet_mask",
5585 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5586 "Option 1: Subnet Mask", HFILL
}},
5588 { &hf_bootp_option_time_offset
,
5589 { "Time Offset", "bootp.option.time_offset",
5590 FT_INT32
, BASE_DEC
, NULL
, 0x00,
5591 "Option 2: Time Offset", HFILL
}},
5593 { &hf_bootp_option_router
,
5594 { "Router", "bootp.option.router",
5595 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5596 "Option 3: Router", HFILL
}},
5598 { &hf_bootp_option_time_server
,
5599 { "Time Server", "bootp.option.time_server",
5600 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5601 "Option 4: Time Server", HFILL
}},
5603 { &hf_bootp_option_name_server
,
5604 { "Name Server", "bootp.option.name_server",
5605 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5606 "Option 5: Name Server", HFILL
}},
5608 { &hf_bootp_option_domain_name_server
,
5609 { "Domain Name Server", "bootp.option.domain_name_server",
5610 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5611 "Option 6: Domain Name Server", HFILL
}},
5613 { &hf_bootp_option_log_server
,
5614 { "Log Server", "bootp.option.log_server",
5615 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5616 "Option 7: Log Server", HFILL
}},
5618 { &hf_bootp_option_quotes_server
,
5619 { "Quotes Server", "bootp.option.quotes_server",
5620 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5621 "Option 8: Quotes Server", HFILL
}},
5623 { &hf_bootp_option_lpr_server
,
5624 { "LPR Server", "bootp.option.lpr_server",
5625 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5626 "Option 9: LPR Server", HFILL
}},
5628 { &hf_bootp_option_impress_server
,
5629 { "Impress Server", "bootp.option.impress_server",
5630 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5631 "Option 10: Impress Server", HFILL
}},
5633 { &hf_bootp_option_resource_location_server
,
5634 { "Resource Location Server", "bootp.option.resource_location_server",
5635 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5636 "Option 11: Resource Location Server", HFILL
}},
5638 { &hf_bootp_option_hostname
,
5639 { "Host Name", "bootp.option.hostname",
5640 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5641 "Option 12: Host Name", HFILL
}},
5643 { &hf_bootp_option_boot_file_size
,
5644 { "Boot File Size", "bootp.option.boot_file_size",
5645 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5646 "Option 13: Boot File Size", HFILL
}},
5648 { &hf_bootp_option_merit_dump_file
,
5649 { "Merit Dump File", "bootp.option.merit_dump_file",
5650 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5651 "Option 14: Merit Dump File", HFILL
}},
5653 { &hf_bootp_option_domain_name
,
5654 { "Domain Name", "bootp.option.domain_name",
5655 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5656 "Option 15: Domain Name", HFILL
}},
5658 { &hf_bootp_option_swap_server
,
5659 { "Swap Server", "bootp.option.swap_server",
5660 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5661 "Option 16: Swap Server", HFILL
}},
5663 { &hf_bootp_option_root_path
,
5664 { "Root Path", "bootp.option.root_path",
5665 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5666 "Option 17: Root Path", HFILL
}},
5668 { &hf_bootp_option_extension_path
,
5669 { "Extensions Path", "bootp.option.extension_path",
5670 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5671 "Option 18: Extensions Path", HFILL
}},
5673 { &hf_bootp_option_ip_forwarding
,
5674 { "IP Forwarding", "bootp.option.ip_forwarding",
5675 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5676 "Option 19: IP Forwarding", HFILL
}},
5678 { &hf_bootp_option_policy_filter_ip
,
5679 { "IP Address", "bootp.option.policy_filter.ip",
5680 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5681 "Option 21: IP address", HFILL
}},
5683 { &hf_bootp_option_policy_filter_subnet_mask
,
5684 { "Subnet Mask", "bootp.option.policy_filter.subnet_mask",
5685 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5686 "Option 21: Subnet Mask", HFILL
}},
5688 { &hf_bootp_option_non_local_source_routing
,
5689 { "Non-Local Source Routing", "bootp.option.non_local_source_routing",
5690 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5691 "Option 20: Non-Local Source Routing", HFILL
}},
5693 { &hf_bootp_option_max_datagram_reassembly_size
,
5694 { "Maximum Datagram Reassembly Size", "bootp.option.max_datagram_reassembly_size",
5695 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5696 "Option 22: Maximum Datagram Reassembly Size", HFILL
}},
5698 { &hf_bootp_option_default_ip_ttl
,
5699 { "Default IP Time-to-Live", "bootp.option.default_ip_ttl",
5700 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5701 "Option 23: Default IP Time-to-Live", HFILL
}},
5703 { &hf_bootp_option_path_mtu_aging_timeout
,
5704 { "Path MTU Aging Timeout", "bootp.option.path_mtu_aging_timeout",
5705 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
5706 "Option 24: Path MTU Aging Timeout", HFILL
}},
5708 { &hf_bootp_option_path_mtu_plateau_table_item
,
5709 { "Path MTU Plateau Table Item", "bootp.option.path_mtu_plateau_table_item",
5710 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5711 "Option 25: Path MTU Plateau Table Item", HFILL
}},
5713 { &hf_bootp_option_interface_mtu
,
5714 { "Interface MTU", "bootp.option.interface_mtu",
5715 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5716 "Option 26: Interface MTU", HFILL
}},
5718 { &hf_bootp_option_all_subnets_are_local
,
5719 { "All Subnets are Local", "bootp.option.all_subnets_are_local",
5720 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_yes_no
), 0x00,
5721 "Option 27: All Subnets are Local", HFILL
}},
5723 { &hf_bootp_option_broadcast_address
,
5724 { "Broadcast Address", "bootp.option.broadcast_address",
5725 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5726 "Option 28: Broadcast Address", HFILL
}},
5728 { &hf_bootp_option_perform_mask_discovery
,
5729 { "Perform Mask Discovery", "bootp.option.perform_mask_discovery",
5730 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5731 "Option 29: Perform Mask Discovery", HFILL
}},
5733 { &hf_bootp_option_mask_supplier
,
5734 { "Mask Supplier", "bootp.option.mask_supplier",
5735 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_yes_no
), 0x00,
5736 "Option 30: Mask Supplier", HFILL
}},
5738 { &hf_bootp_option_perform_router_discover
,
5739 { "Perform Router Discover", "bootp.option.perform_router_discover",
5740 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5741 "Option 31: Perform Router Discover", HFILL
}},
5743 { &hf_bootp_option_router_solicitation_address
,
5744 { "Router Solicitation Address", "bootp.option.router_solicitation_address",
5745 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5746 "Option 32: Router Solicitation Address", HFILL
}},
5748 { &hf_bootp_option_static_route_ip
,
5749 { "Destination IP Address", "bootp.option.static_route.ip",
5750 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5751 "Option 33: Destination IP address", HFILL
}},
5753 { &hf_bootp_option_static_route_router
,
5754 { "Destination Router", "bootp.option.static_route.router",
5755 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5756 "Option 33: Destination Router", HFILL
}},
5758 { &hf_bootp_option_trailer_encapsulation
,
5759 { "Trailer Encapsulation", "bootp.option.trailer_encapsulation",
5760 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5761 "Option 34: Trailer Encapsulation", HFILL
}},
5763 { &hf_bootp_option_arp_cache_timeout
,
5764 { "ARP Cache Timeout", "bootp.option.arp_cache_timeout",
5765 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
5766 "Option 35: ARP Cache Timeout", HFILL
}},
5768 { &hf_bootp_option_ethernet_encapsulation
,
5769 { "Ethernet Encapsulation", "bootp.option.ethernet_encapsulation",
5770 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5771 "Option 36: Ethernet Encapsulation", HFILL
}},
5773 { &hf_bootp_option_tcp_default_ttl
,
5774 { "TCP Default TTL", "bootp.option.tcp_default_ttl",
5775 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5776 "Option 37: TCP Default TTL", HFILL
}},
5778 { &hf_bootp_option_tcp_keepalive_interval
,
5779 { "TCP Keepalive Interval", "bootp.option.tcp_keepalive_interval",
5780 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
5781 "Option 38: TCP Keepalive Interval", HFILL
}},
5783 { &hf_bootp_option_tcp_keepalive_garbage
,
5784 { "TCP Keepalive Garbage", "bootp.option.tcp_keepalive_garbage",
5785 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_enabled_disabled
), 0x00,
5786 "Option 39: TCP Keepalive Garbage", HFILL
}},
5788 { &hf_bootp_option_nis_domain
,
5789 { "Network Information Service Domain", "bootp.option.nis_domain",
5790 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5791 "Option 40: Network Information Service Domain", HFILL
}},
5793 { &hf_bootp_option_nis_server
,
5794 { "Network Information Service Server", "bootp.option.nis_server",
5795 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5796 "Option 41: Network Information Service Server", HFILL
}},
5798 { &hf_bootp_option_ntp_server
,
5799 { "Network Time Protocol Server", "bootp.option.ntp_server",
5800 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5801 "Option 42: Network Time Protocol Server", HFILL
}},
5804 { &hf_bootp_option43_value
,
5805 { "Value", "bootp.option.vendor.value",
5806 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5807 "Option 43: Suboption value", HFILL
}},
5809 { &hf_bootp_option43_value_8
,
5810 { "Value", "bootp.option.vendor.value.uint",
5811 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5812 "Option 43: Suboption 8-bit value", HFILL
}},
5814 { &hf_bootp_option43_value_32
,
5815 { "Value", "bootp.option.vendor.value.uint",
5816 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5817 "Option 43: Suboption 32-bit value", HFILL
}},
5819 { &hf_bootp_option43_value_stringz
,
5820 { "Value", "bootp.option.vendor.value.string",
5821 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5822 "Option 43: Suboption Z-String value", HFILL
}},
5824 { &hf_bootp_option43_value_ip_address
,
5825 { "Value", "bootp.option.vendor.value.address",
5826 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5827 "Option 43: Suboption IP address", HFILL
}},
5830 { &hf_bootp_option43_pxeclient_suboption
,
5831 { "Option 43 Suboption", "bootp.option.vendor.pxeclient.suboption",
5832 FT_UINT8
, BASE_DEC
, VALS(option43_pxeclient_suboption_vals
), 0x0,
5833 "Option 43:PXE Client Suboption", HFILL
}},
5835 { &hf_bootp_option43_pxeclient_padding
,
5836 { "Padding", "bootp.option.vendor.pxeclient.padding",
5837 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5838 "Option 43:PXE Client 0 Padding", HFILL
}},
5840 { &hf_bootp_option43_pxeclient_mtftp_ip
,
5841 { "mtftp IP", "bootp.option.vendor.pxeclient.mtftp_ip",
5842 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5843 "Option 43:PXE Client 1 mtftp IP", HFILL
}},
5845 { &hf_bootp_option43_pxeclient_mtftp_client_port
,
5846 { "mtftp IP", "bootp.option.vendor.pxeclient.mtftp_client_port",
5847 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
5848 "Option 43:PXE Client 2 mtftp client port", HFILL
}},
5850 { &hf_bootp_option43_pxeclient_mtftp_server_port
,
5851 { "mtftp IP", "bootp.option.vendor.pxeclient.mtftp_server_port",
5852 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
5853 "Option 43:PXE Client 3 mtftp server port", HFILL
}},
5855 { &hf_bootp_option43_pxeclient_mtftp_timeout
,
5856 { "mtftp timeout", "bootp.option.vendor.pxeclient.mtftp_timeout",
5857 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5858 "Option 43:PXE Client 4 mtftp timeout", HFILL
}},
5860 { &hf_bootp_option43_pxeclient_mtftp_delay
,
5861 { "mtftp delay", "bootp.option.vendor.pxeclient.mtftp_delay",
5862 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5863 "Option 43:PXE Client 5 mtftp delay", HFILL
}},
5865 { &hf_bootp_option43_pxeclient_discovery_control
,
5866 { "discovery control", "bootp.option.vendor.pxeclient.discovery_control",
5867 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
5868 "Option 43:PXE Client 6 discovery control", HFILL
}},
5870 { &hf_bootp_option43_pxeclient_multicast_address
,
5871 { "multicast address", "bootp.option.vendor.pxeclient.multicast_address",
5872 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
5873 "Option 43:PXE Client 7 multicast address", HFILL
}},
5875 { &hf_bootp_option43_pxeclient_boot_servers
,
5876 { "boot servers", "bootp.option.vendor.pxeclient.boot_servers",
5877 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5878 "Option 43:PXE Client 8 boot servers", HFILL
}},
5880 { &hf_bootp_option43_pxeclient_boot_menu
,
5881 { "boot menu", "bootp.option.vendor.pxeclient.boot_menu",
5882 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5883 "Option 43:PXE Client 9 boot menu", HFILL
}},
5885 { &hf_bootp_option43_pxeclient_menu_prompt
,
5886 { "menu prompt", "bootp.option.vendor.pxeclient.menu_prompt",
5887 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5888 "Option 43:PXE Client 10 menu prompt", HFILL
}},
5890 { &hf_bootp_option43_pxeclient_multicast_address_alloc
,
5891 { "multicast address alloc", "bootp.option.vendor.pxeclient.multicast_address_alloc",
5892 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5893 "Option 43:PXE Client 11 multicast address alloc", HFILL
}},
5895 { &hf_bootp_option43_pxeclient_credential_types
,
5896 { "credential types", "bootp.option.vendor.pxeclient.credential_types",
5897 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5898 "Option 43:PXE Client 12 credential types", HFILL
}},
5900 { &hf_bootp_option43_pxeclient_boot_item
,
5901 { "boot item", "bootp.option.vendor.pxeclient.boot_item",
5902 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5903 "Option 43:PXE Client 71 boot item", HFILL
}},
5905 { &hf_bootp_option43_pxeclient_end
,
5906 { "PXE Client End", "bootp.option.vendor.pxeclient.end",
5907 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5908 "Option 43:PXE Client 255 End", HFILL
}},
5911 { &hf_bootp_option43_cl_suboption
,
5912 { "Option 43 Suboption", "bootp.option.vendor.cl.suboption",
5913 FT_UINT8
, BASE_DEC
, VALS(option43_cl_suboption_vals
), 0x0,
5914 "Option 43:CL Suboption", HFILL
}},
5916 { &hf_bootp_option43_cl_padding
,
5917 { "Padding", "bootp.option.vendor.cl.padding",
5918 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5919 "Option 43:CL 0 Padding", HFILL
}},
5921 { &hf_bootp_option43_cl_suboption_request_list
,
5922 { "Suboption Request List", "bootp.option.vendor.cl.suboption_request_list",
5923 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5924 "Option 43:CL 1 Suboption Request List", HFILL
}},
5926 { &hf_bootp_option43_cl_device_type
,
5927 { "Device Type", "bootp.option.vendor.cl.device_type",
5928 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5929 "Option 43:CL 2 Device Type", HFILL
}},
5931 { &hf_bootp_option43_cl_esafe_type
,
5932 { "eSAFE Types", "bootp.option.vendor.cl.esafe_type",
5933 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5934 "Option 43:CL 3 eSAFE Types", HFILL
}},
5936 { &hf_bootp_option43_cl_serial_number
,
5937 { "Serial Number", "bootp.option.vendor.cl.serial_number",
5938 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5939 "Option 43:CL 4 Serial Number", HFILL
}},
5941 { &hf_bootp_option43_cl_hardware_version
,
5942 { "Hardware Version", "bootp.option.vendor.cl.hardware_version",
5943 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5944 "Option 43:CL 5 Hardware Version", HFILL
}},
5946 { &hf_bootp_option43_cl_software_version
,
5947 { "Software Version", "bootp.option.vendor.cl.software_version",
5948 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5949 "Option 43:CL 6 Software Version", HFILL
}},
5951 { &hf_bootp_option43_cl_boot_rom_version
,
5952 { "Boot ROM version", "bootp.option.vendor.cl.boot_rom_version",
5953 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5954 "Option 43:CL 7 Boot ROM version", HFILL
}},
5956 { &hf_bootp_option43_cl_oui_string
,
5957 { "Organizationally Unique Identifier", "bootp.option.vendor.cl.oui_string",
5958 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5959 "Option 43:CL 8 Organizationally Unique Identifier", HFILL
}},
5961 { &hf_bootp_option43_cl_oui_bytes
,
5962 { "Organizationally Unique Identifier", "bootp.option.vendor.cl.oui_bytes",
5963 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5964 "Option 43:CL 8 Organizationally Unique Identifier", HFILL
}},
5966 { &hf_bootp_option43_cl_model_number
,
5967 { "Model Number", "bootp.option.vendor.cl.model_number",
5968 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5969 "Option 43:CL 9 Model Number", HFILL
}},
5971 { &hf_bootp_option43_cl_vendor_name10
,
5972 { "Vendor Name", "bootp.option.vendor.cl.vendor_name10",
5973 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5974 "Option 43:CL 10 Vendor Name", HFILL
}},
5976 { &hf_bootp_option43_cl_address_realm
,
5977 { "Address Realm", "bootp.option.vendor.cl.address_realm",
5978 FT_UINT8
, BASE_DEC
, VALS(cablehome_subopt11_vals
), 0x0,
5979 "Option 43:CL 11 Address Realm", HFILL
}},
5981 { &hf_bootp_option43_cl_cm_ps_system_desc
,
5982 { "CM/PS System Description", "bootp.option.vendor.cl.cm_ps_system_desc",
5983 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5984 "Option 43:CL 12 CM/PS System Description", HFILL
}},
5986 { &hf_bootp_option43_cl_cm_ps_firmware_revision
,
5987 { "CM/PS Firmware Revision", "bootp.option.vendor.cl.cm_ps_firmware_revision",
5988 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5989 "Option 43:CL 13 CM/PS Firmware Revision", HFILL
}},
5991 { &hf_bootp_option43_cl_firewall_policy_file_version
,
5992 { "Firewall Policy File Version", "bootp.option.vendor.cl.firewall_policy_file_version",
5993 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5994 "Option 43:CL 14 Firewall Policy File Version", HFILL
}},
5996 { &hf_bootp_option43_cl_esafe_config_file_devices
,
5997 { "eSafe Config File Devices", "bootp.option.vendor.cl.esafe_config_file_devices",
5998 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
5999 "Option 43:CL 15 eSafe Config File Devices", HFILL
}},
6001 { &hf_bootp_option43_cl_video_security_tape
,
6002 { "Video Security Type", "bootp.option.vendor.cl.video_security_tape",
6003 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6004 "Option 43:CL 18 Video Security Type", HFILL
}},
6006 { &hf_bootp_option43_cl_mta_mac_address
,
6007 { "MTA MAC Address", "bootp.option.vendor.cl.mta_mac_address",
6008 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
6009 "Option 43:CL 31 MTA MAC Address", HFILL
}},
6011 { &hf_bootp_option43_cl_correlation_ID
,
6012 { "Correlation ID", "bootp.option.vendor.cl.correlation_ID",
6013 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
6014 "Option 43: CL 32 Correlation ID", HFILL
}},
6016 { &hf_bootp_option43_cl_vendor_name51
,
6017 { "Vendor Name", "bootp.option.vendor.cl.vendor_name51",
6018 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6019 "Option 43:CL 51 Vendor Name", HFILL
}},
6021 { &hf_bootp_option43_cl_cablecard_capability
,
6022 { "CableCARD Capability", "bootp.option.vendor.cl.cablecard_capability",
6023 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6024 "Option 43:CL 52 CableCARD Capability", HFILL
}},
6026 { &hf_bootp_option43_cl_device_id_ca
,
6027 { "Device Identification (CA)", "bootp.option.vendor.cl.device_id_ca",
6028 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6029 "Option 43:CL 53 Device Identification (CA)", HFILL
}},
6031 { &hf_bootp_option43_cl_device_id_x509
,
6032 { "Device Identification (X.509)", "bootp.option.vendor.cl.device_id_x509",
6033 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6034 "Option 43:CL 54 Device Identification (X.509)", HFILL
}},
6036 { &hf_bootp_option43_cl_end
,
6037 { "CL End", "bootp.option.vendor.cl.end",
6038 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6039 "Option 43:CL 255 End", HFILL
}},
6042 { &hf_bootp_option43_alcatel_suboption
,
6043 { "Option 43 Suboption", "bootp.option.vendor.alu.suboption",
6044 FT_UINT8
, BASE_DEC
, VALS(option43_alcatel_suboption_vals
), 0x0,
6045 "Option 43:Alcatel Suboption", HFILL
}},
6047 { &hf_bootp_option43_alcatel_padding
,
6048 { "Padding", "bootp.option.vendor.alu.padding",
6049 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6050 "Option 43:Alcatel 0 Padding", HFILL
}},
6052 { &hf_bootp_option43_alcatel_vlan_id
,
6053 { "Voice VLAN ID", "bootp.option.vendor.alu.vid",
6054 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6055 "Option 43:Alcatel 58 Voice VLAN ID", HFILL
}},
6057 { &hf_bootp_option43_alcatel_tftp1
,
6058 { "Spatial Redundancy TFTP1", "bootp.option.vendor.alu.tftp1",
6059 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
6060 "Option 43:Alcatel 64 Spatial Redundancy TFTP1", HFILL
}},
6062 { &hf_bootp_option43_alcatel_tftp2
,
6063 { "Spatial Redundancy TFTP2", "bootp.option.vendor.alu.tftp2",
6064 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
6065 "Option 43:Alcatel 65 Spatial Redundancy TFTP2", HFILL
}},
6067 { &hf_bootp_option43_alcatel_app_type
,
6068 { "Application Type", "bootp.option.vendor.alu.app_type",
6069 FT_UINT8
, BASE_DEC
, VALS(option43_alcatel_app_type_vals
), 0x0,
6070 "Option 43:Alcatel 66 Application Type", HFILL
}},
6072 { &hf_bootp_option43_alcatel_sip_url
,
6073 { "SIP URL", "bootp.option.vendor.alu.sip_url",
6074 FT_STRING
, BASE_NONE
, NULL
, 0x0,
6075 "Option 43:Alcatel 67 SIP URL", HFILL
}},
6077 { &hf_bootp_option43_alcatel_end
,
6078 { "Alcatel End", "bootp.option.vendor.alu.end",
6079 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6080 "Option 43:Alcatel 255 End", HFILL
}},
6083 { &hf_bootp_option_netbios_over_tcpip_name_server
,
6084 { "NetBIOS over TCP/IP Name Server", "bootp.option.netbios_over_tcpip_name_server",
6085 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6086 "Option 44: NetBIOS over TCP/IP Name Server", HFILL
}},
6088 { &hf_bootp_option_netbios_over_tcpip_dd_name_server
,
6089 { "NetBIOS over TCP/IP Datagram Distribution Name Server", "bootp.option.netbios_over_tcpip_dd_name_server",
6090 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6091 "Option 45: NetBIOS over TCP/IP Datagram Distribution Name Server", HFILL
}},
6093 { &hf_bootp_option_netbios_over_tcpip_node_type
,
6094 { "NetBIOS over TCP/IP Node Type", "bootp.option.netbios_over_tcpip_node_type",
6095 FT_UINT8
, BASE_DEC
, VALS(bootp_nbnt_vals
), 0x0,
6096 "Option 46: NetBIOS over TCP/IP Node Type", HFILL
}},
6098 { &hf_bootp_option_netbios_over_tcpip_scope
,
6099 { "NetBIOS over TCP/IP Scope", "bootp.option.netbios_over_tcpip_scope",
6100 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6101 "Option 47: NetBIOS over TCP/IP Scope", HFILL
}},
6103 { &hf_bootp_option_xwindows_system_font_server
,
6104 { "X Window System Font Server", "bootp.option.xwindows_system_font_server",
6105 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6106 "Option 48: X Window System Font Server", HFILL
}},
6108 { &hf_bootp_option_xwindows_system_display_manager
,
6109 { "X Window System Display Manager", "bootp.option.xwindows_system_display_manager",
6110 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6111 "Option 49: X Window System Display Manager", HFILL
}},
6113 { &hf_bootp_option_requested_ip_address
,
6114 { "Requested IP Address", "bootp.option.requested_ip_address",
6115 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6116 "Option 50: Requested IP Address", HFILL
}},
6118 { &hf_bootp_option_ip_address_lease_time
,
6119 { "IP Address Lease Time", "bootp.option.ip_address_lease_time",
6120 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
6121 "Option 51: IP Address Lease Time", HFILL
}},
6123 { &hf_bootp_option_option_overload
,
6124 { "Option Overload", "bootp.option.option_overload",
6125 FT_UINT8
, BASE_DEC
, VALS(opt_overload_vals
), 0x0,
6126 "Option 52: Option Overload", HFILL
}},
6128 { &hf_bootp_option_dhcp
,
6129 { "DHCP", "bootp.option.dhcp",
6130 FT_UINT8
, BASE_DEC
, VALS(opt53_text
), 0x0,
6131 "Option 53: DHCP option", HFILL
}},
6133 { &hf_bootp_option_dhcp_server_id
,
6134 { "DHCP Server Identifier", "bootp.option.dhcp_server_id",
6135 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6136 "Option 54: DHCP Server Identifier", HFILL
}},
6138 { &hf_bootp_option_parameter_request_list_item
,
6139 { "Parameter Request List Item", "bootp.option.request_list_item",
6140 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6141 "Option 55: Parameter Request List Item", HFILL
}},
6143 { &hf_bootp_option_message
,
6144 { "Message", "bootp.option.message",
6145 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6146 "Option 56: Option message", HFILL
}},
6148 { &hf_bootp_option_dhcp_max_message_size
,
6149 { "Maximum DHCP Message Size", "bootp.option.dhcp_max_message_size",
6150 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6151 "Option 57: Maximum DHCP Message Size", HFILL
}},
6153 { &hf_bootp_option_renewal_time_value
,
6154 { "Renewal Time Value", "bootp.option.renewal_time_value",
6155 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
6156 "Option 58: Renewal Time Value", HFILL
}},
6158 { &hf_bootp_option_rebinding_time_value
,
6159 { "Rebinding Time Value", "bootp.option.rebinding_time_value",
6160 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
6161 "Option 59: Rebinding Time Value", HFILL
}},
6163 { &hf_bootp_option_vendor_class_id
,
6164 { "Vendor class identifier", "bootp.option.vendor_class_id",
6165 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6166 "Option 60: Vendor class identifier", HFILL
}},
6168 { &hf_bootp_option_novell_netware_ip_domain
,
6169 { "Novell/Netware IP domain", "bootp.option.novell_netware_ip_domain",
6170 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6171 "Option 62: Novell/Netware IP domain", HFILL
}},
6173 { &hf_bootp_option63_suboption
,
6174 { "Option 63 Suboption", "bootp.option.novell_options.suboption",
6175 FT_UINT8
, BASE_DEC
, VALS(option63_suboption_vals
), 0x0,
6176 "Option 63: Suboption", HFILL
}},
6178 { &hf_bootp_option63_value
,
6179 { "Value", "bootp.option.novell_options.value",
6180 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6181 "Option 63: Suboption value", HFILL
}},
6183 { &hf_bootp_option63_value_8
,
6184 { "Value", "bootp.option.novell_options.value.uint",
6185 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6186 "Option 63: Suboption 8-bit value", HFILL
}},
6188 { &hf_bootp_option63_value_ip_address
,
6189 { "Value", "bootp.option.novell_options.value.address",
6190 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6191 "Option 63: Suboption IP address", HFILL
}},
6193 { &hf_bootp_option63_value_boolean
,
6194 { "Value", "bootp.option.novell_options.value.bool",
6195 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_true_false
), 0x00,
6196 "Option 63: Suboption Boolean value", HFILL
}},
6198 { &hf_bootp_option63_broadcast
,
6199 { "Broadcast for nearest Netware server", "bootp.option.novell_options.broadcast",
6200 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_yes_no
), 0x00,
6201 "Option 63:5 Broadcast for nearest Netware server", HFILL
}},
6203 { &hf_bootp_option63_preferred_dss_server
,
6204 { "Preferred DSS server", "bootp.option.novell_options.preferred_dss_server",
6205 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6206 "Option 63:6 Preferred DSS server", HFILL
}},
6208 { &hf_bootp_option63_nearest_nwip_server
,
6209 { "Nearest NWIP server", "bootp.option.novell_options.nearest_nwip_server",
6210 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6211 "Option 63:7 Nearest NWIP server", HFILL
}},
6213 { &hf_bootp_option63_autoretries
,
6214 { "Autoretries", "bootp.option.novell_options.autoretries",
6215 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6216 "Option 63:8 Autoretries", HFILL
}},
6218 { &hf_bootp_option63_autoretry_delay
,
6219 { "Autoretry delay, sec",
6220 "bootp.option.novell_options.autoretry_delay", FT_UINT8
, BASE_DEC
, NULL
,
6221 0x0, "Option 63:9 Autoretry delay, sec", HFILL
}},
6223 { &hf_bootp_option63_support_netware_v1_1
,
6224 { "Broadcast for nearest Netware server", "bootp.option.novell_options.support_netware_v1_1",
6225 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_yes_no
), 0x00,
6226 "Option 63:10 Broadcast for nearest Netware server", HFILL
}},
6228 { &hf_bootp_option63_primary_dss
,
6229 { "Primary DSS", "bootp.option.novell_options.primary_dss",
6230 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6231 "Option 63:11 Primary DSS", HFILL
}},
6234 { &hf_bootp_option_nis_plus_domain
,
6235 { "Network Information Service+ Domain", "bootp.option.nis_plus_domain",
6236 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6237 "Option 64: Network Information Service+ Domain", HFILL
}},
6239 { &hf_bootp_option_nis_plus_server
,
6240 { "Network Information Service+ Server", "bootp.option.nis_plus_server",
6241 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6242 "Option 65: Network Information Service+ Server", HFILL
}},
6244 { &hf_bootp_option_tftp_server_name
,
6245 { "TFTP Server Name", "bootp.option.tftp_server_name",
6246 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6247 "Option 66: TFTP Server Name", HFILL
}},
6249 { &hf_bootp_option_bootfile_name
,
6250 { "Bootfile name", "bootp.option.bootfile_name",
6251 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6252 "Option 67: Bootfile name", HFILL
}},
6254 { &hf_bootp_option_mobile_ip_home_agent
,
6255 { "Mobile IP Home Agent", "bootp.option.mobile_ip_home_agent",
6256 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6257 "Option 68: Mobile IP Home Agent", HFILL
}},
6259 { &hf_bootp_option_smtp_server
,
6260 { "SMTP Server", "bootp.option.smtp_server",
6261 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6262 "Option 69: SMTP Server", HFILL
}},
6264 { &hf_bootp_option_pop3_server
,
6265 { "POP3 Server", "bootp.option.pop3_server",
6266 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6267 "Option 70: POP3 Server", HFILL
}},
6269 { &hf_bootp_option_nntp_server
,
6270 { "NNTP Server", "bootp.option.nntp_server",
6271 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6272 "Option 71: NNTP Server", HFILL
}},
6274 { &hf_bootp_option_default_www_server
,
6275 { "Default WWW Server", "bootp.option.default_www_server",
6276 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6277 "Option 72: Default WWW Server", HFILL
}},
6279 { &hf_bootp_option_default_finger_server
,
6280 { "Default Finger Server", "bootp.option.default_finger_server",
6281 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6282 "Option 73: Default Finger Server", HFILL
}},
6284 { &hf_bootp_option_default_irc_server
,
6285 { "Default IRC Server", "bootp.option.default_irc_server",
6286 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6287 "Option 74: Default IRC Server", HFILL
}},
6289 { &hf_bootp_option_streettalk_server
,
6290 { "StreetTalk Server", "bootp.option.streettalk_server",
6291 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6292 "Option 75: StreetTalk Server", HFILL
}},
6294 { &hf_bootp_option_streettalk_da_server
,
6295 { "StreetTalk Directory Assistance Server", "bootp.option.streettalk_da_server",
6296 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6297 "Option 76: StreetTalk Directory Assistance Server", HFILL
}},
6299 { &hf_bootp_option77_user_class
,
6300 { "Instance of User Class", "bootp.option.user_class",
6301 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6304 { &hf_bootp_option77_user_class_length
,
6305 { "User Class Length", "bootp.option.user_class.length",
6306 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6307 "Length of User Class Instance", HFILL
}},
6309 { &hf_bootp_option77_user_class_data
,
6310 { "User Class Data", "bootp.option.user_class.data",
6311 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6312 "Data of User Class Instance", HFILL
}},
6314 { &hf_bootp_option_slp_directory_agent_value
,
6315 { "Value", "bootp.option.slp_directory_agent.value",
6316 FT_UINT8
, BASE_DEC
, VALS(slpda_vals
), 0x0,
6317 "Option 78: SLPDA Value", HFILL
}},
6319 { &hf_bootp_option_slp_directory_agent_slpda_address
,
6320 { "IP Address", "bootp.option.slp_directory_agent.slpda_address",
6321 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6322 "Option 78: SLPDA Address", HFILL
}},
6324 { &hf_bootp_option_slp_service_scope_value
,
6325 { "Value", "bootp.option.slp_service_scope.value",
6326 FT_UINT8
, BASE_DEC
, VALS(slp_scope_vals
), 0x0,
6327 "Option 79: SLP Service Scope Value", HFILL
}},
6329 { &hf_bootp_option_slp_service_scope_string
,
6330 { "SLP Service Scope", "bootp.option.slp_service_scope.string",
6331 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6332 "Option 79: SLP Service Scope", HFILL
}},
6335 { &hf_bootp_option82_suboption
,
6336 { "Option 82 Suboption", "bootp.option.agent_information_option.suboption",
6337 FT_UINT8
, BASE_DEC
, VALS(option82_suboption_vals
), 0x0,
6338 "Option 82: Suboption", HFILL
}},
6340 { &hf_bootp_option82_value
,
6341 { "Value", "bootp.option.agent_information_option.value",
6342 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6343 "Option 82: Suboption value", HFILL
}},
6345 { &hf_bootp_option82_value_8
,
6346 { "Value", "bootp.option.agent_information_option.value.uint",
6347 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6348 "Option 82: Suboption 8-bit value", HFILL
}},
6350 { &hf_bootp_option82_value_32
,
6351 { "Value", "bootp.option.agent_information_option.value.uint",
6352 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
6353 "Option 82: Suboption 32-bit value", HFILL
}},
6355 { &hf_bootp_option82_value_ip_address
,
6356 { "Value", "bootp.option.agent_information_option.value.address",
6357 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6358 "Option 82: Suboption IP address", HFILL
}},
6360 { &hf_bootp_option82_value_stringz
,
6361 { "Value", "bootp.option.agent_information_option.value.string",
6362 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6363 "Option 82: Suboption Z-String value", HFILL
}},
6365 { &hf_bootp_option82_padding
,
6366 { "Padding", "bootp.option.agent_information_option.padding",
6367 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6368 "Option 82:0 Padding", HFILL
}},
6370 { &hf_bootp_option82_agent_circuit_id
,
6371 { "Agent Circuit ID", "bootp.option.agent_information_option.agent_circuit_id",
6372 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6373 "Option 82:1 Agent Circuit ID", HFILL
}},
6375 { &hf_bootp_option82_agent_remote_id
,
6376 { "Agent Remote ID", "bootp.option.agent_information_option.agent_remote_id",
6377 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6378 "Option 82:2 Agent Remote ID", HFILL
}},
6380 { &hf_bootp_option82_reserved
,
6381 { "Reserved", "bootp.option.agent_information_option.reserved",
6382 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6383 "Option 82:3 Reserved", HFILL
}},
6385 { &hf_bootp_option82_docsis_device_class
,
6386 { "DOCSIS Device Class", "bootp.option.agent_information_option.docsis_device_class",
6387 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
6388 "Option 82:4 DOCSIS Device Class", HFILL
}},
6390 { &hf_bootp_option82_link_selection
,
6391 { "Link selection", "bootp.option.agent_information_option.link_selection",
6392 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6393 "Option 82:5 Link selection", HFILL
}},
6395 { &hf_bootp_option82_subscriber_id
,
6396 { "Subscriber ID", "bootp.option.agent_information_option.subscriber_id",
6397 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6398 "Option 82:6 Subscriber ID", HFILL
}},
6400 { &hf_bootp_option82_radius_attributes
,
6401 { "RADIUS Attributes", "bootp.option.agent_information_option.radius_attributes",
6402 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6403 "Option 82:7 RADIUS Attributes", HFILL
}},
6405 { &hf_bootp_option82_authentication
,
6406 { "Authentication", "bootp.option.agent_information_option.authentication",
6407 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6408 "Option 82:8 Authentication", HFILL
}},
6410 { &hf_bootp_option82_vi
,
6411 { "Vendor-Specific Information", "bootp.option.agent_information_option.vi",
6412 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6413 "Option 82:9 Vendor-Specific Information", HFILL
}},
6415 { &hf_bootp_option82_vi_enterprise
,
6416 { "Enterprise", "bootp.option.agent_information_option.vi.enterprise",
6417 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x0,
6418 "Option 82:9 VI Enterprise", HFILL
}},
6420 { &hf_bootp_option82_vi_data_length
,
6421 { "Data Length", "bootp.option.agent_information_option.vi.data_length",
6422 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6423 "Option 82:9 VI Data Length", HFILL
}},
6425 { &hf_bootp_option82_vi_cl_option
,
6426 { "Option", "bootp.option.agent_information_option.vi.cl.option",
6427 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6428 "Option 82:9 VI CL Option", HFILL
}},
6430 { &hf_bootp_option82_vi_cl_length
,
6431 { "Length", "bootp.option.agent_information_option.vi.cl.length",
6432 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6433 "Option 82:9 VI CL Length", HFILL
}},
6435 { &hf_bootp_option82_vi_cl_tag
,
6436 { "Tag", "bootp.option.agent_information_option.vi.cl.tag",
6437 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6438 "Option 82:9 VI CL Tag", HFILL
}},
6440 { &hf_bootp_option82_vi_cl_tag_length
,
6441 { "Tag Length", "bootp.option.agent_information_option.vi.cl.tag_length",
6442 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6443 "Option 82:9 VI CL Tag Length", HFILL
}},
6445 { &hf_bootp_option82_vi_cl_docsis_version
,
6446 { "DOCSIS Version Number", "bootp.option.agent_information_option.vi.cl.docsis_version",
6447 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
6448 "Option 82:9 VI CL DOCSIS Version Number", HFILL
}},
6450 { &hf_bootp_option82_flags
,
6451 { "Flags", "bootp.option.agent_information_option.flags",
6452 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
6453 "Option 82:10 Flags", HFILL
}},
6455 { &hf_bootp_option82_server_id_override
,
6456 { "Server ID Override", "bootp.option.agent_information_option.server_id_override",
6457 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6458 "Option 82:11 Server ID Override", HFILL
}},
6460 { &hf_bootp_option82_link_selection_cisco
,
6461 { "Link selection (Cisco proprietary)", "bootp.option.agent_information_option.link_selection_cisco",
6462 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6463 "Option 82:150 Link selection (Cisco proprietary)", HFILL
}},
6465 { &hf_bootp_option82_vrf_name_vpn_id
,
6466 { "VRF name/VPN ID", "bootp.option.agent_information_option.vrf_name_vpn_id",
6467 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
6468 "Option 82:151 VRF name/VPN ID", HFILL
}},
6470 { &hf_bootp_option82_vrf_name_vpn_id_oui
,
6471 { "VRF name/VPN ID OUI", "bootp.option.agent_information_option.vrf_name_vpn_id_oui",
6472 FT_UINT24
, BASE_HEX
, NULL
, 0x00,
6473 "Option 82:151 VRF name/VPN ID OUI", HFILL
}},
6475 { &hf_bootp_option82_vrf_name_vpn_id_index
,
6476 { "VRF name/VPN ID Index", "bootp.option.agent_information_option.vrf_name_vpn_id_index",
6477 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
6478 "Option 82:151 VRF name/VPN ID Index", HFILL
}},
6480 { &hf_bootp_option82_server_id_override_cisco
,
6481 { "Server ID Override (Cisco proprietary)", "bootp.option.agent_information_option.server_id_override_cisco",
6482 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6483 "Option 82:152 Server ID Override (Cisco proprietary)", HFILL
}},
6486 { &hf_bootp_option_novell_dss_string
,
6487 { "Novell Directory Services Servers String", "bootp.option.novell_dss.string",
6488 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6489 "Option 85: Novell Directory Services Servers String", HFILL
}},
6491 { &hf_bootp_option_novell_dss_ip
,
6492 { "IP Address", "bootp.option.novell_dss.ip",
6493 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6494 "Option 85: Novell Directory Services Servers IP Address", HFILL
}},
6496 { &hf_bootp_option_novell_ds_tree_name
,
6497 { "Novell Directory Services Tree Name", "bootp.option.novell_ds_tree_name",
6498 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6499 "Option 86: Novell Directory Services Tree Name", HFILL
}},
6501 { &hf_bootp_option_novell_ds_context
,
6502 { "Novell Directory Services Context", "bootp.option.novell_ds_context",
6503 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6504 "Option 87: Novell Directory Services Context", HFILL
}},
6506 { &hf_bootp_option_dhcp_authentication_protocol
,
6507 { "Protocol", "bootp.option.dhcp_authentication.protocol",
6508 FT_UINT8
, BASE_DEC
, VALS(authen_protocol_vals
), 0x0,
6509 "Option 90: Authentication Protocol", HFILL
}},
6511 { &hf_bootp_option_dhcp_authentication_alg_delay
,
6512 { "Delay Algorithm", "bootp.option.dhcp_authentication.alg_delay",
6513 FT_UINT8
, BASE_DEC
, VALS(authen_da_algo_vals
), 0x0,
6514 "Option 90: Delayed Authentication Algorithm", HFILL
}},
6516 { &hf_bootp_option_dhcp_authentication_algorithm
,
6517 { "Algorithm", "bootp.option.dhcp_authentication.algorithm",
6518 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6519 "Option 90: Authentication Algorithm", HFILL
}},
6521 { &hf_bootp_option_dhcp_authentication_rdm
,
6522 { "Replay Detection Method", "bootp.option.dhcp_authentication.rdm",
6523 FT_UINT8
, BASE_DEC
, VALS(authen_rdm_vals
), 0x0,
6524 "Option 90: Replay Detection Method", HFILL
}},
6526 { &hf_bootp_option_dhcp_authentication_rdm_replay_detection
,
6527 { "RDM Replay Detection Value", "bootp.option.dhcp_authentication.rdm_replay_detection",
6528 FT_UINT64
, BASE_HEX
, NULL
, 0x0,
6529 "Option 90: RDM Replay Detection Value", HFILL
}},
6531 { &hf_bootp_option_dhcp_authentication_rdm_rdv
,
6532 { "Replay Detection Value", "bootp.option.dhcp_authentication.rdm_rdv",
6533 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6534 "Option 90: Replay Detection Value", HFILL
}},
6536 { &hf_bootp_option_dhcp_authentication_secret_id
,
6537 { "Secret ID", "bootp.option.dhcp_authentication.secret_id",
6538 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
6539 "Option 90: Secret ID", HFILL
}},
6541 { &hf_bootp_option_dhcp_authentication_hmac_md5_hash
,
6542 { "HMAC MD5 Hash", "bootp.option.dhcp_authentication.hmac_md5_hash",
6543 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6544 "Option 90: HMAC MD5 Hash", HFILL
}},
6546 { &hf_bootp_option_dhcp_authentication_information
,
6547 { "Authentication Information", "bootp.option.dhcp_authentication.information",
6548 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6549 "Option 90: Authentication Information", HFILL
}},
6551 { &hf_bootp_option_client_last_transaction_time
,
6552 { "Client last transaction time", "bootp.option.client_last_transaction_time",
6553 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
6554 "Option 91: Client last transaction time", HFILL
}},
6556 { &hf_bootp_option_associated_ip_option
,
6557 { "Associated IP option", "bootp.option.associated_ip_option",
6558 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6559 "Option 92: Associated IP option", HFILL
}},
6561 { &hf_bootp_option_client_system_architecture
,
6562 { "Client System Architecture", "bootp.option.client_system_architecture",
6563 FT_UINT16
, BASE_DEC
, VALS(bootp_client_arch
), 0x0,
6564 "Option 93: Client System Architecture", HFILL
}},
6566 { &hf_bootp_option_client_network_id_major_ver
,
6567 { "Major Version", "bootp.client_network_id_major",
6568 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6569 "Option 94: Major Version", HFILL
}},
6571 { &hf_bootp_option_client_network_id_minor_ver
,
6572 { "Minor Version", "bootp.client_network_id_minor",
6573 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6574 "Option 94: Minor Version", HFILL
}},
6576 { &hf_bootp_option_civic_location_what
,
6577 { "What", "bootp.option.civic_location.what",
6578 FT_UINT8
, BASE_DEC
, VALS(civic_address_what_values
), 0x0,
6579 "Option 99: What", HFILL
}},
6581 { &hf_bootp_option_civic_location_country
,
6582 { "Country", "bootp.option.civic_location.country",
6583 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6584 "Option 99: Country", HFILL
}},
6586 { &hf_bootp_option_civic_location_ca_type
,
6587 { "CA Type", "bootp.option.civic_location.ca_type",
6588 FT_UINT8
, BASE_DEC
, VALS(civic_address_type_values
), 0x0,
6589 "Option 99: CA Type", HFILL
}},
6591 { &hf_bootp_option_civic_location_ca_length
,
6592 { "CA Length", "bootp.option.civic_location.ca_length",
6593 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6594 "Option 99: CA Length", HFILL
}},
6596 { &hf_bootp_option_civic_location_ca_value
,
6597 { "CA Value", "bootp.option.civic_location.ca_value",
6598 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6599 "Option 99: CA Value", HFILL
}},
6601 { &hf_bootp_option_netinfo_parent_server_address
,
6602 { "NetInfo Parent Server Address", "bootp.option.netinfo_parent_server_address",
6603 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6604 "Option 112: NetInfo Parent Server Address", HFILL
}},
6606 { &hf_bootp_option_netinfo_parent_server_tag
,
6607 { "NetInfo Parent Server Tag", "bootp.option.netinfo_parent_server_tag",
6608 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6609 "Option 113: NetInfo Parent Server Tag", HFILL
}},
6611 { &hf_bootp_option_dhcp_auto_configuration
,
6612 { "DHCP Auto-Configuration", "bootp.option.dhcp_auto_configuration",
6613 FT_UINT8
, BASE_DEC
, VALS(dhcp_autoconfig
), 0x0,
6614 "Option 116: DHCP Auto-Configuration", HFILL
}},
6616 { &hf_bootp_option_dhcp_name_service_search_option
,
6617 { "Name Service", "bootp.option.dhcp_name_service_search_option",
6618 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6619 "Option 117: Name Service", HFILL
}},
6621 { &hf_bootp_option_dhcp_dns_domain_search_list_rfc_3396_detected
,
6622 { "Encoding Long Options detected (RFC 3396)", "bootp.option.dhcp_dns_domain_search_list_rfc_3396_detected",
6623 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6624 "Option 119: Encoding Long Options detected (RFC 3396)", HFILL
}},
6626 { &hf_bootp_option_dhcp_dns_domain_search_list_refer_last_option
,
6627 { "For the data, please refer to last option 119", "bootp.option.dhcp_dns_domain_search_list_refer_last_option",
6628 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6629 "Option 119: For the data, please refer to last option 119", HFILL
}},
6631 { &hf_bootp_option_dhcp_dns_domain_search_list_fqdn
,
6632 { "FQDN", "bootp.option.dhcp_dns_domain_search_list_fqdn",
6633 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6634 "Option 119: FQDN", HFILL
}},
6636 { &hf_bootp_option_sip_server_rfc_3396_detected
,
6637 { "Encoding Long Options detected (RFC 3396)", "bootp.option.sip_server.rfc_3396_detected",
6638 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6639 "Option 120: Encoding Long Options detected (RFC 3396)", HFILL
}},
6641 { &hf_bootp_option_sip_server_refer_last_option
,
6642 { "For the data, please refer to last option 120", "bootp.option.sip_server.refer_last_option",
6643 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6644 "Option 120: For the data, please refer to last option 120", HFILL
}},
6646 { &hf_bootp_option_sip_server_enc
,
6647 { "SIP Server Encoding", "bootp.option.sip_server.encoding",
6648 FT_UINT8
, BASE_DEC
, VALS(sip_server_enc_vals
), 0x0,
6649 "Option 120: SIP Server encoding", HFILL
}},
6651 { &hf_bootp_option_sip_server_name
,
6652 { "SIP Server Name", "bootp.option.sip_server.name",
6653 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6654 "Option 120: SIP Server Name", HFILL
}},
6656 { &hf_bootp_option_sip_server_address
,
6657 { "SIP Server Address", "bootp.option.sip_server.address",
6658 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
6659 "Option 120: SIP Server Address", HFILL
}},
6661 { &hf_bootp_option_sip_server_address_stringz
,
6662 { "SIP Server Address", "bootp.option.sip_server.address.stringz",
6663 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6664 "Option 120: SIP Server Address", HFILL
}},
6666 { &hf_bootp_option_cl_dss_id_option
,
6667 { "DSS_ID Type", "bootp.option.cl_dss_id.option",
6668 FT_UINT8
, BASE_DEC
, VALS(cl_dss_id_type_vals
), 0x0,
6669 "Option 123:CL DSS_ID Type", HFILL
}},
6671 { &hf_bootp_option_cl_dss_id_len
,
6672 { "DSS_ID Length", "bootp.option.cl_dss_id.len",
6673 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6674 "Option 123:CL DSS_ID Length", HFILL
}},
6676 { &hf_bootp_option_cl_dss_id
,
6677 { "Country", "bootp.option.cl_dss_id",
6678 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6679 "Option 123:CL DSS_ID", HFILL
}},
6681 { &hf_bootp_option_vi_class_cl_address_mode
,
6682 { "CableLab Address Mode", "bootp.option.vi_class.cl_address_mode",
6683 FT_UINT8
, BASE_DEC
, VALS(cablelab_ipaddr_mode_vals
), 0x0,
6684 "Option 124: CableLab Address Mode", HFILL
}},
6686 { &hf_bootp_option_vi_class_enterprise
,
6687 { "Enterprise", "bootp.option.vi_class.enterprise",
6688 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
6689 "Option 124: Enterprise", HFILL
}},
6691 { &hf_bootp_option_vi_class_data_length
,
6692 { "CableLab Address Mode", "bootp.option.vi_class.length",
6693 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6694 "Option 124: Length", HFILL
}},
6696 { &hf_bootp_option_vi_class_data
,
6697 { "NetInfo Parent Server Tag", "bootp.option.vi_class.data",
6698 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6699 "Option 124: Data", HFILL
}},
6701 { &hf_bootp_option125_enterprise
,
6702 { "Enterprise", "bootp.option.vi.enterprise",
6703 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
6704 "Option 125: Enterprise", HFILL
}},
6706 { &hf_bootp_option125_value
,
6707 { "Value", "bootp.option.vi.value",
6708 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6709 "Option 125: Suboption value", HFILL
}},
6711 { &hf_bootp_option125_value_8
,
6712 { "Value", "bootp.option.vi.value.uint",
6713 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6714 "Option 125: Suboption 8-bit value", HFILL
}},
6716 { &hf_bootp_option125_value_16
,
6717 { "Value", "bootp.option.vi.value.uint",
6718 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6719 "Option 125: Suboption 16-bit value", HFILL
}},
6721 { &hf_bootp_option125_value_ip_address
,
6722 { "Value", "bootp.option.vi.value.address",
6723 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6724 "Option 125: Suboption IP address value", HFILL
}},
6726 { &hf_bootp_option125_value_stringz
,
6727 { "Value", "bootp.option.vi.value.string",
6728 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6729 "Option 125: Suboption Z-String value", HFILL
}},
6731 { &hf_bootp_option125_tr111_suboption
,
6732 { "Option 125 Suboption", "bootp.option.vi.tr111.suboption",
6733 FT_UINT8
, BASE_DEC
, VALS(option125_tr111_suboption_vals
), 0x0,
6734 "Option 125:TR 111 Suboption", HFILL
}},
6736 { &hf_bootp_option125_tr111_device_manufacturer_oui
,
6737 { "DeviceManufacturerOUI", "bootp.option.vi.tr111.device_manufacturer_oui",
6738 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6739 "Option 125:TR 111 1 DeviceManufacturerOUI", HFILL
}},
6741 { &hf_bootp_option125_tr111_device_serial_number
,
6742 { "DeviceSerialNumber", "bootp.option.vi.tr111.device_serial_number",
6743 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6744 "Option 125:TR 111 2 DeviceSerialNumber", HFILL
}},
6746 { &hf_bootp_option125_tr111_device_product_class
,
6747 { "DeviceProductClass", "bootp.option.vi.tr111.device_product_class",
6748 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6749 "Option 125:TR 111 3 DeviceProductClass", HFILL
}},
6751 { &hf_bootp_option125_tr111_gateway_manufacturer_oui
,
6752 { "GatewayManufacturerOUI", "bootp.option.vi.tr111.gateway_manufacturer_oui",
6753 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6754 "Option 125:TR 111 4 GatewayManufacturerOUI", HFILL
}},
6756 { &hf_bootp_option125_tr111_gateway_serial_number
,
6757 { "GatewaySerialNumber", "bootp.option.vi.tr111.gateway_serial_number",
6758 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6759 "Option 125:TR 111 5 GatewaySerialNumber", HFILL
}},
6761 { &hf_bootp_option125_tr111_gateway_product_class
,
6762 { "GatewayProductClass", "bootp.option.vi.tr111.gateway_product_class",
6763 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6764 "Option 125:TR 111 6 GatewayProductClass", HFILL
}},
6766 { &hf_bootp_option125_cl_suboption
,
6767 { "Option 125 Suboption", "bootp.option.vi.cl.suboption",
6768 FT_UINT8
, BASE_DEC
, VALS(option125_cl_suboption_vals
), 0x0,
6769 "Option 125:CL Suboption", HFILL
}},
6771 { &hf_bootp_option125_cl_option_request
,
6772 { "Option Request", "bootp.option.vi.cl.option_request",
6773 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6774 "Option 125:CL 1 Option Request", HFILL
}},
6776 { &hf_bootp_option125_cl_tftp_server_addresses
,
6777 { "TFTP Server Addresses", "bootp.option.vi.cl.tftp_server_addresses",
6778 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6779 "Option 125:CL 2 TFTP Server Addresses", HFILL
}},
6781 { &hf_bootp_option125_cl_erouter_container_option
,
6782 { "eRouter Container Option", "bootp.option.vi.cl.erouter_container_option",
6783 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6784 "Option 125:CL 3 eRouter Container Option", HFILL
}},
6786 { &hf_bootp_option125_cl_mib_environment_indicator_option
,
6787 { "MIB Environment Indicator Option", "bootp.option.vi.cl.suboption",
6788 FT_UINT8
, BASE_DEC
, VALS(pkt_mib_env_ind_opt_vals
), 0x0,
6789 "Option 125:CL 4 MIB Environment Indicator Option", HFILL
}},
6791 { &hf_bootp_option125_cl_modem_capabilities
,
6792 { "Modem Capabilities", "bootp.option.vi.cl.modem_capabilities",
6793 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6794 "Option 125:CL 5 Modem Capabilities", HFILL
}},
6796 { &hf_bootp_option_subnet_selection_option
,
6797 { "Subnet Selection Option", "bootp.option.subnet_selection_option",
6798 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6799 "Option 118: Subnet Selection Option", HFILL
}},
6801 { &hf_bootp_option_lost_server_domain_name
,
6802 { "LoST Server Domain Name", "bootp.option.lost_server_domain_name",
6803 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6804 "Option 137: LoST Server Domain Name", HFILL
}},
6806 { &hf_bootp_option_capwap_access_controller
,
6807 { "CAPWAP Access Controllers", "bootp.option.capwap_access_controller",
6808 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6809 "Option 138: CAPWAP Access Controllers", HFILL
}},
6811 { &hf_bootp_option_tftp_server_address
,
6812 { "TFTP Server Address", "bootp.option.tftp_server_address",
6813 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6814 "Option 150: TFTP Server Address", HFILL
}},
6816 { &hf_bootp_option_6RD_ipv4_mask_len
,
6817 { "6RD IPv4 Mask Length", "bootp.option.6RD.ipv4_mask_len",
6818 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6819 "Option 212: 6RD IPv4 Mask Length", HFILL
}},
6821 { &hf_bootp_option_6RD_prefix_len
,
6822 { "6RD Prefix Length", "bootp.option.6RD.prefix_len",
6823 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6824 "Option 212: 6RD Prefix Length", HFILL
}},
6826 { &hf_bootp_option_6RD_prefix
,
6827 { "6RD Prefix", "bootp.option.6RD.prefix",
6828 FT_IPv6
, BASE_NONE
, NULL
, 0x00,
6829 "Option 212: 6RD Prefix", HFILL
}},
6831 { &hf_bootp_option_6RD_border_relay_ip
,
6832 { "Border Relay IP", "bootp.option.6RD.border_relay_ip",
6833 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
6834 "Option 212: Border Relay IP", HFILL
}},
6836 { &hf_bootp_option_private_proxy_autodiscovery
,
6837 { "Private/Proxy autodiscovery", "bootp.option.private_proxy_autodiscovery",
6838 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
6839 "Option 252: Private/Proxy autodiscovery", HFILL
}},
6841 { &hf_bootp_option_end
,
6842 { "Option End", "bootp.option.end",
6843 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6844 "Option 255: End", HFILL
}},
6846 { &hf_bootp_option_end_overload
,
6847 { "Option End (Overload)", "bootp.option.end",
6848 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6849 "Option 255: End (Overload)", HFILL
}},
6853 static uat_field_t bootp_uat_flds
[] = {
6854 UAT_FLD_DEC(uat_bootp_records
, opt
, "Option number", "Custom Option Number"),
6855 UAT_FLD_CSTRING(uat_bootp_records
, text
, "Option Name", "Custom Option Name"),
6856 UAT_FLD_VS(uat_bootp_records
, ftype
, "Option type", bootp_custom_type_vals
, "Option datatype"),
6860 static gint
*ett
[] = {
6864 &ett_bootp_option43_suboption
,
6865 &ett_bootp_option63_suboption
,
6866 &ett_bootp_option77_instance
,
6867 &ett_bootp_option82_suboption
,
6868 &ett_bootp_option82_suboption9
,
6869 &ett_bootp_option125_suboption
,
6873 static ei_register_info ei
[] = {
6874 { &ei_bootp_bad_length
, { "bootp.bad_length", PI_PROTOCOL
, PI_ERROR
, "length isn't 0", EXPFILL
}},
6875 { &ei_bootp_missing_subopt_length
, { "bootp.missing_subopt_length", PI_PROTOCOL
, PI_ERROR
, "no room left in option for suboption length", EXPFILL
}},
6876 { &ei_bootp_missing_subopt_value
, { "bootp.missing_subopt_value", PI_PROTOCOL
, PI_ERROR
, "no room left in option for suboption value", EXPFILL
}},
6877 { &ei_bootp_mal_duid
, { "bootp.malformed.duid", PI_PROTOCOL
, PI_ERROR
, "DUID: malformed option", EXPFILL
}},
6878 { &hf_bootp_opt_overload_file_end_missing
, { "bootp.option.option_overload.file_end_missing", PI_PROTOCOL
, PI_ERROR
, "file overload end option missing", EXPFILL
}},
6879 { &hf_bootp_opt_overload_sname_end_missing
, { "bootp.option.option_overload.sname_end_missing", PI_PROTOCOL
, PI_ERROR
, "sname overload end option missing", EXPFILL
}},
6880 { &hf_bootp_subopt_unknown_type
, { "bootp.subopt.unknown_type", PI_PROTOCOL
, PI_ERROR
, "ERROR, please report: Unknown subopt type handler", EXPFILL
}},
6881 { &ei_bootp_option77_user_class_malformed
, { "bootp.option.user_class.malformed", PI_PROTOCOL
, PI_ERROR
, "User Class Information: malformed option", EXPFILL
}},
6882 { &ei_bootp_option_civic_location_bad_cattype
, { "bootp.option.civic_location.bad_cattype", PI_PROTOCOL
, PI_ERROR
, "Error with CAType", EXPFILL
}},
6883 { &ei_bootp_option_dhcp_name_service_invalid
, { "bootp.option.dhcp_name_service.invalid", PI_PROTOCOL
, PI_ERROR
, "Invalid Name Service", EXPFILL
}},
6884 { &ei_bootp_option_sip_server_address_encoding
, { "bootp.option.sip_server_address.encoding", PI_PROTOCOL
, PI_ERROR
, "RFC 3361 defines only 0 and 1 for Encoding byte", EXPFILL
}},
6885 { &ei_bootp_option_classless_static_route
, { "bootp.option.classless_static.route", PI_PROTOCOL
, PI_ERROR
, "Mask width > 32", EXPFILL
}},
6886 { &ei_bootp_option125_enterprise_malformed
, { "bootp.option.enterprise.malformed", PI_PROTOCOL
, PI_ERROR
, "no room left in option for enterprise data", EXPFILL
}},
6887 { &ei_bootp_option_6RD_malformed
, { "bootp.option.6RD.malformed", PI_PROTOCOL
, PI_ERROR
, "6RD: malformed option", EXPFILL
}},
6888 { &ei_bootp_option82_vi_cl_tag_unknown
, { "bootp.option.option.vi.cl.tag_unknown", PI_PROTOCOL
, PI_ERROR
, "Unknown tag", EXPFILL
}},
6889 { &ei_bootp_suboption_invalid
, { "bootp.suboption_invalid", PI_PROTOCOL
, PI_ERROR
, "Invalid suboption", EXPFILL
}},
6890 { &ei_bootp_secs_le
, { "bootp.secs_le", PI_PROTOCOL
, PI_NOTE
, "Seconds elapsed appears to be encoded as little-endian", EXPFILL
}},
6891 { &ei_bootp_end_option_missing
, { "bootp.end_option_missing", PI_PROTOCOL
, PI_ERROR
, "End option missing", EXPFILL
}},
6894 module_t
*bootp_module
;
6895 expert_module_t
* expert_bootp
;
6897 proto_bootp
= proto_register_protocol("Bootstrap Protocol", "BOOTP/DHCP",
6899 proto_register_field_array(proto_bootp
, hf
, array_length(hf
));
6900 proto_register_subtree_array(ett
, array_length(ett
));
6901 bootp_dhcp_tap
= register_tap("bootp");
6903 expert_bootp
= expert_register_protocol(proto_bootp
);
6904 expert_register_field_array(expert_bootp
, ei
, array_length(ei
));
6906 /* register init routine to setup the custom bootp options */
6907 register_init_routine(&bootp_init_protocol
);
6909 /* Allow dissector to find be found by name. */
6910 bootp_handle
= register_dissector("bootp", dissect_bootp
, proto_bootp
);
6912 bootp_module
= prefs_register_protocol(proto_bootp
, NULL
);
6914 prefs_register_bool_preference(bootp_module
, "novellserverstring",
6915 "Decode Option 85 as String",
6916 "Novell Servers option 85 can be configured as a string instead of address",
6919 prefs_register_enum_preference(bootp_module
, "pkt.ccc.protocol_version",
6920 "PacketCable CCC protocol version",
6921 "The PacketCable CCC protocol version",
6922 &pkt_ccc_protocol_version
,
6923 pkt_ccc_protocol_versions
,
6926 prefs_register_uint_preference(bootp_module
, "pkt.ccc.option",
6927 "PacketCable CCC option",
6928 "Option Number for PacketCable CableLabs Client Configuration",
6932 prefs_register_obsolete_preference(bootp_module
, "displayasstring");
6934 bootp_uat
= uat_new("Custom BootP/DHCP Options (Excl. suboptions)",
6935 sizeof(uat_bootp_record_t
), /* record size */
6936 "custom_bootp", /* filename */
6937 TRUE
, /* from_profile */
6938 (void**) &uat_bootp_records
,/* data_ptr */
6939 &num_bootp_records_uat
, /* numitems_ptr */
6940 UAT_AFFECTS_DISSECTION
, /* affects dissection of packets, but not set of named fields */
6942 uat_bootp_record_copy_cb
, /* copy callback */
6943 uat_bootp_record_update_cb
, /* update callback */
6944 uat_bootp_record_free_cb
, /* free callback */
6945 NULL
, /* post update callback */
6946 bootp_uat_flds
); /* UAT field definitions */
6948 prefs_register_uat_preference(bootp_module
,
6949 "custom_bootp_table",
6950 "Custom BootP/DHCP Options (Excl. suboptions)",
6951 "Custom BootP/DHCP Options (Excl. suboptions)",
6956 proto_reg_handoff_bootp(void)
6958 dissector_add_uint("udp.port", UDP_PORT_BOOTPS
, bootp_handle
);
6959 dissector_add_uint("udp.port", UDP_PORT_BOOTPC
, bootp_handle
);
6963 * Editor modelines - http://www.wireshark.org/tools/modelines.html
6968 * indent-tabs-mode: t
6971 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
6972 * :indentSize=8:tabSize=8:noTabs=false: