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>
20 * The information used comes from:
21 * RFC 951: Bootstrap Protocol
22 * RFC 1035: Domain Names - Implementation And Specification
23 * RFC 1497: BOOTP extensions
24 * RFC 1542: Clarifications and Extensions for the Bootstrap Protocol
25 * RFC 2131: Dynamic Host Configuration Protocol
26 * RFC 2132: DHCP Options and BOOTP Vendor Extensions
27 * RFC 2241: DHCP Options for Novell Directory Services
28 * RFC 2242: NetWare/IP Domain Name and Information
29 * RFC 2489: Procedure for Defining New DHCP Options
30 * RFC 2610: DHCP Options for Service Location Protocol
31 * RFC 2685: Virtual Private Networks Identifier
32 * RFC 2937: The Name Service Search Option for DHCP
33 * RFC 3004: The User Class Option for DHCP
34 * RFC 3046: DHCP Relay Agent Information Option
35 * RFC 3118: Authentication for DHCP Messages
36 * RFC 3203: DHCP reconfigure extension
37 * RFC 3315: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
38 * RFC 3396: Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)
39 * RFC 3397: Dynamic Host Configuration Protocol (DHCP) Domain Search Option
40 * RFC 3495: DHCP Option (122) for CableLabs Client Configuration
41 * RFC 3594: PacketCable Security Ticket Control Sub-Option (122.9)
42 * RFC 3442: Classless Static Route Option for DHCP version 4
43 * RFC 3825: Dynamic Host Configuration Protocol Option for Coordinate-based Location Configuration Information
44 * RFC 3925: Vendor-Identifying Vendor Options for Dynamic Host Configuration Protocol version 4 (DHCPv4)
45 * RFC 3942: Reclassifying DHCPv4 Options
46 * RFC 4174: The IPv4 Dynamic Host Configuration Protocol (DHCP) Option for the Internet Storage Name Service
47 * RFC 4243: Vendor-Specific Information Suboption for the Dynamic Host Configuration Protocol (DHCP) Relay Agent Option
48 * RFC 4361: Node-specific Client Identifiers for Dynamic Host Configuration Protocol Version Four (DHCPv4)
49 * RFC 4388: Dynamic Host Configuration Protocol (DHCP) Leasequery
50 * RFC 4578: Dynamic Host Configuration Protocol (DHCP) Options for PXE
51 * RFC 4776: Dynamic Host Configuration Protocol (DHCPv4 and DHCPv6) Option for Civic Addresses Configuration Information
52 * RFC 5223: Discovering Location-to-Service Translation (LoST) Servers Using the Dynamic Host Configuration Protocol (DHCP)
53 * RFC 5417: CAPWAP Access Controller DHCP Option
54 * RFC 5969: IPv6 Rapid Deployment on IPv4 Infrastructures (6rd)
55 * RFC 6607: Virtual Subnet Selection Options for DHCPv4 and DHCPv6
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
77 * Boot Server Discovery Protocol (BSDP)
78 * http://opensource.apple.com/source/bootp/bootp-198.1/Documentation/BSDP.doc
80 * Wireshark - Network traffic analyzer
81 * By Gerald Combs <gerald@wireshark.org>
82 * Copyright 1998 Gerald Combs
84 * This program is free software; you can redistribute it and/or
85 * modify it under the terms of the GNU General Public License
86 * as published by the Free Software Foundation; either version 2
87 * of the License, or (at your option) any later version.
89 * This program is distributed in the hope that it will be useful,
90 * but WITHOUT ANY WARRANTY; without even the implied warranty of
91 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
92 * GNU General Public License for more details.
94 * You should have received a copy of the GNU General Public License
95 * along with this program; if not, write to the Free Software
96 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
100 * Some of the development of the BOOTP/DHCP protocol decoder was sponsored by
101 * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary
102 * CableLabs' specifications. Your license and use of this protocol decoder
103 * does not mean that you are licensed to use the CableLabs'
104 * specifications. If you have questions about this protocol, contact
105 * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional
114 #include <epan/packet.h>
115 #include <epan/exceptions.h>
116 #include "packet-arp.h"
117 #include "packet-dns.h" /* for get_dns_name() */
118 #include <epan/addr_resolv.h>
119 #include <epan/prefs.h>
120 #include <epan/tap.h>
121 #include <epan/stat_tap_ui.h>
122 #include <epan/arptypes.h>
123 #include <epan/sminmpec.h>
124 #include <epan/expert.h>
125 #include <epan/uat.h>
126 #include <epan/oui.h>
127 #include <wsutil/str_util.h>
128 #include <wsutil/strtoi.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_vendor_specific_options = -1;
154 static int hf_bootp_dhcp = -1;
155 static int hf_bootp_fqdn_flags = -1;
156 static int hf_bootp_fqdn_s = -1;
157 static int hf_bootp_fqdn_o = -1;
158 static int hf_bootp_fqdn_e = -1;
159 static int hf_bootp_fqdn_n = -1;
160 static int hf_bootp_fqdn_mbz = -1;
161 static int hf_bootp_fqdn_rcode1 = -1;
162 static int hf_bootp_fqdn_rcode2 = -1;
163 static int hf_bootp_fqdn_name = -1;
164 static int hf_bootp_fqdn_asciiname = -1;
165 static int hf_bootp_pkt_mta_cap_len = -1;
166 static int hf_bootp_pkt_mta_cap_type = -1;
167 static int hf_bootp_docsis_cm_cap_type = -1;
168 static int hf_bootp_docsis_cm_cap_len = -1;
169 static int hf_bootp_client_identifier_uuid = -1;
170 static int hf_bootp_client_id_iaid = -1;
171 static int hf_bootp_client_id_duid_type = -1;
172 static int hf_bootp_client_hardware_address = -1;
173 static int hf_bootp_client_identifier_duid_llt_hw_type = -1;
174 static int hf_bootp_client_identifier_duid_ll_hw_type = -1;
175 static int hf_bootp_client_identifier_time = -1;
176 static int hf_bootp_client_identifier_link_layer_address = -1;
177 static int hf_bootp_client_identifier_enterprise_num = -1;
178 static int hf_bootp_client_identifier = -1;
179 static int hf_bootp_client_identifier_type = -1;
180 static int hf_bootp_client_identifier_undef = -1;
181 static int hf_bootp_option_type = -1;
182 static int hf_bootp_option_length = -1;
183 static int hf_bootp_option_value = -1;
184 static int hf_bootp_option_value_8 = -1;
185 static int hf_bootp_option_value_16 = -1;
186 static int hf_bootp_option_value_u32 = -1;
187 static int hf_bootp_option_value_i32 = -1;
188 static int hf_bootp_option_value_stringz = -1;
189 static int hf_bootp_option_value_ip_address = -1;
190 static int hf_bootp_option_value_boolean = -1;
191 static int hf_bootp_suboption_length = -1;
193 static int hf_bootp_option_padding = -1; /* 0 */
194 static int hf_bootp_option_subnet_mask = -1; /* 1 */
195 static int hf_bootp_option_time_offset = -1; /* 2 */
196 static int hf_bootp_option_router = -1; /* 3 */
197 static int hf_bootp_option_time_server = -1; /* 4 */
198 static int hf_bootp_option_name_server = -1; /* 5 */
199 static int hf_bootp_option_domain_name_server = -1; /* 6 */
200 static int hf_bootp_option_log_server = -1; /* 7 */
201 static int hf_bootp_option_quotes_server = -1; /* 8 */
202 static int hf_bootp_option_lpr_server = -1; /* 9 */
203 static int hf_bootp_option_impress_server = -1; /* 10 */
204 static int hf_bootp_option_resource_location_server = -1; /* 11 */
205 static int hf_bootp_option_hostname = -1; /* 12 */
206 static int hf_bootp_option_boot_file_size = -1; /* 13 */
207 static int hf_bootp_option_merit_dump_file = -1; /* 14 */
208 static int hf_bootp_option_domain_name = -1; /* 15 */
209 static int hf_bootp_option_swap_server = -1; /* 16 */
210 static int hf_bootp_option_root_path = -1; /* 17 */
211 static int hf_bootp_option_extension_path = -1; /* 18 */
212 static int hf_bootp_option_ip_forwarding = -1; /* 19 */
213 static int hf_bootp_option_non_local_source_routing = -1; /* 20 */
214 static int hf_bootp_option_policy_filter_ip = -1; /* 21 - IP address */
215 static int hf_bootp_option_policy_filter_subnet_mask = -1; /* 21 - Subnet mask */
216 static int hf_bootp_option_max_datagram_reassembly_size = -1; /* 22 */
217 static int hf_bootp_option_default_ip_ttl = -1; /* 23 */
218 static int hf_bootp_option_path_mtu_aging_timeout = -1; /* 24 */
219 static int hf_bootp_option_path_mtu_plateau_table_item = -1; /* 25 */
220 static int hf_bootp_option_interface_mtu = -1; /* 26 */
221 static int hf_bootp_option_all_subnets_are_local = -1; /* 27 */
222 static int hf_bootp_option_broadcast_address = -1; /* 28 */
223 static int hf_bootp_option_perform_mask_discovery = -1; /* 29 */
224 static int hf_bootp_option_mask_supplier = -1; /* 30 */
225 static int hf_bootp_option_perform_router_discover = -1; /* 31 */
226 static int hf_bootp_option_router_solicitation_address = -1; /* 32 */
227 static int hf_bootp_option_static_route_ip = -1; /* 33 - Destination IP */
228 static int hf_bootp_option_static_route_router = -1; /* 33 - Router */
229 static int hf_bootp_option_trailer_encapsulation = -1; /* 34 */
230 static int hf_bootp_option_arp_cache_timeout = -1; /* 35 */
231 static int hf_bootp_option_ethernet_encapsulation = -1; /* 36 */
232 static int hf_bootp_option_tcp_default_ttl = -1; /* 37 */
233 static int hf_bootp_option_tcp_keepalive_interval = -1; /* 38 */
234 static int hf_bootp_option_tcp_keepalive_garbage = -1; /* 39 */
235 static int hf_bootp_option_nis_domain = -1; /* 40 */
236 static int hf_bootp_option_nis_server = -1; /* 41 */
237 static int hf_bootp_option_ntp_server = -1; /* 42 */
239 static int hf_bootp_option43_value = -1; /* 43 suboption value */
240 static int hf_bootp_option43_value_8 = -1; /* 43 suboption value */
241 static int hf_bootp_option43_value_32 = -1; /* 43 suboption value */
242 static int hf_bootp_option43_value_stringz = -1; /* 43 suboption value */
243 static int hf_bootp_option43_value_ip_address = -1; /* 43 suboption value */
245 static int hf_bootp_option43_pxeclient_suboption = -1; /* 43 suboption */
246 static int hf_bootp_option43_pxeclient_padding = -1; /* 43:0 PXE */
247 static int hf_bootp_option43_pxeclient_mtftp_ip = -1; /* 43:1 PXE */
248 static int hf_bootp_option43_pxeclient_mtftp_client_port = -1; /* 43:2 PXE */
249 static int hf_bootp_option43_pxeclient_mtftp_server_port = -1; /* 43:3 PXE */
250 static int hf_bootp_option43_pxeclient_mtftp_timeout = -1; /* 43:4 PXE */
251 static int hf_bootp_option43_pxeclient_mtftp_delay = -1; /* 43:5 PXE */
252 static int hf_bootp_option43_pxeclient_discovery_control = -1; /* 43:6 PXE */
253 static int hf_bootp_option43_pxeclient_multicast_address = -1; /* 43:7 PXE */
254 static int hf_bootp_option43_pxeclient_boot_servers = -1; /* 43:8 PXE */
255 static int hf_bootp_option43_pxeclient_boot_menu = -1; /* 43:9 PXE */
256 static int hf_bootp_option43_pxeclient_menu_prompt = -1; /* 43:10 PXE */
257 static int hf_bootp_option43_pxeclient_multicast_address_alloc = -1; /* 43:11 PXE */
258 static int hf_bootp_option43_pxeclient_credential_types = -1; /* 43:12 PXE */
259 static int hf_bootp_option43_pxeclient_boot_item = -1; /* 43:71 PXE */
260 static int hf_bootp_option43_pxeclient_end = -1; /* 43:255 PXE */
262 static int hf_bootp_option43_cl_suboption = -1; /* 43 suboption */
263 static int hf_bootp_option43_cl_padding = -1; /* 43:0 CL */
264 static int hf_bootp_option43_cl_suboption_request_list = -1; /* 43:1 CL */
265 static int hf_bootp_option43_cl_device_type = -1; /* 43:2 CL */
266 static int hf_bootp_option43_cl_esafe_type = -1; /* 43:3 CL */
267 static int hf_bootp_option43_cl_serial_number = -1; /* 43:4 CL */
268 static int hf_bootp_option43_cl_hardware_version = -1; /* 43:5 CL */
269 static int hf_bootp_option43_cl_software_version = -1; /* 43:6 CL */
270 static int hf_bootp_option43_cl_boot_rom_version = -1; /* 43:7 CL */
271 static int hf_bootp_option43_cl_oui_bytes = -1; /* 43:8 CL */
272 static int hf_bootp_option43_cl_oui_string = -1; /* 43:8 CL */
273 static int hf_bootp_option43_cl_model_number = -1; /* 43:9 CL */
274 static int hf_bootp_option43_cl_vendor_name10 = -1; /* 43:10 CL */
275 static int hf_bootp_option43_cl_address_realm = -1; /* 43:11 CL */
276 static int hf_bootp_option43_cl_cm_ps_system_desc = -1; /* 43:12 CL */
277 static int hf_bootp_option43_cl_cm_ps_firmware_revision = -1; /* 43:13 CL */
278 static int hf_bootp_option43_cl_firewall_policy_file_version = -1; /* 43:14 CL */
279 static int hf_bootp_option43_cl_esafe_config_file_devices = -1; /* 43:15 CL */
280 static int hf_bootp_option43_cl_video_security_tape = -1; /* 43:18 CL */
281 static int hf_bootp_option43_cl_mta_mac_address = -1; /* 43:31 CL */
282 static int hf_bootp_option43_cl_correlation_ID = -1; /* 43:32 CL */
283 static int hf_bootp_option43_cl_vendor_name51 = -1; /* 43:51 CL */
284 static int hf_bootp_option43_cl_cablecard_capability = -1; /* 43:52 CL */
285 static int hf_bootp_option43_cl_device_id_ca = -1; /* 43:53 CL */
286 static int hf_bootp_option43_cl_device_id_x509 = -1; /* 43:54 CL */
287 static int hf_bootp_option43_cl_end = -1; /* 43:255 CL */
289 static int hf_bootp_option43_bsdp_suboption = -1; /* 43 suboption */
290 static int hf_bootp_option43_bsdp_message_type = -1; /* 43:1 BSDP */
291 static int hf_bootp_option43_bsdp_version = -1; /* 43:2 BSDP */
292 static int hf_bootp_option43_bsdp_server_identifier = -1; /* 43:3 BSDP */
293 static int hf_bootp_option43_bsdp_server_priority = -1; /* 43:4 BSDP */
294 static int hf_bootp_option43_bsdp_reply_port = -1; /* 43:5 BSDP */
295 static int hf_bootp_option43_bsdp_boot_image_list_path = -1; /* 43:6 BSDP */
296 static int hf_bootp_option43_bsdp_default_boot_image_id = -1; /* 43:7 BSDP */
297 static int hf_bootp_option43_bsdp_selected_boot_image_id = -1; /* 43:8 BSDP */
298 static int hf_bootp_option43_bsdp_boot_image_list = -1; /* 43:9 BSDP */
299 static int hf_bootp_option43_bsdp_netboot_firmware = -1; /* 43:10 BSDP */
300 static int hf_bootp_option43_bsdp_attributes_filter_list = -1; /* 43:11 BSDP */
301 static int hf_bootp_option43_bsdp_message_size = -1; /* 43:12 BSDP */
302 static int hf_bootp_option43_bsdp_boot_image_index = -1; /* 43 BSDP */
303 static int hf_bootp_option43_bsdp_boot_image_attribute = -1; /* 43 BSDP */
304 static int hf_bootp_option43_bsdp_boot_image_attribute_install = -1; /* 43 BSDP */
305 static int hf_bootp_option43_bsdp_boot_image_attribute_kind = -1; /* 43 BSDP */
306 static int hf_bootp_option43_bsdp_boot_image_attribute_reserved = -1; /* 43 BSDP */
307 static int hf_bootp_option43_bsdp_image_desc = -1; /* 43 BSDP */
308 static int hf_bootp_option43_bsdp_boot_image_name = -1; /* 43 BSDP */
309 static int hf_bootp_option43_bsdp_boot_image_name_len = -1; /* 43 BSDP */
311 static int hf_bootp_option43_alcatel_suboption = -1; /* 43 suboption */
312 static int hf_bootp_option43_alcatel_padding = -1; /* 43:0 Alcatel */
313 static int hf_bootp_option43_alcatel_vlan_id = -1; /* 43:58 Alcatel */
314 static int hf_bootp_option43_alcatel_tftp1 = -1; /* 43:64 Alcatel */
315 static int hf_bootp_option43_alcatel_tftp2 = -1; /* 43:65 Alcatel */
316 static int hf_bootp_option43_alcatel_app_type = -1; /* 43:66 Alcatel */
317 static int hf_bootp_option43_alcatel_sip_url = -1; /* 43:67 Alcatel */
318 static int hf_bootp_option43_alcatel_end = -1; /* 43:255 Alcatel */
320 static int hf_bootp_option43_arubaap_controllerip = -1; /* 43: ArubaAP*/
321 static int hf_bootp_option43_arubaiap = -1; /* 43: ArubaIAP*/
322 static int hf_bootp_option43_arubaiap_nameorg = -1; /* 43: ArubaIAP: Name Organisation*/
323 static int hf_bootp_option43_arubaiap_ampip = -1; /* 43: ArubaIAP: AMP IP Address*/
324 static int hf_bootp_option43_arubaiap_password = -1; /* 43 :ArubaIAP: Password*/
326 static int hf_bootp_option_netbios_over_tcpip_name_server = -1; /* 44 */
327 static int hf_bootp_option_netbios_over_tcpip_dd_name_server = -1; /* 45 */
328 static int hf_bootp_option_netbios_over_tcpip_node_type = -1; /* 46 */
329 static int hf_bootp_option_netbios_over_tcpip_scope = -1; /* 47 */
330 static int hf_bootp_option_xwindows_system_font_server = -1; /* 48 */
331 static int hf_bootp_option_xwindows_system_display_manager = -1; /* 49 */
332 static int hf_bootp_option_requested_ip_address = -1; /* 50 */
333 static int hf_bootp_option_ip_address_lease_time = -1; /* 51 */
334 static int hf_bootp_option_option_overload = -1; /* 52 */
335 static int hf_bootp_option_dhcp = -1; /* 53 */
336 static int hf_bootp_option_dhcp_server_id = -1; /* 54 */
337 static int hf_bootp_option_parameter_request_list_item = -1; /* 55 */
338 static int hf_bootp_option_message = -1; /* 56 */
339 static int hf_bootp_option_dhcp_max_message_size = -1; /* 57 */
340 static int hf_bootp_option_renewal_time_value = -1; /* 58 */
341 static int hf_bootp_option_rebinding_time_value = -1; /* 59 */
342 static int hf_bootp_option_vendor_class_id = -1; /* 60 */
343 static int hf_bootp_option_vendor_class_data = -1; /* 60 */
345 static int hf_bootp_option_novell_netware_ip_domain = -1; /* 62 */
347 static int hf_bootp_option63_suboption = -1; /* 63 suboption */
348 static int hf_bootp_option63_value = -1; /* 63 suboption value */
349 static int hf_bootp_option63_value_8 = -1; /* 63 suboption value */
350 static int hf_bootp_option63_value_ip_address = -1; /* 63 suboption value */
351 static int hf_bootp_option63_value_boolean = -1; /* 63 suboption value */
352 static int hf_bootp_option63_broadcast = -1; /* 63:5 */
353 static int hf_bootp_option63_preferred_dss_server = -1; /* 63:6 */
354 static int hf_bootp_option63_nearest_nwip_server = -1; /* 63:7 */
355 static int hf_bootp_option63_autoretries = -1; /* 63:8 */
356 static int hf_bootp_option63_autoretry_delay = -1; /* 63:9 */
357 static int hf_bootp_option63_support_netware_v1_1 = -1; /* 63:10 */
358 static int hf_bootp_option63_primary_dss = -1; /* 63:11 */
360 static int hf_bootp_option_nis_plus_domain = -1; /* 64 */
361 static int hf_bootp_option_nis_plus_server = -1; /* 65 */
362 static int hf_bootp_option_tftp_server_name = -1; /* 66 */
363 static int hf_bootp_option_bootfile_name = -1; /* 67 */
364 static int hf_bootp_option_mobile_ip_home_agent = -1; /* 68 */
365 static int hf_bootp_option_smtp_server = -1; /* 69 */
366 static int hf_bootp_option_pop3_server = -1; /* 70 */
367 static int hf_bootp_option_nntp_server = -1; /* 71 */
368 static int hf_bootp_option_default_www_server = -1; /* 72 */
369 static int hf_bootp_option_default_finger_server = -1; /* 73 */
370 static int hf_bootp_option_default_irc_server = -1; /* 74 */
371 static int hf_bootp_option_streettalk_server = -1; /* 75 */
372 static int hf_bootp_option_streettalk_da_server = -1; /* 76 */
373 static int hf_bootp_option77_user_class = -1; /* 77 User Class instance */
374 static int hf_bootp_option77_user_class_length = -1; /* 77 length of User Class instance */
375 static int hf_bootp_option77_user_class_data = -1; /* 77 data of User Class instance */
376 static int hf_bootp_option_slp_directory_agent_value = -1; /* 78 */
377 static int hf_bootp_option_slp_directory_agent_slpda_address = -1; /* 78 */
378 static int hf_bootp_option_slp_service_scope_value = -1; /* 79 */
379 static int hf_bootp_option_slp_service_scope_string = -1; /* 79 */
381 static int hf_bootp_option82_suboption = -1; /* 82 suboption */
382 static int hf_bootp_option82_value = -1; /* 82 suboption value */
383 static int hf_bootp_option82_value_8 = -1; /* 82 suboption value */
384 static int hf_bootp_option82_value_32 = -1; /* 82 suboption value */
385 static int hf_bootp_option82_value_ip_address = -1; /* 82 suboption value */
386 static int hf_bootp_option82_value_stringz = -1; /* 82 suboption value */
387 static int hf_bootp_option82_padding = -1; /* 82:0 */
388 static int hf_bootp_option82_agent_circuit_id = -1; /* 82:1 */
389 static int hf_bootp_option82_agent_remote_id = -1; /* 82:2 */
390 static int hf_bootp_option82_reserved = -1; /* 82:3 */
391 static int hf_bootp_option82_docsis_device_class = -1; /* 82:4 */
392 static int hf_bootp_option82_link_selection = -1; /* 82:5 */
393 static int hf_bootp_option82_subscriber_id = -1; /* 82:6 */
394 static int hf_bootp_option82_radius_attributes = -1; /* 82:7 */
395 static int hf_bootp_option82_authentication = -1; /* 82:8 */
396 static int hf_bootp_option82_vi = -1; /* 82:9 */
397 /* 82:9 suboptions */
398 static int hf_bootp_option82_vi_enterprise = -1;
399 static int hf_bootp_option82_vi_data_length = -1;
400 static int hf_bootp_option82_vi_cl_option = -1;
401 static int hf_bootp_option82_vi_cl_length = -1;
402 static int hf_bootp_option82_vi_cl_tag = -1;
403 static int hf_bootp_option82_vi_cl_tag_length = -1;
404 static int hf_bootp_option82_vi_cl_docsis_version = -1;
405 /* 82:9 suboptions end */
406 static int hf_bootp_option82_flags = -1; /* 82:10 */
407 static int hf_bootp_option82_server_id_override = -1; /* 82:11 */
408 static int hf_bootp_option82_relay_agent_id = -1; /* 82:12 */
409 static int hf_bootp_option82_link_selection_cisco = -1; /* 82:150 */
410 static int hf_bootp_option82_vrf_name_vpn_id = -1; /* 82:151 */
411 /* 82:151 suboptions */
412 static int hf_bootp_option82_vrf_name_global = -1;
413 static int hf_bootp_option82_vrf_name = -1;
414 static int hf_bootp_option82_vrf_name_vpn_id_oui = -1;
415 static int hf_bootp_option82_vrf_name_vpn_id_index = -1;
416 /* 82:151 suboptions end */
417 static int hf_bootp_option82_server_id_override_cisco = -1; /* 82:152 */
419 static int hf_bootp_option_isns_functions = -1;
420 static int hf_bootp_option_isns_functions_enabled = -1;
421 static int hf_bootp_option_isns_functions_dd_authorization = -1;
422 static int hf_bootp_option_isns_functions_sec_policy_distibution = -1;
423 static int hf_bootp_option_isns_functions_reserved = -1;
425 static int hf_bootp_option_isns_discovery_domain_access = -1;
426 static int hf_bootp_option_isns_discovery_domain_access_enabled = -1;
427 static int hf_bootp_option_isns_discovery_domain_access_control_node = -1;
428 static int hf_bootp_option_isns_discovery_domain_access_iscsi_target = -1;
429 static int hf_bootp_option_isns_discovery_domain_access_iscsi_inititator = -1;
430 static int hf_bootp_option_isns_discovery_domain_access_ifcp_target_port = -1;
431 static int hf_bootp_option_isns_discovery_domain_access_ifcp_initiator_port = -1;
432 static int hf_bootp_option_isns_discovery_domain_access_reserved = -1;
434 static int hf_bootp_option_isns_administrative_flags = -1;
435 static int hf_bootp_option_isns_administrative_flags_enabled = -1;
436 static int hf_bootp_option_isns_administrative_flags_heartbeat = -1;
437 static int hf_bootp_option_isns_administrative_flags_management_scns = -1;
438 static int hf_bootp_option_isns_administrative_flags_default_dd = -1;
439 static int hf_bootp_option_isns_administrative_flags_reserved = -1;
441 static int hf_bootp_option_isns_server_security_bitmap = -1;
442 static int hf_bootp_option_isns_server_security_bitmap_enabled = -1;
443 static int hf_bootp_option_isns_server_security_bitmap_ike_ipsec_enabled = -1;
444 static int hf_bootp_option_isns_server_security_bitmap_main_mode = -1;
445 static int hf_bootp_option_isns_server_security_bitmap_aggressive_mode = -1;
446 static int hf_bootp_option_isns_server_security_bitmap_pfs = -1;
447 static int hf_bootp_option_isns_server_security_bitmap_transport_mode = -1;
448 static int hf_bootp_option_isns_server_security_bitmap_tunnel_mode = -1;
449 static int hf_bootp_option_isns_server_security_bitmap_reserved = -1;
451 static int hf_bootp_option_isns_heartbeat_originator_addr = -1;
452 static int hf_bootp_option_isns_primary_server_addr = -1;
453 static int hf_bootp_option_isns_secondary_server_addr_list = -1;
455 static int hf_bootp_option_novell_dss_string = -1; /* 85 */
456 static int hf_bootp_option_novell_dss_ip = -1; /* 85 */
457 static int hf_bootp_option_novell_ds_tree_name = -1; /* 86 */
458 static int hf_bootp_option_novell_ds_context = -1; /* 87 */
459 static int hf_bootp_option_dhcp_authentication_protocol = -1; /* 90 */
460 static int hf_bootp_option_dhcp_authentication_alg_delay = -1; /* 90 */
461 static int hf_bootp_option_dhcp_authentication_algorithm = -1; /* 90 */
462 static int hf_bootp_option_dhcp_authentication_rdm = -1; /* 90 */
463 static int hf_bootp_option_dhcp_authentication_rdm_replay_detection = -1; /* 90 */
464 static int hf_bootp_option_dhcp_authentication_rdm_rdv = -1; /* 90 */
465 static int hf_bootp_option_dhcp_authentication_secret_id = -1; /* 90 */
466 static int hf_bootp_option_dhcp_authentication_hmac_md5_hash = -1; /* 90 */
467 static int hf_bootp_option_dhcp_authentication_information = -1; /* 90 */
468 static int hf_bootp_option_client_last_transaction_time = -1; /* 91 */
469 static int hf_bootp_option_associated_ip_option = -1; /* 92 */
470 static int hf_bootp_option_client_system_architecture = -1; /* 93 */
471 static int hf_bootp_option_client_network_id_major_ver = -1; /* 94 */
472 static int hf_bootp_option_client_network_id_minor_ver = -1; /* 94 */
473 static int hf_bootp_option_civic_location_what = -1; /* 99 */
474 static int hf_bootp_option_civic_location_country = -1; /* 99 */
475 static int hf_bootp_option_civic_location_ca_type = -1; /* 99 */
476 static int hf_bootp_option_civic_location_ca_length = -1; /* 99 */
477 static int hf_bootp_option_civic_location_ca_value = -1; /* 99 */
478 static int hf_bootp_option_netinfo_parent_server_address = -1; /* 112 */
479 static int hf_bootp_option_netinfo_parent_server_tag = -1; /* 113 */
480 static int hf_bootp_option_dhcp_auto_configuration = -1; /* 116 */
481 static int hf_bootp_option_dhcp_name_service_search_option = -1; /* 117 */
482 static int hf_bootp_option_dhcp_dns_domain_search_list_rfc_3396_detected = -1; /* 119 */
483 static int hf_bootp_option_dhcp_dns_domain_search_list_refer_last_option = -1; /* 119 */
484 static int hf_bootp_option_dhcp_dns_domain_search_list_fqdn = -1; /* 119 */
485 static int hf_bootp_option_sip_server_rfc_3396_detected = -1; /* 120 */
486 static int hf_bootp_option_sip_server_refer_last_option = -1; /* 120 */
487 static int hf_bootp_option_sip_server_enc = -1; /* 120 */
488 static int hf_bootp_option_sip_server_name = -1; /* 120 */
489 static int hf_bootp_option_sip_server_address = -1; /* 120 */
490 static int hf_bootp_option_sip_server_address_stringz = -1; /* 120 */
491 static int hf_bootp_option_classless_static_route = -1; /* 120 */
492 static int hf_bootp_option_rfc3825_error = -1; /* 123 */
493 static int hf_bootp_option_rfc3825_latitude = -1; /* 123 */
494 static int hf_bootp_option_rfc3825_longitude = -1; /* 123 */
495 static int hf_bootp_option_rfc3825_latitude_res = -1; /* 123 */
496 static int hf_bootp_option_rfc3825_longitude_res = -1; /* 123 */
497 static int hf_bootp_option_rfc3825_altitude = -1; /* 123 */
498 static int hf_bootp_option_rfc3825_altitide_res = -1; /* 123 */
499 static int hf_bootp_option_rfc3825_altitude_type = -1; /* 123 */
500 static int hf_bootp_option_rfc3825_map_datum = -1; /* 123 */
501 static int hf_bootp_option_cl_dss_id_option = -1; /* 123 CL */
502 static int hf_bootp_option_cl_dss_id_len = -1; /* 123 CL */
503 static int hf_bootp_option_cl_dss_id = -1; /* 123 CL */
504 static int hf_bootp_option_vi_class_cl_address_mode = -1; /* 124 */
505 static int hf_bootp_option_vi_class_enterprise = -1; /* 124 */
506 static int hf_bootp_option_vi_class_data_length = -1; /* 124 */
507 static int hf_bootp_option_vi_class_data = -1; /* 124 */
509 static int hf_bootp_option125_enterprise = -1;
510 static int hf_bootp_option125_length = -1;
511 static int hf_bootp_option125_value = -1; /* 125 suboption value */
512 static int hf_bootp_option125_value_8 = -1; /* 125 suboption value */
513 static int hf_bootp_option125_value_16 = -1; /* 125 suboption value */
514 static int hf_bootp_option125_value_ip_address = -1; /* 125 suboption value */
515 static int hf_bootp_option125_value_stringz = -1; /* 125 suboption value */
516 static int hf_bootp_option125_tr111_suboption = -1; /* 125 suboption */
517 static int hf_bootp_option125_tr111_device_manufacturer_oui = -1; /* 125:TR-111 1 */
518 static int hf_bootp_option125_tr111_device_serial_number = -1; /* 125:TR-111 2 */
519 static int hf_bootp_option125_tr111_device_product_class = -1; /* 125:TR-111 3 */
520 static int hf_bootp_option125_tr111_gateway_manufacturer_oui = -1; /* 125:TR-111 4 */
521 static int hf_bootp_option125_tr111_gateway_serial_number = -1; /* 125:TR-111 5 */
522 static int hf_bootp_option125_tr111_gateway_product_class = -1; /* 125:TR-111 6 */
523 static int hf_bootp_option125_cl_suboption = -1; /* 125 suboption */
524 static int hf_bootp_option125_cl_option_request = -1; /* 125:CL 1 */
525 static int hf_bootp_option125_cl_tftp_server_addresses = -1; /* 125:CL 2 */
526 static int hf_bootp_option125_cl_erouter_container_option = -1; /* 125:CL 3 */
527 static int hf_bootp_option125_cl_mib_environment_indicator_option = -1; /* 125:CL 4 */
528 static int hf_bootp_option125_cl_modem_capabilities = -1; /* 125:CL 5 */
530 static int hf_bootp_option_subnet_selection_option = -1; /* 118 */
531 static int hf_bootp_option_lost_server_domain_name = -1; /* 137 */
532 static int hf_bootp_option_capwap_access_controller = -1; /* 138 */
533 static int hf_bootp_option_tftp_server_address = -1; /* 150 */
534 static int hf_bootp_option_pxe_config_file = -1; /* 209 */
535 static int hf_bootp_option_pxe_path_prefix = -1; /* 210 */
536 static int hf_bootp_option_6RD_ipv4_mask_len = -1; /* 212 */
537 static int hf_bootp_option_6RD_prefix_len = -1; /* 212 */
538 static int hf_bootp_option_6RD_prefix = -1; /* 212 */
539 static int hf_bootp_option_6RD_border_relay_ip = -1; /* 212 */
540 static int hf_bootp_option242_avaya = -1; /* 242 */
541 static int hf_bootp_option242_avaya_tlssrvr = -1; /* 242 */
542 static int hf_bootp_option242_avaya_httpsrvr = -1; /* 242 */
543 static int hf_bootp_option242_avaya_httpdir = -1; /* 242 */
544 static int hf_bootp_option242_avaya_static = -1; /* 242 */
545 static int hf_bootp_option242_avaya_mcipadd = -1; /* 242 */
546 static int hf_bootp_option242_avaya_dot1x = -1; /* 242 */
547 static int hf_bootp_option242_avaya_icmpdu = -1; /* 242 */
548 static int hf_bootp_option242_avaya_icmpred = -1; /* 242 */
549 static int hf_bootp_option242_avaya_l2q = -1; /* 242 */
550 static int hf_bootp_option242_avaya_l2qvlan = -1; /* 242 */
551 static int hf_bootp_option242_avaya_loglocal = -1; /* 242 */
552 static int hf_bootp_option242_avaya_phy1stat = -1; /* 242 */
553 static int hf_bootp_option242_avaya_phy2stat = -1; /* 242 */
554 static int hf_bootp_option242_avaya_procpswd = -1; /* 242 */
555 static int hf_bootp_option242_avaya_procstat = -1; /* 242 */
556 static int hf_bootp_option242_avaya_snmpadd = -1; /* 242 */
557 static int hf_bootp_option242_avaya_snmpstring = -1; /* 242 */
558 static int hf_bootp_option242_avaya_vlantest = -1; /* 242 */
559 static int hf_bootp_option_private_proxy_autodiscovery = -1; /* 252 */
560 static int hf_bootp_option_end = -1; /* 255 */
561 static int hf_bootp_option_end_overload = -1; /* 255 (with overload)*/
562 static int hf_bootp_vendor_unknown_suboption = -1;
563 static int hf_bootp_suboption_data = -1;
564 static int hf_bootp_pc_ietf_ccc_suboption = -1;
565 static int hf_bootp_pc_i05_ccc_suboption = -1;
567 static int hf_bootp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout = -1;
568 static int hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_timeout = -1;
569 static int hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_retries = -1;
570 static int hf_bootp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout = -1;
571 static int hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_timeout = -1;
572 static int hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_retries = -1;
574 static gint ett_bootp = -1;
575 static gint ett_bootp_flags = -1;
576 static gint ett_bootp_option = -1;
577 static gint ett_bootp_option43_suboption = -1;
578 static gint ett_bootp_option63_suboption = -1;
579 static gint ett_bootp_option77_instance = -1;
580 static gint ett_bootp_option82_suboption = -1;
581 static gint ett_bootp_option82_suboption9 = -1;
582 static gint ett_bootp_option125_suboption = -1;
583 static gint ett_bootp_option125_tr111_suboption = -1;
584 static gint ett_bootp_option125_cl_suboption = -1;
585 static gint ett_bootp_option242_suboption = -1;
586 static gint ett_bootp_fqdn = -1;
587 static gint ett_bootp_fqdn_flags = -1;
588 static gint ett_bootp_filename_option = -1;
589 static gint ett_bootp_server_hostname = -1;
590 static gint ett_bootp_isns_functions = -1;
591 static gint ett_bootp_isns_discovery_domain_access = -1;
592 static gint ett_bootp_isns_administrative_flags = -1;
593 static gint ett_bootp_isns_server_security_bitmap = -1;
594 static gint ett_bootp_isns_secondary_server_addr = -1;
595 static gint ett_bootp_o43_bsdp_boot_image = -1;
596 static gint ett_bootp_o43_bsdp_attributes = -1;
597 static gint ett_bootp_o43_bsdp_image_desc_list = -1;
598 static gint ett_bootp_o43_bsdp_image_desc = -1;
599 static gint ett_bootp_o43_bsdp_attributes_flags = -1;
601 static expert_field ei_bootp_bad_length = EI_INIT;
602 static expert_field ei_bootp_bad_bitfield = EI_INIT;
603 static expert_field ei_bootp_missing_subopt_length = EI_INIT;
604 static expert_field ei_bootp_missing_subopt_value = EI_INIT;
605 static expert_field ei_bootp_mal_duid = EI_INIT;
606 static expert_field hf_bootp_opt_overload_file_end_missing = EI_INIT;
607 static expert_field hf_bootp_opt_overload_sname_end_missing = EI_INIT;
608 static expert_field hf_bootp_subopt_unknown_type = EI_INIT;
609 static expert_field ei_bootp_option77_user_class_malformed = EI_INIT;
610 static expert_field ei_bootp_option_civic_location_bad_cattype = EI_INIT;
611 static expert_field ei_bootp_option_dhcp_name_service_invalid = EI_INIT;
612 static expert_field ei_bootp_option_sip_server_address_encoding = EI_INIT;
613 static expert_field ei_bootp_option_classless_static_route = EI_INIT;
614 static expert_field ei_bootp_option125_enterprise_malformed = EI_INIT;
615 static expert_field ei_bootp_option_6RD_malformed = EI_INIT;
616 static expert_field ei_bootp_option82_vi_cl_tag_unknown = EI_INIT;
617 static expert_field ei_bootp_option_parse_err = EI_INIT;
618 static expert_field ei_bootp_suboption_invalid = EI_INIT;
619 static expert_field ei_bootp_secs_le = EI_INIT;
620 static expert_field ei_bootp_end_option_missing = EI_INIT;
621 static expert_field ei_bootp_client_address_not_given = EI_INIT;
622 static expert_field ei_bootp_server_name_overloaded_by_dhcp = EI_INIT;
623 static expert_field ei_bootp_boot_filename_overloaded_by_dhcp = EI_INIT;
624 static expert_field ei_bootp_option_isns_ignored_bitfield = EI_INIT;
625 static expert_field ei_bootp_option242_avaya_l2qvlan_invalid = EI_INIT;
626 static expert_field ei_bootp_option242_avaya_vlantest_invalid = EI_INIT;
628 static dissector_handle_t bootp_handle;
630 /* RFC2937 The Name Service Search Option for DHCP */
631 #define RFC2937_LOCAL_NAMING_INFORMATION 0
632 #define RFC2937_DOMAIN_NAME_SERVER_OPTION 6
633 #define RFC2937_NETWORK_INFORMATION_SERVERS_OPTION 41
634 #define RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION 44
635 #define RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION 65
637 /* RFC3825decoder error codes of the conversion function */
638 #define RFC3825_NOERROR 0
639 #define RFC3825_LATITUDE_OUTOFRANGE 1
640 #define RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE 2
641 #define RFC3825_LONGITUDE_OUTOFRANGE 3
642 #define RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE 4
643 #define RFC3825_ALTITUDE_OUTOFRANGE 5
644 #define RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE 6
645 #define RFC3825_ALTITUDE_TYPE_OUTOFRANGE 7
646 #define RFC3825_DATUM_TYPE_OUTOFRANGE 8
652 struct rfc3825_location_fixpoint_t {
654 gint64 latitude; /* latitude in degrees, allowed range from -90deg to 90deg.
655 Fixpoint A(8,25) with 34 bits */
656 guint8 latitude_res; /* the resolution of the latitude in bits, allowed range is from 0 to 34.
658 gint64 longitude; /* longitude in degrees, range from -180deg to 180deg.
659 Fixpoint A(8,25) with 34 bits */
660 guint8 longitude_res; /* the resolution of the longitude in bits, allowed range is from 0 to 34.
662 gint32 altitude; /* the altitude, 30 bits.
663 Depending on alt_type this are meters or floors, no range limit.
664 altitude_type==1: A(13,8) with 22 bits
665 altitude_type==2: A(13,8) with 22 bits */
666 guint8 altitude_res; /* the resolution of the altitude in bits, allowed range is from 0 to 30.
668 altitude_type==1: any value between 0 and 30
669 altitude_type==2: either 0 (floor unknown) or 30 */
670 guint8 altitude_type; /* the type of the altitude, 4 bits. allowed values are:
672 1: altitude in meters
673 2: altitude in floors */
674 guint8 datum_type; /* the map datum used for the coordinates. 8 bits.
675 All values are allowed although currently only the
676 following ones are defined:
682 /* The rfc3825_location_decimal_t structure holds the location parameters
683 * in decimal (floating point) format.
685 struct rfc3825_location_decimal_t {
687 double latitude; /* latitude in degrees, allowed range from -90deg to 90deg */
688 double latitude_res; /* the uncertainty of the latitude in grad, "0.01" means +-0.01deg
689 from the altitude. During conversion this will be rounded to
690 next smaller value which can be represented in fixpoint arithmetic */
691 double longitude; /* longitude in degrees, range from -180deg to 180deg */
692 double longitude_res; /* the uncertainty of the longitude in grad, "0.01" means +-0.01deg
693 from the longitude. During conversion this will be rounded to
694 next smaller value which can be represented in fixpoint arithmetic */
695 double altitude; /* the altitude, depending on alt_type this are meters or floors, no range limit */
696 double altitude_res; /* the uncertainty of the altitude in either:
697 - altitude-type=meters: "10" means 10 meters which means +-10 meters from the altitude
698 - altitude-type=floors: either 0 (unknown) or 30 (exact) */
699 int altitude_type; /* the type of the altitude, allowed values are
701 1: altitude in meters
702 2: altitude in floors */
703 int datum_type; /* the map datum used for the coordinates.
704 All values are allowed although currently only the
705 following ones are defined:
711 /* For managing split options with RFC 3396 */
712 struct rfc3396_for_option_t {
713 unsigned int total_number_of_block;
714 unsigned int index_current_block;
715 tvbuff_t* tvb_composite;
718 /* The RFC 3397 allows to cut long option (RFC 3396). */
719 struct rfc3396_for_option_t rfc3396_dns_domain_search_list;
721 /* The RFC 3361 allows to cut long option (RFC 3396). */
722 struct rfc3396_for_option_t rfc3396_sip_server;
729 static void dissect_vendor_avaya_param(proto_tree *tree, packet_info *pinfo, proto_item *vti,
730 tvbuff_t *tvb, int optoff, wmem_strbuf_t *avaya_param_buf);
732 /* converts fixpoint presentation into decimal presentation
733 also converts values which are out of range to allow decoding of received data */
734 static int rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t *fixpoint, struct rfc3825_location_decimal_t *decimal);
736 /* decodes the LCI string received from DHCP into the fixpoint values */
737 static void rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fixpoint_t *fixpoint);
740 /* Map Datum Types used for the coordinates (RFC 3825) */
741 static const value_string map_datum_type_values[] = {
743 { 2, "NAD83 (NAVD88)" },
744 { 3, "NAD83 (MLLW)" },
749 /* Altitude Types used for the coordinates (RFC 3825) */
750 static const value_string altitude_type_values[] = {
756 /* AutoConfigure (RFC 2563) */
757 static const value_string dhcp_autoconfig[] = {
758 { 0, "DoNotAutoConfigure"},
759 { 1, "AutoConfigure"},
763 /* Error Types for RFC 3825 coordinate location decoding */
764 static const value_string rfc3825_error_types[] = {
765 { 1, "Latitude is out of range [-90,90]"},
766 { 2, "Latitude Uncertainty is out of range [0,90]"},
767 { 3, "Longitude is out of range [-180,180]"},
768 { 4, "Longitude Uncertainty is out of range [0,180]"},
769 { 5, "Altitude is out of range [-(2^21),(2^21)-1]"},
770 { 6, "Altitude Uncertainty is out of range [0,2^20]"},
771 { 7, "Altitude Type is out of range [0,2]"},
772 { 8, "Datum is out of range [1,3]"},
778 /* Civic Address What field (RFC 4776) */
779 static const value_string civic_address_what_values[] = {
780 { 0, "Location of the DHCP server" },
781 { 1, "Location of the network element believed to be closest to the client" },
782 { 2, "Location of the client"},
786 /* Civic Address Type field (RFC 4119, RFC 4776, RFC 5139) */
787 static const value_string civic_address_type_values[] = {
795 { 16, "PRD (Leading street direction)" },
796 { 17, "POD (Trailing street suffix)" },
797 { 18, "STS (Street suffix)" },
798 { 19, "HNO (House number)" },
799 { 20, "HNS (House number suffix)" },
800 { 21, "LMK (Landmark or vanity address)" },
801 { 22, "LOC (Additional location information)" },
803 { 24, "PC (Postal/ZIP code)" },
804 { 25, "BLD (Building)" },
806 { 27, "FLR (Floor)" },
808 { 29, "PLC (Place-type)" },
809 { 30, "PCN (Postal community name)" },
811 { 32, "ADDCODE (Additional Code)" },
813 { 34, "RD (Primary road or street)" },
814 { 35, "RDSEC (Road section)" },
815 { 36, "RDBR (Road branch)" },
816 { 37, "RDSUBBR (Road sub-branch)" },
817 { 38, "PRM (Road pre-modifier)" },
818 { 39, "POM (Road post-modifier" },
823 static const value_string cablelab_ipaddr_mode_vals[] = {
829 static const value_string duidtype_vals[] =
831 { DUID_LLT, "link-layer address plus time" },
832 { DUID_EN, "assigned by vendor based on Enterprise number" },
833 { DUID_LL, "link-layer address" },
837 static gboolean novell_string = FALSE;
839 static guint bootp_uuid_endian = ENC_LITTLE_ENDIAN;
841 static const enum_val_t bootp_uuid_endian_vals[] = {
842 { "Little Endian", "Little Endian", ENC_LITTLE_ENDIAN},
843 { "Big Endian", "Big Endian", ENC_BIG_ENDIAN },
847 #define BOOTP_UDP_PORT_RANGE "67-68"
849 #define BOOTP_BC 0x8000
850 #define BOOTP_MBZ 0x7FFF
853 #define F_FQDN_S 0x01
854 #define F_FQDN_O 0x02
855 #define F_FQDN_E 0x04
856 #define F_FQDN_N 0x08
857 #define F_FQDN_MBZ 0xf0
859 #define ISNS_BITFIELD_NZ_MUST_BE_IGNORED(mask, ena_flag) \
860 ((mask) && !((mask) & (ena_flag)))
862 /* iSNS bit fields */
863 #define F_ISNS_FUNCTIONS_ENABLED 0x0001
864 #define F_ISNS_FUNCTIONS_DD_AUTH 0x0002
865 #define F_ISNS_FUNCTIONS_SEC_POLICY 0x0004
866 #define F_ISNS_FUNCTIONS_RESERVED 0xFFF8
868 #define F_ISNS_DD_ACCESS_ENABLED 0x0001
869 #define F_ISNS_DD_ACCESS_CTRL_NODE 0x0002
870 #define F_ISNS_DD_ACCESS_ISCSI_TARGET 0x0004
871 #define F_ISNS_DD_ACCESS_ISCSI_INITIATOR 0x0008
872 #define F_ISNS_DD_ACCESS_IFCP_TARGET_PORT 0x0010
873 #define F_ISNS_DD_ACCESS_IFCP_INITIATOR_PORT 0x0020
874 #define F_ISNS_DD_ACCESS_RESERVED 0xFFC0
876 #define F_ISNS_ADMIN_FLAGS_ENABLED 0x0001
877 #define F_ISNS_ADMIN_FLAGS_HEARTBEAT 0x0002
878 #define F_ISNS_ADMIN_FLAGS_MANAGEMENT_SCNS 0x0004
879 #define F_ISNS_ADMIN_FLAGS_DEFAULT_DD 0x0008
880 #define F_ISNS_ADMIN_FLAGS_RESERVED 0xFFF0
882 #define F_ISNS_SRV_SEC_BITMAP_ENABLED 0x0001
883 #define F_ISNS_SRV_SEC_BITMAP_IKE_IPSEC 0x0002
884 #define F_ISNS_SRV_SEC_BITMAP_MAIN_MODE 0x0004
885 #define F_ISNS_SRV_SEC_BITMAP_AGGRESSIVE 0x0008
886 #define F_ISNS_SRV_SEC_BITMAP_PFS 0x0010
887 #define F_ISNS_SRV_SEC_BITMAP_TRASPORT_MODE 0x0020
888 #define F_ISNS_SRV_SEC_BITMAP_TUNNEL_MODE 0x0040
889 #define F_ISNS_SRV_SEC_BITMAP_RESERVED 0xFF80
891 static const true_false_string tfs_fqdn_s = {
896 static const true_false_string tfs_fqdn_o = {
901 static const true_false_string tfs_fqdn_e = {
906 static const true_false_string tfs_fqdn_n = {
908 "Some server updates"
911 static const true_false_string tfs_isns_function_dd_based_auth = {
912 "Automatically allowed access",
913 "Explicitly performed",
916 static const true_false_string tfs_isns_functions_sec_distrib = {
917 "Download from iSNS server",
925 ipv4, /* single IPv4 address */
926 ipv4_list, /* list of IPv4 addresses */
936 time_in_s_secs, /* Signed */
937 time_in_u_secs, /* Unsigned (not micro) */
945 enum field_type ftype;
949 static const true_false_string flag_set_broadcast = {
954 #define BOOTP_MAX_NO_CHAR 64
956 /* PacketCable/DOCSIS definitions */
957 #define PACKETCABLE_MTA_CAP10 "pktc1.0:"
958 #define PACKETCABLE_MTA_CAP15 "pktc1.5:"
959 #define PACKETCABLE_MTA_CAP20 "pktc2.0:"
960 #define PACKETCABLE_CM_CAP11 "docsis1.1:"
961 #define PACKETCABLE_CM_CAP20 "docsis2.0:"
962 #define PACKETCABLE_CM_CAP30 "docsis3.0:"
964 #define PACKETCABLE_CCC_I05 1
965 #define PACKETCABLE_CCC_DRAFT5 2
966 #define PACKETCABLE_CCC_RFC_3495 3
968 static const enum_val_t pkt_ccc_protocol_versions[] = {
969 { "ccc_i05", "PKT-SP-PROV-I05-021127", PACKETCABLE_CCC_I05 },
970 { "ccc_draft_5", "IETF Draft 5", PACKETCABLE_CCC_DRAFT5 },
971 { "rfc_3495", "RFC 3495", PACKETCABLE_CCC_RFC_3495 },
975 #define PACKETCABLE_BSDP "AAPLBSDPC"
976 #define PACKETCABLE_BSDPD "AAPLBSDPC/"
978 static gint pkt_ccc_protocol_version = PACKETCABLE_CCC_RFC_3495;
979 static guint pkt_ccc_option = 122;
982 static int dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
983 tvbuff_t *tvb, int optoff, int optend);
984 static int dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
985 tvbuff_t *tvb, int optoff, int optend);
986 static int dissect_vendor_bsdp_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
987 tvbuff_t *tvb, int optoff, int optend);
988 static gboolean test_encapsulated_vendor_options(tvbuff_t *tvb, int optoff, int optend);
989 static int dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
990 tvbuff_t *tvb, int optoff, int optend);
991 static int dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
992 tvbuff_t *tvb, int optoff, int optend);
993 static int dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
994 tvbuff_t *tvb, int optoff, int optend);
995 static int bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
996 tvbuff_t *tvb, int optoff, int optend);
997 static void dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tvb,
999 static void dissect_docsis_cm_cap(proto_tree *v_tree, tvbuff_t *tvb,
1000 int voff, int len, gboolean opt125);
1001 static int dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
1002 tvbuff_t *tvb, int optoff, int optend);
1003 static int dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
1004 tvbuff_t *tvb, int optoff, int optend, int revision);
1005 static int dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
1006 tvbuff_t *tvb, int optoff, int optend);
1007 static int dissect_vendor_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
1008 tvbuff_t *tvb, int optoff, int optend);
1009 static int dissect_isns(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
1010 tvbuff_t *tvb, int optoff, int optlen);
1011 static void dissect_vendor_bsdp_boot_image(proto_tree *v_tree, tvbuff_t *tvb, int optoff);
1013 #define OPT53_DISCOVER "Discover"
1014 /* http://www.iana.org/assignments/bootp-dhcp-parameters */
1015 static const value_string opt53_text[] = {
1016 { 1, OPT53_DISCOVER },
1024 { 9, "Force Renew" },
1025 { 10, "Lease query" }, /* RFC4388 */
1026 { 11, "Lease Unassigned" }, /* RFC4388 */
1027 { 12, "Lease Unknown" }, /* RFC4388 */
1028 { 13, "Lease Active" }, /* RFC4388 */
1029 /* draft-ietf-dhc-leasequery-09.txt
1030 { 13, "Lease query" }, */
1031 { 14, "Lease known" },
1032 { 15, "Lease unknown" },
1033 { 16, "Lease active" },
1034 { 17, "Unimplemented" },
1039 /* DHCP Authentication protocols */
1040 #define AUTHEN_PROTO_CONFIG_TOKEN 0
1041 #define AUTHEN_PROTO_DELAYED_AUTHEN 1
1043 /* DHCP Authentication algorithms for delayed authentication */
1044 #define AUTHEN_DELAYED_ALGO_HMAC_MD5 1
1046 /* DHCP Authentication Replay Detection Methods */
1047 #define AUTHEN_RDM_MONOTONIC_COUNTER 0x00
1049 /* DHCP Option Overload (option code 52) */
1050 #define OPT_OVERLOAD_FILE 1
1051 #define OPT_OVERLOAD_SNAME 2
1052 #define OPT_OVERLOAD_BOTH 3
1054 /* Server name and boot file offsets and lengths */
1055 #define SERVER_NAME_OFFSET 44
1056 #define SERVER_NAME_LEN 64
1057 #define FILE_NAME_OFFSET 108
1058 #define FILE_NAME_LEN 128
1059 #define VENDOR_INFO_OFFSET 236
1061 static const value_string bootp_nbnt_vals[] = {
1069 static const value_string bootp_client_arch[] = {
1070 { 0x0000, "IA x86 PC" },
1071 { 0x0001, "NEC/PC98" },
1072 { 0x0002, "IA64 PC" },
1073 { 0x0003, "DEC Alpha" },
1074 { 0x0004, "ArcX86" },
1075 { 0x0005, "Intel Lean Client" },
1076 { 0x0006, "EFI IA32" },
1077 { 0x0007, "EFI BC" },
1078 { 0x0008, "EFI Xscale" },
1079 { 0x0009, "EFI x86-64" },
1083 static const value_string opt_overload_vals[] = {
1084 { OPT_OVERLOAD_FILE, "Boot file name holds options", },
1085 { OPT_OVERLOAD_SNAME, "Server host name holds options", },
1086 { OPT_OVERLOAD_BOTH, "Boot file and server host names hold options" },
1089 static const value_string slpda_vals[] = {
1090 {0x00, "Dynamic Discovery" },
1091 {0x01, "Static Discovery" },
1092 {0x80, "Backwards compatibility" },
1095 static const value_string slp_scope_vals[] = {
1096 {0x00, "Preferred Scope" },
1097 {0x01, "Mandatory Scope" },
1100 static const value_string authen_protocol_vals[] = {
1101 {AUTHEN_PROTO_CONFIG_TOKEN, "configuration token" },
1102 {AUTHEN_PROTO_DELAYED_AUTHEN, "delayed authentication" },
1105 static const value_string authen_da_algo_vals[] = {
1106 {AUTHEN_DELAYED_ALGO_HMAC_MD5, "HMAC_MD5" },
1109 static const value_string authen_rdm_vals[] = {
1110 {AUTHEN_RDM_MONOTONIC_COUNTER, "Monotonically-increasing counter" },
1113 static const value_string cl_dss_id_type_vals[] = {
1114 {1, "Primary DSS_ID" },
1115 {2, "Secondary DSS_ID" },
1119 static const value_string sip_server_enc_vals[] = {
1120 {0, "Fully Qualified Domain Name" },
1121 {1, "IPv4 Address" },
1125 static const value_string o43_bsdp_boot_image_install_vals[] = {
1126 { 0, "non-install" },
1131 static const value_string o43_bsdp_boot_image_kind_vals[] = {
1134 { 2, "Mac OS X Server" },
1135 { 3, "Hardware Diagnostics" },
1139 static const value_string o43_bsdp_message_type_vals[] = {
1146 static const string_string option242_avaya_phystat_vals[] = {
1147 { "0", "Disabled" },
1149 { "2", "10Mbps half" },
1150 { "3", "10Mbps full" },
1151 { "4", "100Mbps half" },
1152 { "5", "100Mbps full" },
1153 { "6", "1000Mbps full" },
1157 static const string_string option242_avaya_l2q_vals[] = {
1160 { "2", "Disabled" },
1164 static const string_string option242_avaya_dot1x_vals[] = {
1165 { "0", "With PAE pass-through" },
1166 { "1", "With PAE pass-through and proxy Logoff" },
1167 { "2", "Without PAE pass-through or proxy Logoff" },
1171 static const string_string option242_avaya_icmpdu_vals[] = {
1172 { "0", "No ICMP Destination Unreachable messages" },
1173 { "1", "Send limited Port Unreachable messages" },
1174 { "2", "Send Protocol and Port Unreachable messages" },
1178 static const string_string option242_avaya_icmpred_vals[] = {
1179 { "0", "Ignore ICMP Redirect messages" },
1180 { "1", "Process ICMP Redirect messages" },
1184 static const string_string option242_avaya_loglocal_vals[] = {
1185 { "0", "Disabled" },
1186 { "1", "Emergencie" },
1188 { "3", "Critical" },
1190 { "5", "Warnings" },
1192 { "7", "Information" },
1197 static const string_string option242_avaya_procstat_vals[] = {
1198 { "0", "All administrative options" },
1199 { "1", "Only view administrative options" },
1203 static const string_string option242_avaya_static_vals[] = {
1204 { "0", "Static programming never overrides call server (DHCP) or call server administered data" },
1205 { "1", "Static programming overrides only file server administered data" },
1206 { "2", "Static programming overrides only call server administered data" },
1207 { "3", "Static programming overrides both file server- and call server-administered data" },
1211 /* bootp options administration */
1212 #define BOOTP_OPT_NUM 256
1214 /* Re-define structure. Values to be updated by bootp_init_protocol */
1215 static struct opt_info bootp_opt[BOOTP_OPT_NUM];
1217 static struct opt_info default_bootp_opt[BOOTP_OPT_NUM] = {
1218 /* 0 */ { "Padding", none, &hf_bootp_option_padding },
1219 /* 1 */ { "Subnet Mask", ipv4, &hf_bootp_option_subnet_mask },
1220 /* 2 */ { "Time Offset", time_in_s_secs, &hf_bootp_option_time_offset },
1221 /* 3 */ { "Router", ipv4_list, &hf_bootp_option_router },
1222 /* 4 */ { "Time Server", ipv4_list, &hf_bootp_option_time_server },
1223 /* 5 */ { "Name Server", ipv4_list, &hf_bootp_option_name_server },
1224 /* 6 */ { "Domain Name Server", ipv4_list, &hf_bootp_option_domain_name_server },
1225 /* 7 */ { "Log Server", ipv4_list, &hf_bootp_option_log_server },
1226 /* 8 */ { "Quotes Server", ipv4_list, &hf_bootp_option_quotes_server },
1227 /* 9 */ { "LPR Server", ipv4_list, &hf_bootp_option_lpr_server },
1228 /* 10 */ { "Impress Server", ipv4_list, &hf_bootp_option_impress_server },
1229 /* 11 */ { "Resource Location Server", ipv4_list, &hf_bootp_option_resource_location_server },
1230 /* 12 */ { "Host Name", string, &hf_bootp_option_hostname },
1231 /* 13 */ { "Boot File Size", val_u_short, &hf_bootp_option_boot_file_size },
1232 /* 14 */ { "Merit Dump File", string, &hf_bootp_option_merit_dump_file },
1233 /* 15 */ { "Domain Name", string, &hf_bootp_option_domain_name },
1234 /* 16 */ { "Swap Server", ipv4, &hf_bootp_option_swap_server },
1235 /* 17 */ { "Root Path", string, &hf_bootp_option_root_path },
1236 /* 18 */ { "Extensions Path", string, &hf_bootp_option_extension_path },
1237 /* 19 */ { "IP Forwarding", val_boolean, &hf_bootp_option_ip_forwarding },
1238 /* 20 */ { "Non-Local Source Routing", val_boolean, &hf_bootp_option_non_local_source_routing },
1239 /* 21 */ { "Policy Filter", special, NULL },
1240 /* 22 */ { "Maximum Datagram Reassembly Size", val_u_short, &hf_bootp_option_max_datagram_reassembly_size },
1241 /* 23 */ { "Default IP Time-to-Live", val_u_byte, &hf_bootp_option_default_ip_ttl },
1242 /* 24 */ { "Path MTU Aging Timeout", time_in_u_secs, &hf_bootp_option_path_mtu_aging_timeout },
1243 /* 25 */ { "Path MTU Plateau Table", val_u_short_list, &hf_bootp_option_path_mtu_plateau_table_item },
1244 /* 26 */ { "Interface MTU", val_u_short, &hf_bootp_option_interface_mtu },
1245 /* 27 */ { "All Subnets are Local", val_boolean, &hf_bootp_option_all_subnets_are_local },
1246 /* 28 */ { "Broadcast Address", ipv4, &hf_bootp_option_broadcast_address },
1247 /* 29 */ { "Perform Mask Discovery", val_boolean, &hf_bootp_option_perform_mask_discovery },
1248 /* 30 */ { "Mask Supplier", val_boolean, &hf_bootp_option_mask_supplier },
1249 /* 31 */ { "Perform Router Discover", val_boolean, &hf_bootp_option_perform_router_discover },
1250 /* 32 */ { "Router Solicitation Address", ipv4, &hf_bootp_option_router_solicitation_address },
1251 /* 33 */ { "Static Route", special, NULL },
1252 /* 34 */ { "Trailer Encapsulation", val_boolean, &hf_bootp_option_trailer_encapsulation },
1253 /* 35 */ { "ARP Cache Timeout", time_in_u_secs, &hf_bootp_option_arp_cache_timeout },
1254 /* 36 */ { "Ethernet Encapsulation", val_boolean, &hf_bootp_option_ethernet_encapsulation },
1255 /* 37 */ { "TCP Default TTL", val_u_byte, &hf_bootp_option_tcp_default_ttl },
1256 /* 38 */ { "TCP Keepalive Interval", time_in_u_secs, &hf_bootp_option_tcp_keepalive_interval },
1257 /* 39 */ { "TCP Keepalive Garbage", val_boolean, &hf_bootp_option_tcp_keepalive_garbage },
1258 /* 40 */ { "Network Information Service Domain", string, &hf_bootp_option_nis_domain },
1259 /* 41 */ { "Network Information Service Servers", ipv4_list, &hf_bootp_option_nis_server },
1260 /* 42 */ { "Network Time Protocol Servers", ipv4_list, &hf_bootp_option_ntp_server },
1261 /* 43 */ { "Vendor-Specific Information", special, NULL },
1262 /* 44 */ { "NetBIOS over TCP/IP Name Server", ipv4_list, &hf_bootp_option_netbios_over_tcpip_name_server },
1263 /* 45 */ { "NetBIOS over TCP/IP Datagram Distribution Name Server", ipv4_list, &hf_bootp_option_netbios_over_tcpip_dd_name_server },
1264 /* 46 */ { "NetBIOS over TCP/IP Node Type", val_u_byte, &hf_bootp_option_netbios_over_tcpip_node_type },
1265 /* 47 */ { "NetBIOS over TCP/IP Scope", string, &hf_bootp_option_netbios_over_tcpip_scope },
1266 /* 48 */ { "X Window System Font Server", ipv4_list, &hf_bootp_option_xwindows_system_font_server },
1267 /* 49 */ { "X Window System Display Manager", ipv4_list, &hf_bootp_option_xwindows_system_display_manager },
1268 /* 50 */ { "Requested IP Address", ipv4, &hf_bootp_option_requested_ip_address },
1269 /* 51 */ { "IP Address Lease Time", time_in_u_secs, &hf_bootp_option_ip_address_lease_time },
1270 /* 52 */ { "Option Overload", special, &hf_bootp_option_option_overload },
1271 /* 53 */ { "DHCP Message Type", val_u_byte, &hf_bootp_option_dhcp },
1272 /* 54 */ { "DHCP Server Identifier", ipv4, &hf_bootp_option_dhcp_server_id },
1273 /* 55 */ { "Parameter Request List", special, &hf_bootp_option_parameter_request_list_item },
1274 /* 56 */ { "Message", string, &hf_bootp_option_message },
1275 /* 57 */ { "Maximum DHCP Message Size", val_u_short, &hf_bootp_option_dhcp_max_message_size },
1276 /* 58 */ { "Renewal Time Value", time_in_u_secs, &hf_bootp_option_renewal_time_value },
1277 /* 59 */ { "Rebinding Time Value", time_in_u_secs, &hf_bootp_option_rebinding_time_value },
1278 /* 60 */ { "Vendor class identifier", special, NULL },
1279 /* 61 */ { "Client identifier", special, NULL },
1280 /* 62 */ { "Novell/Netware IP domain", string, &hf_bootp_option_novell_netware_ip_domain },
1281 /* 63 */ { "Novell Options", special, NULL },
1282 /* 64 */ { "Network Information Service+ Domain", string, &hf_bootp_option_nis_plus_domain },
1283 /* 65 */ { "Network Information Service+ Servers", ipv4_list, &hf_bootp_option_nis_plus_server },
1284 /* 66 */ { "TFTP Server Name", string, &hf_bootp_option_tftp_server_name },
1285 /* 67 */ { "Bootfile name", string, &hf_bootp_option_bootfile_name },
1286 /* 68 */ { "Mobile IP Home Agent", ipv4_list, &hf_bootp_option_mobile_ip_home_agent },
1287 /* 69 */ { "SMTP Server", ipv4_list, &hf_bootp_option_smtp_server },
1288 /* 70 */ { "POP3 Server", ipv4_list, &hf_bootp_option_pop3_server },
1289 /* 71 */ { "NNTP Server", ipv4_list, &hf_bootp_option_nntp_server },
1290 /* 72 */ { "Default WWW Server", ipv4_list, &hf_bootp_option_default_www_server },
1291 /* 73 */ { "Default Finger Server", ipv4_list, &hf_bootp_option_default_finger_server },
1292 /* 74 */ { "Default IRC Server", ipv4_list, &hf_bootp_option_default_irc_server },
1293 /* 75 */ { "StreetTalk Server", ipv4_list, &hf_bootp_option_streettalk_server },
1294 /* 76 */ { "StreetTalk Directory Assistance Server", ipv4_list, &hf_bootp_option_streettalk_da_server },
1295 /* 77 */ { "User Class Information", special, NULL },
1296 /* 78 */ { "Directory Agent Information", special, NULL },
1297 /* 79 */ { "Service Location Agent Scope", special, NULL },
1298 /* 80 */ { "Rapid commit", opaque, NULL },
1299 /* 81 */ { "Client Fully Qualified Domain Name", special, NULL},
1300 /* 82 */ { "Agent Information Option", special, NULL},
1301 /* 83 */ { "iSNS", opaque, NULL },
1302 /* 84 */ { "Removed/Unassigned", opaque, NULL },
1303 /* 85 */ { "Novell Directory Services Servers", special, NULL},
1304 /* 86 */ { "Novell Directory Services Tree Name", string, &hf_bootp_option_novell_ds_tree_name },
1305 /* 87 */ { "Novell Directory Services Context", string, &hf_bootp_option_novell_ds_context },
1306 /* 88 */ { "BCMCS Controller Domain Name [TODO:RFC4280]", opaque, NULL },
1307 /* 89 */ { "BCMCS Controller IPv4 address [TODO:RFC4280]", opaque, NULL },
1308 /* 90 */ { "Authentication", special, NULL},
1309 /* 91 */ { "Client last transaction time", time_in_u_secs, &hf_bootp_option_client_last_transaction_time },
1310 /* 92 */ { "Associated IP option", ipv4_list, &hf_bootp_option_associated_ip_option },
1311 /* 93 */ { "Client System Architecture", val_u_short, &hf_bootp_option_client_system_architecture },
1312 /* 94 */ { "Client Network Device Interface", special, NULL},
1313 /* 95 */ { "LDAP [TODO:RFC3679]", opaque, NULL },
1314 /* 96 */ { "Removed/Unassigned", opaque, NULL },
1315 /* 97 */ { "UUID/GUID-based Client Identifier", special, NULL},
1316 /* 98 */ { "Open Group's User Authentication [TODO:RFC2485]", opaque, NULL },
1317 /* 99 */ { "Civic Addresses Configuration", special, NULL},
1318 /* 100 */ { "PCode [TODO:RFC4833]", opaque, NULL },
1319 /* 101 */ { "TCode [TODO:RFC4833]", opaque, NULL },
1320 /* 102 */ { "Removed/unassigned", opaque, NULL },
1321 /* 103 */ { "Removed/unassigned", opaque, NULL },
1322 /* 104 */ { "Removed/unassigned", opaque, NULL },
1323 /* 105 */ { "Removed/unassigned", opaque, NULL },
1324 /* 106 */ { "Removed/unassigned", opaque, NULL },
1325 /* 107 */ { "Removed/unassigned", opaque, NULL },
1326 /* 108 */ { "Removed/Unassigned", opaque, NULL },
1327 /* 109 */ { "Unassigned", opaque, NULL },
1328 /* 110 */ { "Removed/Unassigned", opaque, NULL },
1329 /* 111 */ { "Unassigned", opaque, NULL },
1330 /* 112 */ { "NetInfo Parent Server Address", ipv4_list, &hf_bootp_option_netinfo_parent_server_address },
1331 /* 113 */ { "NetInfo Parent Server Tag", string, &hf_bootp_option_netinfo_parent_server_tag },
1332 /* 114 */ { "URL [TODO:RFC3679]", opaque, NULL },
1333 /* 115 */ { "Removed/Unassigned", opaque, NULL },
1334 /* 116 */ { "DHCP Auto-Configuration", val_u_byte, &hf_bootp_option_dhcp_auto_configuration },
1335 /* 117 */ { "Name Service Search", special, NULL },
1336 /* 118 */ { "Subnet Selection Option", ipv4_list, &hf_bootp_option_subnet_selection_option },
1337 /* 119 */ { "Domain Search", special, NULL },
1338 /* 120 */ { "SIP Servers", special, NULL },
1339 /* 121 */ { "Classless Static Route", special, NULL},
1340 /* 122 */ { "CableLabs Client Configuration [TODO:RFC3495]", opaque, NULL },
1341 /* 123 */ { "Coordinate-based Location Configuration", special, NULL},
1342 /* 124 */ { "V-I Vendor Class", special, NULL},
1343 /* 125 */ { "V-I Vendor-specific Information", special, NULL},
1344 /* 126 */ { "Removed/Unassigned", opaque, NULL },
1345 /* 127 */ { "Removed/Unassigned", opaque, NULL },
1346 /* 128 */ { "DOCSIS full security server IP [TODO]", opaque, NULL },
1347 /* 129 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1348 /* 130 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1349 /* 131 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1350 /* 132 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1351 /* 133 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1352 /* 134 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1353 /* 135 */ { "PXE - undefined (vendor specific)", opaque, NULL },
1354 /* 136 */ { "OPTION_PANA_AGENT [TODO:RFC5192]", opaque, NULL },
1355 /* 137 */ { "LoST Server Domain Name", string, &hf_bootp_option_lost_server_domain_name },
1356 /* 138 */ { "CAPWAP Access Controllers", ipv4_list, &hf_bootp_option_capwap_access_controller },
1357 /* 139 */ { "IPv4 Address-MoS", opaque, NULL },
1358 /* 140 */ { "IPv4 FQDN-MoS", opaque, NULL },
1359 /* 141 */ { "SIP UA Configuration Domains", opaque, NULL },
1360 /* 142 */ { "Unassigned", opaque, NULL },
1361 /* 143 */ { "Unassigned", opaque, NULL },
1362 /* 144 */ { "Unassigned", opaque, NULL },
1363 /* 145 */ { "Unassigned", opaque, NULL },
1364 /* 146 */ { "Unassigned", opaque, NULL },
1365 /* 147 */ { "Unassigned", opaque, NULL },
1366 /* 148 */ { "Unassigned", opaque, NULL },
1367 /* 149 */ { "Unassigned", opaque, NULL },
1368 /* 150 */ { "TFTP Server Address", ipv4_list, &hf_bootp_option_tftp_server_address },
1369 /* 151 */ { "Unassigned", opaque, NULL },
1370 /* 152 */ { "Unassigned", opaque, NULL },
1371 /* 153 */ { "Unassigned", opaque, NULL },
1372 /* 154 */ { "Unassigned", opaque, NULL },
1373 /* 155 */ { "Unassigned", opaque, NULL },
1374 /* 156 */ { "Unassigned", opaque, NULL },
1375 /* 157 */ { "Unassigned", opaque, NULL },
1376 /* 158 */ { "Unassigned", opaque, NULL },
1377 /* 159 */ { "Unassigned", opaque, NULL },
1378 /* 160 */ { "Unassigned", opaque, NULL },
1379 /* 161 */ { "Unassigned", opaque, NULL },
1380 /* 162 */ { "Unassigned", opaque, NULL },
1381 /* 163 */ { "Unassigned", opaque, NULL },
1382 /* 164 */ { "Unassigned", opaque, NULL },
1383 /* 165 */ { "Unassigned", opaque, NULL },
1384 /* 166 */ { "Unassigned", opaque, NULL },
1385 /* 167 */ { "Unassigned", opaque, NULL },
1386 /* 168 */ { "Unassigned", opaque, NULL },
1387 /* 169 */ { "Unassigned", opaque, NULL },
1388 /* 170 */ { "Unassigned", opaque, NULL },
1389 /* 171 */ { "Unassigned", opaque, NULL },
1390 /* 172 */ { "Unassigned", opaque, NULL },
1391 /* 173 */ { "Unassigned", opaque, NULL },
1392 /* 174 */ { "Unassigned", opaque, NULL },
1393 /* 175 */ { "Etherboot", opaque, NULL },
1394 /* 176 */ { "IP Telephone", opaque, NULL },
1395 /* 177 */ { "Etherboot", opaque, NULL },
1396 /* 178 */ { "Unassigned", opaque, NULL },
1397 /* 179 */ { "Unassigned", opaque, NULL },
1398 /* 180 */ { "Unassigned", opaque, NULL },
1399 /* 181 */ { "Unassigned", opaque, NULL },
1400 /* 182 */ { "Unassigned", opaque, NULL },
1401 /* 183 */ { "Unassigned", opaque, NULL },
1402 /* 184 */ { "Unassigned", opaque, NULL },
1403 /* 185 */ { "Unassigned", opaque, NULL },
1404 /* 186 */ { "Unassigned", opaque, NULL },
1405 /* 187 */ { "Unassigned", opaque, NULL },
1406 /* 188 */ { "Unassigned", opaque, NULL },
1407 /* 189 */ { "Unassigned", opaque, NULL },
1408 /* 190 */ { "Unassigned", opaque, NULL },
1409 /* 191 */ { "Unassigned", opaque, NULL },
1410 /* 192 */ { "Unassigned", opaque, NULL },
1411 /* 193 */ { "Unassigned", opaque, NULL },
1412 /* 194 */ { "Unassigned", opaque, NULL },
1413 /* 195 */ { "Unassigned", opaque, NULL },
1414 /* 196 */ { "Unassigned", opaque, NULL },
1415 /* 197 */ { "Unassigned", opaque, NULL },
1416 /* 198 */ { "Unassigned", opaque, NULL },
1417 /* 199 */ { "Unassigned", opaque, NULL },
1418 /* 200 */ { "Unassigned", opaque, NULL },
1419 /* 201 */ { "Unassigned", opaque, NULL },
1420 /* 202 */ { "Unassigned", opaque, NULL },
1421 /* 203 */ { "Unassigned", opaque, NULL },
1422 /* 204 */ { "Unassigned", opaque, NULL },
1423 /* 205 */ { "Unassigned", opaque, NULL },
1424 /* 206 */ { "Unassigned", opaque, NULL },
1425 /* 207 */ { "Unassigned", opaque, NULL },
1426 /* 208 */ { "PXELINUX Magic", opaque, NULL },
1427 /* 209 */ { "PXE Configuration file", string, &hf_bootp_option_pxe_config_file },
1428 /* 210 */ { "PXE Path Prefix", string, &hf_bootp_option_pxe_path_prefix },
1429 /* 211 */ { "Reboot Time", opaque, NULL },
1430 /* 212 */ { "6RD", opaque, NULL },
1431 /* 213 */ { "V4 Access Domain", opaque, NULL },
1432 /* 214 */ { "Unassigned", opaque, NULL },
1433 /* 215 */ { "Unassigned", opaque, NULL },
1434 /* 216 */ { "Unassigned", opaque, NULL },
1435 /* 217 */ { "Unassigned", opaque, NULL },
1436 /* 218 */ { "Unassigned", opaque, NULL },
1437 /* 219 */ { "Unassigned", opaque, NULL },
1438 /* 220 */ { "Subnet Allocation", opaque, NULL },
1439 /* 221 */ { "Virtual Subnet Selection", opaque, NULL },
1440 /* 222 */ { "Unassigned", opaque, NULL },
1441 /* 223 */ { "Unassigned", opaque, NULL },
1442 /* 224 */ { "Private", opaque, NULL },
1443 /* 225 */ { "Private", opaque, NULL },
1444 /* 226 */ { "Private", opaque, NULL },
1445 /* 227 */ { "Private", opaque, NULL },
1446 /* 228 */ { "Private", opaque, NULL },
1447 /* 229 */ { "Private", opaque, NULL },
1448 /* 230 */ { "Private", opaque, NULL },
1449 /* 231 */ { "Private", opaque, NULL },
1450 /* 232 */ { "Private", opaque, NULL },
1451 /* 233 */ { "Private", opaque, NULL },
1452 /* 234 */ { "Private", opaque, NULL },
1453 /* 235 */ { "Private", opaque, NULL },
1454 /* 236 */ { "Private", opaque, NULL },
1455 /* 237 */ { "Private", opaque, NULL },
1456 /* 238 */ { "Private", opaque, NULL },
1457 /* 239 */ { "Private", opaque, NULL },
1458 /* 240 */ { "Private", opaque, NULL },
1459 /* 241 */ { "Private", opaque, NULL },
1460 /* 242 */ { "Private/Avaya IP Telephone", special, NULL },
1461 /* 243 */ { "Private", opaque, NULL },
1462 /* 244 */ { "Private", opaque, NULL },
1463 /* 245 */ { "Private", opaque, NULL },
1464 /* 246 */ { "Private", opaque, NULL },
1465 /* 247 */ { "Private", opaque, NULL },
1466 /* 248 */ { "Private", opaque, NULL },
1467 /* 249 */ { "Private/Classless Static Route (Microsoft)", special, NULL},
1468 /* 250 */ { "Private", opaque, NULL },
1469 /* 251 */ { "Private", opaque, NULL },
1470 /* 252 */ { "Private/Proxy autodiscovery", string, &hf_bootp_option_private_proxy_autodiscovery },
1471 /* 253 */ { "Private", opaque, NULL },
1472 /* 254 */ { "Private", opaque, NULL },
1473 /* 255 */ { "End", opaque, NULL }
1476 /*-------------------------------------
1478 *-------------------------------------
1480 /* UAT entry structure. */
1484 enum field_type ftype;
1486 } uat_bootp_record_t;
1488 static uat_bootp_record_t *uat_bootp_records = NULL;
1489 static uat_t *bootp_uat = NULL;
1490 static guint num_bootp_records_uat = 0;
1492 static void* uat_bootp_record_copy_cb(void* n, const void* o, size_t siz _U_) {
1493 uat_bootp_record_t* new_record = (uat_bootp_record_t *)n;
1494 const uat_bootp_record_t* old_record = (const uat_bootp_record_t *)o;
1496 if (old_record->text) {
1497 new_record->text = g_strdup(old_record->text);
1499 new_record->text = NULL;
1505 static gboolean uat_bootp_record_update_cb(void* r, char** err) {
1506 uat_bootp_record_t* rec = (uat_bootp_record_t *)r;
1508 if ((rec->opt == 0) || (rec->opt >=BOOTP_OPT_NUM-1)) {
1509 *err = g_strdup_printf("Option must be between 1 and %d", BOOTP_OPT_NUM-2);
1515 static void uat_bootp_record_free_cb(void*r) {
1516 uat_bootp_record_t* rec = (uat_bootp_record_t *)r;
1518 if (rec->text) g_free(rec->text);
1521 UAT_DEC_CB_DEF(uat_bootp_records, opt, uat_bootp_record_t)
1522 UAT_CSTRING_CB_DEF(uat_bootp_records, text, uat_bootp_record_t)
1523 UAT_VS_DEF(uat_bootp_records, ftype, uat_bootp_record_t, enum field_type, special, "string")
1526 static struct opt_info* bootp_get_opt(unsigned int idx)
1528 if(idx>=BOOTP_OPT_NUM)
1531 return &bootp_opt[idx];
1535 bootp_get_opt_text(unsigned int idx)
1537 if(idx>=BOOTP_OPT_NUM)
1539 return bootp_opt[idx].text;
1542 struct basic_types_hfs {
1550 gint* val_u_short_list;
1552 gint* time_in_s_secs;
1553 gint* time_in_u_secs;
1556 /* Handle "basic" datatypes adding to a tree */
1558 bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb,
1559 enum field_type ftype, int offset, int total_len,
1560 gint *hf, struct basic_types_hfs* hf_default)
1564 guint32 time_u_secs;
1570 proto_tree_add_item(tree, *hf, tvb, offset, total_len, ENC_BIG_ENDIAN);
1571 else if (hf_default->bytes != NULL)
1572 proto_tree_add_item(tree, *hf_default->bytes, tvb, offset, total_len, ENC_BIG_ENDIAN);
1573 consumed = total_len;
1577 if (total_len != 4) {
1578 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4");
1583 proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN);
1584 else if (hf_default->ipv4 != NULL)
1585 proto_tree_add_item(tree, *hf_default->ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1590 for (i = offset, left = total_len; left > 0; i += 4, left -= 4) {
1592 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "Option length isn't a multiple of 4");
1597 proto_tree_add_item(tree, *hf, tvb, i, 4, ENC_BIG_ENDIAN);
1598 else if (hf_default->ipv4_list != NULL)
1599 proto_tree_add_item(tree, *hf_default->ipv4_list, tvb, i, 4, ENC_BIG_ENDIAN);
1607 proto_tree_add_item(tree, *hf, tvb, offset, total_len, ENC_BIG_ENDIAN);
1608 else if (hf_default->string != NULL)
1609 proto_tree_add_item(tree, *hf_default->string, tvb, offset, total_len, ENC_BIG_ENDIAN);
1610 consumed = total_len;
1614 if (total_len != 1) {
1615 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 1");
1620 proto_tree_add_item(tree, *hf, tvb, offset, 1, ENC_BIG_ENDIAN);
1621 else if (hf_default->val_boolean != NULL)
1622 proto_tree_add_item(tree, *hf_default->val_boolean, tvb, offset, 1, ENC_BIG_ENDIAN);
1627 if (total_len != 1) {
1628 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 1");
1633 proto_tree_add_item(tree, *hf, tvb, offset, 1, ENC_BIG_ENDIAN);
1634 else if (hf_default->val_u_byte != NULL)
1635 proto_tree_add_item(tree, *hf_default->val_u_byte, tvb, offset, 1, ENC_BIG_ENDIAN);
1640 if (total_len != 2) {
1641 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 2");
1646 proto_tree_add_item(tree, *hf, tvb, offset, 2, ENC_BIG_ENDIAN);
1647 else if (hf_default->val_u_short != NULL)
1648 proto_tree_add_item(tree, *hf_default->val_u_short, tvb, offset, 2, ENC_BIG_ENDIAN);
1652 case val_u_le_short:
1653 if (total_len != 2) {
1654 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 2");
1659 proto_tree_add_item(tree, *hf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1660 else if (hf_default->val_u_short != NULL)
1661 proto_tree_add_item(tree, *hf_default->val_u_short, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1665 case val_u_short_list:
1666 for (i = offset, left = total_len; left > 0; i += 2, left -= 2) {
1668 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "Option length isn't a multiple of 2");
1673 proto_tree_add_item(tree, *hf, tvb, i, 2, ENC_BIG_ENDIAN);
1674 else if (hf_default->val_u_short_list != NULL)
1675 proto_tree_add_item(tree, *hf_default->val_u_short_list, tvb, i, 2, ENC_BIG_ENDIAN);
1681 if (total_len != 4) {
1682 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4");
1687 proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN);
1688 else if (hf_default->val_u_long != NULL)
1689 proto_tree_add_item(tree, *hf_default->val_u_long, tvb, offset, 4, ENC_BIG_ENDIAN);
1693 case time_in_s_secs:
1694 if (total_len != 4) {
1695 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4");
1700 time_s_secs = (gint32) tvb_get_ntohl(tvb, offset);
1701 proto_tree_add_int_format_value(tree, *hf,
1702 tvb, offset, 4, time_s_secs, "(%ds) %s", time_s_secs, signed_time_secs_to_str(wmem_packet_scope(), time_s_secs));
1704 else if (hf_default->time_in_s_secs != NULL)
1705 proto_tree_add_item(tree, *hf_default->time_in_s_secs, tvb, offset, 4, ENC_BIG_ENDIAN);
1710 case time_in_u_secs:
1711 if (total_len != 4) {
1712 expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4");
1717 time_u_secs = tvb_get_ntohl(tvb, offset);
1718 proto_tree_add_uint_format_value(tree, *hf,
1719 tvb, offset, 4, time_u_secs, "(%us) %s", time_u_secs,
1720 ((time_u_secs == 0xffffffff) ? "infinity" : unsigned_time_secs_to_str(wmem_packet_scope(), time_u_secs)));
1722 else if (hf_default->time_in_u_secs != NULL)
1723 proto_tree_add_item(tree, *hf_default->time_in_u_secs, tvb, offset, 4, ENC_BIG_ENDIAN);
1727 /* Ignore other field_types */
1734 /* Returns the number of bytes consumed by this option. */
1736 bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item *bp_item, int voff,
1737 int eoff, gboolean first_pass, gboolean *at_end, const char **dhcp_type_p,
1738 const guint8 **vendor_class_id_p, guint8 *overload_p)
1740 struct opt_info *opt;
1741 enum field_type ftype;
1742 guchar code = tvb_get_guint8(tvb, voff);
1745 int i, consumed, basictype_consumed;
1746 int optoff, optleft, optend;
1748 proto_item *vti, *ti;
1753 int o52voff, o52eoff;
1757 const guchar *dns_name;
1758 gboolean option_handled = TRUE;
1760 struct basic_types_hfs default_hfs = {
1761 &hf_bootp_option_value,
1762 &hf_bootp_option_value_ip_address,
1763 &hf_bootp_option_value_ip_address,
1764 &hf_bootp_option_value_stringz,
1765 &hf_bootp_option_value_boolean,
1766 &hf_bootp_option_value_8,
1767 &hf_bootp_option_value_16,
1768 &hf_bootp_option_value_16,
1769 &hf_bootp_option_value_u32,
1770 &hf_bootp_option_value_i32,
1771 &hf_bootp_option_value_u32
1774 /* Options whose length isn't "optlen + 2". */
1777 case 0: /* Padding */
1778 /* check how much padding we have */
1779 for (i = voff + 1; i < eoff; i++ ) {
1780 if (tvb_get_guint8(tvb, i) != 0) {
1786 if (bp_tree != NULL) {
1787 vti = proto_tree_add_uint_format_value(bp_tree, hf_bootp_option_type,
1788 tvb, voff, 1, 0, "(0) Padding");
1789 v_tree = proto_item_add_subtree(vti, ett_bootp_option);
1790 proto_tree_add_item(v_tree, hf_bootp_option_padding, tvb, voff, i, ENC_NA);
1796 case 255: /* End Option */
1798 if (bp_tree != NULL) {
1799 vti = proto_tree_add_uint_format_value(bp_tree, hf_bootp_option_type,
1800 tvb, voff, 1, 0, "(255) End");
1801 v_tree = proto_item_add_subtree(vti, ett_bootp_option);
1803 proto_tree_add_item(v_tree, hf_bootp_option_end_overload, tvb, voff, 1, ENC_BIG_ENDIAN);
1805 proto_tree_add_item(v_tree, hf_bootp_option_end, tvb, voff, 1, ENC_BIG_ENDIAN);
1814 * Get the length of the option, and the number of bytes it
1815 * consumes (the length doesn't include the option code or
1818 * On the first pass, check first whether we have the length
1819 * byte, so that we don't throw an exception; if we throw an
1820 * exception in the first pass, which is only checking for options
1821 * whose values we need in order to properly dissect the packet
1822 * on the second pass, we won't actually dissect the options, so
1823 * you won't be able to see which option had the problem.
1826 if (!tvb_bytes_exist(tvb, voff+1, 1)) {
1828 * We don't have the length byte; just return 1
1829 * as the number of bytes we consumed, to count
1835 optlen = tvb_get_guint8(tvb, voff+1);
1836 consumed = optlen + 2;
1839 * In the first pass, we don't put anything into the protocol
1840 * tree; we just check for some options we have to look at
1841 * in order to properly process the packet:
1843 * 52 (Overload) - we need this to properly dissect the
1844 * file and sname fields
1846 * 53 (DHCP message type) - if this is present, this is DHCP
1848 * 60 (Vendor class identifier) - we need this in order to
1849 * interpret the vendor-specific info
1851 * We also check, before fetching anything, to make sure we
1852 * have the entire item we're fetching, so that we don't throw
1856 if (tvb_bytes_exist(tvb, voff+2, consumed-2)) {
1860 *overload_p = tvb_get_guint8(tvb, voff+2);
1865 val_to_str(tvb_get_guint8(tvb, voff+2),
1867 "Unknown Message Type (0x%02x)");
1871 *vendor_class_id_p =
1872 tvb_get_ptr(tvb, voff+2, consumed-2);
1875 rfc3396_dns_domain_search_list.total_number_of_block++;
1878 rfc3396_sip_server.total_number_of_block++;
1884 * We don't do anything else here.
1890 opt = bootp_get_opt(code);
1893 /* THIS SHOULD NEVER HAPPEN!!! */
1897 /* function type may be overridden and that shouldn't be a 'saved' change */
1902 vti = proto_tree_add_uint_format_value(bp_tree, hf_bootp_option_type,
1903 tvb, voff, consumed, code, "(%d) %s", code, opt->text);
1904 v_tree = proto_item_add_subtree(vti, ett_bootp_option);
1905 proto_tree_add_item(v_tree, hf_bootp_option_length, tvb, voff+1, 1, ENC_BIG_ENDIAN);
1907 ti = proto_tree_add_item(v_tree, hf_bootp_option_value, tvb, voff+2, optlen, ENC_NA);
1908 PROTO_ITEM_SET_HIDDEN(ti);
1913 case 21: /* Policy Filter */
1914 for (i = optoff, optleft = optlen;
1915 optleft > 0; i += 8, optleft -= 8) {
1917 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 8");
1921 proto_tree_add_item(v_tree, hf_bootp_option_policy_filter_ip, tvb, i, 4, ENC_BIG_ENDIAN);
1922 proto_tree_add_item(v_tree, hf_bootp_option_policy_filter_subnet_mask, tvb, i+4, 4, ENC_BIG_ENDIAN);
1926 case 33: /* Static Route */
1927 for (i = optoff, optleft = optlen;
1928 optleft > 0; i += 8, optleft -= 8) {
1930 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 8");
1934 proto_tree_add_item(v_tree, hf_bootp_option_static_route_ip, tvb, i, 4, ENC_BIG_ENDIAN);
1935 proto_tree_add_item(v_tree, hf_bootp_option_static_route_router, tvb, i+4, 4, ENC_BIG_ENDIAN);
1939 case 43: /* Vendor-Specific Info */
1940 s_option = tvb_get_guint8(tvb, optoff);
1942 /* PXE protocol 2.1 as described in the Intel specs */
1943 if (*vendor_class_id_p != NULL &&
1944 strncmp((const gchar*)*vendor_class_id_p, "PXEClient", strlen("PXEClient")) == 0) {
1945 proto_item_append_text(vti, " (PXEClient)");
1946 v_tree = proto_item_add_subtree(vti, ett_bootp_option);
1948 optend = optoff + optlen;
1949 while (optoff < optend) {
1950 optoff = dissect_vendor_pxeclient_suboption(pinfo, vti, v_tree,
1951 tvb, optoff, optend);
1953 } else if (*vendor_class_id_p != NULL &&
1954 ((strncmp((const gchar*)*vendor_class_id_p, "pktc", strlen("pktc")) == 0) ||
1955 (strncmp((const gchar*)*vendor_class_id_p, "docsis", strlen("docsis")) == 0) ||
1956 (strncmp((const gchar*)*vendor_class_id_p, "OpenCable2.0", strlen("OpenCable2.0")) == 0) ||
1957 (strncmp((const gchar*)*vendor_class_id_p, "CableHome", strlen("CableHome")) == 0))) {
1958 /* CableLabs standard - see www.cablelabs.com/projects */
1959 proto_item_append_text(vti, " (CableLabs)");
1961 optend = optoff + optlen;
1962 while (optoff < optend) {
1963 optoff = dissect_vendor_cablelabs_suboption(pinfo, vti, v_tree,
1964 tvb, optoff, optend);
1966 } else if (*vendor_class_id_p != NULL &&
1967 ((strncmp((const gchar*)*vendor_class_id_p, "ArubaAP", strlen("ArubaAP")) == 0) )) {
1969 proto_item_append_text(vti, " (Aruba AP)");
1970 proto_tree_add_item(v_tree, hf_bootp_option43_arubaap_controllerip, tvb, optoff, optlen, ENC_ASCII|ENC_NA);
1971 } else if (*vendor_class_id_p != NULL &&
1972 ((strncmp((const gchar*)*vendor_class_id_p, "ArubaInstantAP", strlen("ArubaInstantAP")) == 0) )) {
1973 gint32 nameorglen, ampiplen;
1974 /* Aruba Instant AP */
1975 proto_item_append_text(vti, " (Aruba Instant AP)");
1976 vti = proto_tree_add_item(v_tree, hf_bootp_option43_arubaiap, tvb, optoff, optlen, ENC_ASCII|ENC_NA);
1977 v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption);
1978 nameorglen = tvb_find_guint8(tvb, optoff, optlen, ',') - optoff;
1979 proto_tree_add_item(v_tree, hf_bootp_option43_arubaiap_nameorg, tvb, optoff, nameorglen, ENC_ASCII|ENC_NA);
1980 ampiplen = tvb_find_guint8(tvb, optoff+nameorglen+1, optlen-nameorglen-1, ',') - (optoff+nameorglen+1);
1981 proto_tree_add_item(v_tree, hf_bootp_option43_arubaiap_ampip, tvb, optoff+nameorglen+1, ampiplen, ENC_ASCII|ENC_NA);
1982 proto_tree_add_item(v_tree, hf_bootp_option43_arubaiap_password, tvb, optoff+nameorglen+1+ampiplen+1, optlen-(nameorglen+1+ampiplen+1), ENC_ASCII|ENC_NA);
1983 } else if (*vendor_class_id_p != NULL &&
1984 ((strncmp((const gchar*)*vendor_class_id_p, PACKETCABLE_BSDP, strlen(PACKETCABLE_BSDP)) == 0) )) {
1986 proto_item_append_text(vti, " (Boot Server Discovery Protocol (BSDP))");
1988 optend = optoff + optlen;
1989 while (optoff < optend) {
1990 optoff = dissect_vendor_bsdp_suboption(pinfo, vti, v_tree,
1991 tvb, optoff, optend);
1993 } else if ((s_option==58 || s_option==64 || s_option==65
1994 || s_option==66 || s_option==67)
1995 && test_encapsulated_vendor_options(tvb, optoff, optoff+optlen)) {
1996 /* Note that this is a rather weak (permissive) heuristic, */
1997 /* but since it comes last, I guess this is OK. */
1998 /* Add any stronger (less permissive) heuristics before this! */
1999 /* Alcatel-Lucent DHCP Extensions */
2000 proto_item_append_text(vti, " (Alcatel-Lucent)");
2001 optend = optoff + optlen;
2002 while (optoff < optend) {
2003 optoff = dissect_vendor_alcatel_suboption(pinfo, vti, v_tree,
2004 tvb, optoff, optend);
2007 /* Default Vendor-Specific Info.. display in bytes */
2008 proto_tree_add_item(v_tree, hf_bootp_option43_value, tvb, optoff, optlen, ENC_NA);
2012 case 52: /* Option Overload */
2014 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 1");
2018 byte = tvb_get_guint8(tvb, optoff);
2019 proto_tree_add_item(v_tree, *opt->phf, tvb, optoff, 1, ENC_BIG_ENDIAN);
2021 /* Just in case we find an option 52 in sname or file */
2022 if (voff > VENDOR_INFO_OFFSET && byte >= 1 && byte <= 3) {
2023 if (byte & OPT_OVERLOAD_FILE) {
2025 proto_tree_add_subtree(bp_tree, tvb,
2026 FILE_NAME_OFFSET, FILE_NAME_LEN, ett_bootp_filename_option, &oti,
2027 "Boot file name option overload");
2028 o52voff = FILE_NAME_OFFSET;
2029 o52eoff = FILE_NAME_OFFSET + FILE_NAME_LEN;
2031 rfc3396_dns_domain_search_list.index_current_block = 0;
2032 rfc3396_sip_server.index_current_block = 0;
2033 while (o52voff < o52eoff && !o52at_end) {
2034 o52voff += bootp_option(tvb, pinfo, bp_tree, bp_item, o52voff,
2035 o52eoff, FALSE, &o52at_end,
2036 dhcp_type_p, vendor_class_id_p,
2041 expert_add_info(pinfo, oti, &hf_bootp_opt_overload_file_end_missing);
2044 if (byte & OPT_OVERLOAD_SNAME) {
2046 proto_tree_add_subtree(bp_tree, tvb,
2047 SERVER_NAME_OFFSET, SERVER_NAME_LEN, ett_bootp_server_hostname, &oti,
2048 "Server host name option overload");
2049 o52voff = SERVER_NAME_OFFSET;
2050 o52eoff = SERVER_NAME_OFFSET + SERVER_NAME_LEN;
2052 rfc3396_dns_domain_search_list.index_current_block = 0;
2053 rfc3396_sip_server.index_current_block = 0;
2054 while (o52voff < o52eoff && !o52at_end) {
2055 o52voff += bootp_option(tvb, pinfo, bp_tree, bp_item, o52voff,
2056 o52eoff, FALSE, &o52at_end,
2057 dhcp_type_p, vendor_class_id_p,
2062 expert_add_info(pinfo, oti, &hf_bootp_opt_overload_sname_end_missing);
2065 /* The final end option is not in overload */
2071 /* Show the message type name on the Message Type option, and in the protocol root */
2072 proto_item_append_text(vti, " (%s)", val_to_str(tvb_get_guint8(tvb, voff+2),
2074 "Unknown Message Type (0x%02x)"));
2075 proto_item_append_text(bp_item, " (%s)", val_to_str(tvb_get_guint8(tvb, voff+2),
2077 "Unknown Message Type (0x%02x)"));
2080 case 55: /* Parameter Request List */
2081 for (i = 0; i < optlen; i++) {
2082 byte = tvb_get_guint8(tvb, optoff+i);
2083 proto_tree_add_uint_format_value(v_tree, hf_bootp_option_parameter_request_list_item,
2084 tvb, optoff+i, 1, byte, "(%d) %s", byte, bootp_get_opt_text(byte));
2088 case 60: /* Vendor class identifier */
2090 * XXX - RFC 2132 says this is a string of octets;
2091 * should we check for non-printables?
2094 proto_tree_add_item(v_tree, hf_bootp_option_vendor_class_id, tvb, optoff, consumed-2, ENC_ASCII|ENC_NA);
2095 if ((tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_MTA_CAP10,
2096 (int)strlen(PACKETCABLE_MTA_CAP10)) == 0)
2098 (tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_MTA_CAP15,
2099 (int)strlen(PACKETCABLE_MTA_CAP15)) == 0)
2101 (tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_MTA_CAP20,
2102 (int)strlen(PACKETCABLE_MTA_CAP20)) == 0))
2104 dissect_packetcable_mta_cap(v_tree, pinfo, tvb, optoff, optlen);
2106 if ((tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_CM_CAP11,
2107 (int)strlen(PACKETCABLE_CM_CAP11)) == 0)
2109 (tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_CM_CAP20,
2110 (int)strlen(PACKETCABLE_CM_CAP20)) == 0 ))
2112 dissect_docsis_cm_cap(v_tree, tvb, optoff, optlen, FALSE);
2114 if (tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_CM_CAP30,
2115 (int)strlen(PACKETCABLE_CM_CAP30)) == 0 )
2117 proto_tree_add_item(v_tree, hf_bootp_option_vendor_class_data, tvb, optoff, optlen, ENC_ASCII|ENC_NA);
2119 if (tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_BSDPD,
2120 (int)strlen(PACKETCABLE_BSDPD)) == 0 )
2122 proto_tree_add_item(v_tree, hf_bootp_option_vendor_class_data, tvb, optoff+(int)strlen(PACKETCABLE_BSDPD), optlen-(int)strlen(PACKETCABLE_BSDPD), ENC_ASCII|ENC_NA);
2126 case 61: /* Client Identifier */
2128 byte = tvb_get_guint8(tvb, optoff);
2132 /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll
2133 guess that the first is the hwtype, and the last 6
2135 /* See http://www.iana.org/assignments/arp-parameters */
2136 /* RFC2132 9.14 Client-identifier has the following to say:
2137 A hardware type of 0 (zero) should be used when the value
2138 field contains an identifier other than a hardware address
2139 (e.g. a fully qualified domain name). */
2141 if (optlen == 7 && byte > 0 && byte < 48) {
2142 proto_tree_add_item(v_tree,
2143 hf_bootp_hw_type, tvb, optoff, 1,
2146 if (byte == ARPHRD_ETHER || byte == ARPHRD_IEEE802)
2147 proto_tree_add_item(v_tree,
2148 hf_bootp_hw_ether_addr, tvb, optoff+1, 6,
2151 proto_tree_add_string(v_tree, hf_bootp_client_hardware_address, tvb, optoff+1, 6,
2152 tvb_arphrdaddr_to_str(tvb, optoff+1, 6, byte));
2153 } else if (optlen == 17 && byte == 0) {
2154 /* Identifier is a UUID */
2155 proto_tree_add_item(v_tree, hf_bootp_client_identifier_uuid, tvb, optoff + 1, 16, bootp_uuid_endian);
2157 /* From RFC 4361 paragraph 6.1 DHCPv4 Client Behavior:
2158 To send an RFC 3315-style binding identifier in a DHCPv4 'client
2159 identifier' option, the type of the 'client identifier' option is set
2161 } else if (byte == 255) {
2165 /* The type field is immediately followed by the IAID, which is
2166 an opaque 32-bit quantity */
2167 proto_tree_add_string(v_tree, hf_bootp_client_id_iaid, tvb, optoff+1, 4,
2168 tvb_arphrdaddr_to_str(tvb, optoff+1, 4, byte));
2169 optoff = optoff + 5;
2170 duidtype = tvb_get_ntohs(tvb, optoff);
2171 proto_tree_add_item(v_tree, hf_bootp_client_id_duid_type, tvb, optoff, 2, ENC_BIG_ENDIAN);
2175 expert_add_info(pinfo, vti, &ei_bootp_mal_duid);
2178 hwtype=tvb_get_ntohs(tvb, optoff + 2);
2179 proto_tree_add_item(v_tree, hf_bootp_client_identifier_duid_llt_hw_type,
2180 tvb, optoff + 2, 2, ENC_BIG_ENDIAN);
2182 /* XXX seconds since Jan 1 2000 */
2183 proto_tree_add_item(v_tree, hf_bootp_client_identifier_time, tvb, optoff + 4, 4, ENC_BIG_ENDIAN);
2185 proto_tree_add_string(v_tree, hf_bootp_client_identifier_link_layer_address, tvb, optoff + 8,
2186 optlen - 13, tvb_arphrdaddr_to_str(tvb, optoff+8, optlen-13, hwtype));
2191 expert_add_info(pinfo, vti, &ei_bootp_mal_duid);
2194 proto_tree_add_item(v_tree, hf_bootp_client_identifier_enterprise_num, tvb, optoff + 2, 4, ENC_BIG_ENDIAN);
2196 proto_tree_add_item(v_tree, hf_bootp_client_identifier, tvb, optoff + 6, optlen - 11, ENC_NA);
2201 expert_add_info(pinfo, vti, &ei_bootp_mal_duid);
2204 hwtype=tvb_get_ntohs(tvb, optoff + 2);
2205 proto_tree_add_item(v_tree, hf_bootp_client_identifier_duid_ll_hw_type,
2206 tvb, optoff + 2, 2, ENC_BIG_ENDIAN);
2209 proto_tree_add_string(v_tree, hf_bootp_client_identifier_link_layer_address, tvb, optoff + 4,
2210 optlen - 9, tvb_arphrdaddr_to_str(tvb, optoff+4, optlen-9, hwtype));
2214 } else if (byte == 0 && optlen > 1) {
2215 /* identifier other than a hardware address (e.g. a fully qualified domain name) */
2216 proto_tree_add_item(v_tree, hf_bootp_client_identifier_type, tvb, optoff, 1, ENC_NA);
2217 proto_tree_add_item(v_tree, hf_bootp_client_identifier_undef, tvb, optoff+1, optlen-1, ENC_ASCII|ENC_NA);
2219 /* otherwise, it's opaque data */
2222 case 77: { /* User Class Information RFC 3004 */
2223 guchar user_class_instance_index;
2225 proto_tree *o77_v_tree;
2227 expert_add_info_format(pinfo, v_tree, &ei_bootp_bad_length, "length isn't >= 2");
2231 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++) {
2232 /* Create subtree for instance of User Class. */
2233 vtix = proto_tree_add_uint_format_value(v_tree, hf_bootp_option77_user_class,
2234 tvb, optoff + i, byte + 1, user_class_instance_index, "[%d]", user_class_instance_index);
2235 o77_v_tree = proto_item_add_subtree(vtix, ett_bootp_option77_instance);
2237 /* Add length for instance of User Class. */
2238 proto_tree_add_item(o77_v_tree, hf_bootp_option77_user_class_length,
2239 tvb, optoff + i, 1, ENC_BIG_ENDIAN);
2242 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);
2245 optleft -= byte + 1;
2247 expert_add_info(pinfo, vtix, &ei_bootp_option77_user_class_malformed);
2251 /* Add data for instance of User Class. */
2252 proto_tree_add_item(o77_v_tree, hf_bootp_option77_user_class_data,
2253 tvb, optoff + i + 1, byte, ENC_NA);
2255 /* Slide to next instance of User Class if any. */
2260 case 97: /* Client Identifier (UUID) */
2262 byte = tvb_get_guint8(tvb, optoff);
2266 /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll
2267 guess that the first is the hwtype, and the last 6
2269 /* See http://www.iana.org/assignments/arp-parameters */
2270 /* RFC2132 9.14 Client-identifier has the following to say:
2271 A hardware type of 0 (zero) should be used when the value
2272 field contains an identifier other than a hardware address
2273 (e.g. a fully qualified domain name). */
2275 if (optlen == 7 && byte > 0 && byte < 48) {
2276 proto_tree_add_item(v_tree,
2277 hf_bootp_hw_type, tvb, optoff, 1,
2279 if (byte == ARPHRD_ETHER || byte == ARPHRD_IEEE802)
2280 proto_tree_add_item(v_tree,
2281 hf_bootp_hw_ether_addr, tvb, optoff+1, 6,
2284 proto_tree_add_string(v_tree, hf_bootp_client_hardware_address, tvb, optoff+1, 6,
2285 tvb_arphrdaddr_to_str(tvb, optoff+1, 6, byte));
2286 } else if (optlen == 17 && byte == 0) {
2287 /* Identifier is a UUID */
2288 proto_tree_add_item(v_tree, hf_bootp_client_identifier_uuid, tvb, optoff + 1, 16, bootp_uuid_endian);
2290 /* otherwise, it's opaque data */
2294 case 63: /* NetWare/IP options (RFC 2242) */
2296 optend = optoff + optlen;
2297 while (optoff < optend)
2298 optoff = dissect_netware_ip_suboption(pinfo, vti, v_tree, tvb, optoff, optend);
2301 case 78: /* SLP Directory Agent Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/
2303 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 1");
2307 byte = tvb_get_guint8(tvb, optoff);
2308 proto_tree_add_item(v_tree, hf_bootp_option_slp_directory_agent_value, tvb, optoff, 1, ENC_BIG_ENDIAN);
2318 for (i = optoff; optleft > 0; i += 4, optleft -= 4) {
2320 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4");
2324 proto_tree_add_item(v_tree, hf_bootp_option_slp_directory_agent_slpda_address, tvb, i, 4, ENC_BIG_ENDIAN);
2328 case 79: /* SLP Service Scope Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/
2329 proto_tree_add_item(v_tree, hf_bootp_option_slp_service_scope_value, tvb, optoff, 1, ENC_BIG_ENDIAN);
2332 optleft = optlen - 1;
2333 proto_tree_add_item(v_tree, hf_bootp_option_slp_service_scope_string, tvb, optoff, optleft, ENC_ASCII|ENC_NA);
2336 case 81: /* Client Fully Qualified Domain Name */
2338 static const int * fqdn_hf_flags[] = {
2348 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3");
2352 fqdn_flags = tvb_get_guint8(tvb, optoff);
2353 proto_tree_add_bitmask(v_tree, tvb, optoff, hf_bootp_fqdn_flags,
2354 ett_bootp_fqdn_flags, fqdn_hf_flags, ENC_BIG_ENDIAN);
2356 /* XXX: use code from packet-dns for return code decoding */
2357 proto_tree_add_item(v_tree, hf_bootp_fqdn_rcode1, tvb, optoff+1, 1, ENC_BIG_ENDIAN);
2358 /* XXX: use code from packet-dns for return code decoding */
2359 proto_tree_add_item(v_tree, hf_bootp_fqdn_rcode2, tvb, optoff+2, 1, ENC_BIG_ENDIAN);
2361 if (fqdn_flags & F_FQDN_E) {
2362 get_dns_name(tvb, optoff+3, optlen-3, optoff+3, &dns_name);
2363 proto_tree_add_string(v_tree, hf_bootp_fqdn_name,
2364 tvb, optoff+3, optlen-3, dns_name);
2366 proto_tree_add_item(v_tree, hf_bootp_fqdn_asciiname,
2367 tvb, optoff+3, optlen-3, ENC_ASCII|ENC_NA);
2373 case 82: /* Relay Agent Information Option */
2374 optend = optoff + optlen;
2375 while (optoff < optend)
2376 optoff = bootp_dhcp_decode_agent_info(pinfo, vti, v_tree, tvb, optoff, optend);
2379 case 83: /* iSNS Option (RFC 4174) */
2380 optoff = dissect_isns(pinfo, vti, v_tree, tvb, optoff, optlen);
2383 case 85: /* Novell Servers (RFC 2241) */
2384 /* Option 85 can be sent as a string */
2385 /* Added by Greg Morris (gmorris[AT]novell.com) */
2386 if (novell_string) {
2387 proto_tree_add_item(v_tree, hf_bootp_option_novell_dss_string, tvb, optoff, optlen, ENC_ASCII|ENC_NA);
2390 for (i = optoff, optleft = optlen; optleft > 0;
2391 i += 4, optleft -= 4) {
2393 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4");
2397 proto_tree_add_item(v_tree, hf_bootp_option_novell_dss_ip, tvb, i, 4, ENC_BIG_ENDIAN);
2402 case 94: { /* Client network interface identifier */
2405 id_type = tvb_get_guint8(tvb, optoff);
2407 if (id_type == 0x01) {
2408 proto_tree_add_item(v_tree, hf_bootp_option_client_network_id_major_ver,
2409 tvb, optoff + 1, 1, ENC_LITTLE_ENDIAN);
2410 proto_tree_add_item(v_tree, hf_bootp_option_client_network_id_minor_ver,
2411 tvb, optoff + 2, 1, ENC_LITTLE_ENDIAN);
2417 case 90: /* DHCP Authentication */
2419 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 11");
2423 protocol = tvb_get_guint8(tvb, optoff);
2425 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_protocol, tvb, optoff, 1, ENC_BIG_ENDIAN);
2429 algorithm = tvb_get_guint8(tvb, optoff);
2432 case AUTHEN_PROTO_DELAYED_AUTHEN:
2433 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_alg_delay, tvb, optoff, 1, ENC_BIG_ENDIAN);
2437 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_algorithm, tvb, optoff, 1, ENC_BIG_ENDIAN);
2443 rdm = tvb_get_guint8(tvb, optoff);
2444 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_rdm, tvb, optoff, 1, ENC_BIG_ENDIAN);
2450 case AUTHEN_RDM_MONOTONIC_COUNTER:
2451 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_rdm_replay_detection, tvb, optoff, 8, ENC_BIG_ENDIAN);
2455 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_rdm_rdv, tvb, optoff, 8, ENC_ASCII|ENC_NA);
2463 case AUTHEN_PROTO_DELAYED_AUTHEN:
2464 switch (algorithm) {
2466 case AUTHEN_DELAYED_ALGO_HMAC_MD5:
2467 if (*dhcp_type_p && !strcmp(*dhcp_type_p, OPT53_DISCOVER)) {
2468 /* Discover has no Secret ID nor HMAC MD5 Hash */
2472 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 31");
2476 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_secret_id, tvb, optoff, 4, ENC_BIG_ENDIAN);
2479 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_hmac_md5_hash, tvb, optoff, 16, ENC_ASCII|ENC_NA);
2487 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_information, tvb, optoff, optleft, ENC_ASCII|ENC_NA);
2496 proto_tree_add_item(v_tree, hf_bootp_option_dhcp_authentication_information, tvb, optoff, optleft, ENC_ASCII|ENC_NA);
2501 case 99: /* civic location (RFC 4776) */
2506 proto_tree_add_item(v_tree, hf_bootp_option_civic_location_what, tvb, optoff, 1, ENC_BIG_ENDIAN);
2507 proto_tree_add_item(v_tree, hf_bootp_option_civic_location_country, tvb, optoff+1, 2, ENC_ASCII|ENC_NA);
2508 optleft = optleft - 3;
2509 optoff = optoff + 3;
2511 while (optleft >= 2)
2513 int calength = tvb_get_guint8(tvb, optoff+1);
2514 proto_tree_add_item(v_tree, hf_bootp_option_civic_location_ca_type, tvb, optoff, 1, ENC_BIG_ENDIAN);
2515 proto_tree_add_item(v_tree, hf_bootp_option_civic_location_ca_length, tvb, optoff+1, 1, ENC_BIG_ENDIAN);
2523 if (optleft >= calength)
2525 proto_tree_add_item(v_tree, hf_bootp_option_civic_location_ca_value, tvb, optoff, calength, ENC_ASCII|ENC_NA);
2527 optoff = optoff + calength;
2528 optleft = optleft - calength;
2533 expert_add_info(pinfo, vti, &ei_bootp_option_civic_location_bad_cattype);
2539 case 117: /* The Name Service Search Option for DHCP (RFC 2937) */
2541 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 2");
2542 } else if (optlen & 1) {
2543 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length (%u) isn't even number", optlen);
2546 for (i = 0, ns = tvb_get_ntohs(tvb, optoff); i < optlen; i += 2, ns = tvb_get_ntohs(tvb, optoff + i)) {
2548 case RFC2937_LOCAL_NAMING_INFORMATION:
2549 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)");
2551 case RFC2937_DOMAIN_NAME_SERVER_OPTION:
2552 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_name_service_search_option, tvb, optoff + i, 2, "Domain Name Server Option (6)");
2554 case RFC2937_NETWORK_INFORMATION_SERVERS_OPTION:
2555 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_name_service_search_option, tvb, optoff + i, 2, "Network Information Servers Option (41)");
2557 case RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION:
2558 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)");
2560 case RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION:
2561 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_name_service_search_option, tvb, optoff + i, 2, "Network Information Service+ Servers Option (65)");
2564 expert_add_info_format(pinfo, vti, &ei_bootp_option_dhcp_name_service_invalid,
2565 "Invalid Name Service (%u). RFC 2937 defines only 0, 6, 41, 44, and 65 as possible values.", ns);
2572 case 119: { /* Dynamic Host Configuration Protocol (DHCP) Domain Search Option (RFC 3397) */
2573 /* Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4) (RFC 3396) */
2574 /* Domain Names - Implementation And Specification (RFC 1035) */
2575 char tmpChar[BOOTP_MAX_NO_CHAR];
2576 rfc3396_dns_domain_search_list.index_current_block++;
2577 if (rfc3396_dns_domain_search_list.total_number_of_block > 1) {
2578 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);
2579 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_dns_domain_search_list_rfc_3396_detected, tvb, optoff, optlen, tmpChar);
2580 if (rfc3396_dns_domain_search_list.index_current_block != rfc3396_dns_domain_search_list.total_number_of_block) {
2581 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);
2582 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_dns_domain_search_list_refer_last_option, tvb, optoff, optlen, tmpChar);
2586 if (rfc3396_dns_domain_search_list.tvb_composite == NULL && optlen) {
2587 /* We use composite tvb for managing RFC 3396 */
2588 rfc3396_dns_domain_search_list.tvb_composite = tvb_new_composite();
2591 /* Concatenate the block before being interpreted for managing RFC 3396 */
2593 tvb_composite_append(rfc3396_dns_domain_search_list.tvb_composite, tvb_new_subset_length(tvb, optoff, optlen));
2595 if (rfc3396_dns_domain_search_list.index_current_block == rfc3396_dns_domain_search_list.total_number_of_block
2596 && rfc3396_dns_domain_search_list.tvb_composite) {
2597 /* Here, we are into the last (or unique) option 119. */
2598 /* We will display the information about fqdn */
2599 unsigned int consumedx = 0;
2600 unsigned int offset = 0;
2601 tvb_composite_finalize(rfc3396_dns_domain_search_list.tvb_composite);
2603 while (offset < tvb_reported_length(rfc3396_dns_domain_search_list.tvb_composite)) {
2604 /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */
2605 consumedx = get_dns_name(rfc3396_dns_domain_search_list.tvb_composite, offset, tvb_reported_length(rfc3396_dns_domain_search_list.tvb_composite), 0, &dns_name);
2606 if (rfc3396_dns_domain_search_list.total_number_of_block == 1) {
2607 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2608 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_dns_domain_search_list_fqdn, tvb, optoff + offset, consumedx, dns_name);
2610 /* RFC 3396 is used, so the option is split into several option 119. We don't link fqdn with v_tree. */
2611 proto_tree_add_string(v_tree, hf_bootp_option_dhcp_dns_domain_search_list_fqdn, tvb, 0, 0, dns_name);
2613 offset += consumedx;
2615 rfc3396_dns_domain_search_list.tvb_composite = NULL;
2619 case 120: { /* SIP Servers (RFC 3361) */
2620 /* Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4) (RFC 3396) */
2621 /* Domain Names - Implementation And Specification (RFC 1035) */
2622 char tmpChar[BOOTP_MAX_NO_CHAR];
2623 rfc3396_sip_server.index_current_block++;
2624 if (rfc3396_sip_server.total_number_of_block > 1) {
2625 g_snprintf(tmpChar, BOOTP_MAX_NO_CHAR, "%u/%u", rfc3396_sip_server.index_current_block, rfc3396_sip_server.total_number_of_block);
2626 proto_tree_add_string(v_tree, hf_bootp_option_sip_server_rfc_3396_detected, tvb, optoff, optlen, tmpChar);
2627 if (rfc3396_sip_server.index_current_block != rfc3396_sip_server.total_number_of_block) {
2628 g_snprintf(tmpChar, BOOTP_MAX_NO_CHAR, "%u/%u", rfc3396_sip_server.total_number_of_block, rfc3396_sip_server.total_number_of_block);
2629 proto_tree_add_string(v_tree, hf_bootp_option_sip_server_refer_last_option, tvb, optoff, optlen, tmpChar);
2633 if (rfc3396_sip_server.tvb_composite == NULL && optlen) {
2634 /* We use composite tvb for managing RFC 3396 */
2635 rfc3396_sip_server.tvb_composite = tvb_new_composite();
2638 /* Concatenate the block before being interpreted for managing RFC 3396 */
2640 tvb_composite_append(rfc3396_sip_server.tvb_composite, tvb_new_subset_length(tvb, optoff, optlen));
2642 if (rfc3396_sip_server.index_current_block == rfc3396_sip_server.total_number_of_block
2643 && rfc3396_sip_server.tvb_composite) {
2644 /* Here, we are into the last (or unique) option 120. */
2645 /* We will display the information about SIP server */
2647 unsigned int offset = 1; /* ignore enc */
2648 tvb_composite_finalize(rfc3396_sip_server.tvb_composite);
2650 enc = tvb_get_guint8(rfc3396_sip_server.tvb_composite, 0);
2651 if (rfc3396_sip_server.total_number_of_block == 1) {
2652 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2653 proto_tree_add_uint(v_tree, hf_bootp_option_sip_server_enc, tvb, optoff, 1, enc);
2655 /* RFC 3396 is used, so the option is split into several option 120. We don't link fqdn with v_tree. */
2656 proto_tree_add_uint(v_tree, hf_bootp_option_sip_server_enc, tvb, 0, 0, enc);
2660 case RFC_3361_ENC_FQDN: {
2661 unsigned int consumedx = 0;
2662 if (tvb_reported_length(rfc3396_sip_server.tvb_composite) < 3) {
2663 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3 (len = %u)", tvb_reported_length(rfc3396_sip_server.tvb_composite));
2667 while (offset < tvb_reported_length(rfc3396_sip_server.tvb_composite)) {
2668 /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */
2669 consumedx = get_dns_name(rfc3396_sip_server.tvb_composite, offset, tvb_reported_length(rfc3396_sip_server.tvb_composite), 1 /* ignore enc */, &dns_name);
2671 if (rfc3396_sip_server.total_number_of_block == 1) {
2672 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2673 proto_tree_add_string(v_tree, hf_bootp_option_sip_server_name, tvb, optoff + offset, consumedx, dns_name);
2675 /* RFC 3396 is used, so the option is split into several option 120. We don't link fqdn with v_tree. */
2676 proto_tree_add_string(v_tree, hf_bootp_option_sip_server_name, tvb, 0, 0, dns_name);
2678 offset += consumedx;
2680 rfc3396_sip_server.tvb_composite = NULL;
2683 case RFC_3361_ENC_IPADDR:
2684 if (tvb_reported_length(rfc3396_sip_server.tvb_composite) < 5) {
2685 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5 (len = %u)", tvb_reported_length(rfc3396_sip_server.tvb_composite));
2688 /* x % 2^n == x & (2^n - 1) note : (assuming x is a positive integer) */
2689 if ((tvb_reported_length(rfc3396_sip_server.tvb_composite) - 1) & 3) {
2690 if (rfc3396_sip_server.total_number_of_block == 1)
2691 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", tvb_reported_length(rfc3396_sip_server.tvb_composite));
2693 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length,
2694 "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.",
2695 tvb_reported_length(rfc3396_sip_server.tvb_composite));
2698 while (offset < tvb_reported_length(rfc3396_sip_server.tvb_composite)) {
2699 if (rfc3396_sip_server.total_number_of_block == 1) {
2700 /* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
2701 proto_tree_add_item(v_tree, hf_bootp_option_sip_server_address, rfc3396_sip_server.tvb_composite, offset, 4, ENC_BIG_ENDIAN);
2703 /* RFC 3396 is used, so the option is split into several option 120. We don't link fqdn with v_tree. */
2704 /* Since we don't use the "numbered argument" as described by README.developer, we have to repeat the arguments :( */
2705 g_snprintf(tmpChar, BOOTP_MAX_NO_CHAR, "%u.%u.%u.%u (%u.%u.%u.%u)",
2706 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset),
2707 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset + 1),
2708 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset + 2),
2709 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset + 3),
2710 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset),
2711 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset + 1),
2712 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset + 2),
2713 tvb_get_guint8(rfc3396_sip_server.tvb_composite, offset + 3)
2715 proto_tree_add_string(v_tree, hf_bootp_option_sip_server_address_stringz, tvb, 0, 0, tmpChar);
2721 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);
2727 case 121: /* Classless Static Route */
2728 case 249: { /* Classless Static Route (Microsoft) */
2729 int mask_width, significant_octets;
2730 optend = optoff + optlen;
2731 /* minimum length is 5 bytes */
2733 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5");
2736 while (optoff < optend) {
2737 mask_width = tvb_get_guint8(tvb, optoff);
2738 /* mask_width <= 32 */
2739 if (mask_width > 32) {
2740 expert_add_info_format(pinfo, vti, &ei_bootp_option_classless_static_route, "Mask width (%d) > 32", mask_width);
2743 significant_octets = (mask_width + 7) / 8;
2744 vti = proto_tree_add_bytes_format(v_tree, hf_bootp_option_classless_static_route, tvb, optoff,
2745 1 + significant_octets + 4, NULL,
2748 /* significant octets + router(4) */
2749 if (optend < optoff + significant_octets + 4) {
2750 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Remaining length (%d) < %d bytes", optend - optoff, significant_octets + 4);
2754 proto_item_append_text(vti, "default");
2756 for(i = 0 ; i < significant_octets ; i++) {
2758 proto_item_append_text(vti, ".");
2759 byte = tvb_get_guint8(tvb, optoff++);
2760 proto_item_append_text(vti, "%d", byte);
2762 for(i = significant_octets ; i < 4 ; i++)
2763 proto_item_append_text(vti, ".0");
2764 proto_item_append_text(vti, "/%d", mask_width);
2766 proto_item_append_text(vti, "-%s", tvb_ip_to_str(tvb, optoff));
2772 case 123: /* coordinate based location RFC 3825 or CableLabs DSS_ID */
2775 unsigned char lci[16];
2776 struct rfc3825_location_fixpoint_t location_fp;
2777 struct rfc3825_location_decimal_t location;
2779 for (c=0; c < 16;c++)
2780 lci[c] = (unsigned char) tvb_get_guint8(tvb, optoff + c);
2782 /* convert lci encoding into fixpoint location */
2783 rfc3825_lci_to_fixpoint(lci, &location_fp);
2785 /* convert location from decimal to fixpoint */
2786 i = rfc3825_fixpoint_to_decimal(&location_fp, &location);
2788 if (i != RFC3825_NOERROR) {
2789 ti = proto_tree_add_uint(v_tree, hf_bootp_option_rfc3825_error, tvb, optoff, 1, i);
2790 proto_item_set_len(ti, optlen);
2792 proto_tree_add_double_format_value(v_tree, hf_bootp_option_rfc3825_latitude, tvb, optoff, 5, location.latitude, "%15.10f", location.latitude);
2793 proto_tree_add_double_format_value(v_tree, hf_bootp_option_rfc3825_longitude, tvb, optoff+5, 5, location.longitude, "%15.10f", location.longitude);
2794 proto_tree_add_double_format_value(v_tree, hf_bootp_option_rfc3825_latitude_res, tvb, optoff, 1, location.latitude_res, "%15.10f", location.latitude_res);
2795 proto_tree_add_double_format_value(v_tree, hf_bootp_option_rfc3825_longitude_res, tvb, optoff+5, 1, location.longitude_res, "%15.10f", location.longitude_res);
2796 proto_tree_add_double_format_value(v_tree, hf_bootp_option_rfc3825_altitude, tvb, optoff+12, 4, location.altitude, "%15.10f", location.altitude);
2797 proto_tree_add_double_format_value(v_tree, hf_bootp_option_rfc3825_altitide_res, tvb, optoff+10, 2, location.altitude_res, "%15.10f", location.altitude_res);
2798 proto_tree_add_uint(v_tree, hf_bootp_option_rfc3825_altitude_type, tvb, optoff+10, 1, location.altitude_type);
2799 proto_tree_add_uint(v_tree, hf_bootp_option_rfc3825_map_datum, tvb, optoff+15, 1, location.datum_type);
2801 } else if (optlen < 69) { /* CableLabs DSS_ID */
2803 proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id_option, tvb, optoff, 1, ENC_BIG_ENDIAN);
2804 proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id_len, tvb, optoff+1, 1, ENC_BIG_ENDIAN);
2805 s_len = tvb_get_guint8(tvb, optoff+1);
2806 proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id, tvb, optoff+2, s_len, ENC_ASCII|ENC_NA);
2808 if (optlen > s_len+2) { /* Second DSS_ID*/
2810 proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id_option, tvb, optoff+2+s_len, 1, ENC_BIG_ENDIAN);
2811 proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id_len, tvb, optoff+1+2+s_len, 1, ENC_BIG_ENDIAN);
2812 s_len = tvb_get_guint8(tvb, optoff+1+2+s_len);
2813 proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id, tvb, optoff+2+2+s_len, s_len, ENC_ASCII|ENC_NA);
2816 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Invalid length of DHCP option!");
2820 case 124: { /* V-I Vendor Class (RFC 3925) */
2824 /* CableLab specific */
2825 proto_tree_add_item(v_tree, hf_bootp_option_vi_class_cl_address_mode, tvb, optoff, optlen, ENC_BIG_ENDIAN);
2831 while (optleft > 0) {
2834 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length < 5");
2838 proto_tree_add_item(v_tree, hf_bootp_option_vi_class_enterprise, tvb, optoff, 4, ENC_BIG_ENDIAN);
2839 proto_tree_add_item(v_tree, hf_bootp_option_vi_class_data_length, tvb, optoff, 1, ENC_BIG_ENDIAN);
2840 data_len = tvb_get_guint8(tvb, optoff + 4);
2845 proto_tree_add_item(v_tree, hf_bootp_option_vi_class_data, tvb, optoff, data_len, ENC_ASCII|ENC_NA);
2847 /* look for next enterprise number */
2849 optleft -= data_len;
2854 case 125: { /* V-I Vendor-specific Information (RFC 3925) */
2857 int option_data_len = 0;
2858 proto_tree *e_tree = 0;
2860 optend = optoff + optlen;
2863 while (optleft > 0) {
2866 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length < 5");
2870 enterprise = tvb_get_ntohl(tvb, optoff);
2871 vti = proto_tree_add_item(v_tree, hf_bootp_option125_enterprise, tvb, optoff, 4, ENC_BIG_ENDIAN);
2872 e_tree = proto_item_add_subtree(vti, ett_bootp_option);
2877 proto_tree_add_item_ret_uint(e_tree, hf_bootp_option125_length, tvb, optoff, 1, ENC_NA, &option_data_len);
2882 s_end = optoff + option_data_len;
2883 if ( s_end > optend ) {
2884 expert_add_info_format(pinfo, vti, &ei_bootp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise);
2888 while (optoff < s_end) {
2889 switch (enterprise) {
2891 case 3561: /* ADSL Forum */
2892 optoff = dissect_vendor_tr111_suboption(pinfo, vti, e_tree, tvb, optoff, s_end);
2895 case 4491: /* CableLab */
2896 optoff = dissect_vendor_cl_suboption(pinfo, vti, e_tree, tvb, optoff, s_end);
2900 optoff = dissect_vendor_generic_suboption(pinfo, vti, e_tree, tvb, optoff, s_end);
2904 optleft -= option_data_len;
2909 case 212: { /* 6RD option (RFC 5969) */
2911 expert_add_info(pinfo, vti, &ei_bootp_option_6RD_malformed);
2915 proto_tree_add_item(v_tree, hf_bootp_option_6RD_ipv4_mask_len, tvb, optoff, 1, ENC_BIG_ENDIAN);
2916 proto_tree_add_item(v_tree, hf_bootp_option_6RD_prefix_len, tvb, optoff+1, 1, ENC_BIG_ENDIAN);
2917 proto_tree_add_item(v_tree, hf_bootp_option_6RD_prefix, tvb, optoff+2, 16, ENC_NA);
2918 proto_tree_add_item(v_tree, hf_bootp_option_6RD_border_relay_ip, tvb, optoff+18, 4, ENC_BIG_ENDIAN);
2920 /* More Border Relay IPv4 addresses included */
2923 for (i = optoff, optleft = optlen - 22; optleft > 0; i += 4, optleft -= 4) {
2925 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4");
2929 proto_tree_add_item(v_tree, hf_bootp_option_6RD_border_relay_ip, tvb, i, 4, ENC_BIG_ENDIAN);
2935 case 242: { /* Avaya IP Telephone */
2936 proto_tree *o242avaya_v_tree;
2937 proto_item *avaya_ti;
2938 const guint8 *avaya_option = NULL;
2939 gchar *field = NULL;
2940 wmem_strbuf_t *avaya_param_buf = NULL;
2942 /* minimum length is 5 bytes */
2944 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Avaya IP Telephone option length isn't >= 5");
2948 avaya_ti = proto_tree_add_item_ret_string(v_tree, hf_bootp_option242_avaya, tvb, optoff, optlen, ENC_ASCII|ENC_NA, wmem_packet_scope(), &avaya_option);
2949 o242avaya_v_tree = proto_item_add_subtree(avaya_ti, ett_bootp_option242_suboption);
2950 avaya_param_buf = wmem_strbuf_new(wmem_packet_scope(), "");
2951 for ( field = strtok((char*)avaya_option, ","); field; field = strtok(NULL, ",") ) {
2952 if (!strchr(field, '=')) {
2953 if (wmem_strbuf_get_len(avaya_param_buf) == 0) {
2954 expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, Unknown parameter %s", field);
2955 optoff += (int)strlen(field);
2958 wmem_strbuf_append_printf(avaya_param_buf,",%s", field);
2961 if (wmem_strbuf_get_len(avaya_param_buf) > 0) {
2962 dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, vti, tvb, optoff, avaya_param_buf);
2963 optoff += (int)wmem_strbuf_get_len(avaya_param_buf) + 1;
2964 wmem_strbuf_truncate(avaya_param_buf, 0);
2966 wmem_strbuf_append(avaya_param_buf, field);
2969 if (wmem_strbuf_get_len(avaya_param_buf) > 0) {
2970 dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, vti, tvb, optoff, avaya_param_buf);
2975 default: /* not special */
2976 /* The PacketCable CCC option number can vary. If this is a CCC option,
2977 handle it as a special.
2979 if (code == pkt_ccc_option) {
2981 proto_item_append_text(vti,
2982 "CableLabs Client Configuration (%d bytes)",
2984 optend = optoff + optlen;
2985 while (optoff < optend) {
2986 switch (pkt_ccc_protocol_version) {
2988 case PACKETCABLE_CCC_I05:
2989 optoff = dissect_packetcable_i05_ccc(pinfo, vti, v_tree, tvb, optoff, optend);
2991 case PACKETCABLE_CCC_DRAFT5:
2992 case PACKETCABLE_CCC_RFC_3495:
2993 optoff = dissect_packetcable_ietf_ccc(pinfo, vti, v_tree, tvb, optoff, optend, pkt_ccc_protocol_version);
2995 default: /* XXX Should we do something here? */
3000 option_handled = FALSE;
3006 basictype_consumed = bootp_handle_basic_types(pinfo, v_tree, vti, tvb, ftype,
3007 optoff, optlen, opt->phf, &default_hfs);
3009 if ((basictype_consumed == 0) && (option_handled == FALSE) &&
3010 (opt->phf == NULL) && (optlen > 0)) {
3011 proto_tree_add_item(v_tree, hf_bootp_option_value, tvb, voff+2, optlen, ENC_NA);
3017 static const value_string option82_suboption_vals[] = {
3019 { 1, "Agent Circuit ID" },
3020 { 2, "Agent Remote ID" },
3022 { 4, "DOCSIS Device Class" },
3023 { 5, "Link selection" },
3024 { 6, "Subscriber ID" },
3025 { 7, "RADIUS Attributes" },
3026 { 8, "Authentication" },
3027 { 9, "Vendor-Specific Information" },
3029 { 11, "Server ID Override" },
3030 { 12, "Relay Agent Identifier" },
3031 { 150, "Link selection (Cisco proprietary)" },
3032 { 151, "VRF name/VPN ID" },
3033 { 152, "Server ID Override (Cisco proprietary)" },
3038 bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff,
3041 int suboptoff = optoff;
3042 guint8 subopt, idx, vs_opt, vs_len;
3043 int subopt_len, subopt_end, datalen;
3045 proto_item *vti, *ti;
3046 proto_tree *o82_v_tree, *o82_sub_tree;
3047 guint8 tag, tag_len;
3049 struct basic_types_hfs default_hfs = {
3050 &hf_bootp_option82_value,
3051 &hf_bootp_option82_value_ip_address,
3052 &hf_bootp_option82_value_ip_address,
3053 &hf_bootp_option82_value_stringz,
3055 &hf_bootp_option82_value_8,
3058 &hf_bootp_option82_value_32,
3065 struct opt_info info;
3067 static struct opt82_info o82_opt[]= {
3068 {0, {"nop", bytes, &hf_bootp_option82_padding}}, /* dummy */
3069 {1, {"Agent Circuit ID", bytes, &hf_bootp_option82_agent_circuit_id}}, /* [RFC3046] */
3070 {2, {"Agent Remote ID", bytes, &hf_bootp_option82_agent_remote_id}}, /* [RFC3046] */
3071 {3, {"Reserved", bytes, &hf_bootp_option82_reserved}},
3072 {4, {"DOCSIS Device Class", val_u_long, &hf_bootp_option82_docsis_device_class}}, /* [RFC3256] */
3073 {5, {"Link selection", ipv4, &hf_bootp_option82_link_selection}}, /* [RFC3527] */
3074 {6, {"Subscriber ID", string, &hf_bootp_option82_subscriber_id}}, /* [RFC3993] */ /***** CHECK STRING TYPE */
3075 {7, {"RADIUS Attributes", bytes, &hf_bootp_option82_radius_attributes}}, /* [RFC4014] */
3076 {8, {"Authentication", bytes, &hf_bootp_option82_authentication}}, /* [RFC4030] */
3077 {9, {"Vendor-Specific Information", special, &hf_bootp_option82_vi}}, /* [RFC 4243] */
3078 {10, {"Flags", val_u_byte, &hf_bootp_option82_flags}}, /* [RFC5010] */
3079 {11, {"Server ID Override", ipv4, &hf_bootp_option82_server_id_override}}, /* [RFC 5107] */
3080 {12, {"Relay Agent Identifier", bytes, &hf_bootp_option82_relay_agent_id}}, /* [RFC 6925] */
3081 {150, {"Link selection (Cisco proprietary)", ipv4, &hf_bootp_option82_link_selection_cisco}}, /* [RFC3527] */
3082 {151, {"VRF name/VPN ID", special, &hf_bootp_option82_vrf_name_vpn_id}}, /* [RFC2685] */
3083 {152, {"Server ID Override (Cisco proprietary)", ipv4, &hf_bootp_option82_server_id_override_cisco}} /* [RFC 5107] */
3086 subopt = tvb_get_guint8(tvb, optoff);
3089 if (suboptoff >= optend) {
3090 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
3091 "Suboption %d: no room left in option for suboption length", subopt);
3095 subopt_len = tvb_get_guint8(tvb, suboptoff);
3096 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option82_suboption,
3097 tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str_const(subopt, option82_suboption_vals, "Unknown"));
3099 o82_v_tree = proto_item_add_subtree(vti, ett_bootp_option82_suboption);
3100 proto_tree_add_item(o82_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3103 subopt_end = suboptoff+subopt_len;
3104 if (subopt_end > optend) {
3105 expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value,
3106 "Suboption %d: no room left in option for suboption value", subopt);
3110 for (idx = 0; idx < array_length(o82_opt); idx++) {
3111 if (o82_opt[idx].id == subopt) {
3116 ti = proto_tree_add_item(o82_v_tree, hf_bootp_option82_value, tvb, suboptoff, subopt_len, ENC_NA);
3118 if ( (idx >= 1 ) && (idx < array_length(o82_opt)) ) {
3119 PROTO_ITEM_SET_HIDDEN(ti);
3120 if (o82_opt[idx].info.ftype == special) {
3124 while (suboptoff < subopt_end) {
3125 enterprise = tvb_get_ntohl(tvb, suboptoff);
3126 vti = proto_tree_add_item(o82_v_tree, hf_bootp_option82_vi_enterprise, tvb, suboptoff, 4, ENC_BIG_ENDIAN);
3129 o82_sub_tree = proto_item_add_subtree(vti, ett_bootp_option82_suboption9);
3130 datalen = tvb_get_guint8(tvb, suboptoff);
3131 proto_tree_add_item(o82_sub_tree, hf_bootp_option82_vi_data_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3134 switch (enterprise) {
3135 case 4491: /* CableLab */
3136 vs_opt = tvb_get_guint8(tvb, suboptoff);
3137 proto_tree_add_item(o82_sub_tree, hf_bootp_option82_vi_cl_option, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3139 vs_len = tvb_get_guint8(tvb, suboptoff);
3140 proto_tree_add_item(o82_sub_tree, hf_bootp_option82_vi_cl_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3147 tag = tvb_get_guint8(tvb, suboptoff);
3148 proto_tree_add_item(o82_sub_tree, hf_bootp_option82_vi_cl_tag, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3149 tag_len = tvb_get_guint8(tvb, suboptoff+1);
3150 proto_tree_add_item(o82_sub_tree, hf_bootp_option82_vi_cl_tag_length, tvb, suboptoff+1, 1, ENC_BIG_ENDIAN);
3153 proto_tree_add_uint_format_value(o82_sub_tree, hf_bootp_option82_vi_cl_docsis_version,
3154 tvb, suboptoff, 2, 0, "%d.%d",
3155 tvb_get_guint8(tvb, suboptoff), tvb_get_guint8(tvb, suboptoff+1));
3158 expert_add_info_format(pinfo, vti, &ei_bootp_option82_vi_cl_tag_unknown, "Unknown tag %d (%d bytes)", tag, tag_len);
3159 suboptoff += tag_len;
3162 suboptoff += vs_len;
3167 expert_add_info_format(pinfo, vti, &ei_bootp_suboption_invalid, "Invalid suboption %d (%d bytes)", vs_opt, vs_len);
3168 suboptoff += vs_len;
3173 proto_tree_add_item(o82_v_tree, hf_bootp_option82_value, tvb, suboptoff, datalen, ENC_NA);
3174 suboptoff += datalen;
3180 if (subopt_len == 1) {
3181 proto_tree_add_item(o82_v_tree, hf_bootp_option82_vrf_name_global, tvb, suboptoff, 1, ENC_NA);
3183 else if (subopt_len != 7) {
3184 proto_tree_add_item(o82_v_tree, hf_bootp_option82_vrf_name, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA);
3186 proto_tree_add_item(o82_v_tree, hf_bootp_option82_vrf_name_vpn_id_oui, tvb, suboptoff, 3, ENC_BIG_ENDIAN);
3187 proto_tree_add_item(o82_v_tree, hf_bootp_option82_vrf_name_vpn_id_index, tvb, suboptoff+3, 4, ENC_BIG_ENDIAN);
3191 if (o82_opt[idx].info.phf != NULL)
3192 proto_tree_add_item(o82_v_tree, *o82_opt[idx].info.phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3194 proto_tree_add_item(o82_v_tree, hf_bootp_option82_value, tvb, suboptoff, subopt_len, ENC_NA);
3199 if (bootp_handle_basic_types(pinfo, o82_v_tree, vti, tvb, o82_opt[idx].info.ftype,
3200 suboptoff, subopt_len, o82_opt[idx].info.phf, &default_hfs) == 0) {
3201 expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt);
3206 optoff += (subopt_len + 2);
3210 static const value_string option43_pxeclient_suboption_vals[] = {
3212 { 1, "PXE mtftp IP" },
3213 { 2, "PXE mtftp client port" },
3214 { 3, "PXE mtftp server port" },
3215 { 4, "PXE mtftp timeout" },
3216 { 5, "PXE mtftp delay" },
3217 { 6, "PXE discovery control" },
3218 { 7, "PXE multicast address" },
3219 { 8, "PXE boot servers" },
3220 { 9, "PXE boot menu" },
3221 { 10, "PXE menu prompt" },
3222 { 11, "PXE multicast address alloc", },
3223 { 12, "PXE credential types" },
3224 { 71, "PXE boot item" },
3230 dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
3231 tvbuff_t *tvb, int optoff, int optend)
3233 int suboptoff = optoff;
3236 proto_tree *o43pxeclient_v_tree;
3237 proto_item *vti, *ti;
3239 struct basic_types_hfs default_hfs = {
3241 &hf_bootp_option43_value_ip_address,
3242 &hf_bootp_option43_value_ip_address,
3245 &hf_bootp_option43_value_8,
3253 static struct opt_info o43pxeclient_opt[]= {
3254 /* 0 */ {"nop", special, &hf_bootp_option43_pxeclient_padding}, /* dummy */
3255 /* 1 */ {"PXE mtftp IP", ipv4_list, &hf_bootp_option43_pxeclient_mtftp_ip},
3256 /* 2 */ {"PXE mtftp client port", val_u_le_short, &hf_bootp_option43_pxeclient_mtftp_client_port},
3257 /* 3 */ {"PXE mtftp server port",val_u_le_short, &hf_bootp_option43_pxeclient_mtftp_server_port},
3258 /* 4 */ {"PXE mtftp timeout", val_u_byte, &hf_bootp_option43_pxeclient_mtftp_timeout},
3259 /* 5 */ {"PXE mtftp delay", val_u_byte, &hf_bootp_option43_pxeclient_mtftp_delay},
3260 /* 6 */ {"PXE discovery control", val_u_byte, &hf_bootp_option43_pxeclient_discovery_control},
3262 * Correct: b0 (lsb): disable broadcast discovery
3263 * b1: disable multicast discovery
3264 * b2: only use/accept servers in boot servers
3265 * b3: download bootfile without prompt/menu/disc
3267 /* 7 */ {"PXE multicast address", ipv4_list, &hf_bootp_option43_pxeclient_multicast_address},
3268 /* 8 */ {"PXE boot servers", special, &hf_bootp_option43_pxeclient_boot_servers},
3269 /* 9 */ {"PXE boot menu", special, &hf_bootp_option43_pxeclient_boot_menu},
3270 /* 10 */ {"PXE menu prompt", special, &hf_bootp_option43_pxeclient_menu_prompt},
3271 /* 11 */ {"PXE multicast address alloc", special, &hf_bootp_option43_pxeclient_multicast_address_alloc},
3272 /* 12 */ {"PXE credential types", special, &hf_bootp_option43_pxeclient_credential_types}
3273 /* 71 {"PXE boot item", bytes, &hf_bootp_option43_pxeclient_boot_item}, */
3274 /* 255 {"PXE end options", special, &hf_bootp_option43_pxeclient_end} */
3277 subopt = tvb_get_guint8(tvb, optoff);
3281 proto_tree_add_item(v_tree, hf_bootp_option43_pxeclient_padding, tvb, optoff, 1, ENC_BIG_ENDIAN);
3283 } else if (subopt == 255) { /* End Option */
3284 proto_tree_add_item(v_tree, hf_bootp_option43_pxeclient_end, tvb, optoff, 1, ENC_BIG_ENDIAN);
3285 /* Make sure we skip any junk left this option */
3289 if (suboptoff >= optend) {
3290 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
3291 "Suboption %d: no room left in option for suboption length", subopt);
3295 subopt_len = tvb_get_guint8(tvb, suboptoff);
3296 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_pxeclient_suboption,
3297 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
3298 subopt, val_to_str_const(subopt, option43_pxeclient_suboption_vals, "Unknown"));
3300 o43pxeclient_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption);
3301 proto_tree_add_item(o43pxeclient_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3304 ti = proto_tree_add_item(o43pxeclient_v_tree, hf_bootp_option43_value, tvb, suboptoff, subopt_len, ENC_NA);
3305 PROTO_ITEM_SET_HIDDEN(ti);
3307 if ( subopt == 71 ) { /* 71 {"PXE boot item", special} */
3309 /* I may need to decode that properly one day */
3310 proto_tree_add_item(o43pxeclient_v_tree, hf_bootp_option43_pxeclient_boot_item, tvb, suboptoff, subopt_len, ENC_NA);
3311 } else if ((subopt < 1) || (subopt >= array_length(o43pxeclient_opt))) {
3312 expert_add_info_format(pinfo, vti, &ei_bootp_suboption_invalid, "Unknown suboption %d (%d bytes)", subopt, subopt_len);
3313 } else if (o43pxeclient_opt[subopt].ftype == special) {
3314 /* I may need to decode that properly one day */
3315 if (o43pxeclient_opt[subopt].phf != NULL)
3316 proto_tree_add_item(o43pxeclient_v_tree, *o43pxeclient_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3318 proto_tree_add_item(o43pxeclient_v_tree, hf_bootp_option43_value, tvb, suboptoff, subopt_len, ENC_NA);
3320 if (bootp_handle_basic_types(pinfo, o43pxeclient_v_tree, vti, tvb, o43pxeclient_opt[subopt].ftype,
3321 suboptoff, subopt_len, o43pxeclient_opt[subopt].phf, &default_hfs) == 0)
3323 expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt);
3327 optoff += (subopt_len + 2);
3332 dissect_vendor_avaya_param(proto_tree *tree, packet_info *pinfo, proto_item *vti,
3333 tvbuff_t *tvb, int optoff, wmem_strbuf_t *avaya_param_buf)
3338 field = wmem_strbuf_get_str(avaya_param_buf);
3339 len = (int)wmem_strbuf_get_len(avaya_param_buf);
3341 if((strncmp(field, "TLSSRVR=", 8) == 0) && ( len > 8 )) {
3342 proto_tree_add_string(tree, hf_bootp_option242_avaya_tlssrvr, tvb, optoff, len, field + 8);
3344 else if((strncmp(field, "HTTPSRVR=", 9) == 0) && ( len > 9)) {
3345 proto_tree_add_string(tree, hf_bootp_option242_avaya_httpsrvr, tvb, optoff, len, field + 9);
3347 else if((strncmp(field, "HTTPDIR=", 8) == 0) && ( len > 8)) {
3348 proto_tree_add_string(tree, hf_bootp_option242_avaya_httpdir, tvb, optoff, len, field + 8);
3350 else if((strncmp(field, "STATIC=", 7) == 0) && ( len > 7)) {
3351 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_static, tvb, optoff, len, field + 7, "%s (%s)", field + 7, str_to_str(field + 7, option242_avaya_static_vals, "Unknown (%s)"));
3353 else if((strncmp(field, "MCIPADD=", 8) == 0) && ( len > 8)) {
3354 proto_tree_add_string(tree, hf_bootp_option242_avaya_mcipadd, tvb, optoff, len, field + 8);
3356 else if((strncmp(field, "DOT1X=", 6) == 0) && ( len > 6)) {
3357 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_dot1x, tvb, optoff, len, field + 6, "%s (%s)", field + 6, str_to_str(field + 6, option242_avaya_dot1x_vals, "Unknown (%s)"));
3359 else if((strncmp(field, "ICMPDU=", 7) == 0) && ( len > 7)) {
3360 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_icmpdu, tvb, optoff, len, field + 7, "%s (%s)", field + 7, str_to_str(field + 7, option242_avaya_icmpdu_vals, "Unknown (%s)"));
3362 else if((strncmp(field, "ICMPRED=", 8) == 0) && ( len > 8)) {
3363 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_icmpred, tvb, optoff, len, field + 8, "%s (%s)", field + 8, str_to_str(field + 8, option242_avaya_icmpred_vals, "Unknown (%s)"));
3365 else if((strncmp(field, "L2Q=", 4) == 0) && ( len > 4)) {
3366 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_l2q, tvb, optoff, len, field + 4, "%s (%s)", field + 4, str_to_str(field + 4, option242_avaya_l2q_vals, "Unknown (%s)"));
3368 else if((strncmp(field, "L2QVLAN=", 8) == 0) && ( len > 8)) {
3373 val_valid = ws_strtoi32(field + 8, NULL, &val);
3374 pi = proto_tree_add_int(tree, hf_bootp_option242_avaya_l2qvlan, tvb, optoff, len, val);
3376 expert_add_info(pinfo, pi, &ei_bootp_option242_avaya_l2qvlan_invalid);
3378 else if((strncmp(field, "LOGLOCAL=", 9) == 0) && ( len > 9)) {
3379 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_loglocal, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str(field + 9, option242_avaya_loglocal_vals, "Unknown (%s)"));
3381 else if((strncmp(field, "PHY1STAT=", 9) == 0) && ( len > 9)) {
3382 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_phy1stat, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str(field + 9, option242_avaya_phystat_vals, "Unknown (%s)"));
3384 else if((strncmp(field, "PHY2STAT=", 9) == 0) && ( len > 9)) {
3385 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_phy2stat, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str(field + 9, option242_avaya_phystat_vals, "Unknown (%s)"));
3387 else if((strncmp(field, "PROCPSWD=", 9) == 0) && ( len > 9)) {
3388 proto_tree_add_string(tree, hf_bootp_option242_avaya_procpswd, tvb, optoff, len, field + 9);
3390 else if((strncmp(field, "PROCSTAT=", 9) == 0) && ( len > 9)) {
3391 proto_tree_add_string_format_value(tree, hf_bootp_option242_avaya_procstat, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str(field + 9, option242_avaya_procstat_vals, "Unknown (%s)"));
3393 else if((strncmp(field, "SNMPADD=", 8) == 0) && ( len > 8)) {
3394 proto_tree_add_string(tree, hf_bootp_option242_avaya_snmpadd, tvb, optoff, len, field + 8);
3396 else if((strncmp(field, "SNMPSTRING=", 11) == 0) && ( len > 11)) {
3397 proto_tree_add_string(tree, hf_bootp_option242_avaya_snmpstring, tvb, optoff, len, field + 11);
3399 else if((strncmp(field, "VLANTEST=", 9) == 0) && ( len > 9)) {
3404 val_valid = ws_strtoi32(field + 9, NULL, &val);
3405 pi = proto_tree_add_int(tree, hf_bootp_option242_avaya_vlantest, tvb, optoff, len, val);
3407 expert_add_info(pinfo, pi, &ei_bootp_option242_avaya_vlantest_invalid);
3410 expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, Unknown Avaya IP Telephone parameter %s", field);
3414 /* RFC3825Decoder: http://www.enum.at/rfc3825encoder.529.0.html */
3416 rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fixpoint_t *fixpoint)
3418 fixpoint->latitude_res = (lci[0]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */
3419 if (lci[0] & 2) { /* LSB<<1 contains the sign of the latitude */
3420 /* Latitude is negative, expand two's complement */
3421 fixpoint->latitude = (((gint64)lci[0] & 3)<<32) | ((gint64)lci[1]<<24) |
3422 ((gint64)lci[2]<<16) | ((gint64)lci[3]<<8) |
3423 (gint64)lci[4] | ((gint64)0x3FFFFFFF<<34);
3426 /* Latitude is positive */
3427 fixpoint->latitude = (((gint64)lci[0] & 3)<<32) | ((gint64)lci[1]<<24) |
3428 ((gint64)lci[2]<<16) | ((gint64)lci[3]<<8) |
3431 fixpoint->longitude_res = (lci[5]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */
3432 if (lci[5] & 2) { /* LSB<<1 contains the sign of the latitude */
3433 /* Longitude is negative, expand two's complement */
3434 fixpoint->longitude = (((gint64)lci[5] & 3)<<32) | ((gint64)lci[6]<<24) |
3435 ((gint64)lci[7]<<16) | ((gint64)lci[8]<<8) |
3436 (gint64)lci[9] | ((gint64)0x3FFFFFFF<<34);
3439 /* Longitude is positive */
3440 fixpoint->longitude = (((gint64)lci[5] & 3)<<32) | ((gint64)lci[6]<<24) |
3441 ((gint64)lci[7]<<16) | ((gint64)lci[8]<<8) |
3444 fixpoint->altitude_type = (lci[10]>>4) & 0x0F; /* make sure that right-shift does not copy sign bit */
3445 fixpoint->altitude_res = ((lci[10] & 0x0F) << 2) | ((lci[11]>>6) & 0x03);
3446 if (lci[11] & 0x20) { /* LSB<<1 contains the sign of the latitude */
3447 /* Altitude is negative, expand two's complement */
3448 fixpoint->altitude = (((gint32)lci[11] & 0x3F)<<24) | ((gint32)lci[12]<<16) |
3449 ((gint32)lci[13]<<8) | ((gint32)lci[14]) |
3453 /* Altitude is positive */
3454 fixpoint->altitude = (((gint32)lci[11] & 0x3F)<<24) | ((gint32)lci[12]<<16) |
3455 ((gint32)lci[13]<<8) | ((gint32)lci[14]);
3458 fixpoint->datum_type = lci[15];
3462 /* RFC3825Decoder: http://www.enum.at/rfc3825encoder.529.0.html */
3464 rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t *fixpoint, struct rfc3825_location_decimal_t *decimal)
3467 decimal->latitude = (double) fixpoint->latitude / (1 << 25);
3468 if ((decimal->latitude > 90) || (decimal->latitude < -90)) {
3469 return RFC3825_LATITUDE_OUTOFRANGE;
3472 /* Latitude Uncertainty */
3473 if (fixpoint->latitude_res > 34) {
3474 return RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE;
3476 if (fixpoint->latitude_res > 8 ) {
3477 decimal->latitude_res = (double) 1 / (G_GUINT64_CONSTANT(1) << (fixpoint->latitude_res - 8));
3479 decimal->latitude_res = (double) (G_GUINT64_CONSTANT(1) << (8 - fixpoint->latitude_res));
3483 decimal->longitude = (double) fixpoint->longitude / (1 << 25);
3484 if ((decimal->longitude > 180) || (decimal->longitude < -180)) {
3485 return RFC3825_LONGITUDE_OUTOFRANGE;
3488 /* Longitude Uncertainty */
3489 if (fixpoint->longitude_res > 34) {
3490 return RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE;
3492 if (fixpoint->longitude_res > 8 ) {
3493 decimal->longitude_res = (double) 1 / (G_GUINT64_CONSTANT(1) << (fixpoint->longitude_res - 8));
3495 decimal->longitude_res = (double) (G_GUINT64_CONSTANT(1) << (8 - fixpoint->longitude_res));
3499 decimal->altitude_type = fixpoint->altitude_type;
3500 decimal->altitude = 0;
3501 decimal->altitude_res = 0;
3503 if (decimal->altitude_type == 0) { /* Unknown */
3504 } else if (decimal->altitude_type == 1) { /* Meters */
3506 decimal->altitude = (double) fixpoint->altitude / (1 << 8);
3507 if ((decimal->altitude > ((gint32) 1<<21)-1) || (decimal->altitude < ((gint32) -(1<<21))))
3508 return RFC3825_ALTITUDE_OUTOFRANGE;
3510 /* Altitude Uncertainty */
3511 if (fixpoint->altitude_res > 30) {
3512 return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE;
3514 if (fixpoint->altitude_res > 21 ) {
3515 decimal->altitude_res = (double) 1 / (G_GUINT64_CONSTANT(1) << (fixpoint->altitude_res - 21));
3517 decimal->altitude_res = (double) (G_GUINT64_CONSTANT(1) << (21 - fixpoint->altitude_res));
3519 } else if (decimal->altitude_type == 2) { /* Floors */
3521 if ((fixpoint->altitude_res != 30) && (fixpoint->altitude_res != 0)) {
3522 return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE;
3524 decimal->altitude = (double) fixpoint->altitude / (1 << 8);
3525 } else { /* invalid type */
3526 return RFC3825_ALTITUDE_TYPE_OUTOFRANGE;
3530 decimal->datum_type = 0;
3531 if ((fixpoint->datum_type > 3) || (fixpoint->datum_type < 1)) {
3532 return RFC3825_DATUM_TYPE_OUTOFRANGE;
3534 decimal->datum_type = fixpoint->datum_type;
3536 return RFC3825_NOERROR;
3539 static int dissect_isns(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
3540 tvbuff_t *tvb, int optoff, int optlen)
3542 static const int *isns_functions_hf_flags[] = {
3543 &hf_bootp_option_isns_functions_enabled,
3544 &hf_bootp_option_isns_functions_dd_authorization,
3545 &hf_bootp_option_isns_functions_sec_policy_distibution,
3546 &hf_bootp_option_isns_functions_reserved,
3550 static const int *isns_dda_hf_flags[] = {
3551 &hf_bootp_option_isns_discovery_domain_access_enabled,
3552 &hf_bootp_option_isns_discovery_domain_access_control_node,
3553 &hf_bootp_option_isns_discovery_domain_access_iscsi_target,
3554 &hf_bootp_option_isns_discovery_domain_access_iscsi_inititator,
3555 &hf_bootp_option_isns_discovery_domain_access_ifcp_target_port,
3556 &hf_bootp_option_isns_discovery_domain_access_ifcp_initiator_port,
3557 &hf_bootp_option_isns_discovery_domain_access_reserved,
3561 static const int *isns_administrative_flags[] = {
3562 &hf_bootp_option_isns_administrative_flags_enabled,
3563 &hf_bootp_option_isns_administrative_flags_heartbeat,
3564 &hf_bootp_option_isns_administrative_flags_management_scns,
3565 &hf_bootp_option_isns_administrative_flags_default_dd,
3566 &hf_bootp_option_isns_administrative_flags_reserved,
3570 static const int *isns_server_security_flags[] = {
3571 &hf_bootp_option_isns_server_security_bitmap_enabled,
3572 &hf_bootp_option_isns_server_security_bitmap_ike_ipsec_enabled,
3573 &hf_bootp_option_isns_server_security_bitmap_main_mode,
3574 &hf_bootp_option_isns_server_security_bitmap_aggressive_mode,
3575 &hf_bootp_option_isns_server_security_bitmap_pfs,
3576 &hf_bootp_option_isns_server_security_bitmap_transport_mode,
3577 &hf_bootp_option_isns_server_security_bitmap_tunnel_mode,
3578 &hf_bootp_option_isns_server_security_bitmap_reserved,
3582 guint16 function_flags, dd_access_flags, administrative_flags;
3583 guint32 server_security_flags;
3586 int optend, heartbeat_set = 0;
3589 expert_add_info_format(pinfo, v_ti, &ei_bootp_bad_length, "length must be >= 14");
3592 optend = optoff + optlen;
3594 item = proto_tree_add_bitmask(v_tree, tvb, optoff, hf_bootp_option_isns_functions,
3595 ett_bootp_isns_functions, isns_functions_hf_flags, ENC_BIG_ENDIAN);
3596 function_flags = tvb_get_ntohs(tvb, optoff);
3597 /* RFC 4174, section "2.1. iSNS Functions Field" specifies that if
3598 * the field "Function Fields Enabled" is set to 0, then "the contents
3599 * of all other iSNS Function fields MUST be ignored. We will display
3600 * the fields but add an informational expert info. This goes for all
3601 * the bitmasks: iSNS Functions, DD Access, Administrative Flags, iSNS
3602 * Server Security Bitmap */
3603 if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(function_flags, F_ISNS_FUNCTIONS_ENABLED))
3604 expert_add_info(pinfo, item, &ei_bootp_option_isns_ignored_bitfield);
3607 item = proto_tree_add_bitmask(v_tree, tvb, optoff, hf_bootp_option_isns_discovery_domain_access,
3608 ett_bootp_isns_discovery_domain_access, isns_dda_hf_flags, ENC_BIG_ENDIAN);
3609 dd_access_flags = tvb_get_ntohs(tvb, optoff);
3610 if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(dd_access_flags, F_ISNS_DD_ACCESS_ENABLED))
3611 expert_add_info(pinfo, item, &ei_bootp_option_isns_ignored_bitfield);
3614 administrative_flags = tvb_get_ntohs(tvb, optoff);
3615 if (administrative_flags & F_ISNS_ADMIN_FLAGS_ENABLED) {
3616 if ((administrative_flags & F_ISNS_ADMIN_FLAGS_HEARTBEAT)) {
3618 expert_add_info_format(pinfo, v_ti, &ei_bootp_bad_length, "length must be >= 18");
3624 item = proto_tree_add_bitmask(v_tree, tvb, optoff, hf_bootp_option_isns_administrative_flags,
3625 ett_bootp_isns_administrative_flags, isns_administrative_flags, ENC_BIG_ENDIAN);
3626 if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(administrative_flags, F_ISNS_ADMIN_FLAGS_ENABLED))
3627 expert_add_info(pinfo, item, &ei_bootp_option_isns_ignored_bitfield);
3630 item = proto_tree_add_bitmask(v_tree, tvb, optoff, hf_bootp_option_isns_server_security_bitmap,
3631 ett_bootp_isns_server_security_bitmap, isns_server_security_flags, ENC_BIG_ENDIAN);
3632 server_security_flags = tvb_get_ntohl(tvb, optoff);
3633 if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(server_security_flags, F_ISNS_SRV_SEC_BITMAP_ENABLED))
3634 expert_add_info(pinfo, item, &ei_bootp_option_isns_ignored_bitfield);
3637 if (heartbeat_set) {
3638 proto_tree_add_item(v_tree, hf_bootp_option_isns_heartbeat_originator_addr,
3639 tvb, optoff, 4, ENC_BIG_ENDIAN);
3643 proto_tree_add_item(v_tree, hf_bootp_option_isns_primary_server_addr,
3644 tvb, optoff, 4, ENC_BIG_ENDIAN);
3647 if (optoff < optend) {
3648 tree = proto_tree_add_subtree(v_tree, tvb, optoff, 0, ett_bootp_isns_secondary_server_addr,
3649 &item, "Secondary iSNS Servers");
3650 optoff += bootp_handle_basic_types(pinfo, tree, item, tvb, ipv4_list, optoff, optend - optoff,
3651 &hf_bootp_option_isns_secondary_server_addr_list, NULL);
3656 static const value_string option43_cl_suboption_vals[] = {
3658 { 1, "Suboption Request List" },
3659 { 2, "Device Type" },
3660 { 3, "eSAFE Types" },
3661 { 4, "Serial Number" },
3662 { 5, "Hardware Version" },
3663 { 6, "Software Version" },
3664 { 7, "Boot ROM version" },
3665 { 8, "Organizationally Unique Identifier" },
3666 { 9, "Model Number" },
3667 { 10, "Vendor Name" },
3668 { 11, "Address Realm" },
3669 { 12, "CM/PS System Description" },
3670 { 13, "CM/PS Firmware Revision" },
3671 { 14, "Firewall Policy File Version" },
3672 { 15, "eSafe Config File Devices" },
3673 { 18, "Video Security Type" },
3674 { 31, "MTA MAC Address" },
3675 { 32, "Correlation ID" },
3676 { 51, "Vendor Name" },
3677 { 52, "CableCARD Capability" },
3678 { 53, "Device Identification (CA)" },
3679 { 54, "Device Identification (X.509)" },
3684 static const value_string cablehome_subopt11_vals[] = {
3685 { 1, "PS WAN-Man" },
3686 { 2, "PS WAN-Data" },
3691 dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
3692 tvbuff_t *tvb, int optoff, int optend)
3694 int suboptoff = optoff;
3697 proto_tree *o43cl_v_tree;
3700 struct basic_types_hfs default_hfs = {
3701 &hf_bootp_option43_value,
3704 &hf_bootp_option43_value_stringz,
3706 &hf_bootp_option43_value_8,
3709 &hf_bootp_option43_value_32,
3714 static struct opt_info o43cablelabs_opt[]= {
3715 /* 0 */ {"nop", special, &hf_bootp_option43_cl_padding}, /* dummy */
3716 /* 1 */ {"Suboption Request List", string, &hf_bootp_option43_cl_suboption_request_list},
3717 /* 2 */ {"Device Type", string, &hf_bootp_option43_cl_device_type},
3718 /* 3 */ {"eSAFE Types", string, &hf_bootp_option43_cl_esafe_type},
3719 /* 4 */ {"Serial Number", string, &hf_bootp_option43_cl_serial_number},
3720 /* 5 */ {"Hardware Version", string, &hf_bootp_option43_cl_hardware_version},
3721 /* 6 */ {"Software Version", string, &hf_bootp_option43_cl_software_version},
3722 /* 7 */ {"Boot ROM version", string, &hf_bootp_option43_cl_boot_rom_version},
3723 /* 8 */ {"Organizationally Unique Identifier", special, &hf_bootp_option43_cl_oui_bytes},
3724 /* 9 */ {"Model Number", string, &hf_bootp_option43_cl_model_number},
3725 /* 10 */ {"Vendor Name", string, &hf_bootp_option43_cl_vendor_name10},
3726 /* *** 11-30: CableHome *** */
3727 /* 11 */ {"Address Realm", val_u_byte, &hf_bootp_option43_cl_address_realm},
3728 /* 12 */ {"CM/PS System Description", string, &hf_bootp_option43_cl_cm_ps_system_desc},
3729 /* 13 */ {"CM/PS Firmware Revision", string, &hf_bootp_option43_cl_cm_ps_firmware_revision},
3730 /* 14 */ {"Firewall Policy File Version", string, &hf_bootp_option43_cl_firewall_policy_file_version},
3731 /* 15 */ {"eSafe Config File Devices", string, &hf_bootp_option43_cl_esafe_config_file_devices},
3732 /* 16 */ {"Unassigned (CableHome)", special, NULL},
3733 /* 17 */ {"Unassigned (CableHome)", special, NULL},
3734 /* 18 */ {"Video Security Type", string, &hf_bootp_option43_cl_video_security_tape},
3735 /* 19 */ {"Unassigned (CableHome)", special, NULL},
3736 /* 20 */ {"Unassigned (CableHome)", special, NULL},
3737 /* 21 */ {"Unassigned (CableHome)", special, NULL},
3738 /* 22 */ {"Unassigned (CableHome)", special, NULL},
3739 /* 23 */ {"Unassigned (CableHome)", special, NULL},
3740 /* 24 */ {"Unassigned (CableHome)", special, NULL},
3741 /* 25 */ {"Unassigned (CableHome)", special, NULL},
3742 /* 26 */ {"Unassigned (CableHome)", special, NULL},
3743 /* 27 */ {"Unassigned (CableHome)", special, NULL},
3744 /* 28 */ {"Unassigned (CableHome)", special, NULL},
3745 /* 29 */ {"Unassigned (CableHome)", special, NULL},
3746 /* 30 */ {"Unassigned (CableHome)", special, NULL},
3747 /* *** 31-50: PacketCable *** */
3748 /* 31 */ {"MTA MAC Address", special, &hf_bootp_option43_cl_mta_mac_address},
3749 /* 32 */ {"Correlation ID", val_u_long, &hf_bootp_option43_cl_correlation_ID},
3750 /* 33 */ {"Unassigned (PacketCable)", special, NULL},
3751 /* 34 */ {"Unassigned (PacketCable)", special, NULL},
3752 /* 35 */ {"Unassigned (PacketCable)", special, NULL},
3753 /* 36 */ {"Unassigned (PacketCable)", special, NULL},
3754 /* 37 */ {"Unassigned (PacketCable)", special, NULL},
3755 /* 38 */ {"Unassigned (PacketCable)", special, NULL},
3756 /* 39 */ {"Unassigned (PacketCable)", special, NULL},
3757 /* 40 */ {"Unassigned (PacketCable)", special, NULL},
3758 /* 41 */ {"Unassigned (PacketCable)", special, NULL},
3759 /* 42 */ {"Unassigned (PacketCable)", special, NULL},
3760 /* 43 */ {"Unassigned (PacketCable)", special, NULL},
3761 /* 44 */ {"Unassigned (PacketCable)", special, NULL},
3762 /* 45 */ {"Unassigned (PacketCable)", special, NULL},
3763 /* 46 */ {"Unassigned (PacketCable)", special, NULL},
3764 /* 47 */ {"Unassigned (PacketCable)", special, NULL},
3765 /* 48 */ {"Unassigned (PacketCable)", special, NULL},
3766 /* 49 */ {"Unassigned (PacketCable)", special, NULL},
3767 /* 50 */ {"Unassigned (PacketCable)", special, NULL},
3768 /* *** 51-127: CableLabs *** */
3769 /* 51 */ {"Vendor Name", string, &hf_bootp_option43_cl_vendor_name51},
3770 /* 52 */ {"CableCARD Capability", special, &hf_bootp_option43_cl_cablecard_capability},
3771 /* 53 */ {"Device Identification (CA)", special, &hf_bootp_option43_cl_device_id_ca},
3772 /* 54 */ {"Device Identification (X.509)", string, &hf_bootp_option43_cl_device_id_x509},
3773 /* 55 */ {"Unassigned (CableLabs)", special, NULL},
3774 /* *** 128-254: Vendors *** */
3775 /* 128-254 {"Unassigned (Vendors)", special, NULL}, */
3776 /* 255 {"end options", special, &hf_bootp_option43_cl_end} */
3779 subopt = tvb_get_guint8(tvb, optoff);
3783 proto_tree_add_item(v_tree, hf_bootp_option43_cl_padding, tvb, optoff, 1, ENC_BIG_ENDIAN);
3785 } else if (subopt == 255) { /* End Option */
3786 proto_tree_add_item(v_tree, hf_bootp_option43_cl_end, tvb, optoff, 1, ENC_BIG_ENDIAN);
3787 /* Make sure we skip any junk left this option */
3791 if (suboptoff >= optend) {
3792 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
3793 "Suboption %d: no room left in option for suboption length", subopt);
3797 subopt_len = tvb_get_guint8(tvb, suboptoff);
3798 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_cl_suboption,
3799 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
3800 subopt, val_to_str_const(subopt, option43_cl_suboption_vals, "Unknown"));
3802 o43cl_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption);
3803 proto_tree_add_item(o43cl_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3806 if (suboptoff+subopt_len > optend) {
3807 expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value,
3808 "Suboption %d: no room left in option for suboption value", subopt);
3812 if ( (subopt < 1 ) || (subopt >= array_length(o43cablelabs_opt)) ) {
3813 proto_tree_add_item(o43cl_v_tree, hf_bootp_option43_value, tvb, suboptoff, subopt_len, ENC_NA);
3814 } else if (o43cablelabs_opt[subopt].ftype == special) {
3818 /* CableLabs specs treat 43.8 inconsistently
3819 * as either binary (3b) or string (6b) */
3820 if (subopt_len == 3) {
3821 proto_tree_add_bytes_format_value(o43cl_v_tree, hf_bootp_option43_cl_oui_bytes, tvb, suboptoff, subopt_len, NULL,
3822 "%02x:%02x:%02x", tvb_get_guint8(tvb, suboptoff), tvb_get_guint8(tvb, suboptoff+1), tvb_get_guint8(tvb, suboptoff+2));
3823 } else if (subopt_len == 6) {
3824 proto_tree_add_item(o43cl_v_tree, hf_bootp_option43_cl_oui_string, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA);
3826 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 3 or 6");
3829 case 31: /* MTA MAC address */
3830 if (subopt_len != 6) {
3831 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 6");
3835 proto_tree_add_item(o43cl_v_tree, hf_bootp_option43_cl_mta_mac_address, tvb, suboptoff, 6, ENC_NA);
3838 if (o43cablelabs_opt[subopt].phf != NULL)
3839 proto_tree_add_item(o43cl_v_tree, *o43cablelabs_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3841 proto_tree_add_item(o43cl_v_tree, hf_bootp_option43_value, tvb, suboptoff, subopt_len, ENC_NA);
3845 if (bootp_handle_basic_types(pinfo, o43cl_v_tree, vti, tvb, o43cablelabs_opt[subopt].ftype,
3846 suboptoff, subopt_len, o43cablelabs_opt[subopt].phf, &default_hfs) == 0) {
3847 expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt);
3851 optoff += (subopt_len + 2);
3855 static const value_string option43_bsdp_suboption_vals[] = {
3856 { 1, "Message Type" },
3858 { 3, "Server Identifier" },
3859 { 4, "Server Priority" },
3860 { 5, "Reply Port" },
3861 { 6, "Boot Image List Path" },
3862 { 7, "Default Boot Image" },
3863 { 8, "Selected Boot Image" },
3864 { 9, "Boot Image List" },
3865 { 10, "NetBoot 1.0 Firmware" },
3866 { 11, "Boot Image Attributes Filter List" },
3867 { 12, "Maximum Message Size" },
3872 dissect_vendor_bsdp_boot_image(proto_tree *v_tree, tvbuff_t *tvb, int optoff)
3874 static const int * bootp_o43_bsdp_attributes_flags[] = {
3875 &hf_bootp_option43_bsdp_boot_image_attribute_install,
3876 &hf_bootp_option43_bsdp_boot_image_attribute_kind,
3877 &hf_bootp_option43_bsdp_boot_image_attribute_reserved,
3881 proto_tree_add_bitmask(v_tree, tvb, optoff, hf_bootp_option43_bsdp_boot_image_attribute, ett_bootp_o43_bsdp_attributes_flags, bootp_o43_bsdp_attributes_flags, ENC_NA);
3885 dissect_vendor_bsdp_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
3886 tvbuff_t *tvb, int optoff, int optend)
3888 int suboptoff = optoff;
3890 guint8 subopt, string_len;
3891 guint8 subopt_len, attributes_len;
3892 proto_tree *o43bsdp_v_tree, *o43bsdp_va_tree, *o43bsdp_vb_tree, *o43bsdp_vc_tree, *o43bsdp_vd_tree;
3893 proto_item *vti, *ti, *tj;
3895 subopt = tvb_get_guint8(tvb, optoff);
3898 if (suboptoff >= optend) {
3899 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
3900 "Suboption %d: no room left in option for suboption length", subopt);
3904 subopt_len = tvb_get_guint8(tvb, suboptoff);
3905 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_bsdp_suboption,
3906 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
3907 subopt, val_to_str_const(subopt, option43_bsdp_suboption_vals, "Unknown"));
3909 o43bsdp_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption);
3910 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
3913 if (suboptoff+subopt_len > optend) {
3914 expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value,
3915 "Suboption %d: no room left in option for suboption value", subopt);
3922 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_message_type, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA);
3925 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_version, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3928 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_server_identifier, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3931 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_server_priority, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3934 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_reply_port, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
3937 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_boot_image_list_path, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA);
3940 ti = proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_default_boot_image_id, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN|ENC_NA);
3941 o43bsdp_va_tree = proto_item_add_subtree(ti, ett_bootp_o43_bsdp_boot_image);
3942 dissect_vendor_bsdp_boot_image(o43bsdp_va_tree, tvb, suboptoff);
3943 proto_tree_add_item(o43bsdp_va_tree, hf_bootp_option43_bsdp_boot_image_index, tvb, suboptoff+2, subopt_len-2, ENC_BIG_ENDIAN|ENC_NA);
3946 ti = proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_selected_boot_image_id, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN|ENC_NA);
3947 o43bsdp_vc_tree = proto_item_add_subtree(ti, ett_bootp_o43_bsdp_boot_image);
3948 dissect_vendor_bsdp_boot_image(o43bsdp_vc_tree, tvb, suboptoff);
3949 proto_tree_add_item(o43bsdp_vc_tree, hf_bootp_option43_bsdp_boot_image_index, tvb, suboptoff+2, subopt_len-2, ENC_BIG_ENDIAN|ENC_NA);
3952 ti = proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_boot_image_list, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN|ENC_NA);
3953 attributes_len = subopt_len;
3954 attributes_off = suboptoff;
3955 o43bsdp_vd_tree = proto_item_add_subtree(ti, ett_bootp_o43_bsdp_image_desc_list);
3956 while (attributes_len >= 5) {
3957 string_len = tvb_get_guint8(tvb, attributes_off+4);
3958 if (string_len > 0) {
3959 tj = proto_tree_add_item(o43bsdp_vd_tree, hf_bootp_option43_bsdp_image_desc, tvb, attributes_off, string_len+5, ENC_BIG_ENDIAN|ENC_NA);
3960 o43bsdp_vb_tree = proto_item_add_subtree(tj, ett_bootp_o43_bsdp_image_desc);
3961 dissect_vendor_bsdp_boot_image(o43bsdp_vb_tree, tvb, attributes_off);
3962 proto_tree_add_item(o43bsdp_vb_tree, hf_bootp_option43_bsdp_boot_image_index, tvb, attributes_off+2, 2, ENC_BIG_ENDIAN|ENC_NA);
3963 proto_tree_add_item(o43bsdp_vb_tree, hf_bootp_option43_bsdp_boot_image_name_len, tvb, attributes_off+4, 1, ENC_BIG_ENDIAN|ENC_NA);
3964 proto_tree_add_item(o43bsdp_vb_tree, hf_bootp_option43_bsdp_boot_image_name, tvb, attributes_off+5, string_len, ENC_UTF_8|ENC_NA);
3966 attributes_off += 5 + string_len;
3967 attributes_len -= 5 + string_len;
3971 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_netboot_firmware, tvb, suboptoff, subopt_len, ENC_NA);
3974 ti = proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_attributes_filter_list, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN|ENC_NA);
3975 attributes_len = subopt_len;
3976 attributes_off = suboptoff;
3977 o43bsdp_va_tree = proto_item_add_subtree(ti, ett_bootp_o43_bsdp_attributes);
3978 while (attributes_len >= 2) {
3979 dissect_vendor_bsdp_boot_image(o43bsdp_va_tree, tvb, attributes_off);
3985 proto_tree_add_item(o43bsdp_v_tree, hf_bootp_option43_bsdp_message_size, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN|ENC_NA);
3989 optoff += (subopt_len + 2);
3994 dissect_vendor_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
3995 tvbuff_t *tvb, int optoff, int optend)
3997 int suboptoff = optoff;
4001 proto_tree *sub_tree;
4003 item = proto_tree_add_item(v_tree, hf_bootp_vendor_unknown_suboption, tvb, optoff, 1, ENC_NA);
4004 subopt = tvb_get_guint8(tvb, optoff);
4008 if (suboptoff >= optend) {
4009 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
4010 "Suboption %d: no room left in option for suboption length", subopt);
4014 sub_tree = proto_item_add_subtree(item, ett_bootp_option125_suboption);
4015 proto_tree_add_item_ret_uint(sub_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_NA, &subopt_len);
4018 if (suboptoff+subopt_len > optend) {
4019 expert_add_info_format(pinfo, item, &ei_bootp_missing_subopt_value,
4020 "Suboption %d: no room left in option for suboption value", subopt);
4024 proto_tree_add_item(sub_tree, hf_bootp_suboption_data, tvb, suboptoff, subopt_len, ENC_NA);
4025 suboptoff+= subopt_len;
4030 static const value_string option43_alcatel_suboption_vals[] = {
4032 { 58, "Voice VLAN ID" },
4033 { 64, "Spatial Redundancy TFTP1" },
4034 { 65, "Spatial Redundancy TFTP2" },
4035 { 66, "Application Type" },
4037 { 255, "Alcatel-Lucent End" },
4041 static const value_string option43_alcatel_app_type_vals[] = {
4047 /* Look for 'encapsulated vendor-specific options' */
4049 test_encapsulated_vendor_options(tvbuff_t *tvb, int optoff, int optend)
4054 while (optoff < optend) {
4055 subopt = tvb_get_guint8(tvb, optoff);
4061 /* We are done, skip any remaining bytes */
4065 /* We expect a length byte next */
4066 if (optoff >= optend)
4068 subopt_len = tvb_get_guint8(tvb, optoff);
4071 /* Check remaining room for suboption in option */
4072 if (optoff + subopt_len > optend)
4074 optoff += subopt_len;
4080 dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
4081 tvbuff_t *tvb, int optoff, int optend)
4083 int suboptoff = optoff;
4087 proto_tree *o43alcatel_v_tree;
4089 subopt = tvb_get_guint8(tvb, optoff);
4093 proto_tree_add_item(v_tree, hf_bootp_option43_alcatel_padding, tvb, optoff, 1, ENC_BIG_ENDIAN);
4095 } else if (subopt == 255) { /* End Option */
4096 proto_tree_add_item(v_tree, hf_bootp_option43_alcatel_end, tvb, optoff, 1, ENC_BIG_ENDIAN);
4097 /* Make sure we skip any junk left this option */
4101 if (suboptoff >= optend) {
4102 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
4103 "Suboption %d: no room left in option for suboption length", subopt);
4107 subopt_len = tvb_get_guint8(tvb, suboptoff);
4108 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_alcatel_suboption,
4109 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
4110 subopt, val_to_str_const(subopt, option43_alcatel_suboption_vals, "Unknown"));
4112 o43alcatel_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption);
4113 proto_tree_add_item(o43alcatel_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
4116 if (suboptoff+subopt_len > optend) {
4117 expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value,
4118 "Suboption %d: no room left in option for suboption value", subopt);
4124 case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */
4125 if (subopt_len != 2) {
4126 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 2");
4130 proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_vlan_id, tvb, suboptoff, 2, ENC_BIG_ENDIAN);
4132 case 64: /* 0x40 - Alcatel-Lucent TFTP1 */
4133 if (subopt_len != 4) {
4134 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 4");
4138 proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_tftp1, tvb, suboptoff, 4, ENC_BIG_ENDIAN);
4140 case 65: /* 0x41 - Alcatel-Lucent TFTP2 */
4141 if (subopt_len != 4) {
4142 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 4");
4146 proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_tftp2, tvb, suboptoff, 4, ENC_BIG_ENDIAN);
4148 case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */
4149 if (subopt_len != 1) {
4150 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 1");
4153 proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_app_type, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
4155 case 67: /* 0x43 - Alcatel-Lucent SIP URL */
4156 proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_sip_url, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA);
4159 expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt);
4163 optoff += (subopt_len + 2);
4167 static const value_string option63_suboption_vals[] = {
4168 { 1, "NWIP does not exist on subnet" },
4169 { 2, "NWIP exists in options area" },
4170 { 3, "NWIP exists in sname/file" },
4171 { 4, "NWIP exists, but too big" },
4172 { 5, "Broadcast for nearest Netware server" },
4173 { 6, "Preferred DSS server" },
4174 { 7, "Nearest NWIP server" },
4175 { 8, "Autoretries" },
4176 { 9, "Autoretry delay, secs" },
4177 { 10, "Support NetWare/IP v1.1" },
4178 { 11, "Primary DSS" },
4183 dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
4184 tvbuff_t *tvb, int optoff, int optend)
4186 int suboptoff = optoff;
4187 guint8 subopt, subopt_len;
4188 proto_tree *o63_v_tree;
4189 proto_item *vti, *ti;
4191 struct basic_types_hfs default_hfs = {
4193 &hf_bootp_option63_value_ip_address,
4194 &hf_bootp_option63_value_ip_address,
4196 &hf_bootp_option63_value_boolean,
4197 &hf_bootp_option63_value_8,
4205 static struct opt_info o63_opt[]= {
4206 /* 0 */ {"",none,NULL},
4207 /* 1 */ {"NWIP does not exist on subnet",presence,NULL},
4208 /* 2 */ {"NWIP exists in options area",presence,NULL},
4209 /* 3 */ {"NWIP exists in sname/file",presence,NULL},
4210 /* 4 */ {"NWIP exists, but too big",presence,NULL},
4211 /* 5 */ {"Broadcast for nearest Netware server",val_boolean, &hf_bootp_option63_broadcast},
4212 /* 6 */ {"Preferred DSS server",ipv4_list,&hf_bootp_option63_preferred_dss_server},
4213 /* 7 */ {"Nearest NWIP server",ipv4_list,&hf_bootp_option63_nearest_nwip_server},
4214 /* 8 */ {"Autoretries",val_u_byte,&hf_bootp_option63_autoretries},
4215 /* 9 */ {"Autoretry delay, secs",val_u_byte,&hf_bootp_option63_autoretry_delay},
4216 /* 10*/ {"Support NetWare/IP v1.1",val_boolean,&hf_bootp_option63_support_netware_v1_1},
4217 /* 11*/ {"Primary DSS",ipv4,&hf_bootp_option63_primary_dss}
4220 subopt = tvb_get_guint8(tvb, optoff);
4223 if (suboptoff >= optend) {
4224 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
4225 "Suboption %d: no room left in option for suboption length", subopt);
4229 subopt_len = tvb_get_guint8(tvb, suboptoff);
4230 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option63_suboption,
4231 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
4232 subopt, val_to_str_const(subopt, option63_suboption_vals, "Unknown"));
4234 o63_v_tree = proto_item_add_subtree(vti, ett_bootp_option63_suboption);
4235 proto_tree_add_item(o63_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
4238 ti = proto_tree_add_item(o63_v_tree, hf_bootp_option63_value, tvb, suboptoff, subopt_len, ENC_NA);
4239 PROTO_ITEM_SET_HIDDEN(ti);
4241 if (subopt < array_length(o63_opt)) {
4242 if (bootp_handle_basic_types(pinfo, o63_v_tree, vti, tvb, o63_opt[subopt].ftype,
4243 suboptoff, subopt_len, o63_opt[subopt].phf, &default_hfs) == 0) {
4244 switch(o63_opt[subopt].ftype)
4247 if (subopt_len != 0) {
4248 expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 0");
4252 if (o63_opt[subopt].phf == NULL)
4253 proto_tree_add_item(o63_v_tree, hf_bootp_option63_value, tvb, suboptoff, subopt_len, ENC_NA);
4258 optoff += (subopt_len + 2);
4262 static const value_string option125_tr111_suboption_vals[] = {
4263 { 1, "DeviceManufacturerOUI" },
4264 { 2, "DeviceSerialNumber" },
4265 { 3, "DeviceProductClass" },
4266 { 4, "GatewayManufacturerOUI" },
4267 { 5, "GatewaySerialNumber" },
4268 { 6, "GatewayProductClass" },
4273 dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
4274 tvbuff_t *tvb, int optoff, int optend)
4276 int suboptoff = optoff;
4277 proto_tree *o125_v_tree;
4278 proto_item *vti, *ti;
4279 guint8 subopt, subopt_len;
4281 struct basic_types_hfs default_hfs = {
4285 &hf_bootp_option125_value_stringz,
4295 /* Reference: TR-111 DHCP Option 125 Sub-Option Data Fields
4299 static struct opt_info o125_tr111_opt[]= {
4300 /* 0 */ {"nop", special, NULL}, /* dummy */
4301 /* 1 */ {"DeviceManufacturerOUI", oui, &hf_bootp_option125_tr111_device_manufacturer_oui},
4302 /* 2 */ {"DeviceSerialNumber", string, &hf_bootp_option125_tr111_device_serial_number},
4303 /* 3 */ {"DeviceProductClass", string, &hf_bootp_option125_tr111_device_product_class},
4304 /* 4 */ {"GatewayManufacturerOUI", string, &hf_bootp_option125_tr111_gateway_manufacturer_oui},
4305 /* 5 */ {"GatewaySerialNumber", string, &hf_bootp_option125_tr111_gateway_serial_number},
4306 /* 6 */ {"GatewayProductClass", string, &hf_bootp_option125_tr111_gateway_product_class},
4309 subopt = tvb_get_guint8(tvb, optoff);
4312 if (suboptoff >= optend) {
4313 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
4314 "Suboption %d: no room left in option for suboption length", subopt);
4318 subopt_len = tvb_get_guint8(tvb, suboptoff);
4319 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option125_tr111_suboption,
4320 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
4321 subopt, val_to_str_const(subopt, option125_tr111_suboption_vals, "Unknown"));
4323 o125_v_tree = proto_item_add_subtree(vti, ett_bootp_option125_tr111_suboption);
4324 proto_tree_add_item(o125_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
4327 if (suboptoff+subopt_len > optend) {
4328 expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value,
4329 "Suboption %d: no room left in option for suboption value", subopt);
4333 ti = proto_tree_add_item(v_tree, hf_bootp_option125_value, tvb, suboptoff, subopt_len, ENC_NA);
4334 PROTO_ITEM_SET_HIDDEN(ti);
4336 if (subopt < array_length(o125_tr111_opt)) {
4337 if (bootp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_tr111_opt[subopt].ftype, suboptoff, subopt_len, o125_tr111_opt[subopt].phf, &default_hfs) == 0) {
4338 if (o125_tr111_opt[subopt].ftype == special) {
4339 if (o125_tr111_opt[subopt].phf != NULL)
4340 proto_tree_add_item(v_tree, *o125_tr111_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
4342 proto_tree_add_item(v_tree, hf_bootp_option125_value, tvb, suboptoff, subopt_len, ENC_NA);
4344 else if (o125_tr111_opt[subopt].ftype == oui) {
4345 /* Get hex string. Expecting 6 characters. */
4346 gchar *oui_string = tvb_get_string_enc(wmem_packet_scope(), tvb, suboptoff, subopt_len, ENC_ASCII);
4347 /* Convert to OUI number. Only 3 bytes so no data lost in downcast. */
4348 guint32 oui_number = (guint32)strtol(oui_string, NULL, 16);
4349 /* Add item using oui_vals */
4350 proto_tree_add_uint(v_tree, *o125_tr111_opt[subopt].phf, tvb, suboptoff, subopt_len, oui_number);
4351 } else if (o125_tr111_opt[subopt].phf == NULL)
4352 proto_tree_add_item(v_tree, hf_bootp_option125_value, tvb, suboptoff, subopt_len, ENC_NA);
4356 optoff += (subopt_len + 2);
4360 static const value_string option125_cl_suboption_vals[] = {
4361 { 1, "Option Request" },
4362 { 2, "TFTP Server Addresses" },
4363 { 3, "eRouter Container Option" },
4364 { 4, "MIB Environment Indicator Option" },
4365 { 5, "Modem Capabilities" },
4369 static const value_string pkt_mib_env_ind_opt_vals[] = {
4370 { 0x00, "Reserved" },
4371 { 0x01, "CableLabs" },
4373 { 0x03, "EuroCableLabs" },
4378 dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
4379 tvbuff_t *tvb, int optoff, int optend)
4381 int suboptoff = optoff;
4382 guint8 subopt, subopt_len;
4383 proto_tree *o125_v_tree;
4386 struct basic_types_hfs default_hfs = {
4387 &hf_bootp_option125_value,
4388 &hf_bootp_option125_value_ip_address,
4389 &hf_bootp_option125_value_ip_address,
4390 &hf_bootp_option125_value_stringz,
4392 &hf_bootp_option125_value_8,
4393 &hf_bootp_option125_value_16,
4400 static struct opt_info o125_cl_opt[]= {
4401 /* 0 */ {"nop", special, NULL}, /* dummy */
4402 /* 1 */ {"Option Request = ", bytes, &hf_bootp_option125_cl_option_request},
4403 /* 2 */ {"TFTP Server Addresses : ", ipv4_list, &hf_bootp_option125_cl_tftp_server_addresses},
4404 /* 3 */ {"eRouter Container Option : ", bytes, &hf_bootp_option125_cl_erouter_container_option},
4405 /* 4 */ {"MIB Environment Indicator Option = ", val_u_byte, &hf_bootp_option125_cl_mib_environment_indicator_option},
4406 /* 5 */ {"Modem Capabilities : ", special, &hf_bootp_option125_cl_modem_capabilities},
4409 subopt = tvb_get_guint8(tvb, optoff);
4412 if (suboptoff >= optend) {
4413 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
4414 "Suboption %d: no room left in option for suboption length", subopt);
4418 subopt_len = tvb_get_guint8(tvb, suboptoff);
4419 vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option125_cl_suboption,
4420 tvb, optoff, subopt_len+2, subopt, "(%d) %s",
4421 subopt, val_to_str_const(subopt, option125_cl_suboption_vals, "Unknown"));
4423 o125_v_tree = proto_item_add_subtree(vti, ett_bootp_option125_cl_suboption);
4424 proto_tree_add_item(o125_v_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
4427 if (suboptoff+subopt_len > optend) {
4428 expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value,
4429 "Suboption %d: no room left in option for suboption value", subopt);
4433 if (subopt < array_length(o125_cl_opt)) {
4434 if (bootp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_cl_opt[subopt].ftype,
4435 suboptoff, subopt_len, o125_cl_opt[subopt].phf, &default_hfs) == 0) {
4437 switch(o125_cl_opt[subopt].ftype) {
4439 if (o125_cl_opt[subopt].phf != NULL)
4440 proto_tree_add_item(o125_v_tree, *o125_cl_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
4442 proto_tree_add_item(o125_v_tree, hf_bootp_option125_value, tvb, suboptoff, subopt_len, ENC_NA);
4444 case 5: /* Modem Capabilities */
4445 dissect_docsis_cm_cap(o125_v_tree, tvb, optoff, subopt_len+2, TRUE);
4450 if (o125_cl_opt[subopt].phf == NULL)
4451 proto_tree_add_item(o125_v_tree, hf_bootp_option125_value, tvb, suboptoff, subopt_len, ENC_NA);
4457 optoff += (subopt_len + 2);
4461 /* PacketCable Multimedia Terminal Adapter device capabilities (option 60).
4462 Ref: PKT-SP-I05-021127 sections 8.2 and 10 */
4464 #define PKT_MDC_TLV_OFF 10
4467 /* These are ASCII-encoded hexadecimal digits. We use the raw hex equivalent for
4469 #define PKT_MDC_VERSION 0x3031 /* "01" */
4470 #define PKT_MDC_TEL_END 0x3032 /* "02" */
4471 #define PKT_MDC_TGT 0x3033 /* "03" */
4472 #define PKT_MDC_HTTP_ACC 0x3034 /* "04" */
4473 #define PKT_MDC_SYSLOG 0x3035 /* "05" */
4474 #define PKT_MDC_NCS 0x3036 /* "06" */
4475 #define PKT_MDC_PRI_LINE 0x3037 /* "07" */
4476 #define PKT_MDC_VENDOR_TLV 0x3038 /* "08" */
4477 #define PKT_MDC_NVRAM_STOR 0x3039 /* "09" */
4478 #define PKT_MDC_PROV_REP 0x3041 /* "0A" */
4479 #define PKT_MDC_PROV_REP_LC 0x3061 /* "0a" */
4480 #define PKT_MDC_SUPP_CODECS 0x3042 /* "0B" */
4481 #define PKT_MDC_SUPP_CODECS_LC 0x3062 /* "0b" */
4482 #define PKT_MDC_SILENCE 0x3043 /* "0C" */
4483 #define PKT_MDC_SILENCE_LC 0x3063 /* "0c" */
4484 #define PKT_MDC_ECHO_CANCEL 0x3044 /* "0D" */
4485 #define PKT_MDC_ECHO_CANCEL_LC 0x3064 /* "0d" */
4486 #define PKT_MDC_RSVP 0x3045 /* "0E" */
4487 #define PKT_MDC_RSVP_LC 0x3065 /* "0e" */
4488 #define PKT_MDC_UGS_AD 0x3046 /* "0F" */
4489 #define PKT_MDC_UGS_AD_LC 0x3066 /* "0f" */
4490 #define PKT_MDC_IF_INDEX 0x3130 /* "10" */
4491 #define PKT_MDC_FLOW_LOG 0x3131 /* "11" */
4492 #define PKT_MDC_PROV_FLOWS 0x3132 /* "12" */
4493 /* PacketCable 1.5: */
4494 #define PKT_MDC_T38_VERSION 0x3133 /* "13" */
4495 #define PKT_MDC_T38_EC 0x3134 /* "14" */
4496 #define PKT_MDC_RFC2833_DTMF 0x3135 /* "15" */
4497 #define PKT_MDC_VOICE_METRICS 0x3136 /* "16" */
4498 #define PKT_MDC_MIBS 0x3137 /* "17" */
4499 #define PKT_MDC_MGPI 0x3138 /* "18" */
4500 #define PKT_MDC_V152 0x3139 /* "19" */
4501 #define PKT_MDC_CBS 0x3141 /* "1A" */
4502 #define PKT_MDC_CBS_LC 0x3161 /* "1a" */
4504 static const value_string pkt_mdc_type_vals[] = {
4505 { PKT_MDC_VERSION, "PacketCable Version" },
4506 { PKT_MDC_TEL_END, "Number Of Telephony Endpoints" },
4507 { PKT_MDC_TGT, "TGT Support" },
4508 { PKT_MDC_HTTP_ACC, "HTTP Download File Access Method Support" },
4509 { PKT_MDC_SYSLOG, "MTA-24 Event SYSLOG Notification Support" },
4510 { PKT_MDC_NCS, "NCS Service Flow Support" },
4511 { PKT_MDC_PRI_LINE, "Primary Line Support" },
4512 { PKT_MDC_VENDOR_TLV, "Vendor Specific TLV Type(s)" },
4513 { PKT_MDC_NVRAM_STOR, "NVRAM Ticket/Session Keys Storage Support" },
4514 { PKT_MDC_PROV_REP, "Provisioning Event Reporting Support" },
4515 { PKT_MDC_PROV_REP_LC, "Provisioning Event Reporting Support" },
4516 { PKT_MDC_SUPP_CODECS, "Supported CODEC(s)" },
4517 { PKT_MDC_SUPP_CODECS_LC, "Supported CODEC(s)" },
4518 { PKT_MDC_SILENCE, "Silence Suppression Support" },
4519 { PKT_MDC_SILENCE_LC, "Silence Suppression Support" },
4520 { PKT_MDC_ECHO_CANCEL, "Echo Cancellation Support" },
4521 { PKT_MDC_ECHO_CANCEL_LC, "Echo Cancellation Support" },
4522 { PKT_MDC_RSVP, "RSVP Support/ Reserved" },
4523 { PKT_MDC_RSVP_LC, "RSVP Support/ Reserved" },
4524 { PKT_MDC_UGS_AD, "UGS-AD Support" },
4525 { PKT_MDC_UGS_AD_LC, "UGS-AD Support" },
4526 { PKT_MDC_IF_INDEX, "MTA's \"ifIndex\" starting number in \"ifTable\"" },
4527 { PKT_MDC_FLOW_LOG, "Provisioning Flow Logging Support" },
4528 { PKT_MDC_PROV_FLOWS, "Supported Provisioning Flows" },
4529 /* PacketCable 1.5: */
4530 { PKT_MDC_T38_VERSION, "T38 Version Support" },
4531 { PKT_MDC_T38_EC, "T38 Error Correction Support" },
4532 { PKT_MDC_RFC2833_DTMF, "RFC 2833 DTMF Support" },
4533 { PKT_MDC_VOICE_METRICS, "Voice Metrics Support" },
4534 { PKT_MDC_MIBS, "MIB Support" },
4535 { PKT_MDC_MGPI, "Multiple Grants Per Interval Support" },
4536 { PKT_MDC_V152, "V.152 Support" },
4537 /* PacketCable 2.0: */
4538 { PKT_MDC_CBS, "Certificate Bootstrapping Support" },
4539 { PKT_MDC_CBS_LC, "Certificate Bootstrapping Support" },
4543 static const value_string pkt_mdc_version_vals[] = {
4544 { 0x3030, "PacketCable 1.0" },
4545 { 0x3031, "PacketCable 1.1/1.5" }, /* 1.5 replaces 1.1-1.3 */
4546 { 0x3032, "PacketCable 2.0" },
4550 static const value_string pkt_mdc_boolean_vals[] = {
4556 static const value_string pkt_mdc_codec_vals[] = {
4557 { 0x3031, "other" }, /* "01" */
4558 { 0x3032, "unknown" },
4559 { 0x3033, "G.729" },
4560 { 0x3034, "reserved" },
4561 { 0x3035, "G.729E" },
4563 { 0x3037, "G.726-32" },
4564 { 0x3038, "G.728" },
4565 { 0x3039, "PCMA" }, /* "09" */
4566 { 0x3041, "G.726-16" }, /* "0A" */
4567 { 0x3042, "G.726-24" },
4568 { 0x3043, "G.726-40" },
4571 { 0x3046, "telephone-event" }, /* "0F" */
4575 static const value_string pkt_mdc_t38_version_vals[] = {
4576 { 0x3030, "Unsupported" },
4577 { 0x3031, "T.38 Version Zero" }, /* default */
4578 { 0x3032, "T.38 Version One" },
4579 { 0x3033, "T.38 Version Two" },
4580 { 0x3035, "T.38 Version Three" },
4584 static const value_string pkt_mdc_t38_ec_vals[] = {
4586 { 0x3031, "Redundancy" }, /* default */
4591 static const value_string pkt_mdc_mib_orgs[] = {
4592 { 0x3030, "CableLabs" },
4594 { 0x3032, "EuroCableLabs" },
4595 { 0x3033, "Reserved" },
4596 { 0x3034, "Reserved" },
4597 { 0x3035, "Reserved" },
4598 { 0x3036, "Reserved" },
4599 { 0x3037, "Reserved" },
4600 { 0x3038, "Reserved" },
4601 { 0x3039, "Reserved" },
4605 static int hf_bootp_pkt_mdc_supp_flow_secure = -1;
4606 static int hf_bootp_pkt_mdc_supp_flow_hybrid = -1;
4607 static int hf_bootp_pkt_mdc_supp_flow_basic = -1;
4609 #define PKT_MDC_MIB_CL 0x3030
4610 static int hf_bootp_pkt_mdc_mib_cl_mta = -1;
4611 static int hf_bootp_pkt_mdc_mib_cl_signaling = -1;
4612 static int hf_bootp_pkt_mdc_mib_cl_management_event = -1;
4613 static int hf_bootp_pkt_mdc_mib_cl_mta_extension = -1;
4614 static int hf_bootp_pkt_mdc_mib_cl_mta_signaling_extension = -1;
4615 static int hf_bootp_pkt_mdc_mib_cl_mta_mem_extention = -1;
4616 static int hf_bootp_pkt_mdc_mib_cl_reserved = -1;
4618 #define PKT_MDC_MIB_IETF 0x3031
4619 static int hf_bootp_pkt_mdc_mib_ietf_mta = -1;
4620 static int hf_bootp_pkt_mdc_mib_ietf_signaling = -1;
4621 static int hf_bootp_pkt_mdc_mib_ietf_management_event = -1;
4622 static int hf_bootp_pkt_mdc_mib_ietf_reserved = -1;
4624 #define PKT_MDC_MIB_EURO 0x3032
4625 static int hf_bootp_pkt_mdc_mib_euro_mta = -1;
4626 static int hf_bootp_pkt_mdc_mib_euro_signaling = -1;
4627 static int hf_bootp_pkt_mdc_mib_euro_management_event = -1;
4628 static int hf_bootp_pkt_mdc_mib_euro_mta_extension = -1;
4629 static int hf_bootp_pkt_mdc_mib_euro_mta_signaling_extension = -1;
4630 static int hf_bootp_pkt_mdc_mib_euro_mta_mem_extention = -1;
4631 static int hf_bootp_pkt_mdc_mib_euro_reserved = -1;
4635 dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tvb, int voff, int len)
4638 guint32 flow_val = 0;
4639 int off = PKT_MDC_TLV_OFF + voff;
4640 int subopt_off, max_len;
4641 guint tlv_len, i, mib_val;
4642 guint8 asc_val[3] = " ", flow_val_str[5];
4643 proto_item *ti, *mib_ti;
4644 proto_tree *subtree, *subtree2;
4646 tvb_memcpy (tvb, asc_val, off, 2);
4647 if (sscanf((gchar*)asc_val, "%x", &tlv_len) != 1 || tlv_len > 0xff) {
4648 proto_tree_add_expert_format(v_tree, pinfo, &ei_bootp_bad_length, tvb, off, len - off,
4649 "Bogus length: %s", asc_val);
4652 proto_tree_add_uint(v_tree, hf_bootp_pkt_mta_cap_len, tvb, off, 2, tlv_len);
4655 while (off - voff < len) {
4657 raw_val = tvb_get_ntohs (tvb, off);
4660 tvb_memcpy(tvb, asc_val, off + 2, 2);
4661 if (sscanf((gchar*)asc_val, "%x", &tlv_len) != 1
4662 || tlv_len < 1 || tlv_len > G_MAXUINT16) {
4663 proto_tree_add_expert_format(v_tree, pinfo, &ei_bootp_bad_length, tvb, off, len - off,
4664 "Bogus length: %s", asc_val);
4669 ti = proto_tree_add_uint_format(v_tree, hf_bootp_pkt_mta_cap_type,
4670 tvb, off, 2, raw_val, "0x%s: %s = ",
4671 tvb_format_text(tvb, off, 2),
4672 val_to_str_const(raw_val, pkt_mdc_type_vals, "unknown"));
4673 proto_item_set_len(ti, (tlv_len * 2) + 4);
4676 case PKT_MDC_VERSION:
4677 raw_val = tvb_get_ntohs(tvb, off + 4);
4678 proto_item_append_text(ti,
4680 val_to_str_const(raw_val, pkt_mdc_version_vals, "Reserved"),
4681 tvb_format_stringzpad(tvb, off + 4, 2) );
4684 case PKT_MDC_TEL_END:
4685 case PKT_MDC_IF_INDEX:
4686 proto_item_append_text(ti,
4688 tvb_format_stringzpad(tvb, off + 4, 2) );
4692 case PKT_MDC_HTTP_ACC:
4693 case PKT_MDC_SYSLOG:
4695 case PKT_MDC_PRI_LINE:
4696 case PKT_MDC_NVRAM_STOR:
4697 case PKT_MDC_PROV_REP:
4698 case PKT_MDC_PROV_REP_LC:
4699 case PKT_MDC_SILENCE:
4700 case PKT_MDC_SILENCE_LC:
4701 case PKT_MDC_ECHO_CANCEL:
4702 case PKT_MDC_ECHO_CANCEL_LC:
4704 case PKT_MDC_RSVP_LC:
4705 case PKT_MDC_UGS_AD:
4706 case PKT_MDC_UGS_AD_LC:
4707 case PKT_MDC_FLOW_LOG:
4708 case PKT_MDC_RFC2833_DTMF:
4709 case PKT_MDC_VOICE_METRICS:
4713 case PKT_MDC_CBS_LC:
4714 raw_val = tvb_get_ntohs(tvb, off + 4);
4715 proto_item_append_text(ti,
4717 val_to_str_const(raw_val, pkt_mdc_boolean_vals, "unknown"),
4718 tvb_format_stringzpad(tvb, off + 4, 2) );
4721 case PKT_MDC_SUPP_CODECS:
4722 case PKT_MDC_SUPP_CODECS_LC:
4723 for (i = 0; i < tlv_len; i++) {
4724 raw_val = tvb_get_ntohs(tvb, off + 4 + (i * 2) );
4725 proto_item_append_text(ti,
4727 plurality(i + 1, "", ", "),
4728 val_to_str_const(raw_val, pkt_mdc_codec_vals, "unknown"),
4729 tvb_format_stringzpad(tvb, off + 4 + (i * 2), 2) );
4733 case PKT_MDC_PROV_FLOWS:
4734 tvb_memcpy(tvb, flow_val_str, off + 4, 4);
4735 flow_val_str[4] = '\0';
4736 /* We are only reading 4 digits which should fit in 32 bits */
4737 flow_val = (guint32)strtoul((gchar*)flow_val_str, NULL, 16);
4738 proto_item_append_text(ti,
4739 "0x%04x", flow_val);
4742 case PKT_MDC_T38_VERSION:
4743 raw_val = tvb_get_ntohs(tvb, off + 4);
4744 proto_item_append_text(ti,
4746 val_to_str_const(raw_val, pkt_mdc_t38_version_vals, "unknown"),
4747 tvb_format_stringzpad(tvb, off + 4, 2) );
4750 case PKT_MDC_T38_EC:
4751 raw_val = tvb_get_ntohs(tvb, off + 4);
4752 proto_item_append_text(ti,
4754 val_to_str_const(raw_val, pkt_mdc_t38_ec_vals, "unknown"),
4755 tvb_format_stringzpad(tvb, off + 4, 2) );
4761 case PKT_MDC_VENDOR_TLV:
4763 proto_item_append_text(ti,
4765 tvb_format_stringzpad(tvb, off + 4, tlv_len * 2) );
4769 subtree = proto_item_add_subtree(ti, ett_bootp_option);
4770 if (raw_val == PKT_MDC_PROV_FLOWS) {
4771 static const int * flows[] = {
4772 &hf_bootp_pkt_mdc_supp_flow_secure,
4773 &hf_bootp_pkt_mdc_supp_flow_hybrid,
4774 &hf_bootp_pkt_mdc_supp_flow_basic,
4778 proto_tree_add_bitmask_list_value(subtree, tvb, off + 4, 4, flows, flow_val);
4779 } else if (raw_val == PKT_MDC_MIBS) {
4780 /* 17 06 02 00 38 02 01 07 */
4781 subopt_off = off + 4;
4782 max_len = subopt_off + (tlv_len * 2);
4783 while (subopt_off < max_len) {
4784 raw_val = tvb_get_ntohs(tvb, subopt_off);
4785 if (raw_val != 0x3032) { /* We only know how to handle a length of 2 */
4786 tvb_memcpy(tvb, asc_val, subopt_off, 2);
4787 proto_tree_add_expert_format(subtree, pinfo, &ei_bootp_bad_length, tvb, subopt_off, 2,
4788 "Bogus length: %s", asc_val);
4793 raw_val = tvb_get_ntohs(tvb, subopt_off);
4794 tvb_memcpy(tvb, asc_val, subopt_off, 2);
4796 subtree2 = proto_tree_add_subtree_format(subtree, tvb, subopt_off, 2,
4797 ett_bootp_option, &mib_ti, "%s (%s)",
4798 val_to_str_const(raw_val, pkt_mdc_mib_orgs, "Unknown"), asc_val);
4799 if (subopt_off > off + 4 + 2) {
4800 proto_item_append_text(ti, ", ");
4802 proto_item_append_text(ti, "%s", val_to_str_const(raw_val, pkt_mdc_mib_orgs, "Unknown"));
4805 tvb_memcpy(tvb, asc_val, subopt_off, 2);
4806 if (sscanf((gchar*)asc_val, "%x", &mib_val) != 1) {
4807 proto_tree_add_expert_format(v_tree, pinfo, &ei_bootp_bad_bitfield, tvb, subopt_off, 2,
4808 "Bogus bitfield: %s", asc_val);
4813 case PKT_MDC_MIB_CL: {
4814 static const int * cl_flags[] = {
4815 &hf_bootp_pkt_mdc_mib_cl_mta,
4816 &hf_bootp_pkt_mdc_mib_cl_signaling,
4817 &hf_bootp_pkt_mdc_mib_cl_management_event,
4818 &hf_bootp_pkt_mdc_mib_cl_mta_extension,
4819 &hf_bootp_pkt_mdc_mib_cl_mta_signaling_extension,
4820 &hf_bootp_pkt_mdc_mib_cl_mta_mem_extention,
4821 &hf_bootp_pkt_mdc_mib_cl_reserved,
4825 proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, cl_flags, mib_val);
4829 case PKT_MDC_MIB_IETF: {
4830 static const int * ietf_flags[] = {
4831 &hf_bootp_pkt_mdc_mib_ietf_mta,
4832 &hf_bootp_pkt_mdc_mib_ietf_signaling,
4833 &hf_bootp_pkt_mdc_mib_ietf_management_event,
4834 &hf_bootp_pkt_mdc_mib_ietf_reserved,
4838 proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, ietf_flags, mib_val);
4842 case PKT_MDC_MIB_EURO: {
4843 static const int * euro_flags[] = {
4844 &hf_bootp_pkt_mdc_mib_euro_mta,
4845 &hf_bootp_pkt_mdc_mib_euro_signaling,
4846 &hf_bootp_pkt_mdc_mib_euro_management_event,
4847 &hf_bootp_pkt_mdc_mib_euro_mta_extension,
4848 &hf_bootp_pkt_mdc_mib_euro_mta_signaling_extension,
4849 &hf_bootp_pkt_mdc_mib_euro_mta_mem_extention,
4850 &hf_bootp_pkt_mdc_mib_euro_reserved,
4854 proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, euro_flags, mib_val);
4865 off += (tlv_len * 2) + 4;
4870 /* DOCSIS Cable Modem device capabilities (option 60/option 125). */
4871 #define DOCSIS_CM_CAP_TLV_OFF 12
4873 #define DOCSIS_CM_CAP_CONCAT_SUP 0x01
4874 #define DOCSIS_CM_CAP_DOCSIS_VER 0x02
4875 #define DOCSIS_CM_CAP_FRAG_SUP 0x03
4876 #define DOCSIS_CM_CAP_PHS_SUP 0x04
4877 #define DOCSIS_CM_CAP_IGMP_SUP 0x05
4878 #define DOCSIS_CM_CAP_PRIV_SUP 0x06
4879 #define DOCSIS_CM_CAP_DSAID_SUP 0x07
4880 #define DOCSIS_CM_CAP_USSF_SUP 0x08
4881 #define DOCSIS_CM_CAP_FILT_SUP 0x09
4882 #define DOCSIS_CM_CAP_TET_MI 0x0a
4883 #define DOCSIS_CM_CAP_TET 0x0b
4884 #define DOCSIS_CM_CAP_DCC_SUP 0x0c
4885 #define DOCSIS_CM_CAP_IPFILT_SUP 0x0d
4886 #define DOCSIS_CM_CAP_LLCFILT_SUP 0x0e
4887 #define DOCSIS_CM_CAP_EXPUNI_SPACE 0x0f
4888 #define DOCSIS_CM_CAP_RNGHLDOFF_SUP 0x10
4889 #define DOCSIS_CM_CAP_L2VPN_SUP 0x11
4890 #define DOCSIS_CM_CAP_L2VPN_HOST_SUP 0x12
4891 #define DOCSIS_CM_CAP_DUTFILT_SUP 0x13
4892 #define DOCSIS_CM_CAP_USFREQRNG_SUP 0x14
4893 #define DOCSIS_CM_CAP_USSYMRATE_SUP 0x15
4894 #define DOCSIS_CM_CAP_SACM2_SUP 0x16
4895 #define DOCSIS_CM_CAP_SACM2HOP_SUP 0x17
4896 #define DOCSIS_CM_CAP_MULTTXCHAN_SUP 0x18
4897 #define DOCSIS_CM_CAP_512USTXCHAN_SUP 0x19
4898 #define DOCSIS_CM_CAP_256USTXCHAN_SUP 0x1a
4899 #define DOCSIS_CM_CAP_TOTALSIDCLU_SUP 0x1b
4900 #define DOCSIS_CM_CAP_SIDCLUPERSF_SUP 0x1c
4901 #define DOCSIS_CM_CAP_MULTRXCHAN_SUP 0x1d
4902 #define DOCSIS_CM_CAP_TOTALDSID_SUP 0x1e
4903 #define DOCSIS_CM_CAP_RESEQDSID_SUP 0x1f
4904 #define DOCSIS_CM_CAP_MULTDSID_SUP 0x20
4905 #define DOCSIS_CM_CAP_MULTDSIDFW_SUP 0x21
4906 #define DOCSIS_CM_CAP_FCTF_SUP 0x22
4907 #define DOCSIS_CM_CAP_DPV_SUP 0x23
4908 #define DOCSIS_CM_CAP_UGSPERUSFLOW_SUP 0x24
4909 #define DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP 0x25
4910 #define DOCSIS_CM_CAP_USDROPCLASSIF_SUP 0x26
4911 #define DOCSIS_CM_CAP_IPV6_SUP 0x27
4912 #define DOCSIS_CM_CAP_ExUsTrPow 0x28
4913 #define DOCSIS_CM_CAP_Opt802MPLSSup 0x29
4914 #define DOCSIS_CM_CAP_DounEnc 0x2a
4915 #define DOCSIS_CM_CAP_EnrgMang 0x2c
4917 static const value_string docsis_cm_cap_type_vals[] = {
4918 { DOCSIS_CM_CAP_CONCAT_SUP, "Concatenation Support" },
4919 { DOCSIS_CM_CAP_DOCSIS_VER, "DOCSIS Version" },
4920 { DOCSIS_CM_CAP_FRAG_SUP, "Fragmentation Support" },
4921 { DOCSIS_CM_CAP_PHS_SUP, "Payload Header Suppression Support" },
4922 { DOCSIS_CM_CAP_IGMP_SUP, "IGMP Support" },
4923 { DOCSIS_CM_CAP_PRIV_SUP, "Privacy Support" },
4924 { DOCSIS_CM_CAP_DSAID_SUP, "Downstream SAID Support" },
4925 { DOCSIS_CM_CAP_USSF_SUP, "Upstream Service Flow Support" },
4926 { DOCSIS_CM_CAP_FILT_SUP, "Optional Filtering Support" },
4927 { DOCSIS_CM_CAP_TET_MI, "Transmit Equalizer Taps per Modulation Interval" },
4928 { DOCSIS_CM_CAP_TET, "Number of Transmit Equalizer Taps" },
4929 { DOCSIS_CM_CAP_DCC_SUP, "DCC Support" },
4930 { DOCSIS_CM_CAP_IPFILT_SUP, "IP Filters Support" },
4931 { DOCSIS_CM_CAP_LLCFILT_SUP, "LLC Filters Support" },
4932 { DOCSIS_CM_CAP_EXPUNI_SPACE, "Expanded Unicast SID Space" },
4933 { DOCSIS_CM_CAP_RNGHLDOFF_SUP, "Ranging Hold-Off Support" },
4934 { DOCSIS_CM_CAP_L2VPN_SUP, "L2VPN Capability" },
4935 { DOCSIS_CM_CAP_L2VPN_HOST_SUP, "L2VPN eSAFE Host Capability" },
4936 { DOCSIS_CM_CAP_DUTFILT_SUP, "Downstream Unencrypted Traffic (DUT) Filtering" },
4937 { DOCSIS_CM_CAP_USFREQRNG_SUP, "Upstream Frequency Range Support" },
4938 { DOCSIS_CM_CAP_USSYMRATE_SUP, "Upstream Symbol Rate Support" },
4939 { DOCSIS_CM_CAP_SACM2_SUP, "Selectable Active Code Mode 2 Support" },
4940 { DOCSIS_CM_CAP_SACM2HOP_SUP, "Code Hopping Mode 2 Support" },
4941 { DOCSIS_CM_CAP_MULTTXCHAN_SUP, "Multiple Transmit Channel Support" },
4942 { DOCSIS_CM_CAP_512USTXCHAN_SUP, "5.12 Msps Upstream Transmit Channel Support" },
4943 { DOCSIS_CM_CAP_256USTXCHAN_SUP, "2.56 Msps Upstream Transmit Channel Support" },
4944 { DOCSIS_CM_CAP_TOTALSIDCLU_SUP, "Total SID Cluster Support" },
4945 { DOCSIS_CM_CAP_SIDCLUPERSF_SUP, "SID Clusters per Service Flow Support" },
4946 { DOCSIS_CM_CAP_MULTRXCHAN_SUP, "Multiple Receive Channel Support" },
4947 { DOCSIS_CM_CAP_TOTALDSID_SUP, "Total Downstream Service ID (DSID) Support" },
4948 { DOCSIS_CM_CAP_RESEQDSID_SUP, "Resequencing Downstream Service ID (DSID) Support" },
4949 { DOCSIS_CM_CAP_MULTDSID_SUP, "Multicast Downstream Service ID (DSID) Support" },
4950 { DOCSIS_CM_CAP_MULTDSIDFW_SUP, "Multicast DSID Forwarding" },
4951 { DOCSIS_CM_CAP_FCTF_SUP, "Frame Control Type Forwarding Capability" },
4952 { DOCSIS_CM_CAP_DPV_SUP, "DPV Capability" },
4953 { DOCSIS_CM_CAP_UGSPERUSFLOW_SUP, "Unsolicited Grant Service/Upstream Service Flow Support" },
4954 { DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP, "MAP and UCD Receipt Support" },
4955 { DOCSIS_CM_CAP_USDROPCLASSIF_SUP, "Upstream Drop Classifier Support" },
4956 { DOCSIS_CM_CAP_IPV6_SUP, "IPv6 Support" },
4957 { DOCSIS_CM_CAP_ExUsTrPow, "Extended Upstream Transmit Power Capability (1/4 dB)" },
4958 { DOCSIS_CM_CAP_Opt802MPLSSup, "Optional 802.1ad, 802.1ah, MPLS Classification Support" },
4959 { DOCSIS_CM_CAP_DounEnc, "D-ONU Capabilities Encoding" },
4960 { DOCSIS_CM_CAP_EnrgMang, "Energy Management Capabilities" },
4964 static const value_string docsis_cm_cap_supported_vals[] = {
4965 { 0x00, "Not Support" },
4966 { 0x01, "Supported" },
4970 static const value_string docsis_cm_cap_version_vals[] = {
4971 { 0x00, "DOCSIS 1.0" },
4972 { 0x01, "DOCSIS 1.1" },
4973 { 0x02, "DOCSIS 2.0" },
4974 { 0x03, "DOCSIS 3.0" },
4978 static const value_string docsis_cm_cap_privacy_vals[] = {
4979 { 0x00, "BPI Support" },
4980 { 0x01, "BPI Plus Support" },
4984 static int hf_bootp_docsis_cm_cap_ranging_hold_off_cm = -1;
4985 static int hf_bootp_docsis_cm_cap_ranging_hold_off_eps = -1;
4986 static int hf_bootp_docsis_cm_cap_ranging_hold_off_emta = -1;
4987 static int hf_bootp_docsis_cm_cap_ranging_hold_off_dsg = -1;
4989 static const value_string docsis_cm_cap_l2vpn_vals[] = {
4990 { 0x00, "CM not compliant with DOCSIS L2VPN Section 7 (default)" },
4991 { 0x01, "CM compliant with DOCSIS L2VPN Section 7" },
4995 static const value_string docsis_cm_cap_filt_vals[] = {
4996 { 0x00, "802.1P Filtering" },
4997 { 0x01, "802.1Q Filtering" },
5001 static int hf_bootp_docsis_cm_cap_mpls_stpid = -1;
5002 static int hf_bootp_docsis_cm_cap_mpls_svid = -1;
5003 static int hf_bootp_docsis_cm_cap_mpls_spcp = -1;
5004 static int hf_bootp_docsis_cm_cap_mpls_sdei = -1;
5005 static int hf_bootp_docsis_cm_cap_mpls_ctpid = -1;
5006 static int hf_bootp_docsis_cm_cap_mpls_cvid = -1;
5007 static int hf_bootp_docsis_cm_cap_mpls_cpcp = -1;
5008 static int hf_bootp_docsis_cm_cap_mpls_ccfi = -1;
5009 static int hf_bootp_docsis_cm_cap_mpls_stci = -1;
5010 static int hf_bootp_docsis_cm_cap_mpls_ctci = -1;
5011 static int hf_bootp_docsis_cm_cap_mpls_itpid = -1;
5012 static int hf_bootp_docsis_cm_cap_mpls_isid = -1;
5013 static int hf_bootp_docsis_cm_cap_mpls_itci = -1;
5014 static int hf_bootp_docsis_cm_cap_mpls_ipcp = -1;
5015 static int hf_bootp_docsis_cm_cap_mpls_idei = -1;
5016 static int hf_bootp_docsis_cm_cap_mpls_iuca = -1;
5017 static int hf_bootp_docsis_cm_cap_mpls_btpid = -1;
5018 static int hf_bootp_docsis_cm_cap_mpls_btci = -1;
5019 static int hf_bootp_docsis_cm_cap_mpls_bpcp = -1;
5020 static int hf_bootp_docsis_cm_cap_mpls_bdei = -1;
5021 static int hf_bootp_docsis_cm_cap_mpls_bvid = -1;
5022 static int hf_bootp_docsis_cm_cap_mpls_bda = -1;
5023 static int hf_bootp_docsis_cm_cap_mpls_bsa = -1;
5024 static int hf_bootp_docsis_cm_cap_mpls_tc = -1;
5025 static int hf_bootp_docsis_cm_cap_mpls_label = -1;
5027 static const value_string docsis_cm_cap_enrgmang_vals[] = {
5028 { 0x00, "Energy Management 1x1 Feature" },
5032 static const value_string docsis_cm_cap_usfreqrng_vals[] = {
5033 { 0x00, "Standard Upstream Frequency Range" },
5034 { 0x01, "Standard Upstream Frequency Range and Extended Upstream Frequency Range" },
5038 static const value_string docsis_cm_cap_map_ucd_receipt_vals[] = {
5039 { 0x00, "CM cannot support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" },
5040 { 0x01, "CM can support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" },
5044 static const value_string docsis_cm_cap_map_dpv_support_vals[] = {
5045 { 0x00, "U1 supported as a Start Reference Point for DPV per Path" },
5046 { 0x01, "U1 supported as a Start Reference Point for DPV per Packet" },
5050 static const value_string docsis_cm_cap_map_multDsidForward_support_vals[] = {
5051 { 0x00, "No support for multicast DSID forwarding" },
5052 { 0x01, "Support for GMAC explicit multicast DSID forwarding" },
5053 { 0x02, "Support for GMAC promiscuous multicast DSID forwarding" },
5057 static const value_string docsis_cm_cap_map_fctfc_support_vals[] = {
5058 { 0x00, "Isolation Packet PDU MAC Header (FC_Type of 10) is not forwarded" },
5059 { 0x01, "Isolation Packet PDU MAC Header (FC_Type of 10) is forwarded" },
5063 static const value_string docsis_cm_cap_map_l2vpn_esafe_index_support_vals[] = {
5064 { 0x01, "ePs or eRouter" },
5066 { 0x11, "eSTB-IP" },
5067 { 0x12, "eSTB-DSG" },
5072 static int hf_bootp_docsis_cm_cap_ussymrate_160 = -1;
5073 static int hf_bootp_docsis_cm_cap_ussymrate_320 = -1;
5074 static int hf_bootp_docsis_cm_cap_ussymrate_640 = -1;
5075 static int hf_bootp_docsis_cm_cap_ussymrate_1280 = -1;
5076 static int hf_bootp_docsis_cm_cap_ussymrate_2560 = -1;
5077 static int hf_bootp_docsis_cm_cap_ussymrate_5120 = -1;
5080 display_uint_with_range_checking(proto_item *ti, guint8 val_byte, guint16 val_uint16, int min_value, int max_value)
5092 proto_item_append_text(ti, "%i", value);
5093 if ((value < min_value) ||
5094 (value > max_value))
5096 proto_item_append_text(ti, " (Value Out-of-Range [%i..%i])", min_value, max_value);
5100 static void get_opt125_tlv(tvbuff_t *tvb, guint off, guint8 *tlvtype, guint8 *tlvlen, guint8 **value)
5103 *tlvtype = tvb_get_guint8(tvb, off);
5105 *tlvlen = tvb_get_guint8(tvb, off+1);
5107 *value = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, off + 2, *tlvlen);
5110 static void get_opt60_tlv(tvbuff_t *tvb, guint off, guint8 *tlvtype, guint8 *tlvlen, guint8 **value)
5115 val_asc = (guint8 *)wmem_alloc0(wmem_packet_scope(), 4);
5117 tvb_memcpy(tvb, val_asc, off, 2);
5118 *tlvtype = (guint8)strtoul((gchar*)val_asc, NULL, 16);
5120 tvb_memcpy(tvb, val_asc, off + 2, 2);
5121 *tlvlen = (guint8)strtoul((gchar*)val_asc, NULL, 16);
5123 *value = (guint8 *)wmem_alloc0(wmem_packet_scope(), *tlvlen);
5124 for (i=0; i<*tlvlen; i++)
5126 memset(val_asc, 0, 4);
5127 tvb_memcpy(tvb, val_asc, off + ((i*2) + 4), 2);
5128 (*value)[i] = (guint8)strtoul((gchar*)val_asc, NULL, 16);
5133 dissect_docsis_cm_cap(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len, gboolean opt125)
5137 proto_tree *subtree;
5140 guint8 val_byte = 0;
5141 guint16 val_uint16 = 0;
5142 guint8 *val_other = NULL;
5145 asc_val = (guint8*)wmem_alloc0(wmem_packet_scope(), 4);
5149 /* Option 125 is formatted as uint8's */
5151 tlv_type = tvb_get_guint8(tvb, off);
5153 tlv_len = tvb_get_guint8(tvb, off+1);
5154 proto_tree_add_uint(v_tree, hf_bootp_docsis_cm_cap_len, tvb, off+1, 1, tlv_len);
5158 /* Option 60 is formatted as an ASCII string.
5159 Since the capabilities are the same for both options
5160 I am converting the Option 60 values from ASCII to
5161 uint8s to allow the same parser to work for both */
5162 off += DOCSIS_CM_CAP_TLV_OFF;
5163 tvb_memcpy (tvb, asc_val, off, 2);
5164 tlv_len = (guint8)strtoul((gchar*)asc_val, NULL, 16);
5165 proto_tree_add_uint_format_value(v_tree, hf_bootp_docsis_cm_cap_len, tvb, off+2, 2,
5166 tlv_len, "%d", tlv_len);
5171 while (off - ((guint) voff) < ((guint) len))
5180 get_opt125_tlv(tvb, off, &tlv_type, &tlv_len, &val_other);
5181 ti = proto_tree_add_uint_format(v_tree, hf_bootp_docsis_cm_cap_type, tvb, off,
5186 val_to_str_const(tlv_type, docsis_cm_cap_type_vals, "unknown"));
5190 /* Option 60 is formatted as an ASCII string. Since the capabilities
5191 are the same for both options I am converting the Option 60 values
5192 from ASCII to uint8s to allow the same parser to work for both */
5193 get_opt60_tlv(tvb, off, &tlv_type, &tlv_len, &val_other);
5194 ti = proto_tree_add_uint_format(v_tree, hf_bootp_docsis_cm_cap_type, tvb, off,
5199 val_to_str_const(tlv_type, docsis_cm_cap_type_vals, "unknown"));
5204 /* The value refers to a byte. */
5205 val_byte = val_other[0];
5211 /* The value refers to a uint16. */
5212 val_uint16 = (val_other[0] << 8) + val_other[1];
5218 case DOCSIS_CM_CAP_CONCAT_SUP:
5219 case DOCSIS_CM_CAP_FRAG_SUP:
5220 case DOCSIS_CM_CAP_PHS_SUP:
5221 case DOCSIS_CM_CAP_IGMP_SUP:
5222 case DOCSIS_CM_CAP_DCC_SUP:
5223 case DOCSIS_CM_CAP_EXPUNI_SPACE:
5224 case DOCSIS_CM_CAP_DUTFILT_SUP:
5225 case DOCSIS_CM_CAP_SACM2_SUP:
5226 case DOCSIS_CM_CAP_SACM2HOP_SUP:
5227 case DOCSIS_CM_CAP_IPV6_SUP:
5228 proto_item_append_text(ti,
5230 val_to_str_const(val_byte, docsis_cm_cap_supported_vals, "Reserved"));
5232 case DOCSIS_CM_CAP_DOCSIS_VER:
5233 proto_item_append_text(ti,
5235 val_to_str_const(val_byte, docsis_cm_cap_version_vals, "Reserved"));
5237 case DOCSIS_CM_CAP_PRIV_SUP:
5238 proto_item_append_text(ti,
5240 val_to_str_const(val_byte, docsis_cm_cap_privacy_vals, "Reserved"));
5242 case DOCSIS_CM_CAP_FILT_SUP:
5243 proto_item_append_text(ti,
5245 val_to_str_const(val_byte, docsis_cm_cap_filt_vals, "Reserved"));
5247 case DOCSIS_CM_CAP_L2VPN_SUP:
5248 proto_item_append_text(ti,
5250 val_to_str_const(val_byte, docsis_cm_cap_l2vpn_vals, "Reserved"));
5252 case DOCSIS_CM_CAP_L2VPN_HOST_SUP:
5254 proto_item_append_text(ti,
5255 "eSAFE ifIndex %s (%i)/eSAFE MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",
5256 val_to_str_const(val_other[0], docsis_cm_cap_map_l2vpn_esafe_index_support_vals, "Reserved"),
5265 proto_item_append_text(ti,
5266 "Invalid (length should be 7, is %d)",
5270 case DOCSIS_CM_CAP_USFREQRNG_SUP:
5271 proto_item_append_text(ti,
5273 val_to_str_const(val_byte, docsis_cm_cap_usfreqrng_vals, "Reserved"));
5275 case DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP:
5276 proto_item_append_text(ti,
5278 val_to_str_const(val_byte, docsis_cm_cap_map_ucd_receipt_vals, "Reserved"));
5280 case DOCSIS_CM_CAP_DPV_SUP:
5281 proto_item_append_text(ti,
5283 val_to_str_const(val_byte, docsis_cm_cap_map_dpv_support_vals, "Reserved"));
5285 case DOCSIS_CM_CAP_DSAID_SUP:
5286 case DOCSIS_CM_CAP_MULTTXCHAN_SUP:
5287 case DOCSIS_CM_CAP_512USTXCHAN_SUP:
5288 case DOCSIS_CM_CAP_256USTXCHAN_SUP:
5289 case DOCSIS_CM_CAP_TOTALSIDCLU_SUP:
5290 case DOCSIS_CM_CAP_MULTRXCHAN_SUP:
5291 case DOCSIS_CM_CAP_UGSPERUSFLOW_SUP:
5292 case DOCSIS_CM_CAP_USSF_SUP:
5293 display_uint_with_range_checking(ti, val_byte, val_uint16, 0, 255);
5295 case DOCSIS_CM_CAP_RESEQDSID_SUP:
5296 case DOCSIS_CM_CAP_MULTDSID_SUP:
5297 display_uint_with_range_checking(ti, val_byte, val_uint16, 16, 255);
5299 case DOCSIS_CM_CAP_SIDCLUPERSF_SUP:
5300 display_uint_with_range_checking(ti, val_byte, val_uint16, 2, 8);
5302 case DOCSIS_CM_CAP_TOTALDSID_SUP:
5303 display_uint_with_range_checking(ti, val_byte, val_uint16, 32, 255);
5305 case DOCSIS_CM_CAP_TET:
5306 display_uint_with_range_checking(ti, val_byte, val_uint16, 8, 64);
5308 case DOCSIS_CM_CAP_TET_MI:
5309 if ((val_byte == 1) ||
5313 proto_item_append_text(ti,
5319 proto_item_append_text(ti,
5320 " (Invalid Value %i : Should be [1,2,4]",
5324 case DOCSIS_CM_CAP_IPFILT_SUP:
5325 case DOCSIS_CM_CAP_USDROPCLASSIF_SUP:
5326 display_uint_with_range_checking(ti, val_byte, val_uint16, 64, 65535);
5328 case DOCSIS_CM_CAP_LLCFILT_SUP:
5329 display_uint_with_range_checking(ti, val_byte, val_uint16, 10, 65535);
5331 case DOCSIS_CM_CAP_ExUsTrPow:
5334 proto_item_append_text(ti, "%i", val_byte);
5338 display_uint_with_range_checking(ti, val_byte, val_uint16, 205, 244);
5341 case DOCSIS_CM_CAP_Opt802MPLSSup:
5342 proto_item_append_text(ti,
5343 "0x%02x", val_byte);
5344 case DOCSIS_CM_CAP_DounEnc:
5345 /* TODO: add D-ONU Capabilities Encoding according DPoE-SP-MULPIv1.0-I02-120607 */
5347 case DOCSIS_CM_CAP_EnrgMang:
5348 proto_item_append_text(ti,
5350 val_to_str_const(val_byte, docsis_cm_cap_enrgmang_vals, "Reserved"));
5352 case DOCSIS_CM_CAP_RNGHLDOFF_SUP:
5353 proto_item_append_text(ti,
5357 proto_item_append_text(ti,
5358 "(0x%04x)", (val_other[0] << sizeof(guint8)) + val_other[1]);
5359 proto_item_append_text(ti,
5360 " Component Bit Mask ");
5361 proto_item_append_text(ti,
5362 "(0x%04x)", (val_other[2] << sizeof(guint8)) + val_other[3]);
5366 proto_item_append_text(ti,
5367 " (Invalid Length %u : Should be 4",
5371 case DOCSIS_CM_CAP_USSYMRATE_SUP:
5372 proto_item_append_text(ti,
5373 "0x%02x", val_byte);
5375 case DOCSIS_CM_CAP_FCTF_SUP:
5376 proto_item_append_text(ti,
5378 val_to_str_const(val_byte, docsis_cm_cap_map_fctfc_support_vals, "Reserved"));
5380 case DOCSIS_CM_CAP_MULTDSIDFW_SUP:
5381 proto_item_append_text(ti,
5383 val_to_str_const(val_byte, docsis_cm_cap_map_multDsidForward_support_vals, "Reserved"));
5387 subtree = proto_item_add_subtree(ti, ett_bootp_option);
5388 if (tlv_type == DOCSIS_CM_CAP_RNGHLDOFF_SUP && tlv_len >= 4)
5390 const int * flags[] = {
5391 &hf_bootp_docsis_cm_cap_ranging_hold_off_cm,
5392 &hf_bootp_docsis_cm_cap_ranging_hold_off_eps,
5393 &hf_bootp_docsis_cm_cap_ranging_hold_off_emta,
5394 &hf_bootp_docsis_cm_cap_ranging_hold_off_dsg,
5397 val_uint16 = (val_other[2] << sizeof(guint8)) + val_other[3];
5399 proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 4, flags, val_uint16);
5401 if (tlv_type == DOCSIS_CM_CAP_USSYMRATE_SUP)
5403 const int * flags[] = {
5404 &hf_bootp_docsis_cm_cap_ussymrate_160,
5405 &hf_bootp_docsis_cm_cap_ussymrate_320,
5406 &hf_bootp_docsis_cm_cap_ussymrate_640,
5407 &hf_bootp_docsis_cm_cap_ussymrate_1280,
5408 &hf_bootp_docsis_cm_cap_ussymrate_2560,
5409 &hf_bootp_docsis_cm_cap_ussymrate_5120,
5413 proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 1, flags, val_byte);
5415 if (tlv_type == DOCSIS_CM_CAP_Opt802MPLSSup && tlv_len >= 4)
5417 const int * flags[] = {
5418 &hf_bootp_docsis_cm_cap_mpls_stpid,
5419 &hf_bootp_docsis_cm_cap_mpls_svid,
5420 &hf_bootp_docsis_cm_cap_mpls_spcp,
5421 &hf_bootp_docsis_cm_cap_mpls_sdei,
5422 &hf_bootp_docsis_cm_cap_mpls_ctpid,
5423 &hf_bootp_docsis_cm_cap_mpls_cvid,
5424 &hf_bootp_docsis_cm_cap_mpls_cpcp,
5425 &hf_bootp_docsis_cm_cap_mpls_ccfi,
5426 &hf_bootp_docsis_cm_cap_mpls_stci,
5427 &hf_bootp_docsis_cm_cap_mpls_ctci,
5428 &hf_bootp_docsis_cm_cap_mpls_itpid,
5429 &hf_bootp_docsis_cm_cap_mpls_isid,
5430 &hf_bootp_docsis_cm_cap_mpls_itci,
5431 &hf_bootp_docsis_cm_cap_mpls_ipcp,
5432 &hf_bootp_docsis_cm_cap_mpls_idei,
5433 &hf_bootp_docsis_cm_cap_mpls_iuca,
5434 &hf_bootp_docsis_cm_cap_mpls_btpid,
5435 &hf_bootp_docsis_cm_cap_mpls_btci,
5436 &hf_bootp_docsis_cm_cap_mpls_bpcp,
5437 &hf_bootp_docsis_cm_cap_mpls_bdei,
5438 &hf_bootp_docsis_cm_cap_mpls_bvid,
5439 &hf_bootp_docsis_cm_cap_mpls_bda,
5440 &hf_bootp_docsis_cm_cap_mpls_bsa,
5441 &hf_bootp_docsis_cm_cap_mpls_tc,
5442 &hf_bootp_docsis_cm_cap_mpls_label,
5445 val_uint16 = (val_other[2] << sizeof(guint8)) + val_other[3];
5447 proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 4, flags, val_uint16);
5451 off += (tlv_len) + 2;
5455 off += (tlv_len *2) + 4;
5461 /* Definitions specific to PKT-SP-PROV-I05-021127 begin with "PKT_CCC_I05".
5462 Definitions specific to IETF draft 5 and RFC 3495 begin with "PKT_CCC_IETF".
5463 Shared definitions begin with "PKT_CCC".
5465 #define PKT_CCC_PRI_DHCP 1
5466 #define PKT_CCC_SEC_DHCP 2
5467 #define PKT_CCC_I05_SNMP 3
5468 #define PKT_CCC_IETF_PROV_SRV 3
5469 #define PKT_CCC_I05_PRI_DNS 4
5470 #define PKT_CCC_IETF_AS_KRB 4
5471 #define PKT_CCC_I05_SEC_DNS 5
5472 #define PKT_CCC_IETF_AP_KRB 5
5473 #define PKT_CCC_KRB_REALM 6
5474 #define PKT_CCC_TGT_FLAG 7
5475 #define PKT_CCC_PROV_TIMER 8
5476 #define PKT_CCC_CMS_FQDN 9
5477 #define PKT_CCC_IETF_SEC_TKT 9
5478 #define PKT_CCC_AS_KRB 10
5479 #define PKT_CCC_AP_KRB 11
5480 #define PKT_CCC_MTA_KRB_CLEAR 12
5482 static const value_string pkt_i05_ccc_opt_vals[] = {
5483 { PKT_CCC_PRI_DHCP, "Primary DHCP Server" },
5484 { PKT_CCC_SEC_DHCP, "Secondary DHCP Server" },
5485 { PKT_CCC_I05_SNMP, "SNMP Entity" },
5486 { PKT_CCC_I05_PRI_DNS, "Primary DNS Server" },
5487 { PKT_CCC_I05_SEC_DNS, "Secondary DNS Server" },
5488 { PKT_CCC_KRB_REALM, "Kerberos Realm" },
5489 { PKT_CCC_TGT_FLAG, "MTA should fetch TGT?" },
5490 { PKT_CCC_PROV_TIMER, "Provisioning Timer" },
5491 { PKT_CCC_CMS_FQDN, "CMS FQDN" },
5492 { PKT_CCC_AS_KRB, "AS-REQ/AS-REP Backoff and Retry" },
5493 { PKT_CCC_AP_KRB, "AP-REQ/AP-REP Backoff and Retry" },
5494 { PKT_CCC_MTA_KRB_CLEAR, "MTA should clear Kerberos tickets?" },
5498 static const value_string pkt_draft5_ccc_opt_vals[] = {
5499 { PKT_CCC_PRI_DHCP, "TSP's Primary DHCP Server" },
5500 { PKT_CCC_SEC_DHCP, "TSP's Secondary DHCP Server" },
5501 { PKT_CCC_IETF_PROV_SRV, "TSP's Provisioning Server" },
5502 { PKT_CCC_IETF_AS_KRB, "TSP's AS-REQ/AS-REP Backoff and Retry" },
5503 { PKT_CCC_IETF_AP_KRB, "TSP's AP-REQ/AP-REP Backoff and Retry" },
5504 { PKT_CCC_KRB_REALM, "TSP's Kerberos Realm Name" },
5505 { PKT_CCC_TGT_FLAG, "TSP's Ticket Granting Server Utilization" },
5506 { PKT_CCC_PROV_TIMER, "TSP's Provisioning Timer Value" },
5507 { PKT_CCC_IETF_SEC_TKT, "PacketCable Security Ticket Control" },
5511 static const value_string pkt_i05_ccc_ticket_ctl_vals[] = {
5512 { 1, "Invalidate Provisioning Application Server's ticket" },
5513 { 2, "Invalidate all CMS Application Server tickets" },
5514 { 3, "Invalidate all Application Server tickets" },
5519 dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
5520 tvbuff_t *tvb, int optoff, int optend)
5522 int suboptoff = optoff;
5523 guint8 subopt, subopt_len, fetch_tgt, timer_val, ticket_ctl;
5524 proto_tree *pkt_s_tree;
5527 subopt = tvb_get_guint8(tvb, optoff);
5530 if (suboptoff >= optend) {
5531 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
5532 "Suboption %d: no room left in option for suboption length", subopt);
5536 subopt_len = tvb_get_guint8(tvb, optoff);
5539 vti = proto_tree_add_uint(v_tree, hf_bootp_pc_i05_ccc_suboption, tvb, optoff, 1, subopt);
5540 proto_item_set_len(vti, subopt_len + 2);
5541 proto_item_append_text(vti, ": ");
5545 case PKT_CCC_PRI_DHCP: /* String values */
5546 case PKT_CCC_SEC_DHCP:
5547 case PKT_CCC_I05_SNMP:
5548 case PKT_CCC_I05_PRI_DNS:
5549 case PKT_CCC_I05_SEC_DNS:
5550 case PKT_CCC_KRB_REALM:
5551 case PKT_CCC_CMS_FQDN:
5552 proto_item_append_text(vti, "%s (%u byte%s)",
5553 tvb_format_stringzpad(tvb, suboptoff, subopt_len),
5555 plurality(subopt_len, "", "s") );
5556 suboptoff += subopt_len;
5559 case PKT_CCC_TGT_FLAG:
5560 if (suboptoff+1 > optend) {
5561 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5564 fetch_tgt = tvb_get_guint8(tvb, suboptoff);
5565 proto_item_append_text(vti, "%s (%u byte%s%s)",
5566 fetch_tgt ? "Yes" : "No",
5568 plurality(subopt_len, "", "s"),
5569 subopt_len != 1 ? " [Invalid]" : "");
5570 suboptoff += subopt_len;
5573 case PKT_CCC_PROV_TIMER:
5574 if (suboptoff+1 > optend) {
5575 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5578 timer_val = tvb_get_guint8(tvb, suboptoff);
5579 proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val,
5580 timer_val > 30 ? " [Invalid]" : "",
5582 plurality(subopt_len, "", "s"),
5583 subopt_len != 1 ? " [Invalid]" : "");
5584 suboptoff += subopt_len;
5587 case PKT_CCC_AS_KRB:
5588 if (suboptoff+12 > optend) {
5589 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5592 proto_item_append_text(vti, "(%u byte%s%s)", subopt_len,
5593 plurality(subopt_len, "", "s"),
5594 subopt_len != 12 ? " [Invalid]" : "");
5595 if (subopt_len == 12) {
5596 pkt_s_tree = proto_item_add_subtree(vti, ett_bootp_option);
5597 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN);
5598 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_timeout, tvb, suboptoff + 4, 4, ENC_BIG_ENDIAN);
5599 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN);
5601 suboptoff += subopt_len;
5604 case PKT_CCC_AP_KRB:
5605 if (suboptoff+12 > optend) {
5606 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5609 proto_item_append_text(vti, "(%u byte%s%s)", subopt_len,
5610 plurality(subopt_len, "", "s"),
5611 subopt_len != 12 ? " [Invalid]" : "");
5612 if (subopt_len == 12) {
5613 pkt_s_tree = proto_item_add_subtree(vti, ett_bootp_option);
5614 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN);
5615 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_timeout, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN);
5616 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN);
5618 suboptoff += subopt_len;
5621 case PKT_CCC_MTA_KRB_CLEAR:
5622 if (suboptoff+1 > optend) {
5623 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5626 ticket_ctl = tvb_get_guint8(tvb, suboptoff);
5627 proto_item_append_text(vti, "%s (%u) (%u byte%s%s)",
5628 val_to_str_const (ticket_ctl, pkt_i05_ccc_ticket_ctl_vals, "unknown/invalid"),
5631 plurality(subopt_len, "", "s"),
5632 subopt_len != 1 ? " [Invalid]" : "");
5633 suboptoff += subopt_len;
5637 suboptoff += subopt_len;
5644 static int hf_bootp_ccc_ietf_sec_tkt_pc_provision_server = -1;
5645 static int hf_bootp_ccc_ietf_sec_tkt_all_pc_call_management = -1;
5648 dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
5649 tvbuff_t *tvb, int optoff, int optend, int revision)
5651 int suboptoff = optoff;
5652 guint8 subopt, subopt_len;
5653 guint8 prov_type, fetch_tgt, timer_val;
5655 proto_tree *pkt_s_tree;
5657 int max_timer_val = 255;
5658 const guchar *dns_name;
5660 subopt = tvb_get_guint8(tvb, suboptoff);
5663 if (suboptoff >= optend) {
5664 expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length,
5665 "Suboption %d: no room left in option for suboption length", subopt);
5668 subopt_len = tvb_get_guint8(tvb, suboptoff);
5671 vti = proto_tree_add_uint(v_tree, hf_bootp_pc_ietf_ccc_suboption, tvb, optoff, 1, subopt);
5672 proto_item_set_len(vti, subopt_len + 2);
5673 proto_item_append_text(vti, ": ");
5677 case PKT_CCC_PRI_DHCP: /* IPv4 values */
5678 case PKT_CCC_SEC_DHCP:
5679 if (suboptoff+4 > optend) {
5680 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5683 proto_item_append_text(vti, "%s (%u byte%s%s)",
5684 tvb_ip_to_str(tvb, suboptoff),
5686 plurality(subopt_len, "", "s"),
5687 subopt_len != 4 ? " [Invalid]" : "");
5688 suboptoff += subopt_len;
5691 case PKT_CCC_IETF_PROV_SRV:
5692 if (suboptoff+1 > optend) {
5693 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5696 prov_type = tvb_get_guint8(tvb, suboptoff);
5698 switch (prov_type) {
5701 get_dns_name(tvb, suboptoff, subopt_len, suboptoff, &dns_name);
5702 proto_item_append_text(vti, "%s (%u byte%s)", dns_name,
5703 subopt_len - 1, plurality(subopt_len, "", "s") );
5707 if (suboptoff+4 > optend) {
5708 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5711 proto_item_append_text(vti, "%s (%u byte%s%s)",
5712 tvb_ip_to_str(tvb, suboptoff),
5714 plurality(subopt_len, "", "s"),
5715 subopt_len != 5 ? " [Invalid]" : "");
5719 proto_item_append_text(vti, "Invalid type: %u (%u byte%s)",
5722 plurality(subopt_len, "", "s") );
5725 suboptoff += subopt_len - 1;
5728 case PKT_CCC_IETF_AS_KRB:
5729 if (suboptoff+12 > optend) {
5730 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5733 proto_item_append_text(vti, "(%u byte%s%s)", subopt_len,
5734 plurality(subopt_len, "", "s"),
5735 subopt_len != 12 ? " [Invalid]" : "");
5736 if (subopt_len == 12) {
5737 pkt_s_tree = proto_item_add_subtree(vti, ett_bootp_option);
5738 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN);
5739 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_timeout, tvb, suboptoff + 4, 4, ENC_BIG_ENDIAN);
5740 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN);
5742 suboptoff += subopt_len;
5745 case PKT_CCC_IETF_AP_KRB:
5746 proto_item_append_text(vti, "(%u byte%s%s)", subopt_len,
5747 plurality(subopt_len, "", "s"),
5748 subopt_len != 12 ? " [Invalid]" : "");
5749 if (subopt_len == 12) {
5750 pkt_s_tree = proto_item_add_subtree(vti, ett_bootp_option);
5751 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN);
5752 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_timeout, tvb, suboptoff + 4, 4, ENC_BIG_ENDIAN);
5753 proto_tree_add_item(pkt_s_tree, hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN);
5755 suboptoff += subopt_len;
5758 case PKT_CCC_KRB_REALM: /* String values */
5759 get_dns_name(tvb, suboptoff, subopt_len, suboptoff, &dns_name);
5760 proto_item_append_text(vti, "%s (%u byte%s)", dns_name,
5761 subopt_len, plurality(subopt_len, "", "s") );
5762 suboptoff += subopt_len;
5765 case PKT_CCC_TGT_FLAG:
5766 if (suboptoff+1 > optend) {
5767 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5770 fetch_tgt = tvb_get_guint8(tvb, suboptoff);
5771 proto_item_append_text(vti, "%s (%u byte%s%s)",
5772 fetch_tgt ? "Yes" : "No",
5774 plurality(subopt_len, "", "s"),
5775 subopt_len != 1 ? " [Invalid]" : "");
5779 case PKT_CCC_PROV_TIMER:
5780 if (suboptoff+1 > optend) {
5781 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5784 if (revision == PACKETCABLE_CCC_DRAFT5)
5786 timer_val = tvb_get_guint8(tvb, suboptoff);
5787 proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val,
5788 timer_val > max_timer_val ? " [Invalid]" : "",
5790 plurality(subopt_len, "", "s"),
5791 subopt_len != 1 ? " [Invalid]" : "");
5795 case PKT_CCC_IETF_SEC_TKT:
5796 if (suboptoff+2 > optend) {
5797 expert_add_info(pinfo, vti, &ei_bootp_missing_subopt_value);
5800 sec_tcm = tvb_get_ntohs(tvb, suboptoff);
5801 proto_item_append_text(vti, "0x%04x (%u byte%s%s)", sec_tcm, subopt_len,
5802 plurality(subopt_len, "", "s"),
5803 subopt_len != 2 ? " [Invalid]" : "");
5804 if (subopt_len == 2) {
5805 pkt_s_tree = proto_item_add_subtree(vti, ett_bootp_option);
5806 proto_tree_add_boolean(pkt_s_tree, hf_bootp_ccc_ietf_sec_tkt_pc_provision_server, tvb, suboptoff, 2, sec_tcm);
5807 proto_tree_add_boolean(pkt_s_tree, hf_bootp_ccc_ietf_sec_tkt_all_pc_call_management, tvb, suboptoff, 2, sec_tcm);
5809 suboptoff += subopt_len;
5813 suboptoff += subopt_len;
5819 #define BOOTREQUEST 1
5822 static const value_string op_vals[] = {
5823 { BOOTREQUEST, "Boot Request" },
5824 { BOOTREPLY, "Boot Reply" },
5829 dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
5831 proto_tree *bp_tree;
5832 proto_item *bp_ti, *ti;
5833 proto_item *fi, *hidden_item;
5836 int voff, eoff, tmpvoff; /* vendor offset, end offset */
5839 const char *dhcp_type = NULL;
5840 const guint8 *vendor_class_id = NULL;
5841 guint16 flags, secs;
5843 guint8 overload = 0; /* DHCP option overload */
5844 static const int * bootp_flags[] = {
5845 &hf_bootp_flags_broadcast,
5846 &hf_bootp_flags_reserved,
5850 rfc3396_dns_domain_search_list.total_number_of_block = 0;
5851 rfc3396_dns_domain_search_list.tvb_composite = NULL;
5852 rfc3396_sip_server.total_number_of_block = 0;
5853 rfc3396_sip_server.tvb_composite = NULL;
5855 col_set_str(pinfo->cinfo, COL_PROTOCOL, "BOOTP");
5857 * In case we throw an exception fetching the opcode, etc.
5859 col_clear(pinfo->cinfo, COL_INFO);
5861 op = tvb_get_guint8(tvb, 0);
5862 htype = tvb_get_guint8(tvb, 1);
5863 hlen = tvb_get_guint8(tvb, 2);
5867 if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802)
5869 col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s (%s)",
5870 tvb_arphrdaddr_to_str(tvb, 28, hlen, htype),
5871 tvb_get_ether_name(tvb, 28));
5874 col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s",
5875 tvb_arphrdaddr_to_str(tvb, 28, hlen, htype));
5880 col_set_str(pinfo->cinfo, COL_INFO, "Boot Reply");
5884 col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)", op);
5888 voff = VENDOR_INFO_OFFSET;
5890 /* rfc2132 says it SHOULD exist, not that it MUST exist */
5891 if (tvb_bytes_exist(tvb, voff, 4) &&
5892 (tvb_get_ntohl(tvb, voff) == 0x63825363)) {
5897 eoff = tvb_reported_length(tvb);
5899 bp_ti = proto_tree_add_item(tree, proto_bootp, tvb, 0, -1, ENC_NA);
5900 bp_tree = proto_item_add_subtree(bp_ti, ett_bootp);
5903 * In the first pass, we just look for the DHCP message type
5904 * and Vendor class identifier options.
5908 rfc3396_dns_domain_search_list.index_current_block = 0;
5909 rfc3396_sip_server.index_current_block = 0;
5910 while (tmpvoff < eoff && !at_end) {
5911 offset_delta = bootp_option(tvb, pinfo, NULL, NULL, tmpvoff, eoff, TRUE, &at_end,
5912 &dhcp_type, &vendor_class_id, &overload);
5913 if (offset_delta <= 0) {
5914 proto_tree_add_expert(bp_tree, pinfo, &ei_bootp_option_parse_err,
5915 tvb, tmpvoff, eoff);
5918 tmpvoff += offset_delta;
5922 * If there was a DHCP message type option, flag this packet
5925 if (dhcp_type != NULL) {
5927 * Yes, this is a DHCP packet, and "dhcp_type" is the
5930 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCP");
5932 col_add_fstr(pinfo->cinfo, COL_INFO, "DHCP %-8s - Transaction ID 0x%x",
5933 dhcp_type, tvb_get_ntohl(tvb, 4));
5934 tap_queue_packet( bootp_dhcp_tap, pinfo, dhcp_type);
5938 * OK, now populate the protocol tree.
5941 proto_tree_add_uint(bp_tree, hf_bootp_type, tvb,
5944 proto_tree_add_item(bp_tree, hf_bootp_hw_type, tvb,
5945 1, 1, ENC_BIG_ENDIAN);
5946 proto_tree_add_uint(bp_tree, hf_bootp_hw_len, tvb,
5948 proto_tree_add_item(bp_tree, hf_bootp_hops, tvb,
5949 3, 1, ENC_BIG_ENDIAN);
5950 proto_tree_add_item(bp_tree, hf_bootp_id, tvb,
5951 4, 4, ENC_BIG_ENDIAN);
5953 * Windows (98, XP and Vista tested) sends the "secs" value on
5954 * the wire formatted as little-endian. See if the LE value
5957 secs = tvb_get_letohs(tvb, 8);
5958 if (secs > 0 && secs <= 0xff) {
5959 ti = proto_tree_add_uint(bp_tree, hf_bootp_secs, tvb, 8, 2, secs);
5960 expert_add_info_format(pinfo, ti, &ei_bootp_secs_le, "Seconds elapsed appears to be encoded as little-endian");
5962 proto_tree_add_item(bp_tree, hf_bootp_secs, tvb,
5963 8, 2, ENC_BIG_ENDIAN);
5965 flags = tvb_get_ntohs(tvb, 10);
5966 fi = proto_tree_add_bitmask(bp_tree, tvb, 10, hf_bootp_flags,
5967 ett_bootp_flags, bootp_flags, ENC_NA);
5968 proto_item_append_text(fi, " (%s)",
5969 (flags & BOOTP_BC) ? "Broadcast" : "Unicast");
5971 proto_tree_add_item(bp_tree, hf_bootp_ip_client, tvb,
5972 12, 4, ENC_BIG_ENDIAN);
5973 proto_tree_add_item(bp_tree, hf_bootp_ip_your, tvb,
5974 16, 4, ENC_BIG_ENDIAN);
5975 proto_tree_add_item(bp_tree, hf_bootp_ip_server, tvb,
5976 20, 4, ENC_BIG_ENDIAN);
5977 proto_tree_add_item(bp_tree, hf_bootp_ip_relay, tvb,
5978 24, 4, ENC_BIG_ENDIAN);
5980 if (hlen > 0 && hlen <= 16) {
5981 if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802)
5983 proto_tree_add_item(bp_tree, hf_bootp_hw_ether_addr, tvb, 28, 6, ENC_NA);
5985 /* The chaddr element is 16 bytes in length,
5986 although only the first hlen bytes are used */
5987 proto_tree_add_bytes_format_value(bp_tree, hf_bootp_hw_addr, tvb, 28, 16,
5988 NULL, "%s", tvb_arphrdaddr_to_str(tvb, 28, hlen, htype));
5989 if ((16 - hlen) > 0)
5990 proto_tree_add_item(bp_tree, hf_bootp_hw_addr_padding, tvb, 28+hlen, 16-hlen, ENC_NA);
5992 proto_tree_add_expert(bp_tree, pinfo, &ei_bootp_client_address_not_given, tvb, 28, 16);
5995 if (overload & OPT_OVERLOAD_SNAME) {
5996 proto_tree_add_expert(bp_tree, pinfo, &ei_bootp_server_name_overloaded_by_dhcp, tvb,
5997 SERVER_NAME_OFFSET, SERVER_NAME_LEN);
5999 /* The server host name is optional */
6000 if (tvb_get_guint8(tvb, SERVER_NAME_OFFSET) != '\0') {
6001 proto_tree_add_item(bp_tree, hf_bootp_server, tvb,
6003 SERVER_NAME_LEN, ENC_ASCII|ENC_NA);
6006 proto_tree_add_string_format(bp_tree, hf_bootp_server, tvb,
6009 "", "Server host name not given");
6013 if (overload & OPT_OVERLOAD_FILE) {
6014 proto_tree_add_expert(bp_tree, pinfo, &ei_bootp_boot_filename_overloaded_by_dhcp, tvb,
6015 FILE_NAME_OFFSET, FILE_NAME_LEN);
6017 /* Boot file is optional */
6018 if (tvb_get_guint8(tvb, FILE_NAME_OFFSET) != '\0') {
6019 proto_tree_add_item(bp_tree, hf_bootp_file, tvb,
6021 FILE_NAME_LEN, ENC_ASCII|ENC_NA);
6023 proto_tree_add_string_format(bp_tree, hf_bootp_file, tvb,
6026 "", "Boot file name not given");
6030 voff = VENDOR_INFO_OFFSET;
6031 if (dhcp_type != NULL) {
6032 hidden_item = proto_tree_add_boolean(bp_tree, hf_bootp_dhcp, tvb, 0, 0, 1);
6033 PROTO_ITEM_SET_HIDDEN(hidden_item);
6035 if (tvb_bytes_exist(tvb, voff, 4) &&
6036 (tvb_get_ntohl(tvb, voff) == 0x63825363)) {
6037 ip_addr = tvb_get_ipv4(tvb, voff);
6038 proto_tree_add_ipv4_format_value(bp_tree, hf_bootp_cookie, tvb,
6039 voff, 4, ip_addr, "DHCP");
6042 proto_tree_add_item(bp_tree, hf_bootp_vendor_specific_options, tvb,
6048 rfc3396_dns_domain_search_list.index_current_block = 0;
6049 rfc3396_sip_server.index_current_block = 0;
6050 while (voff < eoff && !at_end) {
6051 offset_delta = bootp_option(tvb, pinfo, bp_tree, bp_ti, voff, eoff, FALSE, &at_end,
6052 &dhcp_type, &vendor_class_id, &overload);
6053 if (offset_delta <= 0) {
6054 proto_tree_add_expert(bp_tree, pinfo, &ei_bootp_option_parse_err,
6058 voff += offset_delta;
6060 if ((dhcp_type != NULL) && (!at_end))
6062 expert_add_info(pinfo, bp_ti, &ei_bootp_end_option_missing);
6066 * Padding after the end option.
6068 proto_tree_add_item(bp_tree, hf_bootp_option_padding, tvb, voff, eoff - voff, ENC_NA);
6071 return tvb_captured_length(tvb);
6075 bootp_init_protocol(void)
6079 /* first copy default_bootp_opt[] to bootp_opt[]. This resets all values to default */
6080 memcpy(bootp_opt, default_bootp_opt, sizeof(bootp_opt));
6082 /* Now apply the custom options */
6083 for (i = 0; i < num_bootp_records_uat; i++)
6085 bootp_opt[uat_bootp_records[i].opt].text = wmem_strdup(wmem_file_scope(), uat_bootp_records[i].text);
6086 bootp_opt[uat_bootp_records[i].opt].ftype = uat_bootp_records[i].ftype;
6087 bootp_opt[uat_bootp_records[i].opt].phf = NULL;
6094 MESSAGE_TYPE_COLUMN = 0,
6096 } bootp_stat_columns;
6098 static stat_tap_table_item bootp_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "DHCP Message Type", "%-25s"}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Packets", "%d"}};
6100 static void bootp_stat_init(stat_tap_table_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
6102 int num_fields = sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item);
6103 stat_tap_table* table = new_stat_tap_init_table("DHCP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
6105 stat_tap_table_item_type items[sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item)];
6107 new_stat_tap_add_table(new_stat, table);
6109 /* Add a row for each value type */
6110 while (opt53_text[i].strptr)
6112 items[MESSAGE_TYPE_COLUMN].type = TABLE_ITEM_STRING;
6113 items[MESSAGE_TYPE_COLUMN].value.string_value = opt53_text[i].strptr;
6114 items[PACKET_COLUMN].type = TABLE_ITEM_UINT;
6115 items[PACKET_COLUMN].value.uint_value = 0;
6117 new_stat_tap_init_table_row(table, i, num_fields, items);
6123 bootp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
6125 new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
6126 const char* value = (const char*)data;
6127 stat_tap_table* table;
6128 stat_tap_table_item_type* msg_data;
6132 idx = str_to_val_idx(value, opt53_text);
6136 table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
6137 msg_data = new_stat_tap_get_field_data(table, idx, PACKET_COLUMN);
6138 msg_data->value.uint_value++;
6139 new_stat_tap_set_field_data(table, idx, PACKET_COLUMN, msg_data);
6145 bootp_stat_reset(stat_tap_table* table)
6148 stat_tap_table_item_type* item_data;
6150 for (element = 0; element < table->num_elements; element++)
6152 item_data = new_stat_tap_get_field_data(table, element, PACKET_COLUMN);
6153 item_data->value.uint_value = 0;
6154 new_stat_tap_set_field_data(table, element, PACKET_COLUMN, item_data);
6159 proto_register_bootp(void)
6161 static const value_string bootp_custom_type_vals[] = {
6162 { ipv4, "IP Address"},
6163 { ipv4_list, "IP Address List" },
6164 { string, "string" },
6166 { val_boolean, "boolean" },
6167 { val_u_byte, "byte" },
6168 { val_u_short, "unsigned short" },
6169 { val_u_short_list, "unsigned short list" },
6170 { val_u_long, "unsigned long" },
6171 { time_in_s_secs, "integer time in seconds" },
6172 { time_in_u_secs, "unsigned integer time in seconds" },
6176 static hf_register_info hf[] = {
6178 { "Frame is DHCP", "bootp.dhcp",
6179 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6183 { "Message type", "bootp.type",
6184 FT_UINT8, BASE_DEC, VALS(op_vals), 0x0,
6187 { &hf_bootp_hw_type,
6188 { "Hardware type", "bootp.hw.type",
6189 FT_UINT8, BASE_HEX, VALS(arp_hrd_vals), 0x0,
6193 { "Hardware address length", "bootp.hw.len",
6194 FT_UINT8, BASE_DEC, NULL, 0x0,
6198 { "Hops", "bootp.hops",
6199 FT_UINT8, BASE_DEC, NULL, 0x0,
6203 { "Transaction ID", "bootp.id",
6204 FT_UINT32, BASE_HEX, NULL, 0x0,
6208 { "Seconds elapsed", "bootp.secs",
6209 FT_UINT16, BASE_DEC, NULL, 0x0,
6213 { "Bootp flags", "bootp.flags",
6214 FT_UINT16, BASE_HEX, NULL, 0x0,
6217 { &hf_bootp_flags_broadcast,
6218 { "Broadcast flag", "bootp.flags.bc",
6219 FT_BOOLEAN, 16, TFS(&flag_set_broadcast), BOOTP_BC,
6222 { &hf_bootp_flags_reserved,
6223 { "Reserved flags", "bootp.flags.reserved",
6224 FT_UINT16, BASE_HEX, NULL, BOOTP_MBZ,
6227 { &hf_bootp_ip_client,
6228 { "Client IP address", "bootp.ip.client",
6229 FT_IPv4, BASE_NONE, NULL, 0x0,
6232 { &hf_bootp_ip_your,
6233 { "Your (client) IP address", "bootp.ip.your",
6234 FT_IPv4, BASE_NONE, NULL, 0x0,
6237 { &hf_bootp_ip_server,
6238 { "Next server IP address", "bootp.ip.server",
6239 FT_IPv4, BASE_NONE, NULL, 0x0,
6242 { &hf_bootp_ip_relay,
6243 { "Relay agent IP address", "bootp.ip.relay",
6244 FT_IPv4, BASE_NONE, NULL, 0x0,
6247 { &hf_bootp_hw_addr,
6248 { "Client hardware address", "bootp.hw.addr",
6249 FT_BYTES, BASE_NONE, NULL, 0x0,
6252 { &hf_bootp_hw_addr_padding,
6253 { "Client hardware address padding", "bootp.hw.addr_padding",
6254 FT_BYTES, BASE_NONE, NULL, 0x0,
6257 { &hf_bootp_hw_ether_addr,
6258 { "Client MAC address", "bootp.hw.mac_addr",
6259 FT_ETHER, BASE_NONE, NULL, 0x0,
6263 { "Server host name", "bootp.server",
6264 FT_STRING, BASE_NONE, NULL, 0x0,
6268 { "Boot file name", "bootp.file",
6269 FT_STRING, BASE_NONE, NULL, 0x0,
6273 { "Magic cookie", "bootp.cookie",
6274 FT_IPv4, BASE_NONE, NULL, 0x0,
6277 { &hf_bootp_vendor_specific_options,
6278 { "Bootp vendor specific options", "bootp.vendor_specific_options",
6279 FT_BYTES, BASE_NONE, NULL, 0x0,
6283 { "Server", "bootp.fqdn.s",
6284 FT_BOOLEAN, 8, TFS(&tfs_fqdn_s), F_FQDN_S,
6285 "If true, server should do DDNS update", HFILL }},
6288 { "Server overrides", "bootp.fqdn.o",
6289 FT_BOOLEAN, 8, TFS(&tfs_fqdn_o), F_FQDN_O,
6290 "If true, server insists on doing DDNS update", HFILL }},
6293 { "Encoding", "bootp.fqdn.e",
6294 FT_BOOLEAN, 8, TFS(&tfs_fqdn_e), F_FQDN_E,
6295 "If true, name is binary encoded", HFILL }},
6298 { "Server DDNS", "bootp.fqdn.n",
6299 FT_BOOLEAN, 8, TFS(&tfs_fqdn_n), F_FQDN_N,
6300 "If true, server should not do any DDNS updates", HFILL }},
6302 { &hf_bootp_fqdn_flags,
6303 { "Flags", "bootp.fqdn.flags",
6304 FT_UINT8, BASE_HEX, NULL, 0,
6307 { &hf_bootp_fqdn_mbz,
6308 { "Reserved flags", "bootp.fqdn.mbz",
6309 FT_UINT8, BASE_HEX, NULL, F_FQDN_MBZ,
6312 { &hf_bootp_fqdn_rcode1,
6313 { "A-RR result", "bootp.fqdn.rcode1",
6314 FT_UINT8, BASE_DEC, NULL, 0x0,
6315 "Result code of A-RR update", HFILL }},
6317 { &hf_bootp_fqdn_rcode2,
6318 { "PTR-RR result", "bootp.fqdn.rcode2",
6319 FT_UINT8, BASE_DEC, NULL, 0x0,
6320 "Result code of PTR-RR update", HFILL }},
6322 { &hf_bootp_fqdn_name,
6323 { "Client name", "bootp.fqdn.name",
6324 FT_STRING, BASE_NONE, NULL, 0x0,
6325 "Name to register via DDNS", HFILL }},
6327 { &hf_bootp_fqdn_asciiname,
6328 { "Client name", "bootp.fqdn.name",
6329 FT_STRING, BASE_NONE, NULL, 0x0,
6330 "Name to register via DDNS", HFILL }},
6332 { &hf_bootp_pkt_mta_cap_len,
6333 { "MTA DC Length", "bootp.vendor.pktc.mta_cap_len",
6334 FT_UINT8, BASE_DEC, NULL, 0x0,
6335 "PacketCable MTA Device Capabilities Length", HFILL }},
6337 { &hf_bootp_pkt_mta_cap_type,
6338 { "Type", "bootp.vendor.pktc.mta_cap_type",
6339 FT_UINT8, BASE_DEC, VALS(pkt_mdc_type_vals), 0x0,
6342 { &hf_bootp_pkt_mdc_supp_flow_secure,
6343 { "Secure Flow (Full Secure Provisioning Flow)", "bootp.vendor.pktc.mdc.supp_flow.secure",
6344 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x01,
6347 { &hf_bootp_pkt_mdc_supp_flow_hybrid,
6348 { "Hybrid Flow", "bootp.vendor.pktc.mdc.supp_flow.hybrid",
6349 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x02,
6352 { &hf_bootp_pkt_mdc_supp_flow_basic,
6353 { "Basic Flow", "bootp.vendor.pktc.mdc.supp_flow.basic",
6354 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x04,
6357 { &hf_bootp_pkt_mdc_mib_cl_mta,
6358 { "PacketCable 1.5 MTA MIB", "bootp.vendor.pktc.mdc_cl.mib.mta",
6359 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
6362 { &hf_bootp_pkt_mdc_mib_cl_signaling,
6363 { "PacketCable 1.5 Signaling MIB", "bootp.vendor.pktc.mdc_cl.mib.signaling",
6364 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
6367 { &hf_bootp_pkt_mdc_mib_cl_management_event,
6368 { "PacketCable 1.5 Management Event MIB", "bootp.vendor.pktc.mdc_cl.mib.management_event",
6369 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04,
6372 { &hf_bootp_pkt_mdc_mib_cl_mta_extension,
6373 { "PacketCable 1.5 MTA Extension MIB", "bootp.vendor.pktc.mdc_cl.mib.mta_extension",
6374 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08,
6377 { &hf_bootp_pkt_mdc_mib_cl_mta_signaling_extension,
6378 { "PacketCable 1.5 Signaling Extension MIB", "bootp.vendor.pktc.mdc_cl.mib.signaling_extension",
6379 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10,
6382 { &hf_bootp_pkt_mdc_mib_cl_mta_mem_extention,
6383 { "PacketCable 1.5 MEM Extension MIB", "bootp.vendor.pktc.mdc_cl.mib.mem_extention",
6384 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20,
6387 { &hf_bootp_pkt_mdc_mib_cl_reserved,
6388 { "Reserved", "bootp.vendor.pktc.mdc_cl.mib.reserved",
6389 FT_UINT8, BASE_HEX, NULL, 0xC0,
6392 { &hf_bootp_pkt_mdc_mib_ietf_mta,
6393 { "IETF MTA MIB", "bootp.vendor.pktc.mdc_ietf.mib.mta",
6394 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
6397 { &hf_bootp_pkt_mdc_mib_ietf_signaling,
6398 { "IETF Signaling MIB", "bootp.vendor.pktc.mdc_ietf.mib.signaling",
6399 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
6402 { &hf_bootp_pkt_mdc_mib_ietf_management_event,
6403 { "IETF Management Event MIB", "bootp.vendor.pktc.mdc_ietf.mib.management_event",
6404 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04,
6407 { &hf_bootp_pkt_mdc_mib_ietf_reserved,
6408 { "Reserved", "bootp.vendor.pktc.mdc_ietf.mib.reserved",
6409 FT_UINT8, BASE_HEX, NULL, 0xF8,
6412 { &hf_bootp_pkt_mdc_mib_euro_mta,
6413 { "PacketCable 1.5 MTA MIB", "bootp.vendor.pktc.mdc_euro.mib.mta",
6414 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
6417 { &hf_bootp_pkt_mdc_mib_euro_signaling,
6418 { "PacketCable 1.5 Signaling MIB", "bootp.vendor.pktc.mdc_euro.mib.signaling",
6419 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
6422 { &hf_bootp_pkt_mdc_mib_euro_management_event,
6423 { "PacketCable 1.5 Management Event MIB", "bootp.vendor.pktc.mdc_euro.mib.management_event",
6424 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04,
6427 { &hf_bootp_pkt_mdc_mib_euro_mta_extension,
6428 { "PacketCable 1.5 MTA Extension MIB", "bootp.vendor.pktc.mdc_euro.mib.mta_extension",
6429 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08,
6432 { &hf_bootp_pkt_mdc_mib_euro_mta_signaling_extension,
6433 { "PacketCable 1.5 Signaling Extension MIB", "bootp.vendor.pktc.mdc_euro.mib.signaling_extension",
6434 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10,
6437 { &hf_bootp_pkt_mdc_mib_euro_mta_mem_extention,
6438 { "PacketCable 1.5 MEM Extension MIB", "bootp.vendor.pktc.mdc_euro.mib.mem_extention",
6439 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20,
6442 { &hf_bootp_pkt_mdc_mib_euro_reserved,
6443 { "Reserved", "bootp.vendor.pktc.mdc_euro.mib.reserved",
6444 FT_UINT8, BASE_HEX, NULL, 0xC0,
6447 { &hf_bootp_docsis_cm_cap_len,
6448 { "CM DC Length", "bootp.vendor.docsis.cm_cap_len",
6449 FT_UINT8, BASE_DEC, NULL, 0x0,
6450 "DOCSIS Cable Modem Device Capabilities Length", HFILL }},
6452 { &hf_bootp_docsis_cm_cap_type,
6453 { "CM DC Type", "bootp.docsis_cm_cap_type",
6454 FT_UINT16, BASE_DEC, VALS(docsis_cm_cap_type_vals), 0x0,
6455 "Docsis Cable Modem Device Capability type", HFILL }},
6457 { &hf_bootp_docsis_cm_cap_ranging_hold_off_cm,
6458 { "CM", "bootp.docsis_cm_cap.ranging_hold_off.cm",
6459 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x01,
6462 { &hf_bootp_docsis_cm_cap_ranging_hold_off_eps,
6463 { "ePS or eRouter", "bootp.docsis_cm_cap.ranging_hold_off.eps",
6464 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x02,
6467 { &hf_bootp_docsis_cm_cap_ranging_hold_off_emta,
6468 { "EMTA or EDVA", "bootp.docsis_cm_cap.ranging_hold_off.emta",
6469 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x04,
6472 { &hf_bootp_docsis_cm_cap_ranging_hold_off_dsg,
6473 { "DSG/eSTB", "bootp.docsis_cm_cap.ranging_hold_off.dsg",
6474 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x08,
6477 { &hf_bootp_docsis_cm_cap_mpls_stpid,
6478 { "[IEEE 802.1ad] S-TPID", "bootp.docsis_cm_cap.mpls.stpid",
6479 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x01,
6482 { &hf_bootp_docsis_cm_cap_mpls_svid,
6483 { "[IEEE 802.1ad] S-VID", "bootp.docsis_cm_cap.mpls.svid",
6484 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x02,
6487 { &hf_bootp_docsis_cm_cap_mpls_spcp,
6488 { "[IEEE 802.1ad] S-PCP", "bootp.docsis_cm_cap.mpls.spcp",
6489 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x04,
6492 { &hf_bootp_docsis_cm_cap_mpls_sdei,
6493 { "[IEEE 802.1ad] S-DEI", "bootp.docsis_cm_cap.mpls.sdei",
6494 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x08,
6497 { &hf_bootp_docsis_cm_cap_mpls_ctpid,
6498 { "[IEEE 802.1ad] C-TPID", "bootp.docsis_cm_cap.mpls.ctpid",
6499 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x10,
6502 { &hf_bootp_docsis_cm_cap_mpls_cvid,
6503 { "[IEEE 802.1ad] C-VID", "bootp.docsis_cm_cap.mpls.cvid",
6504 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x20,
6507 { &hf_bootp_docsis_cm_cap_mpls_cpcp,
6508 { "[IEEE 802.1ad] C-PCP", "bootp.docsis_cm_cap.mpls.cpcp",
6509 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x40,
6512 { &hf_bootp_docsis_cm_cap_mpls_ccfi,
6513 { "[IEEE 802.1ad] C-CFI", "bootp.docsis_cm_cap.mpls.ccfi",
6514 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x80,
6517 { &hf_bootp_docsis_cm_cap_mpls_stci,
6518 { "[IEEE 802.1ad] S-TCI", "bootp.docsis_cm_cap.mpls.stci",
6519 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x100,
6522 { &hf_bootp_docsis_cm_cap_mpls_ctci,
6523 { "[IEEE 802.1ad] C-TCI", "bootp.docsis_cm_cap.mpls.ctci",
6524 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x200,
6527 { &hf_bootp_docsis_cm_cap_mpls_itpid,
6528 { "[IEEE 802.1ad] I-TPID", "bootp.docsis_cm_cap.mpls.itpid",
6529 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x400,
6532 { &hf_bootp_docsis_cm_cap_mpls_isid,
6533 { "[IEEE 802.1ad] I-SID", "bootp.docsis_cm_cap.mpls.isid",
6534 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x800,
6537 { &hf_bootp_docsis_cm_cap_mpls_itci,
6538 { "[IEEE 802.1ad] I-TCI", "bootp.docsis_cm_cap.mpls.itci",
6539 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x1000,
6542 { &hf_bootp_docsis_cm_cap_mpls_ipcp,
6543 { "[IEEE 802.1ad] I-PCP", "bootp.docsis_cm_cap.mpls.ipcp",
6544 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x2000,
6547 { &hf_bootp_docsis_cm_cap_mpls_idei,
6548 { "[IEEE 802.1ad] I-DEI", "bootp.docsis_cm_cap.mpls.idei",
6549 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x4000,
6552 { &hf_bootp_docsis_cm_cap_mpls_iuca,
6553 { "[IEEE 802.1ad] I-UCA", "bootp.docsis_cm_cap.mpls.iuca",
6554 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x8000,
6557 { &hf_bootp_docsis_cm_cap_mpls_btpid,
6558 { "[IEEE 802.1ad] B-TPID", "bootp.docsis_cm_cap.mpls.btpid",
6559 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x10000,
6562 { &hf_bootp_docsis_cm_cap_mpls_btci,
6563 { "[IEEE 802.1ad] B-TCI", "bootp.docsis_cm_cap.mpls.btci",
6564 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x20000,
6567 { &hf_bootp_docsis_cm_cap_mpls_bpcp,
6568 { "[IEEE 802.1ad] B-PCP", "bootp.docsis_cm_cap.mpls.bpcp",
6569 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x40000,
6572 { &hf_bootp_docsis_cm_cap_mpls_bdei,
6573 { "[IEEE 802.1ad] B-DEI", "bootp.docsis_cm_cap.mpls.bdei",
6574 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x80000,
6577 { &hf_bootp_docsis_cm_cap_mpls_bvid,
6578 { "[IEEE 802.1ad] B-VID", "bootp.docsis_cm_cap.mpls.bvid",
6579 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x100000,
6582 { &hf_bootp_docsis_cm_cap_mpls_bda,
6583 { "[IEEE 802.1ad] B-DA", "bootp.docsis_cm_cap.mpls.bda",
6584 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x200000,
6587 { &hf_bootp_docsis_cm_cap_mpls_bsa,
6588 { "[IEEE 802.1ad] B-SA", "bootp.docsis_cm_cap.mpls.bsa",
6589 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x200000,
6592 { &hf_bootp_docsis_cm_cap_mpls_tc,
6593 { "MPLS TC", "bootp.docsis_cm_cap.mpls.tc",
6594 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x200000,
6597 { &hf_bootp_docsis_cm_cap_mpls_label,
6598 { "MPLS Label", "bootp.docsis_cm_cap.mpls.label",
6599 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x200000,
6602 { &hf_bootp_docsis_cm_cap_ussymrate_160,
6603 { "160 ksps symbol rate", "bootp.docsis_cm_cap.ussymrate.160",
6604 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
6607 { &hf_bootp_docsis_cm_cap_ussymrate_320,
6608 { "320 ksps symbol rate", "bootp.docsis_cm_cap.ussymrate.320",
6609 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
6612 { &hf_bootp_docsis_cm_cap_ussymrate_640,
6613 { "640 ksps symbol rate", "bootp.docsis_cm_cap.ussymrate.640",
6614 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
6617 { &hf_bootp_docsis_cm_cap_ussymrate_1280,
6618 { "1280 ksps symbol rate", "bootp.docsis_cm_cap.ussymrate.1280",
6619 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
6622 { &hf_bootp_docsis_cm_cap_ussymrate_2560,
6623 { "2560 ksps symbol rate", "bootp.docsis_cm_cap.ussymrate.2560",
6624 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
6627 { &hf_bootp_docsis_cm_cap_ussymrate_5120,
6628 { "5120 ksps symbol rate", "bootp.docsis_cm_cap.ussymrate.5120",
6629 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
6632 { &hf_bootp_client_identifier_uuid,
6633 { "Client Identifier (UUID)", "bootp.client_id.uuid",
6634 FT_GUID, BASE_NONE, NULL, 0x0,
6635 "Client Machine Identifier (UUID)", HFILL }},
6637 { &hf_bootp_client_hardware_address,
6638 { "Client hardware address", "bootp.client_hardware_address",
6639 FT_STRING, BASE_NONE, NULL, 0x0,
6642 { &hf_bootp_client_id_iaid,
6643 { "IAID", "bootp.client_id.iaid",
6644 FT_STRING, BASE_NONE, NULL, 0x0,
6647 { &hf_bootp_client_id_duid_type,
6648 { "DUID Type", "bootp.client_id.duid_type",
6649 FT_UINT16, BASE_DEC, VALS(duidtype_vals), 0x0,
6652 { &hf_bootp_client_identifier_duid_llt_hw_type,
6653 { "Hardware type", "bootp.client_id.duid_llt_hw_type",
6654 FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0x0,
6655 "Client Identifier DUID LLT Hardware type", HFILL }},
6657 { &hf_bootp_client_identifier_duid_ll_hw_type,
6658 { "Hardware type", "bootp.client_id.duid_ll_hw_type",
6659 FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0x0,
6660 "Client Identifier DUID LL Hardware type", HFILL }},
6662 { &hf_bootp_client_identifier_time,
6663 { "Time", "bootp.client_id.time",
6664 FT_UINT32, BASE_DEC, NULL, 0x0,
6667 { &hf_bootp_client_identifier_link_layer_address,
6668 { "Link layer address", "bootp.client_id.link_layer_address",
6669 FT_STRING, BASE_NONE, NULL, 0x0,
6672 { &hf_bootp_client_identifier_enterprise_num,
6673 { "Enterprise-number", "bootp.client_id.enterprise_num",
6674 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0,
6677 { &hf_bootp_client_identifier,
6678 { "Identifier", "bootp.client_id",
6679 FT_BYTES, BASE_NONE, NULL, 0x0,
6682 { &hf_bootp_client_identifier_type,
6683 { "Type", "bootp.client_id.type",
6684 FT_UINT8, BASE_DEC, NULL, 0x0,
6687 { &hf_bootp_client_identifier_undef,
6688 { "Client Identifier", "bootp.client_id.undef",
6689 FT_STRING, BASE_NONE, NULL, 0x0,
6692 { &hf_bootp_option_type,
6693 { "Option", "bootp.option.type",
6694 FT_UINT8, BASE_DEC, NULL, 0x0,
6695 "Bootp/Dhcp option type", HFILL }},
6697 { &hf_bootp_option_length,
6698 { "Length", "bootp.option.length",
6699 FT_UINT8, BASE_DEC, NULL, 0x0,
6700 "Bootp/Dhcp option length", HFILL }},
6702 { &hf_bootp_suboption_length,
6703 { "Length", "bootp.option.suboption_length",
6704 FT_UINT8, BASE_DEC, NULL, 0x0,
6705 "Suboption length", HFILL }},
6707 { &hf_bootp_option_value,
6708 { "Value", "bootp.option.value",
6709 FT_BYTES, BASE_NONE, NULL, 0x0,
6710 "Bootp/Dhcp option value", HFILL }},
6712 { &hf_bootp_option_value_8,
6713 { "Value", "bootp.option.value.uint",
6714 FT_UINT8, BASE_DEC, NULL, 0x0,
6715 "8-bit Bootp/Dhcp option value", HFILL }},
6717 { &hf_bootp_option_value_16,
6718 { "Value", "bootp.option.value.uint",
6719 FT_UINT16, BASE_DEC, NULL, 0x0,
6720 "16-bit Bootp/Dhcp option value", HFILL }},
6722 { &hf_bootp_option_value_u32,
6723 { "Value", "bootp.option.value.uint",
6724 FT_UINT32, BASE_HEX, NULL, 0x0,
6725 "32-bit Bootp/Dhcp option value", HFILL }},
6727 { &hf_bootp_option_value_i32,
6728 { "Value", "bootp.option.value.int",
6729 FT_INT32, BASE_DEC, NULL, 0x0,
6730 "32-bit Bootp/Dhcp option value", HFILL }},
6732 { &hf_bootp_option_value_stringz,
6733 { "Value", "bootp.option.value.string",
6734 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6735 "Z-String Bootp/Dhcp option value", HFILL }},
6737 { &hf_bootp_option_value_ip_address,
6738 { "Value", "bootp.option.value.address",
6739 FT_IPv4, BASE_NONE, NULL, 0x00,
6740 "IP address Bootp/Dhcp option value", HFILL }},
6742 { &hf_bootp_option_value_boolean,
6743 { "Value", "bootp.option.value.bool",
6744 FT_BOOLEAN, BASE_NONE, TFS(&tfs_true_false), 0x00,
6745 "Boolean Bootp/Dhcp option value", HFILL }},
6747 { &hf_bootp_option_padding,
6748 { "Padding", "bootp.option.padding",
6749 FT_BYTES, BASE_NONE, NULL, 0x0,
6750 "Option 0: Padding", HFILL }},
6752 { &hf_bootp_option_subnet_mask,
6753 { "Subnet Mask", "bootp.option.subnet_mask",
6754 FT_IPv4, BASE_NETMASK, NULL, 0x00,
6755 "Option 1: Subnet Mask", HFILL }},
6757 { &hf_bootp_option_time_offset,
6758 { "Time Offset", "bootp.option.time_offset",
6759 FT_INT32, BASE_DEC, NULL, 0x00,
6760 "Option 2: Time Offset", HFILL }},
6762 { &hf_bootp_option_router,
6763 { "Router", "bootp.option.router",
6764 FT_IPv4, BASE_NONE, NULL, 0x00,
6765 "Option 3: Router", HFILL }},
6767 { &hf_bootp_option_time_server,
6768 { "Time Server", "bootp.option.time_server",
6769 FT_IPv4, BASE_NONE, NULL, 0x00,
6770 "Option 4: Time Server", HFILL }},
6772 { &hf_bootp_option_name_server,
6773 { "Name Server", "bootp.option.name_server",
6774 FT_IPv4, BASE_NONE, NULL, 0x00,
6775 "Option 5: Name Server", HFILL }},
6777 { &hf_bootp_option_domain_name_server,
6778 { "Domain Name Server", "bootp.option.domain_name_server",
6779 FT_IPv4, BASE_NONE, NULL, 0x00,
6780 "Option 6: Domain Name Server", HFILL }},
6782 { &hf_bootp_option_log_server,
6783 { "Log Server", "bootp.option.log_server",
6784 FT_IPv4, BASE_NONE, NULL, 0x00,
6785 "Option 7: Log Server", HFILL }},
6787 { &hf_bootp_option_quotes_server,
6788 { "Quotes Server", "bootp.option.quotes_server",
6789 FT_IPv4, BASE_NONE, NULL, 0x00,
6790 "Option 8: Quotes Server", HFILL }},
6792 { &hf_bootp_option_lpr_server,
6793 { "LPR Server", "bootp.option.lpr_server",
6794 FT_IPv4, BASE_NONE, NULL, 0x00,
6795 "Option 9: LPR Server", HFILL }},
6797 { &hf_bootp_option_impress_server,
6798 { "Impress Server", "bootp.option.impress_server",
6799 FT_IPv4, BASE_NONE, NULL, 0x00,
6800 "Option 10: Impress Server", HFILL }},
6802 { &hf_bootp_option_resource_location_server,
6803 { "Resource Location Server", "bootp.option.resource_location_server",
6804 FT_IPv4, BASE_NONE, NULL, 0x00,
6805 "Option 11: Resource Location Server", HFILL }},
6807 { &hf_bootp_option_hostname,
6808 { "Host Name", "bootp.option.hostname",
6809 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6810 "Option 12: Host Name", HFILL }},
6812 { &hf_bootp_option_boot_file_size,
6813 { "Boot File Size", "bootp.option.boot_file_size",
6814 FT_UINT16, BASE_DEC, NULL, 0x0,
6815 "Option 13: Boot File Size", HFILL }},
6817 { &hf_bootp_option_merit_dump_file,
6818 { "Merit Dump File", "bootp.option.merit_dump_file",
6819 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6820 "Option 14: Merit Dump File", HFILL }},
6822 { &hf_bootp_option_domain_name,
6823 { "Domain Name", "bootp.option.domain_name",
6824 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6825 "Option 15: Domain Name", HFILL }},
6827 { &hf_bootp_option_swap_server,
6828 { "Swap Server", "bootp.option.swap_server",
6829 FT_IPv4, BASE_NONE, NULL, 0x00,
6830 "Option 16: Swap Server", HFILL }},
6832 { &hf_bootp_option_root_path,
6833 { "Root Path", "bootp.option.root_path",
6834 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6835 "Option 17: Root Path", HFILL }},
6837 { &hf_bootp_option_extension_path,
6838 { "Extensions Path", "bootp.option.extension_path",
6839 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6840 "Option 18: Extensions Path", HFILL }},
6842 { &hf_bootp_option_ip_forwarding,
6843 { "IP Forwarding", "bootp.option.ip_forwarding",
6844 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6845 "Option 19: IP Forwarding", HFILL }},
6847 { &hf_bootp_option_policy_filter_ip,
6848 { "IP Address", "bootp.option.policy_filter.ip",
6849 FT_IPv4, BASE_NONE, NULL, 0x00,
6850 "Option 21: IP address", HFILL }},
6852 { &hf_bootp_option_policy_filter_subnet_mask,
6853 { "Subnet Mask", "bootp.option.policy_filter.subnet_mask",
6854 FT_IPv4, BASE_NETMASK, NULL, 0x00,
6855 "Option 21: Subnet Mask", HFILL }},
6857 { &hf_bootp_option_non_local_source_routing,
6858 { "Non-Local Source Routing", "bootp.option.non_local_source_routing",
6859 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6860 "Option 20: Non-Local Source Routing", HFILL }},
6862 { &hf_bootp_option_max_datagram_reassembly_size,
6863 { "Maximum Datagram Reassembly Size", "bootp.option.max_datagram_reassembly_size",
6864 FT_UINT16, BASE_DEC, NULL, 0x0,
6865 "Option 22: Maximum Datagram Reassembly Size", HFILL }},
6867 { &hf_bootp_option_default_ip_ttl,
6868 { "Default IP Time-to-Live", "bootp.option.default_ip_ttl",
6869 FT_UINT8, BASE_DEC, NULL, 0x0,
6870 "Option 23: Default IP Time-to-Live", HFILL }},
6872 { &hf_bootp_option_path_mtu_aging_timeout,
6873 { "Path MTU Aging Timeout", "bootp.option.path_mtu_aging_timeout",
6874 FT_UINT32, BASE_DEC, NULL, 0x00,
6875 "Option 24: Path MTU Aging Timeout", HFILL }},
6877 { &hf_bootp_option_path_mtu_plateau_table_item,
6878 { "Path MTU Plateau Table Item", "bootp.option.path_mtu_plateau_table_item",
6879 FT_UINT16, BASE_DEC, NULL, 0x0,
6880 "Option 25: Path MTU Plateau Table Item", HFILL }},
6882 { &hf_bootp_option_interface_mtu,
6883 { "Interface MTU", "bootp.option.interface_mtu",
6884 FT_UINT16, BASE_DEC, NULL, 0x0,
6885 "Option 26: Interface MTU", HFILL }},
6887 { &hf_bootp_option_all_subnets_are_local,
6888 { "All Subnets are Local", "bootp.option.all_subnets_are_local",
6889 FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00,
6890 "Option 27: All Subnets are Local", HFILL }},
6892 { &hf_bootp_option_broadcast_address,
6893 { "Broadcast Address", "bootp.option.broadcast_address",
6894 FT_IPv4, BASE_NONE, NULL, 0x00,
6895 "Option 28: Broadcast Address", HFILL }},
6897 { &hf_bootp_option_perform_mask_discovery,
6898 { "Perform Mask Discovery", "bootp.option.perform_mask_discovery",
6899 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6900 "Option 29: Perform Mask Discovery", HFILL }},
6902 { &hf_bootp_option_mask_supplier,
6903 { "Mask Supplier", "bootp.option.mask_supplier",
6904 FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00,
6905 "Option 30: Mask Supplier", HFILL }},
6907 { &hf_bootp_option_perform_router_discover,
6908 { "Perform Router Discover", "bootp.option.perform_router_discover",
6909 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6910 "Option 31: Perform Router Discover", HFILL }},
6912 { &hf_bootp_option_router_solicitation_address,
6913 { "Router Solicitation Address", "bootp.option.router_solicitation_address",
6914 FT_IPv4, BASE_NONE, NULL, 0x00,
6915 "Option 32: Router Solicitation Address", HFILL }},
6917 { &hf_bootp_option_static_route_ip,
6918 { "Destination IP Address", "bootp.option.static_route.ip",
6919 FT_IPv4, BASE_NONE, NULL, 0x00,
6920 "Option 33: Destination IP address", HFILL }},
6922 { &hf_bootp_option_static_route_router,
6923 { "Destination Router", "bootp.option.static_route.router",
6924 FT_IPv4, BASE_NONE, NULL, 0x00,
6925 "Option 33: Destination Router", HFILL }},
6927 { &hf_bootp_option_trailer_encapsulation,
6928 { "Trailer Encapsulation", "bootp.option.trailer_encapsulation",
6929 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6930 "Option 34: Trailer Encapsulation", HFILL }},
6932 { &hf_bootp_option_arp_cache_timeout,
6933 { "ARP Cache Timeout", "bootp.option.arp_cache_timeout",
6934 FT_UINT32, BASE_DEC, NULL, 0x00,
6935 "Option 35: ARP Cache Timeout", HFILL }},
6937 { &hf_bootp_option_ethernet_encapsulation,
6938 { "Ethernet Encapsulation", "bootp.option.ethernet_encapsulation",
6939 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6940 "Option 36: Ethernet Encapsulation", HFILL }},
6942 { &hf_bootp_option_tcp_default_ttl,
6943 { "TCP Default TTL", "bootp.option.tcp_default_ttl",
6944 FT_UINT8, BASE_DEC, NULL, 0x0,
6945 "Option 37: TCP Default TTL", HFILL }},
6947 { &hf_bootp_option_tcp_keepalive_interval,
6948 { "TCP Keepalive Interval", "bootp.option.tcp_keepalive_interval",
6949 FT_UINT32, BASE_DEC, NULL, 0x00,
6950 "Option 38: TCP Keepalive Interval", HFILL }},
6952 { &hf_bootp_option_tcp_keepalive_garbage,
6953 { "TCP Keepalive Garbage", "bootp.option.tcp_keepalive_garbage",
6954 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00,
6955 "Option 39: TCP Keepalive Garbage", HFILL }},
6957 { &hf_bootp_option_nis_domain,
6958 { "Network Information Service Domain", "bootp.option.nis_domain",
6959 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6960 "Option 40: Network Information Service Domain", HFILL }},
6962 { &hf_bootp_option_nis_server,
6963 { "Network Information Service Server", "bootp.option.nis_server",
6964 FT_IPv4, BASE_NONE, NULL, 0x00,
6965 "Option 41: Network Information Service Server", HFILL }},
6967 { &hf_bootp_option_ntp_server,
6968 { "Network Time Protocol Server", "bootp.option.ntp_server",
6969 FT_IPv4, BASE_NONE, NULL, 0x00,
6970 "Option 42: Network Time Protocol Server", HFILL }},
6973 { &hf_bootp_option43_value,
6974 { "Value", "bootp.option.vendor.value",
6975 FT_BYTES, BASE_NONE, NULL, 0x0,
6976 "Option 43: Suboption value", HFILL }},
6978 { &hf_bootp_option43_value_8,
6979 { "Value", "bootp.option.vendor.value.uint",
6980 FT_UINT8, BASE_DEC, NULL, 0x0,
6981 "Option 43: Suboption 8-bit value", HFILL }},
6983 { &hf_bootp_option43_value_32,
6984 { "Value", "bootp.option.vendor.value.uint",
6985 FT_UINT32, BASE_DEC, NULL, 0x0,
6986 "Option 43: Suboption 32-bit value", HFILL }},
6988 { &hf_bootp_option43_value_stringz,
6989 { "Value", "bootp.option.vendor.value.string",
6990 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6991 "Option 43: Suboption Z-String value", HFILL }},
6993 { &hf_bootp_option43_value_ip_address,
6994 { "Value", "bootp.option.vendor.value.address",
6995 FT_IPv4, BASE_NONE, NULL, 0x00,
6996 "Option 43: Suboption IP address", HFILL }},
6999 { &hf_bootp_option43_pxeclient_suboption,
7000 { "Option 43 Suboption", "bootp.option.vendor.pxeclient.suboption",
7001 FT_UINT8, BASE_DEC, VALS(option43_pxeclient_suboption_vals), 0x0,
7002 "Option 43:PXE Client Suboption", HFILL }},
7004 { &hf_bootp_option43_pxeclient_padding,
7005 { "Padding", "bootp.option.vendor.pxeclient.padding",
7006 FT_UINT8, BASE_DEC, NULL, 0x0,
7007 "Option 43:PXE Client 0 Padding", HFILL }},
7009 { &hf_bootp_option43_pxeclient_mtftp_ip,
7010 { "mtftp IP", "bootp.option.vendor.pxeclient.mtftp_ip",
7011 FT_IPv4, BASE_NONE, NULL, 0x00,
7012 "Option 43:PXE Client 1 mtftp IP", HFILL }},
7014 { &hf_bootp_option43_pxeclient_mtftp_client_port,
7015 { "mtftp IP", "bootp.option.vendor.pxeclient.mtftp_client_port",
7016 FT_UINT16, BASE_DEC, NULL, 0x00,
7017 "Option 43:PXE Client 2 mtftp client port", HFILL }},
7019 { &hf_bootp_option43_pxeclient_mtftp_server_port,
7020 { "mtftp IP", "bootp.option.vendor.pxeclient.mtftp_server_port",
7021 FT_UINT16, BASE_DEC, NULL, 0x00,
7022 "Option 43:PXE Client 3 mtftp server port", HFILL }},
7024 { &hf_bootp_option43_pxeclient_mtftp_timeout,
7025 { "mtftp timeout", "bootp.option.vendor.pxeclient.mtftp_timeout",
7026 FT_UINT8, BASE_DEC, NULL, 0x0,
7027 "Option 43:PXE Client 4 mtftp timeout", HFILL }},
7029 { &hf_bootp_option43_pxeclient_mtftp_delay,
7030 { "mtftp delay", "bootp.option.vendor.pxeclient.mtftp_delay",
7031 FT_UINT8, BASE_DEC, NULL, 0x0,
7032 "Option 43:PXE Client 5 mtftp delay", HFILL }},
7034 { &hf_bootp_option43_pxeclient_discovery_control,
7035 { "discovery control", "bootp.option.vendor.pxeclient.discovery_control",
7036 FT_UINT8, BASE_HEX, NULL, 0x0,
7037 "Option 43:PXE Client 6 discovery control", HFILL }},
7039 { &hf_bootp_option43_pxeclient_multicast_address,
7040 { "multicast address", "bootp.option.vendor.pxeclient.multicast_address",
7041 FT_IPv4, BASE_NONE, NULL, 0x00,
7042 "Option 43:PXE Client 7 multicast address", HFILL }},
7044 { &hf_bootp_option43_pxeclient_boot_servers,
7045 { "boot servers", "bootp.option.vendor.pxeclient.boot_servers",
7046 FT_BYTES, BASE_NONE, NULL, 0x0,
7047 "Option 43:PXE Client 8 boot servers", HFILL }},
7049 { &hf_bootp_option43_pxeclient_boot_menu,
7050 { "boot menu", "bootp.option.vendor.pxeclient.boot_menu",
7051 FT_BYTES, BASE_NONE, NULL, 0x0,
7052 "Option 43:PXE Client 9 boot menu", HFILL }},
7054 { &hf_bootp_option43_pxeclient_menu_prompt,
7055 { "menu prompt", "bootp.option.vendor.pxeclient.menu_prompt",
7056 FT_BYTES, BASE_NONE, NULL, 0x0,
7057 "Option 43:PXE Client 10 menu prompt", HFILL }},
7059 { &hf_bootp_option43_pxeclient_multicast_address_alloc,
7060 { "multicast address alloc", "bootp.option.vendor.pxeclient.multicast_address_alloc",
7061 FT_BYTES, BASE_NONE, NULL, 0x0,
7062 "Option 43:PXE Client 11 multicast address alloc", HFILL }},
7064 { &hf_bootp_option43_pxeclient_credential_types,
7065 { "credential types", "bootp.option.vendor.pxeclient.credential_types",
7066 FT_BYTES, BASE_NONE, NULL, 0x0,
7067 "Option 43:PXE Client 12 credential types", HFILL }},
7069 { &hf_bootp_option43_pxeclient_boot_item,
7070 { "boot item", "bootp.option.vendor.pxeclient.boot_item",
7071 FT_BYTES, BASE_NONE, NULL, 0x0,
7072 "Option 43:PXE Client 71 boot item", HFILL }},
7074 { &hf_bootp_option43_pxeclient_end,
7075 { "PXE Client End", "bootp.option.vendor.pxeclient.end",
7076 FT_UINT8, BASE_DEC, NULL, 0x0,
7077 "Option 43:PXE Client 255 End", HFILL }},
7080 { &hf_bootp_option43_cl_suboption,
7081 { "Option 43 Suboption", "bootp.option.vendor.cl.suboption",
7082 FT_UINT8, BASE_DEC, VALS(option43_cl_suboption_vals), 0x0,
7083 "Option 43:CL Suboption", HFILL }},
7085 { &hf_bootp_option43_cl_padding,
7086 { "Padding", "bootp.option.vendor.cl.padding",
7087 FT_UINT8, BASE_DEC, NULL, 0x0,
7088 "Option 43:CL 0 Padding", HFILL }},
7090 { &hf_bootp_option43_cl_suboption_request_list,
7091 { "Suboption Request List", "bootp.option.vendor.cl.suboption_request_list",
7092 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7093 "Option 43:CL 1 Suboption Request List", HFILL }},
7095 { &hf_bootp_option43_cl_device_type,
7096 { "Device Type", "bootp.option.vendor.cl.device_type",
7097 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7098 "Option 43:CL 2 Device Type", HFILL }},
7100 { &hf_bootp_option43_cl_esafe_type,
7101 { "eSAFE Types", "bootp.option.vendor.cl.esafe_type",
7102 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7103 "Option 43:CL 3 eSAFE Types", HFILL }},
7105 { &hf_bootp_option43_cl_serial_number,
7106 { "Serial Number", "bootp.option.vendor.cl.serial_number",
7107 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7108 "Option 43:CL 4 Serial Number", HFILL }},
7110 { &hf_bootp_option43_cl_hardware_version,
7111 { "Hardware Version", "bootp.option.vendor.cl.hardware_version",
7112 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7113 "Option 43:CL 5 Hardware Version", HFILL }},
7115 { &hf_bootp_option43_cl_software_version,
7116 { "Software Version", "bootp.option.vendor.cl.software_version",
7117 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7118 "Option 43:CL 6 Software Version", HFILL }},
7120 { &hf_bootp_option43_cl_boot_rom_version,
7121 { "Boot ROM version", "bootp.option.vendor.cl.boot_rom_version",
7122 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7123 "Option 43:CL 7 Boot ROM version", HFILL }},
7125 { &hf_bootp_option43_cl_oui_string,
7126 { "Organizationally Unique Identifier", "bootp.option.vendor.cl.oui_string",
7127 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7128 "Option 43:CL 8 Organizationally Unique Identifier", HFILL }},
7130 { &hf_bootp_option43_cl_oui_bytes,
7131 { "Organizationally Unique Identifier", "bootp.option.vendor.cl.oui_bytes",
7132 FT_BYTES, BASE_NONE, NULL, 0x0,
7133 "Option 43:CL 8 Organizationally Unique Identifier", HFILL }},
7135 { &hf_bootp_option43_cl_model_number,
7136 { "Model Number", "bootp.option.vendor.cl.model_number",
7137 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7138 "Option 43:CL 9 Model Number", HFILL }},
7140 { &hf_bootp_option43_cl_vendor_name10,
7141 { "Vendor Name", "bootp.option.vendor.cl.vendor_name10",
7142 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7143 "Option 43:CL 10 Vendor Name", HFILL }},
7145 { &hf_bootp_option43_cl_address_realm,
7146 { "Address Realm", "bootp.option.vendor.cl.address_realm",
7147 FT_UINT8, BASE_DEC, VALS(cablehome_subopt11_vals), 0x0,
7148 "Option 43:CL 11 Address Realm", HFILL }},
7150 { &hf_bootp_option43_cl_cm_ps_system_desc,
7151 { "CM/PS System Description", "bootp.option.vendor.cl.cm_ps_system_desc",
7152 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7153 "Option 43:CL 12 CM/PS System Description", HFILL }},
7155 { &hf_bootp_option43_cl_cm_ps_firmware_revision,
7156 { "CM/PS Firmware Revision", "bootp.option.vendor.cl.cm_ps_firmware_revision",
7157 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7158 "Option 43:CL 13 CM/PS Firmware Revision", HFILL }},
7160 { &hf_bootp_option43_cl_firewall_policy_file_version,
7161 { "Firewall Policy File Version", "bootp.option.vendor.cl.firewall_policy_file_version",
7162 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7163 "Option 43:CL 14 Firewall Policy File Version", HFILL }},
7165 { &hf_bootp_option43_cl_esafe_config_file_devices,
7166 { "eSafe Config File Devices", "bootp.option.vendor.cl.esafe_config_file_devices",
7167 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7168 "Option 43:CL 15 eSafe Config File Devices", HFILL }},
7170 { &hf_bootp_option43_cl_video_security_tape,
7171 { "Video Security Type", "bootp.option.vendor.cl.video_security_tape",
7172 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7173 "Option 43:CL 18 Video Security Type", HFILL }},
7175 { &hf_bootp_option43_cl_mta_mac_address,
7176 { "MTA MAC Address", "bootp.option.vendor.cl.mta_mac_address",
7177 FT_ETHER, BASE_NONE, NULL, 0x0,
7178 "Option 43:CL 31 MTA MAC Address", HFILL }},
7180 { &hf_bootp_option43_cl_correlation_ID,
7181 { "Correlation ID", "bootp.option.vendor.cl.correlation_ID",
7182 FT_UINT32, BASE_DEC, NULL, 0x0,
7183 "Option 43: CL 32 Correlation ID", HFILL }},
7185 { &hf_bootp_option43_cl_vendor_name51,
7186 { "Vendor Name", "bootp.option.vendor.cl.vendor_name51",
7187 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7188 "Option 43:CL 51 Vendor Name", HFILL }},
7190 { &hf_bootp_option43_cl_cablecard_capability,
7191 { "CableCARD Capability", "bootp.option.vendor.cl.cablecard_capability",
7192 FT_BYTES, BASE_NONE, NULL, 0x0,
7193 "Option 43:CL 52 CableCARD Capability", HFILL }},
7195 { &hf_bootp_option43_cl_device_id_ca,
7196 { "Device Identification (CA)", "bootp.option.vendor.cl.device_id_ca",
7197 FT_BYTES, BASE_NONE, NULL, 0x0,
7198 "Option 43:CL 53 Device Identification (CA)", HFILL }},
7200 { &hf_bootp_option43_cl_device_id_x509,
7201 { "Device Identification (X.509)", "bootp.option.vendor.cl.device_id_x509",
7202 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7203 "Option 43:CL 54 Device Identification (X.509)", HFILL }},
7205 { &hf_bootp_option43_cl_end,
7206 { "CL End", "bootp.option.vendor.cl.end",
7207 FT_UINT8, BASE_DEC, NULL, 0x0,
7208 "Option 43:CL 255 End", HFILL }},
7211 { &hf_bootp_option43_alcatel_suboption,
7212 { "Option 43 Suboption", "bootp.option.vendor.alu.suboption",
7213 FT_UINT8, BASE_DEC, VALS(option43_alcatel_suboption_vals), 0x0,
7214 "Option 43:Alcatel Suboption", HFILL }},
7216 { &hf_bootp_option43_alcatel_padding,
7217 { "Padding", "bootp.option.vendor.alu.padding",
7218 FT_UINT8, BASE_DEC, NULL, 0x0,
7219 "Option 43:Alcatel 0 Padding", HFILL }},
7221 { &hf_bootp_option43_alcatel_vlan_id,
7222 { "Voice VLAN ID", "bootp.option.vendor.alu.vid",
7223 FT_UINT16, BASE_DEC, NULL, 0x0,
7224 "Option 43:Alcatel 58 Voice VLAN ID", HFILL }},
7226 { &hf_bootp_option43_alcatel_tftp1,
7227 { "Spatial Redundancy TFTP1", "bootp.option.vendor.alu.tftp1",
7228 FT_IPv4, BASE_NONE, NULL, 0x0,
7229 "Option 43:Alcatel 64 Spatial Redundancy TFTP1", HFILL }},
7231 { &hf_bootp_option43_alcatel_tftp2,
7232 { "Spatial Redundancy TFTP2", "bootp.option.vendor.alu.tftp2",
7233 FT_IPv4, BASE_NONE, NULL, 0x0,
7234 "Option 43:Alcatel 65 Spatial Redundancy TFTP2", HFILL }},
7236 { &hf_bootp_option43_alcatel_app_type,
7237 { "Application Type", "bootp.option.vendor.alu.app_type",
7238 FT_UINT8, BASE_DEC, VALS(option43_alcatel_app_type_vals), 0x0,
7239 "Option 43:Alcatel 66 Application Type", HFILL }},
7241 { &hf_bootp_option43_alcatel_sip_url,
7242 { "SIP URL", "bootp.option.vendor.alu.sip_url",
7243 FT_STRING, BASE_NONE, NULL, 0x0,
7244 "Option 43:Alcatel 67 SIP URL", HFILL }},
7246 { &hf_bootp_option43_alcatel_end,
7247 { "Alcatel End", "bootp.option.vendor.alu.end",
7248 FT_UINT8, BASE_DEC, NULL, 0x0,
7249 "Option 43:Alcatel 255 End", HFILL }},
7251 { &hf_bootp_option43_arubaap_controllerip,
7252 { "Aruba Controller IP", "bootp.option.vendor.arubaap.controllerip",
7253 FT_STRING, BASE_NONE, NULL, 0x0,
7254 "Address IP of Aruba controller", HFILL }},
7256 { &hf_bootp_option43_arubaiap,
7257 { "Aruba Instant AP", "bootp.option.vendor.arubaiap",
7258 FT_STRING, BASE_NONE, NULL, 0x0,
7259 "nameorg,amp-ip-address,password", HFILL }},
7261 { &hf_bootp_option43_arubaiap_nameorg,
7262 { "Name Organisation", "bootp.option.vendor.arubaiap.name_org",
7263 FT_STRING, BASE_NONE, NULL, 0x0,
7266 { &hf_bootp_option43_arubaiap_ampip,
7267 { "AMP IP Address", "bootp.option.vendor.arubaiap.amp_ip",
7268 FT_STRING, BASE_NONE, NULL, 0x0,
7269 "Address IP of Airwave server (AMP)", HFILL }},
7271 { &hf_bootp_option43_arubaiap_password,
7272 { "Password", "bootp.option.vendor.arubaiap.password",
7273 FT_STRING, BASE_NONE, NULL, 0x0,
7274 "Password for Instant AP Airwave server (AMP)", HFILL }},
7277 { &hf_bootp_option43_bsdp_suboption,
7278 { "Option 43 Suboption", "bootp.option.vendor.bsdp.suboption",
7279 FT_UINT8, BASE_DEC, VALS(option43_cl_suboption_vals), 0x0,
7280 "Option 43:BSDP Suboption", HFILL }},
7282 { &hf_bootp_option43_bsdp_message_type,
7283 { "Message Type", "bootp.option.vendor.bsdp.message_type",
7284 FT_UINT8, BASE_DEC, VALS(o43_bsdp_message_type_vals), 0x0,
7287 { &hf_bootp_option43_bsdp_version,
7288 { "Version", "bootp.option.vendor.bsdp.version",
7289 FT_UINT16, BASE_HEX, NULL, 0x0,
7292 { &hf_bootp_option43_bsdp_server_identifier,
7293 { "Server Identifier", "bootp.option.vendor.bsdp.server_identifier",
7294 FT_IPv4, BASE_NONE, NULL, 0x0,
7297 { &hf_bootp_option43_bsdp_server_priority,
7298 { "Server Priority", "bootp.option.vendor.bsdp.server_priority",
7299 FT_UINT16, BASE_DEC, NULL, 0x0,
7302 { &hf_bootp_option43_bsdp_reply_port,
7303 { "Reply Port", "bootp.option.vendor.bsdp.reply_port",
7304 FT_UINT16, BASE_DEC, NULL, 0x0,
7307 { &hf_bootp_option43_bsdp_boot_image_list_path,
7308 { "Boot Image List Path", "bootp.option.vendor.bsdp.boot_image_list_path",
7309 FT_STRING, BASE_NONE, NULL, 0x0,
7312 { &hf_bootp_option43_bsdp_boot_image_index,
7313 { "Boot Image Index", "bootp.option.vendor.bsdp.boot_image.index",
7314 FT_UINT16, BASE_HEX, NULL, 0x0,
7317 { &hf_bootp_option43_bsdp_default_boot_image_id,
7318 { "Default Boot Image ID", "bootp.option.vendor.bsdp.default_boot_image_id",
7319 FT_UINT32, BASE_HEX, NULL, 0x0,
7322 { &hf_bootp_option43_bsdp_selected_boot_image_id,
7323 { "Selected Boot Image ID", "bootp.option.vendor.bsdp.selected_boot_image_id",
7324 FT_UINT32, BASE_HEX, NULL, 0x0,
7327 { &hf_bootp_option43_bsdp_boot_image_list,
7328 { "Boot Image List", "bootp.option.vendor.bsdp.boot_image_list",
7329 FT_BYTES, BASE_NONE, NULL, 0x0,
7332 { &hf_bootp_option43_bsdp_image_desc,
7333 { "Boot Image Description", "bootp.option.vendor.bsdp.boot_image.desc",
7334 FT_BYTES, BASE_NONE, NULL, 0x0,
7337 { &hf_bootp_option43_bsdp_boot_image_name_len,
7338 { "Boot Image Name Length", "bootp.option.vendor.bsdp.boot_image.name_len",
7339 FT_UINT8, BASE_DEC, NULL, 0x0,
7342 { &hf_bootp_option43_bsdp_boot_image_name,
7343 { "Boot Image Name", "bootp.option.vendor.bsdp.boot_image.name",
7344 FT_STRING, BASE_NONE, NULL, 0x0,
7347 { &hf_bootp_option43_bsdp_netboot_firmware,
7348 { "NetBoot 1.0 Firmware", "bootp.option.vendor.bsdp.netboot_firmware",
7349 FT_NONE, BASE_NONE, NULL, 0x0,
7352 { &hf_bootp_option43_bsdp_attributes_filter_list,
7353 { "Boot Image Attributes Filter List", "bootp.option.vendor.bsdp.attributes_filter_list",
7354 FT_BYTES, BASE_NONE, NULL, 0x0,
7357 { &hf_bootp_option43_bsdp_boot_image_attribute,
7358 { "Boot Image Attribute", "bootp.option.vendor.bsdp.boot_image.attribute",
7359 FT_UINT16, BASE_HEX, NULL, 0x0,
7362 { &hf_bootp_option43_bsdp_boot_image_attribute_install,
7363 { "Install", "bootp.option.vendor.bsdp.boot_image.attribute.install",
7364 FT_UINT16, BASE_HEX, VALS(o43_bsdp_boot_image_install_vals), 0x8000,
7365 "Boot Image Attribute Install", HFILL }},
7367 { &hf_bootp_option43_bsdp_boot_image_attribute_kind,
7368 { "Kind", "bootp.option.vendor.bsdp.boot_image.attribute.kind",
7369 FT_UINT16, BASE_HEX, VALS(o43_bsdp_boot_image_kind_vals), 0x7f00,
7370 "Boot Image Attribute Kind", HFILL }},
7372 { &hf_bootp_option43_bsdp_boot_image_attribute_reserved,
7373 { "Reserved", "bootp.option.vendor.bsdp.boot_image.attribute.reserved",
7374 FT_UINT16, BASE_HEX, NULL, 0x00ff,
7375 "Boot Image Attribute Reserved", HFILL }},
7377 { &hf_bootp_option43_bsdp_message_size,
7378 { "Message Size", "bootp.option.vendor.bsdp.message_size",
7379 FT_UINT16, BASE_DEC, NULL, 0x0,
7383 { &hf_bootp_option_netbios_over_tcpip_name_server,
7384 { "NetBIOS over TCP/IP Name Server", "bootp.option.netbios_over_tcpip_name_server",
7385 FT_IPv4, BASE_NONE, NULL, 0x00,
7386 "Option 44: NetBIOS over TCP/IP Name Server", HFILL }},
7388 { &hf_bootp_option_netbios_over_tcpip_dd_name_server,
7389 { "NetBIOS over TCP/IP Datagram Distribution Name Server", "bootp.option.netbios_over_tcpip_dd_name_server",
7390 FT_IPv4, BASE_NONE, NULL, 0x00,
7391 "Option 45: NetBIOS over TCP/IP Datagram Distribution Name Server", HFILL }},
7393 { &hf_bootp_option_netbios_over_tcpip_node_type,
7394 { "NetBIOS over TCP/IP Node Type", "bootp.option.netbios_over_tcpip_node_type",
7395 FT_UINT8, BASE_DEC, VALS(bootp_nbnt_vals), 0x0,
7396 "Option 46: NetBIOS over TCP/IP Node Type", HFILL }},
7398 { &hf_bootp_option_netbios_over_tcpip_scope,
7399 { "NetBIOS over TCP/IP Scope", "bootp.option.netbios_over_tcpip_scope",
7400 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7401 "Option 47: NetBIOS over TCP/IP Scope", HFILL }},
7403 { &hf_bootp_option_xwindows_system_font_server,
7404 { "X Window System Font Server", "bootp.option.xwindows_system_font_server",
7405 FT_IPv4, BASE_NONE, NULL, 0x00,
7406 "Option 48: X Window System Font Server", HFILL }},
7408 { &hf_bootp_option_xwindows_system_display_manager,
7409 { "X Window System Display Manager", "bootp.option.xwindows_system_display_manager",
7410 FT_IPv4, BASE_NONE, NULL, 0x00,
7411 "Option 49: X Window System Display Manager", HFILL }},
7413 { &hf_bootp_option_requested_ip_address,
7414 { "Requested IP Address", "bootp.option.requested_ip_address",
7415 FT_IPv4, BASE_NONE, NULL, 0x00,
7416 "Option 50: Requested IP Address", HFILL }},
7418 { &hf_bootp_option_ip_address_lease_time,
7419 { "IP Address Lease Time", "bootp.option.ip_address_lease_time",
7420 FT_UINT32, BASE_DEC, NULL, 0x00,
7421 "Option 51: IP Address Lease Time", HFILL }},
7423 { &hf_bootp_option_option_overload,
7424 { "Option Overload", "bootp.option.option_overload",
7425 FT_UINT8, BASE_DEC, VALS(opt_overload_vals), 0x0,
7426 "Option 52: Option Overload", HFILL }},
7428 { &hf_bootp_option_dhcp,
7429 { "DHCP", "bootp.option.dhcp",
7430 FT_UINT8, BASE_DEC, VALS(opt53_text), 0x0,
7431 "Option 53: DHCP option", HFILL }},
7433 { &hf_bootp_option_dhcp_server_id,
7434 { "DHCP Server Identifier", "bootp.option.dhcp_server_id",
7435 FT_IPv4, BASE_NONE, NULL, 0x00,
7436 "Option 54: DHCP Server Identifier", HFILL }},
7438 { &hf_bootp_option_parameter_request_list_item,
7439 { "Parameter Request List Item", "bootp.option.request_list_item",
7440 FT_UINT8, BASE_DEC, NULL, 0x0,
7441 "Option 55: Parameter Request List Item", HFILL }},
7443 { &hf_bootp_option_message,
7444 { "Message", "bootp.option.message",
7445 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7446 "Option 56: Option message", HFILL }},
7448 { &hf_bootp_option_dhcp_max_message_size,
7449 { "Maximum DHCP Message Size", "bootp.option.dhcp_max_message_size",
7450 FT_UINT16, BASE_DEC, NULL, 0x0,
7451 "Option 57: Maximum DHCP Message Size", HFILL }},
7453 { &hf_bootp_option_renewal_time_value,
7454 { "Renewal Time Value", "bootp.option.renewal_time_value",
7455 FT_UINT32, BASE_DEC, NULL, 0x00,
7456 "Option 58: Renewal Time Value", HFILL }},
7458 { &hf_bootp_option_rebinding_time_value,
7459 { "Rebinding Time Value", "bootp.option.rebinding_time_value",
7460 FT_UINT32, BASE_DEC, NULL, 0x00,
7461 "Option 59: Rebinding Time Value", HFILL }},
7463 { &hf_bootp_option_vendor_class_id,
7464 { "Vendor class identifier", "bootp.option.vendor_class_id",
7465 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7466 "Option 60: Vendor class identifier", HFILL }},
7468 { &hf_bootp_option_vendor_class_data,
7469 { "vendor-class-data", "bootp.option.vendor_class_data",
7470 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7471 "Option 60: Vendor class data", HFILL }},
7473 { &hf_bootp_option_novell_netware_ip_domain,
7474 { "Novell/Netware IP domain", "bootp.option.novell_netware_ip_domain",
7475 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7476 "Option 62: Novell/Netware IP domain", HFILL }},
7478 { &hf_bootp_option63_suboption,
7479 { "Option 63 Suboption", "bootp.option.novell_options.suboption",
7480 FT_UINT8, BASE_DEC, VALS(option63_suboption_vals), 0x0,
7481 "Option 63: Suboption", HFILL }},
7483 { &hf_bootp_option63_value,
7484 { "Value", "bootp.option.novell_options.value",
7485 FT_BYTES, BASE_NONE, NULL, 0x0,
7486 "Option 63: Suboption value", HFILL }},
7488 { &hf_bootp_option63_value_8,
7489 { "Value", "bootp.option.novell_options.value.uint",
7490 FT_UINT8, BASE_DEC, NULL, 0x0,
7491 "Option 63: Suboption 8-bit value", HFILL }},
7493 { &hf_bootp_option63_value_ip_address,
7494 { "Value", "bootp.option.novell_options.value.address",
7495 FT_IPv4, BASE_NONE, NULL, 0x00,
7496 "Option 63: Suboption IP address", HFILL }},
7498 { &hf_bootp_option63_value_boolean,
7499 { "Value", "bootp.option.novell_options.value.bool",
7500 FT_BOOLEAN, BASE_NONE, TFS(&tfs_true_false), 0x00,
7501 "Option 63: Suboption Boolean value", HFILL }},
7503 { &hf_bootp_option63_broadcast,
7504 { "Broadcast for nearest Netware server", "bootp.option.novell_options.broadcast",
7505 FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00,
7506 "Option 63:5 Broadcast for nearest Netware server", HFILL }},
7508 { &hf_bootp_option63_preferred_dss_server,
7509 { "Preferred DSS server", "bootp.option.novell_options.preferred_dss_server",
7510 FT_IPv4, BASE_NONE, NULL, 0x00,
7511 "Option 63:6 Preferred DSS server", HFILL }},
7513 { &hf_bootp_option63_nearest_nwip_server,
7514 { "Nearest NWIP server", "bootp.option.novell_options.nearest_nwip_server",
7515 FT_IPv4, BASE_NONE, NULL, 0x00,
7516 "Option 63:7 Nearest NWIP server", HFILL }},
7518 { &hf_bootp_option63_autoretries,
7519 { "Autoretries", "bootp.option.novell_options.autoretries",
7520 FT_UINT8, BASE_DEC, NULL, 0x0,
7521 "Option 63:8 Autoretries", HFILL }},
7523 { &hf_bootp_option63_autoretry_delay,
7524 { "Autoretry delay, sec",
7525 "bootp.option.novell_options.autoretry_delay", FT_UINT8, BASE_DEC, NULL,
7526 0x0, "Option 63:9 Autoretry delay, sec", HFILL }},
7528 { &hf_bootp_option63_support_netware_v1_1,
7529 { "Broadcast for nearest Netware server", "bootp.option.novell_options.support_netware_v1_1",
7530 FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00,
7531 "Option 63:10 Broadcast for nearest Netware server", HFILL }},
7533 { &hf_bootp_option63_primary_dss,
7534 { "Primary DSS", "bootp.option.novell_options.primary_dss",
7535 FT_IPv4, BASE_NONE, NULL, 0x00,
7536 "Option 63:11 Primary DSS", HFILL }},
7539 { &hf_bootp_option_nis_plus_domain,
7540 { "Network Information Service+ Domain", "bootp.option.nis_plus_domain",
7541 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7542 "Option 64: Network Information Service+ Domain", HFILL }},
7544 { &hf_bootp_option_nis_plus_server,
7545 { "Network Information Service+ Server", "bootp.option.nis_plus_server",
7546 FT_IPv4, BASE_NONE, NULL, 0x00,
7547 "Option 65: Network Information Service+ Server", HFILL }},
7549 { &hf_bootp_option_tftp_server_name,
7550 { "TFTP Server Name", "bootp.option.tftp_server_name",
7551 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7552 "Option 66: TFTP Server Name", HFILL }},
7554 { &hf_bootp_option_bootfile_name,
7555 { "Bootfile name", "bootp.option.bootfile_name",
7556 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7557 "Option 67: Bootfile name", HFILL }},
7559 { &hf_bootp_option_mobile_ip_home_agent,
7560 { "Mobile IP Home Agent", "bootp.option.mobile_ip_home_agent",
7561 FT_IPv4, BASE_NONE, NULL, 0x00,
7562 "Option 68: Mobile IP Home Agent", HFILL }},
7564 { &hf_bootp_option_smtp_server,
7565 { "SMTP Server", "bootp.option.smtp_server",
7566 FT_IPv4, BASE_NONE, NULL, 0x00,
7567 "Option 69: SMTP Server", HFILL }},
7569 { &hf_bootp_option_pop3_server,
7570 { "POP3 Server", "bootp.option.pop3_server",
7571 FT_IPv4, BASE_NONE, NULL, 0x00,
7572 "Option 70: POP3 Server", HFILL }},
7574 { &hf_bootp_option_nntp_server,
7575 { "NNTP Server", "bootp.option.nntp_server",
7576 FT_IPv4, BASE_NONE, NULL, 0x00,
7577 "Option 71: NNTP Server", HFILL }},
7579 { &hf_bootp_option_default_www_server,
7580 { "Default WWW Server", "bootp.option.default_www_server",
7581 FT_IPv4, BASE_NONE, NULL, 0x00,
7582 "Option 72: Default WWW Server", HFILL }},
7584 { &hf_bootp_option_default_finger_server,
7585 { "Default Finger Server", "bootp.option.default_finger_server",
7586 FT_IPv4, BASE_NONE, NULL, 0x00,
7587 "Option 73: Default Finger Server", HFILL }},
7589 { &hf_bootp_option_default_irc_server,
7590 { "Default IRC Server", "bootp.option.default_irc_server",
7591 FT_IPv4, BASE_NONE, NULL, 0x00,
7592 "Option 74: Default IRC Server", HFILL }},
7594 { &hf_bootp_option_streettalk_server,
7595 { "StreetTalk Server", "bootp.option.streettalk_server",
7596 FT_IPv4, BASE_NONE, NULL, 0x00,
7597 "Option 75: StreetTalk Server", HFILL }},
7599 { &hf_bootp_option_streettalk_da_server,
7600 { "StreetTalk Directory Assistance Server", "bootp.option.streettalk_da_server",
7601 FT_IPv4, BASE_NONE, NULL, 0x00,
7602 "Option 76: StreetTalk Directory Assistance Server", HFILL }},
7604 { &hf_bootp_option77_user_class,
7605 { "Instance of User Class", "bootp.option.user_class",
7606 FT_UINT8, BASE_DEC, NULL, 0x0,
7609 { &hf_bootp_option77_user_class_length,
7610 { "User Class Length", "bootp.option.user_class.length",
7611 FT_UINT8, BASE_DEC, NULL, 0x0,
7612 "Length of User Class Instance", HFILL }},
7614 { &hf_bootp_option77_user_class_data,
7615 { "User Class Data", "bootp.option.user_class.data",
7616 FT_BYTES, BASE_NONE, NULL, 0x0,
7617 "Data of User Class Instance", HFILL }},
7619 { &hf_bootp_option_slp_directory_agent_value,
7620 { "Value", "bootp.option.slp_directory_agent.value",
7621 FT_UINT8, BASE_DEC, VALS(slpda_vals), 0x0,
7622 "Option 78: SLPDA Value", HFILL }},
7624 { &hf_bootp_option_slp_directory_agent_slpda_address,
7625 { "IP Address", "bootp.option.slp_directory_agent.slpda_address",
7626 FT_IPv4, BASE_NONE, NULL, 0x00,
7627 "Option 78: SLPDA Address", HFILL }},
7629 { &hf_bootp_option_slp_service_scope_value,
7630 { "Value", "bootp.option.slp_service_scope.value",
7631 FT_UINT8, BASE_DEC, VALS(slp_scope_vals), 0x0,
7632 "Option 79: SLP Service Scope Value", HFILL }},
7634 { &hf_bootp_option_slp_service_scope_string,
7635 { "SLP Service Scope", "bootp.option.slp_service_scope.string",
7636 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7637 "Option 79: SLP Service Scope", HFILL }},
7640 { &hf_bootp_option82_suboption,
7641 { "Option 82 Suboption", "bootp.option.agent_information_option.suboption",
7642 FT_UINT8, BASE_DEC, VALS(option82_suboption_vals), 0x0,
7643 "Option 82: Suboption", HFILL }},
7645 { &hf_bootp_option82_value,
7646 { "Value", "bootp.option.agent_information_option.value",
7647 FT_BYTES, BASE_NONE, NULL, 0x0,
7648 "Option 82: Suboption value", HFILL }},
7650 { &hf_bootp_option82_value_8,
7651 { "Value", "bootp.option.agent_information_option.value.uint",
7652 FT_UINT8, BASE_DEC, NULL, 0x0,
7653 "Option 82: Suboption 8-bit value", HFILL }},
7655 { &hf_bootp_option82_value_32,
7656 { "Value", "bootp.option.agent_information_option.value.uint",
7657 FT_UINT32, BASE_DEC, NULL, 0x0,
7658 "Option 82: Suboption 32-bit value", HFILL }},
7660 { &hf_bootp_option82_value_ip_address,
7661 { "Value", "bootp.option.agent_information_option.value.address",
7662 FT_IPv4, BASE_NONE, NULL, 0x00,
7663 "Option 82: Suboption IP address", HFILL }},
7665 { &hf_bootp_option82_value_stringz,
7666 { "Value", "bootp.option.agent_information_option.value.string",
7667 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7668 "Option 82: Suboption Z-String value", HFILL }},
7670 { &hf_bootp_option82_padding,
7671 { "Padding", "bootp.option.agent_information_option.padding",
7672 FT_UINT8, BASE_DEC, NULL, 0x0,
7673 "Option 82:0 Padding", HFILL }},
7675 { &hf_bootp_option82_agent_circuit_id,
7676 { "Agent Circuit ID", "bootp.option.agent_information_option.agent_circuit_id",
7677 FT_BYTES, BASE_NONE, NULL, 0x0,
7678 "Option 82:1 Agent Circuit ID", HFILL }},
7680 { &hf_bootp_option82_agent_remote_id,
7681 { "Agent Remote ID", "bootp.option.agent_information_option.agent_remote_id",
7682 FT_BYTES, BASE_NONE, NULL, 0x0,
7683 "Option 82:2 Agent Remote ID", HFILL }},
7685 { &hf_bootp_option82_reserved,
7686 { "Reserved", "bootp.option.agent_information_option.reserved",
7687 FT_BYTES, BASE_NONE, NULL, 0x0,
7688 "Option 82:3 Reserved", HFILL }},
7690 { &hf_bootp_option82_docsis_device_class,
7691 { "DOCSIS Device Class", "bootp.option.agent_information_option.docsis_device_class",
7692 FT_UINT32, BASE_HEX, NULL, 0x0,
7693 "Option 82:4 DOCSIS Device Class", HFILL }},
7695 { &hf_bootp_option82_link_selection,
7696 { "Link selection", "bootp.option.agent_information_option.link_selection",
7697 FT_IPv4, BASE_NONE, NULL, 0x00,
7698 "Option 82:5 Link selection", HFILL }},
7700 { &hf_bootp_option82_subscriber_id,
7701 { "Subscriber ID", "bootp.option.agent_information_option.subscriber_id",
7702 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7703 "Option 82:6 Subscriber ID", HFILL }},
7705 { &hf_bootp_option82_radius_attributes,
7706 { "RADIUS Attributes", "bootp.option.agent_information_option.radius_attributes",
7707 FT_BYTES, BASE_NONE, NULL, 0x0,
7708 "Option 82:7 RADIUS Attributes", HFILL }},
7710 { &hf_bootp_option82_authentication,
7711 { "Authentication", "bootp.option.agent_information_option.authentication",
7712 FT_BYTES, BASE_NONE, NULL, 0x0,
7713 "Option 82:8 Authentication", HFILL }},
7715 { &hf_bootp_option82_vi,
7716 { "Vendor-Specific Information", "bootp.option.agent_information_option.vi",
7717 FT_BYTES, BASE_NONE, NULL, 0x0,
7718 "Option 82:9 Vendor-Specific Information", HFILL }},
7720 { &hf_bootp_option82_vi_enterprise,
7721 { "Enterprise", "bootp.option.agent_information_option.vi.enterprise",
7722 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0,
7723 "Option 82:9 VI Enterprise", HFILL }},
7725 { &hf_bootp_option82_vi_data_length,
7726 { "Data Length", "bootp.option.agent_information_option.vi.data_length",
7727 FT_UINT8, BASE_DEC, NULL, 0x0,
7728 "Option 82:9 VI Data Length", HFILL }},
7730 { &hf_bootp_option82_vi_cl_option,
7731 { "Option", "bootp.option.agent_information_option.vi.cl.option",
7732 FT_UINT8, BASE_DEC, NULL, 0x0,
7733 "Option 82:9 VI CL Option", HFILL }},
7735 { &hf_bootp_option82_vi_cl_length,
7736 { "Length", "bootp.option.agent_information_option.vi.cl.length",
7737 FT_UINT8, BASE_DEC, NULL, 0x0,
7738 "Option 82:9 VI CL Length", HFILL }},
7740 { &hf_bootp_option82_vi_cl_tag,
7741 { "Tag", "bootp.option.agent_information_option.vi.cl.tag",
7742 FT_UINT8, BASE_DEC, NULL, 0x0,
7743 "Option 82:9 VI CL Tag", HFILL }},
7745 { &hf_bootp_option82_vi_cl_tag_length,
7746 { "Tag Length", "bootp.option.agent_information_option.vi.cl.tag_length",
7747 FT_UINT8, BASE_DEC, NULL, 0x0,
7748 "Option 82:9 VI CL Tag Length", HFILL }},
7750 { &hf_bootp_option82_vi_cl_docsis_version,
7751 { "DOCSIS Version Number", "bootp.option.agent_information_option.vi.cl.docsis_version",
7752 FT_UINT16, BASE_HEX, NULL, 0x0,
7753 "Option 82:9 VI CL DOCSIS Version Number", HFILL }},
7755 { &hf_bootp_option82_flags,
7756 { "Flags", "bootp.option.agent_information_option.flags",
7757 FT_UINT8, BASE_HEX, NULL, 0x0,
7758 "Option 82:10 Flags", HFILL }},
7760 { &hf_bootp_option82_server_id_override,
7761 { "Server ID Override", "bootp.option.agent_information_option.server_id_override",
7762 FT_IPv4, BASE_NONE, NULL, 0x00,
7763 "Option 82:11 Server ID Override", HFILL }},
7765 { &hf_bootp_option82_relay_agent_id,
7766 { "Relay Agent Identifier", "bootp.option.agent_information_option.relay_agent_id",
7767 FT_BYTES, BASE_NONE, NULL, 0x00,
7768 "Option 82:12 Relay Agent Identifier", HFILL }},
7770 { &hf_bootp_option82_link_selection_cisco,
7771 { "Link selection (Cisco proprietary)", "bootp.option.agent_information_option.link_selection_cisco",
7772 FT_IPv4, BASE_NONE, NULL, 0x00,
7773 "Option 82:150 Link selection (Cisco proprietary)", HFILL }},
7775 { &hf_bootp_option82_vrf_name_vpn_id,
7776 { "VRF name/VPN ID", "bootp.option.agent_information_option.vrf_name.vpn_id",
7777 FT_BYTES, BASE_NONE, NULL, 0x00,
7778 "Option 82:151 VRF name/VPN ID", HFILL }},
7780 { &hf_bootp_option82_vrf_name_global,
7781 { "Global, default VPN", "bootp.option.agent_information_option.vrf_name.global",
7782 FT_UINT8, BASE_DEC, NULL, 0x00,
7783 "Option 82:151 Global, default VPN", HFILL }},
7785 { &hf_bootp_option82_vrf_name,
7786 { "VRF name", "bootp.option.agent_information_option.vrf_name",
7787 FT_STRING, BASE_NONE, NULL, 0x00,
7788 "Option 82:151 VRF name", HFILL }},
7790 { &hf_bootp_option82_vrf_name_vpn_id_oui,
7791 { "VRF name/VPN ID OUI", "bootp.option.agent_information_option.vrf_name.vpn_id.oui",
7792 FT_UINT24, BASE_HEX, NULL, 0x00,
7793 "Option 82:151 VRF name/VPN ID OUI", HFILL }},
7795 { &hf_bootp_option82_vrf_name_vpn_id_index,
7796 { "VRF name/VPN ID Index", "bootp.option.agent_information_option.vrf_name.vpn_id.index",
7797 FT_UINT32, BASE_HEX, NULL, 0x00,
7798 "Option 82:151 VRF name/VPN ID Index", HFILL }},
7800 { &hf_bootp_option82_server_id_override_cisco,
7801 { "Server ID Override (Cisco proprietary)", "bootp.option.agent_information_option.server_id_override_cisco",
7802 FT_IPv4, BASE_NONE, NULL, 0x00,
7803 "Option 82:152 Server ID Override (Cisco proprietary)", HFILL }},
7806 { &hf_bootp_option_isns_functions,
7807 { "iSNS Functions", "bootp.option.isns.functions",
7808 FT_UINT16, BASE_HEX, NULL, 0x00,
7809 "iSNS: the functions supported by the iSNS servers", HFILL }},
7811 { &hf_bootp_option_isns_functions_enabled,
7812 { "Function Fields Enabled", "bootp.option.isns.functions.enabled",
7813 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_FUNCTIONS_ENABLED,
7814 "If set to zero, then the contents of all other iSNS Function fields MUST be ignored", HFILL }},
7816 { &hf_bootp_option_isns_functions_dd_authorization,
7817 { "Discovery Domain based Authorization", "bootp.option.isns.functions.dd_base_authorization",
7818 FT_BOOLEAN, 16, TFS(&tfs_isns_function_dd_based_auth), F_ISNS_FUNCTIONS_DD_AUTH,
7819 "If set to zero, then access authorization must be explicitly performed by each device", HFILL }},
7821 { &hf_bootp_option_isns_functions_sec_policy_distibution,
7822 { "Security Policy Distribution", "bootp.option.isns.functions.sec_policy_distribution",
7823 FT_BOOLEAN, 16, TFS(&tfs_isns_functions_sec_distrib), F_ISNS_FUNCTIONS_SEC_POLICY,
7826 { &hf_bootp_option_isns_functions_reserved,
7827 { "Reserved flags", "bootp.option.isns.functions.reserved",
7828 FT_UINT16, BASE_HEX, NULL, F_ISNS_FUNCTIONS_RESERVED,
7831 { &hf_bootp_option_isns_discovery_domain_access,
7832 { "Discovery Domain Access flags", "bootp.option.isns.discovery_domain_access",
7833 FT_UINT16, BASE_HEX, NULL, 0x00,
7834 "iSNS: the types of iSNS clients that are allowed to modify Discovery Domains", HFILL }},
7836 { &hf_bootp_option_isns_discovery_domain_access_enabled,
7837 { "Discovery Domain Enabled", "bootp.option.isns.discovery_domain_access.enabled",
7838 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ENABLED,
7839 "If set to zero, then the contents of the remainder of this field MUST be ignored", HFILL }},
7841 { &hf_bootp_option_isns_discovery_domain_access_control_node,
7842 { "Control Node", "bootp.option.isns.discovery_domain_access_control.node",
7843 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_CTRL_NODE,
7846 { &hf_bootp_option_isns_discovery_domain_access_iscsi_target,
7847 { "iSCSI Target", "bootp.option.isns.discovery_domain_access.iscsi_target",
7848 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ISCSI_TARGET,
7851 { &hf_bootp_option_isns_discovery_domain_access_iscsi_inititator,
7852 { "iSCSI Initiator", "bootp.option.isns.discovery_domain_access.iscsi_initiator",
7853 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ISCSI_INITIATOR,
7856 { &hf_bootp_option_isns_discovery_domain_access_ifcp_target_port,
7857 { "iFCP Target Port", "bootp.option.isns.discovery_domain_access.ifcp_target_port",
7858 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_IFCP_TARGET_PORT,
7861 { &hf_bootp_option_isns_discovery_domain_access_ifcp_initiator_port,
7862 { "iFCP Initiator Port", "bootp.option.isns.discovery_domain_access.initiator_target_port",
7863 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_IFCP_INITIATOR_PORT,
7866 { &hf_bootp_option_isns_discovery_domain_access_reserved,
7867 { "Reserved Flags", "bootp.option.isns.discovery_domain_access.reserved",
7868 FT_UINT16, BASE_HEX, NULL, F_ISNS_DD_ACCESS_RESERVED,
7871 { &hf_bootp_option_isns_administrative_flags,
7872 { "Administrative Flags", "bootp.option.isns.administrative_flags",
7873 FT_UINT16, BASE_HEX, NULL, 0x00,
7874 "iSNS: administrative settings for the iSNS servers discovered through the DHCP query", HFILL }},
7876 { &hf_bootp_option_isns_administrative_flags_enabled,
7877 { "Administrative Flags Enabled", "bootp.option.isns.administrative_flags.enabled",
7878 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_ENABLED,
7881 { &hf_bootp_option_isns_administrative_flags_heartbeat,
7882 { "Heartbeat", "bootp.option.isns.administrative_flags.heartbeat",
7883 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_HEARTBEAT,
7886 { &hf_bootp_option_isns_administrative_flags_management_scns,
7887 { "Management SCNs", "bootp.option.isns.administrative_flags.management_scns",
7888 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_MANAGEMENT_SCNS,
7891 { &hf_bootp_option_isns_administrative_flags_default_dd,
7892 { "Default Discovery Domain", "bootp.option.isns.administrative_flags.default_discovery_domain",
7893 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_DEFAULT_DD,
7896 { &hf_bootp_option_isns_administrative_flags_reserved,
7897 { "Reserved Flags", "bootp.option.isns.administrative_flags.reserved",
7898 FT_UINT16, BASE_HEX, NULL, F_ISNS_ADMIN_FLAGS_RESERVED,
7901 { &hf_bootp_option_isns_server_security_bitmap,
7902 { "iSNS Server Security Bitmap", "bootp.option.isns.server_security_bitmap",
7903 FT_UINT32, BASE_HEX, NULL, 0x00,
7904 "iSNS: server security settings", HFILL }},
7906 { &hf_bootp_option_isns_server_security_bitmap_enabled,
7907 { "Server Security Bitmap Enabled", "bootp.option.isns.server_security_bitmap.enabled",
7908 FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_SRV_SEC_BITMAP_ENABLED,
7911 { &hf_bootp_option_isns_server_security_bitmap_ike_ipsec_enabled,
7912 { "IKE/IPSec", "bootp.option.isns.server_security_bitmap.ike_ipsec_enabled",
7913 FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_IKE_IPSEC,
7916 { &hf_bootp_option_isns_server_security_bitmap_main_mode,
7917 { "Main Mode", "bootp.option.isns.server_security_bitmap.main_mode",
7918 FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_MAIN_MODE,
7921 { &hf_bootp_option_isns_server_security_bitmap_aggressive_mode,
7922 { "Aggresive Mode", "bootp.option.isns.server_security_bitmap.aggressive_mode",
7923 FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_AGGRESSIVE,
7926 { &hf_bootp_option_isns_server_security_bitmap_pfs,
7927 { "PFS", "bootp.option.isns.server_security_bitmap.pfs",
7928 FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_PFS,
7931 { &hf_bootp_option_isns_server_security_bitmap_transport_mode,
7932 { "Transport Mode", "bootp.option.isns.server_security_bitmap.transport_mode",
7933 FT_BOOLEAN, 16, TFS(&tfs_preferred_no_preference), F_ISNS_SRV_SEC_BITMAP_TRASPORT_MODE,
7936 { &hf_bootp_option_isns_server_security_bitmap_tunnel_mode,
7937 { "Tunnel Mode", "bootp.option.isns.server_security_bitmap.tunnel_mode",
7938 FT_BOOLEAN, 16, TFS(&tfs_preferred_no_preference), F_ISNS_SRV_SEC_BITMAP_TUNNEL_MODE,
7941 { &hf_bootp_option_isns_server_security_bitmap_reserved,
7942 { "Reserved Flags", "bootp.option.isns.server_security_bitmap.reserved",
7943 FT_UINT16, BASE_HEX, NULL, F_ISNS_SRV_SEC_BITMAP_RESERVED,
7946 { &hf_bootp_option_isns_primary_server_addr,
7947 { "Primary Server Address", "bootp.option.isns.primary_server_addr",
7948 FT_IPv4, BASE_NONE, NULL, 0x00,
7949 "iSNS: IP address of the primary server", HFILL }},
7951 { &hf_bootp_option_isns_heartbeat_originator_addr,
7952 { "Heartbeat Originator Address", "bootp.option.isns.heartbeat_originator_addr",
7953 FT_IPv4, BASE_NONE, NULL, 0x00,
7954 "iSNS: IP address from which the iSNS heartbeat originates", HFILL }},
7956 { &hf_bootp_option_isns_secondary_server_addr_list,
7957 { "Secondary Server Address", "bootp.option.isns.secondary_server_addr",
7958 FT_IPv4, BASE_NONE, NULL, 0x00,
7959 "iSNS: a list of IP addresses of the secondary iSNS servers", HFILL }},
7962 { &hf_bootp_option_novell_dss_string,
7963 { "Novell Directory Services Servers String", "bootp.option.novell_dss.string",
7964 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7965 "Option 85: Novell Directory Services Servers String", HFILL }},
7967 { &hf_bootp_option_novell_dss_ip,
7968 { "IP Address", "bootp.option.novell_dss.ip",
7969 FT_IPv4, BASE_NONE, NULL, 0x00,
7970 "Option 85: Novell Directory Services Servers IP Address", HFILL }},
7972 { &hf_bootp_option_novell_ds_tree_name,
7973 { "Novell Directory Services Tree Name", "bootp.option.novell_ds_tree_name",
7974 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7975 "Option 86: Novell Directory Services Tree Name", HFILL }},
7977 { &hf_bootp_option_novell_ds_context,
7978 { "Novell Directory Services Context", "bootp.option.novell_ds_context",
7979 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7980 "Option 87: Novell Directory Services Context", HFILL }},
7982 { &hf_bootp_option_dhcp_authentication_protocol,
7983 { "Protocol", "bootp.option.dhcp_authentication.protocol",
7984 FT_UINT8, BASE_DEC, VALS(authen_protocol_vals), 0x0,
7985 "Option 90: Authentication Protocol", HFILL }},
7987 { &hf_bootp_option_dhcp_authentication_alg_delay,
7988 { "Delay Algorithm", "bootp.option.dhcp_authentication.alg_delay",
7989 FT_UINT8, BASE_DEC, VALS(authen_da_algo_vals), 0x0,
7990 "Option 90: Delayed Authentication Algorithm", HFILL }},
7992 { &hf_bootp_option_dhcp_authentication_algorithm,
7993 { "Algorithm", "bootp.option.dhcp_authentication.algorithm",
7994 FT_UINT8, BASE_DEC, NULL, 0x0,
7995 "Option 90: Authentication Algorithm", HFILL }},
7997 { &hf_bootp_option_dhcp_authentication_rdm,
7998 { "Replay Detection Method", "bootp.option.dhcp_authentication.rdm",
7999 FT_UINT8, BASE_DEC, VALS(authen_rdm_vals), 0x0,
8000 "Option 90: Replay Detection Method", HFILL }},
8002 { &hf_bootp_option_dhcp_authentication_rdm_replay_detection,
8003 { "RDM Replay Detection Value", "bootp.option.dhcp_authentication.rdm_replay_detection",
8004 FT_UINT64, BASE_HEX, NULL, 0x0,
8005 "Option 90: RDM Replay Detection Value", HFILL }},
8007 { &hf_bootp_option_dhcp_authentication_rdm_rdv,
8008 { "Replay Detection Value", "bootp.option.dhcp_authentication.rdm_rdv",
8009 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8010 "Option 90: Replay Detection Value", HFILL }},
8012 { &hf_bootp_option_dhcp_authentication_secret_id,
8013 { "Secret ID", "bootp.option.dhcp_authentication.secret_id",
8014 FT_UINT32, BASE_HEX, NULL, 0x0,
8015 "Option 90: Secret ID", HFILL }},
8017 { &hf_bootp_option_dhcp_authentication_hmac_md5_hash,
8018 { "HMAC MD5 Hash", "bootp.option.dhcp_authentication.hmac_md5_hash",
8019 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8020 "Option 90: HMAC MD5 Hash", HFILL }},
8022 { &hf_bootp_option_dhcp_authentication_information,
8023 { "Authentication Information", "bootp.option.dhcp_authentication.information",
8024 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8025 "Option 90: Authentication Information", HFILL }},
8027 { &hf_bootp_option_client_last_transaction_time,
8028 { "Client last transaction time", "bootp.option.client_last_transaction_time",
8029 FT_UINT32, BASE_DEC, NULL, 0x00,
8030 "Option 91: Client last transaction time", HFILL }},
8032 { &hf_bootp_option_associated_ip_option,
8033 { "Associated IP option", "bootp.option.associated_ip_option",
8034 FT_IPv4, BASE_NONE, NULL, 0x00,
8035 "Option 92: Associated IP option", HFILL }},
8037 { &hf_bootp_option_client_system_architecture,
8038 { "Client System Architecture", "bootp.option.client_system_architecture",
8039 FT_UINT16, BASE_DEC, VALS(bootp_client_arch), 0x0,
8040 "Option 93: Client System Architecture", HFILL }},
8042 { &hf_bootp_option_client_network_id_major_ver,
8043 { "Major Version", "bootp.client_network_id_major",
8044 FT_UINT8, BASE_DEC, NULL, 0x0,
8045 "Option 94: Major Version", HFILL }},
8047 { &hf_bootp_option_client_network_id_minor_ver,
8048 { "Minor Version", "bootp.client_network_id_minor",
8049 FT_UINT8, BASE_DEC, NULL, 0x0,
8050 "Option 94: Minor Version", HFILL }},
8052 { &hf_bootp_option_civic_location_what,
8053 { "What", "bootp.option.civic_location.what",
8054 FT_UINT8, BASE_DEC, VALS(civic_address_what_values), 0x0,
8055 "Option 99: What", HFILL }},
8057 { &hf_bootp_option_civic_location_country,
8058 { "Country", "bootp.option.civic_location.country",
8059 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8060 "Option 99: Country", HFILL }},
8062 { &hf_bootp_option_civic_location_ca_type,
8063 { "CA Type", "bootp.option.civic_location.ca_type",
8064 FT_UINT8, BASE_DEC, VALS(civic_address_type_values), 0x0,
8065 "Option 99: CA Type", HFILL }},
8067 { &hf_bootp_option_civic_location_ca_length,
8068 { "CA Length", "bootp.option.civic_location.ca_length",
8069 FT_UINT8, BASE_DEC, NULL, 0x0,
8070 "Option 99: CA Length", HFILL }},
8072 { &hf_bootp_option_civic_location_ca_value,
8073 { "CA Value", "bootp.option.civic_location.ca_value",
8074 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8075 "Option 99: CA Value", HFILL }},
8077 { &hf_bootp_option_netinfo_parent_server_address,
8078 { "NetInfo Parent Server Address", "bootp.option.netinfo_parent_server_address",
8079 FT_IPv4, BASE_NONE, NULL, 0x00,
8080 "Option 112: NetInfo Parent Server Address", HFILL }},
8082 { &hf_bootp_option_netinfo_parent_server_tag,
8083 { "NetInfo Parent Server Tag", "bootp.option.netinfo_parent_server_tag",
8084 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8085 "Option 113: NetInfo Parent Server Tag", HFILL }},
8087 { &hf_bootp_option_dhcp_auto_configuration,
8088 { "DHCP Auto-Configuration", "bootp.option.dhcp_auto_configuration",
8089 FT_UINT8, BASE_DEC, VALS(dhcp_autoconfig), 0x0,
8090 "Option 116: DHCP Auto-Configuration", HFILL }},
8092 { &hf_bootp_option_dhcp_name_service_search_option,
8093 { "Name Service", "bootp.option.dhcp_name_service_search_option",
8094 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8095 "Option 117: Name Service", HFILL }},
8097 { &hf_bootp_option_dhcp_dns_domain_search_list_rfc_3396_detected,
8098 { "Encoding Long Options detected (RFC 3396)", "bootp.option.dhcp_dns_domain_search_list_rfc_3396_detected",
8099 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8100 "Option 119: Encoding Long Options detected (RFC 3396)", HFILL }},
8102 { &hf_bootp_option_dhcp_dns_domain_search_list_refer_last_option,
8103 { "For the data, please refer to last option 119", "bootp.option.dhcp_dns_domain_search_list_refer_last_option",
8104 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8105 "Option 119: For the data, please refer to last option 119", HFILL }},
8107 { &hf_bootp_option_dhcp_dns_domain_search_list_fqdn,
8108 { "FQDN", "bootp.option.dhcp_dns_domain_search_list_fqdn",
8109 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8110 "Option 119: FQDN", HFILL }},
8112 { &hf_bootp_option_sip_server_rfc_3396_detected,
8113 { "Encoding Long Options detected (RFC 3396)", "bootp.option.sip_server.rfc_3396_detected",
8114 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8115 "Option 120: Encoding Long Options detected (RFC 3396)", HFILL }},
8117 { &hf_bootp_option_sip_server_refer_last_option,
8118 { "For the data, please refer to last option 120", "bootp.option.sip_server.refer_last_option",
8119 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8120 "Option 120: For the data, please refer to last option 120", HFILL }},
8122 { &hf_bootp_option_sip_server_enc,
8123 { "SIP Server Encoding", "bootp.option.sip_server.encoding",
8124 FT_UINT8, BASE_DEC, VALS(sip_server_enc_vals), 0x0,
8125 "Option 120: SIP Server encoding", HFILL }},
8127 { &hf_bootp_option_sip_server_name,
8128 { "SIP Server Name", "bootp.option.sip_server.name",
8129 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8130 "Option 120: SIP Server Name", HFILL }},
8132 { &hf_bootp_option_sip_server_address,
8133 { "SIP Server Address", "bootp.option.sip_server.address",
8134 FT_IPv4, BASE_NONE, NULL, 0x0,
8135 "Option 120: SIP Server Address", HFILL }},
8137 { &hf_bootp_option_sip_server_address_stringz,
8138 { "SIP Server Address", "bootp.option.sip_server.address.stringz",
8139 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8140 "Option 120: SIP Server Address", HFILL }},
8142 { &hf_bootp_option_classless_static_route,
8143 { "Subnet/MaskWidth-Router", "bootp.option.classless_static_route.",
8144 FT_BYTES, BASE_NONE, NULL, 0x0,
8145 "Option 121: Subnet/MaskWidth-Router", HFILL }},
8147 { &hf_bootp_option_rfc3825_error,
8148 { "Error", "bootp.option.rfc3825.error",
8149 FT_UINT8, BASE_DEC, VALS(rfc3825_error_types), 0x0,
8150 "Option 123: Error", HFILL }},
8152 { &hf_bootp_option_rfc3825_latitude,
8153 { "Latitude", "bootp.option.rfc3825.latitude",
8154 FT_DOUBLE, BASE_NONE, NULL, 0x0,
8155 "Option 123: Latitude", HFILL }},
8157 { &hf_bootp_option_rfc3825_longitude,
8158 { "Longitude", "bootp.option.rfc3825.longitude",
8159 FT_DOUBLE, BASE_NONE, NULL, 0x0,
8160 "Option 123: Longitude", HFILL }},
8162 { &hf_bootp_option_rfc3825_latitude_res,
8163 { "Latitude resolution", "bootp.option.rfc3825.latitude_res",
8164 FT_DOUBLE, BASE_NONE, NULL, 0x0,
8165 "Option 123: Latitude resolution", HFILL }},
8167 { &hf_bootp_option_rfc3825_longitude_res,
8168 { "Longitude resolution", "bootp.option.rfc3825.longitude_res",
8169 FT_DOUBLE, BASE_NONE, NULL, 0x0,
8170 "Option 123: Longitude resolution", HFILL }},
8172 { &hf_bootp_option_rfc3825_altitude,
8173 { "Altitude", "bootp.option.rfc3825.altitude",
8174 FT_DOUBLE, BASE_NONE, NULL, 0x0,
8175 "Option 123: Altitude", HFILL }},
8177 { &hf_bootp_option_rfc3825_altitide_res,
8178 { "Altitude resolution", "bootp.option.rfc3825.altitide_res",
8179 FT_DOUBLE, BASE_NONE, NULL, 0x0,
8180 "Option 123: Altitude resolution", HFILL }},
8182 { &hf_bootp_option_rfc3825_altitude_type,
8183 { "Altitude type", "bootp.option.rfc3825.altitude_type",
8184 FT_UINT8, BASE_DEC, VALS(altitude_type_values), 0x0,
8185 "Option 123: Altitude type", HFILL }},
8187 { &hf_bootp_option_rfc3825_map_datum,
8188 { "Map Datum", "bootp.option.cl_dss_id.option",
8189 FT_UINT8, BASE_DEC, VALS(map_datum_type_values), 0x0,
8190 "Option 123: Map Datum", HFILL }},
8192 { &hf_bootp_option_cl_dss_id_option,
8193 { "DSS_ID Type", "bootp.option.cl_dss_id.option",
8194 FT_UINT8, BASE_DEC, VALS(cl_dss_id_type_vals), 0x0,
8195 "Option 123:CL DSS_ID Type", HFILL }},
8197 { &hf_bootp_option_cl_dss_id_len,
8198 { "DSS_ID Length", "bootp.option.cl_dss_id.len",
8199 FT_UINT8, BASE_DEC, NULL, 0x0,
8200 "Option 123:CL DSS_ID Length", HFILL }},
8202 { &hf_bootp_option_cl_dss_id,
8203 { "Country", "bootp.option.cl_dss_id",
8204 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8205 "Option 123:CL DSS_ID", HFILL }},
8207 { &hf_bootp_option_vi_class_cl_address_mode,
8208 { "CableLab Address Mode", "bootp.option.vi_class.cl_address_mode",
8209 FT_UINT8, BASE_DEC, VALS(cablelab_ipaddr_mode_vals), 0x0,
8210 "Option 124: CableLab Address Mode", HFILL }},
8212 { &hf_bootp_option_vi_class_enterprise,
8213 { "Enterprise", "bootp.option.vi_class.enterprise",
8214 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
8215 "Option 124: Enterprise", HFILL }},
8217 { &hf_bootp_option_vi_class_data_length,
8218 { "CableLab Address Mode", "bootp.option.vi_class.length",
8219 FT_UINT8, BASE_DEC, NULL, 0x0,
8220 "Option 124: Length", HFILL }},
8222 { &hf_bootp_option_vi_class_data,
8223 { "NetInfo Parent Server Tag", "bootp.option.vi_class.data",
8224 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8225 "Option 124: Data", HFILL }},
8227 { &hf_bootp_option125_enterprise,
8228 { "Enterprise", "bootp.option.vi.enterprise",
8229 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
8230 "Option 125: Enterprise", HFILL }},
8232 { &hf_bootp_option125_length,
8233 { "Length", "bootp.option.vi.length",
8234 FT_UINT8, BASE_DEC, NULL, 0x00,
8235 "Option 125: Length", HFILL }},
8237 { &hf_bootp_option125_value,
8238 { "Value", "bootp.option.vi.value",
8239 FT_BYTES, BASE_NONE, NULL, 0x0,
8240 "Option 125: Suboption value", HFILL }},
8242 { &hf_bootp_option125_value_8,
8243 { "Value", "bootp.option.vi.value.uint",
8244 FT_UINT8, BASE_DEC, NULL, 0x0,
8245 "Option 125: Suboption 8-bit value", HFILL }},
8247 { &hf_bootp_option125_value_16,
8248 { "Value", "bootp.option.vi.value.uint",
8249 FT_UINT16, BASE_DEC, NULL, 0x0,
8250 "Option 125: Suboption 16-bit value", HFILL }},
8252 { &hf_bootp_option125_value_ip_address,
8253 { "Value", "bootp.option.vi.value.address",
8254 FT_IPv4, BASE_NONE, NULL, 0x00,
8255 "Option 125: Suboption IP address value", HFILL }},
8257 { &hf_bootp_option125_value_stringz,
8258 { "Value", "bootp.option.vi.value.string",
8259 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8260 "Option 125: Suboption Z-String value", HFILL }},
8262 { &hf_bootp_option125_tr111_suboption,
8263 { "Option 125 Suboption", "bootp.option.vi.tr111.suboption",
8264 FT_UINT8, BASE_DEC, VALS(option125_tr111_suboption_vals), 0x0,
8265 "Option 125:TR 111 Suboption", HFILL }},
8267 { &hf_bootp_option125_tr111_device_manufacturer_oui,
8268 { "DeviceManufacturerOUI", "bootp.option.vi.tr111.device_manufacturer_oui",
8269 FT_UINT24, BASE_HEX, VALS(oui_vals), 0x0,
8270 "Option 125:TR 111 1 DeviceManufacturerOUI", HFILL }},
8272 { &hf_bootp_option125_tr111_device_serial_number,
8273 { "DeviceSerialNumber", "bootp.option.vi.tr111.device_serial_number",
8274 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8275 "Option 125:TR 111 2 DeviceSerialNumber", HFILL }},
8277 { &hf_bootp_option125_tr111_device_product_class,
8278 { "DeviceProductClass", "bootp.option.vi.tr111.device_product_class",
8279 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8280 "Option 125:TR 111 3 DeviceProductClass", HFILL }},
8282 { &hf_bootp_option125_tr111_gateway_manufacturer_oui,
8283 { "GatewayManufacturerOUI", "bootp.option.vi.tr111.gateway_manufacturer_oui",
8284 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8285 "Option 125:TR 111 4 GatewayManufacturerOUI", HFILL }},
8287 { &hf_bootp_option125_tr111_gateway_serial_number,
8288 { "GatewaySerialNumber", "bootp.option.vi.tr111.gateway_serial_number",
8289 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8290 "Option 125:TR 111 5 GatewaySerialNumber", HFILL }},
8292 { &hf_bootp_option125_tr111_gateway_product_class,
8293 { "GatewayProductClass", "bootp.option.vi.tr111.gateway_product_class",
8294 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8295 "Option 125:TR 111 6 GatewayProductClass", HFILL }},
8297 { &hf_bootp_option125_cl_suboption,
8298 { "Option 125 Suboption", "bootp.option.vi.cl.suboption",
8299 FT_UINT8, BASE_DEC, VALS(option125_cl_suboption_vals), 0x0,
8300 "Option 125:CL Suboption", HFILL }},
8302 { &hf_bootp_option125_cl_option_request,
8303 { "Option Request", "bootp.option.vi.cl.option_request",
8304 FT_BYTES, SEP_SPACE, NULL, 0x0,
8305 "Option 125:CL 1 Option Request", HFILL }},
8307 { &hf_bootp_option125_cl_tftp_server_addresses,
8308 { "TFTP Server Addresses", "bootp.option.vi.cl.tftp_server_addresses",
8309 FT_IPv4, BASE_NONE, NULL, 0x00,
8310 "Option 125:CL 2 TFTP Server Addresses", HFILL }},
8312 { &hf_bootp_option125_cl_erouter_container_option,
8313 { "eRouter Container Option", "bootp.option.vi.cl.erouter_container_option",
8314 FT_BYTES, BASE_NONE, NULL, 0x0,
8315 "Option 125:CL 3 eRouter Container Option", HFILL }},
8317 { &hf_bootp_option125_cl_mib_environment_indicator_option,
8318 { "MIB Environment Indicator Option", "bootp.option.vi.cl.suboption",
8319 FT_UINT8, BASE_DEC, VALS(pkt_mib_env_ind_opt_vals), 0x0,
8320 "Option 125:CL 4 MIB Environment Indicator Option", HFILL }},
8322 { &hf_bootp_option125_cl_modem_capabilities,
8323 { "Modem Capabilities", "bootp.option.vi.cl.modem_capabilities",
8324 FT_BYTES, BASE_NONE, NULL, 0x0,
8325 "Option 125:CL 5 Modem Capabilities", HFILL }},
8327 { &hf_bootp_option_subnet_selection_option,
8328 { "Subnet Selection Option", "bootp.option.subnet_selection_option",
8329 FT_IPv4, BASE_NONE, NULL, 0x00,
8330 "Option 118: Subnet Selection Option", HFILL }},
8332 { &hf_bootp_option_lost_server_domain_name,
8333 { "LoST Server Domain Name", "bootp.option.lost_server_domain_name",
8334 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8335 "Option 137: LoST Server Domain Name", HFILL }},
8337 { &hf_bootp_option_capwap_access_controller,
8338 { "CAPWAP Access Controllers", "bootp.option.capwap_access_controller",
8339 FT_IPv4, BASE_NONE, NULL, 0x00,
8340 "Option 138: CAPWAP Access Controllers", HFILL }},
8342 { &hf_bootp_option_tftp_server_address,
8343 { "TFTP Server Address", "bootp.option.tftp_server_address",
8344 FT_IPv4, BASE_NONE, NULL, 0x00,
8345 "Option 150: TFTP Server Address", HFILL }},
8347 { &hf_bootp_option_pxe_config_file,
8348 { "PXELINUX configuration file", "bootp.option.pxe_config_file",
8349 FT_STRING, BASE_NONE, NULL, 0x0,
8350 "Option 209: PXE Configuration File", HFILL }},
8352 { &hf_bootp_option_pxe_path_prefix,
8353 { "PXELINUX path prefix", "bootp.option.pxe_path_prefix",
8354 FT_STRING, BASE_NONE, NULL, 0x0,
8355 "Option 210: PXE Path Prefix", HFILL }},
8357 { &hf_bootp_option_6RD_ipv4_mask_len,
8358 { "6RD IPv4 Mask Length", "bootp.option.6RD.ipv4_mask_len",
8359 FT_UINT8, BASE_DEC, NULL, 0x0,
8360 "Option 212: 6RD IPv4 Mask Length", HFILL }},
8362 { &hf_bootp_option_6RD_prefix_len,
8363 { "6RD Prefix Length", "bootp.option.6RD.prefix_len",
8364 FT_UINT8, BASE_DEC, NULL, 0x0,
8365 "Option 212: 6RD Prefix Length", HFILL }},
8367 { &hf_bootp_option_6RD_prefix,
8368 { "6RD Prefix", "bootp.option.6RD.prefix",
8369 FT_IPv6, BASE_NONE, NULL, 0x00,
8370 "Option 212: 6RD Prefix", HFILL }},
8372 { &hf_bootp_option_6RD_border_relay_ip,
8373 { "Border Relay IP", "bootp.option.6RD.border_relay_ip",
8374 FT_IPv4, BASE_NONE, NULL, 0x00,
8375 "Option 212: Border Relay IP", HFILL }},
8377 { &hf_bootp_option_private_proxy_autodiscovery,
8378 { "Private/Proxy autodiscovery", "bootp.option.private_proxy_autodiscovery",
8379 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8380 "Option 252: Private/Proxy autodiscovery", HFILL }},
8382 { &hf_bootp_option_end,
8383 { "Option End", "bootp.option.end",
8384 FT_UINT8, BASE_DEC, NULL, 0x0,
8385 "Option 255: End", HFILL }},
8387 { &hf_bootp_option_end_overload,
8388 { "Option End (Overload)", "bootp.option.end",
8389 FT_UINT8, BASE_DEC, NULL, 0x0,
8390 "Option 255: End (Overload)", HFILL }},
8392 { &hf_bootp_vendor_unknown_suboption,
8393 { "Option 125 Suboption", "bootp.vendor.suboption",
8394 FT_UINT8, BASE_DEC, NULL, 0x0,
8397 { &hf_bootp_suboption_data,
8398 { "Data", "bootp.vendor.data",
8399 FT_BYTES, BASE_NONE, NULL, 0x0,
8402 { &hf_bootp_pc_ietf_ccc_suboption,
8403 { "Suboption", "bootp.vendor.pc.ietf_ccc.suboption",
8404 FT_UINT8, BASE_DEC, VALS(pkt_draft5_ccc_opt_vals), 0x0,
8407 { &hf_bootp_pc_i05_ccc_suboption,
8408 { "Suboption", "bootp.vendor.pc.i05_ccc.suboption",
8409 FT_UINT8, BASE_DEC, VALS(pkt_i05_ccc_opt_vals), 0x0,
8412 { &hf_bootp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout,
8413 { "pktcMtaDevRealmUnsolicitedKeyNomTimeout", "bootp.cl.ietf_ccc.dev_realm_unc_key_nom_timeout",
8414 FT_UINT32, BASE_DEC, NULL, 0x0,
8417 { &hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_timeout,
8418 { "pktcMtaDevRealmUnsolicitedKeyMaxTimeout", "bootp.cl.ietf_ccc.dev_realm_unc_key_max_timeout",
8419 FT_UINT32, BASE_DEC, NULL, 0x0,
8422 { &hf_bootp_cl_ietf_ccc_dev_realm_unc_key_max_retries,
8423 { "pktcMtaDevRealmUnsolicitedKeyMaxRetries", "bootp.cl.ietf_ccc.dev_realm_unc_key_max_retries",
8424 FT_UINT32, BASE_DEC, NULL, 0x0,
8427 { &hf_bootp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout,
8428 { "pktcMtaDevProvUnsolicitedKeyNomTimeout", "bootp.cl.ietf_ccc.dev_prov_unc_key_nom_timeout",
8429 FT_UINT32, BASE_DEC, NULL, 0x0,
8432 { &hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_timeout,
8433 { "pktcMtaDevProvUnsolicitedKeyMaxTimeout", "bootp.cl.ietf_ccc.dev_prov_unc_key_max_timeout",
8434 FT_UINT32, BASE_DEC, NULL, 0x0,
8437 { &hf_bootp_cl_ietf_ccc_dev_prov_unc_key_max_retries,
8438 { "pktcMtaDevProvUnsolicitedKeyMaxRetries", "bootp.cl.ietf_ccc.dev_prov_unc_key_max_retries",
8439 FT_UINT32, BASE_DEC, NULL, 0x0,
8442 { &hf_bootp_ccc_ietf_sec_tkt_pc_provision_server,
8443 { "Invalidate PacketCable Provisioning Server", "bootp.ccc.ietf.sec_tkt.pc_provision_server",
8444 FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x01,
8447 { &hf_bootp_ccc_ietf_sec_tkt_all_pc_call_management,
8448 { "Invalidate All PacketCable Call Management Servers", "bootp.ccc.ietf.sec_tkt.all_pc_call_management",
8449 FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x02,
8452 { &hf_bootp_option242_avaya,
8453 { "Private/Avaya IP Telephone", "bootp.option.vendor.avaya",
8454 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8455 "Option 242: Private/Avaya IP Telephone", HFILL }},
8457 { &hf_bootp_option242_avaya_tlssrvr,
8458 { "TLSSRVR", "bootp.option.vendor.avaya.tlssrvr",
8459 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8460 "Option 242: TLSSRVR (HTTPS server(s) to download configuration)", HFILL }},
8462 { &hf_bootp_option242_avaya_httpsrvr,
8463 { "HTTPSRVR", "bootp.option.vendor.avaya.httpsrvr",
8464 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8465 "Option 242: HTTPSRVR (HTTP server(s) to download configuration)", HFILL }},
8467 { &hf_bootp_option242_avaya_httpdir,
8468 { "HTTPDIR", "bootp.option.vendor.avaya.httpdir",
8469 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8470 "Option 242: HTTPDIR (Path to configuration files)", HFILL }},
8472 { &hf_bootp_option242_avaya_static,
8473 { "STATIC", "bootp.option.vendor.avaya.static",
8474 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8475 "Option 242: STATIC (Static programming override flag)", HFILL }},
8477 { &hf_bootp_option242_avaya_mcipadd,
8478 { "MCIPADD", "bootp.option.vendor.avaya.mcipadd",
8479 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8480 "Option 242: MCIPADD (List of CM server(s))", HFILL }},
8482 { &hf_bootp_option242_avaya_dot1x,
8483 { "DOT1X", "bootp.option.vendor.avaya.dot1x",
8484 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8485 "Option 242: DOT1X (802.1X Supplicant operation mode)", HFILL }},
8487 { &hf_bootp_option242_avaya_icmpdu,
8488 { "ICMPDU", "bootp.option.vendor.avaya.icmpdu",
8489 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8490 "Option 242: ICMPDU (ICMP Destination Unreachable processing)", HFILL }},
8492 { &hf_bootp_option242_avaya_icmpred,
8493 { "ICMPRED", "bootp.option.vendor.avaya.icmpred",
8494 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8495 "Option 242: ICMPRED (ICMP Redirect handling)", HFILL }},
8497 { &hf_bootp_option242_avaya_l2q,
8498 { "L2Q", "bootp.option.vendor.avaya.l2q",
8499 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8500 "Option 242: L2Q (Controls 802.1Q tagging)", HFILL }},
8502 { &hf_bootp_option242_avaya_l2qvlan,
8503 { "L2QVLAN", "bootp.option.vendor.avaya.l2qvlan",
8504 FT_INT32, BASE_DEC, NULL, 0x0,
8505 "Option 242: L2QVLAN (VLAN ID)", HFILL }},
8507 { &hf_bootp_option242_avaya_loglocal,
8508 { "LOGLOCAL", "bootp.option.vendor.avaya.loglocal",
8509 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8510 "Option 242: LOGLOCAL (Log level)", HFILL }},
8512 { &hf_bootp_option242_avaya_phy1stat,
8513 { "PHY1STAT", "bootp.option.vendor.avaya.phy1stat",
8514 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8515 "Option 242: PHY1STAT (Interface configuration)", HFILL }},
8517 { &hf_bootp_option242_avaya_phy2stat,
8518 { "PHY2STAT", "bootp.option.vendor.avaya.phy2stat",
8519 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8520 "Option 242: PHY2STAT (Interface configuration)", HFILL }},
8522 { &hf_bootp_option242_avaya_procpswd,
8523 { "PROCPSWD", "bootp.option.vendor.avaya.procpswd",
8524 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8525 "Option 242: PROCPSWD (Security string used to access local procedures)", HFILL }},
8527 { &hf_bootp_option242_avaya_procstat,
8528 { "PROCSTAT", "bootp.option.vendor.avaya.procstat",
8529 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8530 "Option 242: PROCSTAT (Local (dialpad) Administrative access)", HFILL }},
8532 { &hf_bootp_option242_avaya_snmpadd,
8533 { "SNMPADD", "bootp.option.vendor.avaya.snmpadd",
8534 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8535 "Option 242: SNMPADD (Allowable source IP Address(es) for SNMP queries)", HFILL }},
8537 { &hf_bootp_option242_avaya_snmpstring,
8538 { "SNMPSTRING", "bootp.option.vendor.avaya.snmpstring",
8539 FT_STRINGZ, BASE_NONE, NULL, 0x0,
8540 "Option 242: SNMPSTRING (SNMP community string)", HFILL }},
8542 { &hf_bootp_option242_avaya_vlantest,
8543 { "VLANTEST", "bootp.option.vendor.avaya.vlantest",
8544 FT_INT32, BASE_DEC, NULL, 0x0,
8545 "Option 242: VLANTEST (Timeout in seconds)", HFILL }},
8548 static uat_field_t bootp_uat_flds[] = {
8549 UAT_FLD_DEC(uat_bootp_records, opt, "Option number", "Custom Option Number"),
8550 UAT_FLD_CSTRING(uat_bootp_records, text, "Option Name", "Custom Option Name"),
8551 UAT_FLD_VS(uat_bootp_records, ftype, "Option type", bootp_custom_type_vals, "Option datatype"),
8555 static gint *ett[] = {
8559 &ett_bootp_option43_suboption,
8560 &ett_bootp_option63_suboption,
8561 &ett_bootp_option77_instance,
8562 &ett_bootp_option82_suboption,
8563 &ett_bootp_option82_suboption9,
8564 &ett_bootp_option125_suboption,
8565 &ett_bootp_option125_tr111_suboption,
8566 &ett_bootp_option125_cl_suboption,
8567 &ett_bootp_option242_suboption,
8569 &ett_bootp_filename_option,
8570 &ett_bootp_server_hostname,
8571 &ett_bootp_fqdn_flags,
8572 &ett_bootp_isns_functions,
8573 &ett_bootp_isns_discovery_domain_access,
8574 &ett_bootp_isns_administrative_flags,
8575 &ett_bootp_isns_server_security_bitmap,
8576 &ett_bootp_isns_secondary_server_addr,
8577 &ett_bootp_o43_bsdp_boot_image,
8578 &ett_bootp_o43_bsdp_attributes,
8579 &ett_bootp_o43_bsdp_image_desc_list,
8580 &ett_bootp_o43_bsdp_image_desc,
8581 &ett_bootp_o43_bsdp_attributes_flags,
8584 static ei_register_info ei[] = {
8585 { &ei_bootp_bad_length, { "bootp.bad_length", PI_PROTOCOL, PI_ERROR, "length isn't 0", EXPFILL }},
8586 { &ei_bootp_bad_bitfield, { "bootp.bad_bitfield", PI_PROTOCOL, PI_ERROR, "Bogus bitfield", EXPFILL }},
8587 { &ei_bootp_missing_subopt_length, { "bootp.missing_subopt_length", PI_PROTOCOL, PI_ERROR, "no room left in option for suboption length", EXPFILL }},
8588 { &ei_bootp_missing_subopt_value, { "bootp.missing_subopt_value", PI_PROTOCOL, PI_ERROR, "no room left in option for suboption value", EXPFILL }},
8589 { &ei_bootp_mal_duid, { "bootp.malformed.duid", PI_PROTOCOL, PI_ERROR, "DUID: malformed option", EXPFILL }},
8590 { &hf_bootp_opt_overload_file_end_missing, { "bootp.option.option_overload.file_end_missing", PI_PROTOCOL, PI_ERROR, "file overload end option missing", EXPFILL }},
8591 { &hf_bootp_opt_overload_sname_end_missing, { "bootp.option.option_overload.sname_end_missing", PI_PROTOCOL, PI_ERROR, "sname overload end option missing", EXPFILL }},
8592 { &hf_bootp_subopt_unknown_type, { "bootp.subopt.unknown_type", PI_PROTOCOL, PI_ERROR, "ERROR, please report: Unknown subopt type handler", EXPFILL }},
8593 { &ei_bootp_option77_user_class_malformed, { "bootp.option.user_class.malformed", PI_PROTOCOL, PI_ERROR, "User Class Information: malformed option", EXPFILL }},
8594 { &ei_bootp_option_civic_location_bad_cattype, { "bootp.option.civic_location.bad_cattype", PI_PROTOCOL, PI_ERROR, "Error with CAType", EXPFILL }},
8595 { &ei_bootp_option_dhcp_name_service_invalid, { "bootp.option.dhcp_name_service.invalid", PI_PROTOCOL, PI_ERROR, "Invalid Name Service", EXPFILL }},
8596 { &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 }},
8597 { &ei_bootp_option_classless_static_route, { "bootp.option.classless_static.route", PI_PROTOCOL, PI_ERROR, "Mask width > 32", EXPFILL }},
8598 { &ei_bootp_option125_enterprise_malformed, { "bootp.option.enterprise.malformed", PI_PROTOCOL, PI_ERROR, "no room left in option for enterprise data", EXPFILL }},
8599 { &ei_bootp_option_6RD_malformed, { "bootp.option.6RD.malformed", PI_PROTOCOL, PI_ERROR, "6RD: malformed option", EXPFILL }},
8600 { &ei_bootp_option82_vi_cl_tag_unknown, { "bootp.option.option.vi.cl.tag_unknown", PI_PROTOCOL, PI_ERROR, "Unknown tag", EXPFILL }},
8601 { &ei_bootp_option_parse_err, { "bootp.option.parse_err", PI_PROTOCOL, PI_ERROR, "Parse error", EXPFILL }},
8602 { &ei_bootp_suboption_invalid, { "bootp.suboption_invalid", PI_PROTOCOL, PI_ERROR, "Invalid suboption", EXPFILL }},
8603 { &ei_bootp_secs_le, { "bootp.secs_le", PI_PROTOCOL, PI_NOTE, "Seconds elapsed appears to be encoded as little-endian", EXPFILL }},
8604 { &ei_bootp_end_option_missing, { "bootp.end_option_missing", PI_PROTOCOL, PI_ERROR, "End option missing", EXPFILL }},
8605 { &ei_bootp_client_address_not_given, { "bootp.client_address_not_given", PI_PROTOCOL, PI_NOTE, "Client address not given", EXPFILL }},
8606 { &ei_bootp_server_name_overloaded_by_dhcp, { "bootp.server_name_overloaded_by_dhcp", PI_PROTOCOL, PI_NOTE, "Server name option overloaded by DHCP", EXPFILL }},
8607 { &ei_bootp_boot_filename_overloaded_by_dhcp, { "bootp.boot_filename_overloaded_by_dhcp", PI_PROTOCOL, PI_NOTE, "Boot file name option overloaded by DHCP", EXPFILL }},
8608 { &ei_bootp_option_isns_ignored_bitfield, { "bootp.option.isns.ignored_bitfield", PI_PROTOCOL, PI_NOTE, "Enabled field is not set - non-zero bitmask ignored", EXPFILL }},
8609 { &ei_bootp_option242_avaya_l2qvlan_invalid, { "bootp.option.vendor.avaya.l2qvlan.invalid", PI_PROTOCOL, PI_ERROR, "Option 242 (L2QVLAN) invalid", EXPFILL }},
8610 { &ei_bootp_option242_avaya_vlantest_invalid, { "bootp.option.vendor.avaya.vlantest.invalid", PI_PROTOCOL, PI_ERROR, "Option 242 (avaya vlantest) invalid", EXPFILL }}
8613 static tap_param bootp_stat_params[] = {
8614 { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
8617 static stat_tap_table_ui bootp_stat_table = {
8618 REGISTER_STAT_GROUP_UNSORTED,
8619 "DHCP (BOOTP) Statistics",
8627 sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item), bootp_stat_fields,
8628 sizeof(bootp_stat_params)/sizeof(tap_param), bootp_stat_params,
8633 module_t *bootp_module;
8634 expert_module_t* expert_bootp;
8636 proto_bootp = proto_register_protocol("Bootstrap Protocol", "BOOTP/DHCP",
8638 proto_register_field_array(proto_bootp, hf, array_length(hf));
8639 proto_register_subtree_array(ett, array_length(ett));
8640 bootp_dhcp_tap = register_tap("bootp");
8642 expert_bootp = expert_register_protocol(proto_bootp);
8643 expert_register_field_array(expert_bootp, ei, array_length(ei));
8645 /* register init routine to setup the custom bootp options */
8646 register_init_routine(&bootp_init_protocol);
8648 /* Allow dissector to find be found by name. */
8649 bootp_handle = register_dissector("bootp", dissect_bootp, proto_bootp);
8651 bootp_module = prefs_register_protocol(proto_bootp, NULL);
8653 prefs_register_bool_preference(bootp_module, "novellserverstring",
8654 "Decode Option 85 as String",
8655 "Novell Servers option 85 can be configured as a string instead of address",
8658 prefs_register_enum_preference(bootp_module, "pkt.ccc.protocol_version",
8659 "PacketCable CCC protocol version",
8660 "The PacketCable CCC protocol version",
8661 &pkt_ccc_protocol_version,
8662 pkt_ccc_protocol_versions,
8665 prefs_register_uint_preference(bootp_module, "pkt.ccc.option",
8666 "PacketCable CCC option",
8667 "Option Number for PacketCable CableLabs Client Configuration",
8671 prefs_register_enum_preference(bootp_module, "uuid.endian",
8672 "Endianness of UUID",
8673 "Endianness applied to UUID fields",
8675 bootp_uuid_endian_vals,
8678 prefs_register_obsolete_preference(bootp_module, "displayasstring");
8680 bootp_uat = uat_new("Custom BootP/DHCP Options (Excl. suboptions)",
8681 sizeof(uat_bootp_record_t), /* record size */
8682 "custom_bootp", /* filename */
8683 TRUE, /* from_profile */
8684 &uat_bootp_records, /* data_ptr */
8685 &num_bootp_records_uat, /* numitems_ptr */
8686 UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
8688 uat_bootp_record_copy_cb, /* copy callback */
8689 uat_bootp_record_update_cb, /* update callback */
8690 uat_bootp_record_free_cb, /* free callback */
8691 NULL, /* post update callback */
8692 bootp_uat_flds); /* UAT field definitions */
8694 prefs_register_uat_preference(bootp_module,
8695 "custom_bootp_table",
8696 "Custom BootP/DHCP Options (Excl. suboptions)",
8697 "Custom BootP/DHCP Options (Excl. suboptions)",
8700 register_stat_tap_table_ui(&bootp_stat_table);
8704 proto_reg_handoff_bootp(void)
8706 dissector_add_uint_range_with_preference("udp.port", BOOTP_UDP_PORT_RANGE, bootp_handle);
8710 * Editor modelines - http://www.wireshark.org/tools/modelines.html
8715 * indent-tabs-mode: t
8718 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
8719 * :indentSize=8:tabSize=8:noTabs=false: