/src/wireshark/epan/dissectors/packet-dhcp.c
Line | Count | Source |
1 | | /* packet-dhcp.c |
2 | | * Routines for DHCP/BOOTP packet disassembly |
3 | | * |
4 | | * Copyright 1998, Gilbert Ramirez <gram@alumni.rice.edu> |
5 | | * Copyright 2004, Thomas Anders <thomas.anders [AT] blue-cable.de> |
6 | | * |
7 | | * Added option field filters |
8 | | * Copyright 2011, Michael Mann |
9 | | * |
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 |
16 | | * |
17 | | * |
18 | | * Copyright 2012, Jerome LAFORGE <jerome.laforge [AT] gmail.com> |
19 | | * |
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 5192: DHCP Options for Protocol for Carrying Authentication for Network Access (PANA) Authentication Agent |
53 | | * RFC 5223: Discovering Location-to-Service Translation (LoST) Servers Using the Dynamic Host Configuration Protocol (DHCP) |
54 | | * RFC 5417: CAPWAP Access Controller DHCP Option |
55 | | * RFC 5969: IPv6 Rapid Deployment on IPv4 Infrastructures (6rd) |
56 | | * RFC 6225: Dynamic Host Configuration Protocol Options for Coordinate-Based Location Configuration Information |
57 | | * RFC 6607: Virtual Subnet Selection Options for DHCPv4 and DHCPv6 |
58 | | * RFC 6704: Forcerenew Nonce Authentication |
59 | | * RFC 6731: Improved Recursive DNS Server Selection for Multi-Interfaced Nodes |
60 | | * RFC 6926: DHCPv4 Bulk Leasequery |
61 | | * RFC 7291: DHCP Options for the Port Control Protocol (PCP) |
62 | | * RFC 7618: Dynamic Allocation of Shared IPv4 Addresses |
63 | | * RFC 7710: Captive-Portal Identification Using DHCP or Router Advertisements (RAs) |
64 | | * RFC 7724: Active DHCPv4 Lease Query |
65 | | * RFC 7839: Access-Network-Identifier Option in DHCP |
66 | | * RFC 8357: Generalized UDP Source Port for DHCP Relay |
67 | | * RFC 8910: Captive-Portal Identification in DHCP and Router Advertisements (RAs) |
68 | | * RFC 8925: IPv6-Only Preferred Option for DHCPv4 |
69 | | * RFC 8973: DDoS Open Threat Signaling (DOTS) Agent Discovery |
70 | | * draft-ietf-dhc-fqdn-option-07.txt |
71 | | * TFTP Server Address Option for DHCPv4 [draft-raj-dhc-tftp-addr-option-06.txt: https://tools.ietf.org/html/draft-raj-dhc-tftp-addr-option-06] |
72 | | * BOOTP and DHCP Parameters |
73 | | * https://www.iana.org/assignments/bootp-dhcp-parameters |
74 | | * DOCSIS(TM) 2.0 Radio Frequency Interface Specification |
75 | | * https://specification-search.cablelabs.com/radio-frequency-interface-specification-2 |
76 | | * DOCSIS(TM) 3.0 MAC and Upper Layer Protocols Interface Specification |
77 | | * https://specification-search.cablelabs.com/CM-SP-MULPIv3.0 |
78 | | * PacketCable(TM) 1.0 MTA Device Provisioning Specification |
79 | | * https://specification-search.cablelabs.com/packetcable-mta-device-provisioning-specification |
80 | | * PacketCable(TM) 1.5 MTA Device Provisioning Specification |
81 | | * https://specification-search.cablelabs.com/packetcable-1-5-mta-device-provisioning-specification |
82 | | * PacketCable(TM) 2.0 E-UE Device Provisioning Data Model Specification |
83 | | * https://specification-search.cablelabs.com/e-ue-provisioning-data-model-specification |
84 | | * Business Services over DOCSIS(R) Layer 2 Virtual Private Networks |
85 | | * https://specification-search.cablelabs.com/business-services-over-docsis-layer-2-virtual-private-networks |
86 | | * CableHome(TM) 1.1 Specification |
87 | | * https://web.archive.org/web/20060628173459/http://www.cablelabs.com/projects/cablehome/downloads/specs/CH-SP-CH1.1-I11-060407.pdf |
88 | | * Broadband Forum TR-111 |
89 | | * https://web.archive.org/web/20150307135117/http://www.broadband-forum.org/technical/download/TR-111.pdf |
90 | | * Boot Server Discovery Protocol (BSDP) |
91 | | * https://opensource.apple.com/source/bootp/bootp-198.1/Documentation/BSDP.doc |
92 | | * [MS-DHCPE] DHCPv4 Option Code 77 (0x4D) - User Class Option |
93 | | * https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dhcpe/fe8a2dd4-1e8c-4546-bacd-4ae10de02058 |
94 | | * |
95 | | * * Copyright 2023, Colin McInnes <colin.mcinnes [AT] vecima.com> |
96 | | * Added additional CableLabs Vendor Class IDs (Option 60) to CableLabs heuristic from: |
97 | | * Remote PHY Specification |
98 | | * https://www.cablelabs.com/specifications/CM-SP-R-PHY |
99 | | * Flexible MAC Architecture System Specification |
100 | | * https://www.cablelabs.com/specifications/CM-SP-FMA-SYS |
101 | | * Data-Over-Cable Service Interface Specifications, eDOCSIS Specification |
102 | | * https://www.cablelabs.com/specifications/CM-SP-eDOCSIS |
103 | | * Data-Over-Cable Service Interface Specifications, IPv4 and IPv6 eRouter Specification |
104 | | * https://www.cablelabs.com/specifications/CM-SP-eRouter |
105 | | * OpenCable Tuning Resolver Interface Specification |
106 | | * https://www.cablelabs.com/specifications/OC-SP-TRIF |
107 | | * DPoE Demarcation Device Specification |
108 | | * https://www.cablelabs.com/specifications/DPoE-SP-DEMARCv1.0 |
109 | | * |
110 | | * Wireshark - Network traffic analyzer |
111 | | * By Gerald Combs <gerald@wireshark.org> |
112 | | * Copyright 1998 Gerald Combs |
113 | | * |
114 | | * SPDX-License-Identifier: GPL-2.0-or-later |
115 | | */ |
116 | | |
117 | | /* |
118 | | * Some of the development of the DHCP/BOOTP protocol decoder was sponsored by |
119 | | * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary |
120 | | * CableLabs' specifications. Your license and use of this protocol decoder |
121 | | * does not mean that you are licensed to use the CableLabs' |
122 | | * specifications. If you have questions about this protocol, contact |
123 | | * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional |
124 | | * information. |
125 | | */ |
126 | | |
127 | | |
128 | | #include "config.h" |
129 | | |
130 | | #include <stdio.h> /* for sscanf() */ |
131 | | |
132 | | #include <epan/packet.h> |
133 | | #include "packet-arp.h" |
134 | | #include "packet-dns.h" /* for get_dns_name() */ |
135 | | #include <epan/addr_resolv.h> |
136 | | #include <epan/prefs.h> |
137 | | #include <epan/tap.h> |
138 | | #include <epan/stat_tap_ui.h> |
139 | | #include <epan/arptypes.h> |
140 | | #include <epan/expert.h> |
141 | | #include <epan/uat.h> |
142 | | #include <epan/sminmpec.h> |
143 | | #include <epan/tfs.h> |
144 | | |
145 | | #include <wsutil/str_util.h> |
146 | | #include <wsutil/strtoi.h> |
147 | | #include <wsutil/array.h> |
148 | | #include <wsutil/ws_padding_to.h> |
149 | | |
150 | | void proto_register_dhcp(void); |
151 | | void proto_reg_handoff_dhcp(void); |
152 | | |
153 | | static int dhcp_bootp_tap; |
154 | | static int proto_dhcp; |
155 | | static int hf_dhcp_type; |
156 | | static int hf_dhcp_hw_type; |
157 | | static int hf_dhcp_hw_len; |
158 | | static int hf_dhcp_hops; |
159 | | static int hf_dhcp_id; |
160 | | static int hf_dhcp_secs; |
161 | | static int hf_dhcp_flags; |
162 | | static int hf_dhcp_flags_broadcast; |
163 | | static int hf_dhcp_flags_reserved; |
164 | | static int hf_dhcp_ip_client; |
165 | | static int hf_dhcp_ip_your; |
166 | | static int hf_dhcp_ip_server; |
167 | | static int hf_dhcp_ip_relay; |
168 | | static int hf_dhcp_hw_addr; |
169 | | static int hf_dhcp_hw_addr_padding; |
170 | | static int hf_dhcp_hw_ether_addr; |
171 | | static int hf_dhcp_server; |
172 | | static int hf_dhcp_file; |
173 | | static int hf_dhcp_cookie; |
174 | | static int hf_dhcp_vendor_specific_options; |
175 | | static int hf_dhcp_bootp; |
176 | | static int hf_dhcp_fqdn_flags; |
177 | | static int hf_dhcp_fqdn_s; |
178 | | static int hf_dhcp_fqdn_o; |
179 | | static int hf_dhcp_fqdn_e; |
180 | | static int hf_dhcp_fqdn_n; |
181 | | static int hf_dhcp_fqdn_mbz; |
182 | | static int hf_dhcp_fqdn_rcode1; |
183 | | static int hf_dhcp_fqdn_rcode2; |
184 | | static int hf_dhcp_fqdn_name; |
185 | | static int hf_dhcp_fqdn_asciiname; |
186 | | static int hf_dhcp_pkt_mta_cap_len; |
187 | | static int hf_dhcp_pkt_mta_cap_type; |
188 | | static int hf_dhcp_docsis_cm_cap_type; |
189 | | static int hf_dhcp_docsis_cm_cap_len; |
190 | | static int hf_dhcp_client_identifier_uuid; |
191 | | static int hf_dhcp_client_id_iaid; |
192 | | static int hf_dhcp_client_id_duid_type; |
193 | | static int hf_dhcp_client_hardware_address; |
194 | | static int hf_dhcp_client_identifier_duid_llt_hw_type; |
195 | | static int hf_dhcp_client_identifier_duid_ll_hw_type; |
196 | | static int hf_dhcp_client_identifier_time; |
197 | | static int hf_dhcp_client_identifier_link_layer_address; |
198 | | static int hf_dhcp_client_identifier_link_layer_address_ether; |
199 | | static int hf_dhcp_client_identifier_enterprise_num; |
200 | | static int hf_dhcp_client_identifier; |
201 | | static int hf_dhcp_client_identifier_type; |
202 | | static int hf_dhcp_client_identifier_undef; |
203 | | static int hf_dhcp_option_type; |
204 | | static int hf_dhcp_option_length; |
205 | | static int hf_dhcp_option_value; |
206 | | static int hf_dhcp_option_value_8; |
207 | | static int hf_dhcp_option_value_16; |
208 | | static int hf_dhcp_option_value_u32; |
209 | | static int hf_dhcp_option_value_s_secs; |
210 | | static int hf_dhcp_option_value_u_secs; |
211 | | static int hf_dhcp_option_value_stringz; |
212 | | static int hf_dhcp_option_value_ip_address; |
213 | | static int hf_dhcp_option_value_boolean; |
214 | | static int hf_dhcp_option_rfc_3396_detected; |
215 | | static int hf_dhcp_suboption_length; |
216 | | |
217 | | static int hf_dhcp_option_padding; /* 0 */ |
218 | | static int hf_dhcp_option_subnet_mask; /* 1 */ |
219 | | static int hf_dhcp_option_time_offset; /* 2 */ |
220 | | static int hf_dhcp_option_router; /* 3 */ |
221 | | static int hf_dhcp_option_time_server; /* 4 */ |
222 | | static int hf_dhcp_option_name_server; /* 5 */ |
223 | | static int hf_dhcp_option_domain_name_server; /* 6 */ |
224 | | static int hf_dhcp_option_log_server; /* 7 */ |
225 | | static int hf_dhcp_option_quotes_server; /* 8 */ |
226 | | static int hf_dhcp_option_lpr_server; /* 9 */ |
227 | | static int hf_dhcp_option_impress_server; /* 10 */ |
228 | | static int hf_dhcp_option_resource_location_server; /* 11 */ |
229 | | static int hf_dhcp_option_hostname; /* 12 */ |
230 | | static int hf_dhcp_option_boot_file_size; /* 13 */ |
231 | | static int hf_dhcp_option_merit_dump_file; /* 14 */ |
232 | | static int hf_dhcp_option_domain_name; /* 15 */ |
233 | | static int hf_dhcp_option_swap_server; /* 16 */ |
234 | | static int hf_dhcp_option_root_path; /* 17 */ |
235 | | static int hf_dhcp_option_extension_path; /* 18 */ |
236 | | static int hf_dhcp_option_ip_forwarding; /* 19 */ |
237 | | static int hf_dhcp_option_non_local_source_routing; /* 20 */ |
238 | | static int hf_dhcp_option_policy_filter_ip; /* 21 - IP address */ |
239 | | static int hf_dhcp_option_policy_filter_subnet_mask; /* 21 - Subnet mask */ |
240 | | static int hf_dhcp_option_max_datagram_reassembly_size; /* 22 */ |
241 | | static int hf_dhcp_option_default_ip_ttl; /* 23 */ |
242 | | static int hf_dhcp_option_path_mtu_aging_timeout; /* 24 */ |
243 | | static int hf_dhcp_option_path_mtu_plateau_table_item; /* 25 */ |
244 | | static int hf_dhcp_option_interface_mtu; /* 26 */ |
245 | | static int hf_dhcp_option_all_subnets_are_local; /* 27 */ |
246 | | static int hf_dhcp_option_broadcast_address; /* 28 */ |
247 | | static int hf_dhcp_option_perform_mask_discovery; /* 29 */ |
248 | | static int hf_dhcp_option_mask_supplier; /* 30 */ |
249 | | static int hf_dhcp_option_perform_router_discover; /* 31 */ |
250 | | static int hf_dhcp_option_router_solicitation_address; /* 32 */ |
251 | | static int hf_dhcp_option_static_route_ip; /* 33 - Destination IP */ |
252 | | static int hf_dhcp_option_static_route_router; /* 33 - Router */ |
253 | | static int hf_dhcp_option_trailer_encapsulation; /* 34 */ |
254 | | static int hf_dhcp_option_arp_cache_timeout; /* 35 */ |
255 | | static int hf_dhcp_option_ethernet_encapsulation; /* 36 */ |
256 | | static int hf_dhcp_option_tcp_default_ttl; /* 37 */ |
257 | | static int hf_dhcp_option_tcp_keepalive_interval; /* 38 */ |
258 | | static int hf_dhcp_option_tcp_keepalive_garbage; /* 39 */ |
259 | | static int hf_dhcp_option_nis_domain; /* 40 */ |
260 | | static int hf_dhcp_option_nis_server; /* 41 */ |
261 | | static int hf_dhcp_option_ntp_server; /* 42 */ |
262 | | |
263 | | static int hf_dhcp_option43_suboption; /* 43 unknown vendor suboption */ |
264 | | static int hf_dhcp_option43_value; /* 43 suboption value */ |
265 | | static int hf_dhcp_option43_value_8; /* 43 suboption value */ |
266 | | static int hf_dhcp_option43_value_32; /* 43 suboption value */ |
267 | | static int hf_dhcp_option43_value_stringz; /* 43 suboption value */ |
268 | | static int hf_dhcp_option43_value_ip_address; /* 43 suboption value */ |
269 | | |
270 | | static int hf_dhcp_option43_pxeclient_suboption; /* 43 suboption */ |
271 | | static int hf_dhcp_option43_pxeclient_padding; /* 43:0 PXE */ |
272 | | static int hf_dhcp_option43_pxeclient_mtftp_ip; /* 43:1 PXE */ |
273 | | static int hf_dhcp_option43_pxeclient_mtftp_client_port; /* 43:2 PXE */ |
274 | | static int hf_dhcp_option43_pxeclient_mtftp_server_port; /* 43:3 PXE */ |
275 | | static int hf_dhcp_option43_pxeclient_mtftp_timeout; /* 43:4 PXE */ |
276 | | static int hf_dhcp_option43_pxeclient_mtftp_delay; /* 43:5 PXE */ |
277 | | static int hf_dhcp_option43_pxeclient_discovery_control; /* 43:6 PXE */ |
278 | | static int hf_dhcp_option43_pxeclient_discovery_control_bc; /* 43:6 PXE */ |
279 | | static int hf_dhcp_option43_pxeclient_discovery_control_mc; /* 43:6 PXE */ |
280 | | static int hf_dhcp_option43_pxeclient_discovery_control_serverlist; /* 43:6 PXE */ |
281 | | static int hf_dhcp_option43_pxeclient_discovery_control_bstrap; /* 43:6 PXE */ |
282 | | static int hf_dhcp_option43_pxeclient_multicast_address; /* 43:7 PXE */ |
283 | | static int hf_dhcp_option43_pxeclient_boot_servers; /* 43:8 PXE */ |
284 | | static int hf_dhcp_option43_pxeclient_boot_server_type; /* 43:8 PXE */ |
285 | | static int hf_dhcp_option43_pxeclient_boot_server_count; /* 43:8 PXE */ |
286 | | static int hf_dhcp_option43_pxeclient_boot_server_ip; /* 43:8 PXE */ |
287 | | static int hf_dhcp_option43_pxeclient_boot_menu; /* 43:9 PXE */ |
288 | | static int hf_dhcp_option43_pxeclient_boot_menu_type; /* 43:9 PXE */ |
289 | | static int hf_dhcp_option43_pxeclient_boot_menu_length; /* 43:9 PXE */ |
290 | | static int hf_dhcp_option43_pxeclient_boot_menu_desc; /* 43:9 PXE */ |
291 | | static int hf_dhcp_option43_pxeclient_menu_prompt; /* 43:10 PXE */ |
292 | | static int hf_dhcp_option43_pxeclient_menu_prompt_timeout; /* 43:10 PXE */ |
293 | | static int hf_dhcp_option43_pxeclient_menu_prompt_prompt; /* 43:10 PXE */ |
294 | | static int hf_dhcp_option43_pxeclient_multicast_address_alloc; /* 43:11 PXE */ |
295 | | static int hf_dhcp_option43_pxeclient_credential_types; /* 43:12 PXE */ |
296 | | static int hf_dhcp_option43_pxeclient_boot_item; /* 43:71 PXE */ |
297 | | static int hf_dhcp_option43_pxeclient_boot_item_type; /* 43:71 PXE */ |
298 | | static int hf_dhcp_option43_pxeclient_boot_item_layer; /* 43:71 PXE */ |
299 | | static int hf_dhcp_option43_pxeclient_lcm_server; /* 43:179 PXE */ |
300 | | static int hf_dhcp_option43_pxeclient_lcm_domain; /* 43:180 PXE */ |
301 | | static int hf_dhcp_option43_pxeclient_lcm_nic_option; /* 43:181 PXE */ |
302 | | static int hf_dhcp_option43_pxeclient_lcm_workgroup; /* 43:190 PXE */ |
303 | | static int hf_dhcp_option43_pxeclient_discovery; /* 43:191 PXE */ |
304 | | static int hf_dhcp_option43_pxeclient_configured; /* 43:192 PXE */ |
305 | | static int hf_dhcp_option43_pxeclient_lcm_version; /* 43:193 PXE */ |
306 | | static int hf_dhcp_option43_pxeclient_lcm_serial; /* 43:194 PXE */ |
307 | | static int hf_dhcp_option43_pxeclient_end; /* 43:255 PXE */ |
308 | | |
309 | | static int hf_dhcp_option43_cl_suboption; /* 43 suboption */ |
310 | | static int hf_dhcp_option43_cl_padding; /* 43:0 CL */ |
311 | | static int hf_dhcp_option43_cl_suboption_request_list; /* 43:1 CL */ |
312 | | static int hf_dhcp_option43_cl_device_type; /* 43:2 CL */ |
313 | | static int hf_dhcp_option43_cl_esafe_type; /* 43:3 CL */ |
314 | | static int hf_dhcp_option43_cl_serial_number; /* 43:4 CL */ |
315 | | static int hf_dhcp_option43_cl_hardware_version; /* 43:5 CL */ |
316 | | static int hf_dhcp_option43_cl_software_version; /* 43:6 CL */ |
317 | | static int hf_dhcp_option43_cl_boot_rom_version; /* 43:7 CL */ |
318 | | static int hf_dhcp_option43_cl_oui_bytes; /* 43:8 CL */ |
319 | | static int hf_dhcp_option43_cl_oui_string; /* 43:8 CL */ |
320 | | static int hf_dhcp_option43_cl_model_number; /* 43:9 CL */ |
321 | | static int hf_dhcp_option43_cl_vendor_name10; /* 43:10 CL */ |
322 | | static int hf_dhcp_option43_cl_address_realm; /* 43:11 CL */ |
323 | | static int hf_dhcp_option43_cl_cm_ps_system_desc; /* 43:12 CL */ |
324 | | static int hf_dhcp_option43_cl_cm_ps_firmware_revision; /* 43:13 CL */ |
325 | | static int hf_dhcp_option43_cl_firewall_policy_file_version; /* 43:14 CL */ |
326 | | static int hf_dhcp_option43_cl_esafe_config_file_devices; /* 43:15 CL */ |
327 | | static int hf_dhcp_option43_cl_video_security_tape; /* 43:18 CL */ |
328 | | static int hf_dhcp_option43_cl_mta_mac_address; /* 43:31 CL */ |
329 | | static int hf_dhcp_option43_cl_correlation_ID; /* 43:32 CL */ |
330 | | static int hf_dhcp_option43_cl_vendor_name51; /* 43:51 CL */ |
331 | | static int hf_dhcp_option43_cl_cablecard_capability; /* 43:52 CL */ |
332 | | static int hf_dhcp_option43_cl_device_id_ca; /* 43:53 CL */ |
333 | | static int hf_dhcp_option43_cl_device_id_x509; /* 43:54 CL */ |
334 | | static int hf_dhcp_option43_cl_end; /* 43:255 CL */ |
335 | | |
336 | | static int hf_dhcp_option43_aerohive_suboption; /* 43 suboption */ |
337 | | static int hf_dhcp_option43_aerohive_unknown; /* 43:X AEROHIVE */ |
338 | | static int hf_dhcp_option43_aerohive_xiqhostname; /* 43:225 AEROHIVE */ |
339 | | static int hf_dhcp_option43_aerohive_xiqipaddress; /* 43:226 AEROHIVE */ |
340 | | |
341 | | static int hf_dhcp_option43_bsdp_suboption; /* 43 suboption */ |
342 | | static int hf_dhcp_option43_bsdp_message_type; /* 43:1 BSDP */ |
343 | | static int hf_dhcp_option43_bsdp_version; /* 43:2 BSDP */ |
344 | | static int hf_dhcp_option43_bsdp_server_identifier; /* 43:3 BSDP */ |
345 | | static int hf_dhcp_option43_bsdp_server_priority; /* 43:4 BSDP */ |
346 | | static int hf_dhcp_option43_bsdp_reply_port; /* 43:5 BSDP */ |
347 | | static int hf_dhcp_option43_bsdp_boot_image_list_path; /* 43:6 BSDP */ |
348 | | static int hf_dhcp_option43_bsdp_default_boot_image_id; /* 43:7 BSDP */ |
349 | | static int hf_dhcp_option43_bsdp_selected_boot_image_id; /* 43:8 BSDP */ |
350 | | static int hf_dhcp_option43_bsdp_boot_image_list; /* 43:9 BSDP */ |
351 | | static int hf_dhcp_option43_bsdp_netboot_firmware; /* 43:10 BSDP */ |
352 | | static int hf_dhcp_option43_bsdp_attributes_filter_list; /* 43:11 BSDP */ |
353 | | static int hf_dhcp_option43_bsdp_message_size; /* 43:12 BSDP */ |
354 | | static int hf_dhcp_option43_bsdp_boot_image_index; /* 43 BSDP */ |
355 | | static int hf_dhcp_option43_bsdp_boot_image_attribute; /* 43 BSDP */ |
356 | | static int hf_dhcp_option43_bsdp_boot_image_attribute_install; /* 43 BSDP */ |
357 | | static int hf_dhcp_option43_bsdp_boot_image_attribute_kind; /* 43 BSDP */ |
358 | | static int hf_dhcp_option43_bsdp_boot_image_attribute_reserved; /* 43 BSDP */ |
359 | | static int hf_dhcp_option43_bsdp_image_desc; /* 43 BSDP */ |
360 | | static int hf_dhcp_option43_bsdp_boot_image_name; /* 43 BSDP */ |
361 | | static int hf_dhcp_option43_bsdp_boot_image_name_len; /* 43 BSDP */ |
362 | | |
363 | | static int hf_dhcp_option43_cisco_suboption; /* 43 Cisco */ |
364 | | static int hf_dhcp_option43_cisco_unknown; /* 43 Cisco */ |
365 | | static int hf_dhcp_option43_cisco_unknown1; /* 43:1 Cisco */ |
366 | | static int hf_dhcp_option43_cisco_unknown2; /* 43:2 Cisco */ |
367 | | static int hf_dhcp_option43_cisco_unknown3; /* 43:3 Cisco */ |
368 | | static int hf_dhcp_option43_cisco_nodeid; /* 43:4 Cisco */ |
369 | | static int hf_dhcp_option43_cisco_unknown5; /* 43:5 Cisco */ |
370 | | static int hf_dhcp_option43_cisco_unknown6; /* 43:6 Cisco */ |
371 | | static int hf_dhcp_option43_cisco_model; /* 43:7 Cisco */ |
372 | | static int hf_dhcp_option43_cisco_apicuuid; /* 43:8 Cisco */ |
373 | | static int hf_dhcp_option43_cisco_fabricname; /* 43:9 Cisco */ |
374 | | static int hf_dhcp_option43_cisco_unknown10; /* 43:10 Cisco */ |
375 | | static int hf_dhcp_option43_cisco_serialno; /* 43:11 Cisco */ |
376 | | static int hf_dhcp_option43_cisco_clientint; /* 43:12 Cisco */ |
377 | | |
378 | | static int hf_dhcp_option43_alcatel_suboption; /* 43 suboption */ |
379 | | static int hf_dhcp_option43_alcatel_padding; /* 43:0 Alcatel */ |
380 | | static int hf_dhcp_option43_alcatel_vlan_id; /* 43:58 Alcatel */ |
381 | | static int hf_dhcp_option43_alcatel_tftp1; /* 43:64 Alcatel */ |
382 | | static int hf_dhcp_option43_alcatel_tftp2; /* 43:65 Alcatel */ |
383 | | static int hf_dhcp_option43_alcatel_app_type; /* 43:66 Alcatel */ |
384 | | static int hf_dhcp_option43_alcatel_sip_url; /* 43:67 Alcatel */ |
385 | | static int hf_dhcp_option43_alcatel_end; /* 43:255 Alcatel */ |
386 | | |
387 | | static int hf_dhcp_option43_arubaap_controllerip; /* 43: ArubaAP*/ |
388 | | static int hf_dhcp_option43_arubaiap; /* 43: ArubaIAP*/ |
389 | | static int hf_dhcp_option43_arubaiap_nameorg; /* 43: ArubaIAP: Name Organisation*/ |
390 | | static int hf_dhcp_option43_arubaiap_ampip; /* 43: ArubaIAP: AMP IP Address*/ |
391 | | static int hf_dhcp_option43_arubaiap_password; /* 43 :ArubaIAP: Password*/ |
392 | | |
393 | | static int hf_dhcp_option_netbios_over_tcpip_name_server; /* 44 */ |
394 | | static int hf_dhcp_option_netbios_over_tcpip_dd_name_server; /* 45 */ |
395 | | static int hf_dhcp_option_netbios_over_tcpip_node_type; /* 46 */ |
396 | | static int hf_dhcp_option_netbios_over_tcpip_scope; /* 47 */ |
397 | | static int hf_dhcp_option_xwindows_system_font_server; /* 48 */ |
398 | | static int hf_dhcp_option_xwindows_system_display_manager; /* 49 */ |
399 | | static int hf_dhcp_option_requested_ip_address; /* 50 */ |
400 | | static int hf_dhcp_option_ip_address_lease_time; /* 51 */ |
401 | | static int hf_dhcp_option_option_overload; /* 52 */ |
402 | | static int hf_dhcp_option_dhcp; /* 53 */ |
403 | | static int hf_dhcp_option_dhcp_server_id; /* 54 */ |
404 | | static int hf_dhcp_option_parameter_request_list_item; /* 55 */ |
405 | | static int hf_dhcp_option_message; /* 56 */ |
406 | | static int hf_dhcp_option_dhcp_max_message_size; /* 57 */ |
407 | | static int hf_dhcp_option_renewal_time_value; /* 58 */ |
408 | | static int hf_dhcp_option_rebinding_time_value; /* 59 */ |
409 | | static int hf_dhcp_option_vendor_class_id; /* 60 */ |
410 | | static int hf_dhcp_option_vendor_class_data; /* 60 */ |
411 | | |
412 | | static int hf_dhcp_option_novell_netware_ip_domain; /* 62 */ |
413 | | |
414 | | static int hf_dhcp_option63_suboption; /* 63 suboption */ |
415 | | static int hf_dhcp_option63_value; /* 63 suboption value */ |
416 | | static int hf_dhcp_option63_value_8; /* 63 suboption value */ |
417 | | static int hf_dhcp_option63_value_ip_address; /* 63 suboption value */ |
418 | | static int hf_dhcp_option63_value_boolean; /* 63 suboption value */ |
419 | | static int hf_dhcp_option63_broadcast; /* 63:5 */ |
420 | | static int hf_dhcp_option63_preferred_dss_server; /* 63:6 */ |
421 | | static int hf_dhcp_option63_nearest_nwip_server; /* 63:7 */ |
422 | | static int hf_dhcp_option63_autoretries; /* 63:8 */ |
423 | | static int hf_dhcp_option63_autoretry_delay; /* 63:9 */ |
424 | | static int hf_dhcp_option63_support_netware_v1_1; /* 63:10 */ |
425 | | static int hf_dhcp_option63_primary_dss; /* 63:11 */ |
426 | | |
427 | | static int hf_dhcp_option_nis_plus_domain; /* 64 */ |
428 | | static int hf_dhcp_option_nis_plus_server; /* 65 */ |
429 | | static int hf_dhcp_option_tftp_server_name; /* 66 */ |
430 | | static int hf_dhcp_option_bootfile_name; /* 67 */ |
431 | | static int hf_dhcp_option_mobile_ip_home_agent; /* 68 */ |
432 | | static int hf_dhcp_option_smtp_server; /* 69 */ |
433 | | static int hf_dhcp_option_pop3_server; /* 70 */ |
434 | | static int hf_dhcp_option_nntp_server; /* 71 */ |
435 | | static int hf_dhcp_option_default_www_server; /* 72 */ |
436 | | static int hf_dhcp_option_default_finger_server; /* 73 */ |
437 | | static int hf_dhcp_option_default_irc_server; /* 74 */ |
438 | | static int hf_dhcp_option_streettalk_server; /* 75 */ |
439 | | static int hf_dhcp_option_streettalk_da_server; /* 76 */ |
440 | | static int hf_dhcp_option77_user_class; /* 77 User Class instance */ |
441 | | static int hf_dhcp_option77_user_class_length; /* 77 length of User Class instance */ |
442 | | static int hf_dhcp_option77_user_class_data; /* 77 data of User Class instance */ |
443 | | static int hf_dhcp_option77_user_class_text; /* 77 User class text */ |
444 | | static int hf_dhcp_option77_user_class_binary_data_length; /* 77, Microsoft */ |
445 | | static int hf_dhcp_option77_user_class_binary_data; /* 77, Microsoft */ |
446 | | static int hf_dhcp_option77_user_class_padding; /* 77, Microsoft */ |
447 | | static int hf_dhcp_option77_user_class_name_length; /* 77, Microsoft */ |
448 | | static int hf_dhcp_option77_user_class_name; /* 77, Microsoft */ |
449 | | static int hf_dhcp_option77_user_class_description_length; /* 77, Microsoft */ |
450 | | static int hf_dhcp_option77_user_class_description; /* 77, Microsoft */ |
451 | | static int hf_dhcp_option_slp_directory_agent_value; /* 78 */ |
452 | | static int hf_dhcp_option_slp_directory_agent_slpda_address; /* 78 */ |
453 | | static int hf_dhcp_option_slp_service_scope_value; /* 79 */ |
454 | | static int hf_dhcp_option_slp_service_scope_string; /* 79 */ |
455 | | |
456 | | static int hf_dhcp_option82_suboption; /* 82 suboption */ |
457 | | static int hf_dhcp_option82_value; /* 82 suboption value */ |
458 | | static int hf_dhcp_option82_value_8; /* 82 suboption value */ |
459 | | static int hf_dhcp_option82_value_16; /* 82 suboption value */ |
460 | | static int hf_dhcp_option82_value_32; /* 82 suboption value */ |
461 | | static int hf_dhcp_option82_value_ip_address; /* 82 suboption value */ |
462 | | static int hf_dhcp_option82_value_stringz; /* 82 suboption value */ |
463 | | static int hf_dhcp_option82_padding; /* 82:0 */ |
464 | | static int hf_dhcp_option82_agent_circuit_id; /* 82:1 */ |
465 | | static int hf_dhcp_option82_agent_remote_id; /* 82:2 */ |
466 | | static int hf_dhcp_option82_reserved; /* 82:3 */ |
467 | | static int hf_dhcp_option82_docsis_device_class; /* 82:4 */ |
468 | | static int hf_dhcp_option82_link_selection; /* 82:5 */ |
469 | | static int hf_dhcp_option82_subscriber_id; /* 82:6 */ |
470 | | static int hf_dhcp_option82_radius_attributes; /* 82:7 */ |
471 | | static int hf_dhcp_option82_authentication; /* 82:8 */ |
472 | | static int hf_dhcp_option82_vi; /* 82:9 */ |
473 | | /* 82:9 suboptions */ |
474 | | static int hf_dhcp_option82_vi_enterprise; |
475 | | static int hf_dhcp_option82_vi_data_length; |
476 | | static int hf_dhcp_option82_vi_cl_option; |
477 | | static int hf_dhcp_option82_vi_cl_option_length; |
478 | | static int hf_dhcp_option82_vi_cl_tag; |
479 | | static int hf_dhcp_option82_vi_cl_tag_length; |
480 | | static int hf_dhcp_option82_vi_cl_docsis_version; /* 82:9:4491:1 */ |
481 | | static int hf_dhcp_option82_vi_cl_dpoe_system_version; /* 82:9:4491:2 */ |
482 | | static int hf_dhcp_option82_vi_cl_dpoe_system_pbb_service; /* 82:9:4491:4 */ |
483 | | static int hf_dhcp_option82_vi_cl_service_class_name; /* 82:9:4491:5 */ |
484 | | static int hf_dhcp_option82_vi_cl_mso_defined_text; /* 82:9:4491:6 */ |
485 | | static int hf_dhcp_option82_vi_cl_secure_file_transfer_uri; /* 82:9:4491:7 */ |
486 | | /* 82:9 suboptions end */ |
487 | | static int hf_dhcp_option82_flags; /* 82:10 */ |
488 | | static int hf_dhcp_option82_server_id_override; /* 82:11 */ |
489 | | static int hf_dhcp_option82_relay_agent_id; /* 82:12 */ |
490 | | static int hf_dhcp_option82_option_ani_att; /* 82:13 */ |
491 | | static int hf_dhcp_option82_option_ani_att_res; |
492 | | static int hf_dhcp_option82_option_ani_att_att; |
493 | | static int hf_dhcp_option82_option_ani_network_name; /* 82:14 */ |
494 | | static int hf_dhcp_option82_option_ani_ap_name; /* 82:15 */ |
495 | | static int hf_dhcp_option82_option_ani_ap_bssid; /* 82:16 */ |
496 | | static int hf_dhcp_option82_option_ani_operator_id; /* 82:17 */ |
497 | | static int hf_dhcp_option82_option_ani_operator_realm; /* 82:18 */ |
498 | | static int hf_dhcp_option82_option_source_port; /* 82:19 */ |
499 | | static int hf_dhcp_option82_link_selection_cisco; /* 82:150 */ |
500 | | static int hf_dhcp_option82_vrf_name_vpn_id; /* 82:151 */ |
501 | | /* 82:151 suboptions */ |
502 | | static int hf_dhcp_option82_vrf_name_global; |
503 | | static int hf_dhcp_option82_vrf_name; |
504 | | static int hf_dhcp_option82_vrf_name_vpn_id_oui; |
505 | | static int hf_dhcp_option82_vrf_name_vpn_id_index; |
506 | | /* 82:151 suboptions end */ |
507 | | static int hf_dhcp_option82_server_id_override_cisco; /* 82:152 */ |
508 | | |
509 | | static int hf_dhcp_option_isns_functions; |
510 | | static int hf_dhcp_option_isns_functions_enabled; |
511 | | static int hf_dhcp_option_isns_functions_dd_authorization; |
512 | | static int hf_dhcp_option_isns_functions_sec_policy_distibution; |
513 | | static int hf_dhcp_option_isns_functions_reserved; |
514 | | |
515 | | static int hf_dhcp_option_isns_discovery_domain_access; |
516 | | static int hf_dhcp_option_isns_discovery_domain_access_enabled; |
517 | | static int hf_dhcp_option_isns_discovery_domain_access_control_node; |
518 | | static int hf_dhcp_option_isns_discovery_domain_access_iscsi_target; |
519 | | static int hf_dhcp_option_isns_discovery_domain_access_iscsi_inititator; |
520 | | static int hf_dhcp_option_isns_discovery_domain_access_ifcp_target_port; |
521 | | static int hf_dhcp_option_isns_discovery_domain_access_ifcp_initiator_port; |
522 | | static int hf_dhcp_option_isns_discovery_domain_access_reserved; |
523 | | |
524 | | static int hf_dhcp_option_isns_administrative_flags; |
525 | | static int hf_dhcp_option_isns_administrative_flags_enabled; |
526 | | static int hf_dhcp_option_isns_administrative_flags_heartbeat; |
527 | | static int hf_dhcp_option_isns_administrative_flags_management_scns; |
528 | | static int hf_dhcp_option_isns_administrative_flags_default_dd; |
529 | | static int hf_dhcp_option_isns_administrative_flags_reserved; |
530 | | |
531 | | static int hf_dhcp_option_isns_server_security_bitmap; |
532 | | static int hf_dhcp_option_isns_server_security_bitmap_enabled; |
533 | | static int hf_dhcp_option_isns_server_security_bitmap_ike_ipsec_enabled; |
534 | | static int hf_dhcp_option_isns_server_security_bitmap_main_mode; |
535 | | static int hf_dhcp_option_isns_server_security_bitmap_aggressive_mode; |
536 | | static int hf_dhcp_option_isns_server_security_bitmap_pfs; |
537 | | static int hf_dhcp_option_isns_server_security_bitmap_transport_mode; |
538 | | static int hf_dhcp_option_isns_server_security_bitmap_tunnel_mode; |
539 | | static int hf_dhcp_option_isns_server_security_bitmap_reserved; |
540 | | |
541 | | static int hf_dhcp_option_isns_heartbeat_originator_addr; |
542 | | static int hf_dhcp_option_isns_primary_server_addr; |
543 | | static int hf_dhcp_option_isns_secondary_server_addr_list; |
544 | | |
545 | | static int hf_dhcp_option_novell_dss_string; /* 85 */ |
546 | | static int hf_dhcp_option_novell_dss_ip; /* 85 */ |
547 | | static int hf_dhcp_option_novell_ds_tree_name; /* 86 */ |
548 | | static int hf_dhcp_option_novell_ds_context; /* 87 */ |
549 | | static int hf_dhcp_option_dhcp_authentication_protocol; /* 90 */ |
550 | | static int hf_dhcp_option_dhcp_authentication_alg_delay; /* 90 */ |
551 | | static int hf_dhcp_option_dhcp_authentication_algorithm; /* 90 */ |
552 | | static int hf_dhcp_option_dhcp_authentication_rdm; /* 90 */ |
553 | | static int hf_dhcp_option_dhcp_authentication_rdm_replay_detection; /* 90 */ |
554 | | static int hf_dhcp_option_dhcp_authentication_rdm_rdv; /* 90 */ |
555 | | static int hf_dhcp_option_dhcp_authentication_secret_id; /* 90 */ |
556 | | static int hf_dhcp_option_dhcp_authentication_hmac_md5_hash; /* 90 */ |
557 | | static int hf_dhcp_option_dhcp_authentication_information; /* 90 */ |
558 | | static int hf_dhcp_option_client_last_transaction_time; /* 91 */ |
559 | | static int hf_dhcp_option_associated_ip_option; /* 92 */ |
560 | | static int hf_dhcp_option_client_system_architecture; /* 93 */ |
561 | | static int hf_dhcp_option_client_network_id_major_ver; /* 94 */ |
562 | | static int hf_dhcp_option_client_network_id_minor_ver; /* 94 */ |
563 | | static int hf_dhcp_option_civic_location_what; /* 99 */ |
564 | | static int hf_dhcp_option_civic_location_country; /* 99 */ |
565 | | static int hf_dhcp_option_civic_location_ca_type; /* 99 */ |
566 | | static int hf_dhcp_option_civic_location_ca_length; /* 99 */ |
567 | | static int hf_dhcp_option_civic_location_ca_value; /* 99 */ |
568 | | static int hf_dhcp_option_tz_pcode; /* 100 */ |
569 | | static int hf_dhcp_option_tz_tcode; /* 101 */ |
570 | | static int hf_dhcp_option_ipv6_only_preferred_wait_time; /* 108 */ |
571 | | static int hf_dhcp_option_netinfo_parent_server_address; /* 112 */ |
572 | | static int hf_dhcp_option_netinfo_parent_server_tag; /* 113 */ |
573 | | static int hf_dhcp_option_captive_portal; /* 114 (ex 160) */ |
574 | | static int hf_dhcp_option_dhcp_auto_configuration; /* 116 */ |
575 | | static int hf_dhcp_option_dhcp_name_service_search_option; /* 117 */ |
576 | | static int hf_dhcp_option_dhcp_dns_domain_search_list_fqdn; /* 119 */ |
577 | | static int hf_dhcp_option_sip_server_enc; /* 120 */ |
578 | | static int hf_dhcp_option_sip_server_name; /* 120 */ |
579 | | static int hf_dhcp_option_sip_server_address; /* 120 */ |
580 | | static int hf_dhcp_option_classless_static_route; /* 120 */ |
581 | | static int hf_dhcp_option_rfc3825_error; /* 123 */ |
582 | | static int hf_dhcp_option_rfc3825_latitude; /* 123 */ |
583 | | static int hf_dhcp_option_rfc3825_longitude; /* 123 */ |
584 | | static int hf_dhcp_option_rfc3825_latitude_res; /* 123 */ |
585 | | static int hf_dhcp_option_rfc3825_longitude_res; /* 123 */ |
586 | | static int hf_dhcp_option_rfc3825_altitude; /* 123 */ |
587 | | static int hf_dhcp_option_rfc3825_altitude_res; /* 123 */ |
588 | | static int hf_dhcp_option_rfc3825_altitude_type; /* 123 */ |
589 | | static int hf_dhcp_option_rfc3825_map_datum; /* 123 */ |
590 | | static int hf_dhcp_option_cl_dss_id_option; /* 123 CL */ |
591 | | static int hf_dhcp_option_cl_dss_id_len; /* 123 CL */ |
592 | | static int hf_dhcp_option_cl_dss_id; /* 123 CL */ |
593 | | static int hf_dhcp_option_vi_class_cl_address_mode; /* 124 */ |
594 | | static int hf_dhcp_option_vi_class_enterprise; /* 124 */ |
595 | | static int hf_dhcp_option_vi_class_data_length; /* 124 */ |
596 | | static int hf_dhcp_option_vi_class_data_item_length; /* 124 */ |
597 | | static int hf_dhcp_option_vi_class_data_item_data; /* 124 */ |
598 | | |
599 | | static int hf_dhcp_option125_enterprise; |
600 | | static int hf_dhcp_option125_length; |
601 | | static int hf_dhcp_option125_value; /* 125 suboption value */ |
602 | | static int hf_dhcp_option125_value_8; /* 125 suboption value */ |
603 | | static int hf_dhcp_option125_value_16; /* 125 suboption value */ |
604 | | static int hf_dhcp_option125_value_ip_address; /* 125 suboption value */ |
605 | | static int hf_dhcp_option125_value_stringz; /* 125 suboption value */ |
606 | | static int hf_dhcp_option125_tr111_suboption; /* 125 suboption */ |
607 | | static int hf_dhcp_option125_tr111_device_manufacturer_oui; /* 125:TR-111 1 */ |
608 | | static int hf_dhcp_option125_tr111_device_serial_number; /* 125:TR-111 2 */ |
609 | | static int hf_dhcp_option125_tr111_device_product_class; /* 125:TR-111 3 */ |
610 | | static int hf_dhcp_option125_tr111_gateway_manufacturer_oui; /* 125:TR-111 4 */ |
611 | | static int hf_dhcp_option125_tr111_gateway_serial_number; /* 125:TR-111 5 */ |
612 | | static int hf_dhcp_option125_tr111_gateway_product_class; /* 125:TR-111 6 */ |
613 | | static int hf_dhcp_option125_cl_suboption; /* 125 suboption */ |
614 | | static int hf_dhcp_option125_cl_option_request; /* 125:CL 1 */ |
615 | | static int hf_dhcp_option125_cl_tftp_server_addresses; /* 125:CL 2 */ |
616 | | static int hf_dhcp_option125_cl_erouter_container_option; /* 125:CL 3 */ |
617 | | static int hf_dhcp_option125_cl_mib_environment_indicator_option; /* 125:CL 4 */ |
618 | | static int hf_dhcp_option125_cl_modem_capabilities; /* 125:CL 5 */ |
619 | | |
620 | | static int hf_dhcp_option_subnet_selection_option; /* 118 */ |
621 | | static int hf_dhcp_option_pana_agent; /* 136 */ |
622 | | static int hf_dhcp_option_lost_server_domain_name; /* 137 */ |
623 | | static int hf_dhcp_option_capwap_access_controller; /* 138 */ |
624 | | static int hf_dhcp_option_andsf_server; /* 142 */ |
625 | | static int hf_dhcp_option_forcerenew_nonce_algo; /* 145 */ |
626 | | static int hf_dhcp_option_rdnss_reserved; /* 146 */ |
627 | | static int hf_dhcp_option_rdnss_pref; /* 146 */ |
628 | | static int hf_dhcp_option_rdnss_prim_dns_server; /* 146 */ |
629 | | static int hf_dhcp_option_rdnss_sec_dns_server; /* 146 */ |
630 | | static int hf_dhcp_option_rdnss_domain; /* 146 */ |
631 | | static int hf_dhcp_option_dots_ri; /* 147 */ |
632 | | static int hf_dhcp_option_dots_address; /* 148 */ |
633 | | static int hf_dhcp_option_tftp_server_address; /* 150 */ |
634 | | static int hf_dhcp_option_bulk_lease_status_code; /* 151 */ |
635 | | static int hf_dhcp_option_bulk_lease_status_message; /* 151 */ |
636 | | static int hf_dhcp_option_bulk_lease_base_time; /* 152 */ |
637 | | static int hf_dhcp_option_bulk_lease_start_time_of_state; /* 153 */ |
638 | | static int hf_dhcp_option_bulk_lease_query_start; /* 154 */ |
639 | | static int hf_dhcp_option_bulk_lease_query_end; /* 155 */ |
640 | | static int hf_dhcp_option_bulk_lease_dhcp_state; /* 156 */ |
641 | | static int hf_dhcp_option_bulk_lease_data_source; /* 157 */ |
642 | | static int hf_dhcp_option_pcp_list_length; /* 158 */ |
643 | | static int hf_dhcp_option_pcp_server; /* 158 */ |
644 | | static int hf_dhcp_option_portparams_offset; /* 159 */ |
645 | | static int hf_dhcp_option_portparams_psid_length; /* 159 */ |
646 | | static int hf_dhcp_option_portparams_psid; /* 159 */ |
647 | | static int hf_dhcp_option_mudurl; /* 161 */ |
648 | | static int hf_dhcp_dnr_instance; /* 162 */ |
649 | | static int hf_dhcp_dnr_instance_len; /* 162 */ |
650 | | static int hf_dhcp_dnr_svcpriority; /* 162 */ |
651 | | static int hf_dhcp_dnr_auth_domain_name_len; /* 162 */ |
652 | | static int hf_dhcp_dnr_auth_domain_name; /* 162 */ |
653 | | static int hf_dhcp_dnr_addrs_len; /* 162 */ |
654 | | static int hf_dhcp_dnr_addrs; /* 162 */ |
655 | | static int hf_dhcp_dnr_addrs_ip; /* 162 */ |
656 | | static int hf_dhcp_option_pxe_config_file; /* 209 */ |
657 | | static int hf_dhcp_option_pxe_path_prefix; /* 210 */ |
658 | | static int hf_dhcp_option_pxe_reboot_time; /* 211 */ |
659 | | static int hf_dhcp_option_6RD_ipv4_mask_len; /* 212 */ |
660 | | static int hf_dhcp_option_6RD_prefix_len; /* 212 */ |
661 | | static int hf_dhcp_option_6RD_prefix; /* 212 */ |
662 | | static int hf_dhcp_option_6RD_border_relay_ip; /* 212 */ |
663 | | static int hf_dhcp_option242_avaya; /* 242 */ |
664 | | static int hf_dhcp_option242_avaya_tlssrvr; /* 242 */ |
665 | | static int hf_dhcp_option242_avaya_httpsrvr; /* 242 */ |
666 | | static int hf_dhcp_option242_avaya_httpdir; /* 242 */ |
667 | | static int hf_dhcp_option242_avaya_static; /* 242 */ |
668 | | static int hf_dhcp_option242_avaya_mcipadd; /* 242 */ |
669 | | static int hf_dhcp_option242_avaya_dot1x; /* 242 */ |
670 | | static int hf_dhcp_option242_avaya_icmpdu; /* 242 */ |
671 | | static int hf_dhcp_option242_avaya_icmpred; /* 242 */ |
672 | | static int hf_dhcp_option242_avaya_l2q; /* 242 */ |
673 | | static int hf_dhcp_option242_avaya_l2qvlan; /* 242 */ |
674 | | static int hf_dhcp_option242_avaya_loglocal; /* 242 */ |
675 | | static int hf_dhcp_option242_avaya_phy1stat; /* 242 */ |
676 | | static int hf_dhcp_option242_avaya_phy2stat; /* 242 */ |
677 | | static int hf_dhcp_option242_avaya_procpswd; /* 242 */ |
678 | | static int hf_dhcp_option242_avaya_procstat; /* 242 */ |
679 | | static int hf_dhcp_option242_avaya_snmpadd; /* 242 */ |
680 | | static int hf_dhcp_option242_avaya_snmpstring; /* 242 */ |
681 | | static int hf_dhcp_option242_avaya_vlantest; /* 242 */ |
682 | | static int hf_dhcp_option_private_proxy_autodiscovery; /* 252 */ |
683 | | static int hf_dhcp_option_end; /* 255 */ |
684 | | static int hf_dhcp_option_end_overload; /* 255 (with overload)*/ |
685 | | static int hf_dhcp_vendor_unknown_suboption; |
686 | | static int hf_dhcp_suboption_data; |
687 | | static int hf_dhcp_pc_ietf_ccc_suboption; |
688 | | static int hf_dhcp_pc_i05_ccc_suboption; |
689 | | |
690 | | static int hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout; |
691 | | static int hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_timeout; |
692 | | static int hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_retries; |
693 | | static int hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout; |
694 | | static int hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_timeout; |
695 | | static int hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_retries; |
696 | | |
697 | | static int ett_dhcp; |
698 | | static int ett_dhcp_flags; |
699 | | static int ett_dhcp_option; |
700 | | static int ett_dhcp_option43_suboption; |
701 | | static int ett_dhcp_option43_suboption_discovery; |
702 | | static int ett_dhcp_option43_suboption_tree; |
703 | | static int ett_dhcp_option63_suboption; |
704 | | static int ett_dhcp_option77_instance; |
705 | | static int ett_dhcp_option82_suboption; |
706 | | static int ett_dhcp_option82_suboption9; |
707 | | static int ett_dhcp_option124_vendor_class_data_item; |
708 | | static int ett_dhcp_option125_suboption; |
709 | | static int ett_dhcp_option125_tr111_suboption; |
710 | | static int ett_dhcp_option125_cl_suboption; |
711 | | static int ett_dhcp_option242_suboption; |
712 | | static int ett_dhcp_fqdn; |
713 | | static int ett_dhcp_fqdn_flags; |
714 | | static int ett_dhcp_filename_option; |
715 | | static int ett_dhcp_server_hostname; |
716 | | static int ett_dhcp_isns_functions; |
717 | | static int ett_dhcp_isns_discovery_domain_access; |
718 | | static int ett_dhcp_isns_administrative_flags; |
719 | | static int ett_dhcp_isns_server_security_bitmap; |
720 | | static int ett_dhcp_isns_secondary_server_addr; |
721 | | static int ett_dhcp_o43_bsdp_boot_image; |
722 | | static int ett_dhcp_o43_bsdp_attributes; |
723 | | static int ett_dhcp_o43_bsdp_image_desc_list; |
724 | | static int ett_dhcp_o43_bsdp_image_desc; |
725 | | static int ett_dhcp_o43_bsdp_attributes_flags; |
726 | | static int ett_dhcp_option158_pcp_list; |
727 | | static int ett_dhcp_dnr_instance; |
728 | | static int ett_dhcp_dnr_instance_addrs; |
729 | | |
730 | | static expert_field ei_dhcp_bad_length; |
731 | | static expert_field ei_dhcp_bad_bitfield; |
732 | | static expert_field ei_dhcp_missing_subopt_length; |
733 | | static expert_field ei_dhcp_missing_subopt_value; |
734 | | static expert_field ei_dhcp_mal_duid; |
735 | | static expert_field ei_dhcp_rfc3396_refer_last_option; |
736 | | static expert_field ei_dhcp_opt_overload_wrong_field; |
737 | | static expert_field ei_dhcp_opt_overload_file_end_missing; |
738 | | static expert_field ei_dhcp_opt_overload_sname_end_missing; |
739 | | static expert_field ei_dhcp_subopt_unknown_type; |
740 | | static expert_field ei_dhcp_option_civic_location_bad_cattype; |
741 | | static expert_field ei_dhcp_option_dhcp_name_service_invalid; |
742 | | static expert_field ei_dhcp_option_sip_server_address_encoding; |
743 | | static expert_field ei_dhcp_option_classless_static_route; |
744 | | static expert_field ei_dhcp_option125_enterprise_malformed; |
745 | | static expert_field ei_dhcp_option_6RD_malformed; |
746 | | static expert_field ei_dhcp_option82_vi_cl_tag_unknown; |
747 | | static expert_field ei_dhcp_option_parse_err; |
748 | | static expert_field ei_dhcp_nonstd_option_data; |
749 | | static expert_field ei_dhcp_suboption_invalid; |
750 | | static expert_field ei_dhcp_secs_le; |
751 | | static expert_field ei_dhcp_end_option_missing; |
752 | | static expert_field ei_dhcp_client_address_not_given; |
753 | | static expert_field ei_dhcp_server_name_overloaded_by_dhcp; |
754 | | static expert_field ei_dhcp_boot_filename_overloaded_by_dhcp; |
755 | | static expert_field ei_dhcp_option_isns_ignored_bitfield; |
756 | | static expert_field ei_dhcp_option242_avaya_l2qvlan_invalid; |
757 | | static expert_field ei_dhcp_option242_avaya_vlantest_invalid; |
758 | | static expert_field ei_dhcp_option93_client_arch_ambiguous; |
759 | | static expert_field ei_dhcp_option_dnr_adn_only_mode; |
760 | | |
761 | | static dissector_table_t dhcp_option_table; |
762 | | static dissector_table_t dhcp_enterprise_class_table; |
763 | | static dissector_table_t dhcp_enterprise_specific_table; |
764 | | static heur_dissector_list_t dhcp_vendor_id_subdissector; |
765 | | static heur_dissector_list_t dhcp_vendor_info_subdissector; |
766 | | static dissector_handle_t dhcp_handle; |
767 | | static dissector_handle_t dhcpopt_basic_handle; |
768 | | static dissector_handle_t svc_params_handle; |
769 | | |
770 | | typedef struct dhcp_option_data |
771 | | { |
772 | | unsigned char option; |
773 | | uint8_t *overload; |
774 | | const char *dhcp_type; |
775 | | const uint8_t *vendor_class_id; |
776 | | } dhcp_option_data_t; |
777 | | |
778 | 64 | #define DHCP_HW_IS_ETHER(hwtype, length) ((hwtype == 1 || hwtype == 6) && length == 6) |
779 | | |
780 | | /* RFC2937 The Name Service Search Option for DHCP */ |
781 | 530 | #define RFC2937_LOCAL_NAMING_INFORMATION 0 |
782 | 85 | #define RFC2937_DOMAIN_NAME_SERVER_OPTION 6 |
783 | 114 | #define RFC2937_NETWORK_INFORMATION_SERVERS_OPTION 41 |
784 | 96 | #define RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION 44 |
785 | 127 | #define RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION 65 |
786 | | |
787 | | /* RFC3825decoder error codes of the conversion function */ |
788 | 72 | #define RFC3825_NOERROR 0 |
789 | 4 | #define RFC3825_LATITUDE_OUTOFRANGE 1 |
790 | 1 | #define RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE 2 |
791 | 6 | #define RFC3825_LONGITUDE_OUTOFRANGE 3 |
792 | 3 | #define RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE 4 |
793 | 1 | #define RFC3825_ALTITUDE_OUTOFRANGE 5 |
794 | 6 | #define RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE 6 |
795 | 10 | #define RFC3825_ALTITUDE_TYPE_OUTOFRANGE 7 |
796 | 15 | #define RFC3825_DATUM_TYPE_OUTOFRANGE 8 |
797 | | |
798 | 33 | #define DUID_LLT 1 |
799 | 8 | #define DUID_EN 2 |
800 | 33 | #define DUID_LL 3 |
801 | | |
802 | | struct rfc3825_location_fixpoint_t { |
803 | | |
804 | | int64_t latitude; /* latitude in degrees, allowed range from -90deg to 90deg. |
805 | | Fixpoint A(8,25) with 34 bits */ |
806 | | uint8_t latitude_res; /* the resolution of the latitude in bits, allowed range is from 0 to 34. |
807 | | 6 bits. */ |
808 | | int64_t longitude; /* longitude in degrees, range from -180deg to 180deg. |
809 | | Fixpoint A(8,25) with 34 bits */ |
810 | | uint8_t longitude_res; /* the resolution of the longitude in bits, allowed range is from 0 to 34. |
811 | | 6 bits. */ |
812 | | int32_t altitude; /* the altitude, 30 bits. |
813 | | Depending on alt_type this are meters or floors, no range limit. |
814 | | altitude_type==1: A(13,8) with 22 bits |
815 | | altitude_type==2: A(13,8) with 22 bits */ |
816 | | uint8_t altitude_res; /* the resolution of the altitude in bits, allowed range is from 0 to 30. |
817 | | 6 bits. |
818 | | altitude_type==1: any value between 0 and 30 |
819 | | altitude_type==2: either 0 (floor unknown) or 30 */ |
820 | | uint8_t altitude_type; /* the type of the altitude, 4 bits. allowed values are: |
821 | | 0: unknown |
822 | | 1: altitude in meters |
823 | | 2: altitude in floors */ |
824 | | uint8_t datum_type; /* the map datum used for the coordinates. 8 bits. |
825 | | All values are allowed although currently only the |
826 | | following ones are defined: |
827 | | 1: WGS84 |
828 | | 2: NAD83/NAVD88 |
829 | | 3: NAD83/MLLW */ |
830 | | }; |
831 | | |
832 | | /* The rfc3825_location_decimal_t structure holds the location parameters |
833 | | * in decimal (floating point) format. |
834 | | */ |
835 | | struct rfc3825_location_decimal_t { |
836 | | |
837 | | double latitude; /* latitude in degrees, allowed range from -90deg to 90deg */ |
838 | | double latitude_res; /* the uncertainty of the latitude in grad, "0.01" means +-0.01deg |
839 | | from the altitude. During conversion this will be rounded to |
840 | | next smaller value which can be represented in fixpoint arithmetic */ |
841 | | double longitude; /* longitude in degrees, range from -180deg to 180deg */ |
842 | | double longitude_res; /* the uncertainty of the longitude in grad, "0.01" means +-0.01deg |
843 | | from the longitude. During conversion this will be rounded to |
844 | | next smaller value which can be represented in fixpoint arithmetic */ |
845 | | double altitude; /* the altitude, depending on alt_type this are meters or floors, no range limit */ |
846 | | double altitude_res; /* the uncertainty of the altitude in either: |
847 | | - altitude-type=meters: "10" means 10 meters which means +-10 meters from the altitude |
848 | | - altitude-type=floors: either 0 (unknown) or 30 (exact) */ |
849 | | int altitude_type; /* the type of the altitude, allowed values are |
850 | | 0: unknown |
851 | | 1: altitude in meters |
852 | | 2: altitude in floors */ |
853 | | int datum_type; /* the map datum used for the coordinates. |
854 | | All values are allowed although currently only the |
855 | | following ones are defined: |
856 | | 1: WGS84 |
857 | | 2: NAD83/NAVD88 |
858 | | 3: NAD83/MLLW */ |
859 | | }; |
860 | | |
861 | | /* For managing split options with RFC 3396 */ |
862 | | struct rfc3396_for_option_t { |
863 | | unsigned int total_number_of_block; |
864 | | unsigned int index_current_block; |
865 | | tvbuff_t* tvb_composite; |
866 | | }; |
867 | | |
868 | | enum { |
869 | | RFC_3361_ENC_FQDN, |
870 | | RFC_3361_ENC_IPADDR |
871 | | }; |
872 | | |
873 | | static void dissect_vendor_avaya_param(proto_tree *tree, packet_info *pinfo, proto_item *vti, |
874 | | tvbuff_t *tvb, int optoff, wmem_strbuf_t *avaya_param_buf); |
875 | | |
876 | | /* converts fixpoint presentation into decimal presentation |
877 | | also converts values which are out of range to allow decoding of received data */ |
878 | | static int rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t *fixpoint, struct rfc3825_location_decimal_t *decimal); |
879 | | |
880 | | /* decodes the LCI string received from DHCP into the fixpoint values */ |
881 | | static void rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fixpoint_t *fixpoint); |
882 | | |
883 | | |
884 | | /* Map Datum Types used for the coordinates (RFC 3825) */ |
885 | | static const value_string map_datum_type_values[] = { |
886 | | { 1, "WGS 84" }, |
887 | | { 2, "NAD83 (NAVD88)" }, |
888 | | { 3, "NAD83 (MLLW)" }, |
889 | | { 0, NULL } |
890 | | }; |
891 | | |
892 | | |
893 | | /* Altitude Types used for the coordinates (RFC 3825) */ |
894 | | static const value_string altitude_type_values[] = { |
895 | | { 1, "Meters" }, |
896 | | { 2, "Floors" }, |
897 | | { 0, NULL } |
898 | | }; |
899 | | |
900 | | /* AutoConfigure (RFC 2563) */ |
901 | | static const value_string dhcp_autoconfig[] = { |
902 | | { 0, "DoNotAutoConfigure"}, |
903 | | { 1, "AutoConfigure"}, |
904 | | { 0, NULL } |
905 | | }; |
906 | | |
907 | | /* Error Types for RFC 3825 coordinate location decoding */ |
908 | | static const value_string rfc3825_error_types[] = { |
909 | | { 1, "Latitude is out of range [-90,90]"}, |
910 | | { 2, "Latitude Uncertainty is out of range [0,90]"}, |
911 | | { 3, "Longitude is out of range [-180,180]"}, |
912 | | { 4, "Longitude Uncertainty is out of range [0,180]"}, |
913 | | { 5, "Altitude is out of range [-(2^21),(2^21)-1]"}, |
914 | | { 6, "Altitude Uncertainty is out of range [0,2^20]"}, |
915 | | { 7, "Altitude Type is out of range [0,2]"}, |
916 | | { 8, "Datum is out of range [1,3]"}, |
917 | | { 0, NULL } |
918 | | }; |
919 | | |
920 | | |
921 | | |
922 | | /* Civic Address What field (RFC 4776) */ |
923 | | static const value_string civic_address_what_values[] = { |
924 | | { 0, "Location of the DHCP server" }, |
925 | | { 1, "Location of the network element believed to be closest to the client" }, |
926 | | { 2, "Location of the client"}, |
927 | | { 0, NULL} |
928 | | }; |
929 | | |
930 | | /* Civic Address Type field (RFC 4119, RFC 4776, RFC 5139) */ |
931 | | static const value_string civic_address_type_values[] = { |
932 | | { 0, "Language" }, |
933 | | { 1, "A1" }, |
934 | | { 2, "A2" }, |
935 | | { 3, "A3" }, |
936 | | { 4, "A4" }, |
937 | | { 5, "A5" }, |
938 | | { 6, "A6" }, |
939 | | { 16, "PRD (Leading street direction)" }, |
940 | | { 17, "POD (Trailing street suffix)" }, |
941 | | { 18, "STS (Street suffix)" }, |
942 | | { 19, "HNO (House number)" }, |
943 | | { 20, "HNS (House number suffix)" }, |
944 | | { 21, "LMK (Landmark or vanity address)" }, |
945 | | { 22, "LOC (Additional location information)" }, |
946 | | { 23, "NAM" }, |
947 | | { 24, "PC (Postal/ZIP code)" }, |
948 | | { 25, "BLD (Building)" }, |
949 | | { 26, "UNIT" }, |
950 | | { 27, "FLR (Floor)" }, |
951 | | { 28, "ROOM" }, |
952 | | { 29, "PLC (Place-type)" }, |
953 | | { 30, "PCN (Postal community name)" }, |
954 | | { 31, "POBOX" }, |
955 | | { 32, "ADDCODE (Additional Code)" }, |
956 | | { 33, "SEAT" }, |
957 | | { 34, "RD (Primary road or street)" }, |
958 | | { 35, "RDSEC (Road section)" }, |
959 | | { 36, "RDBR (Road branch)" }, |
960 | | { 37, "RDSUBBR (Road sub-branch)" }, |
961 | | { 38, "PRM (Road pre-modifier)" }, |
962 | | { 39, "POM (Road post-modifier" }, |
963 | | { 128, "Script" }, |
964 | | { 0, NULL } |
965 | | }; |
966 | | |
967 | | static const value_string cablelab_ipaddr_mode_vals[] = { |
968 | | { 1, "IPv4" }, |
969 | | { 2, "IPv6" }, |
970 | | { 0, NULL } |
971 | | }; |
972 | | |
973 | | static const value_string duidtype_vals[] = |
974 | | { |
975 | | { DUID_LLT, "link-layer address plus time" }, |
976 | | { DUID_EN, "assigned by vendor based on Enterprise number" }, |
977 | | { DUID_LL, "link-layer address" }, |
978 | | { 0, NULL } |
979 | | }; |
980 | | |
981 | | static const value_string forcerenew_nonce_algo_vals[] = { |
982 | | { 1, "HMAC-MD5" }, |
983 | | { 0, NULL }, |
984 | | }; |
985 | | |
986 | | static const value_string rdnss_pref_vals[] = { |
987 | | { 0, "Medium" }, |
988 | | { 1, "High" }, |
989 | | { 2, "Reserved" }, |
990 | | { 3, "Low" }, |
991 | | { 0, NULL }, |
992 | | }; |
993 | | |
994 | | static const value_string bulk_lease_dhcp_status_code_vals[] = { |
995 | | { 0, "Success" }, |
996 | | { 1, "UpsecFail" }, |
997 | | { 2, "QueryTerminated" }, |
998 | | { 3, "MalformedQuery" }, |
999 | | { 4, "NotAllowed" }, |
1000 | | { 5, "DataMissing" }, |
1001 | | { 6, "ConnectionActive" }, |
1002 | | { 7, "CatchUpComplete" }, |
1003 | | { 8, "TLSConnectionRefused" }, |
1004 | | { 0, NULL }, |
1005 | | }; |
1006 | | |
1007 | | static const value_string bulk_lease_dhcp_state_vals[] = { |
1008 | | { 1, "Available" }, |
1009 | | { 2, "Active" }, |
1010 | | { 3, "Expired" }, |
1011 | | { 4, "Released" }, |
1012 | | { 5, "Abandoned" }, |
1013 | | { 6, "Reset" }, |
1014 | | { 7, "Remote" }, |
1015 | | { 8, "Transitioning" }, |
1016 | | { 0, NULL }, |
1017 | | }; |
1018 | | |
1019 | | static const value_string o43pxeclient_boot_server_types[] = { |
1020 | | { 0, "PXE bootstrap server" }, |
1021 | | { 1, "Microsoft Windows NT Boot Server" }, |
1022 | | { 2, "Intel LCM Boot Server" }, |
1023 | | { 3, "DOS/UNDI Boot Server" }, |
1024 | | { 4, "NEC ESMPRO Boot Server" }, |
1025 | | { 5, "IBM WSoD Boot Server" }, |
1026 | | { 6, "IBM LCCM Boot Server" }, |
1027 | | { 7, "CA Unicenter TNG Boot Server" }, |
1028 | | { 8, "HP OpenView Boot Server" }, |
1029 | | { 65535, "PXE API Test server" }, |
1030 | | { 0, NULL }, |
1031 | | }; |
1032 | | |
1033 | | static const value_string o43pxeclient_boot_menu_types[] = { |
1034 | | { 0, "Local boot" }, |
1035 | | { 0, NULL }, |
1036 | | }; |
1037 | | |
1038 | | static bool novell_string; |
1039 | | |
1040 | | static int dhcp_uuid_endian = ENC_LITTLE_ENDIAN; |
1041 | | |
1042 | | static const enum_val_t dhcp_uuid_endian_vals[] = { |
1043 | | { "LE", "Little Endian", ENC_LITTLE_ENDIAN}, |
1044 | | { "BE", "Big Endian", ENC_BIG_ENDIAN }, |
1045 | | { NULL, NULL, 0 } |
1046 | | }; |
1047 | | |
1048 | 4.79k | #define DHCP_SECS_ENDIAN_AUTODETECT -1 |
1049 | | |
1050 | | static int dhcp_secs_endian = DHCP_SECS_ENDIAN_AUTODETECT; |
1051 | | |
1052 | | static const enum_val_t dhcp_secs_endian_vals[] = { |
1053 | | { "Autodetect", "Autodetect", DHCP_SECS_ENDIAN_AUTODETECT}, |
1054 | | { "LE", "Little Endian", ENC_LITTLE_ENDIAN}, |
1055 | | { "BE", "Big Endian", ENC_BIG_ENDIAN }, |
1056 | | { NULL, NULL, 0 } |
1057 | | }; |
1058 | | |
1059 | 14 | #define DHCP_UDP_PORT_RANGE "67-68,4011" |
1060 | 14.5k | #define PROXYDHCP_UDP_PORT 4011 |
1061 | | |
1062 | 4.81k | #define BOOTP_BC 0x8000 |
1063 | 14 | #define BOOTP_MBZ 0x7FFF |
1064 | | |
1065 | | /* FQDN stuff */ |
1066 | 14 | #define F_FQDN_S 0x01 |
1067 | 14 | #define F_FQDN_O 0x02 |
1068 | 26 | #define F_FQDN_E 0x04 |
1069 | 14 | #define F_FQDN_N 0x08 |
1070 | 14 | #define F_FQDN_MBZ 0xf0 |
1071 | | |
1072 | | #define ISNS_BITFIELD_NZ_MUST_BE_IGNORED(mask, ena_flag) \ |
1073 | 392 | ((mask) && !((mask) & (ena_flag))) |
1074 | | |
1075 | | /* iSNS bit fields */ |
1076 | 14 | #define F_ISNS_FUNCTIONS_ENABLED 0x0001 |
1077 | 14 | #define F_ISNS_FUNCTIONS_DD_AUTH 0x0002 |
1078 | 14 | #define F_ISNS_FUNCTIONS_SEC_POLICY 0x0004 |
1079 | 14 | #define F_ISNS_FUNCTIONS_RESERVED 0xFFF8 |
1080 | | |
1081 | 14 | #define F_ISNS_DD_ACCESS_ENABLED 0x0001 |
1082 | 14 | #define F_ISNS_DD_ACCESS_CTRL_NODE 0x0002 |
1083 | 14 | #define F_ISNS_DD_ACCESS_ISCSI_TARGET 0x0004 |
1084 | 14 | #define F_ISNS_DD_ACCESS_ISCSI_INITIATOR 0x0008 |
1085 | 14 | #define F_ISNS_DD_ACCESS_IFCP_TARGET_PORT 0x0010 |
1086 | 14 | #define F_ISNS_DD_ACCESS_IFCP_INITIATOR_PORT 0x0020 |
1087 | 14 | #define F_ISNS_DD_ACCESS_RESERVED 0xFFC0 |
1088 | | |
1089 | 114 | #define F_ISNS_ADMIN_FLAGS_ENABLED 0x0001 |
1090 | 81 | #define F_ISNS_ADMIN_FLAGS_HEARTBEAT 0x0002 |
1091 | 14 | #define F_ISNS_ADMIN_FLAGS_MANAGEMENT_SCNS 0x0004 |
1092 | 14 | #define F_ISNS_ADMIN_FLAGS_DEFAULT_DD 0x0008 |
1093 | 14 | #define F_ISNS_ADMIN_FLAGS_RESERVED 0xFFF0 |
1094 | | |
1095 | 14 | #define F_ISNS_SRV_SEC_BITMAP_ENABLED 0x0001 |
1096 | 14 | #define F_ISNS_SRV_SEC_BITMAP_IKE_IPSEC 0x0002 |
1097 | 14 | #define F_ISNS_SRV_SEC_BITMAP_MAIN_MODE 0x0004 |
1098 | 14 | #define F_ISNS_SRV_SEC_BITMAP_AGGRESSIVE 0x0008 |
1099 | 14 | #define F_ISNS_SRV_SEC_BITMAP_PFS 0x0010 |
1100 | 14 | #define F_ISNS_SRV_SEC_BITMAP_TRASPORT_MODE 0x0020 |
1101 | 14 | #define F_ISNS_SRV_SEC_BITMAP_TUNNEL_MODE 0x0040 |
1102 | 14 | #define F_ISNS_SRV_SEC_BITMAP_RESERVED 0xFF80 |
1103 | | |
1104 | | |
1105 | | static const true_false_string tfs_fqdn_o = { |
1106 | | "Override", |
1107 | | "No override" |
1108 | | }; |
1109 | | |
1110 | | static const true_false_string tfs_fqdn_e = { |
1111 | | "Binary encoding", |
1112 | | "ASCII encoding" |
1113 | | }; |
1114 | | |
1115 | | static const true_false_string tfs_fqdn_n = { |
1116 | | "No server updates", |
1117 | | "Some server updates" |
1118 | | }; |
1119 | | |
1120 | | static const true_false_string tfs_isns_function_dd_based_auth = { |
1121 | | "Automatically allowed access", |
1122 | | "Explicitly performed", |
1123 | | }; |
1124 | | |
1125 | | static const true_false_string tfs_isns_functions_sec_distrib = { |
1126 | | "Download from iSNS server", |
1127 | | "By other means", |
1128 | | }; |
1129 | | |
1130 | | static const true_false_string tfs_bulk_lease_data_source = { |
1131 | | "Remote", |
1132 | | "Local" |
1133 | | }; |
1134 | | |
1135 | | enum field_type { |
1136 | | special, |
1137 | | none, |
1138 | | presence, |
1139 | | ipv4, /* single IPv4 address */ |
1140 | | ipv4_list, /* list of IPv4 addresses */ |
1141 | | string, |
1142 | | bytes, |
1143 | | opaque, |
1144 | | val_boolean, |
1145 | | val_u_byte, |
1146 | | val_u_short, |
1147 | | val_u_short_list, |
1148 | | val_u_le_short, |
1149 | | val_u_long, |
1150 | | time_in_s_secs, /* Signed */ |
1151 | | time_in_u_secs, /* Unsigned (not micro) */ |
1152 | | fqdn, |
1153 | | ipv4_or_fqdn, |
1154 | | oui |
1155 | | }; |
1156 | | |
1157 | | struct opt_info { |
1158 | | const char *text; |
1159 | | enum field_type ftype; |
1160 | | int* phf; |
1161 | | }; |
1162 | | |
1163 | | static const true_false_string flag_set_broadcast = { |
1164 | | "Broadcast", |
1165 | | "Unicast" |
1166 | | }; |
1167 | | |
1168 | | #define BOOTP_MAX_NO_CHAR 64 |
1169 | | |
1170 | | /* PacketCable/DOCSIS definitions */ |
1171 | 1.37k | #define PACKETCABLE_MTA_CAP10 "pktc1.0:" |
1172 | 1.28k | #define PACKETCABLE_MTA_CAP15 "pktc1.5:" |
1173 | 1.21k | #define PACKETCABLE_MTA_CAP20 "pktc2.0:" |
1174 | 1.13k | #define PACKETCABLE_CM_CAP11 "docsis1.1:" |
1175 | 1.12k | #define PACKETCABLE_CM_CAP20 "docsis2.0:" |
1176 | 1.07k | #define PACKETCABLE_CM_CAP30 "docsis3.0:" |
1177 | | |
1178 | 0 | #define PACKETCABLE_CCC_I05 1 |
1179 | 307 | #define PACKETCABLE_CCC_DRAFT5 2 |
1180 | 5.50k | #define PACKETCABLE_CCC_RFC_3495 3 |
1181 | | |
1182 | | static const enum_val_t pkt_ccc_protocol_versions[] = { |
1183 | | { "ccc_i05", "PKT-SP-PROV-I05-021127", PACKETCABLE_CCC_I05 }, |
1184 | | { "ccc_draft_5", "IETF Draft 5", PACKETCABLE_CCC_DRAFT5 }, |
1185 | | { "rfc_3495", "RFC 3495", PACKETCABLE_CCC_RFC_3495 }, |
1186 | | { NULL, NULL, 0 } |
1187 | | }; |
1188 | | |
1189 | 1.96k | #define APPLE_BSDP_SERVER "AAPLBSDPC" |
1190 | 2.48k | #define APPLE_BSDP_CLIENT "AAPLBSDPC/" |
1191 | | |
1192 | 1.62k | #define CISCO_VCID "cisco" |
1193 | | |
1194 | 1.59k | #define AEROHIVE_VCID "AEROHIVE" |
1195 | | |
1196 | | static int pkt_ccc_protocol_version = PACKETCABLE_CCC_RFC_3495; |
1197 | | static unsigned pkt_ccc_option = 122; |
1198 | | |
1199 | | static void dissect_docsis_cm_cap(packet_info *pinfo, proto_tree *v_tree, tvbuff_t *tvb, |
1200 | | int voff, int len, bool opt125); |
1201 | | |
1202 | 1.54k | #define ARUBA_INSTANT_AP "ArubaInstantAP" |
1203 | 1.43k | #define ARUBA_AP "ArubaAP" |
1204 | | |
1205 | 5 | #define OPT53_DISCOVER "Discover" |
1206 | | /* https://www.iana.org/assignments/bootp-dhcp-parameters */ |
1207 | | static const value_string opt53_text[] = { |
1208 | | { 1, OPT53_DISCOVER }, |
1209 | | { 2, "Offer" }, |
1210 | | { 3, "Request" }, |
1211 | | { 4, "Decline" }, |
1212 | | { 5, "ACK" }, |
1213 | | { 6, "NAK" }, |
1214 | | { 7, "Release" }, |
1215 | | { 8, "Inform" }, |
1216 | | { 9, "Force Renew" }, |
1217 | | { 10, "Lease query" }, /* RFC4388 */ |
1218 | | { 11, "Lease Unassigned" }, /* RFC4388 */ |
1219 | | { 12, "Lease Unknown" }, /* RFC4388 */ |
1220 | | { 13, "Lease Active" }, /* RFC4388 */ |
1221 | | { 14, "Bulk Lease Query" }, /* RFC6926 */ |
1222 | | { 15, "Lease Query Done" }, /* RFC6926 */ |
1223 | | { 16, "Active LeaseQuery" }, /* RFC7724 */ |
1224 | | { 17, "Lease Query Status" }, /* RFC7724 */ |
1225 | | { 18, "TLS" }, /* RFC7724 */ |
1226 | | { 0, NULL } |
1227 | | }; |
1228 | | |
1229 | | /* DHCP Authentication protocols */ |
1230 | | #define AUTHEN_PROTO_CONFIG_TOKEN 0 |
1231 | 46 | #define AUTHEN_PROTO_DELAYED_AUTHEN 1 |
1232 | | |
1233 | | /* DHCP Authentication algorithms for delayed authentication */ |
1234 | 8 | #define AUTHEN_DELAYED_ALGO_HMAC_MD5 1 |
1235 | | |
1236 | | /* DHCP Authentication Replay Detection Methods */ |
1237 | 8 | #define AUTHEN_RDM_MONOTONIC_COUNTER 0x00 |
1238 | | |
1239 | | /* DHCP Option Overload (option code 52) */ |
1240 | 9.59k | #define OPT_OVERLOAD_FILE 1 |
1241 | 9.59k | #define OPT_OVERLOAD_SNAME 2 |
1242 | | #define OPT_OVERLOAD_BOTH 3 |
1243 | | |
1244 | | /* Server name and boot file offsets and lengths */ |
1245 | 25.1k | #define SERVER_NAME_OFFSET 44 |
1246 | 16.6k | #define SERVER_NAME_LEN 64 |
1247 | 25.0k | #define FILE_NAME_OFFSET 108 |
1248 | 16.4k | #define FILE_NAME_LEN 128 |
1249 | 9.59k | #define VENDOR_INFO_OFFSET 236 |
1250 | | |
1251 | | static const value_string dhcp_nbnt_vals[] = { |
1252 | | {0x1, "B-node" }, |
1253 | | {0x2, "P-node" }, |
1254 | | {0x4, "M-node" }, |
1255 | | {0x8, "H-node" }, |
1256 | | {0, NULL } |
1257 | | }; |
1258 | | |
1259 | | /* |
1260 | | * There is confusion around some Client Architecture IDs: RFC 4578 section 2.1 |
1261 | | * lists *requested* architecture IDs, however the actual assigned IDs |
1262 | | * (https://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml#processor-architecture) |
1263 | | * differ. Specifically, |
1264 | | * |
1265 | | * EFI Byte Code (EFI BC, EBC) was 7 in RFC 4578, but is assigned 9 by IETF. |
1266 | | * EFI x64 was 9 in RFC 4578, but is assigned 7 by IETF. |
1267 | | * |
1268 | | * For confirmation, refer to RFC erratum 4624: |
1269 | | * https://www.rfc-editor.org/errata/eid4624 |
1270 | | */ |
1271 | | static const value_string dhcp_client_arch[] = { |
1272 | | { 0x0000, "IA x86 PC" }, |
1273 | | { 0x0001, "NEC/PC98" }, |
1274 | | { 0x0002, "IA64 PC" }, |
1275 | | { 0x0003, "DEC Alpha" }, |
1276 | | { 0x0004, "ArcX86" }, |
1277 | | { 0x0005, "Intel Lean Client" }, |
1278 | | { 0x0006, "EFI IA32" }, |
1279 | | { 0x0007, "EFI x64" }, /* *Not* EFI BC. See comment above. */ |
1280 | | { 0x0008, "EFI Xscale" }, |
1281 | | { 0x0009, "EFI BC" }, /* *Not* EFI x64. See comment above. */ |
1282 | | { 0x000a, "ARM 32-bit UEFI" }, |
1283 | | { 0x000b, "ARM 64-bit UEFI" }, |
1284 | | { 0x000c, "PowerPC Open Firmware" }, |
1285 | | { 0x000d, "PowerPC ePAPR" }, |
1286 | | { 0x000e, "POWER OPAL v3" }, |
1287 | | { 0x000f, "x86 UEFI HTTP" }, |
1288 | | { 0x0010, "x64 UEFI HTTP" }, |
1289 | | { 0x0011, "EBC UEFI HTTP" }, |
1290 | | { 0x0012, "ARM 32-bit UEFI HTTP" }, |
1291 | | { 0x0013, "ARM 64-bit UEFI HTTP" }, |
1292 | | { 0x0014, "PC/AT HTTP" }, |
1293 | | { 0x0015, "ARM 32-bit uboot" }, |
1294 | | { 0x0016, "ARM 64-bit uboot" }, |
1295 | | { 0x0017, "ARM 32-bit uboot HTTP" }, |
1296 | | { 0x0018, "ARM 64-bit uboot HTTP" }, |
1297 | | { 0x0019, "RISC-V 32-bit UEFI" }, |
1298 | | { 0x001a, "RISC-V 32-bit UEFI HTTP" }, |
1299 | | { 0x001b, "RISC-V 64-bit UEFI" }, |
1300 | | { 0x001c, "RISC-V 64-bit UEFI HTTP" }, |
1301 | | { 0x001d, "RISC-V 128-bit UEFI" }, |
1302 | | { 0x001e, "RISC-V 128-bit UEFI HTTP" }, |
1303 | | { 0x001f, "s390 Basic" }, |
1304 | | { 0x0020, "s390 Extended" }, |
1305 | | { 0, NULL } |
1306 | | }; |
1307 | | |
1308 | | static const value_string opt_overload_vals[] = { |
1309 | | { OPT_OVERLOAD_FILE, "Boot file name holds options", }, |
1310 | | { OPT_OVERLOAD_SNAME, "Server host name holds options", }, |
1311 | | { OPT_OVERLOAD_BOTH, "Boot file and server host names hold options" }, |
1312 | | { 0, NULL } }; |
1313 | | |
1314 | | static const value_string slpda_vals[] = { |
1315 | | {0x00, "Dynamic Discovery" }, |
1316 | | {0x01, "Static Discovery" }, |
1317 | | {0x80, "Backwards compatibility" }, |
1318 | | {0, NULL } }; |
1319 | | |
1320 | | static const value_string slp_scope_vals[] = { |
1321 | | {0x00, "Preferred Scope" }, |
1322 | | {0x01, "Mandatory Scope" }, |
1323 | | {0, NULL } }; |
1324 | | |
1325 | | static const value_string authen_protocol_vals[] = { |
1326 | | {AUTHEN_PROTO_CONFIG_TOKEN, "configuration token" }, |
1327 | | {AUTHEN_PROTO_DELAYED_AUTHEN, "delayed authentication" }, |
1328 | | {0, NULL } }; |
1329 | | |
1330 | | static const value_string authen_da_algo_vals[] = { |
1331 | | {AUTHEN_DELAYED_ALGO_HMAC_MD5, "HMAC_MD5" }, |
1332 | | {0, NULL } }; |
1333 | | |
1334 | | static const value_string authen_rdm_vals[] = { |
1335 | | {AUTHEN_RDM_MONOTONIC_COUNTER, "Monotonically-increasing counter" }, |
1336 | | {0, NULL } }; |
1337 | | |
1338 | | static const value_string cl_dss_id_type_vals[] = { |
1339 | | {1, "Primary DSS_ID" }, |
1340 | | {2, "Secondary DSS_ID" }, |
1341 | | {0, NULL } |
1342 | | }; |
1343 | | |
1344 | | static const value_string sip_server_enc_vals[] = { |
1345 | | {0, "Fully Qualified Domain Name" }, |
1346 | | {1, "IPv4 Address" }, |
1347 | | {0, NULL } |
1348 | | }; |
1349 | | |
1350 | | static const value_string o43_bsdp_boot_image_install_vals[] = { |
1351 | | { 0, "non-install" }, |
1352 | | { 1, "install" }, |
1353 | | { 0, NULL } |
1354 | | }; |
1355 | | |
1356 | | static const value_string o43_bsdp_boot_image_kind_vals[] = { |
1357 | | { 0, "Mac OS 9" }, |
1358 | | { 1, "Mac OS X" }, |
1359 | | { 2, "Mac OS X Server" }, |
1360 | | { 3, "Hardware Diagnostics" }, |
1361 | | { 0, NULL } |
1362 | | }; |
1363 | | |
1364 | | static const value_string o43_bsdp_message_type_vals[] = { |
1365 | | { 1, "LIST" }, |
1366 | | { 2, "SELECT" }, |
1367 | | { 3, "FAILED" }, |
1368 | | { 0, NULL } |
1369 | | }; |
1370 | | |
1371 | | static const string_string option242_avaya_phystat_vals[] = { |
1372 | | { "0", "Disabled" }, |
1373 | | { "1", "Auto" }, |
1374 | | { "2", "10Mbps half" }, |
1375 | | { "3", "10Mbps full" }, |
1376 | | { "4", "100Mbps half" }, |
1377 | | { "5", "100Mbps full" }, |
1378 | | { "6", "1000Mbps full" }, |
1379 | | { NULL, NULL } |
1380 | | }; |
1381 | | |
1382 | | static const string_string option242_avaya_l2q_vals[] = { |
1383 | | { "0", "Auto" }, |
1384 | | { "1", "Enabled" }, |
1385 | | { "2", "Disabled" }, |
1386 | | { NULL, NULL } |
1387 | | }; |
1388 | | |
1389 | | static const string_string option242_avaya_dot1x_vals[] = { |
1390 | | { "0", "With PAE pass-through" }, |
1391 | | { "1", "With PAE pass-through and proxy Logoff" }, |
1392 | | { "2", "Without PAE pass-through or proxy Logoff" }, |
1393 | | { NULL, NULL } |
1394 | | }; |
1395 | | |
1396 | | static const string_string option242_avaya_icmpdu_vals[] = { |
1397 | | { "0", "No ICMP Destination Unreachable messages" }, |
1398 | | { "1", "Send limited Port Unreachable messages" }, |
1399 | | { "2", "Send Protocol and Port Unreachable messages" }, |
1400 | | { NULL, NULL } |
1401 | | }; |
1402 | | |
1403 | | static const string_string option242_avaya_icmpred_vals[] = { |
1404 | | { "0", "Ignore ICMP Redirect messages" }, |
1405 | | { "1", "Process ICMP Redirect messages" }, |
1406 | | { NULL, NULL } |
1407 | | }; |
1408 | | |
1409 | | static const string_string option242_avaya_loglocal_vals[] = { |
1410 | | { "0", "Disabled" }, |
1411 | | { "1", "Emergency" }, |
1412 | | { "2", "Alerts" }, |
1413 | | { "3", "Critical" }, |
1414 | | { "4", "Errors" }, |
1415 | | { "5", "Warnings" }, |
1416 | | { "6", "Notices" }, |
1417 | | { "7", "Information" }, |
1418 | | { "8", "Debug" }, |
1419 | | { NULL, NULL } |
1420 | | }; |
1421 | | |
1422 | | static const string_string option242_avaya_procstat_vals[] = { |
1423 | | { "0", "All administrative options" }, |
1424 | | { "1", "Only view administrative options" }, |
1425 | | { NULL, NULL } |
1426 | | }; |
1427 | | |
1428 | | static const string_string option242_avaya_static_vals[] = { |
1429 | | { "0", "Static programming never overrides call server (DHCP) or call server administered data" }, |
1430 | | { "1", "Static programming overrides only file server administered data" }, |
1431 | | { "2", "Static programming overrides only call server administered data" }, |
1432 | | { "3", "Static programming overrides both file server- and call server-administered data" }, |
1433 | | { NULL, NULL } |
1434 | | }; |
1435 | | |
1436 | | /* dhcp options administration */ |
1437 | 44.8k | #define DHCP_OPT_NUM 256 |
1438 | | |
1439 | | /* All of the options that have a "basic" type that can be handled by dissect_dhcpopt_basic_type() */ |
1440 | 14 | #define DHCP_OPTION_BASICTYPE_RANGE "1-20,22-32,34-42,44-51,53-54,56-59,62,64-76,86-87,91-92,100-101,108,112-113,116,118,136-138,142,147-148,150,153,156-157,161,209-211,252" |
1441 | | |
1442 | | /* Re-define structure. Values to be updated by dhcp_init_protocol */ |
1443 | | static struct opt_info dhcp_opt[DHCP_OPT_NUM]; |
1444 | | |
1445 | | static const struct opt_info default_dhcp_opt[DHCP_OPT_NUM] = { |
1446 | | /* 0 */ { "Padding", none, &hf_dhcp_option_padding }, |
1447 | | /* 1 */ { "Subnet Mask", ipv4, &hf_dhcp_option_subnet_mask }, |
1448 | | /* 2 */ { "Time Offset", time_in_s_secs, &hf_dhcp_option_time_offset }, |
1449 | | /* 3 */ { "Router", ipv4_list, &hf_dhcp_option_router }, |
1450 | | /* 4 */ { "Time Server", ipv4_list, &hf_dhcp_option_time_server }, |
1451 | | /* 5 */ { "Name Server", ipv4_list, &hf_dhcp_option_name_server }, |
1452 | | /* 6 */ { "Domain Name Server", ipv4_list, &hf_dhcp_option_domain_name_server }, |
1453 | | /* 7 */ { "Log Server", ipv4_list, &hf_dhcp_option_log_server }, |
1454 | | /* 8 */ { "Quotes Server", ipv4_list, &hf_dhcp_option_quotes_server }, |
1455 | | /* 9 */ { "LPR Server", ipv4_list, &hf_dhcp_option_lpr_server }, |
1456 | | /* 10 */ { "Impress Server", ipv4_list, &hf_dhcp_option_impress_server }, |
1457 | | /* 11 */ { "Resource Location Server", ipv4_list, &hf_dhcp_option_resource_location_server }, |
1458 | | /* 12 */ { "Host Name", string, &hf_dhcp_option_hostname }, |
1459 | | /* 13 */ { "Boot File Size", val_u_short, &hf_dhcp_option_boot_file_size }, |
1460 | | /* 14 */ { "Merit Dump File", string, &hf_dhcp_option_merit_dump_file }, |
1461 | | /* 15 */ { "Domain Name", string, &hf_dhcp_option_domain_name }, |
1462 | | /* 16 */ { "Swap Server", ipv4, &hf_dhcp_option_swap_server }, |
1463 | | /* 17 */ { "Root Path", string, &hf_dhcp_option_root_path }, |
1464 | | /* 18 */ { "Extensions Path", string, &hf_dhcp_option_extension_path }, |
1465 | | /* 19 */ { "IP Forwarding", val_boolean, &hf_dhcp_option_ip_forwarding }, |
1466 | | /* 20 */ { "Non-Local Source Routing", val_boolean, &hf_dhcp_option_non_local_source_routing }, |
1467 | | /* 21 */ { "Policy Filter", special, NULL }, |
1468 | | /* 22 */ { "Maximum Datagram Reassembly Size", val_u_short, &hf_dhcp_option_max_datagram_reassembly_size }, |
1469 | | /* 23 */ { "Default IP Time-to-Live", val_u_byte, &hf_dhcp_option_default_ip_ttl }, |
1470 | | /* 24 */ { "Path MTU Aging Timeout", time_in_u_secs, &hf_dhcp_option_path_mtu_aging_timeout }, |
1471 | | /* 25 */ { "Path MTU Plateau Table", val_u_short_list, &hf_dhcp_option_path_mtu_plateau_table_item }, |
1472 | | /* 26 */ { "Interface MTU", val_u_short, &hf_dhcp_option_interface_mtu }, |
1473 | | /* 27 */ { "All Subnets are Local", val_boolean, &hf_dhcp_option_all_subnets_are_local }, |
1474 | | /* 28 */ { "Broadcast Address", ipv4, &hf_dhcp_option_broadcast_address }, |
1475 | | /* 29 */ { "Perform Mask Discovery", val_boolean, &hf_dhcp_option_perform_mask_discovery }, |
1476 | | /* 30 */ { "Mask Supplier", val_boolean, &hf_dhcp_option_mask_supplier }, |
1477 | | /* 31 */ { "Perform Router Discover", val_boolean, &hf_dhcp_option_perform_router_discover }, |
1478 | | /* 32 */ { "Router Solicitation Address", ipv4, &hf_dhcp_option_router_solicitation_address }, |
1479 | | /* 33 */ { "Static Route", special, NULL }, |
1480 | | /* 34 */ { "Trailer Encapsulation", val_boolean, &hf_dhcp_option_trailer_encapsulation }, |
1481 | | /* 35 */ { "ARP Cache Timeout", time_in_u_secs, &hf_dhcp_option_arp_cache_timeout }, |
1482 | | /* 36 */ { "Ethernet Encapsulation", val_boolean, &hf_dhcp_option_ethernet_encapsulation }, |
1483 | | /* 37 */ { "TCP Default TTL", val_u_byte, &hf_dhcp_option_tcp_default_ttl }, |
1484 | | /* 38 */ { "TCP Keepalive Interval", time_in_u_secs, &hf_dhcp_option_tcp_keepalive_interval }, |
1485 | | /* 39 */ { "TCP Keepalive Garbage", val_boolean, &hf_dhcp_option_tcp_keepalive_garbage }, |
1486 | | /* 40 */ { "Network Information Service Domain", string, &hf_dhcp_option_nis_domain }, |
1487 | | /* 41 */ { "Network Information Service Servers", ipv4_list, &hf_dhcp_option_nis_server }, |
1488 | | /* 42 */ { "Network Time Protocol Servers", ipv4_list, &hf_dhcp_option_ntp_server }, |
1489 | | /* 43 */ { "Vendor-Specific Information", special, NULL }, |
1490 | | /* 44 */ { "NetBIOS over TCP/IP Name Server", ipv4_list, &hf_dhcp_option_netbios_over_tcpip_name_server }, |
1491 | | /* 45 */ { "NetBIOS over TCP/IP Datagram Distribution Name Server", ipv4_list, &hf_dhcp_option_netbios_over_tcpip_dd_name_server }, |
1492 | | /* 46 */ { "NetBIOS over TCP/IP Node Type", val_u_byte, &hf_dhcp_option_netbios_over_tcpip_node_type }, |
1493 | | /* 47 */ { "NetBIOS over TCP/IP Scope", string, &hf_dhcp_option_netbios_over_tcpip_scope }, |
1494 | | /* 48 */ { "X Window System Font Server", ipv4_list, &hf_dhcp_option_xwindows_system_font_server }, |
1495 | | /* 49 */ { "X Window System Display Manager", ipv4_list, &hf_dhcp_option_xwindows_system_display_manager }, |
1496 | | /* 50 */ { "Requested IP Address", ipv4, &hf_dhcp_option_requested_ip_address }, |
1497 | | /* 51 */ { "IP Address Lease Time", time_in_u_secs, &hf_dhcp_option_ip_address_lease_time }, |
1498 | | /* 52 */ { "Option Overload", special, &hf_dhcp_option_option_overload }, |
1499 | | /* 53 */ { "DHCP Message Type", val_u_byte, &hf_dhcp_option_dhcp }, |
1500 | | /* 54 */ { "DHCP Server Identifier", ipv4, &hf_dhcp_option_dhcp_server_id }, |
1501 | | /* 55 */ { "Parameter Request List", special, &hf_dhcp_option_parameter_request_list_item }, |
1502 | | /* 56 */ { "Message", string, &hf_dhcp_option_message }, |
1503 | | /* 57 */ { "Maximum DHCP Message Size", val_u_short, &hf_dhcp_option_dhcp_max_message_size }, |
1504 | | /* 58 */ { "Renewal Time Value", time_in_u_secs, &hf_dhcp_option_renewal_time_value }, |
1505 | | /* 59 */ { "Rebinding Time Value", time_in_u_secs, &hf_dhcp_option_rebinding_time_value }, |
1506 | | /* 60 */ { "Vendor class identifier", special, NULL }, |
1507 | | /* 61 */ { "Client identifier", special, NULL }, |
1508 | | /* 62 */ { "Novell/Netware IP domain", string, &hf_dhcp_option_novell_netware_ip_domain }, |
1509 | | /* 63 */ { "Novell Options", special, NULL }, |
1510 | | /* 64 */ { "Network Information Service+ Domain", string, &hf_dhcp_option_nis_plus_domain }, |
1511 | | /* 65 */ { "Network Information Service+ Servers", ipv4_list, &hf_dhcp_option_nis_plus_server }, |
1512 | | /* 66 */ { "TFTP Server Name", string, &hf_dhcp_option_tftp_server_name }, |
1513 | | /* 67 */ { "Bootfile name", string, &hf_dhcp_option_bootfile_name }, |
1514 | | /* 68 */ { "Mobile IP Home Agent", ipv4_list, &hf_dhcp_option_mobile_ip_home_agent }, |
1515 | | /* 69 */ { "SMTP Server", ipv4_list, &hf_dhcp_option_smtp_server }, |
1516 | | /* 70 */ { "POP3 Server", ipv4_list, &hf_dhcp_option_pop3_server }, |
1517 | | /* 71 */ { "NNTP Server", ipv4_list, &hf_dhcp_option_nntp_server }, |
1518 | | /* 72 */ { "Default WWW Server", ipv4_list, &hf_dhcp_option_default_www_server }, |
1519 | | /* 73 */ { "Default Finger Server", ipv4_list, &hf_dhcp_option_default_finger_server }, |
1520 | | /* 74 */ { "Default IRC Server", ipv4_list, &hf_dhcp_option_default_irc_server }, |
1521 | | /* 75 */ { "StreetTalk Server", ipv4_list, &hf_dhcp_option_streettalk_server }, |
1522 | | /* 76 */ { "StreetTalk Directory Assistance Server", ipv4_list, &hf_dhcp_option_streettalk_da_server }, |
1523 | | /* 77 */ { "User Class Information", special, NULL }, |
1524 | | /* 78 */ { "Directory Agent Information", special, NULL }, |
1525 | | /* 79 */ { "Service Location Agent Scope", special, NULL }, |
1526 | | /* 80 */ { "Rapid commit", opaque, NULL }, |
1527 | | /* 81 */ { "Client Fully Qualified Domain Name", special, NULL}, |
1528 | | /* 82 */ { "Agent Information Option", special, NULL}, |
1529 | | /* 83 */ { "iSNS", opaque, NULL }, |
1530 | | /* 84 */ { "Removed/Unassigned", opaque, NULL }, |
1531 | | /* 85 */ { "Novell Directory Services Servers", special, NULL}, |
1532 | | /* 86 */ { "Novell Directory Services Tree Name", string, &hf_dhcp_option_novell_ds_tree_name }, |
1533 | | /* 87 */ { "Novell Directory Services Context", string, &hf_dhcp_option_novell_ds_context }, |
1534 | | /* 88 */ { "BCMCS Controller Domain Name [TODO:RFC4280]", opaque, NULL }, |
1535 | | /* 89 */ { "BCMCS Controller IPv4 address [TODO:RFC4280]", opaque, NULL }, |
1536 | | /* 90 */ { "Authentication", special, NULL}, |
1537 | | /* 91 */ { "Client last transaction time", time_in_u_secs, &hf_dhcp_option_client_last_transaction_time }, |
1538 | | /* 92 */ { "Associated IP option", ipv4_list, &hf_dhcp_option_associated_ip_option }, |
1539 | | /* 93 */ { "Client System Architecture", special, NULL}, |
1540 | | /* 94 */ { "Client Network Device Interface", special, NULL}, |
1541 | | /* 95 */ { "LDAP [TODO:RFC3679]", opaque, NULL }, |
1542 | | /* 96 */ { "Removed/Unassigned", opaque, NULL }, |
1543 | | /* 97 */ { "UUID/GUID-based Client Identifier", special, NULL}, |
1544 | | /* 98 */ { "Open Group's User Authentication [TODO:RFC2485]", opaque, NULL }, |
1545 | | /* 99 */ { "Civic Addresses Configuration", special, NULL}, |
1546 | | /* 100 */ { "PCode", string, &hf_dhcp_option_tz_pcode }, |
1547 | | /* 101 */ { "TCode", string, &hf_dhcp_option_tz_tcode }, |
1548 | | /* 102 */ { "Removed/unassigned", opaque, NULL }, |
1549 | | /* 103 */ { "Removed/unassigned", opaque, NULL }, |
1550 | | /* 104 */ { "Removed/unassigned", opaque, NULL }, |
1551 | | /* 105 */ { "Removed/unassigned", opaque, NULL }, |
1552 | | /* 106 */ { "Removed/unassigned", opaque, NULL }, |
1553 | | /* 107 */ { "Removed/unassigned", opaque, NULL }, |
1554 | | /* 108 */ { "IPv6-Only Preferred", time_in_u_secs, &hf_dhcp_option_ipv6_only_preferred_wait_time }, |
1555 | | /* 109 */ { "Unassigned", opaque, NULL }, |
1556 | | /* 110 */ { "Removed/Unassigned", opaque, NULL }, |
1557 | | /* 111 */ { "Unassigned", opaque, NULL }, |
1558 | | /* 112 */ { "NetInfo Parent Server Address", ipv4_list, &hf_dhcp_option_netinfo_parent_server_address }, |
1559 | | /* 113 */ { "NetInfo Parent Server Tag", string, &hf_dhcp_option_netinfo_parent_server_tag }, |
1560 | | /* 114 */ { "DHCP Captive-Portal", special, NULL }, |
1561 | | /* 115 */ { "Removed/Unassigned", opaque, NULL }, |
1562 | | /* 116 */ { "DHCP Auto-Configuration", val_u_byte, &hf_dhcp_option_dhcp_auto_configuration }, |
1563 | | /* 117 */ { "Name Service Search", special, NULL }, |
1564 | | /* 118 */ { "Subnet Selection Option", ipv4_list, &hf_dhcp_option_subnet_selection_option }, |
1565 | | /* 119 */ { "Domain Search", special, NULL }, |
1566 | | /* 120 */ { "SIP Servers", special, NULL }, |
1567 | | /* 121 */ { "Classless Static Route", special, NULL}, |
1568 | | /* 122 */ { "CableLabs Client Configuration [TODO:RFC3495]", opaque, NULL }, |
1569 | | /* 123 */ { "Coordinate-based Location Configuration", special, NULL}, |
1570 | | /* 124 */ { "V-I Vendor Class", special, NULL}, |
1571 | | /* 125 */ { "V-I Vendor-specific Information", special, NULL}, |
1572 | | /* 126 */ { "Removed/Unassigned", opaque, NULL }, |
1573 | | /* 127 */ { "Removed/Unassigned", opaque, NULL }, |
1574 | | /* 128 */ { "DOCSIS full security server IP [TODO]", opaque, NULL }, |
1575 | | /* 129 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1576 | | /* 130 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1577 | | /* 131 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1578 | | /* 132 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1579 | | /* 133 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1580 | | /* 134 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1581 | | /* 135 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1582 | | /* 136 */ { "PANA Authentication Agent", ipv4_list, &hf_dhcp_option_pana_agent }, |
1583 | | /* 137 */ { "LoST Server Domain Name", string, &hf_dhcp_option_lost_server_domain_name }, |
1584 | | /* 138 */ { "CAPWAP Access Controllers", ipv4_list, &hf_dhcp_option_capwap_access_controller }, |
1585 | | /* 139 */ { "IPv4 Address-MoS", opaque, NULL }, |
1586 | | /* 140 */ { "IPv4 FQDN-MoS", opaque, NULL }, |
1587 | | /* 141 */ { "SIP UA Configuration Domains", opaque, NULL }, |
1588 | | /* 142 */ { "IPv4 Address ANDSF", ipv4_list, &hf_dhcp_option_andsf_server }, |
1589 | | /* 143 */ { "Zerotouch Redirect [TODO: draft-ietf-netconf-zerotouch]", opaque, NULL }, |
1590 | | /* 144 */ { "Geospatial Location [TODO:RFC6225]", opaque, NULL }, |
1591 | | /* 145 */ { "Forcerenew Nonce Capable", special, NULL }, |
1592 | | /* 146 */ { "RDNSS Selection", special, NULL }, |
1593 | | /* 147 */ { "DOTS Reference Identifier", string, &hf_dhcp_option_dots_ri }, |
1594 | | /* 148 */ { "DOTS Address", ipv4_list, &hf_dhcp_option_dots_address }, |
1595 | | /* 149 */ { "Unassigned", opaque, NULL }, |
1596 | | /* 150 */ { "TFTP Server Address", ipv4_list, &hf_dhcp_option_tftp_server_address }, |
1597 | | /* 151 */ { "Leasequery Status code", special, NULL }, |
1598 | | /* 152 */ { "Leasequery Base Time", special, NULL }, |
1599 | | /* 153 */ { "Leasequery Start Time of State", time_in_u_secs, &hf_dhcp_option_bulk_lease_start_time_of_state }, |
1600 | | /* 154 */ { "Leasequery Query Start Time", special, NULL }, |
1601 | | /* 155 */ { "Leasequery Query End Time", special, NULL }, |
1602 | | /* 156 */ { "Leasequery Dhcp State", val_u_byte, &hf_dhcp_option_bulk_lease_dhcp_state }, |
1603 | | /* 157 */ { "Leasequery Data Source", val_boolean, &hf_dhcp_option_bulk_lease_data_source }, |
1604 | | /* 158 */ { "PCP Server", special, NULL }, |
1605 | | /* 159 */ { "Portparams", special, NULL }, |
1606 | | /* 160 */ { "Unassigned (ex DHCP Captive-Portal)", special, NULL }, /* Previously assigned by [RFC7710]; known to also be used by Polycom. */ |
1607 | | /* 161 */ { "Manufacturer Usage Description", string, &hf_dhcp_option_mudurl}, |
1608 | | /* 162 */ { "Discovery of Network DNS Resolvers", special, NULL }, |
1609 | | /* 163 */ { "Unassigned", opaque, NULL }, |
1610 | | /* 164 */ { "Unassigned", opaque, NULL }, |
1611 | | /* 165 */ { "Unassigned", opaque, NULL }, |
1612 | | /* 166 */ { "Unassigned", opaque, NULL }, |
1613 | | /* 167 */ { "Unassigned", opaque, NULL }, |
1614 | | /* 168 */ { "Unassigned", opaque, NULL }, |
1615 | | /* 169 */ { "Unassigned", opaque, NULL }, |
1616 | | /* 170 */ { "Unassigned", opaque, NULL }, |
1617 | | /* 171 */ { "Unassigned", opaque, NULL }, |
1618 | | /* 172 */ { "Unassigned", opaque, NULL }, |
1619 | | /* 173 */ { "Unassigned", opaque, NULL }, |
1620 | | /* 174 */ { "Unassigned", opaque, NULL }, |
1621 | | /* 175 */ { "Etherboot", opaque, NULL }, |
1622 | | /* 176 */ { "IP Telephone", opaque, NULL }, |
1623 | | /* 177 */ { "Etherboot", opaque, NULL }, |
1624 | | /* 178 */ { "Unassigned", opaque, NULL }, |
1625 | | /* 179 */ { "Unassigned", opaque, NULL }, |
1626 | | /* 180 */ { "Unassigned", opaque, NULL }, |
1627 | | /* 181 */ { "Unassigned", opaque, NULL }, |
1628 | | /* 182 */ { "Unassigned", opaque, NULL }, |
1629 | | /* 183 */ { "Unassigned", opaque, NULL }, |
1630 | | /* 184 */ { "Unassigned", opaque, NULL }, |
1631 | | /* 185 */ { "Unassigned", opaque, NULL }, |
1632 | | /* 186 */ { "Unassigned", opaque, NULL }, |
1633 | | /* 187 */ { "Unassigned", opaque, NULL }, |
1634 | | /* 188 */ { "Unassigned", opaque, NULL }, |
1635 | | /* 189 */ { "Unassigned", opaque, NULL }, |
1636 | | /* 190 */ { "Unassigned", opaque, NULL }, |
1637 | | /* 191 */ { "Unassigned", opaque, NULL }, |
1638 | | /* 192 */ { "Unassigned", opaque, NULL }, |
1639 | | /* 193 */ { "Unassigned", opaque, NULL }, |
1640 | | /* 194 */ { "Unassigned", opaque, NULL }, |
1641 | | /* 195 */ { "Unassigned", opaque, NULL }, |
1642 | | /* 196 */ { "Unassigned", opaque, NULL }, |
1643 | | /* 197 */ { "Unassigned", opaque, NULL }, |
1644 | | /* 198 */ { "Unassigned", opaque, NULL }, |
1645 | | /* 199 */ { "Unassigned", opaque, NULL }, |
1646 | | /* 200 */ { "Unassigned", opaque, NULL }, |
1647 | | /* 201 */ { "Unassigned", opaque, NULL }, |
1648 | | /* 202 */ { "Unassigned", opaque, NULL }, |
1649 | | /* 203 */ { "Unassigned", opaque, NULL }, |
1650 | | /* 204 */ { "Unassigned", opaque, NULL }, |
1651 | | /* 205 */ { "Unassigned", opaque, NULL }, |
1652 | | /* 206 */ { "Unassigned", opaque, NULL }, |
1653 | | /* 207 */ { "Unassigned", opaque, NULL }, |
1654 | | /* 208 */ { "PXELINUX Magic", opaque, NULL }, |
1655 | | /* 209 */ { "PXE Configuration file", string, &hf_dhcp_option_pxe_config_file }, |
1656 | | /* 210 */ { "PXE Path Prefix", string, &hf_dhcp_option_pxe_path_prefix }, |
1657 | | /* 211 */ { "Reboot Time", time_in_u_secs, &hf_dhcp_option_pxe_reboot_time }, |
1658 | | /* 212 */ { "6RD", opaque, NULL }, |
1659 | | /* 213 */ { "V4 Access Domain", opaque, NULL }, |
1660 | | /* 214 */ { "Unassigned", opaque, NULL }, |
1661 | | /* 215 */ { "Unassigned", opaque, NULL }, |
1662 | | /* 216 */ { "Unassigned", opaque, NULL }, |
1663 | | /* 217 */ { "Unassigned", opaque, NULL }, |
1664 | | /* 218 */ { "Unassigned", opaque, NULL }, |
1665 | | /* 219 */ { "Unassigned", opaque, NULL }, |
1666 | | /* 220 */ { "Subnet Allocation", opaque, NULL }, |
1667 | | /* 221 */ { "Virtual Subnet Selection", opaque, NULL }, |
1668 | | /* 222 */ { "Unassigned", opaque, NULL }, |
1669 | | /* 223 */ { "Unassigned", opaque, NULL }, |
1670 | | /* 224 */ { "Private", opaque, NULL }, |
1671 | | /* 225 */ { "Private", opaque, NULL }, |
1672 | | /* 226 */ { "Private", opaque, NULL }, |
1673 | | /* 227 */ { "Private", opaque, NULL }, |
1674 | | /* 228 */ { "Private", opaque, NULL }, |
1675 | | /* 229 */ { "Private", opaque, NULL }, |
1676 | | /* 230 */ { "Private", opaque, NULL }, |
1677 | | /* 231 */ { "Private", opaque, NULL }, |
1678 | | /* 232 */ { "Private", opaque, NULL }, |
1679 | | /* 233 */ { "Private", opaque, NULL }, |
1680 | | /* 234 */ { "Private", opaque, NULL }, |
1681 | | /* 235 */ { "Private", opaque, NULL }, |
1682 | | /* 236 */ { "Private", opaque, NULL }, |
1683 | | /* 237 */ { "Private", opaque, NULL }, |
1684 | | /* 238 */ { "Private", opaque, NULL }, |
1685 | | /* 239 */ { "Private", opaque, NULL }, |
1686 | | /* 240 */ { "Private", opaque, NULL }, |
1687 | | /* 241 */ { "Private", opaque, NULL }, |
1688 | | /* 242 */ { "Private/Avaya IP Telephone", special, NULL }, |
1689 | | /* 243 */ { "Private", opaque, NULL }, |
1690 | | /* 244 */ { "Private", opaque, NULL }, |
1691 | | /* 245 */ { "Private", opaque, NULL }, |
1692 | | /* 246 */ { "Private", opaque, NULL }, |
1693 | | /* 247 */ { "Private", opaque, NULL }, |
1694 | | /* 248 */ { "Private", opaque, NULL }, |
1695 | | /* 249 */ { "Private/Classless Static Route (Microsoft)", special, NULL}, |
1696 | | /* 250 */ { "Private", opaque, NULL }, |
1697 | | /* 251 */ { "Private", opaque, NULL }, |
1698 | | /* 252 */ { "Private/Proxy autodiscovery", string, &hf_dhcp_option_private_proxy_autodiscovery }, |
1699 | | /* 253 */ { "Private", opaque, NULL }, |
1700 | | /* 254 */ { "Private", opaque, NULL }, |
1701 | | /* 255 */ { "End", opaque, NULL } |
1702 | | }; |
1703 | | |
1704 | | static void |
1705 | | dhcp_time_in_s_secs_fmt(char *s, uint32_t v) |
1706 | 0 | { |
1707 | | /* Only used by option 2 Time Offset, which is deprecated. */ |
1708 | 0 | char* secs_str = signed_time_secs_to_str(NULL, (int32_t)v); |
1709 | 0 | snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", secs_str, (int32_t)v); |
1710 | 0 | wmem_free(NULL, secs_str); |
1711 | 0 | } |
1712 | | |
1713 | | static void |
1714 | | dhcp_time_in_u_secs_fmt(char *s, uint32_t v) |
1715 | 0 | { |
1716 | | /* RFC 2131: 3.3 Interpretation and representation of time values */ |
1717 | 0 | if (v != 0xffffffff) { |
1718 | 0 | char* secs_str = unsigned_time_secs_to_str(NULL, v); |
1719 | 0 | snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", secs_str, v); |
1720 | 0 | wmem_free(NULL, secs_str); |
1721 | 0 | } else { |
1722 | 0 | snprintf(s, ITEM_LABEL_LENGTH, "infinity (%d)", v); |
1723 | 0 | } |
1724 | 0 | } |
1725 | | |
1726 | | /*------------------------------------- |
1727 | | * UAT for BOOTP |
1728 | | *------------------------------------- |
1729 | | */ |
1730 | | /* UAT entry structure. */ |
1731 | | typedef struct { |
1732 | | unsigned opt; |
1733 | | char *text; |
1734 | | enum field_type ftype; |
1735 | | |
1736 | | } uat_dhcp_record_t; |
1737 | | |
1738 | | static uat_dhcp_record_t *uat_dhcp_records; |
1739 | | static uat_t *dhcp_uat; |
1740 | | static unsigned num_dhcp_records_uat; |
1741 | | static wmem_list_t *saved_uat_opts; /* List of previous options from UAT to "free" from dissection */ |
1742 | | |
1743 | 0 | static void* uat_dhcp_record_copy_cb(void* n, const void* o, size_t siz _U_) { |
1744 | 0 | uat_dhcp_record_t* new_record = (uat_dhcp_record_t *)n; |
1745 | 0 | const uat_dhcp_record_t* old_record = (const uat_dhcp_record_t *)o; |
1746 | |
|
1747 | 0 | new_record->text = g_strdup(old_record->text); |
1748 | |
|
1749 | 0 | return new_record; |
1750 | 0 | } |
1751 | | |
1752 | 0 | static bool uat_dhcp_record_update_cb(void* r, char** err) { |
1753 | 0 | uat_dhcp_record_t* rec = (uat_dhcp_record_t *)r; |
1754 | |
|
1755 | 0 | if ((rec->opt == 0) || (rec->opt >=DHCP_OPT_NUM-1)) { |
1756 | 0 | *err = ws_strdup_printf("Option must be between 1 and %d", DHCP_OPT_NUM-2); |
1757 | 0 | return false; |
1758 | 0 | } |
1759 | 0 | return true; |
1760 | 0 | } |
1761 | | |
1762 | 0 | static void uat_dhcp_record_free_cb(void*r) { |
1763 | 0 | uat_dhcp_record_t* rec = (uat_dhcp_record_t *)r; |
1764 | |
|
1765 | 0 | g_free(rec->text); |
1766 | 0 | } |
1767 | | |
1768 | 0 | UAT_DEC_CB_DEF(uat_dhcp_records, opt, uat_dhcp_record_t) Unexecuted instantiation: packet-dhcp.c:uat_dhcp_records_opt_set_cb Unexecuted instantiation: packet-dhcp.c:uat_dhcp_records_opt_tostr_cb |
1769 | | UAT_CSTRING_CB_DEF(uat_dhcp_records, text, uat_dhcp_record_t) |
1770 | | UAT_VS_DEF(uat_dhcp_records, ftype, uat_dhcp_record_t, enum field_type, special, "string") |
1771 | | |
1772 | | |
1773 | | static const struct opt_info* dhcp_get_opt(unsigned int idx) |
1774 | 44.3k | { |
1775 | 44.3k | if(idx>=DHCP_OPT_NUM) |
1776 | 0 | return NULL; |
1777 | | |
1778 | 44.3k | return &dhcp_opt[idx]; |
1779 | 44.3k | } |
1780 | | |
1781 | | static const char * |
1782 | | dhcp_get_opt_text(unsigned int idx) |
1783 | 497 | { |
1784 | 497 | if(idx>=DHCP_OPT_NUM) |
1785 | 0 | return "unknown"; |
1786 | 497 | return dhcp_opt[idx].text; |
1787 | 497 | } |
1788 | | |
1789 | | struct basic_types_hfs { |
1790 | | int* bytes; |
1791 | | int* ipv4; |
1792 | | int* ipv4_list; |
1793 | | int* string; |
1794 | | int* val_boolean; |
1795 | | int* val_u_byte; |
1796 | | int* val_u_short; |
1797 | | int* val_u_short_list; |
1798 | | int* val_u_long; |
1799 | | int* time_in_s_secs; |
1800 | | int* time_in_u_secs; |
1801 | | }; |
1802 | | |
1803 | | /* Handle "basic" datatypes adding to a tree */ |
1804 | | static int |
1805 | | dhcp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb, |
1806 | | enum field_type ftype, int offset, int total_len, |
1807 | | int *hf, const struct basic_types_hfs* hf_default) |
1808 | 22.1k | { |
1809 | 22.1k | int i, left; |
1810 | 22.1k | int consumed = 0; |
1811 | | |
1812 | 22.1k | switch (ftype) { |
1813 | 2.67k | case bytes: |
1814 | 2.67k | if (hf != NULL) |
1815 | 2.67k | proto_tree_add_item(tree, *hf, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1816 | 0 | else if (hf_default->bytes != NULL) |
1817 | 0 | proto_tree_add_item(tree, *hf_default->bytes, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1818 | 2.67k | consumed = total_len; |
1819 | 2.67k | break; |
1820 | | |
1821 | 2.19k | case ipv4: |
1822 | 2.19k | if (total_len != 4) { |
1823 | 2.03k | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1824 | 2.03k | break; |
1825 | 2.03k | } |
1826 | | |
1827 | 159 | if (hf != NULL) |
1828 | 159 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1829 | 0 | else if (hf_default->ipv4 != NULL) |
1830 | 0 | proto_tree_add_item(tree, *hf_default->ipv4, tvb, offset, 4, ENC_BIG_ENDIAN); |
1831 | | |
1832 | | /* Show IP address in root of option */ |
1833 | 159 | proto_item_append_text(tree, " (%s)", tvb_ip_to_str(pinfo->pool, tvb, offset)); |
1834 | 159 | consumed = 4; |
1835 | 159 | break; |
1836 | | |
1837 | 3.97k | case ipv4_list: |
1838 | 13.2k | for (i = offset, left = total_len; left > 0; i += 4, left -= 4) { |
1839 | 10.9k | if (left < 4) { |
1840 | 1.67k | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
1841 | 1.67k | break; |
1842 | 1.67k | } |
1843 | | |
1844 | 9.31k | if (hf != NULL) |
1845 | 9.31k | proto_tree_add_item(tree, *hf, tvb, i, 4, ENC_BIG_ENDIAN); |
1846 | 0 | else if (hf_default->ipv4_list != NULL) |
1847 | 0 | proto_tree_add_item(tree, *hf_default->ipv4_list, tvb, i, 4, ENC_BIG_ENDIAN); |
1848 | 9.31k | consumed += 4; |
1849 | 9.31k | } |
1850 | | |
1851 | 3.97k | break; |
1852 | | |
1853 | 3.17k | case string: |
1854 | 3.17k | if (hf != NULL) |
1855 | 3.17k | proto_tree_add_item(tree, *hf, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1856 | 0 | else if (hf_default->string != NULL) |
1857 | 0 | proto_tree_add_item(tree, *hf_default->string, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1858 | 3.17k | consumed = total_len; |
1859 | 3.17k | break; |
1860 | | |
1861 | 953 | case val_boolean: |
1862 | 953 | if (total_len != 1) { |
1863 | 790 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 1"); |
1864 | 790 | break; |
1865 | 790 | } |
1866 | | |
1867 | 163 | if (hf != NULL) |
1868 | 163 | proto_tree_add_item(tree, *hf, tvb, offset, 1, ENC_BIG_ENDIAN); |
1869 | 0 | else if (hf_default->val_boolean != NULL) |
1870 | 0 | proto_tree_add_item(tree, *hf_default->val_boolean, tvb, offset, 1, ENC_BIG_ENDIAN); |
1871 | 163 | consumed = 1; |
1872 | 163 | break; |
1873 | | |
1874 | 771 | case val_u_byte: |
1875 | 771 | if (total_len != 1) { |
1876 | 575 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 1"); |
1877 | 575 | break; |
1878 | 575 | } |
1879 | | |
1880 | 196 | if (hf != NULL) |
1881 | 196 | proto_tree_add_item(tree, *hf, tvb, offset, 1, ENC_BIG_ENDIAN); |
1882 | 0 | else if (hf_default->val_u_byte != NULL) |
1883 | 0 | proto_tree_add_item(tree, *hf_default->val_u_byte, tvb, offset, 1, ENC_BIG_ENDIAN); |
1884 | 196 | consumed = 1; |
1885 | 196 | break; |
1886 | | |
1887 | 220 | case val_u_short: |
1888 | 220 | if (total_len != 2) { |
1889 | 188 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 2"); |
1890 | 188 | break; |
1891 | 188 | } |
1892 | | |
1893 | 32 | if (hf != NULL) |
1894 | 32 | proto_tree_add_item(tree, *hf, tvb, offset, 2, ENC_BIG_ENDIAN); |
1895 | 0 | else if (hf_default->val_u_short != NULL) |
1896 | 0 | proto_tree_add_item(tree, *hf_default->val_u_short, tvb, offset, 2, ENC_BIG_ENDIAN); |
1897 | 32 | consumed = 2; |
1898 | 32 | break; |
1899 | | |
1900 | 747 | case val_u_le_short: |
1901 | 747 | if (total_len != 2) { |
1902 | 482 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 2"); |
1903 | 482 | break; |
1904 | 482 | } |
1905 | | |
1906 | 265 | if (hf != NULL) |
1907 | 265 | proto_tree_add_item(tree, *hf, tvb, offset, 2, ENC_LITTLE_ENDIAN); |
1908 | 0 | else if (hf_default->val_u_short != NULL) |
1909 | 0 | proto_tree_add_item(tree, *hf_default->val_u_short, tvb, offset, 2, ENC_LITTLE_ENDIAN); |
1910 | 265 | consumed = 2; |
1911 | 265 | break; |
1912 | | |
1913 | 78 | case val_u_short_list: |
1914 | 1.15k | for (i = offset, left = total_len; left > 0; i += 2, left -= 2) { |
1915 | 1.08k | if (left < 2) { |
1916 | 12 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "Option length isn't a multiple of 2"); |
1917 | 12 | break; |
1918 | 12 | } |
1919 | | |
1920 | 1.07k | if (hf != NULL) |
1921 | 1.07k | proto_tree_add_item(tree, *hf, tvb, i, 2, ENC_BIG_ENDIAN); |
1922 | 0 | else if (hf_default->val_u_short_list != NULL) |
1923 | 0 | proto_tree_add_item(tree, *hf_default->val_u_short_list, tvb, i, 2, ENC_BIG_ENDIAN); |
1924 | 1.07k | consumed += 2; |
1925 | 1.07k | } |
1926 | 78 | break; |
1927 | | |
1928 | 513 | case val_u_long: |
1929 | 513 | if (total_len != 4) { |
1930 | 394 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1931 | 394 | break; |
1932 | 394 | } |
1933 | | |
1934 | 119 | if (hf != NULL) |
1935 | 119 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1936 | 0 | else if (hf_default->val_u_long != NULL) |
1937 | 0 | proto_tree_add_item(tree, *hf_default->val_u_long, tvb, offset, 4, ENC_BIG_ENDIAN); |
1938 | 119 | consumed = 4; |
1939 | 119 | break; |
1940 | | |
1941 | 265 | case time_in_s_secs: |
1942 | 265 | if (total_len != 4) { |
1943 | 256 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1944 | 256 | break; |
1945 | 256 | } |
1946 | | |
1947 | 9 | if (hf != NULL) { |
1948 | 9 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1949 | 9 | } |
1950 | 0 | else if (hf_default->time_in_s_secs != NULL) |
1951 | 0 | proto_tree_add_item(tree, *hf_default->time_in_s_secs, tvb, offset, 4, ENC_BIG_ENDIAN); |
1952 | | |
1953 | 9 | consumed = 4; |
1954 | 9 | break; |
1955 | | |
1956 | 350 | case time_in_u_secs: |
1957 | 350 | if (total_len != 4) { |
1958 | 331 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1959 | 331 | break; |
1960 | 331 | } |
1961 | | |
1962 | 19 | if (hf != NULL) { |
1963 | 19 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1964 | 19 | } |
1965 | 0 | else if (hf_default->time_in_u_secs != NULL) |
1966 | 0 | proto_tree_add_item(tree, *hf_default->time_in_u_secs, tvb, offset, 4, ENC_BIG_ENDIAN); |
1967 | 19 | consumed = 4; |
1968 | 19 | break; |
1969 | 6.28k | default: |
1970 | | /* Ignore other field_types */ |
1971 | 6.28k | break; |
1972 | 22.1k | } |
1973 | | |
1974 | 22.1k | return consumed; |
1975 | 22.1k | } |
1976 | | |
1977 | | static int |
1978 | | dissect_dhcpopt_basic_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
1979 | 6.57k | { |
1980 | 6.57k | const struct opt_info *opt; |
1981 | 6.57k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
1982 | 6.57k | static const struct basic_types_hfs default_hfs = { |
1983 | 6.57k | &hf_dhcp_option_value, |
1984 | 6.57k | &hf_dhcp_option_value_ip_address, |
1985 | 6.57k | &hf_dhcp_option_value_ip_address, |
1986 | 6.57k | &hf_dhcp_option_value_stringz, |
1987 | 6.57k | &hf_dhcp_option_value_boolean, |
1988 | 6.57k | &hf_dhcp_option_value_8, |
1989 | 6.57k | &hf_dhcp_option_value_16, |
1990 | 6.57k | &hf_dhcp_option_value_16, |
1991 | 6.57k | &hf_dhcp_option_value_u32, |
1992 | 6.57k | &hf_dhcp_option_value_s_secs, |
1993 | 6.57k | &hf_dhcp_option_value_u_secs, |
1994 | 6.57k | }; |
1995 | | |
1996 | 6.57k | opt = dhcp_get_opt(option_data->option); |
1997 | 6.57k | if (opt == NULL) |
1998 | 0 | return 0; |
1999 | | |
2000 | 6.57k | return dhcp_handle_basic_types(pinfo, tree, tree, tvb, opt->ftype, |
2001 | 6.57k | 0, tvb_reported_length(tvb), opt->phf, &default_hfs); |
2002 | 6.57k | } |
2003 | | |
2004 | | /* Returns the number of bytes consumed by this option. */ |
2005 | | static int |
2006 | | dhcp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, |
2007 | | int eoff, bool first_pass, bool *at_end, const char **dhcp_type_p, |
2008 | | const uint8_t **vendor_class_id_p, uint8_t *overload_p, |
2009 | | wmem_map_t *rfc3396_map) |
2010 | 93.8k | { |
2011 | 93.8k | const struct opt_info *opt; |
2012 | 93.8k | unsigned char code = tvb_get_uint8(tvb, voff); |
2013 | 93.8k | int optlen; |
2014 | 93.8k | int i, consumed; |
2015 | 93.8k | proto_tree *v_tree; |
2016 | 93.8k | proto_item *vti, *ti_value; |
2017 | 93.8k | tvbuff_t *option_tvb; |
2018 | 93.8k | dhcp_option_data_t option_data; |
2019 | | |
2020 | | /* Note overload_p is NULL inside the overloaded areas; it makes no |
2021 | | * sense to set it again. */ |
2022 | | /* Options whose length isn't "optlen + 2". */ |
2023 | 93.8k | switch (code) { |
2024 | | |
2025 | 14.0k | case 0: /* Padding */ |
2026 | | /* check how much padding we have */ |
2027 | 40.0k | for (i = voff + 1; i < eoff; i++ ) { |
2028 | 39.7k | if (tvb_get_uint8(tvb, i) != 0) { |
2029 | 13.7k | break; |
2030 | 13.7k | } |
2031 | 39.7k | } |
2032 | 14.0k | i = i - voff; |
2033 | 14.0k | if (!first_pass) { |
2034 | 6.71k | if (bp_tree != NULL) { |
2035 | 6.71k | vti = proto_tree_add_uint_format_value(bp_tree, hf_dhcp_option_type, |
2036 | 6.71k | tvb, voff, 1, 0, "(0) Padding"); |
2037 | 6.71k | v_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
2038 | 6.71k | proto_tree_add_item(v_tree, hf_dhcp_option_padding, tvb, voff, i, ENC_NA); |
2039 | 6.71k | } |
2040 | 6.71k | } |
2041 | 14.0k | consumed = i; |
2042 | 14.0k | return consumed; |
2043 | | |
2044 | 908 | case 255: /* End Option */ |
2045 | 908 | if (!first_pass) { |
2046 | 426 | if (bp_tree != NULL) { |
2047 | 426 | vti = proto_tree_add_uint_format_value(bp_tree, hf_dhcp_option_type, |
2048 | 426 | tvb, voff, 1, 0, "(255) End"); |
2049 | 426 | v_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
2050 | 426 | if (overload_p == NULL) |
2051 | 387 | proto_tree_add_item(v_tree, hf_dhcp_option_end_overload, tvb, voff, 1, ENC_BIG_ENDIAN); |
2052 | 39 | else |
2053 | 39 | proto_tree_add_item(v_tree, hf_dhcp_option_end, tvb, voff, 1, ENC_BIG_ENDIAN); |
2054 | 426 | } |
2055 | 426 | } |
2056 | 908 | *at_end = true; |
2057 | 908 | consumed = 1; |
2058 | 908 | return consumed; |
2059 | 93.8k | } |
2060 | | |
2061 | | /* |
2062 | | * Get the length of the option, and the number of bytes it |
2063 | | * consumes (the length doesn't include the option code or |
2064 | | * length bytes). |
2065 | | * |
2066 | | * On the first pass, check first whether we have the length |
2067 | | * byte, so that we don't throw an exception; if we throw an |
2068 | | * exception in the first pass, which is only checking for options |
2069 | | * whose values we need in order to properly dissect the packet |
2070 | | * on the second pass, we won't actually dissect the options, so |
2071 | | * you won't be able to see which option had the problem. |
2072 | | */ |
2073 | 78.8k | if (first_pass) { |
2074 | 41.0k | if (!tvb_bytes_exist(tvb, voff+1, 1)) { |
2075 | | /* |
2076 | | * We don't have the length byte; just return 1 |
2077 | | * as the number of bytes we consumed, to count |
2078 | | * the code byte. |
2079 | | */ |
2080 | 22 | return 1; |
2081 | 22 | } |
2082 | 41.0k | } |
2083 | 78.8k | optlen = tvb_get_uint8(tvb, voff+1); |
2084 | 78.8k | consumed = optlen + 2; |
2085 | | |
2086 | 78.8k | struct rfc3396_for_option_t *rfc3396_data = wmem_map_lookup(rfc3396_map, GUINT_TO_POINTER(code)); |
2087 | 78.8k | if (rfc3396_data == NULL) { |
2088 | 24.0k | rfc3396_data = wmem_new0(pinfo->pool, struct rfc3396_for_option_t); |
2089 | 24.0k | wmem_map_insert(rfc3396_map, GUINT_TO_POINTER(code), rfc3396_data); |
2090 | 24.0k | } |
2091 | | |
2092 | | /* |
2093 | | * In the first pass, we don't put anything into the protocol |
2094 | | * tree; we just check for some options we have to look at |
2095 | | * in order to properly process the packet: |
2096 | | * |
2097 | | * 52 (Overload) - we need this to properly dissect the |
2098 | | * file and sname fields |
2099 | | * |
2100 | | * 53 (DHCP message type) - if this is present, this is DHCP |
2101 | | * |
2102 | | * 60 (Vendor class identifier) - we need this in order to |
2103 | | * interpret the vendor-specific info |
2104 | | * |
2105 | | * We also check, before fetching anything, to make sure we |
2106 | | * have the entire item we're fetching, so that we don't throw |
2107 | | * an exception. |
2108 | | */ |
2109 | 78.8k | if (first_pass) { |
2110 | 41.0k | if (tvb_bytes_exist(tvb, voff+2, consumed-2)) { |
2111 | 40.5k | switch (code) { |
2112 | | |
2113 | 4.92k | case 52: |
2114 | 4.92k | if (overload_p != NULL) { |
2115 | 4.53k | *overload_p = tvb_get_uint8(tvb, voff+2); |
2116 | 4.53k | } |
2117 | 4.92k | break; |
2118 | | |
2119 | 370 | case 53: |
2120 | 370 | *dhcp_type_p = |
2121 | 370 | val_to_str(pinfo->pool, tvb_get_uint8(tvb, voff+2), |
2122 | 370 | opt53_text, |
2123 | 370 | "Unknown Message Type (0x%02x)"); |
2124 | 370 | break; |
2125 | | |
2126 | 3.22k | case 60: |
2127 | 3.22k | *vendor_class_id_p = |
2128 | 3.22k | tvb_get_string_enc(pinfo->pool, |
2129 | 3.22k | tvb, voff+2, consumed-2, ENC_ASCII); |
2130 | 3.22k | break; |
2131 | 40.5k | } |
2132 | 40.5k | } |
2133 | | |
2134 | 41.0k | rfc3396_data->total_number_of_block++; |
2135 | | |
2136 | | /* |
2137 | | * We don't do anything else here. |
2138 | | */ |
2139 | 41.0k | return consumed; |
2140 | 41.0k | } |
2141 | | |
2142 | | /* Normal cases */ |
2143 | 37.7k | opt = dhcp_get_opt(code); |
2144 | 37.7k | if (opt == NULL) |
2145 | 0 | { |
2146 | | /* THIS SHOULD NEVER HAPPEN!!! */ |
2147 | 0 | return consumed; |
2148 | 0 | } |
2149 | | |
2150 | 37.7k | vti = proto_tree_add_uint_format_value(bp_tree, hf_dhcp_option_type, |
2151 | 37.7k | tvb, voff, consumed, code, "(%d) %s", code, opt->text); |
2152 | 37.7k | v_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
2153 | 37.7k | proto_tree_add_item(v_tree, hf_dhcp_option_length, tvb, voff+1, 1, ENC_BIG_ENDIAN); |
2154 | | |
2155 | 37.7k | ti_value = proto_tree_add_item(v_tree, hf_dhcp_option_value, tvb, voff+2, optlen, ENC_NA); |
2156 | 37.7k | proto_item_set_hidden(ti_value); |
2157 | | |
2158 | | /* prepare data for dissector table */ |
2159 | 37.7k | option_tvb = tvb_new_subset_length(tvb, voff+2, optlen); |
2160 | 37.7k | option_data.option = code; |
2161 | 37.7k | option_data.overload = overload_p; |
2162 | 37.7k | option_data.dhcp_type = *dhcp_type_p; |
2163 | 37.7k | option_data.vendor_class_id = *vendor_class_id_p; |
2164 | | |
2165 | | /* RFC 3396 4 Applicability and 7 Decoding Agent Behavior both clearly |
2166 | | * state that decoding agents MUST consider any case where an option |
2167 | | * code is repeated as a split option and reassemble it, even for |
2168 | | * options that are not "concatenation-requiring." |
2169 | | * |
2170 | | * However, cf. |
2171 | | * https://www.ietf.org/archive/id/draft-tojens-dhcp-option-concat-considerations-00.html |
2172 | | * which notes that real world DHCP implementations do not do this, and |
2173 | | * that, especially in the case of fixed length option types, this is |
2174 | | * less robust than actually used approaches of interpreting the options |
2175 | | * separately, and choosing one option while discarding others. |
2176 | | * |
2177 | | * XXX - Perhaps we want a preference of which options to concatenate? |
2178 | | */ |
2179 | 37.7k | if (rfc3396_data->total_number_of_block == 1) { |
2180 | 15.6k | if (!dissector_try_uint_with_data(dhcp_option_table, code, option_tvb, pinfo, v_tree, false, &option_data)) { |
2181 | | /* hf_dhcp_option_value is already in tree, just make it visible */ |
2182 | 6.82k | proto_item_set_visible(ti_value); |
2183 | 6.82k | } |
2184 | 22.1k | } else { |
2185 | 22.1k | proto_item *ti; |
2186 | 22.1k | rfc3396_data->index_current_block++; |
2187 | 22.1k | ti = proto_tree_add_string(v_tree, hf_dhcp_option_rfc_3396_detected, tvb, voff+2, optlen, |
2188 | 22.1k | wmem_strdup_printf(pinfo->pool, "%u/%u", rfc3396_data->index_current_block, rfc3396_data->total_number_of_block)); |
2189 | 22.1k | if (optlen) { |
2190 | 11.6k | if (rfc3396_data->tvb_composite == NULL) { |
2191 | 4.29k | rfc3396_data->tvb_composite = tvb_new_composite(); |
2192 | 4.29k | } |
2193 | 11.6k | tvb_composite_append(rfc3396_data->tvb_composite, option_tvb); |
2194 | 11.6k | } |
2195 | 22.1k | if (rfc3396_data->index_current_block != rfc3396_data->total_number_of_block) { |
2196 | 16.3k | expert_add_info_format(pinfo, ti, &ei_dhcp_rfc3396_refer_last_option, "For the data, please refer to the last option %u, %u/%u", code, rfc3396_data->total_number_of_block, rfc3396_data->total_number_of_block); |
2197 | 16.3k | } else if (rfc3396_data->tvb_composite != NULL) { |
2198 | 4.18k | tvb_composite_finalize(rfc3396_data->tvb_composite); |
2199 | 4.18k | add_new_data_source(pinfo, rfc3396_data->tvb_composite, "RFC 3396 Long Option"); |
2200 | 4.18k | if (!dissector_try_uint_with_data(dhcp_option_table, code, rfc3396_data->tvb_composite, pinfo, v_tree, false, &option_data)) { |
2201 | 711 | proto_tree_add_item(v_tree, hf_dhcp_option_value, rfc3396_data->tvb_composite, 0, tvb_reported_length(rfc3396_data->tvb_composite), ENC_NA); |
2202 | 711 | } |
2203 | 4.18k | } else { |
2204 | 1.64k | expert_add_info_format(pinfo, ti, &ei_dhcp_bad_length, "RFC 3396 Long Option with combined length 0"); |
2205 | 1.64k | } |
2206 | 22.1k | } |
2207 | | |
2208 | 37.7k | return consumed; |
2209 | 37.7k | } |
2210 | | |
2211 | | static int |
2212 | | dissect_dhcpopt_policy_filter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2213 | 46 | { |
2214 | 46 | int offset = 0; |
2215 | | |
2216 | 182 | while (tvb_reported_length_remaining(tvb, offset) >= 8) { |
2217 | 136 | proto_tree_add_item(tree, hf_dhcp_option_policy_filter_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
2218 | 136 | offset += 4; |
2219 | 136 | proto_tree_add_item(tree, hf_dhcp_option_policy_filter_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN); |
2220 | 136 | offset += 4; |
2221 | 136 | } |
2222 | | |
2223 | 46 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2224 | 17 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 8"); |
2225 | 17 | } |
2226 | | |
2227 | 46 | return tvb_captured_length(tvb); |
2228 | 46 | } |
2229 | | |
2230 | | static int |
2231 | | dissect_dhcpopt_static_route(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2232 | 73 | { |
2233 | 73 | int offset = 0; |
2234 | | |
2235 | 163 | while (tvb_reported_length_remaining(tvb, offset) >= 8) { |
2236 | 90 | proto_tree_add_item(tree, hf_dhcp_option_static_route_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
2237 | 90 | offset += 4; |
2238 | 90 | proto_tree_add_item(tree, hf_dhcp_option_static_route_router, tvb, offset, 4, ENC_BIG_ENDIAN); |
2239 | 90 | offset += 4; |
2240 | 90 | } |
2241 | | |
2242 | 73 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2243 | 34 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 8"); |
2244 | 34 | } |
2245 | | |
2246 | 73 | return tvb_captured_length(tvb); |
2247 | 73 | } |
2248 | | |
2249 | | typedef unsigned(*test_option_len_t)(unsigned); |
2250 | | |
2251 | | /* Look for 'encapsulated vendor-specific options' */ |
2252 | | static bool |
2253 | | test_encapsulated_vendor_options(tvbuff_t *tvb, int optoff, int optend, test_option_len_t test_len) |
2254 | 1.02k | { |
2255 | 1.02k | uint8_t subopt; |
2256 | 1.02k | uint8_t subopt_len; |
2257 | | |
2258 | 17.6k | while (optoff < optend) { |
2259 | 17.2k | subopt = tvb_get_uint8(tvb, optoff); |
2260 | 17.2k | optoff++; |
2261 | | |
2262 | | /* Skip padding */ |
2263 | 17.2k | if (subopt == 0) |
2264 | 8.40k | continue; |
2265 | | /* We are done, skip any remaining bytes */ |
2266 | 8.83k | if (subopt == 255) |
2267 | 105 | break; |
2268 | | |
2269 | | /* We expect a length byte next */ |
2270 | 8.73k | if (optoff >= optend) |
2271 | 53 | return false; |
2272 | 8.67k | subopt_len = tvb_get_uint8(tvb, optoff); |
2273 | | |
2274 | 8.67k | if (test_len) { |
2275 | 1.44k | unsigned expected_subopt_len = test_len(subopt); |
2276 | 1.44k | if (expected_subopt_len && expected_subopt_len != subopt_len) |
2277 | 27 | return false; |
2278 | 1.44k | } |
2279 | 8.65k | optoff++; |
2280 | | |
2281 | | /* Check remaining room for suboption in option */ |
2282 | 8.65k | if (optoff + subopt_len > optend) |
2283 | 471 | return false; |
2284 | 8.18k | optoff += subopt_len; |
2285 | 8.18k | } |
2286 | 471 | return true; |
2287 | 1.02k | } |
2288 | | |
2289 | | /* Note that Option 43 encapsulated vendor-specific options (RFC 2132 8.4) |
2290 | | * treat option 0 as padding and option 255 as end of suboptions, unlike |
2291 | | * Option 125 which does not treat them specially (RFC 3925 4). |
2292 | | */ |
2293 | | static int |
2294 | | dissect_option43_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
2295 | | tvbuff_t *tvb) |
2296 | 4.10k | { |
2297 | 4.10k | unsigned suboptoff = 0; |
2298 | 4.10k | unsigned optend = tvb_reported_length(tvb); |
2299 | 4.10k | uint8_t subopt; |
2300 | 4.10k | uint32_t subopt_len; |
2301 | 4.10k | proto_item *item; |
2302 | 4.10k | proto_tree *sub_tree; |
2303 | | |
2304 | 4.10k | item = proto_tree_add_item(v_tree, hf_dhcp_option43_suboption, tvb, suboptoff, 1, ENC_NA); |
2305 | 4.10k | subopt = tvb_get_uint8(tvb, suboptoff); |
2306 | | |
2307 | 4.10k | suboptoff+=1; |
2308 | | |
2309 | 4.10k | if (subopt == 0) { |
2310 | | /* Padding */ |
2311 | 2.07k | return suboptoff; |
2312 | 2.07k | } |
2313 | | |
2314 | 2.02k | if (subopt == 255) { |
2315 | | /* END */ |
2316 | | /* XXX - Should there be expert info if there are more bytes? */ |
2317 | 92 | return optend; |
2318 | 92 | } |
2319 | | |
2320 | 1.93k | if (suboptoff >= optend) { |
2321 | 0 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
2322 | 0 | "Suboption %d: no room left in option for suboption length", subopt); |
2323 | 0 | return optend; |
2324 | 0 | } |
2325 | | |
2326 | 1.93k | sub_tree = proto_item_add_subtree(item, ett_dhcp_option43_suboption); |
2327 | 1.93k | proto_tree_add_item_ret_uint(sub_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_NA, &subopt_len); |
2328 | 1.93k | suboptoff++; |
2329 | | |
2330 | 1.93k | if (suboptoff+subopt_len > optend) { |
2331 | 0 | expert_add_info_format(pinfo, item, &ei_dhcp_missing_subopt_value, |
2332 | 0 | "Suboption %d: no room left in option for suboption value", subopt); |
2333 | 0 | return optend; |
2334 | 0 | } |
2335 | | |
2336 | 1.93k | proto_tree_add_item(sub_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
2337 | 1.93k | suboptoff+= subopt_len; |
2338 | | |
2339 | 1.93k | return suboptoff; |
2340 | | |
2341 | 1.93k | } |
2342 | | |
2343 | | static int |
2344 | | dissect_dhcpopt_vendor_specific_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2345 | 1.37k | { |
2346 | 1.37k | heur_dtbl_entry_t *hdtbl_entry; |
2347 | | |
2348 | 1.37k | if (!dissector_try_heuristic(dhcp_vendor_info_subdissector, tvb, pinfo, tree, &hdtbl_entry, data)) { |
2349 | 927 | int offset = 0; |
2350 | 927 | if (test_encapsulated_vendor_options(tvb, offset, tvb_reported_length(tvb), NULL)) { |
2351 | | /* Generic encapsulated options per RFC 2132 8.4 */ |
2352 | 4.53k | while (tvb_reported_length_remaining(tvb, offset)) { |
2353 | 4.10k | offset += dissect_option43_generic_suboption(pinfo, proto_tree_get_parent(tree), tree, tvb_new_subset_remaining(tvb, offset)); |
2354 | 4.10k | } |
2355 | 495 | } else { |
2356 | | /* Default Vendor-Specific Info.. display in bytes */ |
2357 | 495 | proto_tree_add_item(tree, hf_dhcp_option43_value, tvb, offset, tvb_reported_length(tvb), ENC_NA); |
2358 | 495 | } |
2359 | 927 | } |
2360 | | |
2361 | 1.37k | return tvb_captured_length(tvb); |
2362 | 1.37k | } |
2363 | | |
2364 | | static int |
2365 | | dissect_dhcpopt_option_overload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2366 | 4.26k | { |
2367 | 4.26k | int offset = 0; |
2368 | 4.26k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
2369 | | |
2370 | 4.26k | if (tvb_reported_length(tvb) < 1) { |
2371 | 35 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 1"); |
2372 | 35 | return 1; |
2373 | 35 | } |
2374 | | |
2375 | 4.23k | proto_tree_add_item(tree, hf_dhcp_option_option_overload, tvb, offset, 1, ENC_BIG_ENDIAN); |
2376 | 4.23k | if (option_data->overload == NULL) { |
2377 | | // Option Overload inside the overloaded fields is nonsensical |
2378 | 121 | expert_add_info(pinfo, tree, &ei_dhcp_opt_overload_wrong_field); |
2379 | 121 | } |
2380 | | |
2381 | 4.23k | return tvb_captured_length(tvb); |
2382 | 4.26k | } |
2383 | | |
2384 | | static int |
2385 | | dissect_dhcpopt_dhcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2386 | 50 | { |
2387 | 50 | uint32_t type; |
2388 | 50 | char* str_type; |
2389 | | |
2390 | 50 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_dhcp, tvb, 0, 1, ENC_NA, &type); |
2391 | | /* Show the message type name on the Message Type option, and in the protocol root */ |
2392 | 50 | str_type = val_to_str(pinfo->pool, type, opt53_text, "Unknown Message Type (0x%02x)"); |
2393 | 50 | proto_item_append_text(tree, " (%s)", str_type); |
2394 | 50 | proto_item_append_text(proto_item_get_parent(tree), " (%s)", str_type); |
2395 | | |
2396 | 50 | return tvb_captured_length(tvb); |
2397 | 50 | } |
2398 | | |
2399 | | static int |
2400 | | dissect_dhcpopt_param_request_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
2401 | 25 | { |
2402 | 25 | int offset = 0; |
2403 | 25 | uint8_t byte; |
2404 | | |
2405 | 522 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
2406 | 497 | byte = tvb_get_uint8(tvb, offset); |
2407 | 497 | proto_tree_add_uint_format_value(tree, hf_dhcp_option_parameter_request_list_item, |
2408 | 497 | tvb, offset, 1, byte, "(%d) %s", byte, dhcp_get_opt_text(byte)); |
2409 | 497 | offset++; |
2410 | 497 | } |
2411 | | |
2412 | 25 | return tvb_captured_length(tvb); |
2413 | 25 | } |
2414 | | |
2415 | | static int |
2416 | | dissect_dhcpopt_vendor_class_identifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2417 | 1.45k | { |
2418 | 1.45k | heur_dtbl_entry_t *hdtbl_entry; |
2419 | | |
2420 | | /* |
2421 | | * XXX - RFC 2132 says this is a string of octets; |
2422 | | * should we check for non-printables? |
2423 | | */ |
2424 | 1.45k | proto_tree_add_item(tree, hf_dhcp_option_vendor_class_id, tvb, 0, tvb_reported_length(tvb), ENC_ASCII); |
2425 | 1.45k | dissector_try_heuristic(dhcp_vendor_id_subdissector, tvb, pinfo, tree, &hdtbl_entry, data); |
2426 | | |
2427 | 1.45k | return tvb_captured_length(tvb); |
2428 | 1.45k | } |
2429 | | |
2430 | | static int |
2431 | | dissect_dhcpopt_client_identifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2432 | 183 | { |
2433 | 183 | int offset = 0; |
2434 | 183 | int length = tvb_reported_length(tvb); |
2435 | 183 | unsigned char byte; |
2436 | | |
2437 | 183 | if (length > 0) |
2438 | 154 | byte = tvb_get_uint8(tvb, offset); |
2439 | 29 | else |
2440 | 29 | byte = 0; |
2441 | | |
2442 | | /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll |
2443 | | guess that the first is the hwtype, and the last 6 |
2444 | | are the hw addr */ |
2445 | | /* See https://www.iana.org/assignments/arp-parameters */ |
2446 | | /* RFC2132 9.14 Client-identifier has the following to say: |
2447 | | A hardware type of 0 (zero) should be used when the value |
2448 | | field contains an identifier other than a hardware address |
2449 | | (e.g. a fully qualified domain name). */ |
2450 | | |
2451 | 183 | if (length == 7 && byte > 0 && byte < 48) { |
2452 | 11 | proto_tree_add_item(tree, hf_dhcp_hw_type, tvb, offset, 1, ENC_NA); |
2453 | | |
2454 | 11 | if (byte == ARPHRD_ETHER || byte == ARPHRD_IEEE802) |
2455 | 7 | proto_tree_add_item(tree, hf_dhcp_hw_ether_addr, tvb, offset+1, 6, ENC_NA); |
2456 | 4 | else |
2457 | 4 | proto_tree_add_string(tree, hf_dhcp_client_hardware_address, tvb, offset+1, 6, |
2458 | 4 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+1, 6, byte)); |
2459 | 172 | } else if (length == 17 && byte == 0) { |
2460 | | /* Identifier is a UUID */ |
2461 | 2 | proto_tree_add_item(tree, hf_dhcp_client_identifier_uuid, tvb, offset + 1, 16, dhcp_uuid_endian); |
2462 | | |
2463 | | /* From RFC 4361 paragraph 6.1 DHCPv4 Client Behavior: |
2464 | | To send an RFC 3315-style binding identifier in a DHCPv4 'client |
2465 | | identifier' option, the type of the 'client identifier' option is set |
2466 | | to 255. */ |
2467 | 170 | } else if (byte == 255) { |
2468 | 77 | uint16_t duidtype; |
2469 | 77 | uint16_t hwtype; |
2470 | | |
2471 | | /* The type field is immediately followed by the IAID, which is |
2472 | | an opaque 32-bit quantity */ |
2473 | 77 | proto_tree_add_string(tree, hf_dhcp_client_id_iaid, tvb, offset+1, 4, |
2474 | 77 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+1, 4, byte)); |
2475 | 77 | offset += 5; |
2476 | 77 | duidtype = tvb_get_ntohs(tvb, offset); |
2477 | 77 | proto_tree_add_item(tree, hf_dhcp_client_id_duid_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
2478 | 77 | switch (duidtype) { |
2479 | 33 | case DUID_LLT: |
2480 | 33 | if (length < 8) { |
2481 | 1 | expert_add_info(pinfo, tree, &ei_dhcp_mal_duid); |
2482 | 1 | break; |
2483 | 1 | } |
2484 | 32 | hwtype=tvb_get_ntohs(tvb, offset + 2); |
2485 | 32 | proto_tree_add_item(tree, hf_dhcp_client_identifier_duid_llt_hw_type, |
2486 | 32 | tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
2487 | | |
2488 | | /* XXX seconds since Jan 1 2000 */ |
2489 | 32 | proto_tree_add_item(tree, hf_dhcp_client_identifier_time, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
2490 | 32 | if (length > 8) { |
2491 | 31 | proto_tree_add_string(tree, hf_dhcp_client_identifier_link_layer_address, tvb, offset + 8, |
2492 | 31 | length - 13, tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+8, length-13, hwtype)); |
2493 | 31 | if(DHCP_HW_IS_ETHER(hwtype, length-13)) { |
2494 | 1 | proto_tree_add_item(tree, hf_dhcp_client_identifier_link_layer_address_ether, |
2495 | 1 | tvb, offset+8, length-13, ENC_NA); |
2496 | 1 | } |
2497 | 31 | } |
2498 | 32 | break; |
2499 | 8 | case DUID_EN: |
2500 | 8 | if (length < 6) { |
2501 | 0 | expert_add_info(pinfo, tree, &ei_dhcp_mal_duid); |
2502 | 0 | break; |
2503 | 0 | } |
2504 | 8 | proto_tree_add_item(tree, hf_dhcp_client_identifier_enterprise_num, tvb, offset + 2, 4, ENC_BIG_ENDIAN); |
2505 | 8 | if (length > 6) { |
2506 | 8 | proto_tree_add_item(tree, hf_dhcp_client_identifier, tvb, offset + 6, length - 11, ENC_NA); |
2507 | 8 | } |
2508 | 8 | break; |
2509 | 33 | case DUID_LL: |
2510 | 33 | if (length < 4) { |
2511 | 0 | expert_add_info(pinfo, tree, &ei_dhcp_mal_duid); |
2512 | 0 | break; |
2513 | 0 | } |
2514 | 33 | hwtype=tvb_get_ntohs(tvb, offset + 2); |
2515 | 33 | proto_tree_add_item(tree, hf_dhcp_client_identifier_duid_ll_hw_type, |
2516 | 33 | tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
2517 | | |
2518 | 33 | if (length > 4) { |
2519 | 33 | proto_tree_add_string(tree, hf_dhcp_client_identifier_link_layer_address, tvb, offset + 4, |
2520 | 33 | length - 9, tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+4, length-9, hwtype)); |
2521 | 33 | if(DHCP_HW_IS_ETHER(hwtype, length-9)) { |
2522 | 1 | proto_tree_add_item(tree, hf_dhcp_client_identifier_link_layer_address_ether, |
2523 | 1 | tvb, offset+4, length-9, ENC_NA); |
2524 | 1 | } |
2525 | 33 | } |
2526 | 33 | break; |
2527 | 77 | } |
2528 | 93 | } else if (byte == 0 && length > 1) { |
2529 | | /* identifier other than a hardware address (e.g. a fully qualified domain name) */ |
2530 | 10 | proto_tree_add_item(tree, hf_dhcp_client_identifier_type, tvb, offset, 1, ENC_NA); |
2531 | 10 | proto_tree_add_item(tree, hf_dhcp_client_identifier_undef, tvb, offset+1, length-1, ENC_ASCII); |
2532 | 83 | } else { |
2533 | | /* otherwise, it's opaque data */ |
2534 | 83 | } |
2535 | | |
2536 | 182 | return tvb_captured_length(tvb); |
2537 | 183 | } |
2538 | | |
2539 | | static int |
2540 | | dissect_dhcpopt_user_class_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2541 | 52 | { |
2542 | 52 | unsigned char user_class_instance_index = 0; |
2543 | 52 | int offset = 0; |
2544 | 52 | proto_item *vtix, *len_item; |
2545 | 52 | proto_tree *o77_v_tree; |
2546 | 52 | unsigned class_length, uci_len = tvb_reported_length(tvb); |
2547 | 52 | if (uci_len < 2) { |
2548 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 2"); |
2549 | 10 | return 1; |
2550 | 10 | } |
2551 | | |
2552 | | /* First byte is the length of User Class data. If it is zero, then let's assume this |
2553 | | * is a Microsoft variant that has the two-byte length field with most-significant byte |
2554 | | * as zero. |
2555 | | */ |
2556 | 42 | uint16_t ms_data_length = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN); |
2557 | 42 | if (ms_data_length <= 0xff) { |
2558 | | /* MSB is zero, this is Microsoft */ |
2559 | 6 | proto_tree_add_uint(tree, hf_dhcp_option77_user_class_binary_data_length, tvb, offset, 2, ms_data_length); |
2560 | 6 | offset += 2; |
2561 | 6 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_binary_data, tvb, offset, ms_data_length, ENC_STRING); |
2562 | 6 | offset += ms_data_length; |
2563 | | /* User Class Binary Data is padded to 4-byte boundary */ |
2564 | 6 | uint16_t padding_length = WS_PADDING_TO_4(ms_data_length); |
2565 | 6 | if (padding_length > 0) { |
2566 | 2 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_padding, tvb, offset, padding_length, ENC_NA); |
2567 | 2 | offset += padding_length; |
2568 | 2 | } |
2569 | 6 | uint32_t len; |
2570 | 6 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option77_user_class_name_length, tvb, offset, 2, ENC_BIG_ENDIAN, &len); |
2571 | 6 | offset += 2; |
2572 | 6 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_name, tvb, offset, len, ENC_UTF_16); |
2573 | 6 | offset += len; |
2574 | 6 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option77_user_class_description_length, tvb, offset, 2, ENC_BIG_ENDIAN, &len); |
2575 | 6 | offset += 2; |
2576 | 6 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_description, tvb, offset, len, ENC_UTF_16); |
2577 | | |
2578 | 6 | return tvb_captured_length(tvb); |
2579 | 6 | } |
2580 | | |
2581 | 316 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
2582 | 314 | class_length = tvb_get_uint8(tvb, offset); |
2583 | 314 | if (class_length >= uci_len) { |
2584 | | /* Having the sum of the User Class data lengths exceed the total User Option Information length (uci_len) |
2585 | | * is a violation of RFC 3004. In that case the remaining data is treated as a non-conformant (text) option. |
2586 | | * This check will also catch the Microsoft 'variation' implementation (when Vendor class identifier contains |
2587 | | * "MSFT 5.0") such as "RRAS.Microsoft" and others like "iPXE". |
2588 | | * In the unlikely case that the first character can be interpreted as a valid length the next iteration |
2589 | | * of this while loop will catch that. |
2590 | | * https://gitlab.com/wireshark/wireshark/-/issues/16349 |
2591 | | * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dhcpe/fe8a2dd4-1e8c-4546-bacd-4ae10de02058 |
2592 | | */ |
2593 | 29 | proto_item *expert_ti = proto_tree_add_item(tree, hf_dhcp_option77_user_class_text, tvb, offset, uci_len, ENC_ASCII); |
2594 | 29 | expert_add_info(pinfo, expert_ti, &ei_dhcp_nonstd_option_data); |
2595 | 29 | break; |
2596 | 29 | } |
2597 | | |
2598 | | /* Create subtree for instance of User Class. */ |
2599 | 285 | vtix = proto_tree_add_uint_format_value(tree, hf_dhcp_option77_user_class, |
2600 | 285 | tvb, offset, 1, user_class_instance_index, "[%d]", user_class_instance_index); |
2601 | 285 | o77_v_tree = proto_item_add_subtree(vtix, ett_dhcp_option77_instance); |
2602 | | |
2603 | | /* Add length for instance of User Class. */ |
2604 | 285 | len_item = proto_tree_add_uint(o77_v_tree, hf_dhcp_option77_user_class_length, tvb, offset, 1, class_length); |
2605 | 285 | proto_item_set_len(vtix, class_length+1); |
2606 | 285 | offset++; |
2607 | | |
2608 | 285 | if (class_length == 0) { |
2609 | 5 | expert_add_info_format(pinfo, len_item, &ei_dhcp_bad_length, "UC_Len_%u isn't >= 1 (UC_Len_%u = 0)", user_class_instance_index, user_class_instance_index); |
2610 | 5 | break; |
2611 | 5 | } |
2612 | | |
2613 | | /* Add data for instance of User Class. */ |
2614 | 280 | proto_tree_add_item(o77_v_tree, hf_dhcp_option77_user_class_data, tvb, offset, class_length, ENC_NA); |
2615 | | |
2616 | 280 | offset += class_length; |
2617 | 280 | uci_len -= class_length + 1; |
2618 | 280 | user_class_instance_index++; |
2619 | 280 | } |
2620 | | |
2621 | 36 | return tvb_captured_length(tvb); |
2622 | 42 | } |
2623 | | |
2624 | | static int |
2625 | | dissect_dhcpopt_slp_directory_agent(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2626 | 53 | { |
2627 | 53 | int offset = 0; |
2628 | 53 | uint32_t byte; |
2629 | | |
2630 | 53 | if (tvb_reported_length(tvb) < 1) { |
2631 | 6 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 1"); |
2632 | 6 | return 1; |
2633 | 6 | } |
2634 | | |
2635 | 47 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_slp_directory_agent_value, tvb, offset, 1, ENC_BIG_ENDIAN, &byte); |
2636 | 47 | offset++; |
2637 | | |
2638 | 47 | if (byte == 0x80) { |
2639 | 5 | if (tvb_reported_length_remaining(tvb, offset) == 0) |
2640 | 1 | return offset; |
2641 | | |
2642 | 4 | offset++; |
2643 | 4 | } |
2644 | | |
2645 | 866 | while (tvb_reported_length_remaining(tvb, offset) >= 4) { |
2646 | 820 | proto_tree_add_item(tree, hf_dhcp_option_slp_directory_agent_slpda_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
2647 | 820 | offset += 4; |
2648 | 820 | } |
2649 | | |
2650 | 46 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2651 | 29 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
2652 | 29 | } |
2653 | | |
2654 | 46 | return tvb_captured_length(tvb); |
2655 | 47 | } |
2656 | | |
2657 | | static int |
2658 | | dissect_dhcpopt_slp_service_scope(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
2659 | 8 | { |
2660 | 8 | int offset = 0; |
2661 | | |
2662 | 8 | proto_tree_add_item(tree, hf_dhcp_option_slp_service_scope_value, tvb, offset, 1, ENC_BIG_ENDIAN); |
2663 | | |
2664 | 8 | offset++; |
2665 | 8 | proto_tree_add_item(tree, hf_dhcp_option_slp_service_scope_string, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
2666 | | |
2667 | 8 | return tvb_captured_length(tvb); |
2668 | 8 | } |
2669 | | |
2670 | | static int |
2671 | | dissect_dhcpopt_client_full_domain_name(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2672 | 21 | { |
2673 | 21 | static int * const fqdn_hf_flags[] = { |
2674 | 21 | &hf_dhcp_fqdn_mbz, |
2675 | 21 | &hf_dhcp_fqdn_n, |
2676 | 21 | &hf_dhcp_fqdn_e, |
2677 | 21 | &hf_dhcp_fqdn_o, |
2678 | 21 | &hf_dhcp_fqdn_s, |
2679 | 21 | NULL |
2680 | 21 | }; |
2681 | 21 | uint8_t fqdn_flags; |
2682 | 21 | int offset = 0, length = tvb_reported_length(tvb); |
2683 | 21 | const char *dns_name; |
2684 | 21 | int dns_name_len; |
2685 | | |
2686 | 21 | if (length < 3) { |
2687 | 8 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 3"); |
2688 | 8 | return 1; |
2689 | 8 | } |
2690 | | |
2691 | 13 | fqdn_flags = tvb_get_uint8(tvb, offset); |
2692 | 13 | proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_fqdn_flags, |
2693 | 13 | ett_dhcp_fqdn_flags, fqdn_hf_flags, ENC_BIG_ENDIAN); |
2694 | | |
2695 | | /* XXX: use code from packet-dns for return code decoding */ |
2696 | 13 | proto_tree_add_item(tree, hf_dhcp_fqdn_rcode1, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
2697 | | /* XXX: use code from packet-dns for return code decoding */ |
2698 | 13 | proto_tree_add_item(tree, hf_dhcp_fqdn_rcode2, tvb, offset+2, 1, ENC_BIG_ENDIAN); |
2699 | | |
2700 | 13 | if (length > 3) { |
2701 | 12 | if (fqdn_flags & F_FQDN_E) { |
2702 | 5 | get_dns_name(pinfo->pool, tvb, offset+3, length-3, offset+3, &dns_name, &dns_name_len); |
2703 | 5 | proto_tree_add_string(tree, hf_dhcp_fqdn_name, |
2704 | 5 | tvb, offset+3, length-3, format_text(pinfo->pool, dns_name, dns_name_len)); |
2705 | 7 | } else { |
2706 | 7 | proto_tree_add_item(tree, hf_dhcp_fqdn_asciiname, tvb, offset+3, length-3, ENC_ASCII); |
2707 | 7 | } |
2708 | 12 | } |
2709 | | |
2710 | 13 | return tvb_captured_length(tvb); |
2711 | 21 | } |
2712 | | |
2713 | | static int |
2714 | | dissect_dhcpopt_novell_servers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2715 | 20 | { |
2716 | 20 | int offset = 0; |
2717 | | |
2718 | | /* Option 85 can be sent as a string */ |
2719 | | /* Added by Greg Morris (gmorris[AT]novell.com) */ |
2720 | 20 | if (novell_string) { |
2721 | 0 | proto_tree_add_item(tree, hf_dhcp_option_novell_dss_string, tvb, offset, tvb_reported_length(tvb), ENC_ASCII); |
2722 | 20 | } else { |
2723 | | /* IP addresses */ |
2724 | 277 | while (tvb_reported_length_remaining(tvb, offset) >= 4) { |
2725 | | |
2726 | 257 | proto_tree_add_item(tree, hf_dhcp_option_novell_dss_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
2727 | 257 | offset += 4; |
2728 | 257 | } |
2729 | | |
2730 | 20 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2731 | 9 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
2732 | 9 | } |
2733 | 20 | } |
2734 | | |
2735 | 20 | return tvb_captured_length(tvb); |
2736 | 20 | } |
2737 | | |
2738 | | static int |
2739 | | dissect_dhcpopt_dhcp_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2740 | 50 | { |
2741 | 50 | int offset = 0; |
2742 | 50 | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
2743 | 50 | uint32_t protocol, rdm; |
2744 | 50 | uint8_t algorithm; |
2745 | | |
2746 | 50 | if (tvb_reported_length(tvb) < 11) { |
2747 | 15 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 11"); |
2748 | 15 | return 1; |
2749 | 15 | } |
2750 | | |
2751 | 35 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_dhcp_authentication_protocol, tvb, offset, 1, ENC_BIG_ENDIAN, &protocol); |
2752 | 35 | offset++; |
2753 | | |
2754 | 35 | algorithm = tvb_get_uint8(tvb, offset); |
2755 | 35 | switch (protocol) { |
2756 | | |
2757 | 23 | case AUTHEN_PROTO_DELAYED_AUTHEN: |
2758 | 23 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_alg_delay, tvb, offset, 1, ENC_BIG_ENDIAN); |
2759 | 23 | break; |
2760 | | |
2761 | 12 | default: |
2762 | 12 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_algorithm, tvb, offset, 1, ENC_BIG_ENDIAN); |
2763 | 12 | break; |
2764 | 35 | } |
2765 | 35 | offset++; |
2766 | | |
2767 | 35 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_dhcp_authentication_rdm, tvb, offset, 1, ENC_BIG_ENDIAN, &rdm); |
2768 | 35 | offset++; |
2769 | | |
2770 | 35 | switch (rdm) { |
2771 | | |
2772 | 8 | case AUTHEN_RDM_MONOTONIC_COUNTER: |
2773 | 8 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_rdm_replay_detection, tvb, offset, 8, ENC_BIG_ENDIAN); |
2774 | 8 | break; |
2775 | | |
2776 | 27 | default: |
2777 | 27 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_rdm_rdv, tvb, offset, 8, ENC_ASCII); |
2778 | 27 | break; |
2779 | 35 | } |
2780 | 35 | offset += 8; |
2781 | | |
2782 | 35 | switch (protocol) { |
2783 | | |
2784 | 23 | case AUTHEN_PROTO_DELAYED_AUTHEN: |
2785 | 23 | switch (algorithm) { |
2786 | | |
2787 | 8 | case AUTHEN_DELAYED_ALGO_HMAC_MD5: |
2788 | 8 | if (option_data->dhcp_type && !strcmp(option_data->dhcp_type, OPT53_DISCOVER)) { |
2789 | | /* Discover has no Secret ID nor HMAC MD5 Hash */ |
2790 | 1 | break; |
2791 | 7 | } else { |
2792 | 7 | if (tvb_reported_length_remaining(tvb, offset) < 20) { |
2793 | 6 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 20"); |
2794 | 6 | break; |
2795 | 6 | } |
2796 | | |
2797 | 1 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_secret_id, tvb, offset, 4, ENC_BIG_ENDIAN); |
2798 | 1 | offset += 4; |
2799 | 1 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_hmac_md5_hash, tvb, offset, 16, ENC_NA); |
2800 | 1 | break; |
2801 | 7 | } |
2802 | | |
2803 | 15 | default: |
2804 | 15 | if (tvb_reported_length_remaining(tvb, offset) == 0) |
2805 | 2 | break; |
2806 | | |
2807 | 13 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_information, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
2808 | 13 | break; |
2809 | 23 | } |
2810 | 23 | break; |
2811 | | |
2812 | 23 | default: |
2813 | 12 | if (tvb_reported_length_remaining(tvb, offset) == 0) |
2814 | 1 | break; |
2815 | | |
2816 | 11 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_information, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
2817 | 11 | break; |
2818 | 35 | } |
2819 | | |
2820 | 35 | return tvb_captured_length(tvb); |
2821 | 35 | } |
2822 | | |
2823 | | static int |
2824 | | dissect_dhcpopt_client_architecture(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2825 | 127 | { |
2826 | 127 | int offset = 0; |
2827 | | |
2828 | 1.33k | while (tvb_reported_length_remaining(tvb, offset) > 1) { |
2829 | 1.21k | uint32_t architecture_id; |
2830 | 1.21k | proto_item *pi; |
2831 | | |
2832 | 1.21k | pi = proto_tree_add_item_ret_uint(tree, hf_dhcp_option_client_system_architecture, tvb, offset, 2, ENC_BIG_ENDIAN, &architecture_id); |
2833 | 1.21k | offset += 2; |
2834 | | |
2835 | | /* |
2836 | | * Some Client Architecture IDs are widely misused. For |
2837 | | * details, refer to the comment at the definition of |
2838 | | * dhcp_client_arch. |
2839 | | * |
2840 | | * The most common problem is a client using architecture ID 9 |
2841 | | * when performing an EFI x64 boot. Windows Server 2008 WDS |
2842 | | * does not recognize ID 9, but most other DHCP servers |
2843 | | * (including newer versions of WDS) silently map architecture |
2844 | | * ID 9 to x64 in order to accommodate these clients. |
2845 | | */ |
2846 | 1.21k | if (architecture_id == 9) { |
2847 | 138 | expert_add_info_format(pinfo, pi, &ei_dhcp_option93_client_arch_ambiguous, "Client Architecture ID 9 is often incorrectly used for EFI x64"); |
2848 | 138 | } |
2849 | | |
2850 | | /* |
2851 | | * Technically, architecture ID 7 is ambiguous for the same |
2852 | | * reason, but it's extremely unlikely to be a real world |
2853 | | * problem, so a warning would probably just be unwelcome |
2854 | | * noise. |
2855 | | */ |
2856 | 1.21k | } |
2857 | 127 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2858 | 18 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 2"); |
2859 | 18 | } |
2860 | | |
2861 | 127 | return tvb_captured_length(tvb); |
2862 | 127 | } |
2863 | | |
2864 | | static int |
2865 | | dissect_dhcpopt_client_network_interface_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
2866 | 10 | { |
2867 | 10 | int offset = 0; |
2868 | 10 | uint8_t id_type; |
2869 | | |
2870 | 10 | id_type = tvb_get_uint8(tvb, offset); |
2871 | 10 | offset++; |
2872 | | |
2873 | 10 | if (id_type == 0x01) { |
2874 | 3 | proto_tree_add_item(tree, hf_dhcp_option_client_network_id_major_ver, |
2875 | 3 | tvb, offset, 1, ENC_LITTLE_ENDIAN); |
2876 | 3 | offset++; |
2877 | 3 | proto_tree_add_item(tree, hf_dhcp_option_client_network_id_minor_ver, |
2878 | 3 | tvb, offset, 1, ENC_LITTLE_ENDIAN); |
2879 | 3 | } |
2880 | | |
2881 | 10 | return tvb_captured_length(tvb); |
2882 | 10 | } |
2883 | | |
2884 | | static int |
2885 | | dissect_dhcpopt_client_identifier_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2886 | 35 | { |
2887 | 35 | int offset = 0, length = tvb_reported_length(tvb); |
2888 | 35 | uint8_t byte; |
2889 | | |
2890 | 35 | if (length > 0) |
2891 | 27 | byte = tvb_get_uint8(tvb, offset); |
2892 | 8 | else |
2893 | 8 | byte = 0; |
2894 | | |
2895 | | /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll |
2896 | | guess that the first is the hwtype, and the last 6 |
2897 | | are the hw addr */ |
2898 | | /* See https://www.iana.org/assignments/arp-parameters */ |
2899 | | /* RFC2132 9.14 Client-identifier has the following to say: |
2900 | | A hardware type of 0 (zero) should be used when the value |
2901 | | field contains an identifier other than a hardware address |
2902 | | (e.g. a fully qualified domain name). */ |
2903 | | |
2904 | 35 | if (length == 7 && byte > 0 && byte < 48) { |
2905 | 9 | proto_tree_add_item(tree, hf_dhcp_hw_type, tvb, offset, 1, ENC_NA); |
2906 | 9 | if (byte == ARPHRD_ETHER || byte == ARPHRD_IEEE802) |
2907 | 2 | proto_tree_add_item(tree, hf_dhcp_hw_ether_addr, tvb, offset+1, 6, ENC_NA); |
2908 | 7 | else |
2909 | 7 | proto_tree_add_string(tree, hf_dhcp_client_hardware_address, tvb, offset+1, 6, |
2910 | 7 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+1, 6, byte)); |
2911 | 26 | } else if (length == 17 && byte == 0) { |
2912 | | /* Identifier is a UUID */ |
2913 | 1 | proto_tree_add_item(tree, hf_dhcp_client_identifier_uuid, tvb, offset + 1, 16, dhcp_uuid_endian); |
2914 | 25 | } else { |
2915 | | /* otherwise, it's opaque data */ |
2916 | 25 | } |
2917 | | |
2918 | 35 | return tvb_captured_length(tvb); |
2919 | 35 | } |
2920 | | |
2921 | | static int |
2922 | | dissect_dhcpopt_civic_location(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2923 | 48 | { |
2924 | 48 | int offset = 0; |
2925 | | |
2926 | 48 | if (tvb_reported_length(tvb) >= 3) |
2927 | 37 | { |
2928 | 37 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_what, tvb, offset, 1, ENC_BIG_ENDIAN); |
2929 | 37 | offset++; |
2930 | 37 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_country, tvb, offset, 2, ENC_ASCII); |
2931 | 37 | offset += 2; |
2932 | | |
2933 | 693 | while (tvb_reported_length_remaining(tvb, offset) >= 2) |
2934 | 684 | { |
2935 | 684 | uint32_t calength; |
2936 | 684 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_ca_type, tvb, offset, 1, ENC_BIG_ENDIAN); |
2937 | 684 | offset++; |
2938 | 684 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_civic_location_ca_length, tvb, offset, 1, ENC_BIG_ENDIAN, &calength); |
2939 | 684 | offset++; |
2940 | | |
2941 | 684 | if (calength == 0) |
2942 | 351 | continue; |
2943 | | |
2944 | 333 | if (tvb_reported_length_remaining(tvb, offset) >= (int)calength) |
2945 | 305 | { |
2946 | 305 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_ca_value, tvb, offset, calength, ENC_ASCII); |
2947 | 305 | offset += calength; |
2948 | 305 | } |
2949 | 28 | else |
2950 | 28 | { |
2951 | 28 | expert_add_info(pinfo, tree, &ei_dhcp_option_civic_location_bad_cattype); |
2952 | 28 | break; |
2953 | 28 | } |
2954 | 333 | } |
2955 | 37 | } |
2956 | | |
2957 | 48 | return tvb_captured_length(tvb); |
2958 | 48 | } |
2959 | | |
2960 | | static int |
2961 | | dissect_dhcpopt_name_server_search(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2962 | 66 | { |
2963 | 66 | int offset = 0, length = tvb_reported_length(tvb); |
2964 | 66 | uint16_t ns; |
2965 | | |
2966 | 66 | if (length < 2) { |
2967 | 11 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 2"); |
2968 | 11 | return 1; |
2969 | 55 | } else if (length & 1) { |
2970 | 7 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length (%u) isn't even number", length); |
2971 | 7 | return 1; |
2972 | 7 | } |
2973 | | |
2974 | 3.49k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
2975 | 3.44k | ns = tvb_get_ntohs(tvb, offset); |
2976 | | /* XXX - Make this a value_string */ |
2977 | 3.44k | switch (ns) { |
2978 | 530 | case RFC2937_LOCAL_NAMING_INFORMATION: |
2979 | 530 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Local naming information (e.g., an /etc/hosts file on a UNIX machine) (0)"); |
2980 | 530 | break; |
2981 | 85 | case RFC2937_DOMAIN_NAME_SERVER_OPTION: |
2982 | 85 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Domain Name Server Option (6)"); |
2983 | 85 | break; |
2984 | 114 | case RFC2937_NETWORK_INFORMATION_SERVERS_OPTION: |
2985 | 114 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Network Information Servers Option (41)"); |
2986 | 114 | break; |
2987 | 96 | case RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION: |
2988 | 96 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "NetBIOS over TCP/IP Name Server Option (44)"); |
2989 | 96 | break; |
2990 | 127 | case RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION: |
2991 | 127 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Network Information Service+ Servers Option (65)"); |
2992 | 127 | break; |
2993 | 2.49k | default: |
2994 | 2.49k | expert_add_info_format(pinfo, tree, &ei_dhcp_option_dhcp_name_service_invalid, |
2995 | 2.49k | "Invalid Name Service (%u). RFC 2937 defines only 0, 6, 41, 44, and 65 as possible values.", ns); |
2996 | 2.49k | break; |
2997 | 3.44k | } |
2998 | 3.44k | offset += 2; |
2999 | 3.44k | } |
3000 | | |
3001 | 48 | return tvb_captured_length(tvb); |
3002 | 48 | } |
3003 | | |
3004 | | static int |
3005 | | dissect_dhcpopt_dhcp_domain_search(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3006 | 246 | { |
3007 | 246 | int length = tvb_reported_length(tvb); |
3008 | 246 | int offset = 0; |
3009 | 246 | char *name_out; |
3010 | 246 | const char *dns_name; |
3011 | 246 | int dns_name_len; |
3012 | | |
3013 | | /* Domain Names - Implementation And Specification (RFC 1035) */ |
3014 | | |
3015 | | /* We will display the information about fqdn */ |
3016 | 246 | int consumedx = 0; |
3017 | | |
3018 | 11.0k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3019 | | /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */ |
3020 | 10.8k | consumedx = get_dns_name(pinfo->pool, tvb, offset, |
3021 | 10.8k | length, 0, &dns_name, &dns_name_len); |
3022 | 10.8k | name_out = format_text(pinfo->pool, dns_name, dns_name_len); |
3023 | 10.8k | proto_tree_add_string(tree, hf_dhcp_option_dhcp_dns_domain_search_list_fqdn, tvb, offset, consumedx, name_out); |
3024 | 10.8k | offset += consumedx; |
3025 | 10.8k | } |
3026 | | |
3027 | 246 | return tvb_captured_length(tvb); |
3028 | 246 | } |
3029 | | |
3030 | | static int |
3031 | | dissect_dhcpopt_sip_servers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3032 | 39 | { |
3033 | 39 | int length = tvb_reported_length(tvb); |
3034 | 39 | int offset = 0; |
3035 | 39 | const char *dns_name; |
3036 | 39 | int dns_name_len; |
3037 | 39 | char *name_out; |
3038 | | |
3039 | | /* Domain Names - Implementation And Specification (RFC 1035) */ |
3040 | | /* We will display the information about SIP server */ |
3041 | 39 | uint32_t enc; |
3042 | | |
3043 | 39 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_sip_server_enc, tvb, offset, 1, ENC_NA, &enc); |
3044 | 39 | offset += 1; |
3045 | | |
3046 | 39 | switch (enc) { |
3047 | 18 | case RFC_3361_ENC_FQDN: { |
3048 | 18 | int consumedx = 0; |
3049 | 18 | if (length < 3) { |
3050 | 3 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 3 (len = %u)", length); |
3051 | 3 | break; |
3052 | 3 | } |
3053 | | |
3054 | 405 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3055 | | /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */ |
3056 | 390 | consumedx = get_dns_name(pinfo->pool, tvb, offset, length, |
3057 | 390 | 1 /* ignore enc */, &dns_name, &dns_name_len); |
3058 | 390 | name_out = format_text(pinfo->pool, dns_name, dns_name_len); |
3059 | | |
3060 | 390 | proto_tree_add_string(tree, hf_dhcp_option_sip_server_name, tvb, offset, consumedx, name_out); |
3061 | 390 | offset += consumedx; |
3062 | 390 | } |
3063 | 15 | break; |
3064 | 18 | } |
3065 | 17 | case RFC_3361_ENC_IPADDR: |
3066 | 17 | if (length < 5) { |
3067 | 3 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 5 (len = %u)", length); |
3068 | 3 | break; |
3069 | 3 | } |
3070 | | /* x % 2^n == x & (2^n - 1) note : (assuming x is a positive integer) */ |
3071 | 14 | if ((length - 1) & 3) { |
3072 | 3 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", length); |
3073 | 3 | break; |
3074 | 3 | } |
3075 | 277 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3076 | 266 | proto_tree_add_item(tree, hf_dhcp_option_sip_server_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
3077 | 266 | offset += 4; |
3078 | 266 | } |
3079 | 11 | break; |
3080 | 4 | default: |
3081 | 4 | expert_add_info_format(pinfo, tree, &ei_dhcp_option_sip_server_address_encoding, "RFC 3361 defines only 0 and 1 for Encoding byte (Encoding = %u).", enc); |
3082 | 4 | break; |
3083 | 39 | } |
3084 | | |
3085 | 26 | return tvb_captured_length(tvb); |
3086 | 39 | } |
3087 | | |
3088 | | static int |
3089 | | dissect_dhcpopt_classless_static_route(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3090 | 94 | { |
3091 | 94 | int offset = 0; |
3092 | 94 | int i, mask_width, significant_octets; |
3093 | 94 | proto_item* route_item; |
3094 | | |
3095 | | /* minimum length is 5 bytes */ |
3096 | 94 | if (tvb_reported_length(tvb) < 5) { |
3097 | 27 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 5"); |
3098 | 27 | return 1; |
3099 | 27 | } |
3100 | 1.02k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3101 | 1.00k | mask_width = tvb_get_uint8(tvb, offset); |
3102 | | /* mask_width <= 32 */ |
3103 | 1.00k | if (mask_width > 32) { |
3104 | 44 | expert_add_info_format(pinfo, tree, &ei_dhcp_option_classless_static_route, "Mask width (%d) > 32", mask_width); |
3105 | 44 | break; |
3106 | 44 | } |
3107 | 961 | significant_octets = (mask_width + 7) / 8; |
3108 | 961 | route_item = proto_tree_add_bytes_format(tree, hf_dhcp_option_classless_static_route, tvb, offset, |
3109 | 961 | 1 + significant_octets + 4, NULL, " "); |
3110 | 961 | offset++; |
3111 | | /* significant octets + router(4) */ |
3112 | 961 | if (tvb_reported_length_remaining(tvb, offset + significant_octets + 4) < 0) { |
3113 | 0 | expert_add_info_format(pinfo, route_item, &ei_dhcp_bad_length, "Remaining length (%d) < %d bytes", tvb_reported_length_remaining(tvb, offset), significant_octets + 4); |
3114 | 0 | break; |
3115 | 0 | } |
3116 | 961 | if(mask_width == 0) |
3117 | 367 | proto_item_append_text(route_item, "default"); |
3118 | 594 | else { |
3119 | 1.73k | for(i = 0 ; i < significant_octets ; i++) { |
3120 | 1.14k | if (i > 0) |
3121 | 559 | proto_item_append_text(route_item, "."); |
3122 | 1.14k | proto_item_append_text(route_item, "%d", tvb_get_uint8(tvb, offset++)); |
3123 | 1.14k | } |
3124 | 1.78k | for(i = significant_octets ; i < 4 ; i++) |
3125 | 1.18k | proto_item_append_text(route_item, ".0"); |
3126 | 594 | proto_item_append_text(route_item, "/%d", mask_width); |
3127 | 594 | } |
3128 | 961 | proto_item_append_text(route_item, "-%s", tvb_ip_to_str(pinfo->pool, tvb, offset)); |
3129 | 961 | offset += 4; |
3130 | 961 | } |
3131 | | |
3132 | 67 | return tvb_captured_length(tvb); |
3133 | 94 | } |
3134 | | |
3135 | | static int |
3136 | | dissect_dhcpopt_coordinate_based_location(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3137 | 72 | { |
3138 | 72 | int offset = 0, length = tvb_reported_length(tvb); |
3139 | 72 | proto_item* ti; |
3140 | | |
3141 | 72 | if (length == 16) { |
3142 | 59 | int ret; |
3143 | 59 | unsigned char lci[16]; |
3144 | 59 | struct rfc3825_location_fixpoint_t location_fp; |
3145 | 59 | struct rfc3825_location_decimal_t location; |
3146 | | |
3147 | 59 | tvb_memcpy(tvb, lci, offset, 16); |
3148 | | |
3149 | | /* convert lci encoding into fixpoint location */ |
3150 | 59 | rfc3825_lci_to_fixpoint(lci, &location_fp); |
3151 | | |
3152 | | /* convert location from decimal to fixpoint */ |
3153 | 59 | ret = rfc3825_fixpoint_to_decimal(&location_fp, &location); |
3154 | | |
3155 | 59 | if (ret != RFC3825_NOERROR) { |
3156 | 46 | ti = proto_tree_add_uint(tree, hf_dhcp_option_rfc3825_error, tvb, offset, 1, ret); |
3157 | 46 | proto_item_set_len(ti, length); |
3158 | 46 | } else { |
3159 | 13 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_latitude, tvb, offset, 5, location.latitude, "%15.10f", location.latitude); |
3160 | 13 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_longitude, tvb, offset+5, 5, location.longitude, "%15.10f", location.longitude); |
3161 | 13 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_latitude_res, tvb, offset, 1, location.latitude_res, "%15.10f", location.latitude_res); |
3162 | 13 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_longitude_res, tvb, offset+5, 1, location.longitude_res, "%15.10f", location.longitude_res); |
3163 | 13 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_altitude, tvb, offset+12, 4, location.altitude, "%15.10f", location.altitude); |
3164 | 13 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_altitude_res, tvb, offset+10, 2, location.altitude_res, "%15.10f", location.altitude_res); |
3165 | 13 | proto_tree_add_uint(tree, hf_dhcp_option_rfc3825_altitude_type, tvb, offset+10, 1, location.altitude_type); |
3166 | 13 | proto_tree_add_uint(tree, hf_dhcp_option_rfc3825_map_datum, tvb, offset+15, 1, location.datum_type); |
3167 | 13 | } |
3168 | 59 | } else if (length < 69) { /* CableLabs DSS_ID */ |
3169 | 12 | int s_len; |
3170 | | |
3171 | 12 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_option, tvb, offset, 1, ENC_BIG_ENDIAN); |
3172 | 12 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_len, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3173 | 12 | s_len = tvb_get_uint8(tvb, offset+1); |
3174 | 12 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id, tvb, offset+2, s_len, ENC_ASCII); |
3175 | | |
3176 | 12 | if (length > s_len+2) { /* Second DSS_ID*/ |
3177 | | |
3178 | 6 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_option, tvb, offset+2+s_len, 1, ENC_BIG_ENDIAN); |
3179 | 6 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_len, tvb, offset+1+2+s_len, 1, ENC_BIG_ENDIAN); |
3180 | 6 | s_len = tvb_get_uint8(tvb, offset+1+2+s_len); |
3181 | 6 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id, tvb, offset+2+2+s_len, s_len, ENC_ASCII); |
3182 | 6 | } |
3183 | 12 | } else { |
3184 | 1 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Invalid length of DHCP option!"); |
3185 | 1 | } |
3186 | | |
3187 | 72 | return tvb_captured_length(tvb); |
3188 | 72 | } |
3189 | | |
3190 | | static int |
3191 | | dissect_dhcpopt_vi_vendor_class(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3192 | 47 | { |
3193 | 47 | int offset = 0; |
3194 | 47 | uint32_t enterprise = 0; |
3195 | 47 | uint32_t option_data_len = 0; |
3196 | 47 | int data_len = 0; |
3197 | 47 | int s_end; |
3198 | 47 | proto_item *eti, *expert_ti; |
3199 | 47 | proto_tree *e_tree; |
3200 | 47 | proto_tree *vcdi_tree; |
3201 | | |
3202 | 47 | if (tvb_reported_length(tvb) == 1) { |
3203 | | /* CableLab specific */ |
3204 | 3 | proto_tree_add_item(tree, hf_dhcp_option_vi_class_cl_address_mode, tvb, 0, 1, ENC_BIG_ENDIAN); |
3205 | 3 | return 1; |
3206 | 3 | } |
3207 | | |
3208 | 764 | while (tvb_reported_length_remaining(tvb, offset) >= 5) { |
3209 | | |
3210 | 720 | eti = proto_tree_add_item_ret_uint(tree, hf_dhcp_option_vi_class_enterprise, tvb, offset, 4, ENC_BIG_ENDIAN, &enterprise); |
3211 | 720 | e_tree = proto_item_add_subtree(eti, ett_dhcp_option); |
3212 | 720 | offset += 4; |
3213 | 720 | proto_tree_add_item_ret_uint(e_tree, hf_dhcp_option_vi_class_data_length, tvb, offset, 1, ENC_BIG_ENDIAN, &option_data_len); |
3214 | 720 | offset += 1; |
3215 | | |
3216 | 720 | s_end = offset + option_data_len; |
3217 | 720 | if ( tvb_reported_length_remaining(tvb, s_end) < 0) { |
3218 | 0 | break; |
3219 | 0 | } |
3220 | | |
3221 | 1.53k | while (offset < s_end) { |
3222 | 970 | tvbuff_t *enterprise_tvb = tvb_new_subset_length(tvb, offset, option_data_len); |
3223 | | /* XXX - Do we really want to try the dissector table for *each* |
3224 | | * vendor-class-data for the same enterprise? This tvb is too long on |
3225 | | * subsequent iterations. Only giving the table dissector one attempt |
3226 | | * (and skipping past bytes it doesn't dissect to s_end) might be simpler. |
3227 | | */ |
3228 | 970 | int bytes_dissected = dissector_try_uint(dhcp_enterprise_class_table, enterprise, enterprise_tvb, pinfo, e_tree); |
3229 | 970 | if (bytes_dissected == 0) { |
3230 | 970 | vcdi_tree = proto_tree_add_subtree(e_tree, tvb, offset, option_data_len, ett_dhcp_option124_vendor_class_data_item, NULL, "Vendor Class Data Item"); |
3231 | | /* According to RFC 3925, *each* vendor-class-data instance has |
3232 | | * its own length, but in practice some vendors have only included |
3233 | | * the overall per-enterprise option length. See the dhcwg m-l: |
3234 | | * https://mailarchive.ietf.org/arch/msg/dhcwg/B4fNsvUR0EHxcrKDsKCf7lBrc3s/ |
3235 | | */ |
3236 | 970 | data_len = tvb_get_uint8(tvb, offset); |
3237 | 970 | if (offset + data_len >= s_end) { |
3238 | 159 | expert_ti = proto_tree_add_item(vcdi_tree, hf_dhcp_option_vi_class_data_item_data, tvb, offset, s_end - offset, ENC_NA); |
3239 | 159 | expert_add_info(pinfo, expert_ti, &ei_dhcp_nonstd_option_data); |
3240 | 159 | offset = s_end; |
3241 | 159 | break; |
3242 | 159 | } |
3243 | 811 | proto_tree_add_item(vcdi_tree, hf_dhcp_option_vi_class_data_item_length, tvb, offset, 1, ENC_NA); |
3244 | 811 | offset += 1; |
3245 | 811 | proto_tree_add_item(vcdi_tree, hf_dhcp_option_vi_class_data_item_data, tvb, offset, data_len, ENC_NA); |
3246 | | |
3247 | | /* look for next vendor-class-data-item */ |
3248 | 811 | offset += data_len; |
3249 | 811 | } else { |
3250 | 0 | offset += bytes_dissected; |
3251 | 0 | } |
3252 | 970 | } |
3253 | | |
3254 | | /* loop for the next Enterprise number */ |
3255 | 720 | } |
3256 | | |
3257 | 44 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
3258 | 14 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length < 5"); |
3259 | 14 | } |
3260 | | |
3261 | 44 | return tvb_captured_length(tvb); |
3262 | 47 | } |
3263 | | |
3264 | | static int |
3265 | | dissect_dhcpopt_forcerenew_nonce(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
3266 | 32 | { |
3267 | 32 | int offset = 0; |
3268 | 1.14k | while ( tvb_reported_length_remaining(tvb, offset) > 0) { |
3269 | 1.11k | proto_tree_add_item(tree, hf_dhcp_option_forcerenew_nonce_algo, tvb, offset, 1, ENC_BIG_ENDIAN); |
3270 | 1.11k | offset += 1; |
3271 | 1.11k | } |
3272 | | |
3273 | 32 | return tvb_captured_length(tvb); |
3274 | 32 | } |
3275 | | |
3276 | | static int |
3277 | | dissect_dhcpopt_rdnss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3278 | 12 | { |
3279 | 12 | int offset = 0; |
3280 | 12 | const char *dns_name; |
3281 | 12 | int dns_name_len; |
3282 | | |
3283 | 12 | if (tvb_reported_length(tvb) < 10) { |
3284 | 11 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be >= 10"); |
3285 | 11 | return 1; |
3286 | 11 | } |
3287 | 1 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); |
3288 | 1 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_pref, tvb, offset, 1, ENC_BIG_ENDIAN); |
3289 | 1 | offset += 1; |
3290 | 1 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_prim_dns_server, tvb, offset, 4, ENC_BIG_ENDIAN); |
3291 | 1 | offset += 4; |
3292 | 1 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_sec_dns_server, tvb, offset, 4, ENC_BIG_ENDIAN); |
3293 | 1 | offset += 4; |
3294 | | |
3295 | 1 | get_dns_name(pinfo->pool, tvb, offset, tvb_reported_length_remaining(tvb,offset), offset, &dns_name, &dns_name_len); |
3296 | 1 | proto_tree_add_string(tree, hf_dhcp_option_rdnss_domain, tvb, offset, |
3297 | 1 | tvb_reported_length_remaining(tvb,offset), format_text(pinfo->pool, dns_name, dns_name_len)); |
3298 | | |
3299 | 1 | return tvb_captured_length(tvb); |
3300 | 12 | } |
3301 | | |
3302 | | static int |
3303 | | dissect_dhcpopt_dhcp_captive_portal(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
3304 | 23 | { |
3305 | 23 | proto_item *ti_cp; |
3306 | 23 | ti_cp = proto_tree_add_item(tree, hf_dhcp_option_captive_portal, tvb, 0, tvb_reported_length(tvb), ENC_ASCII); |
3307 | 23 | proto_item_set_url(ti_cp); |
3308 | | |
3309 | 23 | return tvb_captured_length(tvb); |
3310 | 23 | } |
3311 | | |
3312 | | static int |
3313 | | dissect_dhcpopt_dnr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3314 | 726 | { |
3315 | 726 | int offset = 0; |
3316 | 726 | int offset_end = tvb_captured_length(tvb); |
3317 | 726 | int instance_id = 0; |
3318 | 726 | uint32_t instance_offset = 0; |
3319 | 726 | uint32_t instance_len; |
3320 | 726 | uint32_t adn_len; |
3321 | 726 | int adn_parsed_len; |
3322 | 726 | const char *adn; |
3323 | 726 | uint32_t addrs_len; |
3324 | 726 | proto_item *dnr_instance_ti; |
3325 | 726 | proto_tree *dnr_instance_tree; |
3326 | 726 | proto_item *dnr_instance_addrs_ti; |
3327 | 726 | proto_tree *dnr_instance_addrs_tree; |
3328 | 726 | tvbuff_t *next_tvb; |
3329 | | |
3330 | 726 | if (offset + 2 >= offset_end) { |
3331 | 9 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "DNR: truncated option (no DNR instance present)"); |
3332 | 9 | return offset_end; |
3333 | 9 | } |
3334 | | |
3335 | 1.96k | while (offset + 2 <= offset_end) { |
3336 | | // Handling a single DNR Instance |
3337 | 1.39k | instance_id++; |
3338 | | |
3339 | 1.39k | dnr_instance_ti = proto_tree_add_item(tree, hf_dhcp_dnr_instance, tvb, offset, -1, ENC_NA); |
3340 | 1.39k | dnr_instance_tree = proto_item_add_subtree(dnr_instance_ti, ett_dhcp_dnr_instance); |
3341 | | |
3342 | 1.39k | proto_tree_add_item_ret_uint(dnr_instance_tree, hf_dhcp_dnr_instance_len, tvb, offset, 2, ENC_BIG_ENDIAN, &instance_len); |
3343 | 1.39k | offset += 2; |
3344 | 1.39k | instance_offset = 0; |
3345 | | |
3346 | 1.39k | if (instance_len < 3) { |
3347 | 43 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: truncated option (instance length %d too short)", instance_len); |
3348 | 43 | break; |
3349 | 43 | } |
3350 | | |
3351 | 1.35k | if (offset + (int)instance_len > offset_end) { |
3352 | 51 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: truncated option (instance length %d larger than option)", instance_len); |
3353 | 51 | break; |
3354 | 51 | } |
3355 | | |
3356 | 1.29k | proto_item_append_text(dnr_instance_ti, " %d", instance_id); |
3357 | 1.29k | proto_item_set_len(dnr_instance_ti, (int)instance_len + 2); |
3358 | | |
3359 | 1.29k | proto_tree_add_item(dnr_instance_tree, hf_dhcp_dnr_svcpriority, tvb, offset + instance_offset, 2, ENC_BIG_ENDIAN); |
3360 | 1.29k | instance_offset += 2; |
3361 | | |
3362 | 1.29k | proto_tree_add_item_ret_uint(dnr_instance_tree, hf_dhcp_dnr_auth_domain_name_len, tvb, offset + instance_offset, 1, ENC_BIG_ENDIAN, &adn_len); |
3363 | 1.29k | instance_offset++; |
3364 | | |
3365 | 1.29k | if (instance_offset + adn_len > instance_len) { |
3366 | 10 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: truncated option (adn_len %d larger than option)", adn_len); |
3367 | 10 | break; |
3368 | 10 | } |
3369 | | |
3370 | 1.28k | get_dns_name(pinfo->pool, tvb, offset + instance_offset, adn_len, |
3371 | 1.28k | offset + instance_offset, &adn, &adn_parsed_len); |
3372 | 1.28k | proto_tree_add_string(dnr_instance_tree, hf_dhcp_dnr_auth_domain_name, tvb, offset + instance_offset, |
3373 | 1.28k | adn_len, format_text(pinfo->pool, adn, adn_parsed_len)); |
3374 | | |
3375 | 1.28k | instance_offset += adn_len; |
3376 | | |
3377 | 1.28k | if (instance_offset == instance_len) { |
3378 | | // A DNR instance with only a service priority and authentication-domain-name (ADN) is in ADN-only mode, |
3379 | | // see RFC9463, Section 3.1.6. |
3380 | 76 | proto_tree_add_expert(dnr_instance_tree, pinfo, &ei_dhcp_option_dnr_adn_only_mode, tvb, offset, instance_len); |
3381 | | |
3382 | 76 | offset += instance_len; |
3383 | 76 | continue; |
3384 | 76 | } |
3385 | | |
3386 | 1.21k | proto_tree_add_item_ret_uint(dnr_instance_tree, hf_dhcp_dnr_addrs_len, tvb, offset + instance_offset, 1, ENC_BIG_ENDIAN, &addrs_len); |
3387 | 1.21k | instance_offset++; |
3388 | | |
3389 | 1.21k | if (addrs_len == 0 || addrs_len % 4 != 0) { |
3390 | 43 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: invalid addrs_len %d (not divisible by 4)", addrs_len); |
3391 | 43 | break; |
3392 | 43 | } |
3393 | | |
3394 | 1.17k | dnr_instance_addrs_ti = proto_tree_add_item(dnr_instance_tree, hf_dhcp_dnr_addrs, tvb, offset + instance_offset, addrs_len, ENC_NA); |
3395 | 1.17k | dnr_instance_addrs_tree = proto_item_add_subtree(dnr_instance_addrs_ti, ett_dhcp_dnr_instance_addrs); |
3396 | | |
3397 | 1.17k | proto_item_append_text(dnr_instance_addrs_ti, ":"); |
3398 | | |
3399 | 7.85k | for (uint32_t i = 0; i < addrs_len; i += 4) { |
3400 | 6.68k | proto_tree_add_item(dnr_instance_addrs_tree, hf_dhcp_dnr_addrs_ip, tvb, offset + instance_offset + i, 4, ENC_BIG_ENDIAN); |
3401 | 6.68k | proto_item_append_text(dnr_instance_addrs_ti, "%c%s", (i == 0 ? ' ' : ','), tvb_ip_to_str(pinfo->pool, tvb, offset + instance_offset + i)); |
3402 | 6.68k | } |
3403 | | |
3404 | 1.17k | instance_offset += addrs_len; |
3405 | | |
3406 | | // Parse the service parameters |
3407 | 1.17k | next_tvb = tvb_new_subset_length(tvb, offset + instance_offset, instance_len - instance_offset); |
3408 | 1.17k | call_dissector(svc_params_handle, next_tvb, pinfo, dnr_instance_tree); |
3409 | | |
3410 | 1.17k | offset += instance_len; |
3411 | 1.17k | } |
3412 | | |
3413 | 717 | return offset_end; |
3414 | 726 | } |
3415 | | |
3416 | | static int |
3417 | | dissect_dhcpopt_bulk_lease_query_start(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3418 | 29 | { |
3419 | 29 | if (tvb_reported_length(tvb) != 4) { |
3420 | 21 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3421 | 21 | return 1; |
3422 | 21 | } |
3423 | 8 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_query_start, tvb, 0, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN); |
3424 | | |
3425 | 8 | return tvb_captured_length(tvb); |
3426 | 29 | } |
3427 | | |
3428 | | static int |
3429 | | dissect_dhcpopt_bulk_lease_query_end(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
3430 | 14 | { |
3431 | 14 | if (tvb_reported_length(tvb) != 4) { |
3432 | 12 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3433 | 12 | return 1; |
3434 | 12 | } |
3435 | 2 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_query_end, tvb, 0, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN); |
3436 | | |
3437 | 2 | return tvb_captured_length(tvb); |
3438 | 14 | } |
3439 | | |
3440 | | static int |
3441 | | dissect_dhcpopt_bulk_lease_base_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3442 | 18 | { |
3443 | 18 | if (tvb_reported_length(tvb) != 4) { |
3444 | 15 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3445 | 15 | return 1; |
3446 | 15 | } |
3447 | 3 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_base_time, tvb, 0, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN); |
3448 | | |
3449 | 3 | return tvb_captured_length(tvb); |
3450 | 18 | } |
3451 | | |
3452 | | static int |
3453 | | dissect_dhcpopt_bulk_lease_status_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3454 | 32 | { |
3455 | 32 | if (tvb_reported_length(tvb) < 1) { |
3456 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must >= 1"); |
3457 | 10 | return 1; |
3458 | 10 | } |
3459 | 22 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_status_code, tvb, 0, 1, ENC_BIG_ENDIAN); |
3460 | 22 | if ( tvb_reported_length_remaining(tvb, 1) > 0) { |
3461 | 15 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_status_message, tvb, 1, tvb_reported_length_remaining(tvb, 1), ENC_UTF_8); |
3462 | 15 | } |
3463 | | |
3464 | 22 | return tvb_captured_length(tvb); |
3465 | 32 | } |
3466 | | |
3467 | | static int |
3468 | | dissect_dhcpopt_pcp_server(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3469 | 30 | { |
3470 | 30 | proto_tree *tree_pcp; |
3471 | 30 | int offset = 0; |
3472 | 30 | uint8_t list_length; |
3473 | 30 | uint8_t ip_list_length; |
3474 | 30 | proto_item *ti_pcp; |
3475 | | |
3476 | 30 | if (tvb_reported_length(tvb) < 5) { |
3477 | 5 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must >= 5"); |
3478 | 5 | return 1; |
3479 | 5 | } |
3480 | 1.18k | while (tvb_reported_length_remaining(tvb, offset) >= 5) { |
3481 | 1.16k | ip_list_length = 0; |
3482 | 1.16k | list_length = tvb_get_uint8(tvb, offset); |
3483 | 1.16k | tree_pcp = proto_tree_add_subtree(tree, tvb, offset, list_length, ett_dhcp_option158_pcp_list, |
3484 | 1.16k | &ti_pcp, "PCP server list"); |
3485 | 1.16k | proto_tree_add_item(tree_pcp, hf_dhcp_option_pcp_list_length, tvb, offset, 1, ENC_NA); |
3486 | 1.16k | offset += 1; |
3487 | 1.16k | ip_list_length += 1; |
3488 | 1.71k | while (((list_length - 1)%4 == 0) && (ip_list_length < list_length) && tvb_reported_length_remaining(tvb,offset) >= 4) { |
3489 | 552 | proto_tree_add_item(tree_pcp, hf_dhcp_option_pcp_server, tvb, offset, 4, ENC_BIG_ENDIAN); |
3490 | 552 | offset += 4; |
3491 | 552 | ip_list_length += 4; |
3492 | 552 | } |
3493 | 1.16k | } |
3494 | | |
3495 | 25 | return tvb_captured_length(tvb); |
3496 | 30 | } |
3497 | | |
3498 | | static int |
3499 | | dissect_dhcpopt_portparams(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3500 | 17 | { |
3501 | 17 | if (tvb_reported_length(tvb) != 4) { |
3502 | 16 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3503 | 16 | return 1; |
3504 | 16 | } |
3505 | 1 | proto_tree_add_item(tree, hf_dhcp_option_portparams_offset, tvb, 0, 1, ENC_NA); |
3506 | 1 | proto_tree_add_item(tree, hf_dhcp_option_portparams_psid_length, tvb, 1, 1, ENC_NA); |
3507 | 1 | proto_tree_add_item(tree, hf_dhcp_option_portparams_psid, tvb, 2, 2, ENC_NA); |
3508 | | |
3509 | 1 | return tvb_captured_length(tvb); |
3510 | 17 | } |
3511 | | |
3512 | | static int |
3513 | | dissect_dhcpopt_6RD_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3514 | 32 | { |
3515 | 32 | int offset = 0; |
3516 | | |
3517 | 32 | if (tvb_reported_length(tvb) < 22) { |
3518 | 5 | expert_add_info(pinfo, tree, &ei_dhcp_option_6RD_malformed); |
3519 | 5 | return 1; |
3520 | 5 | } |
3521 | | |
3522 | 27 | proto_tree_add_item(tree, hf_dhcp_option_6RD_ipv4_mask_len, tvb, offset, 1, ENC_BIG_ENDIAN); |
3523 | 27 | proto_tree_add_item(tree, hf_dhcp_option_6RD_prefix_len, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3524 | 27 | proto_tree_add_item(tree, hf_dhcp_option_6RD_prefix, tvb, offset+2, 16, ENC_NA); |
3525 | 27 | proto_tree_add_item(tree, hf_dhcp_option_6RD_border_relay_ip, tvb, offset+18, 4, ENC_BIG_ENDIAN); |
3526 | | |
3527 | | /* More Border Relay IPv4 addresses included */ |
3528 | 27 | if (tvb_reported_length(tvb) > 22) { |
3529 | 26 | offset += 22; |
3530 | 771 | while (tvb_reported_length_remaining(tvb, offset) >= 4) { |
3531 | 745 | proto_tree_add_item(tree, hf_dhcp_option_6RD_border_relay_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
3532 | 745 | offset += 4; |
3533 | 745 | } |
3534 | 26 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
3535 | 19 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
3536 | 19 | } |
3537 | 26 | } |
3538 | | |
3539 | 27 | return tvb_captured_length(tvb); |
3540 | 32 | } |
3541 | | |
3542 | | static int |
3543 | | dissect_dhcpopt_avaya_ip_telephone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3544 | 857 | { |
3545 | 857 | int offset = 0; |
3546 | 857 | proto_tree *o242avaya_v_tree; |
3547 | 857 | proto_item *avaya_ti; |
3548 | 857 | const char *avaya_option = NULL; |
3549 | 857 | wmem_strbuf_t *avaya_param_buf = NULL; |
3550 | | |
3551 | | /* minimum length is 5 bytes */ |
3552 | 857 | if (tvb_reported_length(tvb) < 5) { |
3553 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Avaya IP Telephone option length isn't >= 5"); |
3554 | 10 | return 1; |
3555 | 10 | } |
3556 | 847 | avaya_ti = proto_tree_add_item_ret_string(tree, hf_dhcp_option242_avaya, tvb, offset, tvb_reported_length(tvb), ENC_ASCII|ENC_NA, pinfo->pool, (const uint8_t **)&avaya_option); |
3557 | 847 | o242avaya_v_tree = proto_item_add_subtree(avaya_ti, ett_dhcp_option242_suboption); |
3558 | 847 | avaya_param_buf = wmem_strbuf_new(pinfo->pool, ""); |
3559 | 847 | char **fields = wmem_strsplit(pinfo->pool, avaya_option, ",", -1); |
3560 | 15.5k | for (int i = 0; fields[i]; i++) { |
3561 | 14.7k | const char *field = fields[i]; |
3562 | 14.7k | if (!strchr(field, '=')) { |
3563 | 2.75k | if (wmem_strbuf_get_len(avaya_param_buf) == 0) { |
3564 | 17 | expert_add_info_format(pinfo, avaya_ti, &ei_dhcp_subopt_unknown_type, "ERROR, Unknown parameter %s", field); |
3565 | 17 | offset += (int)strlen(field); |
3566 | 17 | break; |
3567 | 17 | } |
3568 | 2.73k | wmem_strbuf_append_printf(avaya_param_buf,",%s", field); |
3569 | 2.73k | } |
3570 | 12.0k | else { |
3571 | 12.0k | if (wmem_strbuf_get_len(avaya_param_buf) > 0) { |
3572 | 11.2k | dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, avaya_ti, tvb, offset, avaya_param_buf); |
3573 | 11.2k | offset += (int)wmem_strbuf_get_len(avaya_param_buf) + 1; |
3574 | 11.2k | wmem_strbuf_truncate(avaya_param_buf, 0); |
3575 | 11.2k | } |
3576 | 12.0k | wmem_strbuf_append(avaya_param_buf, field); |
3577 | 12.0k | } |
3578 | 14.7k | } |
3579 | 847 | if (wmem_strbuf_get_len(avaya_param_buf) > 0) { |
3580 | 711 | dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, avaya_ti, tvb, offset, avaya_param_buf); |
3581 | 711 | } |
3582 | | |
3583 | 847 | return tvb_captured_length(tvb); |
3584 | 857 | } |
3585 | | |
3586 | | static const value_string option82_suboption_vals[] = { |
3587 | | { 0, "Padding" }, |
3588 | | { 1, "Agent Circuit ID" }, |
3589 | | { 2, "Agent Remote ID" }, |
3590 | | { 3, "Reserved" }, |
3591 | | { 4, "DOCSIS Device Class" }, |
3592 | | { 5, "Link selection" }, |
3593 | | { 6, "Subscriber ID" }, |
3594 | | { 7, "RADIUS Attributes" }, |
3595 | | { 8, "Authentication" }, |
3596 | | { 9, "Vendor-Specific Information" }, |
3597 | | { 10, "Flags" }, |
3598 | | { 11, "Server ID Override" }, |
3599 | | { 12, "Relay Agent Identifier" }, |
3600 | | { 13, "Access Technology Type" }, |
3601 | | { 14, "Access Network Name" }, |
3602 | | { 15, "Access Point Name" }, |
3603 | | { 16, "Access Point BSSID" }, |
3604 | | { 17, "Access Network Operator ID" }, |
3605 | | { 18, "Access Network Operator Realm" }, |
3606 | | { 19, "Source Port" }, |
3607 | | { 150, "Link selection (Cisco proprietary)" }, |
3608 | | { 151, "VRF name/VPN ID" }, |
3609 | | { 152, "Server ID Override (Cisco proprietary)" }, |
3610 | | { 0, NULL } |
3611 | | }; |
3612 | | |
3613 | 135k | #define CL_AI_OPTION_DOCSIS_VERSION 1 /* 82:9:4491:1 */ |
3614 | 647 | #define CL_AI_OPTION_DPOE_SYSTEM_VERSION 2 /* 82:9:4491:2 */ |
3615 | 1.66k | #define CL_AI_OPTION_DPOE_SYSTEM_DHCPV4_PBB_SERVICE 4 /* 82:9:4491:4 */ |
3616 | 912 | #define CL_AI_OPTION_CMTS_CM_SERVICE_CLASS 5 /* 82:9:4491:5 */ |
3617 | 987 | #define CL_AI_OPTION_CMTS_MSO_DEFINED_TEXT 6 /* 82:9:4491:6 */ |
3618 | 455 | #define CL_AI_OPTION_SECURE_FILE_TRANSFER_URI 7 /* 82:9:4491:7 */ |
3619 | | |
3620 | | static const value_string option82_cl_tag_vals[] = { |
3621 | | { CL_AI_OPTION_DOCSIS_VERSION, "CMTS DOCSIS version number" }, |
3622 | | { CL_AI_OPTION_DPOE_SYSTEM_VERSION, "DPOE System version number" }, |
3623 | | { CL_AI_OPTION_DPOE_SYSTEM_DHCPV4_PBB_SERVICE, "DPOE System DHCPv4 PBB service option" }, |
3624 | | { CL_AI_OPTION_CMTS_CM_SERVICE_CLASS, "Service Class or QoS Profile Name" }, |
3625 | | { CL_AI_OPTION_CMTS_MSO_DEFINED_TEXT, "MSO Defined Text" }, |
3626 | | { CL_AI_OPTION_SECURE_FILE_TRANSFER_URI, "Secure File Transfer URI" }, |
3627 | | { 0, NULL } |
3628 | | }; |
3629 | | |
3630 | | static int |
3631 | | dhcp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, |
3632 | | int optend) |
3633 | 14.8k | { |
3634 | 14.8k | int suboptoff = optoff; |
3635 | 14.8k | uint8_t subopt, vs_opt, vs_len; |
3636 | 14.8k | size_t idx; |
3637 | 14.8k | int subopt_len, subopt_end, datalen; |
3638 | 14.8k | uint32_t enterprise; |
3639 | 14.8k | proto_item *vti, *ti; |
3640 | 14.8k | proto_tree *o82_v_tree, *o82_sub_tree; |
3641 | 14.8k | int clsuboptoff, clsubopt_end; |
3642 | | |
3643 | 14.8k | static const struct basic_types_hfs default_hfs = { |
3644 | 14.8k | &hf_dhcp_option82_value, |
3645 | 14.8k | &hf_dhcp_option82_value_ip_address, |
3646 | 14.8k | &hf_dhcp_option82_value_ip_address, |
3647 | 14.8k | &hf_dhcp_option82_value_stringz, |
3648 | 14.8k | NULL, |
3649 | 14.8k | &hf_dhcp_option82_value_8, |
3650 | 14.8k | &hf_dhcp_option82_value_16, |
3651 | 14.8k | NULL, |
3652 | 14.8k | &hf_dhcp_option82_value_32, |
3653 | 14.8k | NULL, |
3654 | 14.8k | NULL |
3655 | 14.8k | }; |
3656 | | |
3657 | 14.8k | struct opt82_info { |
3658 | 14.8k | int id; |
3659 | 14.8k | struct opt_info info; |
3660 | 14.8k | }; |
3661 | 14.8k | static const struct opt82_info o82_opt[]= { |
3662 | 14.8k | {0, {"nop", bytes, &hf_dhcp_option82_padding}}, /* dummy */ |
3663 | 14.8k | {1, {"Agent Circuit ID", bytes, &hf_dhcp_option82_agent_circuit_id}}, /* [RFC3046] */ |
3664 | 14.8k | {2, {"Agent Remote ID", bytes, &hf_dhcp_option82_agent_remote_id}}, /* [RFC3046] */ |
3665 | 14.8k | {3, {"Reserved", bytes, &hf_dhcp_option82_reserved}}, |
3666 | 14.8k | {4, {"DOCSIS Device Class", val_u_long, &hf_dhcp_option82_docsis_device_class}}, /* [RFC3256] */ |
3667 | 14.8k | {5, {"Link selection", ipv4, &hf_dhcp_option82_link_selection}}, /* [RFC3527] */ |
3668 | 14.8k | {6, {"Subscriber ID", string, &hf_dhcp_option82_subscriber_id}}, /* [RFC3993] */ /***** CHECK STRING TYPE */ |
3669 | 14.8k | {7, {"RADIUS Attributes", bytes, &hf_dhcp_option82_radius_attributes}}, /* [RFC4014] */ |
3670 | 14.8k | {8, {"Authentication", bytes, &hf_dhcp_option82_authentication}}, /* [RFC4030] */ |
3671 | 14.8k | {9, {"Vendor-Specific Information", special, &hf_dhcp_option82_vi}}, /* [RFC 4243] */ |
3672 | 14.8k | {10, {"Flags", val_u_byte, &hf_dhcp_option82_flags}}, /* [RFC5010] */ |
3673 | 14.8k | {11, {"Server ID Override", ipv4, &hf_dhcp_option82_server_id_override}}, /* [RFC 5107] */ |
3674 | 14.8k | {12, {"Relay Agent Identifier", bytes, &hf_dhcp_option82_relay_agent_id}}, /* [RFC 6925] */ |
3675 | 14.8k | {13, {"Access Technology Type", bytes, &hf_dhcp_option82_option_ani_att}}, /* [RFC7839] */ |
3676 | 14.8k | {14, {"Access Network Name", string, &hf_dhcp_option82_option_ani_network_name}}, /* [RFC7839] */ |
3677 | 14.8k | {15, {"Access Point Name", string, &hf_dhcp_option82_option_ani_ap_name}}, /* [RFC7839] */ |
3678 | 14.8k | {16, {"Access Point BSSID", special, &hf_dhcp_option82_option_ani_ap_bssid}}, /* [RFC7839] */ |
3679 | 14.8k | {17, {"Access Network Operator ID", bytes, &hf_dhcp_option82_option_ani_operator_id}}, /* [RFC7839] */ |
3680 | 14.8k | {18, {"Access Network Operator Realm", string, &hf_dhcp_option82_option_ani_operator_realm}}, /* [RFC7839] */ |
3681 | 14.8k | {19, {"Source Port", presence, &hf_dhcp_option82_option_source_port}}, /* [RFC8357] */ |
3682 | 14.8k | {150, {"Link selection (Cisco proprietary)", ipv4, &hf_dhcp_option82_link_selection_cisco}}, /* [RFC3527] */ |
3683 | 14.8k | {151, {"VRF name/VPN ID", special, &hf_dhcp_option82_vrf_name_vpn_id}}, /* [RFC2685] */ |
3684 | 14.8k | {152, {"Server ID Override (Cisco proprietary)", ipv4, &hf_dhcp_option82_server_id_override_cisco}} /* [RFC 5107] */ |
3685 | 14.8k | }; |
3686 | | |
3687 | 14.8k | subopt = tvb_get_uint8(tvb, optoff); |
3688 | 14.8k | suboptoff++; |
3689 | | |
3690 | 14.8k | if (suboptoff >= optend) { |
3691 | 17 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
3692 | 17 | "Suboption %d: no room left in option for suboption length", subopt); |
3693 | 17 | return (optend); |
3694 | 17 | } |
3695 | | |
3696 | 14.8k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
3697 | 14.8k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option82_suboption, |
3698 | 14.8k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str_const(subopt, option82_suboption_vals, "Unknown")); |
3699 | | |
3700 | 14.8k | o82_v_tree = proto_item_add_subtree(vti, ett_dhcp_option82_suboption); |
3701 | 14.8k | proto_tree_add_item(o82_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
3702 | 14.8k | suboptoff++; |
3703 | | |
3704 | 14.8k | subopt_end = suboptoff+subopt_len; |
3705 | 14.8k | if (subopt_end > optend) { |
3706 | 171 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
3707 | 171 | "Suboption %d: no room left in option for suboption value", subopt); |
3708 | 171 | return (optend); |
3709 | 171 | } |
3710 | | |
3711 | 141k | for (idx = 0; idx < array_length(o82_opt); idx++) { |
3712 | 139k | if (o82_opt[idx].id == subopt) { |
3713 | 12.2k | break; |
3714 | 12.2k | } |
3715 | 139k | } |
3716 | | |
3717 | 14.6k | ti = proto_tree_add_item(o82_v_tree, hf_dhcp_option82_value, tvb, suboptoff, subopt_len, ENC_NA); |
3718 | | |
3719 | 14.6k | if ( (idx >= 1 ) && (idx < array_length(o82_opt)) ) { |
3720 | 7.80k | proto_item_set_hidden(ti); |
3721 | 7.80k | if (o82_opt[idx].info.ftype == special) { |
3722 | 2.60k | switch(subopt) |
3723 | 2.60k | { |
3724 | 2.15k | case 9: |
3725 | 4.06k | while (suboptoff < subopt_end) { |
3726 | 1.96k | enterprise = tvb_get_ntohl(tvb, suboptoff); |
3727 | 1.96k | vti = proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vi_enterprise, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
3728 | 1.96k | suboptoff += 4; |
3729 | | |
3730 | 1.96k | o82_sub_tree = proto_item_add_subtree(vti, ett_dhcp_option82_suboption9); |
3731 | 1.96k | datalen = tvb_get_uint8(tvb, suboptoff); |
3732 | 1.96k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_data_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
3733 | 1.96k | suboptoff++; |
3734 | | |
3735 | 1.96k | switch (enterprise) { |
3736 | 1.39k | case VENDOR_CABLELABS: /* CableLabs */ |
3737 | | /* Compare CL-SP-CANN-DHCP-Reg-I06-110210 (2011) and |
3738 | | * CL-SP-CANN-DHCP-Reg-I13-160317 (2016) */ |
3739 | 1.39k | clsuboptoff = suboptoff; |
3740 | 1.39k | clsubopt_end = clsuboptoff + datalen; |
3741 | 67.9k | while (clsuboptoff < clsubopt_end) { |
3742 | 66.5k | vs_opt = tvb_get_uint8(tvb, clsuboptoff); |
3743 | 66.5k | vs_len = tvb_get_uint8(tvb, clsuboptoff+1); |
3744 | 66.5k | if (vs_opt == CL_AI_OPTION_DOCSIS_VERSION && |
3745 | 2.49k | vs_len == 4) { |
3746 | | |
3747 | | /* Superseded version with a redundant option code and option-length */ |
3748 | 321 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_option, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3749 | 321 | clsuboptoff++; |
3750 | 321 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_option_length, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3751 | 321 | clsuboptoff++; |
3752 | | |
3753 | 321 | vs_opt = tvb_get_uint8(tvb, clsuboptoff); |
3754 | 321 | vs_len = tvb_get_uint8(tvb, clsuboptoff+1); |
3755 | 321 | } |
3756 | 66.5k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_tag, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3757 | 66.5k | clsuboptoff++; |
3758 | 66.5k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_tag_length, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3759 | 66.5k | clsuboptoff++; |
3760 | 66.5k | switch (vs_opt) { |
3761 | 2.31k | case CL_AI_OPTION_DOCSIS_VERSION: |
3762 | 2.31k | proto_tree_add_uint_format_value(o82_sub_tree, hf_dhcp_option82_vi_cl_docsis_version, |
3763 | 2.31k | tvb, clsuboptoff, 2, 0, "%d.%d", |
3764 | 2.31k | tvb_get_uint8(tvb, clsuboptoff), tvb_get_uint8(tvb, clsuboptoff+1)); |
3765 | 2.31k | clsuboptoff+=2; |
3766 | 2.31k | break; |
3767 | 647 | case CL_AI_OPTION_DPOE_SYSTEM_VERSION: |
3768 | 647 | proto_tree_add_uint_format_value(o82_sub_tree, hf_dhcp_option82_vi_cl_dpoe_system_version, |
3769 | 647 | tvb, clsuboptoff, 2, 0, "%d.%d", |
3770 | 647 | tvb_get_uint8(tvb, clsuboptoff), tvb_get_uint8(tvb, clsuboptoff+1)); |
3771 | 647 | clsuboptoff+=2; |
3772 | 647 | break; |
3773 | 1.66k | case CL_AI_OPTION_DPOE_SYSTEM_DHCPV4_PBB_SERVICE: |
3774 | 1.66k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_dpoe_system_pbb_service, tvb, clsuboptoff, vs_len, ENC_NA); |
3775 | 1.66k | break; |
3776 | 912 | case CL_AI_OPTION_CMTS_CM_SERVICE_CLASS: |
3777 | 912 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_service_class_name, tvb, clsuboptoff, vs_len, ENC_ASCII); |
3778 | 912 | clsuboptoff += vs_len; |
3779 | 912 | break; |
3780 | 987 | case CL_AI_OPTION_CMTS_MSO_DEFINED_TEXT: |
3781 | 987 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_mso_defined_text, tvb, clsuboptoff, vs_len, ENC_ASCII); |
3782 | 987 | clsuboptoff += vs_len; |
3783 | 987 | break; |
3784 | 455 | case CL_AI_OPTION_SECURE_FILE_TRANSFER_URI: |
3785 | 455 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_secure_file_transfer_uri, tvb, clsuboptoff, vs_len, ENC_ASCII); |
3786 | 455 | clsuboptoff += vs_len; |
3787 | 455 | break; |
3788 | 59.5k | default: |
3789 | 59.5k | expert_add_info_format(pinfo, vti, &ei_dhcp_option82_vi_cl_tag_unknown, "Unknown tag %d (%d bytes)", vs_opt, vs_len); |
3790 | 59.5k | clsuboptoff += vs_len; |
3791 | 59.5k | break; |
3792 | 66.5k | } |
3793 | 66.5k | } |
3794 | 1.37k | suboptoff = clsuboptoff; |
3795 | 1.37k | break; |
3796 | 564 | default: |
3797 | 564 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_value, tvb, suboptoff, datalen, ENC_NA); |
3798 | 564 | suboptoff += datalen; |
3799 | 564 | break; |
3800 | 1.96k | } |
3801 | 1.96k | } |
3802 | 2.10k | break; |
3803 | 2.10k | case 13: /* Access Technology Type */ |
3804 | 0 | if (subopt_len != 2) { |
3805 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 2"); |
3806 | 0 | break; |
3807 | 0 | } |
3808 | 0 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_option_ani_att_res, tvb, suboptoff, 1, ENC_NA); |
3809 | 0 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_option_ani_att_att, tvb, suboptoff+1, 1, ENC_NA); |
3810 | 0 | break; |
3811 | 0 | break; |
3812 | 318 | case 151: |
3813 | 318 | if (subopt_len == 1) { |
3814 | 105 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name_global, tvb, suboptoff, 1, ENC_NA); |
3815 | 105 | } |
3816 | 213 | else if (subopt_len != 7) { |
3817 | 137 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name, tvb, suboptoff, subopt_len, ENC_ASCII); |
3818 | 137 | } else { |
3819 | 76 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name_vpn_id_oui, tvb, suboptoff, 3, ENC_BIG_ENDIAN); |
3820 | 76 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name_vpn_id_index, tvb, suboptoff+3, 4, ENC_BIG_ENDIAN); |
3821 | 76 | } |
3822 | 318 | break; |
3823 | 134 | default: |
3824 | 134 | if (o82_opt[idx].info.phf != NULL) |
3825 | 134 | proto_tree_add_item(o82_v_tree, *o82_opt[idx].info.phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
3826 | 0 | else |
3827 | 0 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_value, tvb, suboptoff, subopt_len, ENC_NA); |
3828 | 134 | break; |
3829 | 2.60k | } |
3830 | 2.60k | } |
3831 | 5.20k | else { |
3832 | 5.20k | dhcp_handle_basic_types(pinfo, o82_v_tree, vti, tvb, o82_opt[idx].info.ftype, |
3833 | 5.20k | suboptoff, subopt_len, o82_opt[idx].info.phf, &default_hfs); |
3834 | 5.20k | } |
3835 | 7.80k | } |
3836 | | |
3837 | 14.6k | optoff += (subopt_len + 2); |
3838 | 14.6k | return optoff; |
3839 | 14.6k | } |
3840 | | |
3841 | | static int |
3842 | | dissect_dhcpopt_relay_agent_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3843 | 258 | { |
3844 | 258 | int offset = 0; |
3845 | | |
3846 | 15.0k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3847 | 14.8k | offset = dhcp_dhcp_decode_agent_info(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb)); |
3848 | 14.8k | } |
3849 | | |
3850 | 258 | return tvb_captured_length(tvb); |
3851 | 258 | } |
3852 | | |
3853 | 574 | # define O43PXE_DISCOVERY 6 |
3854 | 415 | # define O43PXE_BOOT_SERVER 8 |
3855 | 268 | # define O43PXE_BOOT_MENU 9 |
3856 | 397 | # define O43PXE_MENU_PROMPT 10 |
3857 | 97 | # define O43PXE_BOOT_ITEM 71 |
3858 | | |
3859 | | static const value_string option43_pxeclient_suboption_vals[] = { |
3860 | | { 0, "Padding" }, |
3861 | | { 1, "PXE mtftp IP" }, |
3862 | | { 2, "PXE mtftp client port" }, |
3863 | | { 3, "PXE mtftp server port" }, |
3864 | | { 4, "PXE mtftp timeout" }, |
3865 | | { 5, "PXE mtftp delay" }, |
3866 | | { O43PXE_DISCOVERY, "PXE discovery control" }, |
3867 | | { 7, "PXE multicast address" }, |
3868 | | { O43PXE_BOOT_SERVER, "PXE boot servers" }, |
3869 | | { O43PXE_BOOT_MENU, "PXE boot menu" }, |
3870 | | { O43PXE_MENU_PROMPT, "PXE menu prompt" }, |
3871 | | { 11, "PXE multicast address alloc", }, |
3872 | | { 12, "PXE credential types" }, |
3873 | | { O43PXE_BOOT_ITEM, "PXE boot item" }, |
3874 | | { 179, "PXE LCM Server" }, |
3875 | | { 180, "PXE LCM Domain" }, |
3876 | | { 181, "PXE LCM NIC option 0" }, |
3877 | | { 190, "PXE LCM Workgroup" }, |
3878 | | { 191, "PXE Discovery" }, |
3879 | | { 192, "PXE Configured" }, |
3880 | | { 193, "PXE LCM version" }, |
3881 | | { 194, "PXE LCM Serial Number" }, |
3882 | | { 255, "PXE End" }, |
3883 | | { 0, NULL} |
3884 | | }; |
3885 | | |
3886 | | static int |
3887 | | dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
3888 | | tvbuff_t *tvb, int optoff, int optend) |
3889 | 7.19k | { |
3890 | 7.19k | int suboptoff = optoff; |
3891 | 7.19k | int suboptoff_start; |
3892 | 7.19k | uint8_t subopt; |
3893 | 7.19k | uint8_t subopt_len; |
3894 | 7.19k | proto_tree *o43pxeclient_v_tree, *o43pxeclient_suboption_tree; |
3895 | 7.19k | proto_item *vti, *ti; |
3896 | 7.19k | uint32_t boot_server_ip_count; |
3897 | 7.19k | uint32_t boot_menu_length; |
3898 | | |
3899 | 7.19k | static const struct basic_types_hfs default_hfs = { |
3900 | 7.19k | NULL, |
3901 | 7.19k | &hf_dhcp_option43_value_ip_address, |
3902 | 7.19k | &hf_dhcp_option43_value_ip_address, |
3903 | 7.19k | NULL, |
3904 | 7.19k | NULL, |
3905 | 7.19k | &hf_dhcp_option43_value_8, |
3906 | 7.19k | NULL, |
3907 | 7.19k | NULL, |
3908 | 7.19k | NULL, |
3909 | 7.19k | NULL, |
3910 | 7.19k | NULL |
3911 | 7.19k | }; |
3912 | | |
3913 | 7.19k | static int * const o43pxe_discovery_hf_flags[] = { |
3914 | 7.19k | &hf_dhcp_option43_pxeclient_discovery_control_bc, |
3915 | 7.19k | &hf_dhcp_option43_pxeclient_discovery_control_mc, |
3916 | 7.19k | &hf_dhcp_option43_pxeclient_discovery_control_serverlist, |
3917 | 7.19k | &hf_dhcp_option43_pxeclient_discovery_control_bstrap, |
3918 | 7.19k | NULL |
3919 | 7.19k | }; |
3920 | | |
3921 | 7.19k | static const struct opt_info o43pxeclient_opt[]= { |
3922 | 7.19k | /* 0 */ {"nop", special, &hf_dhcp_option43_pxeclient_padding}, /* dummy */ |
3923 | 7.19k | /* 1 */ {"PXE mtftp IP", ipv4_list, &hf_dhcp_option43_pxeclient_mtftp_ip}, |
3924 | 7.19k | /* 2 */ {"PXE mtftp client port", val_u_le_short, &hf_dhcp_option43_pxeclient_mtftp_client_port}, |
3925 | 7.19k | /* 3 */ {"PXE mtftp server port",val_u_le_short, &hf_dhcp_option43_pxeclient_mtftp_server_port}, |
3926 | 7.19k | /* 4 */ {"PXE mtftp timeout", val_u_byte, &hf_dhcp_option43_pxeclient_mtftp_timeout}, |
3927 | 7.19k | /* 5 */ {"PXE mtftp delay", val_u_byte, &hf_dhcp_option43_pxeclient_mtftp_delay}, |
3928 | 7.19k | /* 6 */ {"PXE discovery control", special, NULL}, |
3929 | 7.19k | /* 7 */ {"PXE multicast address", ipv4_list, &hf_dhcp_option43_pxeclient_multicast_address}, |
3930 | 7.19k | /* 8 */ {"PXE boot servers", special, NULL}, |
3931 | 7.19k | /* 9 */ {"PXE boot menu", special, NULL}, |
3932 | 7.19k | /* 10 */ {"PXE menu prompt", special, NULL}, |
3933 | 7.19k | /* 11 */ {"PXE multicast address alloc", special, &hf_dhcp_option43_pxeclient_multicast_address_alloc}, |
3934 | 7.19k | /* 12 */ {"PXE credential types", special, &hf_dhcp_option43_pxeclient_credential_types}, |
3935 | 7.19k | /* 13 */ {"Unassigned", opaque, NULL}, |
3936 | 7.19k | /* 14 */ {"Unassigned", opaque, NULL}, |
3937 | 7.19k | /* 15 */ {"Unassigned", opaque, NULL}, |
3938 | 7.19k | /* 16 */ {"Unassigned", opaque, NULL}, |
3939 | 7.19k | /* 17 */ {"Unassigned", opaque, NULL}, |
3940 | 7.19k | /* 18 */ {"Unassigned", opaque, NULL}, |
3941 | 7.19k | /* 19 */ {"Unassigned", opaque, NULL}, |
3942 | 7.19k | /* 20 */ {"Unassigned", opaque, NULL}, |
3943 | 7.19k | /* 21 */ {"Unassigned", opaque, NULL}, |
3944 | 7.19k | /* 22 */ {"Unassigned", opaque, NULL}, |
3945 | 7.19k | /* 23 */ {"Unassigned", opaque, NULL}, |
3946 | 7.19k | /* 24 */ {"Unassigned", opaque, NULL}, |
3947 | 7.19k | /* 25 */ {"Unassigned", opaque, NULL}, |
3948 | 7.19k | /* 26 */ {"Unassigned", opaque, NULL}, |
3949 | 7.19k | /* 27 */ {"Unassigned", opaque, NULL}, |
3950 | 7.19k | /* 28 */ {"Unassigned", opaque, NULL}, |
3951 | 7.19k | /* 29 */ {"Unassigned", opaque, NULL}, |
3952 | 7.19k | /* 30 */ {"Unassigned", opaque, NULL}, |
3953 | 7.19k | /* 31 */ {"Unassigned", opaque, NULL}, |
3954 | 7.19k | /* 32 */ {"Unassigned", opaque, NULL}, |
3955 | 7.19k | /* 33 */ {"Unassigned", opaque, NULL}, |
3956 | 7.19k | /* 34 */ {"Unassigned", opaque, NULL}, |
3957 | 7.19k | /* 35 */ {"Unassigned", opaque, NULL}, |
3958 | 7.19k | /* 36 */ {"Unassigned", opaque, NULL}, |
3959 | 7.19k | /* 37 */ {"Unassigned", opaque, NULL}, |
3960 | 7.19k | /* 38 */ {"Unassigned", opaque, NULL}, |
3961 | 7.19k | /* 39 */ {"Unassigned", opaque, NULL}, |
3962 | 7.19k | /* 40 */ {"Unassigned", opaque, NULL}, |
3963 | 7.19k | /* 41 */ {"Unassigned", opaque, NULL}, |
3964 | 7.19k | /* 42 */ {"Unassigned", opaque, NULL}, |
3965 | 7.19k | /* 43 */ {"Unassigned", opaque, NULL}, |
3966 | 7.19k | /* 44 */ {"Unassigned", opaque, NULL}, |
3967 | 7.19k | /* 45 */ {"Unassigned", opaque, NULL}, |
3968 | 7.19k | /* 46 */ {"Unassigned", opaque, NULL}, |
3969 | 7.19k | /* 47 */ {"Unassigned", opaque, NULL}, |
3970 | 7.19k | /* 48 */ {"Unassigned", opaque, NULL}, |
3971 | 7.19k | /* 49 */ {"Unassigned", opaque, NULL}, |
3972 | 7.19k | /* 50 */ {"Unassigned", opaque, NULL}, |
3973 | 7.19k | /* 51 */ {"Unassigned", opaque, NULL}, |
3974 | 7.19k | /* 52 */ {"Unassigned", opaque, NULL}, |
3975 | 7.19k | /* 53 */ {"Unassigned", opaque, NULL}, |
3976 | 7.19k | /* 54 */ {"Unassigned", opaque, NULL}, |
3977 | 7.19k | /* 55 */ {"Unassigned", opaque, NULL}, |
3978 | 7.19k | /* 56 */ {"Unassigned", opaque, NULL}, |
3979 | 7.19k | /* 57 */ {"Unassigned", opaque, NULL}, |
3980 | 7.19k | /* 58 */ {"Unassigned", opaque, NULL}, |
3981 | 7.19k | /* 59 */ {"Unassigned", opaque, NULL}, |
3982 | 7.19k | /* 60 */ {"Unassigned", opaque, NULL}, |
3983 | 7.19k | /* 61 */ {"Unassigned", opaque, NULL}, |
3984 | 7.19k | /* 62 */ {"Unassigned", opaque, NULL}, |
3985 | 7.19k | /* 63 */ {"Unassigned", opaque, NULL}, |
3986 | 7.19k | /* 64 */ {"Unassigned", opaque, NULL}, |
3987 | 7.19k | /* 65 */ {"Unassigned", opaque, NULL}, |
3988 | 7.19k | /* 66 */ {"Unassigned", opaque, NULL}, |
3989 | 7.19k | /* 67 */ {"Unassigned", opaque, NULL}, |
3990 | 7.19k | /* 68 */ {"Unassigned", opaque, NULL}, |
3991 | 7.19k | /* 69 */ {"Unassigned", opaque, NULL}, |
3992 | 7.19k | /* 70 */ {"Unassigned", opaque, NULL}, |
3993 | 7.19k | /* 71 */ {"PXE boot item", special, NULL}, |
3994 | 7.19k | /* 72 */ {"Unassigned", opaque, NULL}, |
3995 | 7.19k | /* 73 */ {"Unassigned", opaque, NULL}, |
3996 | 7.19k | /* 74 */ {"Unassigned", opaque, NULL}, |
3997 | 7.19k | /* 75 */ {"Unassigned", opaque, NULL}, |
3998 | 7.19k | /* 76 */ {"Unassigned", opaque, NULL}, |
3999 | 7.19k | /* 77 */ {"Unassigned", opaque, NULL}, |
4000 | 7.19k | /* 78 */ {"Unassigned", opaque, NULL}, |
4001 | 7.19k | /* 79 */ {"Unassigned", opaque, NULL}, |
4002 | 7.19k | /* 80 */ {"Unassigned", opaque, NULL}, |
4003 | 7.19k | /* 81 */ {"Unassigned", opaque, NULL}, |
4004 | 7.19k | /* 82 */ {"Unassigned", opaque, NULL}, |
4005 | 7.19k | /* 83 */ {"Unassigned", opaque, NULL}, |
4006 | 7.19k | /* 84 */ {"Unassigned", opaque, NULL}, |
4007 | 7.19k | /* 85 */ {"Unassigned", opaque, NULL}, |
4008 | 7.19k | /* 86 */ {"Unassigned", opaque, NULL}, |
4009 | 7.19k | /* 87 */ {"Unassigned", opaque, NULL}, |
4010 | 7.19k | /* 88 */ {"Unassigned", opaque, NULL}, |
4011 | 7.19k | /* 89 */ {"Unassigned", opaque, NULL}, |
4012 | 7.19k | /* 90 */ {"Unassigned", opaque, NULL}, |
4013 | 7.19k | /* 91 */ {"Unassigned", opaque, NULL}, |
4014 | 7.19k | /* 92 */ {"Unassigned", opaque, NULL}, |
4015 | 7.19k | /* 93 */ {"Unassigned", opaque, NULL}, |
4016 | 7.19k | /* 94 */ {"Unassigned", opaque, NULL}, |
4017 | 7.19k | /* 95 */ {"Unassigned", opaque, NULL}, |
4018 | 7.19k | /* 96 */ {"Unassigned", opaque, NULL}, |
4019 | 7.19k | /* 97 */ {"Unassigned", opaque, NULL}, |
4020 | 7.19k | /* 98 */ {"Unassigned", opaque, NULL}, |
4021 | 7.19k | /* 99 */ {"Unassigned", opaque, NULL}, |
4022 | 7.19k | /* 100 */ {"Unassigned", opaque, NULL}, |
4023 | 7.19k | /* 101 */ {"Unassigned", opaque, NULL}, |
4024 | 7.19k | /* 102 */ {"Unassigned", opaque, NULL}, |
4025 | 7.19k | /* 103 */ {"Unassigned", opaque, NULL}, |
4026 | 7.19k | /* 104 */ {"Unassigned", opaque, NULL}, |
4027 | 7.19k | /* 105 */ {"Unassigned", opaque, NULL}, |
4028 | 7.19k | /* 106 */ {"Unassigned", opaque, NULL}, |
4029 | 7.19k | /* 107 */ {"Unassigned", opaque, NULL}, |
4030 | 7.19k | /* 108 */ {"Unassigned", opaque, NULL}, |
4031 | 7.19k | /* 109 */ {"Unassigned", opaque, NULL}, |
4032 | 7.19k | /* 110 */ {"Unassigned", opaque, NULL}, |
4033 | 7.19k | /* 111 */ {"Unassigned", opaque, NULL}, |
4034 | 7.19k | /* 112 */ {"Unassigned", opaque, NULL}, |
4035 | 7.19k | /* 113 */ {"Unassigned", opaque, NULL}, |
4036 | 7.19k | /* 114 */ {"Unassigned", opaque, NULL}, |
4037 | 7.19k | /* 115 */ {"Unassigned", opaque, NULL}, |
4038 | 7.19k | /* 116 */ {"Unassigned", opaque, NULL}, |
4039 | 7.19k | /* 117 */ {"Unassigned", opaque, NULL}, |
4040 | 7.19k | /* 118 */ {"Unassigned", opaque, NULL}, |
4041 | 7.19k | /* 119 */ {"Unassigned", opaque, NULL}, |
4042 | 7.19k | /* 120 */ {"Unassigned", opaque, NULL}, |
4043 | 7.19k | /* 121 */ {"Unassigned", opaque, NULL}, |
4044 | 7.19k | /* 122 */ {"Unassigned", opaque, NULL}, |
4045 | 7.19k | /* 123 */ {"Unassigned", opaque, NULL}, |
4046 | 7.19k | /* 124 */ {"Unassigned", opaque, NULL}, |
4047 | 7.19k | /* 125 */ {"Unassigned", opaque, NULL}, |
4048 | 7.19k | /* 126 */ {"Unassigned", opaque, NULL}, |
4049 | 7.19k | /* 127 */ {"Unassigned", opaque, NULL}, |
4050 | 7.19k | /* 128 */ {"Unassigned", opaque, NULL}, |
4051 | 7.19k | /* 129 */ {"Unassigned", opaque, NULL}, |
4052 | 7.19k | /* 130 */ {"Unassigned", opaque, NULL}, |
4053 | 7.19k | /* 131 */ {"Unassigned", opaque, NULL}, |
4054 | 7.19k | /* 132 */ {"Unassigned", opaque, NULL}, |
4055 | 7.19k | /* 133 */ {"Unassigned", opaque, NULL}, |
4056 | 7.19k | /* 134 */ {"Unassigned", opaque, NULL}, |
4057 | 7.19k | /* 135 */ {"Unassigned", opaque, NULL}, |
4058 | 7.19k | /* 136 */ {"Unassigned", opaque, NULL}, |
4059 | 7.19k | /* 137 */ {"Unassigned", opaque, NULL}, |
4060 | 7.19k | /* 138 */ {"Unassigned", opaque, NULL}, |
4061 | 7.19k | /* 139 */ {"Unassigned", opaque, NULL}, |
4062 | 7.19k | /* 140 */ {"Unassigned", opaque, NULL}, |
4063 | 7.19k | /* 141 */ {"Unassigned", opaque, NULL}, |
4064 | 7.19k | /* 142 */ {"Unassigned", opaque, NULL}, |
4065 | 7.19k | /* 143 */ {"Unassigned", opaque, NULL}, |
4066 | 7.19k | /* 144 */ {"Unassigned", opaque, NULL}, |
4067 | 7.19k | /* 145 */ {"Unassigned", opaque, NULL}, |
4068 | 7.19k | /* 146 */ {"Unassigned", opaque, NULL}, |
4069 | 7.19k | /* 147 */ {"Unassigned", opaque, NULL}, |
4070 | 7.19k | /* 148 */ {"Unassigned", opaque, NULL}, |
4071 | 7.19k | /* 149 */ {"Unassigned", opaque, NULL}, |
4072 | 7.19k | /* 150 */ {"Unassigned", opaque, NULL}, |
4073 | 7.19k | /* 151 */ {"Unassigned", opaque, NULL}, |
4074 | 7.19k | /* 152 */ {"Unassigned", opaque, NULL}, |
4075 | 7.19k | /* 153 */ {"Unassigned", opaque, NULL}, |
4076 | 7.19k | /* 154 */ {"Unassigned", opaque, NULL}, |
4077 | 7.19k | /* 155 */ {"Unassigned", opaque, NULL}, |
4078 | 7.19k | /* 156 */ {"Unassigned", opaque, NULL}, |
4079 | 7.19k | /* 157 */ {"Unassigned", opaque, NULL}, |
4080 | 7.19k | /* 158 */ {"Unassigned", opaque, NULL}, |
4081 | 7.19k | /* 159 */ {"Unassigned", opaque, NULL}, |
4082 | 7.19k | /* 160 */ {"Unassigned", opaque, NULL}, |
4083 | 7.19k | /* 161 */ {"Unassigned", opaque, NULL}, |
4084 | 7.19k | /* 162 */ {"Unassigned", opaque, NULL}, |
4085 | 7.19k | /* 163 */ {"Unassigned", opaque, NULL}, |
4086 | 7.19k | /* 164 */ {"Unassigned", opaque, NULL}, |
4087 | 7.19k | /* 165 */ {"Unassigned", opaque, NULL}, |
4088 | 7.19k | /* 166 */ {"Unassigned", opaque, NULL}, |
4089 | 7.19k | /* 167 */ {"Unassigned", opaque, NULL}, |
4090 | 7.19k | /* 168 */ {"Unassigned", opaque, NULL}, |
4091 | 7.19k | /* 169 */ {"Unassigned", opaque, NULL}, |
4092 | 7.19k | /* 170 */ {"Unassigned", opaque, NULL}, |
4093 | 7.19k | /* 171 */ {"Unassigned", opaque, NULL}, |
4094 | 7.19k | /* 172 */ {"Unassigned", opaque, NULL}, |
4095 | 7.19k | /* 173 */ {"Unassigned", opaque, NULL}, |
4096 | 7.19k | /* 174 */ {"Unassigned", opaque, NULL}, |
4097 | 7.19k | /* 175 */ {"Unassigned", opaque, NULL}, |
4098 | 7.19k | /* 176 */ {"Unassigned", opaque, NULL}, |
4099 | 7.19k | /* 177 */ {"Unassigned", opaque, NULL}, |
4100 | 7.19k | /* 178 */ {"Unassigned", opaque, NULL}, |
4101 | 7.19k | /* 179 */ {"LCM Server", string, &hf_dhcp_option43_pxeclient_lcm_server}, |
4102 | 7.19k | /* 180 */ {"LCM Domain", string, &hf_dhcp_option43_pxeclient_lcm_domain}, |
4103 | 7.19k | /* 181 */ {"LCM NIC Option 0", bytes, &hf_dhcp_option43_pxeclient_lcm_nic_option}, |
4104 | 7.19k | /* 182 */ {"Unassigned", opaque, NULL}, |
4105 | 7.19k | /* 183 */ {"Unassigned", opaque, NULL}, |
4106 | 7.19k | /* 184 */ {"Unassigned", opaque, NULL}, |
4107 | 7.19k | /* 185 */ {"Unassigned", opaque, NULL}, |
4108 | 7.19k | /* 186 */ {"Unassigned", opaque, NULL}, |
4109 | 7.19k | /* 187 */ {"Unassigned", opaque, NULL}, |
4110 | 7.19k | /* 188 */ {"Unassigned", opaque, NULL}, |
4111 | 7.19k | /* 189 */ {"Unassigned", opaque, NULL}, |
4112 | 7.19k | /* 190 */ {"LCM Workgroup", string, &hf_dhcp_option43_pxeclient_lcm_workgroup}, |
4113 | 7.19k | /* 191 */ {"Discovery", val_boolean, &hf_dhcp_option43_pxeclient_discovery}, |
4114 | 7.19k | /* 192 */ {"Configured", val_boolean, &hf_dhcp_option43_pxeclient_configured}, |
4115 | 7.19k | /* 193 */ {"LCM Version", val_u_long, &hf_dhcp_option43_pxeclient_lcm_version}, |
4116 | 7.19k | /* 194 */ {"LCM Serial Number", string, &hf_dhcp_option43_pxeclient_lcm_serial}, |
4117 | | /* 255 {"PXE end options", special, &hf_dhcp_option43_pxeclient_end} */ |
4118 | 7.19k | }; |
4119 | | |
4120 | 7.19k | subopt = tvb_get_uint8(tvb, optoff); |
4121 | 7.19k | suboptoff++; |
4122 | | |
4123 | 7.19k | if (subopt == 0) { |
4124 | 2.43k | proto_tree_add_item(v_tree, hf_dhcp_option43_pxeclient_padding, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4125 | 2.43k | return (suboptoff); |
4126 | 4.76k | } else if (subopt == 255) { /* End Option */ |
4127 | 2 | proto_tree_add_item(v_tree, hf_dhcp_option43_pxeclient_end, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4128 | | /* Make sure we skip any junk left this option */ |
4129 | 2 | return (optend); |
4130 | 2 | } |
4131 | | |
4132 | 4.76k | if (suboptoff >= optend) { |
4133 | 11 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
4134 | 11 | "Suboption %d: no room left in option for suboption length", subopt); |
4135 | 11 | return (optend); |
4136 | 11 | } |
4137 | | |
4138 | 4.75k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
4139 | 4.75k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_pxeclient_suboption, |
4140 | 4.75k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
4141 | 4.75k | subopt, val_to_str_const(subopt, option43_pxeclient_suboption_vals, "Unknown")); |
4142 | | |
4143 | 4.75k | o43pxeclient_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
4144 | 4.75k | proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4145 | 4.75k | suboptoff++; |
4146 | | |
4147 | 4.75k | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4148 | 4.75k | proto_item_set_hidden(ti); |
4149 | | |
4150 | 4.75k | if ((subopt < 1) || (subopt >= array_length(o43pxeclient_opt))) { |
4151 | 321 | expert_add_info_format(pinfo, vti, &ei_dhcp_suboption_invalid, "Unknown suboption %d (%d bytes)", subopt, subopt_len); |
4152 | 4.42k | } else if (o43pxeclient_opt[subopt].ftype == special) { |
4153 | | /* I may need to decode that properly one day */ |
4154 | 2.02k | if (o43pxeclient_opt[subopt].phf != NULL) |
4155 | 277 | proto_tree_add_item(o43pxeclient_v_tree, *o43pxeclient_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4156 | 1.75k | else { |
4157 | 1.75k | switch(subopt) |
4158 | 1.75k | { |
4159 | 574 | case O43PXE_DISCOVERY: |
4160 | 574 | proto_tree_add_bitmask(o43pxeclient_v_tree, tvb, suboptoff, hf_dhcp_option43_pxeclient_discovery_control, |
4161 | 574 | ett_dhcp_option43_suboption_discovery, o43pxe_discovery_hf_flags, ENC_BIG_ENDIAN); |
4162 | 574 | break; |
4163 | 415 | case O43PXE_BOOT_SERVER: |
4164 | 415 | suboptoff_start = suboptoff; |
4165 | 415 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_boot_servers, tvb, suboptoff, subopt_len, ENC_NA); |
4166 | 415 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4167 | 730 | while((suboptoff - suboptoff_start) < (subopt_len - 1)) { |
4168 | 315 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_server_type, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
4169 | 315 | suboptoff += 2; |
4170 | 315 | proto_tree_add_item_ret_uint(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_server_count, tvb, suboptoff, 1, ENC_BIG_ENDIAN, &boot_server_ip_count); |
4171 | 315 | suboptoff += 1; |
4172 | 2.01k | while(boot_server_ip_count > 0) { |
4173 | 1.70k | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_server_ip, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
4174 | 1.70k | suboptoff += 4; |
4175 | 1.70k | boot_server_ip_count -=1; |
4176 | 1.70k | } |
4177 | 315 | } |
4178 | 415 | break; |
4179 | 268 | case O43PXE_BOOT_MENU: |
4180 | 268 | suboptoff_start = suboptoff; |
4181 | 268 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_boot_menu, tvb, suboptoff, subopt_len, ENC_NA); |
4182 | 268 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4183 | 451 | while((suboptoff - suboptoff_start) < (subopt_len - 1)) { |
4184 | 183 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_menu_type, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
4185 | 183 | suboptoff += 2; |
4186 | 183 | proto_tree_add_item_ret_uint(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_menu_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN, &boot_menu_length); |
4187 | 183 | suboptoff += 1; |
4188 | 183 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_menu_desc, tvb, suboptoff, boot_menu_length, ENC_ASCII); |
4189 | 183 | suboptoff += boot_menu_length; |
4190 | 183 | } |
4191 | 268 | break; |
4192 | 397 | case O43PXE_MENU_PROMPT: |
4193 | 397 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_menu_prompt, tvb, suboptoff, subopt_len, ENC_NA); |
4194 | 397 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4195 | 397 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_menu_prompt_timeout, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4196 | 397 | suboptoff += 1; |
4197 | 397 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_menu_prompt_prompt, tvb, suboptoff, subopt_len - 1, ENC_ASCII); |
4198 | 397 | break; |
4199 | 97 | case O43PXE_BOOT_ITEM: |
4200 | 97 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_boot_item, tvb, suboptoff, subopt_len, ENC_NA); |
4201 | 97 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4202 | 97 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_item_type, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
4203 | 97 | suboptoff += 2; |
4204 | 97 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_item_layer, tvb, suboptoff, 2, ENC_NA); |
4205 | 97 | break; |
4206 | 0 | default: |
4207 | 0 | proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4208 | 0 | break; |
4209 | 1.75k | } |
4210 | 1.75k | } |
4211 | 2.40k | } else { |
4212 | 2.40k | if (dhcp_handle_basic_types(pinfo, o43pxeclient_v_tree, vti, tvb, o43pxeclient_opt[subopt].ftype, |
4213 | 2.40k | suboptoff, subopt_len, o43pxeclient_opt[subopt].phf, &default_hfs) == 0) |
4214 | 1.92k | { |
4215 | 1.92k | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); |
4216 | 1.92k | } |
4217 | 2.40k | } |
4218 | | |
4219 | 4.72k | optoff += (subopt_len + 2); |
4220 | 4.72k | return optoff; |
4221 | 4.75k | } |
4222 | | |
4223 | | static bool |
4224 | | dissect_pxeclient_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
4225 | 1.15k | { |
4226 | 1.15k | int offset = 0; |
4227 | 1.15k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4228 | 1.15k | proto_tree* vendor_tree; |
4229 | | |
4230 | | /* PXE protocol 2.1 as described in the Intel specs */ |
4231 | 1.15k | if ((option_data->vendor_class_id == NULL) || |
4232 | 884 | (strncmp((const char*)option_data->vendor_class_id, "PXEClient", strlen("PXEClient")) != 0)) |
4233 | 1.04k | return false; |
4234 | | |
4235 | 107 | proto_item_append_text(tree, " (PXEClient)"); |
4236 | 107 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
4237 | | |
4238 | 7.30k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
4239 | 7.19k | offset = dissect_vendor_pxeclient_suboption(pinfo, tree, vendor_tree, |
4240 | 7.19k | tvb, offset, tvb_reported_length(tvb)); |
4241 | 7.19k | } |
4242 | | |
4243 | 107 | return true; |
4244 | 1.15k | } |
4245 | | |
4246 | | static void |
4247 | | dissect_vendor_avaya_param(proto_tree *tree, packet_info *pinfo, proto_item *vti, |
4248 | | tvbuff_t *tvb, int optoff, wmem_strbuf_t *avaya_param_buf) |
4249 | 11.9k | { |
4250 | 11.9k | const char *field; |
4251 | 11.9k | int len; |
4252 | | |
4253 | 11.9k | field = wmem_strbuf_get_str(avaya_param_buf); |
4254 | 11.9k | len = (int)wmem_strbuf_get_len(avaya_param_buf); |
4255 | | |
4256 | 11.9k | if((strncmp(field, "TLSSRVR=", 8) == 0) && ( len > 8 )) { |
4257 | 67 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_tlssrvr, tvb, optoff, len, field + 8); |
4258 | 67 | } |
4259 | 11.8k | else if((strncmp(field, "HTTPSRVR=", 9) == 0) && ( len > 9)) { |
4260 | 66 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_httpsrvr, tvb, optoff, len, field + 9); |
4261 | 66 | } |
4262 | 11.7k | else if((strncmp(field, "HTTPDIR=", 8) == 0) && ( len > 8)) { |
4263 | 67 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_httpdir, tvb, optoff, len, field + 8); |
4264 | 67 | } |
4265 | 11.7k | else if((strncmp(field, "STATIC=", 7) == 0) && ( len > 7)) { |
4266 | 54 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_static, tvb, optoff, len, field + 7, "%s (%s)", field + 7, str_to_str_wmem(pinfo->pool, field + 7, option242_avaya_static_vals, "Unknown (%s)")); |
4267 | 54 | } |
4268 | 11.6k | else if((strncmp(field, "MCIPADD=", 8) == 0) && ( len > 8)) { |
4269 | 48 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_mcipadd, tvb, optoff, len, field + 8); |
4270 | 48 | } |
4271 | 11.6k | else if((strncmp(field, "DOT1X=", 6) == 0) && ( len > 6)) { |
4272 | 58 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_dot1x, tvb, optoff, len, field + 6, "%s (%s)", field + 6, str_to_str_wmem(pinfo->pool, field + 6, option242_avaya_dot1x_vals, "Unknown (%s)")); |
4273 | 58 | } |
4274 | 11.5k | else if((strncmp(field, "ICMPDU=", 7) == 0) && ( len > 7)) { |
4275 | 63 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_icmpdu, tvb, optoff, len, field + 7, "%s (%s)", field + 7, str_to_str_wmem(pinfo->pool, field + 7, option242_avaya_icmpdu_vals, "Unknown (%s)")); |
4276 | 63 | } |
4277 | 11.4k | else if((strncmp(field, "ICMPRED=", 8) == 0) && ( len > 8)) { |
4278 | 85 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_icmpred, tvb, optoff, len, field + 8, "%s (%s)", field + 8, str_to_str_wmem(pinfo->pool, field + 8, option242_avaya_icmpred_vals, "Unknown (%s)")); |
4279 | 85 | } |
4280 | 11.4k | else if((strncmp(field, "L2Q=", 4) == 0) && ( len > 4)) { |
4281 | 184 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_l2q, tvb, optoff, len, field + 4, "%s (%s)", field + 4, str_to_str_wmem(pinfo->pool, field + 4, option242_avaya_l2q_vals, "Unknown (%s)")); |
4282 | 184 | } |
4283 | 11.2k | else if((strncmp(field, "L2QVLAN=", 8) == 0) && ( len > 8)) { |
4284 | 316 | int32_t val = -1; |
4285 | 316 | bool val_valid; |
4286 | 316 | proto_item* pi; |
4287 | | |
4288 | 316 | val_valid = ws_strtoi32(field + 8, NULL, &val); |
4289 | 316 | pi = proto_tree_add_int(tree, hf_dhcp_option242_avaya_l2qvlan, tvb, optoff, len, val); |
4290 | 316 | if (val_valid) |
4291 | 52 | expert_add_info(pinfo, pi, &ei_dhcp_option242_avaya_l2qvlan_invalid); |
4292 | 316 | } |
4293 | 10.9k | else if((strncmp(field, "LOGLOCAL=", 9) == 0) && ( len > 9)) { |
4294 | 72 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_loglocal, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str_wmem(pinfo->pool, field + 9, option242_avaya_loglocal_vals, "Unknown (%s)")); |
4295 | 72 | } |
4296 | 10.8k | else if((strncmp(field, "PHY1STAT=", 9) == 0) && ( len > 9)) { |
4297 | 57 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_phy1stat, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str_wmem(pinfo->pool, field + 9, option242_avaya_phystat_vals, "Unknown (%s)")); |
4298 | 57 | } |
4299 | 10.7k | else if((strncmp(field, "PHY2STAT=", 9) == 0) && ( len > 9)) { |
4300 | 70 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_phy2stat, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str_wmem(pinfo->pool, field + 9, option242_avaya_phystat_vals, "Unknown (%s)")); |
4301 | 70 | } |
4302 | 10.7k | else if((strncmp(field, "PROCPSWD=", 9) == 0) && ( len > 9)) { |
4303 | 70 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_procpswd, tvb, optoff, len, field + 9); |
4304 | 70 | } |
4305 | 10.6k | else if((strncmp(field, "PROCSTAT=", 9) == 0) && ( len > 9)) { |
4306 | 81 | proto_tree_add_string_format_value(tree, hf_dhcp_option242_avaya_procstat, tvb, optoff, len, field + 9, "%s (%s)", field + 9, str_to_str_wmem(pinfo->pool, field + 9, option242_avaya_procstat_vals, "Unknown (%s)")); |
4307 | 81 | } |
4308 | 10.5k | else if((strncmp(field, "SNMPADD=", 8) == 0) && ( len > 8)) { |
4309 | 65 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_snmpadd, tvb, optoff, len, field + 8); |
4310 | 65 | } |
4311 | 10.4k | else if((strncmp(field, "SNMPSTRING=", 11) == 0) && ( len > 11)) { |
4312 | 40 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_snmpstring, tvb, optoff, len, field + 11); |
4313 | 40 | } |
4314 | 10.4k | else if((strncmp(field, "VLANTEST=", 9) == 0) && ( len > 9)) { |
4315 | 733 | int32_t val = -1; |
4316 | 733 | bool val_valid; |
4317 | 733 | proto_item* pi; |
4318 | | |
4319 | 733 | val_valid = ws_strtoi32(field + 9, NULL, &val); |
4320 | 733 | pi = proto_tree_add_int(tree, hf_dhcp_option242_avaya_vlantest, tvb, optoff, len, val); |
4321 | 733 | if (!val_valid) |
4322 | 530 | expert_add_info(pinfo, pi, &ei_dhcp_option242_avaya_vlantest_invalid); |
4323 | 733 | } |
4324 | 9.71k | else { |
4325 | 9.71k | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, Unknown Avaya IP Telephone parameter %s", field); |
4326 | 9.71k | } |
4327 | 11.9k | } |
4328 | | |
4329 | | /* RFC3825Decoder: |
4330 | | * |
4331 | | * https://web.archive.org/web/20100312054301/http://www.enum.at/rfc3825encoder.529.0.html |
4332 | | * |
4333 | | * The code is no longer available. |
4334 | | */ |
4335 | | static void |
4336 | | rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fixpoint_t *fixpoint) |
4337 | 59 | { |
4338 | 59 | fixpoint->latitude_res = (lci[0]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */ |
4339 | 59 | if (lci[0] & 2) { /* LSB<<1 contains the sign of the latitude */ |
4340 | | /* Latitude is negative, expand two's complement */ |
4341 | 12 | fixpoint->latitude = (((int64_t)lci[0] & 3)<<32) | ((int64_t)lci[1]<<24) | |
4342 | 12 | ((int64_t)lci[2]<<16) | ((int64_t)lci[3]<<8) | |
4343 | 12 | (int64_t)lci[4] | ((int64_t)0x3FFFFFFF<<34); |
4344 | | |
4345 | 47 | } else { |
4346 | | /* Latitude is positive */ |
4347 | 47 | fixpoint->latitude = (((int64_t)lci[0] & 3)<<32) | ((int64_t)lci[1]<<24) | |
4348 | 47 | ((int64_t)lci[2]<<16) | ((int64_t)lci[3]<<8) | |
4349 | 47 | (int64_t)lci[4]; |
4350 | 47 | } |
4351 | 59 | fixpoint->longitude_res = (lci[5]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */ |
4352 | 59 | if (lci[5] & 2) { /* LSB<<1 contains the sign of the latitude */ |
4353 | | /* Longitude is negative, expand two's complement */ |
4354 | 16 | fixpoint->longitude = (((int64_t)lci[5] & 3)<<32) | ((int64_t)lci[6]<<24) | |
4355 | 16 | ((int64_t)lci[7]<<16) | ((int64_t)lci[8]<<8) | |
4356 | 16 | (int64_t)lci[9] | ((int64_t)0x3FFFFFFF<<34); |
4357 | | |
4358 | 43 | } else { |
4359 | | /* Longitude is positive */ |
4360 | 43 | fixpoint->longitude = (((int64_t)lci[5] & 3)<<32) | ((int64_t)lci[6]<<24) | |
4361 | 43 | ((int64_t)lci[7]<<16) | ((int64_t)lci[8]<<8) | |
4362 | 43 | (int64_t)lci[9]; |
4363 | 43 | } |
4364 | 59 | fixpoint->altitude_type = (lci[10]>>4) & 0x0F; /* make sure that right-shift does not copy sign bit */ |
4365 | 59 | fixpoint->altitude_res = ((lci[10] & 0x0F) << 2) | ((lci[11]>>6) & 0x03); |
4366 | 59 | if (lci[11] & 0x20) { /* LSB<<1 contains the sign of the latitude */ |
4367 | | /* Altitude is negative, expand two's complement */ |
4368 | 20 | fixpoint->altitude = (((int32_t)lci[11] & 0x3F)<<24) | ((int32_t)lci[12]<<16) | |
4369 | 20 | ((int32_t)lci[13]<<8) | ((int32_t)lci[14]) | |
4370 | 20 | ((int32_t)0x03<<30); |
4371 | | |
4372 | 39 | } else { |
4373 | | /* Altitude is positive */ |
4374 | 39 | fixpoint->altitude = (((int32_t)lci[11] & 0x3F)<<24) | ((int32_t)lci[12]<<16) | |
4375 | 39 | ((int32_t)lci[13]<<8) | ((int32_t)lci[14]); |
4376 | 39 | } |
4377 | | |
4378 | 59 | fixpoint->datum_type = lci[15]; |
4379 | | |
4380 | 59 | } |
4381 | | |
4382 | | /* RFC3825Decoder: |
4383 | | * |
4384 | | * https://web.archive.org/web/20100312054301/http://www.enum.at/rfc3825encoder.529.0.html |
4385 | | * |
4386 | | * The code is no longer available. |
4387 | | */ |
4388 | | static int |
4389 | | rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t *fixpoint, struct rfc3825_location_decimal_t *decimal) |
4390 | 59 | { |
4391 | | /* Latitude */ |
4392 | 59 | decimal->latitude = (double) fixpoint->latitude / (1 << 25); |
4393 | 59 | if ((decimal->latitude > 90) || (decimal->latitude < -90)) { |
4394 | 4 | return RFC3825_LATITUDE_OUTOFRANGE; |
4395 | 4 | } |
4396 | | |
4397 | | /* Latitude Uncertainty */ |
4398 | 55 | if (fixpoint->latitude_res > 34) { |
4399 | 1 | return RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE; |
4400 | 1 | } |
4401 | 54 | if (fixpoint->latitude_res > 8 ) { |
4402 | 25 | decimal->latitude_res = (double) 1 / (UINT64_C(1) << (fixpoint->latitude_res - 8)); |
4403 | 29 | } else { |
4404 | 29 | decimal->latitude_res = (double) (UINT64_C(1) << (8 - fixpoint->latitude_res)); |
4405 | 29 | } |
4406 | | |
4407 | | /* Longitude */ |
4408 | 54 | decimal->longitude = (double) fixpoint->longitude / (1 << 25); |
4409 | 54 | if ((decimal->longitude > 180) || (decimal->longitude < -180)) { |
4410 | 6 | return RFC3825_LONGITUDE_OUTOFRANGE; |
4411 | 6 | } |
4412 | | |
4413 | | /* Longitude Uncertainty */ |
4414 | 48 | if (fixpoint->longitude_res > 34) { |
4415 | 3 | return RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE; |
4416 | 3 | } |
4417 | 45 | if (fixpoint->longitude_res > 8 ) { |
4418 | 20 | decimal->longitude_res = (double) 1 / (UINT64_C(1) << (fixpoint->longitude_res - 8)); |
4419 | 25 | } else { |
4420 | 25 | decimal->longitude_res = (double) (UINT64_C(1) << (8 - fixpoint->longitude_res)); |
4421 | 25 | } |
4422 | | |
4423 | | /* Altitude Type */ |
4424 | 45 | decimal->altitude_type = fixpoint->altitude_type; |
4425 | 45 | decimal->altitude = 0; |
4426 | 45 | decimal->altitude_res = 0; |
4427 | | |
4428 | 45 | if (decimal->altitude_type == 0) { /* Unknown */ |
4429 | 27 | } else if (decimal->altitude_type == 1) { /* Meters */ |
4430 | | /* Altitude */ |
4431 | 9 | decimal->altitude = (double) fixpoint->altitude / (1 << 8); |
4432 | 9 | if ((decimal->altitude > ((int32_t) 1<<21)-1) || (decimal->altitude < ((int32_t) -(1<<21)))) |
4433 | 1 | return RFC3825_ALTITUDE_OUTOFRANGE; |
4434 | | |
4435 | | /* Altitude Uncertainty */ |
4436 | 8 | if (fixpoint->altitude_res > 30) { |
4437 | 1 | return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE; |
4438 | 1 | } |
4439 | 7 | if (fixpoint->altitude_res > 21 ) { |
4440 | 2 | decimal->altitude_res = (double) 1 / (UINT64_C(1) << (fixpoint->altitude_res - 21)); |
4441 | 5 | } else { |
4442 | 5 | decimal->altitude_res = (double) (UINT64_C(1) << (21 - fixpoint->altitude_res)); |
4443 | 5 | } |
4444 | 18 | } else if (decimal->altitude_type == 2) { /* Floors */ |
4445 | | /* Altitude */ |
4446 | 8 | if ((fixpoint->altitude_res != 30) && (fixpoint->altitude_res != 0)) { |
4447 | 5 | return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE; |
4448 | 5 | } |
4449 | 3 | decimal->altitude = (double) fixpoint->altitude / (1 << 8); |
4450 | 10 | } else { /* invalid type */ |
4451 | 10 | return RFC3825_ALTITUDE_TYPE_OUTOFRANGE; |
4452 | 10 | } |
4453 | | |
4454 | | /* Datum Type */ |
4455 | 28 | decimal->datum_type = 0; |
4456 | 28 | if ((fixpoint->datum_type > 3) || (fixpoint->datum_type < 1)) { |
4457 | 15 | return RFC3825_DATUM_TYPE_OUTOFRANGE; |
4458 | 15 | } |
4459 | 13 | decimal->datum_type = fixpoint->datum_type; |
4460 | | |
4461 | 13 | return RFC3825_NOERROR; |
4462 | 28 | } |
4463 | | |
4464 | | static int |
4465 | | dissect_dhcpopt_isns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
4466 | 111 | { |
4467 | 111 | static int * const isns_functions_hf_flags[] = { |
4468 | 111 | &hf_dhcp_option_isns_functions_enabled, |
4469 | 111 | &hf_dhcp_option_isns_functions_dd_authorization, |
4470 | 111 | &hf_dhcp_option_isns_functions_sec_policy_distibution, |
4471 | 111 | &hf_dhcp_option_isns_functions_reserved, |
4472 | 111 | NULL |
4473 | 111 | }; |
4474 | | |
4475 | 111 | static int * const isns_dda_hf_flags[] = { |
4476 | 111 | &hf_dhcp_option_isns_discovery_domain_access_enabled, |
4477 | 111 | &hf_dhcp_option_isns_discovery_domain_access_control_node, |
4478 | 111 | &hf_dhcp_option_isns_discovery_domain_access_iscsi_target, |
4479 | 111 | &hf_dhcp_option_isns_discovery_domain_access_iscsi_inititator, |
4480 | 111 | &hf_dhcp_option_isns_discovery_domain_access_ifcp_target_port, |
4481 | 111 | &hf_dhcp_option_isns_discovery_domain_access_ifcp_initiator_port, |
4482 | 111 | &hf_dhcp_option_isns_discovery_domain_access_reserved, |
4483 | 111 | NULL |
4484 | 111 | }; |
4485 | | |
4486 | 111 | static int * const isns_administrative_flags[] = { |
4487 | 111 | &hf_dhcp_option_isns_administrative_flags_enabled, |
4488 | 111 | &hf_dhcp_option_isns_administrative_flags_heartbeat, |
4489 | 111 | &hf_dhcp_option_isns_administrative_flags_management_scns, |
4490 | 111 | &hf_dhcp_option_isns_administrative_flags_default_dd, |
4491 | 111 | &hf_dhcp_option_isns_administrative_flags_reserved, |
4492 | 111 | NULL |
4493 | 111 | }; |
4494 | | |
4495 | 111 | static int * const isns_server_security_flags[] = { |
4496 | 111 | &hf_dhcp_option_isns_server_security_bitmap_enabled, |
4497 | 111 | &hf_dhcp_option_isns_server_security_bitmap_ike_ipsec_enabled, |
4498 | 111 | &hf_dhcp_option_isns_server_security_bitmap_main_mode, |
4499 | 111 | &hf_dhcp_option_isns_server_security_bitmap_aggressive_mode, |
4500 | 111 | &hf_dhcp_option_isns_server_security_bitmap_pfs, |
4501 | 111 | &hf_dhcp_option_isns_server_security_bitmap_transport_mode, |
4502 | 111 | &hf_dhcp_option_isns_server_security_bitmap_tunnel_mode, |
4503 | 111 | &hf_dhcp_option_isns_server_security_bitmap_reserved, |
4504 | 111 | NULL |
4505 | 111 | }; |
4506 | | |
4507 | 111 | uint16_t function_flags, dd_access_flags, administrative_flags; |
4508 | 111 | uint32_t server_security_flags; |
4509 | 111 | proto_tree *server_tree; |
4510 | 111 | proto_item *item; |
4511 | 111 | int length = tvb_reported_length(tvb); |
4512 | 111 | int offset = 0, heartbeat_set = 0; |
4513 | | |
4514 | 111 | if (length < 14) { |
4515 | 11 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be >= 14"); |
4516 | 11 | return 1; |
4517 | 11 | } |
4518 | | |
4519 | 100 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_functions, |
4520 | 100 | ett_dhcp_isns_functions, isns_functions_hf_flags, ENC_BIG_ENDIAN); |
4521 | 100 | function_flags = tvb_get_ntohs(tvb, offset); |
4522 | | /* RFC 4174, section "2.1. iSNS Functions Field" specifies that if |
4523 | | * the field "Function Fields Enabled" is set to 0, then "the contents |
4524 | | * of all other iSNS Function fields MUST be ignored. We will display |
4525 | | * the fields but add an informational expert info. This goes for all |
4526 | | * the bitmasks: iSNS Functions, DD Access, Administrative Flags, iSNS |
4527 | | * Server Security Bitmap */ |
4528 | 100 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(function_flags, F_ISNS_FUNCTIONS_ENABLED)) |
4529 | 32 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4530 | | |
4531 | 100 | offset += 2; |
4532 | 100 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_discovery_domain_access, |
4533 | 100 | ett_dhcp_isns_discovery_domain_access, isns_dda_hf_flags, ENC_BIG_ENDIAN); |
4534 | 100 | dd_access_flags = tvb_get_ntohs(tvb, offset); |
4535 | 100 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(dd_access_flags, F_ISNS_DD_ACCESS_ENABLED)) |
4536 | 48 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4537 | | |
4538 | 100 | offset += 2; |
4539 | 100 | administrative_flags = tvb_get_ntohs(tvb, offset); |
4540 | 100 | if (administrative_flags & F_ISNS_ADMIN_FLAGS_ENABLED) { |
4541 | 67 | if ((administrative_flags & F_ISNS_ADMIN_FLAGS_HEARTBEAT)) { |
4542 | 48 | if (length < 18) { |
4543 | 4 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be >= 18"); |
4544 | 4 | return offset; |
4545 | 4 | } |
4546 | 44 | heartbeat_set = 1; |
4547 | 44 | } |
4548 | 67 | } |
4549 | 96 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_administrative_flags, |
4550 | 96 | ett_dhcp_isns_administrative_flags, isns_administrative_flags, ENC_BIG_ENDIAN); |
4551 | 96 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(administrative_flags, F_ISNS_ADMIN_FLAGS_ENABLED)) |
4552 | 29 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4553 | | |
4554 | 96 | offset += 2; |
4555 | 96 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_server_security_bitmap, |
4556 | 96 | ett_dhcp_isns_server_security_bitmap, isns_server_security_flags, ENC_BIG_ENDIAN); |
4557 | 96 | server_security_flags = tvb_get_ntohl(tvb, offset); |
4558 | 96 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(server_security_flags, F_ISNS_SRV_SEC_BITMAP_ENABLED)) |
4559 | 40 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4560 | | |
4561 | 96 | offset += 4; |
4562 | 96 | if (heartbeat_set) { |
4563 | 44 | proto_tree_add_item(tree, hf_dhcp_option_isns_heartbeat_originator_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
4564 | 44 | offset += 4; |
4565 | 44 | } |
4566 | | |
4567 | 96 | proto_tree_add_item(tree, hf_dhcp_option_isns_primary_server_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
4568 | | |
4569 | 96 | offset += 4; |
4570 | 96 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
4571 | 94 | server_tree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_dhcp_isns_secondary_server_addr, |
4572 | 94 | &item, "Secondary iSNS Servers"); |
4573 | 94 | dhcp_handle_basic_types(pinfo, server_tree, item, tvb, ipv4_list, offset, tvb_reported_length_remaining(tvb, offset), |
4574 | 94 | &hf_dhcp_option_isns_secondary_server_addr_list, NULL); |
4575 | 94 | } |
4576 | | |
4577 | 96 | return tvb_captured_length(tvb); |
4578 | 100 | } |
4579 | | |
4580 | | static const value_string option43_cl_suboption_vals[] = { |
4581 | | { 0, "Padding" }, |
4582 | | { 1, "Suboption Request List" }, |
4583 | | { 2, "Device Type" }, |
4584 | | { 3, "eSAFE Types" }, |
4585 | | { 4, "Serial Number" }, |
4586 | | { 5, "Hardware Version" }, |
4587 | | { 6, "Software Version" }, |
4588 | | { 7, "Boot ROM version" }, |
4589 | | { 8, "Organizationally Unique Identifier" }, |
4590 | | { 9, "Model Number" }, |
4591 | | { 10, "Vendor Name" }, |
4592 | | { 11, "Address Realm" }, |
4593 | | { 12, "CM/PS System Description" }, |
4594 | | { 13, "CM/PS Firmware Revision" }, |
4595 | | { 14, "Firewall Policy File Version" }, |
4596 | | { 15, "eSafe Config File Devices" }, |
4597 | | { 18, "Video Security Type" }, |
4598 | | { 31, "MTA MAC Address" }, |
4599 | | { 32, "Correlation ID" }, |
4600 | | { 51, "Vendor Name" }, |
4601 | | { 52, "CableCARD Capability" }, |
4602 | | { 53, "Device Identification (CA)" }, |
4603 | | { 54, "Device Identification (X.509)" }, |
4604 | | { 179, "LCM Server" }, |
4605 | | { 180, "LCM Domain" }, |
4606 | | { 181, "LCM NIC option 0" }, |
4607 | | { 190, "LCM Workgroup" }, |
4608 | | { 191, "Discovery" }, |
4609 | | { 192, "HH Configured" }, |
4610 | | { 193, "LCM Version" }, |
4611 | | { 194, "LCM Serial Number" }, |
4612 | | { 255, "CL End" }, |
4613 | | { 0, NULL} |
4614 | | }; |
4615 | | |
4616 | | static const value_string cablehome_subopt11_vals[] = { |
4617 | | { 1, "PS WAN-Man" }, |
4618 | | { 2, "PS WAN-Data" }, |
4619 | | { 0, NULL } |
4620 | | }; |
4621 | | |
4622 | | static int |
4623 | | dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
4624 | | tvbuff_t *tvb, int optoff, int optend) |
4625 | 5.40k | { |
4626 | 5.40k | int suboptoff = optoff; |
4627 | 5.40k | uint8_t subopt; |
4628 | 5.40k | uint8_t subopt_len; |
4629 | 5.40k | proto_tree *o43cl_v_tree; |
4630 | 5.40k | proto_item *vti; |
4631 | | |
4632 | 5.40k | static const struct basic_types_hfs default_hfs = { |
4633 | 5.40k | &hf_dhcp_option43_value, |
4634 | 5.40k | NULL, |
4635 | 5.40k | NULL, |
4636 | 5.40k | &hf_dhcp_option43_value_stringz, |
4637 | 5.40k | NULL, |
4638 | 5.40k | &hf_dhcp_option43_value_8, |
4639 | 5.40k | NULL, |
4640 | 5.40k | NULL, |
4641 | 5.40k | &hf_dhcp_option43_value_32, |
4642 | 5.40k | NULL, |
4643 | 5.40k | NULL |
4644 | 5.40k | }; |
4645 | | |
4646 | 5.40k | static const struct opt_info o43cablelabs_opt[]= { |
4647 | 5.40k | /* 0 */ {"nop", special, &hf_dhcp_option43_cl_padding}, /* dummy */ |
4648 | 5.40k | /* 1 */ {"Suboption Request List", string, &hf_dhcp_option43_cl_suboption_request_list}, |
4649 | 5.40k | /* 2 */ {"Device Type", string, &hf_dhcp_option43_cl_device_type}, |
4650 | 5.40k | /* 3 */ {"eSAFE Types", string, &hf_dhcp_option43_cl_esafe_type}, |
4651 | 5.40k | /* 4 */ {"Serial Number", string, &hf_dhcp_option43_cl_serial_number}, |
4652 | 5.40k | /* 5 */ {"Hardware Version", string, &hf_dhcp_option43_cl_hardware_version}, |
4653 | 5.40k | /* 6 */ {"Software Version", string, &hf_dhcp_option43_cl_software_version}, |
4654 | 5.40k | /* 7 */ {"Boot ROM version", string, &hf_dhcp_option43_cl_boot_rom_version}, |
4655 | 5.40k | /* 8 */ {"Organizationally Unique Identifier", special, &hf_dhcp_option43_cl_oui_bytes}, |
4656 | 5.40k | /* 9 */ {"Model Number", string, &hf_dhcp_option43_cl_model_number}, |
4657 | 5.40k | /* 10 */ {"Vendor Name", string, &hf_dhcp_option43_cl_vendor_name10}, |
4658 | | /* *** 11-30: CableHome *** */ |
4659 | 5.40k | /* 11 */ {"Address Realm", val_u_byte, &hf_dhcp_option43_cl_address_realm}, |
4660 | 5.40k | /* 12 */ {"CM/PS System Description", string, &hf_dhcp_option43_cl_cm_ps_system_desc}, |
4661 | 5.40k | /* 13 */ {"CM/PS Firmware Revision", string, &hf_dhcp_option43_cl_cm_ps_firmware_revision}, |
4662 | 5.40k | /* 14 */ {"Firewall Policy File Version", string, &hf_dhcp_option43_cl_firewall_policy_file_version}, |
4663 | 5.40k | /* 15 */ {"eSafe Config File Devices", string, &hf_dhcp_option43_cl_esafe_config_file_devices}, |
4664 | 5.40k | /* 16 */ {"Unassigned (CableHome)", special, NULL}, |
4665 | 5.40k | /* 17 */ {"Unassigned (CableHome)", special, NULL}, |
4666 | 5.40k | /* 18 */ {"Video Security Type", string, &hf_dhcp_option43_cl_video_security_tape}, |
4667 | 5.40k | /* 19 */ {"Unassigned (CableHome)", special, NULL}, |
4668 | 5.40k | /* 20 */ {"Unassigned (CableHome)", special, NULL}, |
4669 | 5.40k | /* 21 */ {"Unassigned (CableHome)", special, NULL}, |
4670 | 5.40k | /* 22 */ {"Unassigned (CableHome)", special, NULL}, |
4671 | 5.40k | /* 23 */ {"Unassigned (CableHome)", special, NULL}, |
4672 | 5.40k | /* 24 */ {"Unassigned (CableHome)", special, NULL}, |
4673 | 5.40k | /* 25 */ {"Unassigned (CableHome)", special, NULL}, |
4674 | 5.40k | /* 26 */ {"Unassigned (CableHome)", special, NULL}, |
4675 | 5.40k | /* 27 */ {"Unassigned (CableHome)", special, NULL}, |
4676 | 5.40k | /* 28 */ {"Unassigned (CableHome)", special, NULL}, |
4677 | 5.40k | /* 29 */ {"Unassigned (CableHome)", special, NULL}, |
4678 | 5.40k | /* 30 */ {"Unassigned (CableHome)", special, NULL}, |
4679 | | /* *** 31-50: PacketCable *** */ |
4680 | 5.40k | /* 31 */ {"MTA MAC Address", special, &hf_dhcp_option43_cl_mta_mac_address}, |
4681 | 5.40k | /* 32 */ {"Correlation ID", val_u_long, &hf_dhcp_option43_cl_correlation_ID}, |
4682 | 5.40k | /* 33 */ {"Unassigned (PacketCable)", special, NULL}, |
4683 | 5.40k | /* 34 */ {"Unassigned (PacketCable)", special, NULL}, |
4684 | 5.40k | /* 35 */ {"Unassigned (PacketCable)", special, NULL}, |
4685 | 5.40k | /* 36 */ {"Unassigned (PacketCable)", special, NULL}, |
4686 | 5.40k | /* 37 */ {"Unassigned (PacketCable)", special, NULL}, |
4687 | 5.40k | /* 38 */ {"Unassigned (PacketCable)", special, NULL}, |
4688 | 5.40k | /* 39 */ {"Unassigned (PacketCable)", special, NULL}, |
4689 | 5.40k | /* 40 */ {"Unassigned (PacketCable)", special, NULL}, |
4690 | 5.40k | /* 41 */ {"Unassigned (PacketCable)", special, NULL}, |
4691 | 5.40k | /* 42 */ {"Unassigned (PacketCable)", special, NULL}, |
4692 | 5.40k | /* 43 */ {"Unassigned (PacketCable)", special, NULL}, |
4693 | 5.40k | /* 44 */ {"Unassigned (PacketCable)", special, NULL}, |
4694 | 5.40k | /* 45 */ {"Unassigned (PacketCable)", special, NULL}, |
4695 | 5.40k | /* 46 */ {"Unassigned (PacketCable)", special, NULL}, |
4696 | 5.40k | /* 47 */ {"Unassigned (PacketCable)", special, NULL}, |
4697 | 5.40k | /* 48 */ {"Unassigned (PacketCable)", special, NULL}, |
4698 | 5.40k | /* 49 */ {"Unassigned (PacketCable)", special, NULL}, |
4699 | 5.40k | /* 50 */ {"Unassigned (PacketCable)", special, NULL}, |
4700 | | /* *** 51-127: CableLabs *** */ |
4701 | 5.40k | /* 51 */ {"Vendor Name", string, &hf_dhcp_option43_cl_vendor_name51}, |
4702 | 5.40k | /* 52 */ {"CableCARD Capability", special, &hf_dhcp_option43_cl_cablecard_capability}, |
4703 | 5.40k | /* 53 */ {"Device Identification (CA)", special, &hf_dhcp_option43_cl_device_id_ca}, |
4704 | 5.40k | /* 54 */ {"Device Identification (X.509)", string, &hf_dhcp_option43_cl_device_id_x509}, |
4705 | 5.40k | /* 55 */ {"Unassigned (CableLabs)", special, NULL}, |
4706 | | /* *** 128-254: Vendors *** */ |
4707 | | /* 128-254 {"Unassigned (Vendors)", special, NULL}, */ |
4708 | | /* 255 {"end options", special, &hf_dhcp_option43_cl_end} */ |
4709 | 5.40k | }; |
4710 | | |
4711 | 5.40k | subopt = tvb_get_uint8(tvb, optoff); |
4712 | 5.40k | suboptoff++; |
4713 | | |
4714 | 5.40k | if (subopt == 0) { |
4715 | 2.09k | proto_tree_add_item(v_tree, hf_dhcp_option43_cl_padding, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4716 | 2.09k | return (suboptoff); |
4717 | 3.31k | } else if (subopt == 255) { /* End Option */ |
4718 | 13 | proto_tree_add_item(v_tree, hf_dhcp_option43_cl_end, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4719 | | /* Make sure we skip any junk left this option */ |
4720 | 13 | return (optend); |
4721 | 13 | } |
4722 | | |
4723 | 3.29k | if (suboptoff >= optend) { |
4724 | 12 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
4725 | 12 | "Suboption %d: no room left in option for suboption length", subopt); |
4726 | 12 | return (optend); |
4727 | 12 | } |
4728 | | |
4729 | 3.28k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
4730 | 3.28k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_cl_suboption, |
4731 | 3.28k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
4732 | 3.28k | subopt, val_to_str_const(subopt, option43_cl_suboption_vals, "Unknown")); |
4733 | | |
4734 | 3.28k | o43cl_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
4735 | 3.28k | proto_tree_add_item(o43cl_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4736 | 3.28k | suboptoff++; |
4737 | | |
4738 | 3.28k | if (suboptoff+subopt_len > optend) { |
4739 | 79 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
4740 | 79 | "Suboption %d: no room left in option for suboption value", subopt); |
4741 | 79 | return (optend); |
4742 | 79 | } |
4743 | | |
4744 | 3.20k | if ( (subopt < 1 ) || (subopt >= array_length(o43cablelabs_opt)) ) { |
4745 | 586 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4746 | 2.62k | } else if (o43cablelabs_opt[subopt].ftype == special) { |
4747 | 1.40k | switch(subopt) |
4748 | 1.40k | { |
4749 | 478 | case 8:/* OUI */ |
4750 | | /* CableLabs specs treat 43.8 inconsistently |
4751 | | * as either binary (3b) or string (6b) */ |
4752 | 478 | if (subopt_len == 3) { |
4753 | 96 | proto_tree_add_bytes_format_value(o43cl_v_tree, hf_dhcp_option43_cl_oui_bytes, tvb, suboptoff, subopt_len, NULL, |
4754 | 96 | "%02x:%02x:%02x", tvb_get_uint8(tvb, suboptoff), tvb_get_uint8(tvb, suboptoff+1), tvb_get_uint8(tvb, suboptoff+2)); |
4755 | 382 | } else if (subopt_len == 6) { |
4756 | 86 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_cl_oui_string, tvb, suboptoff, subopt_len, ENC_ASCII); |
4757 | 296 | } else { |
4758 | 296 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 3 or 6"); |
4759 | 296 | } |
4760 | 478 | break; |
4761 | 246 | case 31: /* MTA MAC address */ |
4762 | 246 | if (subopt_len != 6) { |
4763 | 167 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 6"); |
4764 | 167 | break; |
4765 | 167 | } |
4766 | | |
4767 | 79 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_cl_mta_mac_address, tvb, suboptoff, 6, ENC_NA); |
4768 | 79 | break; |
4769 | 679 | default: |
4770 | 679 | if (o43cablelabs_opt[subopt].phf != NULL) |
4771 | 227 | proto_tree_add_item(o43cl_v_tree, *o43cablelabs_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4772 | 452 | else |
4773 | 452 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4774 | 1.40k | } |
4775 | 1.40k | } |
4776 | 1.21k | else { |
4777 | 1.21k | if (dhcp_handle_basic_types(pinfo, o43cl_v_tree, vti, tvb, o43cablelabs_opt[subopt].ftype, |
4778 | 1.21k | suboptoff, subopt_len, o43cablelabs_opt[subopt].phf, &default_hfs) == 0) { |
4779 | 651 | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); |
4780 | 651 | } |
4781 | 1.21k | } |
4782 | | |
4783 | 3.20k | optoff += (subopt_len + 2); |
4784 | 3.20k | return optoff; |
4785 | 3.20k | } |
4786 | | |
4787 | | static bool |
4788 | | dissect_cablelabs_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
4789 | 1.29k | { |
4790 | 1.29k | int offset = 0; |
4791 | 1.29k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4792 | 1.29k | proto_tree* vendor_tree; |
4793 | | |
4794 | | /* Vendor Class IDs |
4795 | | * DOCSIS - docsis |
4796 | | * CableHome - CableHome |
4797 | | * OpenCable2.0 - OpenCable2.0 |
4798 | | * PacketCable - pktc |
4799 | | * DEMARC - DEMARC |
4800 | | * sRouter - SROUTER |
4801 | | * Remote PHY - RPD |
4802 | | * eDOCSIS - PTA or ECM |
4803 | | * OpenCable TRIF - TR |
4804 | | */ |
4805 | | |
4806 | 1.29k | if ((option_data->vendor_class_id != NULL) && |
4807 | 1.01k | ((strncmp((const char*)option_data->vendor_class_id, "pktc", strlen("pktc")) == 0) || |
4808 | 986 | (strncmp((const char*)option_data->vendor_class_id, "docsis", strlen("docsis")) == 0) || |
4809 | 933 | (strncmp((const char*)option_data->vendor_class_id, "OpenCable2.0", strlen("OpenCable2.0")) == 0) || |
4810 | 932 | (strncmp((const char*)option_data->vendor_class_id, "CableHome", strlen("CableHome")) == 0) || |
4811 | 929 | (strncmp((const char*)option_data->vendor_class_id, "RPD", strlen("RPD")) == 0) || |
4812 | 923 | (strncmp((const char*)option_data->vendor_class_id, "RMD", strlen("RMD")) == 0) || |
4813 | 916 | (strncmp((const char*)option_data->vendor_class_id, "ECM", strlen("ECM")) == 0) || |
4814 | 910 | (strncmp((const char*)option_data->vendor_class_id, "PTA", strlen("PTA")) == 0) || |
4815 | 907 | (strncmp((const char*)option_data->vendor_class_id, "DEMARC", strlen("DEMARC")) == 0) || |
4816 | 902 | (strncmp((const char*)option_data->vendor_class_id, "TR", strlen("TR")) == 0) || |
4817 | 894 | (strncmp((const char*)option_data->vendor_class_id, "SROUTER", strlen("SROUTER")) == 0))) { |
4818 | | /* CableLabs standard - see www.cablelabs.com/projects */ |
4819 | 122 | proto_item_append_text(tree, " (CableLabs)"); |
4820 | 122 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
4821 | | |
4822 | 5.52k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
4823 | 5.40k | offset = dissect_vendor_cablelabs_suboption(pinfo, tree, vendor_tree, |
4824 | 5.40k | tvb, offset, tvb_reported_length(tvb)); |
4825 | 5.40k | } |
4826 | 122 | return true; |
4827 | 122 | } |
4828 | | |
4829 | 1.16k | return false; |
4830 | 1.29k | } |
4831 | | |
4832 | | static bool |
4833 | | dissect_aruba_ap_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) |
4834 | 964 | { |
4835 | 964 | int offset = 0; |
4836 | 964 | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4837 | 964 | proto_tree* vendor_tree; |
4838 | | |
4839 | 964 | if ((option_data->vendor_class_id == NULL) || |
4840 | 708 | (strncmp((const char*)option_data->vendor_class_id, ARUBA_AP, strlen(ARUBA_AP)) != 0)) |
4841 | 961 | return false; |
4842 | | |
4843 | 3 | proto_item_append_text(tree, " (Aruba AP)"); |
4844 | 3 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
4845 | | |
4846 | 3 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaap_controllerip, tvb, offset, tvb_reported_length(tvb), ENC_ASCII); |
4847 | 3 | return true; |
4848 | 964 | } |
4849 | | |
4850 | | static bool |
4851 | | dissect_aruba_instant_ap_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) |
4852 | 1.02k | { |
4853 | 1.02k | int offset = 0; |
4854 | 1.02k | int reported_len = tvb_reported_length(tvb); |
4855 | 1.02k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4856 | 1.02k | proto_tree* vendor_tree; |
4857 | 1.02k | proto_item* vendor_item; |
4858 | 1.02k | int32_t nameorglen, ampiplen; |
4859 | | |
4860 | | /* Aruba Instant AP */ |
4861 | 1.02k | if ((option_data->vendor_class_id == NULL) || |
4862 | 764 | (strncmp((const char*)option_data->vendor_class_id, ARUBA_INSTANT_AP, strlen(ARUBA_INSTANT_AP)) != 0)) |
4863 | 1.00k | return false; |
4864 | | |
4865 | 23 | proto_item_append_text(tree, " (Aruba Instant AP)"); |
4866 | | |
4867 | 23 | vendor_item = proto_tree_add_item(tree, hf_dhcp_option43_arubaiap, tvb, offset, reported_len, ENC_ASCII); |
4868 | 23 | vendor_tree = proto_item_add_subtree(vendor_item, ett_dhcp_option43_suboption); |
4869 | 23 | nameorglen = tvb_find_uint8(tvb, offset, tvb_reported_length(tvb), ','); |
4870 | 23 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaiap_nameorg, tvb, offset, nameorglen, ENC_ASCII); |
4871 | 23 | offset += (nameorglen+1); |
4872 | 23 | ampiplen = tvb_find_uint8(tvb, offset, reported_len-nameorglen-1, ',') - offset; |
4873 | 23 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaiap_ampip, tvb, offset, ampiplen, ENC_ASCII); |
4874 | 23 | offset += (ampiplen+1); |
4875 | 23 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaiap_password, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
4876 | | |
4877 | 23 | return true; |
4878 | 1.02k | } |
4879 | | |
4880 | | static const value_string option43_bsdp_suboption_vals[] = { |
4881 | | { 0, "Pad" }, |
4882 | | { 1, "Message Type" }, |
4883 | | { 2, "Version" }, |
4884 | | { 3, "Server Identifier" }, |
4885 | | { 4, "Server Priority" }, |
4886 | | { 5, "Reply Port" }, |
4887 | | { 6, "Boot Image List Path" }, |
4888 | | { 7, "Default Boot Image" }, |
4889 | | { 8, "Selected Boot Image" }, |
4890 | | { 9, "Boot Image List" }, |
4891 | | { 10, "NetBoot 1.0 Firmware" }, |
4892 | | { 11, "Boot Image Attributes Filter List" }, |
4893 | | { 12, "Maximum Message Size" }, |
4894 | | { 255, "End" }, |
4895 | | { 0, NULL} |
4896 | | }; |
4897 | | |
4898 | | static void |
4899 | | dissect_vendor_bsdp_boot_image(proto_tree *v_tree, tvbuff_t *tvb, int optoff) |
4900 | 1.88k | { |
4901 | 1.88k | static int * const dhcp_o43_bsdp_attributes_flags[] = { |
4902 | 1.88k | &hf_dhcp_option43_bsdp_boot_image_attribute_install, |
4903 | 1.88k | &hf_dhcp_option43_bsdp_boot_image_attribute_kind, |
4904 | 1.88k | &hf_dhcp_option43_bsdp_boot_image_attribute_reserved, |
4905 | 1.88k | NULL |
4906 | 1.88k | }; |
4907 | | |
4908 | 1.88k | proto_tree_add_bitmask(v_tree, tvb, optoff, hf_dhcp_option43_bsdp_boot_image_attribute, ett_dhcp_o43_bsdp_attributes_flags, dhcp_o43_bsdp_attributes_flags, ENC_BIG_ENDIAN); |
4909 | 1.88k | } |
4910 | | |
4911 | | static int |
4912 | | dissect_vendor_bsdp_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
4913 | | tvbuff_t *tvb, int optoff, int optend) |
4914 | 6.76k | { |
4915 | 6.76k | int suboptoff = optoff; |
4916 | 6.76k | int attributes_off; |
4917 | 6.76k | uint8_t subopt, string_len; |
4918 | 6.76k | uint8_t subopt_len, attributes_len; |
4919 | 6.76k | unsigned item_len; |
4920 | 6.76k | proto_tree *o43bsdp_v_tree, *o43bsdp_va_tree, *o43bsdp_vb_tree, *o43bsdp_vc_tree, *o43bsdp_vd_tree; |
4921 | 6.76k | proto_item *vti, *ti, *tj; |
4922 | | |
4923 | 6.76k | subopt = tvb_get_uint8(tvb, optoff); |
4924 | 6.76k | suboptoff++; |
4925 | | |
4926 | 6.76k | if (subopt == 0 || subopt == 255) { |
4927 | | /* Pad (0) and End (255) have implicit length of 1. */ |
4928 | 2.60k | item_len = 1; |
4929 | 4.16k | } else if (suboptoff >= optend) { |
4930 | 14 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
4931 | 14 | "Suboption %d: no room left in option for suboption length", subopt); |
4932 | 14 | return (optend); |
4933 | 4.14k | } else { |
4934 | 4.14k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
4935 | 4.14k | item_len = subopt_len + 2; |
4936 | 4.14k | } |
4937 | | |
4938 | 6.74k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_bsdp_suboption, |
4939 | 6.74k | tvb, optoff, item_len, subopt, "(%d) %s", |
4940 | 6.74k | subopt, val_to_str_const(subopt, option43_bsdp_suboption_vals, "Unknown")); |
4941 | 6.74k | if (item_len == 1) { |
4942 | 2.60k | return (optoff + 1); |
4943 | 2.60k | } |
4944 | | |
4945 | 4.14k | o43bsdp_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
4946 | 4.14k | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4947 | 4.14k | suboptoff++; |
4948 | | |
4949 | 4.14k | if (suboptoff+subopt_len > optend) { |
4950 | 63 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
4951 | 63 | "Suboption %d: no room left in option for suboption value", subopt); |
4952 | 63 | return (optend); |
4953 | 63 | } |
4954 | | |
4955 | 4.08k | switch(subopt) |
4956 | 4.08k | { |
4957 | 270 | case 1: |
4958 | 270 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_message_type, tvb, suboptoff, subopt_len, ENC_NA); |
4959 | 270 | break; |
4960 | 274 | case 2: |
4961 | 274 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_version, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4962 | 274 | break; |
4963 | 312 | case 3: |
4964 | 312 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_server_identifier, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4965 | 312 | break; |
4966 | 263 | case 4: |
4967 | 263 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_server_priority, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4968 | 263 | break; |
4969 | 292 | case 5: |
4970 | 292 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_reply_port, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4971 | 292 | break; |
4972 | 318 | case 6: |
4973 | 318 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_boot_image_list_path, tvb, suboptoff, subopt_len, ENC_ASCII); |
4974 | 318 | break; |
4975 | 92 | case 7: |
4976 | 92 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_default_boot_image_id, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4977 | 92 | o43bsdp_va_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_boot_image); |
4978 | 92 | dissect_vendor_bsdp_boot_image(o43bsdp_va_tree, tvb, suboptoff); |
4979 | 92 | proto_tree_add_item(o43bsdp_va_tree, hf_dhcp_option43_bsdp_boot_image_index, tvb, suboptoff+2, subopt_len-2, ENC_BIG_ENDIAN); |
4980 | 92 | break; |
4981 | 112 | case 8: |
4982 | 112 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_selected_boot_image_id, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4983 | 112 | o43bsdp_vc_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_boot_image); |
4984 | 112 | dissect_vendor_bsdp_boot_image(o43bsdp_vc_tree, tvb, suboptoff); |
4985 | 112 | proto_tree_add_item(o43bsdp_vc_tree, hf_dhcp_option43_bsdp_boot_image_index, tvb, suboptoff+2, subopt_len-2, ENC_BIG_ENDIAN); |
4986 | 112 | break; |
4987 | 460 | case 9: |
4988 | 460 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_boot_image_list, tvb, suboptoff, subopt_len, ENC_NA); |
4989 | 460 | attributes_len = subopt_len; |
4990 | 460 | attributes_off = suboptoff; |
4991 | 460 | o43bsdp_vd_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_image_desc_list); |
4992 | 1.18k | while (attributes_len >= 5) { |
4993 | 725 | string_len = tvb_get_uint8(tvb, attributes_off+4); |
4994 | 725 | if (string_len > 0) { |
4995 | 308 | tj = proto_tree_add_item(o43bsdp_vd_tree, hf_dhcp_option43_bsdp_image_desc, tvb, attributes_off, string_len+5, ENC_NA); |
4996 | 308 | o43bsdp_vb_tree = proto_item_add_subtree(tj, ett_dhcp_o43_bsdp_image_desc); |
4997 | 308 | dissect_vendor_bsdp_boot_image(o43bsdp_vb_tree, tvb, attributes_off); |
4998 | 308 | proto_tree_add_item(o43bsdp_vb_tree, hf_dhcp_option43_bsdp_boot_image_index, tvb, attributes_off+2, 2, ENC_BIG_ENDIAN); |
4999 | 308 | proto_tree_add_item(o43bsdp_vb_tree, hf_dhcp_option43_bsdp_boot_image_name_len, tvb, attributes_off+4, 1, ENC_BIG_ENDIAN); |
5000 | 308 | proto_tree_add_item(o43bsdp_vb_tree, hf_dhcp_option43_bsdp_boot_image_name, tvb, attributes_off+5, string_len, ENC_UTF_8); |
5001 | 308 | } |
5002 | 725 | attributes_off += 5 + string_len; |
5003 | 725 | attributes_len -= 5 + string_len; |
5004 | 725 | } |
5005 | 460 | break; |
5006 | 335 | case 10: |
5007 | 335 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_netboot_firmware, tvb, suboptoff, subopt_len, ENC_NA); |
5008 | 335 | break; |
5009 | 294 | case 11: |
5010 | 294 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_attributes_filter_list, tvb, suboptoff, subopt_len, ENC_NA); |
5011 | 294 | attributes_len = subopt_len; |
5012 | 294 | attributes_off = suboptoff; |
5013 | 294 | o43bsdp_va_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_attributes); |
5014 | 1.67k | while (attributes_len >= 2) { |
5015 | 1.38k | dissect_vendor_bsdp_boot_image(o43bsdp_va_tree, tvb, attributes_off); |
5016 | 1.38k | attributes_off+=2; |
5017 | 1.38k | attributes_len-=2; |
5018 | 1.38k | } |
5019 | 294 | break; |
5020 | 129 | case 12: |
5021 | 129 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_message_size, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5022 | 129 | break; |
5023 | 4.08k | } |
5024 | | |
5025 | 4.06k | optoff += item_len; |
5026 | 4.06k | return optoff; |
5027 | 4.08k | } |
5028 | | |
5029 | | static bool |
5030 | | dissect_apple_bsdp_vendor_info_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
5031 | 1.25k | { |
5032 | 1.25k | int offset = 0; |
5033 | 1.25k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
5034 | 1.25k | proto_tree* vendor_tree; |
5035 | | |
5036 | 1.25k | if ((option_data->vendor_class_id == NULL) || |
5037 | 982 | (strncmp((const char*)option_data->vendor_class_id, APPLE_BSDP_SERVER, strlen(APPLE_BSDP_SERVER)) != 0)) |
5038 | 1.14k | return false; |
5039 | | |
5040 | | /* Apple BSDP */ |
5041 | 113 | proto_item_append_text(tree, " (Boot Server Discovery Protocol (BSDP))"); |
5042 | 113 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5043 | | |
5044 | 6.87k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5045 | 6.76k | offset = dissect_vendor_bsdp_suboption(pinfo, tree, vendor_tree, |
5046 | 6.76k | tvb, offset, tvb_reported_length(tvb)); |
5047 | 6.76k | } |
5048 | | |
5049 | 113 | return true; |
5050 | 1.25k | } |
5051 | | |
5052 | | /* Cisco Vendor Specific Information */ |
5053 | | |
5054 | | /* |
5055 | | { 1, "1" }, * D,R: 03 * |
5056 | | { 2, "2" }, * D,R: 01 * |
5057 | | { 3, "3" }, * D,R: 00 01 # O,A: 00 02 * |
5058 | | { 4, "Node ID" }, * O,A: 00 00 00 ca * |
5059 | | { 5, "5" }, * O,A: 01 * |
5060 | | { 6, "6" }, * D,R: 01 # O,A: 01 * |
5061 | | { 7, "Model" }, * D,R: N9K-C9336PQ * |
5062 | | { 8, "APIC UUID" }, * O,A: 09bced36-69f1-11e6-96ce-8baf09371338 * |
5063 | | { 9, "Fabricname" }, * O,A: ams-fab1 * |
5064 | | { 10, "10" }, * D,R: 00 00 00 01 * |
5065 | | { 11, "SerialNo" }, * D,R: SAL1926J4QW * |
5066 | | { 12, "Client Int" }, * D,O: eth1/20.20 # R,A: eth1/20.20 * |
5067 | | */ |
5068 | | static const value_string option43_cisco_suboption_vals[] = { |
5069 | | { 1, "Unk-1 (Node role?)" }, /* uint8 */ |
5070 | | { 2, "Unk-2 (Spine level?)" }, /* uint8 */ |
5071 | | { 3, "Unk-3 (Pod ID?)" }, /* uint16 */ |
5072 | | { 4, "Node ID" }, /* uint32 */ |
5073 | | { 5, "Unk-5" }, /* uint8 */ |
5074 | | { 6, "Unk-6" }, /* uint8 */ |
5075 | | { 7, "Model" }, /* String */ |
5076 | | { 8, "APIC UUID" }, /* String */ |
5077 | | { 9, "Fabricname" }, /* String */ |
5078 | | { 10, "Unk-10" }, /* uint32 */ |
5079 | | { 11, "SerialNo" }, /* String */ |
5080 | | { 12, "Interfacename" }, /* String */ |
5081 | | |
5082 | | { 0, NULL} |
5083 | | }; |
5084 | | |
5085 | | static int |
5086 | | dissect_vendor_cisco_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5087 | | tvbuff_t *tvb, int optoff, int optend) |
5088 | 654 | { |
5089 | 654 | int suboptoff = optoff; |
5090 | 654 | uint8_t subopt; |
5091 | 654 | uint8_t subopt_len; |
5092 | 654 | unsigned item_len; |
5093 | 654 | proto_tree *o43cisco_v_tree; |
5094 | 654 | proto_item *vti; |
5095 | | |
5096 | 654 | subopt = tvb_get_uint8(tvb, optoff); |
5097 | 654 | suboptoff++; |
5098 | | |
5099 | 654 | if (suboptoff >= optend) { |
5100 | 2 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5101 | 2 | "Suboption %d: No room left in option for suboption length", subopt); |
5102 | 2 | return (optend); |
5103 | 652 | } else { |
5104 | 652 | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5105 | 652 | item_len = subopt_len + 2; |
5106 | 652 | } |
5107 | | |
5108 | 652 | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_cisco_suboption, |
5109 | 652 | tvb, optoff, item_len, subopt, "(%d) %s", |
5110 | 652 | subopt, val_to_str_const(subopt, option43_cisco_suboption_vals, "Unknown")); |
5111 | | |
5112 | 652 | o43cisco_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
5113 | 652 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5114 | 652 | suboptoff++; |
5115 | | |
5116 | 652 | if (suboptoff+subopt_len > optend) { |
5117 | 16 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5118 | 16 | "Suboption %d: Not sufficient room left in option for suboption value", subopt); |
5119 | 16 | return (optend); |
5120 | 16 | } |
5121 | | |
5122 | 636 | switch(subopt) |
5123 | 636 | { |
5124 | 12 | case 1: |
5125 | 12 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown1, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5126 | 12 | break; |
5127 | 28 | case 2: |
5128 | 28 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown2, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5129 | 28 | break; |
5130 | 158 | case 3: |
5131 | 158 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown3, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5132 | 158 | break; |
5133 | 8 | case 4: |
5134 | 8 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_nodeid, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5135 | 8 | break; |
5136 | 3 | case 5: |
5137 | 3 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown5, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5138 | 3 | break; |
5139 | 51 | case 6: |
5140 | 51 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown6, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5141 | 51 | break; |
5142 | 2 | case 7: |
5143 | 2 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_model, tvb, suboptoff, subopt_len, ENC_ASCII); |
5144 | 2 | break; |
5145 | 13 | case 8: |
5146 | 13 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_apicuuid, tvb, suboptoff, subopt_len, ENC_ASCII); |
5147 | 13 | break; |
5148 | 1 | case 9: |
5149 | 1 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_fabricname, tvb, suboptoff, subopt_len, ENC_ASCII); |
5150 | 1 | break; |
5151 | 6 | case 10: |
5152 | 6 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown10, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5153 | 6 | break; |
5154 | 3 | case 11: |
5155 | 3 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_serialno, tvb, suboptoff, subopt_len, ENC_ASCII); |
5156 | 3 | break; |
5157 | 0 | case 12: |
5158 | 0 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_clientint, tvb, suboptoff, subopt_len, ENC_ASCII); |
5159 | 0 | break; |
5160 | 351 | default: |
5161 | 351 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown, tvb, suboptoff, subopt_len, ENC_NA); |
5162 | 636 | } |
5163 | | |
5164 | 636 | optoff += item_len; |
5165 | 636 | return optoff; |
5166 | 636 | } |
5167 | | |
5168 | | static bool |
5169 | | dissect_cisco_vendor_info_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
5170 | 1.08k | { |
5171 | 1.08k | int offset = 0; |
5172 | 1.08k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
5173 | 1.08k | proto_tree* vendor_tree; |
5174 | | |
5175 | 1.08k | if ((option_data->vendor_class_id == NULL) || |
5176 | 812 | (strncmp((const char*)option_data->vendor_class_id, CISCO_VCID, strlen(CISCO_VCID)) != 0)) |
5177 | 1.06k | return false; |
5178 | | |
5179 | | /* Cisco ACI Fabric*/ |
5180 | 20 | proto_item_append_text(tree, " (Cisco ACI Fabric)"); |
5181 | 20 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5182 | | |
5183 | 674 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5184 | 654 | offset = dissect_vendor_cisco_suboption(pinfo, tree, vendor_tree, |
5185 | 654 | tvb, offset, tvb_reported_length(tvb)); |
5186 | 654 | } |
5187 | | |
5188 | 20 | return true; |
5189 | 1.08k | } |
5190 | | |
5191 | | /* Aerohive (Extremenetworks) Vendor Specific Information */ |
5192 | | |
5193 | | static const value_string option43_aerohive_suboption_vals[] = { |
5194 | | { 225, "XiqHostname" }, /* String */ |
5195 | | { 226, "XiqIpAddress" }, /* Ipv4address */ |
5196 | | |
5197 | | { 0, NULL} |
5198 | | }; |
5199 | | |
5200 | | static int |
5201 | | dissect_vendor_aerohive_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5202 | | tvbuff_t *tvb, int optoff, int optend) |
5203 | 553 | { |
5204 | 553 | int suboptoff = optoff; |
5205 | 553 | uint8_t subopt; |
5206 | 553 | uint8_t subopt_len; |
5207 | 553 | unsigned item_len; |
5208 | 553 | proto_tree *o43aerohive_v_tree; |
5209 | 553 | proto_item *vti; |
5210 | | |
5211 | 553 | subopt = tvb_get_uint8(tvb, optoff); |
5212 | 553 | suboptoff++; |
5213 | | |
5214 | 553 | if (suboptoff >= optend) { |
5215 | 3 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5216 | 3 | "Suboption %d: No room left in option for suboption length", subopt); |
5217 | 3 | return (optend); |
5218 | 550 | } else { |
5219 | 550 | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5220 | 550 | item_len = subopt_len + 2; |
5221 | 550 | } |
5222 | | |
5223 | 550 | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_aerohive_suboption, |
5224 | 550 | tvb, optoff, item_len, subopt, "(%d) %s", |
5225 | 550 | subopt, val_to_str_const(subopt, option43_aerohive_suboption_vals, "Unknown")); |
5226 | | |
5227 | 550 | o43aerohive_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
5228 | 550 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5229 | 550 | suboptoff++; |
5230 | | |
5231 | 550 | if (suboptoff+subopt_len > optend) { |
5232 | 20 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5233 | 20 | "Suboption %d: Not sufficient room left in option for suboption value", subopt); |
5234 | 20 | return (optend); |
5235 | 20 | } |
5236 | | |
5237 | 530 | switch(subopt) |
5238 | 530 | { |
5239 | 0 | case 225: |
5240 | 0 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_option43_aerohive_xiqhostname, tvb, suboptoff, subopt_len, ENC_ASCII); |
5241 | 0 | break; |
5242 | 0 | case 226: |
5243 | 0 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_option43_aerohive_xiqipaddress, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5244 | 0 | break; |
5245 | 530 | default: |
5246 | 530 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_option43_aerohive_unknown, tvb, suboptoff, subopt_len, ENC_NA); |
5247 | 530 | } |
5248 | | |
5249 | 530 | optoff += item_len; |
5250 | 530 | return optoff; |
5251 | 530 | } |
5252 | | |
5253 | | static bool |
5254 | | dissect_aerohive_vendor_info_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
5255 | 1.06k | { |
5256 | 1.06k | int offset = 0; |
5257 | 1.06k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
5258 | 1.06k | proto_tree* vendor_tree; |
5259 | | |
5260 | 1.06k | if ((option_data->vendor_class_id == NULL) || |
5261 | 798 | (strncmp((const char*)option_data->vendor_class_id, AEROHIVE_VCID, strlen(AEROHIVE_VCID)) != 0)) |
5262 | 1.04k | return false; |
5263 | | |
5264 | | /* Cisco ACI Fabric*/ |
5265 | 25 | proto_item_append_text(tree, " (Aerohive)"); |
5266 | 25 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5267 | | |
5268 | 578 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5269 | 553 | offset = dissect_vendor_aerohive_suboption(pinfo, tree, vendor_tree, |
5270 | 553 | tvb, offset, tvb_reported_length(tvb)); |
5271 | 553 | } |
5272 | | |
5273 | 25 | return true; |
5274 | 1.06k | } |
5275 | | |
5276 | | static int |
5277 | | dissect_vendor_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5278 | | tvbuff_t *tvb, uint32_t optoff, uint32_t optend) |
5279 | 948 | { |
5280 | 948 | uint32_t suboptoff = optoff; |
5281 | 948 | uint8_t subopt; |
5282 | 948 | uint32_t subopt_len; |
5283 | 948 | proto_item *item; |
5284 | 948 | proto_tree *sub_tree; |
5285 | | |
5286 | 948 | item = proto_tree_add_item(v_tree, hf_dhcp_vendor_unknown_suboption, tvb, optoff, 1, ENC_NA); |
5287 | 948 | subopt = tvb_get_uint8(tvb, optoff); |
5288 | | |
5289 | 948 | suboptoff+=1; |
5290 | | |
5291 | 948 | if (suboptoff >= optend) { |
5292 | 133 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5293 | 133 | "Suboption %d: no room left in option for suboption length", subopt); |
5294 | 133 | return (optend); |
5295 | 133 | } |
5296 | | |
5297 | 815 | sub_tree = proto_item_add_subtree(item, ett_dhcp_option125_suboption); |
5298 | 815 | proto_tree_add_item_ret_uint(sub_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_NA, &subopt_len); |
5299 | 815 | suboptoff++; |
5300 | | |
5301 | 815 | if (suboptoff+subopt_len > optend) { |
5302 | 208 | expert_add_info_format(pinfo, item, &ei_dhcp_missing_subopt_value, |
5303 | 208 | "Suboption %d: no room left in option for suboption value", subopt); |
5304 | 208 | return (optend); |
5305 | 208 | } |
5306 | | |
5307 | 607 | proto_tree_add_item(sub_tree, hf_dhcp_suboption_data, tvb, suboptoff, subopt_len, ENC_NA); |
5308 | 607 | suboptoff+= subopt_len; |
5309 | | |
5310 | 607 | return suboptoff; |
5311 | | |
5312 | 815 | } |
5313 | | |
5314 | | static int |
5315 | | dissect_dhcpopt_vi_vendor_specific_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5316 | 430 | { |
5317 | 430 | uint32_t offset = 0; |
5318 | 430 | uint32_t enterprise = 0; |
5319 | 430 | uint32_t s_end = 0; |
5320 | 430 | uint32_t option_data_len = 0; |
5321 | 430 | proto_item *vti; |
5322 | 430 | proto_tree *e_tree; |
5323 | | |
5324 | 2.35k | while (tvb_reported_length_remaining(tvb, offset) >= 5) { |
5325 | | |
5326 | 1.92k | vti = proto_tree_add_item_ret_uint(tree, hf_dhcp_option125_enterprise, tvb, offset, 4, ENC_BIG_ENDIAN, &enterprise); |
5327 | 1.92k | e_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
5328 | 1.92k | offset += 4; |
5329 | | |
5330 | 1.92k | proto_tree_add_item_ret_uint(e_tree, hf_dhcp_option125_length, tvb, offset, 1, ENC_NA, &option_data_len); |
5331 | 1.92k | offset += 1; |
5332 | | |
5333 | 1.92k | s_end = offset + option_data_len; |
5334 | 1.92k | if ( tvb_reported_length_remaining(tvb, s_end) < 0 ) { |
5335 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise); |
5336 | 0 | break; |
5337 | 0 | } |
5338 | | |
5339 | 12.4k | while (offset < s_end) { |
5340 | 10.4k | tvbuff_t *enterprise_tvb = tvb_new_subset_length(tvb, offset, option_data_len); |
5341 | 10.4k | int bytes_dissected = dissector_try_uint(dhcp_enterprise_specific_table, enterprise, enterprise_tvb, pinfo, e_tree); |
5342 | 10.4k | if (bytes_dissected == 0) { |
5343 | 948 | offset = dissect_vendor_generic_suboption(pinfo, vti, e_tree, tvb, offset, s_end); |
5344 | 9.54k | } else{ |
5345 | 9.54k | offset += bytes_dissected; |
5346 | 9.54k | } |
5347 | 10.4k | } |
5348 | 1.92k | } |
5349 | | |
5350 | 430 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
5351 | 8 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length < 5"); |
5352 | 8 | } |
5353 | | |
5354 | 430 | return tvb_captured_length(tvb); |
5355 | 430 | } |
5356 | | |
5357 | | static const value_string option43_alcatel_suboption_vals[] = { |
5358 | | { 0, "Padding" }, |
5359 | | { 58, "Voice VLAN ID" }, |
5360 | | { 64, "Spatial Redundancy TFTP1" }, |
5361 | | { 65, "Spatial Redundancy TFTP2" }, |
5362 | | { 66, "Application Type" }, |
5363 | | { 67, "SIP URL" }, |
5364 | | { 255, "Alcatel-Lucent End" }, |
5365 | | { 0, NULL} |
5366 | | }; |
5367 | | |
5368 | | static const value_string option43_alcatel_app_type_vals[] = { |
5369 | | { 0, "NOE" }, |
5370 | | { 1, "SIP" }, |
5371 | | { 0, NULL} |
5372 | | }; |
5373 | | |
5374 | | /* If an Alcatel-Lucent Option 43 suboption has a known fixed length, |
5375 | | * return that length. Returns 0 for variable length options and unknown |
5376 | | * options. |
5377 | | */ |
5378 | | static unsigned |
5379 | | get_alcatel_suboption_len(unsigned subopt) |
5380 | 2.09k | { |
5381 | 2.09k | switch(subopt) { |
5382 | 230 | case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */ |
5383 | 230 | return 2; |
5384 | 246 | case 64: /* 0x40 - Alcatel-Lucent TFTP1 */ |
5385 | 246 | return 4; |
5386 | 266 | case 65: /* 0x41 - Alcatel-Lucent TFTP2 */ |
5387 | 266 | return 4; |
5388 | 139 | case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */ |
5389 | 139 | return 1; |
5390 | 0 | case 0: /* Alcatel-Lucent Padding */ |
5391 | 593 | case 67: /* 0x43 - Alcatel-Lucent SIP URL */ |
5392 | 593 | case 255: /* Alcatel-Lucent End */ |
5393 | 1.21k | default: |
5394 | 1.21k | return 0; |
5395 | 2.09k | } |
5396 | 2.09k | } |
5397 | | |
5398 | | static int |
5399 | | dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5400 | | tvbuff_t *tvb, int optoff, int optend) |
5401 | 1.96k | { |
5402 | 1.96k | int suboptoff = optoff; |
5403 | 1.96k | uint8_t subopt; |
5404 | 1.96k | uint8_t subopt_len; |
5405 | 1.96k | proto_item *vti; |
5406 | 1.96k | proto_tree *o43alcatel_v_tree; |
5407 | | |
5408 | 1.96k | subopt = tvb_get_uint8(tvb, optoff); |
5409 | 1.96k | suboptoff++; |
5410 | | |
5411 | 1.96k | if (subopt == 0) { |
5412 | 1.31k | proto_tree_add_item(v_tree, hf_dhcp_option43_alcatel_padding, tvb, optoff, 1, ENC_BIG_ENDIAN); |
5413 | 1.31k | return (suboptoff); |
5414 | 1.31k | } else if (subopt == 255) { /* End Option */ |
5415 | 4 | proto_tree_add_item(v_tree, hf_dhcp_option43_alcatel_end, tvb, optoff, 1, ENC_BIG_ENDIAN); |
5416 | | /* Make sure we skip any junk left this option */ |
5417 | 4 | return (optend); |
5418 | 4 | } |
5419 | | |
5420 | 649 | if (suboptoff >= optend) { |
5421 | 0 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5422 | 0 | "Suboption %d: no room left in option for suboption length", subopt); |
5423 | 0 | return (optend); |
5424 | 0 | } |
5425 | | |
5426 | 649 | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5427 | 649 | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_alcatel_suboption, |
5428 | 649 | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
5429 | 649 | subopt, val_to_str_const(subopt, option43_alcatel_suboption_vals, "Unknown")); |
5430 | | |
5431 | 649 | o43alcatel_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
5432 | 649 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5433 | 649 | suboptoff++; |
5434 | | |
5435 | 649 | if (suboptoff+subopt_len > optend) { |
5436 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5437 | 0 | "Suboption %d: no room left in option for suboption value", subopt); |
5438 | 0 | return (optend); |
5439 | 0 | } |
5440 | | |
5441 | 649 | unsigned subopt_len_expected = get_alcatel_suboption_len(subopt); |
5442 | 649 | if (subopt_len_expected && subopt_len_expected != subopt_len) { |
5443 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't %u", subopt_len_expected); |
5444 | 0 | return optend; |
5445 | 0 | } |
5446 | 649 | switch (subopt) |
5447 | 649 | { |
5448 | 92 | case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */ |
5449 | 92 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_vlan_id, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
5450 | 92 | break; |
5451 | 108 | case 64: /* 0x40 - Alcatel-Lucent TFTP1 */ |
5452 | 108 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_tftp1, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
5453 | 108 | break; |
5454 | 115 | case 65: /* 0x41 - Alcatel-Lucent TFTP2 */ |
5455 | 115 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_tftp2, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
5456 | 115 | break; |
5457 | 66 | case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */ |
5458 | 66 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_app_type, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5459 | 66 | break; |
5460 | 245 | case 67: /* 0x43 - Alcatel-Lucent SIP URL */ |
5461 | 245 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_sip_url, tvb, suboptoff, subopt_len, ENC_ASCII); |
5462 | 245 | break; |
5463 | 23 | default: |
5464 | 23 | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); |
5465 | 23 | return optend; |
5466 | 649 | } |
5467 | | |
5468 | 626 | optoff += (subopt_len + 2); |
5469 | 626 | return optoff; |
5470 | 649 | } |
5471 | | |
5472 | | static bool |
5473 | | dissect_alcatel_lucent_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) |
5474 | 1.12k | { |
5475 | 1.12k | int offset = 0; |
5476 | 1.12k | uint8_t s_option; |
5477 | 1.12k | proto_tree* vendor_tree; |
5478 | | |
5479 | 1.12k | if (tvb_reported_length(tvb) < 1) |
5480 | 262 | return false; |
5481 | | |
5482 | 864 | s_option = tvb_get_uint8(tvb, offset); |
5483 | 864 | if ((s_option==58 || s_option==64 || s_option==65 |
5484 | 826 | || s_option==66 || s_option==67) |
5485 | 95 | && test_encapsulated_vendor_options(tvb, offset, tvb_reported_length(tvb), get_alcatel_suboption_len)) { |
5486 | | |
5487 | | /* Alcatel-Lucent DHCP Extensions */ |
5488 | 39 | proto_item_append_text(tree, " (Alcatel-Lucent)"); |
5489 | 39 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5490 | | |
5491 | 2.00k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5492 | 1.96k | offset = dissect_vendor_alcatel_suboption(pinfo, tree, vendor_tree, |
5493 | 1.96k | tvb, offset, tvb_reported_length(tvb)); |
5494 | 1.96k | } |
5495 | 39 | return true; |
5496 | 39 | } |
5497 | | |
5498 | 825 | return false; |
5499 | 864 | } |
5500 | | |
5501 | | static const value_string option63_suboption_vals[] = { |
5502 | | { 1, "NWIP does not exist on subnet" }, |
5503 | | { 2, "NWIP exists in options area" }, |
5504 | | { 3, "NWIP exists in sname/file" }, |
5505 | | { 4, "NWIP exists, but too big" }, |
5506 | | { 5, "Broadcast for nearest Netware server" }, |
5507 | | { 6, "Preferred DSS server" }, |
5508 | | { 7, "Nearest NWIP server" }, |
5509 | | { 8, "Autoretries" }, |
5510 | | { 9, "Autoretry delay, secs" }, |
5511 | | { 10, "Support NetWare/IP v1.1" }, |
5512 | | { 11, "Primary DSS" }, |
5513 | | { 0, NULL } |
5514 | | }; |
5515 | | |
5516 | | static int |
5517 | | dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5518 | | tvbuff_t *tvb, int optoff, int optend) |
5519 | 2.00k | { |
5520 | 2.00k | int suboptoff = optoff; |
5521 | 2.00k | uint8_t subopt, subopt_len; |
5522 | 2.00k | proto_tree *o63_v_tree; |
5523 | 2.00k | proto_item *vti, *ti; |
5524 | | |
5525 | 2.00k | static const struct basic_types_hfs default_hfs = { |
5526 | 2.00k | NULL, |
5527 | 2.00k | &hf_dhcp_option63_value_ip_address, |
5528 | 2.00k | &hf_dhcp_option63_value_ip_address, |
5529 | 2.00k | NULL, |
5530 | 2.00k | &hf_dhcp_option63_value_boolean, |
5531 | 2.00k | &hf_dhcp_option63_value_8, |
5532 | 2.00k | NULL, |
5533 | 2.00k | NULL, |
5534 | 2.00k | NULL, |
5535 | 2.00k | NULL, |
5536 | 2.00k | NULL |
5537 | 2.00k | }; |
5538 | | |
5539 | 2.00k | static const struct opt_info o63_opt[]= { |
5540 | 2.00k | /* 0 */ {"",none,NULL}, |
5541 | 2.00k | /* 1 */ {"NWIP does not exist on subnet",presence,NULL}, |
5542 | 2.00k | /* 2 */ {"NWIP exists in options area",presence,NULL}, |
5543 | 2.00k | /* 3 */ {"NWIP exists in sname/file",presence,NULL}, |
5544 | 2.00k | /* 4 */ {"NWIP exists, but too big",presence,NULL}, |
5545 | 2.00k | /* 5 */ {"Broadcast for nearest Netware server",val_boolean, &hf_dhcp_option63_broadcast}, |
5546 | 2.00k | /* 6 */ {"Preferred DSS server",ipv4_list,&hf_dhcp_option63_preferred_dss_server}, |
5547 | 2.00k | /* 7 */ {"Nearest NWIP server",ipv4_list,&hf_dhcp_option63_nearest_nwip_server}, |
5548 | 2.00k | /* 8 */ {"Autoretries",val_u_byte,&hf_dhcp_option63_autoretries}, |
5549 | 2.00k | /* 9 */ {"Autoretry delay, secs",val_u_byte,&hf_dhcp_option63_autoretry_delay}, |
5550 | 2.00k | /* 10*/ {"Support NetWare/IP v1.1",val_boolean,&hf_dhcp_option63_support_netware_v1_1}, |
5551 | 2.00k | /* 11*/ {"Primary DSS",ipv4,&hf_dhcp_option63_primary_dss} |
5552 | 2.00k | }; |
5553 | | |
5554 | 2.00k | subopt = tvb_get_uint8(tvb, optoff); |
5555 | 2.00k | suboptoff++; |
5556 | | |
5557 | 2.00k | if (suboptoff >= optend) { |
5558 | 9 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5559 | 9 | "Suboption %d: no room left in option for suboption length", subopt); |
5560 | 9 | return (optend); |
5561 | 9 | } |
5562 | | |
5563 | 1.99k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5564 | 1.99k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option63_suboption, |
5565 | 1.99k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
5566 | 1.99k | subopt, val_to_str_const(subopt, option63_suboption_vals, "Unknown")); |
5567 | | |
5568 | 1.99k | o63_v_tree = proto_item_add_subtree(vti, ett_dhcp_option63_suboption); |
5569 | 1.99k | proto_tree_add_item(o63_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5570 | 1.99k | suboptoff++; |
5571 | | |
5572 | 1.99k | ti = proto_tree_add_item(o63_v_tree, hf_dhcp_option63_value, tvb, suboptoff, subopt_len, ENC_NA); |
5573 | 1.99k | proto_item_set_hidden(ti); |
5574 | | |
5575 | 1.99k | if (subopt < array_length(o63_opt)) { |
5576 | 1.56k | if (dhcp_handle_basic_types(pinfo, o63_v_tree, vti, tvb, o63_opt[subopt].ftype, |
5577 | 1.56k | suboptoff, subopt_len, o63_opt[subopt].phf, &default_hfs) == 0) { |
5578 | 1.40k | switch(o63_opt[subopt].ftype) |
5579 | 1.40k | { |
5580 | 502 | case presence: |
5581 | 502 | if (subopt_len != 0) { |
5582 | 251 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 0"); |
5583 | 251 | } |
5584 | 502 | break; |
5585 | 907 | default: |
5586 | 907 | if (o63_opt[subopt].phf == NULL) |
5587 | 521 | proto_tree_add_item(o63_v_tree, hf_dhcp_option63_value, tvb, suboptoff, subopt_len, ENC_NA); |
5588 | 907 | break; |
5589 | 1.40k | } |
5590 | 1.40k | } |
5591 | 1.56k | } |
5592 | 1.99k | optoff += (subopt_len + 2); |
5593 | 1.99k | return optoff; |
5594 | 1.99k | } |
5595 | | |
5596 | | static int |
5597 | | dissect_dhcpopt_netware_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5598 | 67 | { |
5599 | 67 | int offset = 0; |
5600 | | |
5601 | 2.07k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5602 | 2.00k | offset = dissect_netware_ip_suboption(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb)); |
5603 | 2.00k | } |
5604 | | |
5605 | 67 | return tvb_captured_length(tvb); |
5606 | 67 | } |
5607 | | |
5608 | | static const value_string option125_tr111_suboption_vals[] = { |
5609 | | { 1, "DeviceManufacturerOUI" }, |
5610 | | { 2, "DeviceSerialNumber" }, |
5611 | | { 3, "DeviceProductClass" }, |
5612 | | { 4, "GatewayManufacturerOUI" }, |
5613 | | { 5, "GatewaySerialNumber" }, |
5614 | | { 6, "GatewayProductClass" }, |
5615 | | { 0, NULL } |
5616 | | }; |
5617 | | |
5618 | | static int |
5619 | | dissect_vendor_tr111_suboption(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5620 | 2.31k | { |
5621 | 2.31k | int offset = 0; |
5622 | 2.31k | proto_tree *o125_v_tree; |
5623 | 2.31k | proto_item *vti, *ti; |
5624 | 2.31k | uint8_t subopt, subopt_len; |
5625 | | |
5626 | 2.31k | static const struct basic_types_hfs default_hfs = { |
5627 | 2.31k | NULL, |
5628 | 2.31k | NULL, |
5629 | 2.31k | NULL, |
5630 | 2.31k | &hf_dhcp_option125_value_stringz, |
5631 | 2.31k | NULL, |
5632 | 2.31k | NULL, |
5633 | 2.31k | NULL, |
5634 | 2.31k | NULL, |
5635 | 2.31k | NULL, |
5636 | 2.31k | NULL, |
5637 | 2.31k | NULL |
5638 | 2.31k | }; |
5639 | | |
5640 | | /* Reference: TR-111 DHCP Option 125 Sub-Option Data Fields |
5641 | | Page 10. |
5642 | | */ |
5643 | | |
5644 | 2.31k | static const struct opt_info o125_tr111_opt[]= { |
5645 | 2.31k | /* 0 */ {"nop", special, NULL}, /* dummy */ |
5646 | 2.31k | /* 1 */ {"DeviceManufacturerOUI", oui, &hf_dhcp_option125_tr111_device_manufacturer_oui}, |
5647 | 2.31k | /* 2 */ {"DeviceSerialNumber", string, &hf_dhcp_option125_tr111_device_serial_number}, |
5648 | 2.31k | /* 3 */ {"DeviceProductClass", string, &hf_dhcp_option125_tr111_device_product_class}, |
5649 | 2.31k | /* 4 */ {"GatewayManufacturerOUI", string, &hf_dhcp_option125_tr111_gateway_manufacturer_oui}, |
5650 | 2.31k | /* 5 */ {"GatewaySerialNumber", string, &hf_dhcp_option125_tr111_gateway_serial_number}, |
5651 | 2.31k | /* 6 */ {"GatewayProductClass", string, &hf_dhcp_option125_tr111_gateway_product_class}, |
5652 | 2.31k | }; |
5653 | | |
5654 | 2.31k | subopt = tvb_get_uint8(tvb, offset); |
5655 | 2.31k | offset++; |
5656 | | |
5657 | 2.31k | if (tvb_reported_length_remaining(tvb, offset) < 1) { |
5658 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_missing_subopt_length, |
5659 | 10 | "Suboption %d: no room left in option for suboption length", subopt); |
5660 | 10 | return offset; |
5661 | 10 | } |
5662 | | |
5663 | 2.30k | subopt_len = tvb_get_uint8(tvb, offset); |
5664 | 2.30k | vti = proto_tree_add_uint_format_value(tree, hf_dhcp_option125_tr111_suboption, |
5665 | 2.30k | tvb, offset, subopt_len+2, subopt, "(%d) %s", |
5666 | 2.30k | subopt, val_to_str_const(subopt, option125_tr111_suboption_vals, "Unknown")); |
5667 | | |
5668 | 2.30k | o125_v_tree = proto_item_add_subtree(vti, ett_dhcp_option125_tr111_suboption); |
5669 | 2.30k | proto_tree_add_item(o125_v_tree, hf_dhcp_suboption_length, tvb, offset, 1, ENC_BIG_ENDIAN); |
5670 | 2.30k | offset++; |
5671 | | |
5672 | 2.30k | if (tvb_reported_length_remaining(tvb, offset) < subopt_len) { |
5673 | 490 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5674 | 490 | "Suboption %d: no room left in option for suboption value", subopt); |
5675 | 490 | return offset; |
5676 | 490 | } |
5677 | | |
5678 | 1.81k | ti = proto_tree_add_item(tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5679 | 1.81k | proto_item_set_hidden(ti); |
5680 | | |
5681 | 1.81k | if (subopt < array_length(o125_tr111_opt)) { |
5682 | 1.28k | if (dhcp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_tr111_opt[subopt].ftype, offset, subopt_len, o125_tr111_opt[subopt].phf, &default_hfs) == 0) { |
5683 | 1.14k | if (o125_tr111_opt[subopt].ftype == special) { |
5684 | 633 | if (o125_tr111_opt[subopt].phf != NULL) |
5685 | 0 | proto_tree_add_item(o125_v_tree, *o125_tr111_opt[subopt].phf, tvb, offset, subopt_len, ENC_BIG_ENDIAN); |
5686 | 633 | else |
5687 | 633 | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5688 | 633 | } |
5689 | 509 | else if (o125_tr111_opt[subopt].ftype == oui) { |
5690 | | /* Get hex string. Expecting 6 characters. */ |
5691 | 200 | const char *oui_string = (char *)tvb_get_string_enc(pinfo->pool, tvb, offset, subopt_len, ENC_ASCII); |
5692 | | /* Convert to OUI number. Only 3 bytes so no data lost in downcast. */ |
5693 | 200 | uint32_t oui_number = (uint32_t)strtol(oui_string, NULL, 16); |
5694 | | /* Add item using oui_vals */ |
5695 | 200 | proto_tree_add_uint(o125_v_tree, *o125_tr111_opt[subopt].phf, tvb, offset, subopt_len, oui_number); |
5696 | 309 | } else if (o125_tr111_opt[subopt].phf == NULL) |
5697 | 0 | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5698 | 1.14k | } |
5699 | 1.28k | } |
5700 | | |
5701 | 1.81k | return subopt_len + 2; |
5702 | 2.30k | } |
5703 | | |
5704 | | static const value_string option125_cl_suboption_vals[] = { |
5705 | | { 1, "Option Request" }, |
5706 | | { 2, "TFTP Server Addresses" }, |
5707 | | { 3, "eRouter Container Option" }, |
5708 | | { 4, "MIB Environment Indicator Option" }, |
5709 | | { 5, "Modem Capabilities" }, |
5710 | | { 0, NULL } |
5711 | | }; |
5712 | | |
5713 | | static const value_string pkt_mib_env_ind_opt_vals[] = { |
5714 | | { 0x00, "Reserved" }, |
5715 | | { 0x01, "CableLabs" }, |
5716 | | { 0x02, "IETF" }, |
5717 | | { 0x03, "EuroCableLabs" }, |
5718 | | { 0, NULL } |
5719 | | }; |
5720 | | |
5721 | | static int |
5722 | | dissect_vendor_cl_suboption(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5723 | 7.20k | { |
5724 | 7.20k | int offset = 0; |
5725 | 7.20k | uint8_t subopt, subopt_len; |
5726 | 7.20k | proto_tree *o125_v_tree; |
5727 | 7.20k | proto_item *vti; |
5728 | | |
5729 | 7.20k | static const struct basic_types_hfs default_hfs = { |
5730 | 7.20k | &hf_dhcp_option125_value, |
5731 | 7.20k | &hf_dhcp_option125_value_ip_address, |
5732 | 7.20k | &hf_dhcp_option125_value_ip_address, |
5733 | 7.20k | &hf_dhcp_option125_value_stringz, |
5734 | 7.20k | NULL, |
5735 | 7.20k | &hf_dhcp_option125_value_8, |
5736 | 7.20k | &hf_dhcp_option125_value_16, |
5737 | 7.20k | NULL, |
5738 | 7.20k | NULL, |
5739 | 7.20k | NULL, |
5740 | 7.20k | NULL |
5741 | 7.20k | }; |
5742 | | |
5743 | 7.20k | static const struct opt_info o125_cl_opt[]= { |
5744 | 7.20k | /* 0 */ {"nop", special, NULL}, /* dummy */ |
5745 | 7.20k | /* 1 */ {"Option Request = ", bytes, &hf_dhcp_option125_cl_option_request}, |
5746 | 7.20k | /* 2 */ {"TFTP Server Addresses : ", ipv4_list, &hf_dhcp_option125_cl_tftp_server_addresses}, |
5747 | 7.20k | /* 3 */ {"eRouter Container Option : ", bytes, &hf_dhcp_option125_cl_erouter_container_option}, |
5748 | 7.20k | /* 4 */ {"MIB Environment Indicator Option = ", val_u_byte, &hf_dhcp_option125_cl_mib_environment_indicator_option}, |
5749 | 7.20k | /* 5 */ {"Modem Capabilities : ", special, &hf_dhcp_option125_cl_modem_capabilities}, |
5750 | 7.20k | }; |
5751 | | |
5752 | 7.20k | subopt = tvb_get_uint8(tvb, offset); |
5753 | 7.20k | offset++; |
5754 | | |
5755 | 7.20k | if (tvb_reported_length_remaining(tvb, offset) < 1) { |
5756 | 37 | expert_add_info_format(pinfo, tree, &ei_dhcp_missing_subopt_length, |
5757 | 37 | "Suboption %d: no room left in option for suboption length", subopt); |
5758 | 37 | return offset; |
5759 | 37 | } |
5760 | | |
5761 | 7.16k | subopt_len = tvb_get_uint8(tvb, offset); |
5762 | 7.16k | vti = proto_tree_add_uint_format_value(tree, hf_dhcp_option125_cl_suboption, |
5763 | 7.16k | tvb, offset, subopt_len+2, subopt, "(%d) %s", |
5764 | 7.16k | subopt, val_to_str_const(subopt, option125_cl_suboption_vals, "Unknown")); |
5765 | | |
5766 | 7.16k | o125_v_tree = proto_item_add_subtree(vti, ett_dhcp_option125_cl_suboption); |
5767 | 7.16k | proto_tree_add_item(o125_v_tree, hf_dhcp_suboption_length, tvb, offset, 1, ENC_BIG_ENDIAN); |
5768 | 7.16k | offset++; |
5769 | | |
5770 | 7.16k | if (tvb_reported_length_remaining(tvb, offset) < subopt_len) { |
5771 | 1.60k | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5772 | 1.60k | "Suboption %d: no room left in option for suboption value", subopt); |
5773 | 1.60k | return offset; |
5774 | 1.60k | } |
5775 | | |
5776 | 5.55k | if (subopt < array_length(o125_cl_opt)) { |
5777 | 3.91k | if (dhcp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_cl_opt[subopt].ftype, |
5778 | 3.91k | offset, subopt_len, o125_cl_opt[subopt].phf, &default_hfs) == 0) { |
5779 | | |
5780 | 3.80k | switch(o125_cl_opt[subopt].ftype) { |
5781 | 3.20k | case special: |
5782 | 3.20k | if (o125_cl_opt[subopt].phf != NULL) |
5783 | 596 | proto_tree_add_item(o125_v_tree, *o125_cl_opt[subopt].phf, tvb, offset, subopt_len, ENC_BIG_ENDIAN); |
5784 | 2.61k | else |
5785 | 2.61k | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5786 | 3.20k | switch(subopt){ |
5787 | 595 | case 5: /* Modem Capabilities */ |
5788 | 595 | dissect_docsis_cm_cap(pinfo, o125_v_tree, tvb, offset-2, subopt_len+2, true); |
5789 | 595 | break; |
5790 | 3.20k | } |
5791 | 3.04k | break; |
5792 | 3.04k | default: |
5793 | 594 | if (o125_cl_opt[subopt].phf == NULL) |
5794 | 0 | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5795 | 594 | break; |
5796 | 3.80k | } |
5797 | 3.80k | } |
5798 | 3.91k | } |
5799 | | |
5800 | 5.39k | return subopt_len + 2; |
5801 | 5.55k | } |
5802 | | |
5803 | | /* PacketCable Multimedia Terminal Adapter device capabilities (option 60). |
5804 | | Ref: PKT-SP-I05-021127 sections 8.2 and 10 */ |
5805 | | |
5806 | 234 | #define PKT_MDC_TLV_OFF 10 |
5807 | | |
5808 | | |
5809 | | /* These are ASCII-encoded hexadecimal digits. We use the raw hex equivalent for |
5810 | | convenience. */ |
5811 | 58 | #define PKT_MDC_VERSION 0x3031 /* "01" */ |
5812 | 50 | #define PKT_MDC_TEL_END 0x3032 /* "02" */ |
5813 | 55 | #define PKT_MDC_TGT 0x3033 /* "03" */ |
5814 | 119 | #define PKT_MDC_HTTP_ACC 0x3034 /* "04" */ |
5815 | 155 | #define PKT_MDC_SYSLOG 0x3035 /* "05" */ |
5816 | 185 | #define PKT_MDC_NCS 0x3036 /* "06" */ |
5817 | 236 | #define PKT_MDC_PRI_LINE 0x3037 /* "07" */ |
5818 | 3 | #define PKT_MDC_VENDOR_TLV 0x3038 /* "08" */ |
5819 | 288 | #define PKT_MDC_NVRAM_STOR 0x3039 /* "09" */ |
5820 | 367 | #define PKT_MDC_PROV_REP 0x3041 /* "0A" */ |
5821 | 442 | #define PKT_MDC_PROV_REP_LC 0x3061 /* "0a" */ |
5822 | 76 | #define PKT_MDC_SUPP_CODECS 0x3042 /* "0B" */ |
5823 | 144 | #define PKT_MDC_SUPP_CODECS_LC 0x3062 /* "0b" */ |
5824 | 510 | #define PKT_MDC_SILENCE 0x3043 /* "0C" */ |
5825 | 602 | #define PKT_MDC_SILENCE_LC 0x3063 /* "0c" */ |
5826 | 691 | #define PKT_MDC_ECHO_CANCEL 0x3044 /* "0D" */ |
5827 | 752 | #define PKT_MDC_ECHO_CANCEL_LC 0x3064 /* "0d" */ |
5828 | 811 | #define PKT_MDC_RSVP 0x3045 /* "0E" */ |
5829 | 873 | #define PKT_MDC_RSVP_LC 0x3065 /* "0e" */ |
5830 | 930 | #define PKT_MDC_UGS_AD 0x3046 /* "0F" */ |
5831 | 1.05k | #define PKT_MDC_UGS_AD_LC 0x3066 /* "0f" */ |
5832 | 128 | #define PKT_MDC_IF_INDEX 0x3130 /* "10" */ |
5833 | 1.14k | #define PKT_MDC_FLOW_LOG 0x3131 /* "11" */ |
5834 | 3.45k | #define PKT_MDC_PROV_FLOWS 0x3132 /* "12" */ |
5835 | | /* PacketCable 1.5: */ |
5836 | 95 | #define PKT_MDC_T38_VERSION 0x3133 /* "13" */ |
5837 | 153 | #define PKT_MDC_T38_EC 0x3134 /* "14" */ |
5838 | 1.21k | #define PKT_MDC_RFC2833_DTMF 0x3135 /* "15" */ |
5839 | 1.24k | #define PKT_MDC_VOICE_METRICS 0x3136 /* "16" */ |
5840 | 3.18k | #define PKT_MDC_MIBS 0x3137 /* "17" */ |
5841 | 1.27k | #define PKT_MDC_MGPI 0x3138 /* "18" */ |
5842 | 1.35k | #define PKT_MDC_V152 0x3139 /* "19" */ |
5843 | 1.40k | #define PKT_MDC_CBS 0x3141 /* "1A" */ |
5844 | 1.45k | #define PKT_MDC_CBS_LC 0x3161 /* "1a" */ |
5845 | | |
5846 | | static const value_string pkt_mdc_type_vals[] = { |
5847 | | { PKT_MDC_VERSION, "PacketCable Version" }, |
5848 | | { PKT_MDC_TEL_END, "Number Of Telephony Endpoints" }, |
5849 | | { PKT_MDC_TGT, "TGT Support" }, |
5850 | | { PKT_MDC_HTTP_ACC, "HTTP Download File Access Method Support" }, |
5851 | | { PKT_MDC_SYSLOG, "MTA-24 Event SYSLOG Notification Support" }, |
5852 | | { PKT_MDC_NCS, "NCS Service Flow Support" }, |
5853 | | { PKT_MDC_PRI_LINE, "Primary Line Support" }, |
5854 | | { PKT_MDC_VENDOR_TLV, "Vendor Specific TLV Type(s)" }, |
5855 | | { PKT_MDC_NVRAM_STOR, "NVRAM Ticket/Session Keys Storage Support" }, |
5856 | | { PKT_MDC_PROV_REP, "Provisioning Event Reporting Support" }, |
5857 | | { PKT_MDC_PROV_REP_LC, "Provisioning Event Reporting Support" }, |
5858 | | { PKT_MDC_SUPP_CODECS, "Supported CODEC(s)" }, |
5859 | | { PKT_MDC_SUPP_CODECS_LC, "Supported CODEC(s)" }, |
5860 | | { PKT_MDC_SILENCE, "Silence Suppression Support" }, |
5861 | | { PKT_MDC_SILENCE_LC, "Silence Suppression Support" }, |
5862 | | { PKT_MDC_ECHO_CANCEL, "Echo Cancellation Support" }, |
5863 | | { PKT_MDC_ECHO_CANCEL_LC, "Echo Cancellation Support" }, |
5864 | | { PKT_MDC_RSVP, "RSVP Support/ Reserved" }, |
5865 | | { PKT_MDC_RSVP_LC, "RSVP Support/ Reserved" }, |
5866 | | { PKT_MDC_UGS_AD, "UGS-AD Support" }, |
5867 | | { PKT_MDC_UGS_AD_LC, "UGS-AD Support" }, |
5868 | | { PKT_MDC_IF_INDEX, "MTA's \"ifIndex\" starting number in \"ifTable\"" }, |
5869 | | { PKT_MDC_FLOW_LOG, "Provisioning Flow Logging Support" }, |
5870 | | { PKT_MDC_PROV_FLOWS, "Supported Provisioning Flows" }, |
5871 | | /* PacketCable 1.5: */ |
5872 | | { PKT_MDC_T38_VERSION, "T38 Version Support" }, |
5873 | | { PKT_MDC_T38_EC, "T38 Error Correction Support" }, |
5874 | | { PKT_MDC_RFC2833_DTMF, "RFC 2833 DTMF Support" }, |
5875 | | { PKT_MDC_VOICE_METRICS, "Voice Metrics Support" }, |
5876 | | { PKT_MDC_MIBS, "MIB Support" }, |
5877 | | { PKT_MDC_MGPI, "Multiple Grants Per Interval Support" }, |
5878 | | { PKT_MDC_V152, "V.152 Support" }, |
5879 | | /* PacketCable 2.0: */ |
5880 | | { PKT_MDC_CBS, "Certificate Bootstrapping Support" }, |
5881 | | { PKT_MDC_CBS_LC, "Certificate Bootstrapping Support" }, |
5882 | | { 0, NULL } |
5883 | | }; |
5884 | | |
5885 | | static const value_string pkt_mdc_version_vals[] = { |
5886 | | { 0x3030, "PacketCable 1.0" }, |
5887 | | { 0x3031, "PacketCable 1.1/1.5" }, /* 1.5 replaces 1.1-1.3 */ |
5888 | | { 0x3032, "PacketCable 2.0" }, |
5889 | | { 0, NULL } |
5890 | | }; |
5891 | | |
5892 | | static const value_string pkt_mdc_boolean_vals[] = { |
5893 | | { 0x3030, "No" }, |
5894 | | { 0x3031, "Yes" }, |
5895 | | { 0, NULL } |
5896 | | }; |
5897 | | |
5898 | | static const value_string pkt_mdc_codec_vals[] = { |
5899 | | { 0x3031, "other" }, /* "01" */ |
5900 | | { 0x3032, "unknown" }, |
5901 | | { 0x3033, "G.729" }, |
5902 | | { 0x3034, "reserved" }, |
5903 | | { 0x3035, "G.729E" }, |
5904 | | { 0x3036, "PCMU" }, |
5905 | | { 0x3037, "G.726-32" }, |
5906 | | { 0x3038, "G.728" }, |
5907 | | { 0x3039, "PCMA" }, /* "09" */ |
5908 | | { 0x3041, "G.726-16" }, /* "0A" */ |
5909 | | { 0x3042, "G.726-24" }, |
5910 | | { 0x3043, "G.726-40" }, |
5911 | | { 0x3044, "iLBC" }, |
5912 | | { 0x3045, "BV16" }, |
5913 | | { 0x3046, "telephone-event" }, /* "0F" */ |
5914 | | { 0, NULL } |
5915 | | }; |
5916 | | |
5917 | | static const value_string pkt_mdc_t38_version_vals[] = { |
5918 | | { 0x3030, "Unsupported" }, |
5919 | | { 0x3031, "T.38 Version Zero" }, /* default */ |
5920 | | { 0x3032, "T.38 Version One" }, |
5921 | | { 0x3033, "T.38 Version Two" }, |
5922 | | { 0x3035, "T.38 Version Three" }, |
5923 | | { 0, NULL } |
5924 | | }; |
5925 | | |
5926 | | static const value_string pkt_mdc_t38_ec_vals[] = { |
5927 | | { 0x3030, "None" }, |
5928 | | { 0x3031, "Redundancy" }, /* default */ |
5929 | | { 0x3032, "FEC" }, |
5930 | | { 0, NULL } |
5931 | | }; |
5932 | | |
5933 | | static const value_string pkt_mdc_mib_orgs[] = { |
5934 | | { 0x3030, "CableLabs" }, |
5935 | | { 0x3031, "IETF" }, |
5936 | | { 0x3032, "EuroCableLabs" }, |
5937 | | { 0x3033, "Reserved" }, |
5938 | | { 0x3034, "Reserved" }, |
5939 | | { 0x3035, "Reserved" }, |
5940 | | { 0x3036, "Reserved" }, |
5941 | | { 0x3037, "Reserved" }, |
5942 | | { 0x3038, "Reserved" }, |
5943 | | { 0x3039, "Reserved" }, |
5944 | | { 0, NULL } |
5945 | | }; |
5946 | | |
5947 | | static int hf_dhcp_pkt_mdc_supp_flow_secure; |
5948 | | static int hf_dhcp_pkt_mdc_supp_flow_hybrid; |
5949 | | static int hf_dhcp_pkt_mdc_supp_flow_basic; |
5950 | | |
5951 | 0 | #define PKT_MDC_MIB_CL 0x3030 |
5952 | | static int hf_dhcp_pkt_mdc_mib_cl_mta; |
5953 | | static int hf_dhcp_pkt_mdc_mib_cl_signaling; |
5954 | | static int hf_dhcp_pkt_mdc_mib_cl_management_event; |
5955 | | static int hf_dhcp_pkt_mdc_mib_cl_mta_extension; |
5956 | | static int hf_dhcp_pkt_mdc_mib_cl_mta_signaling_extension; |
5957 | | static int hf_dhcp_pkt_mdc_mib_cl_mta_mem_extension; |
5958 | | static int hf_dhcp_pkt_mdc_mib_cl_reserved; |
5959 | | |
5960 | 21 | #define PKT_MDC_MIB_IETF 0x3031 |
5961 | | static int hf_dhcp_pkt_mdc_mib_ietf_mta; |
5962 | | static int hf_dhcp_pkt_mdc_mib_ietf_signaling; |
5963 | | static int hf_dhcp_pkt_mdc_mib_ietf_management_event; |
5964 | | static int hf_dhcp_pkt_mdc_mib_ietf_reserved; |
5965 | | |
5966 | 15 | #define PKT_MDC_MIB_EURO 0x3032 |
5967 | | static int hf_dhcp_pkt_mdc_mib_euro_mta; |
5968 | | static int hf_dhcp_pkt_mdc_mib_euro_signaling; |
5969 | | static int hf_dhcp_pkt_mdc_mib_euro_management_event; |
5970 | | static int hf_dhcp_pkt_mdc_mib_euro_mta_extension; |
5971 | | static int hf_dhcp_pkt_mdc_mib_euro_mta_signaling_extension; |
5972 | | static int hf_dhcp_pkt_mdc_mib_euro_mta_mem_extension; |
5973 | | static int hf_dhcp_pkt_mdc_mib_euro_reserved; |
5974 | | |
5975 | | |
5976 | | static void |
5977 | | dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tvb, int voff, int len) |
5978 | 234 | { |
5979 | 234 | uint16_t raw_val; |
5980 | 234 | uint32_t flow_val = 0; |
5981 | 234 | int off = PKT_MDC_TLV_OFF + voff; |
5982 | 234 | int subopt_off, max_len; |
5983 | 234 | unsigned tlv_len, i, mib_val; |
5984 | 234 | uint8_t flow_val_str[5]; |
5985 | 234 | const char *asc_val; |
5986 | 234 | proto_item *ti, *mib_ti; |
5987 | 234 | proto_tree *subtree, *subtree2; |
5988 | | |
5989 | 234 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, off, 2, ENC_ASCII); |
5990 | 234 | if (sscanf(asc_val, "%x", &tlv_len) != 1 || tlv_len > 0xff) { |
5991 | 23 | proto_tree_add_expert_format(v_tree, pinfo, &ei_dhcp_bad_length, tvb, off, len - off, |
5992 | 23 | "Bogus length: %s", |
5993 | 23 | format_text_string(pinfo->pool, asc_val)); |
5994 | 23 | return; |
5995 | 211 | } else { |
5996 | 211 | proto_tree_add_uint(v_tree, hf_dhcp_pkt_mta_cap_len, tvb, off, 2, tlv_len); |
5997 | 211 | off += 2; |
5998 | | |
5999 | 3.58k | while (off - voff < len) { |
6000 | | /* Type */ |
6001 | 3.53k | raw_val = tvb_get_ntohs (tvb, off); |
6002 | | |
6003 | | /* Length */ |
6004 | 3.53k | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, off + 2, 2, ENC_ASCII); |
6005 | 3.53k | if (sscanf(asc_val, "%x", &tlv_len) != 1 |
6006 | 3.46k | || tlv_len < 1 || tlv_len > UINT16_MAX) { |
6007 | 63 | proto_tree_add_expert_format(v_tree, pinfo, &ei_dhcp_bad_length, tvb, off, len - off, |
6008 | 63 | "Bogus length: %s", |
6009 | 63 | format_text_string(pinfo->pool, asc_val)); |
6010 | 63 | return; |
6011 | 3.47k | } else { |
6012 | | /* Value(s) */ |
6013 | | |
6014 | 3.47k | ti = proto_tree_add_uint_format(v_tree, hf_dhcp_pkt_mta_cap_type, |
6015 | 3.47k | tvb, off, 2, raw_val, "0x%s: %s = ", |
6016 | 3.47k | tvb_format_text(pinfo->pool, tvb, off, 2), |
6017 | 3.47k | val_to_str_const(raw_val, pkt_mdc_type_vals, "unknown")); |
6018 | 3.47k | proto_item_set_len(ti, (tlv_len * 2) + 4); |
6019 | 3.47k | switch (raw_val) { |
6020 | | |
6021 | 58 | case PKT_MDC_VERSION: |
6022 | 58 | raw_val = tvb_get_ntohs(tvb, off + 4); |
6023 | 58 | proto_item_append_text(ti, |
6024 | 58 | "%s (%s)", |
6025 | 58 | val_to_str_const(raw_val, pkt_mdc_version_vals, "Reserved"), |
6026 | 58 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6027 | 58 | break; |
6028 | | |
6029 | 50 | case PKT_MDC_TEL_END: |
6030 | 128 | case PKT_MDC_IF_INDEX: |
6031 | 128 | proto_item_append_text(ti, |
6032 | 128 | "%s", |
6033 | 128 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6034 | 128 | break; |
6035 | | |
6036 | 55 | case PKT_MDC_TGT: |
6037 | 119 | case PKT_MDC_HTTP_ACC: |
6038 | 155 | case PKT_MDC_SYSLOG: |
6039 | 185 | case PKT_MDC_NCS: |
6040 | 236 | case PKT_MDC_PRI_LINE: |
6041 | 288 | case PKT_MDC_NVRAM_STOR: |
6042 | 367 | case PKT_MDC_PROV_REP: |
6043 | 442 | case PKT_MDC_PROV_REP_LC: |
6044 | 510 | case PKT_MDC_SILENCE: |
6045 | 602 | case PKT_MDC_SILENCE_LC: |
6046 | 691 | case PKT_MDC_ECHO_CANCEL: |
6047 | 752 | case PKT_MDC_ECHO_CANCEL_LC: |
6048 | 811 | case PKT_MDC_RSVP: |
6049 | 873 | case PKT_MDC_RSVP_LC: |
6050 | 930 | case PKT_MDC_UGS_AD: |
6051 | 1.05k | case PKT_MDC_UGS_AD_LC: |
6052 | 1.14k | case PKT_MDC_FLOW_LOG: |
6053 | 1.21k | case PKT_MDC_RFC2833_DTMF: |
6054 | 1.24k | case PKT_MDC_VOICE_METRICS: |
6055 | 1.27k | case PKT_MDC_MGPI: |
6056 | 1.35k | case PKT_MDC_V152: |
6057 | 1.40k | case PKT_MDC_CBS: |
6058 | 1.45k | case PKT_MDC_CBS_LC: |
6059 | 1.45k | raw_val = tvb_get_ntohs(tvb, off + 4); |
6060 | 1.45k | proto_item_append_text(ti, |
6061 | 1.45k | "%s (%s)", |
6062 | 1.45k | val_to_str_const(raw_val, pkt_mdc_boolean_vals, "unknown"), |
6063 | 1.45k | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6064 | 1.45k | break; |
6065 | | |
6066 | 76 | case PKT_MDC_SUPP_CODECS: |
6067 | 144 | case PKT_MDC_SUPP_CODECS_LC: |
6068 | 1.39k | for (i = 0; i < tlv_len; i++) { |
6069 | 1.24k | raw_val = tvb_get_ntohs(tvb, off + 4 + (i * 2) ); |
6070 | 1.24k | proto_item_append_text(ti, |
6071 | 1.24k | "%s%s (%s)", |
6072 | 1.24k | plurality(i + 1, "", ", "), |
6073 | 1.24k | val_to_str_const(raw_val, pkt_mdc_codec_vals, "unknown"), |
6074 | 1.24k | tvb_format_stringzpad(pinfo->pool, tvb, off + 4 + (i * 2), 2) ); |
6075 | 1.24k | } |
6076 | 144 | break; |
6077 | | |
6078 | 61 | case PKT_MDC_PROV_FLOWS: |
6079 | 61 | tvb_memcpy(tvb, flow_val_str, off + 4, 4); |
6080 | 61 | flow_val_str[4] = '\0'; |
6081 | | /* We are only reading 4 digits which should fit in 32 bits */ |
6082 | 61 | flow_val = (uint32_t)strtoul((char*)flow_val_str, NULL, 16); |
6083 | 61 | proto_item_append_text(ti, |
6084 | 61 | "0x%04x", flow_val); |
6085 | 61 | break; |
6086 | | |
6087 | 95 | case PKT_MDC_T38_VERSION: |
6088 | 95 | raw_val = tvb_get_ntohs(tvb, off + 4); |
6089 | 95 | proto_item_append_text(ti, |
6090 | 95 | "%s (%s)", |
6091 | 95 | val_to_str_const(raw_val, pkt_mdc_t38_version_vals, "unknown"), |
6092 | 95 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6093 | 95 | break; |
6094 | | |
6095 | 153 | case PKT_MDC_T38_EC: |
6096 | 153 | raw_val = tvb_get_ntohs(tvb, off + 4); |
6097 | 153 | proto_item_append_text(ti, |
6098 | 153 | "%s (%s)", |
6099 | 153 | val_to_str_const(raw_val, pkt_mdc_t38_ec_vals, "unknown"), |
6100 | 153 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6101 | 153 | break; |
6102 | | |
6103 | 95 | case PKT_MDC_MIBS: |
6104 | 95 | break; |
6105 | | |
6106 | 3 | case PKT_MDC_VENDOR_TLV: |
6107 | 1.26k | default: |
6108 | 1.26k | proto_item_append_text(ti, |
6109 | 1.26k | "%s", |
6110 | 1.26k | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, tlv_len * 2) ); |
6111 | 1.26k | break; |
6112 | 3.47k | } |
6113 | 3.47k | } |
6114 | 3.39k | subtree = proto_item_add_subtree(ti, ett_dhcp_option); |
6115 | 3.39k | if (raw_val == PKT_MDC_PROV_FLOWS) { |
6116 | 307 | static int * const flows[] = { |
6117 | 307 | &hf_dhcp_pkt_mdc_supp_flow_secure, |
6118 | 307 | &hf_dhcp_pkt_mdc_supp_flow_hybrid, |
6119 | 307 | &hf_dhcp_pkt_mdc_supp_flow_basic, |
6120 | 307 | NULL |
6121 | 307 | }; |
6122 | | |
6123 | 307 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 4, 4, flows, flow_val); |
6124 | 3.09k | } else if (raw_val == PKT_MDC_MIBS) { |
6125 | | /* 17 06 02 00 38 02 01 07 */ |
6126 | 96 | subopt_off = off + 4; |
6127 | 96 | max_len = subopt_off + (tlv_len * 2); |
6128 | 233 | while (subopt_off < max_len) { |
6129 | 164 | raw_val = tvb_get_ntohs(tvb, subopt_off); |
6130 | 164 | if (raw_val != 0x3032) { /* We only know how to handle a length of 2 */ |
6131 | 21 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, subopt_off, 2, ENC_ASCII); |
6132 | 21 | proto_tree_add_expert_format(subtree, pinfo, &ei_dhcp_bad_length, tvb, subopt_off, 2, |
6133 | 21 | "Bogus length: %s", |
6134 | 21 | format_text_string(pinfo->pool, asc_val)); |
6135 | 21 | return; |
6136 | 21 | } |
6137 | | |
6138 | 143 | subopt_off += 2; |
6139 | 143 | raw_val = tvb_get_ntohs(tvb, subopt_off); |
6140 | 143 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, subopt_off, 2, ENC_ASCII); |
6141 | 143 | subtree2 = proto_tree_add_subtree_format(subtree, tvb, subopt_off, 2, |
6142 | 143 | ett_dhcp_option, &mib_ti, "%s (%s)", |
6143 | 143 | val_to_str_const(raw_val, pkt_mdc_mib_orgs, "Unknown"), |
6144 | 143 | format_text_string(pinfo->pool, asc_val)); |
6145 | 143 | if (subopt_off > off + 4 + 2) { |
6146 | 58 | proto_item_append_text(ti, ", "); |
6147 | 58 | } |
6148 | 143 | proto_item_append_text(ti, "%s", val_to_str_const(raw_val, pkt_mdc_mib_orgs, "Unknown")); |
6149 | | |
6150 | 143 | subopt_off += 2; |
6151 | 143 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, subopt_off, 2, ENC_ASCII); |
6152 | 143 | if (sscanf(asc_val, "%x", &mib_val) != 1) { |
6153 | 6 | proto_tree_add_expert_format(v_tree, pinfo, &ei_dhcp_bad_bitfield, tvb, subopt_off, 2, |
6154 | 6 | "Bogus bitfield: %s", format_text_string(pinfo->pool, asc_val)); |
6155 | 6 | return; |
6156 | 6 | } |
6157 | 137 | switch (raw_val) { |
6158 | | |
6159 | 0 | case PKT_MDC_MIB_CL: { |
6160 | 0 | static int * const cl_flags[] = { |
6161 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta, |
6162 | 0 | &hf_dhcp_pkt_mdc_mib_cl_signaling, |
6163 | 0 | &hf_dhcp_pkt_mdc_mib_cl_management_event, |
6164 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta_extension, |
6165 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta_signaling_extension, |
6166 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta_mem_extension, |
6167 | 0 | &hf_dhcp_pkt_mdc_mib_cl_reserved, |
6168 | 0 | NULL |
6169 | 0 | }; |
6170 | |
|
6171 | 0 | proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, cl_flags, mib_val); |
6172 | 0 | } |
6173 | 0 | break; |
6174 | | |
6175 | 21 | case PKT_MDC_MIB_IETF: { |
6176 | 21 | static int * const ietf_flags[] = { |
6177 | 21 | &hf_dhcp_pkt_mdc_mib_ietf_mta, |
6178 | 21 | &hf_dhcp_pkt_mdc_mib_ietf_signaling, |
6179 | 21 | &hf_dhcp_pkt_mdc_mib_ietf_management_event, |
6180 | 21 | &hf_dhcp_pkt_mdc_mib_ietf_reserved, |
6181 | 21 | NULL |
6182 | 21 | }; |
6183 | | |
6184 | 21 | proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, ietf_flags, mib_val); |
6185 | 21 | } |
6186 | 21 | break; |
6187 | | |
6188 | 15 | case PKT_MDC_MIB_EURO: { |
6189 | 15 | static int * const euro_flags[] = { |
6190 | 15 | &hf_dhcp_pkt_mdc_mib_euro_mta, |
6191 | 15 | &hf_dhcp_pkt_mdc_mib_euro_signaling, |
6192 | 15 | &hf_dhcp_pkt_mdc_mib_euro_management_event, |
6193 | 15 | &hf_dhcp_pkt_mdc_mib_euro_mta_extension, |
6194 | 15 | &hf_dhcp_pkt_mdc_mib_euro_mta_signaling_extension, |
6195 | 15 | &hf_dhcp_pkt_mdc_mib_euro_mta_mem_extension, |
6196 | 15 | &hf_dhcp_pkt_mdc_mib_euro_reserved, |
6197 | 15 | NULL |
6198 | 15 | }; |
6199 | | |
6200 | 15 | proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, euro_flags, mib_val); |
6201 | 15 | } |
6202 | 15 | break; |
6203 | | |
6204 | 101 | default: |
6205 | 101 | break; |
6206 | 137 | } |
6207 | 137 | subopt_off += 2; |
6208 | 137 | } |
6209 | | |
6210 | 96 | } |
6211 | 3.37k | off += (tlv_len * 2) + 4; |
6212 | 3.37k | } |
6213 | 211 | } |
6214 | 234 | } |
6215 | | |
6216 | | static bool |
6217 | | dissect_packetcable_mta_vendor_id_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ ) |
6218 | 1.42k | { |
6219 | 1.42k | uint8_t* vendor_id; |
6220 | | |
6221 | 1.42k | if (tvb_reported_length(tvb) < 8) { |
6222 | 53 | return false; |
6223 | 53 | } |
6224 | | |
6225 | 1.37k | vendor_id = tvb_get_string_enc(pinfo->pool, tvb, 0, 8, ENC_ASCII|ENC_NA); |
6226 | 1.37k | if ((strcmp((const char*)vendor_id, PACKETCABLE_MTA_CAP10) == 0) || |
6227 | 1.28k | (strcmp((const char*)vendor_id, PACKETCABLE_MTA_CAP15) == 0) || |
6228 | 1.21k | (strcmp((const char*)vendor_id, PACKETCABLE_MTA_CAP20) == 0)) { |
6229 | 234 | dissect_packetcable_mta_cap(tree, pinfo, tvb, 0, tvb_reported_length(tvb)); |
6230 | 234 | return true; |
6231 | 234 | } |
6232 | | |
6233 | 1.13k | return false; |
6234 | 1.37k | } |
6235 | | |
6236 | | /* DOCSIS Cable Modem device capabilities (option 60/option 125). */ |
6237 | 63 | #define DOCSIS_CM_CAP_TLV_OFF 12 |
6238 | | |
6239 | 718 | #define DOCSIS_CM_CAP_CONCAT_SUP 0x01 |
6240 | 409 | #define DOCSIS_CM_CAP_DOCSIS_VER 0x02 |
6241 | 1.08k | #define DOCSIS_CM_CAP_FRAG_SUP 0x03 |
6242 | 1.38k | #define DOCSIS_CM_CAP_PHS_SUP 0x04 |
6243 | 1.70k | #define DOCSIS_CM_CAP_IGMP_SUP 0x05 |
6244 | 272 | #define DOCSIS_CM_CAP_PRIV_SUP 0x06 |
6245 | 248 | #define DOCSIS_CM_CAP_DSAID_SUP 0x07 |
6246 | 1.68k | #define DOCSIS_CM_CAP_USSF_SUP 0x08 |
6247 | 165 | #define DOCSIS_CM_CAP_FILT_SUP 0x09 |
6248 | 762 | #define DOCSIS_CM_CAP_TET_MI 0x0a |
6249 | 476 | #define DOCSIS_CM_CAP_TET 0x0b |
6250 | 1.86k | #define DOCSIS_CM_CAP_DCC_SUP 0x0c |
6251 | 265 | #define DOCSIS_CM_CAP_IPFILT_SUP 0x0d |
6252 | 574 | #define DOCSIS_CM_CAP_LLCFILT_SUP 0x0e |
6253 | 2.06k | #define DOCSIS_CM_CAP_EXPUNI_SPACE 0x0f |
6254 | 34.9k | #define DOCSIS_CM_CAP_RNGHLDOFF_SUP 0x10 |
6255 | 150 | #define DOCSIS_CM_CAP_L2VPN_SUP 0x11 |
6256 | 141 | #define DOCSIS_CM_CAP_L2VPN_HOST_SUP 0x12 |
6257 | 2.26k | #define DOCSIS_CM_CAP_DUTFILT_SUP 0x13 |
6258 | 179 | #define DOCSIS_CM_CAP_USFREQRNG_SUP 0x14 |
6259 | 17.5k | #define DOCSIS_CM_CAP_USSYMRATE_SUP 0x15 |
6260 | 2.41k | #define DOCSIS_CM_CAP_SACM2_SUP 0x16 |
6261 | 2.60k | #define DOCSIS_CM_CAP_SACM2HOP_SUP 0x17 |
6262 | 429 | #define DOCSIS_CM_CAP_MULTTXCHAN_SUP 0x18 |
6263 | 608 | #define DOCSIS_CM_CAP_512USTXCHAN_SUP 0x19 |
6264 | 793 | #define DOCSIS_CM_CAP_256USTXCHAN_SUP 0x1a |
6265 | 1.03k | #define DOCSIS_CM_CAP_TOTALSIDCLU_SUP 0x1b |
6266 | 634 | #define DOCSIS_CM_CAP_SIDCLUPERSF_SUP 0x1c |
6267 | 1.22k | #define DOCSIS_CM_CAP_MULTRXCHAN_SUP 0x1d |
6268 | 914 | #define DOCSIS_CM_CAP_TOTALDSID_SUP 0x1e |
6269 | 222 | #define DOCSIS_CM_CAP_RESEQDSID_SUP 0x1f |
6270 | 788 | #define DOCSIS_CM_CAP_MULTDSID_SUP 0x20 |
6271 | 140 | #define DOCSIS_CM_CAP_MULTDSIDFW_SUP 0x21 |
6272 | 137 | #define DOCSIS_CM_CAP_FCTF_SUP 0x22 |
6273 | 202 | #define DOCSIS_CM_CAP_DPV_SUP 0x23 |
6274 | 1.41k | #define DOCSIS_CM_CAP_UGSPERUSFLOW_SUP 0x24 |
6275 | 308 | #define DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP 0x25 |
6276 | 483 | #define DOCSIS_CM_CAP_USDROPCLASSIF_SUP 0x26 |
6277 | 2.70k | #define DOCSIS_CM_CAP_IPV6_SUP 0x27 |
6278 | 560 | #define DOCSIS_CM_CAP_ExUsTrPow 0x28 |
6279 | 34.9k | #define DOCSIS_CM_CAP_Opt802MPLSSup 0x29 |
6280 | 348 | #define DOCSIS_CM_CAP_DounEnc 0x2a |
6281 | 162 | #define DOCSIS_CM_CAP_EnrgMang 0x2c |
6282 | | |
6283 | | static const value_string docsis_cm_cap_type_vals[] = { |
6284 | | { DOCSIS_CM_CAP_CONCAT_SUP, "Concatenation Support" }, |
6285 | | { DOCSIS_CM_CAP_DOCSIS_VER, "DOCSIS Version" }, |
6286 | | { DOCSIS_CM_CAP_FRAG_SUP, "Fragmentation Support" }, |
6287 | | { DOCSIS_CM_CAP_PHS_SUP, "Payload Header Suppression Support" }, |
6288 | | { DOCSIS_CM_CAP_IGMP_SUP, "IGMP Support" }, |
6289 | | { DOCSIS_CM_CAP_PRIV_SUP, "Privacy Support" }, |
6290 | | { DOCSIS_CM_CAP_DSAID_SUP, "Downstream SAID Support" }, |
6291 | | { DOCSIS_CM_CAP_USSF_SUP, "Upstream Service Flow Support" }, |
6292 | | { DOCSIS_CM_CAP_FILT_SUP, "Optional Filtering Support" }, |
6293 | | { DOCSIS_CM_CAP_TET_MI, "Transmit Equalizer Taps per Modulation Interval" }, |
6294 | | { DOCSIS_CM_CAP_TET, "Number of Transmit Equalizer Taps" }, |
6295 | | { DOCSIS_CM_CAP_DCC_SUP, "DCC Support" }, |
6296 | | { DOCSIS_CM_CAP_IPFILT_SUP, "IP Filters Support" }, |
6297 | | { DOCSIS_CM_CAP_LLCFILT_SUP, "LLC Filters Support" }, |
6298 | | { DOCSIS_CM_CAP_EXPUNI_SPACE, "Expanded Unicast SID Space" }, |
6299 | | { DOCSIS_CM_CAP_RNGHLDOFF_SUP, "Ranging Hold-Off Support" }, |
6300 | | { DOCSIS_CM_CAP_L2VPN_SUP, "L2VPN Capability" }, |
6301 | | { DOCSIS_CM_CAP_L2VPN_HOST_SUP, "L2VPN eSAFE Host Capability" }, |
6302 | | { DOCSIS_CM_CAP_DUTFILT_SUP, "Downstream Unencrypted Traffic (DUT) Filtering" }, |
6303 | | { DOCSIS_CM_CAP_USFREQRNG_SUP, "Upstream Frequency Range Support" }, |
6304 | | { DOCSIS_CM_CAP_USSYMRATE_SUP, "Upstream Symbol Rate Support" }, |
6305 | | { DOCSIS_CM_CAP_SACM2_SUP, "Selectable Active Code Mode 2 Support" }, |
6306 | | { DOCSIS_CM_CAP_SACM2HOP_SUP, "Code Hopping Mode 2 Support" }, |
6307 | | { DOCSIS_CM_CAP_MULTTXCHAN_SUP, "Multiple Transmit Channel Support" }, |
6308 | | { DOCSIS_CM_CAP_512USTXCHAN_SUP, "5.12 Msps Upstream Transmit Channel Support" }, |
6309 | | { DOCSIS_CM_CAP_256USTXCHAN_SUP, "2.56 Msps Upstream Transmit Channel Support" }, |
6310 | | { DOCSIS_CM_CAP_TOTALSIDCLU_SUP, "Total SID Cluster Support" }, |
6311 | | { DOCSIS_CM_CAP_SIDCLUPERSF_SUP, "SID Clusters per Service Flow Support" }, |
6312 | | { DOCSIS_CM_CAP_MULTRXCHAN_SUP, "Multiple Receive Channel Support" }, |
6313 | | { DOCSIS_CM_CAP_TOTALDSID_SUP, "Total Downstream Service ID (DSID) Support" }, |
6314 | | { DOCSIS_CM_CAP_RESEQDSID_SUP, "Resequencing Downstream Service ID (DSID) Support" }, |
6315 | | { DOCSIS_CM_CAP_MULTDSID_SUP, "Multicast Downstream Service ID (DSID) Support" }, |
6316 | | { DOCSIS_CM_CAP_MULTDSIDFW_SUP, "Multicast DSID Forwarding" }, |
6317 | | { DOCSIS_CM_CAP_FCTF_SUP, "Frame Control Type Forwarding Capability" }, |
6318 | | { DOCSIS_CM_CAP_DPV_SUP, "DPV Capability" }, |
6319 | | { DOCSIS_CM_CAP_UGSPERUSFLOW_SUP, "Unsolicited Grant Service/Upstream Service Flow Support" }, |
6320 | | { DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP, "MAP and UCD Receipt Support" }, |
6321 | | { DOCSIS_CM_CAP_USDROPCLASSIF_SUP, "Upstream Drop Classifier Support" }, |
6322 | | { DOCSIS_CM_CAP_IPV6_SUP, "IPv6 Support" }, |
6323 | | { DOCSIS_CM_CAP_ExUsTrPow, "Extended Upstream Transmit Power Capability (1/4 dB)" }, |
6324 | | { DOCSIS_CM_CAP_Opt802MPLSSup, "Optional 802.1ad, 802.1ah, MPLS Classification Support" }, |
6325 | | { DOCSIS_CM_CAP_DounEnc, "D-ONU Capabilities Encoding" }, |
6326 | | { DOCSIS_CM_CAP_EnrgMang, "Energy Management Capabilities" }, |
6327 | | { 0, NULL } |
6328 | | }; |
6329 | | |
6330 | | static const value_string docsis_cm_cap_supported_vals[] = { |
6331 | | { 0x00, "Not Support" }, |
6332 | | { 0x01, "Supported" }, |
6333 | | { 0, NULL } |
6334 | | }; |
6335 | | |
6336 | | static const value_string docsis_cm_cap_version_vals[] = { |
6337 | | { 0x00, "DOCSIS 1.0" }, |
6338 | | { 0x01, "DOCSIS 1.1" }, |
6339 | | { 0x02, "DOCSIS 2.0" }, |
6340 | | { 0x03, "DOCSIS 3.0" }, |
6341 | | { 0, NULL } |
6342 | | }; |
6343 | | |
6344 | | static const value_string docsis_cm_cap_privacy_vals[] = { |
6345 | | { 0x00, "BPI Support" }, |
6346 | | { 0x01, "BPI Plus Support" }, |
6347 | | { 0, NULL } |
6348 | | }; |
6349 | | |
6350 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_cm; |
6351 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_eps; |
6352 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_emta; |
6353 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_dsg; |
6354 | | |
6355 | | static const value_string docsis_cm_cap_l2vpn_vals[] = { |
6356 | | { 0x00, "CM not compliant with DOCSIS L2VPN Section 7 (default)" }, |
6357 | | { 0x01, "CM compliant with DOCSIS L2VPN Section 7" }, |
6358 | | { 0, NULL } |
6359 | | }; |
6360 | | |
6361 | | static const value_string docsis_cm_cap_filt_vals[] = { |
6362 | | { 0x00, "802.1P Filtering" }, |
6363 | | { 0x01, "802.1Q Filtering" }, |
6364 | | { 0, NULL } |
6365 | | }; |
6366 | | |
6367 | | static int hf_dhcp_docsis_cm_cap_mpls_stpid; |
6368 | | static int hf_dhcp_docsis_cm_cap_mpls_svid; |
6369 | | static int hf_dhcp_docsis_cm_cap_mpls_spcp; |
6370 | | static int hf_dhcp_docsis_cm_cap_mpls_sdei; |
6371 | | static int hf_dhcp_docsis_cm_cap_mpls_ctpid; |
6372 | | static int hf_dhcp_docsis_cm_cap_mpls_cvid; |
6373 | | static int hf_dhcp_docsis_cm_cap_mpls_cpcp; |
6374 | | static int hf_dhcp_docsis_cm_cap_mpls_ccfi; |
6375 | | static int hf_dhcp_docsis_cm_cap_mpls_stci; |
6376 | | static int hf_dhcp_docsis_cm_cap_mpls_ctci; |
6377 | | static int hf_dhcp_docsis_cm_cap_mpls_itpid; |
6378 | | static int hf_dhcp_docsis_cm_cap_mpls_isid; |
6379 | | static int hf_dhcp_docsis_cm_cap_mpls_itci; |
6380 | | static int hf_dhcp_docsis_cm_cap_mpls_ipcp; |
6381 | | static int hf_dhcp_docsis_cm_cap_mpls_idei; |
6382 | | static int hf_dhcp_docsis_cm_cap_mpls_iuca; |
6383 | | static int hf_dhcp_docsis_cm_cap_mpls_btpid; |
6384 | | static int hf_dhcp_docsis_cm_cap_mpls_btci; |
6385 | | static int hf_dhcp_docsis_cm_cap_mpls_bpcp; |
6386 | | static int hf_dhcp_docsis_cm_cap_mpls_bdei; |
6387 | | static int hf_dhcp_docsis_cm_cap_mpls_bvid; |
6388 | | static int hf_dhcp_docsis_cm_cap_mpls_bda; |
6389 | | static int hf_dhcp_docsis_cm_cap_mpls_bsa; |
6390 | | static int hf_dhcp_docsis_cm_cap_mpls_tc; |
6391 | | static int hf_dhcp_docsis_cm_cap_mpls_label; |
6392 | | |
6393 | | static const value_string docsis_cm_cap_enrgmang_vals[] = { |
6394 | | { 0x00, "Energy Management 1x1 Feature" }, |
6395 | | { 0, NULL } |
6396 | | }; |
6397 | | |
6398 | | static const value_string docsis_cm_cap_usfreqrng_vals[] = { |
6399 | | { 0x00, "Standard Upstream Frequency Range" }, |
6400 | | { 0x01, "Standard Upstream Frequency Range and Extended Upstream Frequency Range" }, |
6401 | | { 0, NULL } |
6402 | | }; |
6403 | | |
6404 | | static const value_string docsis_cm_cap_map_ucd_receipt_vals[] = { |
6405 | | { 0x00, "CM cannot support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" }, |
6406 | | { 0x01, "CM can support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" }, |
6407 | | { 0, NULL } |
6408 | | }; |
6409 | | |
6410 | | static const value_string docsis_cm_cap_map_dpv_support_vals[] = { |
6411 | | { 0x00, "U1 supported as a Start Reference Point for DPV per Path" }, |
6412 | | { 0x01, "U1 supported as a Start Reference Point for DPV per Packet" }, |
6413 | | { 0, NULL } |
6414 | | }; |
6415 | | |
6416 | | static const value_string docsis_cm_cap_map_multDsidForward_support_vals[] = { |
6417 | | { 0x00, "No support for multicast DSID forwarding" }, |
6418 | | { 0x01, "Support for GMAC explicit multicast DSID forwarding" }, |
6419 | | { 0x02, "Support for GMAC promiscuous multicast DSID forwarding" }, |
6420 | | { 0, NULL } |
6421 | | }; |
6422 | | |
6423 | | static const value_string docsis_cm_cap_map_fctfc_support_vals[] = { |
6424 | | { 0x00, "Isolation Packet PDU MAC Header (FC_Type of 10) is not forwarded" }, |
6425 | | { 0x01, "Isolation Packet PDU MAC Header (FC_Type of 10) is forwarded" }, |
6426 | | { 0, NULL } |
6427 | | }; |
6428 | | |
6429 | | static const value_string docsis_cm_cap_map_l2vpn_esafe_index_support_vals[] = { |
6430 | | { 0x01, "ePs or eRouter" }, |
6431 | | { 0x10, "eMTA" }, |
6432 | | { 0x11, "eSTB-IP" }, |
6433 | | { 0x12, "eSTB-DSG" }, |
6434 | | { 0x13, "eTEA" }, |
6435 | | { 0, NULL } |
6436 | | }; |
6437 | | |
6438 | | static int hf_dhcp_docsis_cm_cap_ussymrate_160; |
6439 | | static int hf_dhcp_docsis_cm_cap_ussymrate_320; |
6440 | | static int hf_dhcp_docsis_cm_cap_ussymrate_640; |
6441 | | static int hf_dhcp_docsis_cm_cap_ussymrate_1280; |
6442 | | static int hf_dhcp_docsis_cm_cap_ussymrate_2560; |
6443 | | static int hf_dhcp_docsis_cm_cap_ussymrate_5120; |
6444 | | |
6445 | | static void |
6446 | | display_uint_with_range_checking(proto_item *ti, uint8_t val_byte, uint16_t val_uint16, int min_value, int max_value) |
6447 | 5.92k | { |
6448 | 5.92k | uint16_t value; |
6449 | | |
6450 | 5.92k | if (0 != val_byte) |
6451 | 2.13k | { |
6452 | 2.13k | value = val_byte; |
6453 | 2.13k | } |
6454 | 3.78k | else |
6455 | 3.78k | { |
6456 | 3.78k | value = val_uint16; |
6457 | 3.78k | } |
6458 | 5.92k | proto_item_append_text(ti, "%i", value); |
6459 | 5.92k | if ((value < min_value) || |
6460 | 3.60k | (value > max_value)) |
6461 | 3.39k | { |
6462 | 3.39k | proto_item_append_text(ti, " (Value Out-of-Range [%i..%i])", min_value, max_value); |
6463 | 3.39k | } |
6464 | 5.92k | } |
6465 | | |
6466 | | static void get_opt125_tlv(wmem_allocator_t *scope, tvbuff_t *tvb, unsigned off, uint8_t *tlvtype, uint8_t *tlvlen, uint8_t **value) |
6467 | 15.3k | { |
6468 | | /* Type */ |
6469 | 15.3k | *tlvtype = tvb_get_uint8(tvb, off); |
6470 | | /* Length */ |
6471 | 15.3k | *tlvlen = tvb_get_uint8(tvb, off+1); |
6472 | | /* Value */ |
6473 | 15.3k | *value = (uint8_t *)tvb_memdup(scope, tvb, off + 2, *tlvlen); |
6474 | 15.3k | } |
6475 | | |
6476 | | static void get_opt60_tlv(wmem_allocator_t *scope, tvbuff_t *tvb, unsigned off, uint8_t *tlvtype, uint8_t *tlvlen, uint8_t **value) |
6477 | 2.11k | { |
6478 | 2.11k | unsigned i; |
6479 | 2.11k | uint8_t *val_asc; |
6480 | | |
6481 | 2.11k | val_asc = (uint8_t *)wmem_alloc0(scope, 4); |
6482 | | /* Type */ |
6483 | 2.11k | tvb_memcpy(tvb, val_asc, off, 2); |
6484 | 2.11k | *tlvtype = (uint8_t)strtoul((char*)val_asc, NULL, 16); |
6485 | | /* Length */ |
6486 | 2.11k | tvb_memcpy(tvb, val_asc, off + 2, 2); |
6487 | 2.11k | *tlvlen = (uint8_t)strtoul((char*)val_asc, NULL, 16); |
6488 | | /* Value */ |
6489 | 2.11k | *value = (uint8_t *)wmem_alloc0(scope, *tlvlen); |
6490 | 6.96k | for (i=0; i<*tlvlen; i++) |
6491 | 4.85k | { |
6492 | 4.85k | memset(val_asc, 0, 4); |
6493 | 4.85k | tvb_memcpy(tvb, val_asc, off + ((i*2) + 4), 2); |
6494 | 4.85k | (*value)[i] = (uint8_t)strtoul((char*)val_asc, NULL, 16); |
6495 | 4.85k | } |
6496 | 2.11k | } |
6497 | | |
6498 | | static void |
6499 | | dissect_docsis_cm_cap(packet_info *pinfo, proto_tree *v_tree, tvbuff_t *tvb, int voff, int len, bool opt125) |
6500 | 658 | { |
6501 | 658 | uint8_t *asc_val; |
6502 | 658 | proto_item *ti; |
6503 | 658 | proto_tree *subtree; |
6504 | 658 | uint8_t tlv_type; |
6505 | 658 | uint8_t tlv_len; |
6506 | 658 | uint8_t val_byte = 0; |
6507 | 658 | uint16_t val_uint16 = 0; |
6508 | 658 | uint8_t *val_other = NULL; |
6509 | 658 | unsigned off = voff; |
6510 | | |
6511 | 658 | asc_val = (uint8_t*)wmem_alloc0(pinfo->pool, 4); |
6512 | | |
6513 | 658 | if (opt125) |
6514 | 595 | { |
6515 | | /* Option 125 is formatted as uint8's */ |
6516 | | /* Type */ |
6517 | 595 | tlv_type = tvb_get_uint8(tvb, off); |
6518 | | /* Length */ |
6519 | 595 | tlv_len = tvb_get_uint8(tvb, off+1); |
6520 | 595 | proto_tree_add_uint(v_tree, hf_dhcp_docsis_cm_cap_len, tvb, off+1, 1, tlv_len); |
6521 | 595 | } |
6522 | 63 | else |
6523 | 63 | { |
6524 | | /* Option 60 is formatted as an ASCII string. |
6525 | | Since the capabilities are the same for both options |
6526 | | I am converting the Option 60 values from ASCII to |
6527 | | uint8s to allow the same parser to work for both */ |
6528 | 63 | off += DOCSIS_CM_CAP_TLV_OFF; |
6529 | 63 | tvb_memcpy (tvb, asc_val, off, 2); |
6530 | 63 | tlv_len = (uint8_t)strtoul((char*)asc_val, NULL, 16); |
6531 | 63 | proto_tree_add_uint(v_tree, hf_dhcp_docsis_cm_cap_len, tvb, off+2, 2, tlv_len); |
6532 | 63 | } |
6533 | | |
6534 | 658 | off+=2; |
6535 | | |
6536 | 17.9k | while (off - ((unsigned) voff) < ((unsigned) len)) |
6537 | 17.4k | { |
6538 | 17.4k | tlv_type = 0; |
6539 | 17.4k | tlv_len = 0; |
6540 | 17.4k | val_byte = 0; |
6541 | 17.4k | val_uint16 = 0; |
6542 | | |
6543 | 17.4k | if (opt125) |
6544 | 15.3k | { |
6545 | 15.3k | get_opt125_tlv(pinfo->pool, tvb, off, &tlv_type, &tlv_len, &val_other); |
6546 | 15.3k | ti = proto_tree_add_uint_format(v_tree, hf_dhcp_docsis_cm_cap_type, tvb, off, |
6547 | 15.3k | tlv_len + 2, |
6548 | 15.3k | tlv_type, |
6549 | 15.3k | "0x%02x: %s = ", |
6550 | 15.3k | tlv_type, |
6551 | 15.3k | val_to_str_const(tlv_type, docsis_cm_cap_type_vals, "unknown")); |
6552 | 15.3k | } |
6553 | 2.11k | else |
6554 | 2.11k | { |
6555 | | /* Option 60 is formatted as an ASCII string. Since the capabilities |
6556 | | are the same for both options I am converting the Option 60 values |
6557 | | from ASCII to uint8s to allow the same parser to work for both */ |
6558 | 2.11k | get_opt60_tlv(pinfo->pool, tvb, off, &tlv_type, &tlv_len, &val_other); |
6559 | 2.11k | ti = proto_tree_add_uint_format(v_tree, hf_dhcp_docsis_cm_cap_type, tvb, off, |
6560 | 2.11k | (tlv_len * 2) + 4, |
6561 | 2.11k | tlv_type, |
6562 | 2.11k | "0x%02x: %s = ", |
6563 | 2.11k | tlv_type, |
6564 | 2.11k | val_to_str_const(tlv_type, docsis_cm_cap_type_vals, "unknown")); |
6565 | 2.11k | } |
6566 | | |
6567 | 17.4k | if (tlv_len == 1) |
6568 | 4.46k | { |
6569 | | /* The value refers to a byte. */ |
6570 | 4.46k | val_byte = val_other[0]; |
6571 | 4.46k | } |
6572 | 13.0k | else |
6573 | 13.0k | { |
6574 | 13.0k | if (tlv_len == 2) |
6575 | 1.33k | { |
6576 | | /* The value refers to a uint16. */ |
6577 | 1.33k | val_uint16 = (val_other[0] << 8) + val_other[1]; |
6578 | 1.33k | } |
6579 | 13.0k | } |
6580 | | |
6581 | 17.4k | switch (tlv_type) |
6582 | 17.4k | { |
6583 | 718 | case DOCSIS_CM_CAP_CONCAT_SUP: |
6584 | 1.08k | case DOCSIS_CM_CAP_FRAG_SUP: |
6585 | 1.38k | case DOCSIS_CM_CAP_PHS_SUP: |
6586 | 1.70k | case DOCSIS_CM_CAP_IGMP_SUP: |
6587 | 1.86k | case DOCSIS_CM_CAP_DCC_SUP: |
6588 | 2.06k | case DOCSIS_CM_CAP_EXPUNI_SPACE: |
6589 | 2.26k | case DOCSIS_CM_CAP_DUTFILT_SUP: |
6590 | 2.41k | case DOCSIS_CM_CAP_SACM2_SUP: |
6591 | 2.60k | case DOCSIS_CM_CAP_SACM2HOP_SUP: |
6592 | 2.70k | case DOCSIS_CM_CAP_IPV6_SUP: |
6593 | 2.70k | proto_item_append_text(ti, |
6594 | 2.70k | "%s", |
6595 | 2.70k | val_to_str_const(val_byte, docsis_cm_cap_supported_vals, "Reserved")); |
6596 | 2.70k | break; |
6597 | 409 | case DOCSIS_CM_CAP_DOCSIS_VER: |
6598 | 409 | proto_item_append_text(ti, |
6599 | 409 | "%s", |
6600 | 409 | val_to_str_const(val_byte, docsis_cm_cap_version_vals, "Reserved")); |
6601 | 409 | break; |
6602 | 272 | case DOCSIS_CM_CAP_PRIV_SUP: |
6603 | 272 | proto_item_append_text(ti, |
6604 | 272 | "%s", |
6605 | 272 | val_to_str_const(val_byte, docsis_cm_cap_privacy_vals, "Reserved")); |
6606 | 272 | break; |
6607 | 165 | case DOCSIS_CM_CAP_FILT_SUP: |
6608 | 165 | proto_item_append_text(ti, |
6609 | 165 | "%s", |
6610 | 165 | val_to_str_const(val_byte, docsis_cm_cap_filt_vals, "Reserved")); |
6611 | 165 | break; |
6612 | 150 | case DOCSIS_CM_CAP_L2VPN_SUP: |
6613 | 150 | proto_item_append_text(ti, |
6614 | 150 | "%s", |
6615 | 150 | val_to_str_const(val_byte, docsis_cm_cap_l2vpn_vals, "Reserved")); |
6616 | 150 | break; |
6617 | 141 | case DOCSIS_CM_CAP_L2VPN_HOST_SUP: |
6618 | 141 | if (tlv_len == 7) { |
6619 | 34 | proto_item_append_text(ti, |
6620 | 34 | "eSAFE ifIndex %s (%i)/eSAFE MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x", |
6621 | 34 | val_to_str_const(val_other[0], docsis_cm_cap_map_l2vpn_esafe_index_support_vals, "Reserved"), |
6622 | 34 | val_other[0], |
6623 | 34 | val_other[1], |
6624 | 34 | val_other[2], |
6625 | 34 | val_other[3], |
6626 | 34 | val_other[4], |
6627 | 34 | val_other[5], |
6628 | 34 | val_other[6]); |
6629 | 107 | } else { |
6630 | 107 | proto_item_append_text(ti, |
6631 | 107 | "Invalid (length should be 7, is %d)", |
6632 | 107 | tlv_len); |
6633 | 107 | } |
6634 | 141 | break; |
6635 | 179 | case DOCSIS_CM_CAP_USFREQRNG_SUP: |
6636 | 179 | proto_item_append_text(ti, |
6637 | 179 | "%s", |
6638 | 179 | val_to_str_const(val_byte, docsis_cm_cap_usfreqrng_vals, "Reserved")); |
6639 | 179 | break; |
6640 | 308 | case DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP: |
6641 | 308 | proto_item_append_text(ti, |
6642 | 308 | "%s", |
6643 | 308 | val_to_str_const(val_byte, docsis_cm_cap_map_ucd_receipt_vals, "Reserved")); |
6644 | 308 | break; |
6645 | 202 | case DOCSIS_CM_CAP_DPV_SUP: |
6646 | 202 | proto_item_append_text(ti, |
6647 | 202 | "%s", |
6648 | 202 | val_to_str_const(val_byte, docsis_cm_cap_map_dpv_support_vals, "Reserved")); |
6649 | 202 | break; |
6650 | 248 | case DOCSIS_CM_CAP_DSAID_SUP: |
6651 | 429 | case DOCSIS_CM_CAP_MULTTXCHAN_SUP: |
6652 | 608 | case DOCSIS_CM_CAP_512USTXCHAN_SUP: |
6653 | 793 | case DOCSIS_CM_CAP_256USTXCHAN_SUP: |
6654 | 1.03k | case DOCSIS_CM_CAP_TOTALSIDCLU_SUP: |
6655 | 1.22k | case DOCSIS_CM_CAP_MULTRXCHAN_SUP: |
6656 | 1.41k | case DOCSIS_CM_CAP_UGSPERUSFLOW_SUP: |
6657 | 1.68k | case DOCSIS_CM_CAP_USSF_SUP: |
6658 | 1.68k | display_uint_with_range_checking(ti, val_byte, val_uint16, 0, 255); |
6659 | 1.68k | break; |
6660 | 222 | case DOCSIS_CM_CAP_RESEQDSID_SUP: |
6661 | 788 | case DOCSIS_CM_CAP_MULTDSID_SUP: |
6662 | 788 | display_uint_with_range_checking(ti, val_byte, val_uint16, 16, 255); |
6663 | 788 | break; |
6664 | 634 | case DOCSIS_CM_CAP_SIDCLUPERSF_SUP: |
6665 | 634 | display_uint_with_range_checking(ti, val_byte, val_uint16, 2, 8); |
6666 | 634 | break; |
6667 | 914 | case DOCSIS_CM_CAP_TOTALDSID_SUP: |
6668 | 914 | display_uint_with_range_checking(ti, val_byte, val_uint16, 32, 255); |
6669 | 914 | break; |
6670 | 476 | case DOCSIS_CM_CAP_TET: |
6671 | 476 | display_uint_with_range_checking(ti, val_byte, val_uint16, 8, 64); |
6672 | 476 | break; |
6673 | 762 | case DOCSIS_CM_CAP_TET_MI: |
6674 | 762 | if ((val_byte == 1) || |
6675 | 633 | (val_byte == 2) || |
6676 | 532 | (val_byte == 4)) |
6677 | 401 | { |
6678 | 401 | proto_item_append_text(ti, |
6679 | 401 | " %i", |
6680 | 401 | val_byte); |
6681 | 401 | } |
6682 | 361 | else |
6683 | 361 | { |
6684 | 361 | proto_item_append_text(ti, |
6685 | 361 | " (Invalid Value %i : Should be [1,2,4]", |
6686 | 361 | val_byte); |
6687 | 361 | } |
6688 | 762 | break; |
6689 | 265 | case DOCSIS_CM_CAP_IPFILT_SUP: |
6690 | 483 | case DOCSIS_CM_CAP_USDROPCLASSIF_SUP: |
6691 | 483 | display_uint_with_range_checking(ti, val_byte, val_uint16, 64, 65535); |
6692 | 483 | break; |
6693 | 574 | case DOCSIS_CM_CAP_LLCFILT_SUP: |
6694 | 574 | display_uint_with_range_checking(ti, val_byte, val_uint16, 10, 65535); |
6695 | 574 | break; |
6696 | 560 | case DOCSIS_CM_CAP_ExUsTrPow: |
6697 | 560 | if (val_byte == 0) |
6698 | 188 | { |
6699 | 188 | proto_item_append_text(ti, "%i", val_byte); |
6700 | 188 | } |
6701 | 372 | else |
6702 | 372 | { |
6703 | 372 | display_uint_with_range_checking(ti, val_byte, val_uint16, 205, 244); |
6704 | 372 | } |
6705 | 560 | break; |
6706 | 335 | case DOCSIS_CM_CAP_Opt802MPLSSup: |
6707 | 335 | proto_item_append_text(ti, |
6708 | 335 | "0x%02x", val_byte); |
6709 | 348 | case DOCSIS_CM_CAP_DounEnc: |
6710 | | /* TODO: add D-ONU Capabilities Encoding according DPoE-SP-MULPIv1.0-I02-120607 */ |
6711 | 348 | break; |
6712 | 162 | case DOCSIS_CM_CAP_EnrgMang: |
6713 | 162 | proto_item_append_text(ti, |
6714 | 162 | "%s", |
6715 | 162 | val_to_str_const(val_byte, docsis_cm_cap_enrgmang_vals, "Reserved")); |
6716 | 162 | break; |
6717 | 364 | case DOCSIS_CM_CAP_RNGHLDOFF_SUP: |
6718 | 364 | proto_item_append_text(ti, |
6719 | 364 | "Ranging ID "); |
6720 | 364 | if (tlv_len == 4) |
6721 | 108 | { |
6722 | 108 | proto_item_append_text(ti, |
6723 | 108 | "(0x%04x)", (val_other[0] << sizeof(uint8_t)) + val_other[1]); |
6724 | 108 | proto_item_append_text(ti, |
6725 | 108 | " Component Bit Mask "); |
6726 | 108 | proto_item_append_text(ti, |
6727 | 108 | "(0x%04x)", (val_other[2] << sizeof(uint8_t)) + val_other[3]); |
6728 | 108 | } |
6729 | 256 | else |
6730 | 256 | { |
6731 | 256 | proto_item_append_text(ti, |
6732 | 256 | " (Invalid Length %u : Should be 4", |
6733 | 256 | tlv_len); |
6734 | 256 | } |
6735 | 364 | break; |
6736 | 263 | case DOCSIS_CM_CAP_USSYMRATE_SUP: |
6737 | 263 | proto_item_append_text(ti, |
6738 | 263 | "0x%02x", val_byte); |
6739 | 263 | break; |
6740 | 137 | case DOCSIS_CM_CAP_FCTF_SUP: |
6741 | 137 | proto_item_append_text(ti, |
6742 | 137 | "%s", |
6743 | 137 | val_to_str_const(val_byte, docsis_cm_cap_map_fctfc_support_vals, "Reserved")); |
6744 | 137 | break; |
6745 | 140 | case DOCSIS_CM_CAP_MULTDSIDFW_SUP: |
6746 | 140 | proto_item_append_text(ti, |
6747 | 140 | "%s", |
6748 | 140 | val_to_str_const(val_byte, docsis_cm_cap_map_multDsidForward_support_vals, "Reserved")); |
6749 | 140 | break; |
6750 | 17.4k | } |
6751 | | |
6752 | 17.3k | subtree = proto_item_add_subtree(ti, ett_dhcp_option); |
6753 | 17.3k | if (tlv_type == DOCSIS_CM_CAP_RNGHLDOFF_SUP && tlv_len >= 4) |
6754 | 142 | { |
6755 | 142 | static int * const flags[] = { |
6756 | 142 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_cm, |
6757 | 142 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_eps, |
6758 | 142 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_emta, |
6759 | 142 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_dsg, |
6760 | 142 | NULL |
6761 | 142 | }; |
6762 | 142 | val_uint16 = (val_other[2] << sizeof(uint8_t)) + val_other[3]; |
6763 | | |
6764 | 142 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 4, flags, val_uint16); |
6765 | 142 | } |
6766 | 17.3k | if (tlv_type == DOCSIS_CM_CAP_USSYMRATE_SUP) |
6767 | 263 | { |
6768 | 263 | static int * const flags[] = { |
6769 | 263 | &hf_dhcp_docsis_cm_cap_ussymrate_160, |
6770 | 263 | &hf_dhcp_docsis_cm_cap_ussymrate_320, |
6771 | 263 | &hf_dhcp_docsis_cm_cap_ussymrate_640, |
6772 | 263 | &hf_dhcp_docsis_cm_cap_ussymrate_1280, |
6773 | 263 | &hf_dhcp_docsis_cm_cap_ussymrate_2560, |
6774 | 263 | &hf_dhcp_docsis_cm_cap_ussymrate_5120, |
6775 | 263 | NULL |
6776 | 263 | }; |
6777 | | |
6778 | 263 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 1, flags, val_byte); |
6779 | 263 | } |
6780 | 17.3k | if (tlv_type == DOCSIS_CM_CAP_Opt802MPLSSup && tlv_len >= 4) |
6781 | 108 | { |
6782 | 108 | static int * const flags[] = { |
6783 | 108 | &hf_dhcp_docsis_cm_cap_mpls_stpid, |
6784 | 108 | &hf_dhcp_docsis_cm_cap_mpls_svid, |
6785 | 108 | &hf_dhcp_docsis_cm_cap_mpls_spcp, |
6786 | 108 | &hf_dhcp_docsis_cm_cap_mpls_sdei, |
6787 | 108 | &hf_dhcp_docsis_cm_cap_mpls_ctpid, |
6788 | 108 | &hf_dhcp_docsis_cm_cap_mpls_cvid, |
6789 | 108 | &hf_dhcp_docsis_cm_cap_mpls_cpcp, |
6790 | 108 | &hf_dhcp_docsis_cm_cap_mpls_ccfi, |
6791 | 108 | &hf_dhcp_docsis_cm_cap_mpls_stci, |
6792 | 108 | &hf_dhcp_docsis_cm_cap_mpls_ctci, |
6793 | 108 | &hf_dhcp_docsis_cm_cap_mpls_itpid, |
6794 | 108 | &hf_dhcp_docsis_cm_cap_mpls_isid, |
6795 | 108 | &hf_dhcp_docsis_cm_cap_mpls_itci, |
6796 | 108 | &hf_dhcp_docsis_cm_cap_mpls_ipcp, |
6797 | 108 | &hf_dhcp_docsis_cm_cap_mpls_idei, |
6798 | 108 | &hf_dhcp_docsis_cm_cap_mpls_iuca, |
6799 | 108 | &hf_dhcp_docsis_cm_cap_mpls_btpid, |
6800 | 108 | &hf_dhcp_docsis_cm_cap_mpls_btci, |
6801 | 108 | &hf_dhcp_docsis_cm_cap_mpls_bpcp, |
6802 | 108 | &hf_dhcp_docsis_cm_cap_mpls_bdei, |
6803 | 108 | &hf_dhcp_docsis_cm_cap_mpls_bvid, |
6804 | 108 | &hf_dhcp_docsis_cm_cap_mpls_bda, |
6805 | 108 | &hf_dhcp_docsis_cm_cap_mpls_bsa, |
6806 | 108 | &hf_dhcp_docsis_cm_cap_mpls_tc, |
6807 | 108 | &hf_dhcp_docsis_cm_cap_mpls_label, |
6808 | 108 | NULL |
6809 | 108 | }; |
6810 | 108 | val_uint16 = (val_other[2] << sizeof(uint8_t)) + val_other[3]; |
6811 | | |
6812 | 108 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 4, flags, val_uint16); |
6813 | 108 | } |
6814 | 17.3k | if (opt125) |
6815 | 15.2k | { |
6816 | 15.2k | off += (tlv_len) + 2; |
6817 | 15.2k | } |
6818 | 2.06k | else |
6819 | 2.06k | { |
6820 | 2.06k | off += (tlv_len *2) + 4; |
6821 | 2.06k | } |
6822 | | |
6823 | 17.3k | } |
6824 | 658 | } |
6825 | | |
6826 | | static bool |
6827 | | dissect_packetcable_cm_vendor_id_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ ) |
6828 | 1.19k | { |
6829 | 1.19k | uint8_t* vendor_id; |
6830 | | |
6831 | 1.19k | if (tvb_reported_length(tvb) < 10) { |
6832 | 62 | return false; |
6833 | 62 | } |
6834 | | |
6835 | 1.13k | vendor_id = tvb_get_string_enc(pinfo->pool, tvb, 0, 10, ENC_ASCII|ENC_NA); |
6836 | 1.13k | if ((strcmp((const char*)vendor_id, PACKETCABLE_CM_CAP11) == 0) || |
6837 | 1.12k | (strcmp((const char*)vendor_id, PACKETCABLE_CM_CAP20) == 0)) { |
6838 | 63 | dissect_docsis_cm_cap(pinfo, tree, tvb, 0, tvb_reported_length(tvb), false); |
6839 | 63 | return true; |
6840 | 63 | } |
6841 | | |
6842 | 1.07k | if ((strcmp((const char*)vendor_id, PACKETCABLE_CM_CAP30) == 0)) { |
6843 | 3 | proto_tree_add_item(tree, hf_dhcp_option_vendor_class_data, tvb, 0, tvb_reported_length(tvb), ENC_ASCII); |
6844 | 3 | return true; |
6845 | 3 | } |
6846 | | |
6847 | 1.06k | return false; |
6848 | 1.07k | } |
6849 | | |
6850 | | static bool |
6851 | | dissect_apple_bsdp_vendor_id_heur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) |
6852 | | |
6853 | 1.27k | { |
6854 | 1.27k | int vendor_id_len = (int)strlen(APPLE_BSDP_CLIENT); |
6855 | 1.27k | if ((int)tvb_reported_length(tvb) < vendor_id_len) { |
6856 | 62 | return false; |
6857 | 62 | } |
6858 | | |
6859 | 1.20k | if (tvb_memeql(tvb, 0, (const uint8_t*)APPLE_BSDP_CLIENT, vendor_id_len) == 0) { |
6860 | 66 | proto_tree_add_item(tree, hf_dhcp_option_vendor_class_data, tvb, vendor_id_len, tvb_reported_length_remaining(tvb, vendor_id_len), ENC_ASCII); |
6861 | 66 | return true; |
6862 | 66 | } |
6863 | | |
6864 | 1.14k | return false; |
6865 | 1.20k | } |
6866 | | |
6867 | | |
6868 | | /* Definitions specific to PKT-SP-PROV-I05-021127 begin with "PKT_CCC_I05". |
6869 | | Definitions specific to IETF draft 5 and RFC 3495 begin with "PKT_CCC_IETF". |
6870 | | Shared definitions begin with "PKT_CCC". |
6871 | | */ |
6872 | 468 | #define PKT_CCC_PRI_DHCP 1 |
6873 | 832 | #define PKT_CCC_SEC_DHCP 2 |
6874 | 0 | #define PKT_CCC_I05_SNMP 3 |
6875 | 695 | #define PKT_CCC_IETF_PROV_SRV 3 |
6876 | 0 | #define PKT_CCC_I05_PRI_DNS 4 |
6877 | 281 | #define PKT_CCC_IETF_AS_KRB 4 |
6878 | 0 | #define PKT_CCC_I05_SEC_DNS 5 |
6879 | 354 | #define PKT_CCC_IETF_AP_KRB 5 |
6880 | 212 | #define PKT_CCC_KRB_REALM 6 |
6881 | 316 | #define PKT_CCC_TGT_FLAG 7 |
6882 | 310 | #define PKT_CCC_PROV_TIMER 8 |
6883 | 0 | #define PKT_CCC_CMS_FQDN 9 |
6884 | 227 | #define PKT_CCC_IETF_SEC_TKT 9 |
6885 | 0 | #define PKT_CCC_AS_KRB 10 |
6886 | 0 | #define PKT_CCC_AP_KRB 11 |
6887 | 0 | #define PKT_CCC_MTA_KRB_CLEAR 12 |
6888 | | |
6889 | | static const value_string pkt_i05_ccc_opt_vals[] = { |
6890 | | { PKT_CCC_PRI_DHCP, "Primary DHCP Server" }, |
6891 | | { PKT_CCC_SEC_DHCP, "Secondary DHCP Server" }, |
6892 | | { PKT_CCC_I05_SNMP, "SNMP Entity" }, |
6893 | | { PKT_CCC_I05_PRI_DNS, "Primary DNS Server" }, |
6894 | | { PKT_CCC_I05_SEC_DNS, "Secondary DNS Server" }, |
6895 | | { PKT_CCC_KRB_REALM, "Kerberos Realm" }, |
6896 | | { PKT_CCC_TGT_FLAG, "MTA should fetch TGT?" }, |
6897 | | { PKT_CCC_PROV_TIMER, "Provisioning Timer" }, |
6898 | | { PKT_CCC_CMS_FQDN, "CMS FQDN" }, |
6899 | | { PKT_CCC_AS_KRB, "AS-REQ/AS-REP Backoff and Retry" }, |
6900 | | { PKT_CCC_AP_KRB, "AP-REQ/AP-REP Backoff and Retry" }, |
6901 | | { PKT_CCC_MTA_KRB_CLEAR, "MTA should clear Kerberos tickets?" }, |
6902 | | { 0, NULL }, |
6903 | | }; |
6904 | | |
6905 | | static const value_string pkt_draft5_ccc_opt_vals[] = { |
6906 | | { PKT_CCC_PRI_DHCP, "TSP's Primary DHCP Server" }, |
6907 | | { PKT_CCC_SEC_DHCP, "TSP's Secondary DHCP Server" }, |
6908 | | { PKT_CCC_IETF_PROV_SRV, "TSP's Provisioning Server" }, |
6909 | | { PKT_CCC_IETF_AS_KRB, "TSP's AS-REQ/AS-REP Backoff and Retry" }, |
6910 | | { PKT_CCC_IETF_AP_KRB, "TSP's AP-REQ/AP-REP Backoff and Retry" }, |
6911 | | { PKT_CCC_KRB_REALM, "TSP's Kerberos Realm Name" }, |
6912 | | { PKT_CCC_TGT_FLAG, "TSP's Ticket Granting Server Utilization" }, |
6913 | | { PKT_CCC_PROV_TIMER, "TSP's Provisioning Timer Value" }, |
6914 | | { PKT_CCC_IETF_SEC_TKT, "PacketCable Security Ticket Control" }, |
6915 | | { 0, NULL }, |
6916 | | }; |
6917 | | |
6918 | | static const value_string pkt_i05_ccc_ticket_ctl_vals[] = { |
6919 | | { 1, "Invalidate Provisioning Application Server's ticket" }, |
6920 | | { 2, "Invalidate all CMS Application Server tickets" }, |
6921 | | { 3, "Invalidate all Application Server tickets" }, |
6922 | | { 0, NULL }, |
6923 | | }; |
6924 | | |
6925 | | static int |
6926 | | dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
6927 | | tvbuff_t *tvb, int optoff, int optend) |
6928 | 0 | { |
6929 | 0 | int suboptoff = optoff; |
6930 | 0 | uint8_t subopt, subopt_len, fetch_tgt, timer_val, ticket_ctl; |
6931 | 0 | proto_tree *pkt_s_tree; |
6932 | 0 | proto_item *vti; |
6933 | |
|
6934 | 0 | subopt = tvb_get_uint8(tvb, optoff); |
6935 | 0 | suboptoff++; |
6936 | |
|
6937 | 0 | if (suboptoff >= optend) { |
6938 | 0 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
6939 | 0 | "Suboption %d: no room left in option for suboption length", subopt); |
6940 | 0 | return (optend); |
6941 | 0 | } |
6942 | | |
6943 | 0 | subopt_len = tvb_get_uint8(tvb, optoff); |
6944 | 0 | suboptoff++; |
6945 | |
|
6946 | 0 | vti = proto_tree_add_uint(v_tree, hf_dhcp_pc_i05_ccc_suboption, tvb, optoff, 1, subopt); |
6947 | 0 | proto_item_set_len(vti, subopt_len + 2); |
6948 | 0 | proto_item_append_text(vti, ": "); |
6949 | |
|
6950 | 0 | switch (subopt) { |
6951 | | |
6952 | 0 | case PKT_CCC_PRI_DHCP: /* String values */ |
6953 | 0 | case PKT_CCC_SEC_DHCP: |
6954 | 0 | case PKT_CCC_I05_SNMP: |
6955 | 0 | case PKT_CCC_I05_PRI_DNS: |
6956 | 0 | case PKT_CCC_I05_SEC_DNS: |
6957 | 0 | case PKT_CCC_KRB_REALM: |
6958 | 0 | case PKT_CCC_CMS_FQDN: |
6959 | 0 | proto_item_append_text(vti, "%s (%u byte%s)", |
6960 | 0 | tvb_format_stringzpad(pinfo->pool, tvb, suboptoff, subopt_len), |
6961 | 0 | subopt_len, |
6962 | 0 | plurality(subopt_len, "", "s") ); |
6963 | 0 | suboptoff += subopt_len; |
6964 | 0 | break; |
6965 | | |
6966 | 0 | case PKT_CCC_TGT_FLAG: |
6967 | 0 | if (suboptoff+1 > optend) { |
6968 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
6969 | 0 | return (optend); |
6970 | 0 | } |
6971 | 0 | fetch_tgt = tvb_get_uint8(tvb, suboptoff); |
6972 | 0 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
6973 | 0 | fetch_tgt ? "Yes" : "No", |
6974 | 0 | subopt_len, |
6975 | 0 | plurality(subopt_len, "", "s"), |
6976 | 0 | subopt_len != 1 ? " [Invalid]" : ""); |
6977 | 0 | suboptoff += subopt_len; |
6978 | 0 | break; |
6979 | | |
6980 | 0 | case PKT_CCC_PROV_TIMER: |
6981 | 0 | if (suboptoff+1 > optend) { |
6982 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
6983 | 0 | return (optend); |
6984 | 0 | } |
6985 | 0 | timer_val = tvb_get_uint8(tvb, suboptoff); |
6986 | 0 | proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val, |
6987 | 0 | timer_val > 30 ? " [Invalid]" : "", |
6988 | 0 | subopt_len, |
6989 | 0 | plurality(subopt_len, "", "s"), |
6990 | 0 | subopt_len != 1 ? " [Invalid]" : ""); |
6991 | 0 | suboptoff += subopt_len; |
6992 | 0 | break; |
6993 | | |
6994 | 0 | case PKT_CCC_AS_KRB: |
6995 | 0 | if (suboptoff+12 > optend) { |
6996 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
6997 | 0 | return (optend); |
6998 | 0 | } |
6999 | 0 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7000 | 0 | plurality(subopt_len, "", "s"), |
7001 | 0 | subopt_len != 12 ? " [Invalid]" : ""); |
7002 | 0 | if (subopt_len == 12) { |
7003 | 0 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7004 | 0 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
7005 | 0 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_timeout, tvb, suboptoff + 4, 4, ENC_BIG_ENDIAN); |
7006 | 0 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN); |
7007 | 0 | } |
7008 | 0 | suboptoff += subopt_len; |
7009 | 0 | break; |
7010 | | |
7011 | 0 | case PKT_CCC_AP_KRB: |
7012 | 0 | if (suboptoff+12 > optend) { |
7013 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7014 | 0 | return (optend); |
7015 | 0 | } |
7016 | 0 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7017 | 0 | plurality(subopt_len, "", "s"), |
7018 | 0 | subopt_len != 12 ? " [Invalid]" : ""); |
7019 | 0 | if (subopt_len == 12) { |
7020 | 0 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7021 | 0 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN); |
7022 | 0 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_timeout, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN); |
7023 | 0 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN); |
7024 | 0 | } |
7025 | 0 | suboptoff += subopt_len; |
7026 | 0 | break; |
7027 | | |
7028 | 0 | case PKT_CCC_MTA_KRB_CLEAR: |
7029 | 0 | if (suboptoff+1 > optend) { |
7030 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7031 | 0 | return (optend); |
7032 | 0 | } |
7033 | 0 | ticket_ctl = tvb_get_uint8(tvb, suboptoff); |
7034 | 0 | proto_item_append_text(vti, "%s (%u) (%u byte%s%s)", |
7035 | 0 | val_to_str_const (ticket_ctl, pkt_i05_ccc_ticket_ctl_vals, "unknown/invalid"), |
7036 | 0 | ticket_ctl, |
7037 | 0 | subopt_len, |
7038 | 0 | plurality(subopt_len, "", "s"), |
7039 | 0 | subopt_len != 1 ? " [Invalid]" : ""); |
7040 | 0 | suboptoff += subopt_len; |
7041 | 0 | break; |
7042 | | |
7043 | 0 | default: |
7044 | 0 | suboptoff += subopt_len; |
7045 | 0 | break; |
7046 | |
|
7047 | 0 | } |
7048 | 0 | return suboptoff; |
7049 | 0 | } |
7050 | | |
7051 | | static int hf_dhcp_ccc_ietf_sec_tkt_pc_provision_server; |
7052 | | static int hf_dhcp_ccc_ietf_sec_tkt_all_pc_call_management; |
7053 | | |
7054 | | static int |
7055 | | dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
7056 | | tvbuff_t *tvb, int optoff, int optend, int revision) |
7057 | 5.50k | { |
7058 | 5.50k | int suboptoff = optoff; |
7059 | 5.50k | uint8_t subopt, subopt_len; |
7060 | 5.50k | uint8_t prov_type, fetch_tgt, timer_val; |
7061 | 5.50k | uint16_t sec_tcm; |
7062 | 5.50k | proto_tree *pkt_s_tree; |
7063 | 5.50k | proto_item *vti; |
7064 | 5.50k | int max_timer_val = 255; |
7065 | 5.50k | const char *dns_name; |
7066 | 5.50k | int dns_name_len; |
7067 | | |
7068 | 5.50k | subopt = tvb_get_uint8(tvb, suboptoff); |
7069 | 5.50k | suboptoff++; |
7070 | | |
7071 | 5.50k | if (suboptoff >= optend) { |
7072 | 15 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
7073 | 15 | "Suboption %d: no room left in option for suboption length", subopt); |
7074 | 15 | return (optend); |
7075 | 15 | } |
7076 | 5.49k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
7077 | 5.49k | suboptoff++; |
7078 | | |
7079 | 5.49k | vti = proto_tree_add_uint(v_tree, hf_dhcp_pc_ietf_ccc_suboption, tvb, optoff, 1, subopt); |
7080 | 5.49k | proto_item_set_len(vti, subopt_len + 2); |
7081 | 5.49k | proto_item_append_text(vti, ": "); |
7082 | | |
7083 | 5.49k | switch (subopt) { |
7084 | | |
7085 | 468 | case PKT_CCC_PRI_DHCP: /* IPv4 values */ |
7086 | 832 | case PKT_CCC_SEC_DHCP: |
7087 | 832 | if (suboptoff+4 > optend) { |
7088 | 10 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7089 | 10 | return (optend); |
7090 | 10 | } |
7091 | 822 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
7092 | 822 | tvb_ip_to_str(pinfo->pool, tvb, suboptoff), |
7093 | 822 | subopt_len, |
7094 | 822 | plurality(subopt_len, "", "s"), |
7095 | 822 | subopt_len != 4 ? " [Invalid]" : ""); |
7096 | 822 | suboptoff += subopt_len; |
7097 | 822 | break; |
7098 | | |
7099 | 695 | case PKT_CCC_IETF_PROV_SRV: |
7100 | 695 | if (suboptoff+1 > optend) { |
7101 | 2 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7102 | 2 | return (optend); |
7103 | 2 | } |
7104 | 693 | prov_type = tvb_get_uint8(tvb, suboptoff); |
7105 | 693 | suboptoff += 1; |
7106 | 693 | switch (prov_type) { |
7107 | | |
7108 | 131 | case 0: |
7109 | 131 | get_dns_name(pinfo->pool, tvb, suboptoff, subopt_len, suboptoff, (const char **)&dns_name, &dns_name_len); |
7110 | 131 | proto_item_append_text(vti, "%s (%u byte%s)", format_text(pinfo->pool, dns_name, dns_name_len), |
7111 | 131 | subopt_len - 1, plurality(subopt_len, "", "s") ); |
7112 | 131 | break; |
7113 | | |
7114 | 131 | case 1: |
7115 | 131 | if (suboptoff+4 > optend) { |
7116 | 6 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7117 | 6 | return (optend); |
7118 | 6 | } |
7119 | 125 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
7120 | 125 | tvb_ip_to_str(pinfo->pool, tvb, suboptoff), |
7121 | 125 | subopt_len, |
7122 | 125 | plurality(subopt_len, "", "s"), |
7123 | 125 | subopt_len != 5 ? " [Invalid]" : ""); |
7124 | 125 | break; |
7125 | | |
7126 | 431 | default: |
7127 | 431 | proto_item_append_text(vti, "Invalid type: %u (%u byte%s)", |
7128 | 431 | prov_type, |
7129 | 431 | subopt_len, |
7130 | 431 | plurality(subopt_len, "", "s") ); |
7131 | 431 | break; |
7132 | 693 | } |
7133 | 681 | suboptoff += subopt_len - 1; |
7134 | 681 | break; |
7135 | | |
7136 | 281 | case PKT_CCC_IETF_AS_KRB: |
7137 | 281 | if (suboptoff+12 > optend) { |
7138 | 8 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7139 | 8 | return (optend); |
7140 | 8 | } |
7141 | 273 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7142 | 273 | plurality(subopt_len, "", "s"), |
7143 | 273 | subopt_len != 12 ? " [Invalid]" : ""); |
7144 | 273 | if (subopt_len == 12) { |
7145 | 48 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7146 | 48 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
7147 | 48 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_timeout, tvb, suboptoff + 4, 4, ENC_BIG_ENDIAN); |
7148 | 48 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN); |
7149 | 48 | } |
7150 | 273 | suboptoff += subopt_len; |
7151 | 273 | break; |
7152 | | |
7153 | 354 | case PKT_CCC_IETF_AP_KRB: |
7154 | 354 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7155 | 354 | plurality(subopt_len, "", "s"), |
7156 | 354 | subopt_len != 12 ? " [Invalid]" : ""); |
7157 | 354 | if (subopt_len == 12) { |
7158 | 36 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7159 | 36 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
7160 | 36 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_timeout, tvb, suboptoff + 4, 4, ENC_BIG_ENDIAN); |
7161 | 36 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_retries, tvb, suboptoff + 8, 4, ENC_BIG_ENDIAN); |
7162 | 36 | } |
7163 | 354 | suboptoff += subopt_len; |
7164 | 354 | break; |
7165 | | |
7166 | 212 | case PKT_CCC_KRB_REALM: /* String values */ |
7167 | 212 | get_dns_name(pinfo->pool, tvb, suboptoff, subopt_len, suboptoff, &dns_name, &dns_name_len); |
7168 | 212 | proto_item_append_text(vti, "%s (%u byte%s)", format_text(pinfo->pool, dns_name, dns_name_len), |
7169 | 212 | subopt_len, plurality(subopt_len, "", "s") ); |
7170 | 212 | suboptoff += subopt_len; |
7171 | 212 | break; |
7172 | | |
7173 | 316 | case PKT_CCC_TGT_FLAG: |
7174 | 316 | if (suboptoff+1 > optend) { |
7175 | 3 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7176 | 3 | return (optend); |
7177 | 3 | } |
7178 | 313 | fetch_tgt = tvb_get_uint8(tvb, suboptoff); |
7179 | 313 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
7180 | 313 | fetch_tgt ? "Yes" : "No", |
7181 | 313 | subopt_len, |
7182 | 313 | plurality(subopt_len, "", "s"), |
7183 | 313 | subopt_len != 1 ? " [Invalid]" : ""); |
7184 | 313 | suboptoff += 1; |
7185 | 313 | break; |
7186 | | |
7187 | 310 | case PKT_CCC_PROV_TIMER: |
7188 | 310 | if (suboptoff+1 > optend) { |
7189 | 3 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7190 | 3 | return (optend); |
7191 | 3 | } |
7192 | 307 | if (revision == PACKETCABLE_CCC_DRAFT5) |
7193 | 0 | max_timer_val = 30; |
7194 | 307 | timer_val = tvb_get_uint8(tvb, suboptoff); |
7195 | 307 | proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val, |
7196 | 307 | timer_val > max_timer_val ? " [Invalid]" : "", |
7197 | 307 | subopt_len, |
7198 | 307 | plurality(subopt_len, "", "s"), |
7199 | 307 | subopt_len != 1 ? " [Invalid]" : ""); |
7200 | 307 | suboptoff += 1; |
7201 | 307 | break; |
7202 | | |
7203 | 227 | case PKT_CCC_IETF_SEC_TKT: |
7204 | 227 | if (suboptoff+2 > optend) { |
7205 | 1 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7206 | 1 | return (optend); |
7207 | 1 | } |
7208 | 226 | sec_tcm = tvb_get_ntohs(tvb, suboptoff); |
7209 | 226 | proto_item_append_text(vti, "0x%04x (%u byte%s%s)", sec_tcm, subopt_len, |
7210 | 226 | plurality(subopt_len, "", "s"), |
7211 | 226 | subopt_len != 2 ? " [Invalid]" : ""); |
7212 | 226 | if (subopt_len == 2) { |
7213 | 91 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7214 | 91 | proto_tree_add_boolean(pkt_s_tree, hf_dhcp_ccc_ietf_sec_tkt_pc_provision_server, tvb, suboptoff, 2, sec_tcm); |
7215 | 91 | proto_tree_add_boolean(pkt_s_tree, hf_dhcp_ccc_ietf_sec_tkt_all_pc_call_management, tvb, suboptoff, 2, sec_tcm); |
7216 | 91 | } |
7217 | 226 | suboptoff += subopt_len; |
7218 | 226 | break; |
7219 | | |
7220 | 2.26k | default: |
7221 | 2.26k | suboptoff += subopt_len; |
7222 | 2.26k | break; |
7223 | 5.49k | } |
7224 | 5.44k | return suboptoff; |
7225 | 5.49k | } |
7226 | | |
7227 | | static int |
7228 | | dissect_dhcpopt_packetcable_ccc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
7229 | 198 | { |
7230 | 198 | int offset = 0; |
7231 | | |
7232 | 5.68k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
7233 | 5.50k | switch (pkt_ccc_protocol_version) { |
7234 | | |
7235 | 0 | case PACKETCABLE_CCC_I05: |
7236 | 0 | offset = dissect_packetcable_i05_ccc(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb)); |
7237 | 0 | break; |
7238 | 0 | case PACKETCABLE_CCC_DRAFT5: |
7239 | 5.50k | case PACKETCABLE_CCC_RFC_3495: |
7240 | 5.50k | offset = dissect_packetcable_ietf_ccc(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb), pkt_ccc_protocol_version); |
7241 | 5.50k | break; |
7242 | 0 | default: /* XXX Should we do something here? */ |
7243 | 0 | break; |
7244 | 5.50k | } |
7245 | 5.50k | } |
7246 | | |
7247 | 180 | return tvb_captured_length(tvb); |
7248 | 198 | } |
7249 | | |
7250 | 536 | #define BOOTREQUEST 1 |
7251 | 8 | #define BOOTREPLY 2 |
7252 | | |
7253 | | static const value_string op_vals[] = { |
7254 | | { BOOTREQUEST, "Boot Request" }, |
7255 | | { BOOTREPLY, "Boot Reply" }, |
7256 | | { 0, NULL } |
7257 | | }; |
7258 | | |
7259 | | static int |
7260 | | dissect_dhcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
7261 | 4.84k | { |
7262 | 4.84k | proto_tree *bp_tree; |
7263 | 4.84k | proto_item *bp_ti, *ti; |
7264 | 4.84k | proto_item *file_ti, *sname_ti; |
7265 | 4.84k | proto_item *fi, *hidden_item; |
7266 | 4.84k | uint8_t op; |
7267 | 4.84k | uint8_t htype, hlen; |
7268 | 4.84k | int voff, eoff; /* vendor offset, end offset */ |
7269 | 4.84k | int tmpvoff, tmpvoff_end; |
7270 | 4.84k | uint32_t ip_addr; |
7271 | 4.84k | bool at_end; |
7272 | 4.84k | bool isProxyDhcp; |
7273 | 4.84k | const char *dhcp_type = NULL; |
7274 | 4.84k | const uint8_t *vendor_class_id = NULL; |
7275 | 4.84k | uint16_t flags, secs; |
7276 | 4.84k | int offset_delta; |
7277 | 4.84k | uint8_t overload = 0; /* DHCP option overload */ |
7278 | 4.84k | static int * const dhcp_flags[] = { |
7279 | 4.84k | &hf_dhcp_flags_broadcast, |
7280 | 4.84k | &hf_dhcp_flags_reserved, |
7281 | 4.84k | NULL |
7282 | 4.84k | }; |
7283 | | |
7284 | 4.84k | if (pinfo->srcport == PROXYDHCP_UDP_PORT || |
7285 | 4.84k | pinfo->destport == PROXYDHCP_UDP_PORT) { |
7286 | | /* The "DHCP magic" is mandatory for proxyDHCP. Use it as a heuristic. */ |
7287 | 0 | if (!tvb_bytes_exist(tvb, VENDOR_INFO_OFFSET, 4) || |
7288 | 0 | tvb_get_ntohl(tvb, VENDOR_INFO_OFFSET) != 0x63825363) { |
7289 | | /* Not a DHCP packet at all. */ |
7290 | 0 | return 0; |
7291 | 0 | } |
7292 | 0 | isProxyDhcp = true; |
7293 | 4.84k | } else { |
7294 | 4.84k | isProxyDhcp = false; |
7295 | 4.84k | } |
7296 | | |
7297 | 4.84k | col_set_str(pinfo->cinfo, COL_PROTOCOL, "BOOTP"); |
7298 | | /* |
7299 | | * In case we throw an exception fetching the opcode, etc. |
7300 | | */ |
7301 | 4.84k | col_clear(pinfo->cinfo, COL_INFO); |
7302 | | |
7303 | 4.84k | op = tvb_get_uint8(tvb, 0); |
7304 | 4.84k | htype = tvb_get_uint8(tvb, 1); |
7305 | 4.84k | hlen = tvb_get_uint8(tvb, 2); |
7306 | 4.84k | switch (op) { |
7307 | | |
7308 | 536 | case BOOTREQUEST: |
7309 | 536 | if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802) |
7310 | 226 | && hlen == 6) { |
7311 | 172 | col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s (%s)", |
7312 | 172 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, 28, hlen, htype), |
7313 | 172 | tvb_get_ether_name(tvb, 28)); |
7314 | 172 | } |
7315 | 364 | else { |
7316 | 364 | col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s", |
7317 | 364 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, 28, hlen, htype)); |
7318 | 364 | } |
7319 | 536 | break; |
7320 | | |
7321 | 8 | case BOOTREPLY: |
7322 | 8 | col_set_str(pinfo->cinfo, COL_INFO, "Boot Reply"); |
7323 | 8 | break; |
7324 | | |
7325 | 4.29k | default: |
7326 | 4.29k | col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)", op); |
7327 | 4.29k | break; |
7328 | 4.84k | } |
7329 | | |
7330 | 4.79k | voff = VENDOR_INFO_OFFSET; |
7331 | | |
7332 | | /* rfc2132 says it SHOULD exist, not that it MUST exist */ |
7333 | 4.79k | if (tvb_bytes_exist(tvb, voff, 4) && |
7334 | 4.48k | (tvb_get_ntohl(tvb, voff) == 0x63825363)) { |
7335 | 3.55k | voff += 4; |
7336 | 3.55k | } else { |
7337 | 1.24k | voff += 64; |
7338 | 1.24k | } |
7339 | 4.79k | eoff = tvb_reported_length(tvb); |
7340 | | |
7341 | 4.79k | bp_ti = proto_tree_add_item(tree, proto_dhcp, tvb, 0, -1, ENC_NA); |
7342 | 4.79k | bp_tree = proto_item_add_subtree(bp_ti, ett_dhcp); |
7343 | | |
7344 | 4.79k | wmem_map_t *rfc3396_map = wmem_map_new(pinfo->pool, g_direct_hash, g_direct_equal); |
7345 | | /* |
7346 | | * In the first pass, we just look for the overload, DHCP message type |
7347 | | * and Vendor class identifier options, and any repeated options for |
7348 | | * RFC 3396 long option concatenation. |
7349 | | */ |
7350 | 4.79k | tmpvoff = voff; |
7351 | 4.79k | at_end = false; |
7352 | 16.1k | while (tmpvoff < eoff && !at_end) { |
7353 | 11.3k | offset_delta = dhcp_option(tvb, pinfo, NULL, tmpvoff, eoff, true, &at_end, |
7354 | 11.3k | &dhcp_type, &vendor_class_id, &overload, rfc3396_map); |
7355 | 11.3k | if (offset_delta <= 0) { |
7356 | 0 | proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_option_parse_err, |
7357 | 0 | tvb, tmpvoff, eoff); |
7358 | 0 | return tmpvoff; |
7359 | 0 | } |
7360 | 11.3k | tmpvoff += offset_delta; |
7361 | 11.3k | } |
7362 | | |
7363 | | /* |
7364 | | * If there was a DHCP message type option, flag this packet |
7365 | | * as DHCP. |
7366 | | */ |
7367 | 4.79k | if (dhcp_type != NULL) { |
7368 | | /* |
7369 | | * Yes, this is a DHCP packet, and "dhcp_type" is the |
7370 | | * packet type. |
7371 | | */ |
7372 | 12 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCP"); |
7373 | | |
7374 | 12 | col_add_fstr(pinfo->cinfo, COL_INFO, "%sDHCP %-8s - Transaction ID 0x%x", |
7375 | 12 | isProxyDhcp ? "proxy" : "", dhcp_type, tvb_get_ntohl(tvb, 4)); |
7376 | 12 | tap_queue_packet( dhcp_bootp_tap, pinfo, dhcp_type); |
7377 | 12 | } |
7378 | | |
7379 | | /* |
7380 | | * OK, now populate the protocol tree. |
7381 | | */ |
7382 | | |
7383 | 4.79k | proto_tree_add_uint(bp_tree, hf_dhcp_type, tvb, |
7384 | 4.79k | 0, 1, |
7385 | 4.79k | op); |
7386 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_hw_type, tvb, |
7387 | 4.79k | 1, 1, ENC_BIG_ENDIAN); |
7388 | 4.79k | proto_tree_add_uint(bp_tree, hf_dhcp_hw_len, tvb, |
7389 | 4.79k | 2, 1, hlen); |
7390 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_hops, tvb, |
7391 | 4.79k | 3, 1, ENC_BIG_ENDIAN); |
7392 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_id, tvb, |
7393 | 4.79k | 4, 4, ENC_BIG_ENDIAN); |
7394 | | /* |
7395 | | * Windows (98, XP and Vista tested) sends the "secs" value on |
7396 | | * the wire formatted as little-endian. See if the LE value |
7397 | | * makes sense, if autodetect is used. |
7398 | | */ |
7399 | 4.79k | if (dhcp_secs_endian == DHCP_SECS_ENDIAN_AUTODETECT) { |
7400 | 4.78k | secs = tvb_get_letohs(tvb, 8); |
7401 | 4.78k | if (secs > 0 && secs <= 0xff) { |
7402 | 544 | ti = proto_tree_add_uint(bp_tree, hf_dhcp_secs, tvb, 8, 2, secs); |
7403 | 544 | expert_add_info(pinfo, ti, &ei_dhcp_secs_le); |
7404 | 4.24k | } else { |
7405 | 4.24k | proto_tree_add_item(bp_tree, hf_dhcp_secs, tvb, |
7406 | 4.24k | 8, 2, ENC_BIG_ENDIAN); |
7407 | 4.24k | } |
7408 | 4.78k | } |
7409 | 13 | else { |
7410 | | /* Use whatever endianness is configured */ |
7411 | 13 | proto_tree_add_item(bp_tree, hf_dhcp_secs, tvb, 8, 2, dhcp_secs_endian); |
7412 | 13 | } |
7413 | 4.79k | flags = tvb_get_ntohs(tvb, 10); |
7414 | 4.79k | fi = proto_tree_add_bitmask(bp_tree, tvb, 10, hf_dhcp_flags, |
7415 | 4.79k | ett_dhcp_flags, dhcp_flags, ENC_BIG_ENDIAN); |
7416 | 4.79k | proto_item_append_text(fi, " (%s)", |
7417 | 4.79k | (flags & BOOTP_BC) ? "Broadcast" : "Unicast"); |
7418 | | |
7419 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_ip_client, tvb, |
7420 | 4.79k | 12, 4, ENC_BIG_ENDIAN); |
7421 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_ip_your, tvb, |
7422 | 4.79k | 16, 4, ENC_BIG_ENDIAN); |
7423 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_ip_server, tvb, |
7424 | 4.79k | 20, 4, ENC_BIG_ENDIAN); |
7425 | 4.79k | proto_tree_add_item(bp_tree, hf_dhcp_ip_relay, tvb, |
7426 | 4.79k | 24, 4, ENC_BIG_ENDIAN); |
7427 | | |
7428 | 4.79k | if (hlen > 0 && hlen <= 16) { |
7429 | 564 | if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802) |
7430 | 245 | && hlen == 6) |
7431 | 169 | proto_tree_add_item(bp_tree, hf_dhcp_hw_ether_addr, tvb, 28, 6, ENC_NA); |
7432 | 395 | else |
7433 | | /* The chaddr element is 16 bytes in length, |
7434 | | although only the first hlen bytes are used */ |
7435 | 395 | proto_tree_add_bytes_format_value(bp_tree, hf_dhcp_hw_addr, tvb, 28, 16, |
7436 | 395 | NULL, "%s", tvb_arphrdaddr_to_str(pinfo->pool, tvb, 28, hlen, htype)); |
7437 | 564 | if ((16 - hlen) > 0) |
7438 | 508 | proto_tree_add_item(bp_tree, hf_dhcp_hw_addr_padding, tvb, 28+hlen, 16-hlen, ENC_NA); |
7439 | 4.23k | } else { |
7440 | 4.23k | proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_client_address_not_given, tvb, 28, 16); |
7441 | 4.23k | } |
7442 | | |
7443 | | /* RFC 3396 5: "The aggregate option buffer is made up of the optional |
7444 | | * parameters field, the file field, and the sname field, in that order. |
7445 | | * WARNING: This is not the physical ordering of these fields in the |
7446 | | * DHCP packet." |
7447 | | * |
7448 | | * RFC 3396 6: "[I]f an option were split into three parts and each |
7449 | | * part went into one of the possible option fields, the first part |
7450 | | * would go into the optional parameters field, the second part would |
7451 | | * go into the file field, and the third part would go into the sname |
7452 | | * field." |
7453 | | * |
7454 | | * So we process and reassemble the options in the order listed above, |
7455 | | * and move the items after processing so that they are generally in |
7456 | | * physical ordering in the tree. (Whichever ordering choice we make |
7457 | | * is bound to confused someone.) |
7458 | | */ |
7459 | | |
7460 | 4.79k | if (overload & OPT_OVERLOAD_FILE) { |
7461 | 3.89k | file_ti = proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_boot_filename_overloaded_by_dhcp, tvb, |
7462 | 3.89k | FILE_NAME_OFFSET, FILE_NAME_LEN); |
7463 | 3.89k | tmpvoff = FILE_NAME_OFFSET; |
7464 | 3.89k | tmpvoff_end = FILE_NAME_OFFSET + FILE_NAME_LEN; |
7465 | 3.89k | at_end = false; |
7466 | 28.1k | while (tmpvoff < tmpvoff_end && !at_end) { |
7467 | 24.2k | tmpvoff += dhcp_option(tvb, pinfo, NULL, tmpvoff, |
7468 | 24.2k | tmpvoff_end, true, &at_end, |
7469 | 24.2k | &dhcp_type, &vendor_class_id, |
7470 | 24.2k | NULL, rfc3396_map); |
7471 | 24.2k | } |
7472 | 3.89k | } else { |
7473 | | /* Boot file is optional */ |
7474 | 907 | if (tvb_get_uint8(tvb, FILE_NAME_OFFSET) != '\0') { |
7475 | 427 | file_ti = proto_tree_add_item(bp_tree, hf_dhcp_file, tvb, |
7476 | 427 | FILE_NAME_OFFSET, |
7477 | 427 | FILE_NAME_LEN, ENC_ASCII); |
7478 | 480 | } else { |
7479 | 480 | file_ti = proto_tree_add_string_format(bp_tree, hf_dhcp_file, tvb, |
7480 | 480 | FILE_NAME_OFFSET, |
7481 | 480 | FILE_NAME_LEN, |
7482 | 480 | "", "Boot file name not given"); |
7483 | 480 | } |
7484 | 907 | } |
7485 | | |
7486 | | |
7487 | 4.79k | if (overload & OPT_OVERLOAD_SNAME) { |
7488 | 4.27k | sname_ti = proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_server_name_overloaded_by_dhcp, tvb, |
7489 | 4.27k | SERVER_NAME_OFFSET, SERVER_NAME_LEN); |
7490 | 4.27k | tmpvoff = SERVER_NAME_OFFSET; |
7491 | 4.27k | tmpvoff_end = SERVER_NAME_OFFSET + SERVER_NAME_LEN; |
7492 | 4.27k | at_end = false; |
7493 | 17.5k | while (tmpvoff < tmpvoff_end && !at_end) { |
7494 | 13.2k | tmpvoff += dhcp_option(tvb, pinfo, NULL, tmpvoff, |
7495 | 13.2k | tmpvoff_end, true, &at_end, |
7496 | 13.2k | &dhcp_type, &vendor_class_id, |
7497 | 13.2k | NULL, rfc3396_map); |
7498 | 13.2k | } |
7499 | 4.27k | } else { |
7500 | | /* The server host name is optional */ |
7501 | 529 | if (tvb_get_uint8(tvb, SERVER_NAME_OFFSET) != '\0') { |
7502 | 179 | sname_ti = proto_tree_add_item(bp_tree, hf_dhcp_server, tvb, |
7503 | 179 | SERVER_NAME_OFFSET, |
7504 | 179 | SERVER_NAME_LEN, ENC_ASCII); |
7505 | | |
7506 | 350 | } else { |
7507 | 350 | sname_ti = proto_tree_add_string_format(bp_tree, hf_dhcp_server, tvb, |
7508 | 350 | SERVER_NAME_OFFSET, |
7509 | 350 | SERVER_NAME_LEN, |
7510 | 350 | "", "Server host name not given"); |
7511 | 350 | } |
7512 | 529 | } |
7513 | | |
7514 | 4.79k | proto_tree_move_item(bp_tree, sname_ti, file_ti); |
7515 | | |
7516 | 4.79k | voff = VENDOR_INFO_OFFSET; |
7517 | 4.79k | if (dhcp_type == NULL) { |
7518 | 4.42k | hidden_item = proto_tree_add_boolean(bp_tree, hf_dhcp_bootp, tvb, 0, 0, 1); |
7519 | 4.42k | proto_item_set_hidden(hidden_item); |
7520 | 4.42k | } |
7521 | 4.79k | if (tvb_bytes_exist(tvb, voff, 4) && |
7522 | 4.48k | (tvb_get_ntohl(tvb, voff) == 0x63825363)) { |
7523 | 3.54k | ip_addr = tvb_get_ipv4(tvb, voff); |
7524 | 3.54k | proto_tree_add_ipv4_format_value(bp_tree, hf_dhcp_cookie, tvb, |
7525 | 3.54k | voff, 4, ip_addr, "DHCP"); |
7526 | 3.54k | voff += 4; |
7527 | 3.54k | } else { |
7528 | 1.25k | proto_tree_add_item(bp_tree, hf_dhcp_vendor_specific_options, tvb, |
7529 | 1.25k | voff, 64, ENC_NA); |
7530 | 1.25k | voff += 64; |
7531 | 1.25k | } |
7532 | | |
7533 | 4.79k | at_end = false; |
7534 | 15.5k | while (voff < eoff && !at_end) { |
7535 | 10.7k | offset_delta = dhcp_option(tvb, pinfo, bp_tree, voff, eoff, false, &at_end, |
7536 | 10.7k | &dhcp_type, &vendor_class_id, &overload, rfc3396_map); |
7537 | 10.7k | if (offset_delta <= 0) { |
7538 | 0 | proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_option_parse_err, |
7539 | 0 | tvb, voff, eoff); |
7540 | 0 | return voff; |
7541 | 0 | } |
7542 | 10.7k | voff += offset_delta; |
7543 | 10.7k | } |
7544 | 4.79k | if ((dhcp_type != NULL) && (!at_end)) |
7545 | 60 | { |
7546 | 60 | expert_add_info(pinfo, bp_ti, &ei_dhcp_end_option_missing); |
7547 | 60 | } |
7548 | | |
7549 | 4.79k | if (overload & OPT_OVERLOAD_FILE) { |
7550 | 3.86k | proto_item *oti; |
7551 | 3.86k | proto_tree *overload_tree = proto_tree_add_subtree(bp_tree, tvb, |
7552 | 3.86k | FILE_NAME_OFFSET, FILE_NAME_LEN, ett_dhcp_filename_option, &oti, |
7553 | 3.86k | "Boot file name option overload"); |
7554 | 3.86k | tmpvoff = FILE_NAME_OFFSET; |
7555 | 3.86k | tmpvoff_end = FILE_NAME_OFFSET + FILE_NAME_LEN; |
7556 | 3.86k | at_end = false; |
7557 | 26.9k | while (tmpvoff < tmpvoff_end && !at_end) { |
7558 | 23.0k | tmpvoff += dhcp_option(tvb, pinfo, overload_tree, tmpvoff, |
7559 | 23.0k | tmpvoff_end, false, &at_end, |
7560 | 23.0k | &dhcp_type, &vendor_class_id, |
7561 | 23.0k | NULL, rfc3396_map); |
7562 | 23.0k | } |
7563 | 3.86k | if (!at_end) |
7564 | 3.03k | { |
7565 | 3.03k | expert_add_info(pinfo, oti, &ei_dhcp_opt_overload_file_end_missing); |
7566 | 3.03k | } |
7567 | 3.86k | proto_tree_move_item(bp_tree, file_ti, oti); |
7568 | 3.86k | } |
7569 | 4.79k | if (overload & OPT_OVERLOAD_SNAME) { |
7570 | 3.76k | proto_item *oti; |
7571 | 3.76k | proto_tree *overload_tree = proto_tree_add_subtree(bp_tree, tvb, |
7572 | 3.76k | SERVER_NAME_OFFSET, SERVER_NAME_LEN, ett_dhcp_server_hostname, &oti, |
7573 | 3.76k | "Server host name option overload"); |
7574 | 3.76k | tmpvoff = SERVER_NAME_OFFSET; |
7575 | 3.76k | tmpvoff_end = SERVER_NAME_OFFSET + SERVER_NAME_LEN; |
7576 | 3.76k | at_end = false; |
7577 | 14.9k | while (tmpvoff < tmpvoff_end && !at_end) { |
7578 | 11.1k | tmpvoff += dhcp_option(tvb, pinfo, overload_tree, tmpvoff, |
7579 | 11.1k | tmpvoff_end, false, &at_end, |
7580 | 11.1k | &dhcp_type, &vendor_class_id, |
7581 | 11.1k | NULL, rfc3396_map); |
7582 | 11.1k | } |
7583 | 3.76k | if (!at_end) |
7584 | 2.27k | { |
7585 | 2.27k | expert_add_info(pinfo, oti, &ei_dhcp_opt_overload_sname_end_missing); |
7586 | 2.27k | } |
7587 | 3.76k | proto_tree_move_item(bp_tree, sname_ti, oti); |
7588 | 3.76k | } |
7589 | | |
7590 | 4.79k | if (voff < eoff) { |
7591 | | /* |
7592 | | * Padding after the end option. |
7593 | | */ |
7594 | 22 | proto_tree_add_item(bp_tree, hf_dhcp_option_padding, tvb, voff, eoff - voff, ENC_NA); |
7595 | 22 | } |
7596 | | |
7597 | 4.79k | return tvb_captured_length(tvb); |
7598 | 4.79k | } |
7599 | | |
7600 | | static void |
7601 | | dhcp_init_protocol(void) |
7602 | 14 | { |
7603 | 14 | unsigned i; |
7604 | | |
7605 | | /* first copy default_dhcp_opt[] to dhcp_opt[]. This resets all values to default */ |
7606 | 14 | memcpy(dhcp_opt, default_dhcp_opt, sizeof(dhcp_opt)); |
7607 | | |
7608 | 14 | if ((num_dhcp_records_uat > 0) && (saved_uat_opts == NULL)) |
7609 | 0 | { |
7610 | 0 | saved_uat_opts = wmem_list_new(NULL); |
7611 | 0 | } |
7612 | | |
7613 | | /* Now apply the custom options */ |
7614 | 14 | for (i = 0; i < num_dhcp_records_uat; i++) |
7615 | 0 | { |
7616 | 0 | dhcp_opt[uat_dhcp_records[i].opt].text = wmem_strdup(wmem_file_scope(), uat_dhcp_records[i].text); |
7617 | 0 | dhcp_opt[uat_dhcp_records[i].opt].ftype = uat_dhcp_records[i].ftype; |
7618 | 0 | dhcp_opt[uat_dhcp_records[i].opt].phf = NULL; |
7619 | | |
7620 | | /* Apply the custom option to the dissection table*/ |
7621 | 0 | dissector_change_uint("dhcp.option", uat_dhcp_records[i].opt, dhcpopt_basic_handle); |
7622 | | |
7623 | | /* Save the option so it can be cleared later */ |
7624 | 0 | wmem_list_append(saved_uat_opts, GUINT_TO_POINTER(uat_dhcp_records[i].opt)); |
7625 | 0 | } |
7626 | 14 | } |
7627 | | |
7628 | | static void |
7629 | | dhcp_clear_uat_dhcpopt(void *data, void *user_data _U_) |
7630 | 0 | { |
7631 | 0 | dissector_reset_uint("dhcp.option", GPOINTER_TO_UINT(data)); |
7632 | 0 | } |
7633 | | |
7634 | | static void |
7635 | | dhcp_cleanup_protocol(void) |
7636 | 0 | { |
7637 | 0 | if (saved_uat_opts != NULL) { |
7638 | 0 | wmem_list_foreach(saved_uat_opts, dhcp_clear_uat_dhcpopt, |
7639 | 0 | NULL); |
7640 | |
|
7641 | 0 | wmem_destroy_list(saved_uat_opts); |
7642 | 0 | saved_uat_opts = NULL; |
7643 | 0 | } |
7644 | 0 | } |
7645 | | |
7646 | | |
7647 | | /* TAP STAT INFO */ |
7648 | | typedef enum |
7649 | | { |
7650 | | MESSAGE_TYPE_COLUMN = 0, |
7651 | | PACKET_COLUMN |
7652 | | } dhcp_stat_columns; |
7653 | | |
7654 | | static stat_tap_table_item dhcp_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "DHCP Message Type", "%-25s"}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Packets", "%d"}}; |
7655 | | |
7656 | | static void dhcp_stat_init(stat_tap_table_ui* new_stat) |
7657 | 0 | { |
7658 | 0 | const char *table_name = "DHCP Statistics"; |
7659 | 0 | int num_fields = array_length(dhcp_stat_fields); |
7660 | 0 | stat_tap_table *table; |
7661 | 0 | int i = 0; |
7662 | 0 | stat_tap_table_item_type items[array_length(dhcp_stat_fields)]; |
7663 | |
|
7664 | 0 | table = stat_tap_find_table(new_stat, table_name); |
7665 | 0 | if (table) { |
7666 | 0 | if (new_stat->stat_tap_reset_table_cb) { |
7667 | 0 | new_stat->stat_tap_reset_table_cb(table); |
7668 | 0 | } |
7669 | 0 | return; |
7670 | 0 | } |
7671 | | |
7672 | 0 | table = stat_tap_init_table(table_name, num_fields, 0, NULL); |
7673 | 0 | stat_tap_add_table(new_stat, table); |
7674 | |
|
7675 | 0 | memset(items, 0x0, sizeof(items)); |
7676 | | /* Add a row for each value type */ |
7677 | 0 | while (opt53_text[i].strptr) |
7678 | 0 | { |
7679 | 0 | items[MESSAGE_TYPE_COLUMN].type = TABLE_ITEM_STRING; |
7680 | 0 | items[MESSAGE_TYPE_COLUMN].value.string_value = opt53_text[i].strptr; |
7681 | 0 | items[PACKET_COLUMN].type = TABLE_ITEM_UINT; |
7682 | 0 | items[PACKET_COLUMN].value.uint_value = 0; |
7683 | |
|
7684 | 0 | stat_tap_init_table_row(table, i, num_fields, items); |
7685 | 0 | i++; |
7686 | 0 | } |
7687 | 0 | } |
7688 | | |
7689 | | static tap_packet_status |
7690 | | dhcp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data, tap_flags_t flags _U_) |
7691 | 0 | { |
7692 | 0 | stat_data_t* stat_data = (stat_data_t*)tapdata; |
7693 | 0 | const char* value = (const char*)data; |
7694 | 0 | stat_tap_table* table; |
7695 | 0 | stat_tap_table_item_type* msg_data; |
7696 | 0 | int idx; |
7697 | |
|
7698 | 0 | idx = str_to_val_idx(value, opt53_text); |
7699 | 0 | if (idx < 0) |
7700 | 0 | return TAP_PACKET_DONT_REDRAW; |
7701 | | |
7702 | 0 | table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0); |
7703 | 0 | msg_data = stat_tap_get_field_data(table, idx, PACKET_COLUMN); |
7704 | 0 | msg_data->value.uint_value++; |
7705 | 0 | stat_tap_set_field_data(table, idx, PACKET_COLUMN, msg_data); |
7706 | |
|
7707 | 0 | return TAP_PACKET_REDRAW; |
7708 | 0 | } |
7709 | | |
7710 | | static void |
7711 | | dhcp_stat_reset(stat_tap_table* table) |
7712 | 0 | { |
7713 | 0 | unsigned element; |
7714 | 0 | stat_tap_table_item_type* item_data; |
7715 | |
|
7716 | 0 | for (element = 0; element < table->num_elements; element++) |
7717 | 0 | { |
7718 | 0 | item_data = stat_tap_get_field_data(table, element, PACKET_COLUMN); |
7719 | 0 | item_data->value.uint_value = 0; |
7720 | 0 | stat_tap_set_field_data(table, element, PACKET_COLUMN, item_data); |
7721 | 0 | } |
7722 | 0 | } |
7723 | | |
7724 | | void |
7725 | | proto_register_dhcp(void) |
7726 | 14 | { |
7727 | 14 | static const value_string dhcp_custom_type_vals[] = { |
7728 | 14 | { ipv4, "IP Address"}, |
7729 | 14 | { ipv4_list, "IP Address List" }, |
7730 | 14 | { string, "string" }, |
7731 | 14 | { bytes, "bytes" }, |
7732 | 14 | { val_boolean, "boolean" }, |
7733 | 14 | { val_u_byte, "byte" }, |
7734 | 14 | { val_u_short, "unsigned short" }, |
7735 | 14 | { val_u_short_list, "unsigned short list" }, |
7736 | 14 | { val_u_long, "unsigned long" }, |
7737 | 14 | { time_in_s_secs, "integer time in seconds" }, |
7738 | 14 | { time_in_u_secs, "unsigned integer time in seconds" }, |
7739 | 14 | { 0x00, NULL } |
7740 | 14 | }; |
7741 | | |
7742 | 14 | static hf_register_info hf[] = { |
7743 | 14 | { &hf_dhcp_bootp, |
7744 | 14 | { "Frame is BOOTP", "dhcp.bootp", |
7745 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
7746 | 14 | NULL, HFILL }}, |
7747 | | |
7748 | 14 | { &hf_dhcp_type, |
7749 | 14 | { "Message type", "dhcp.type", |
7750 | 14 | FT_UINT8, BASE_DEC, VALS(op_vals), 0x0, |
7751 | 14 | NULL, HFILL }}, |
7752 | | |
7753 | 14 | { &hf_dhcp_hw_type, |
7754 | 14 | { "Hardware type", "dhcp.hw.type", |
7755 | 14 | FT_UINT8, BASE_HEX, VALS(arp_hrd_vals), 0x0, |
7756 | 14 | NULL, HFILL }}, |
7757 | | |
7758 | 14 | { &hf_dhcp_hw_len, |
7759 | 14 | { "Hardware address length", "dhcp.hw.len", |
7760 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7761 | 14 | NULL, HFILL }}, |
7762 | | |
7763 | 14 | { &hf_dhcp_hops, |
7764 | 14 | { "Hops", "dhcp.hops", |
7765 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7766 | 14 | NULL, HFILL }}, |
7767 | | |
7768 | 14 | { &hf_dhcp_id, |
7769 | 14 | { "Transaction ID", "dhcp.id", |
7770 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
7771 | 14 | NULL, HFILL }}, |
7772 | | |
7773 | 14 | { &hf_dhcp_secs, |
7774 | 14 | { "Seconds elapsed", "dhcp.secs", |
7775 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7776 | 14 | NULL, HFILL }}, |
7777 | | |
7778 | 14 | { &hf_dhcp_flags, |
7779 | 14 | { "Bootp flags", "dhcp.flags", |
7780 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
7781 | 14 | NULL, HFILL }}, |
7782 | | |
7783 | 14 | { &hf_dhcp_flags_broadcast, |
7784 | 14 | { "Broadcast flag", "dhcp.flags.bc", |
7785 | 14 | FT_BOOLEAN, 16, TFS(&flag_set_broadcast), BOOTP_BC, |
7786 | 14 | NULL, HFILL }}, |
7787 | | |
7788 | 14 | { &hf_dhcp_flags_reserved, |
7789 | 14 | { "Reserved flags", "dhcp.flags.reserved", |
7790 | 14 | FT_UINT16, BASE_HEX, NULL, BOOTP_MBZ, |
7791 | 14 | NULL, HFILL }}, |
7792 | | |
7793 | 14 | { &hf_dhcp_ip_client, |
7794 | 14 | { "Client IP address", "dhcp.ip.client", |
7795 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7796 | 14 | NULL, HFILL }}, |
7797 | | |
7798 | 14 | { &hf_dhcp_ip_your, |
7799 | 14 | { "Your (client) IP address", "dhcp.ip.your", |
7800 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7801 | 14 | NULL, HFILL }}, |
7802 | | |
7803 | 14 | { &hf_dhcp_ip_server, |
7804 | 14 | { "Next server IP address", "dhcp.ip.server", |
7805 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7806 | 14 | NULL, HFILL }}, |
7807 | | |
7808 | 14 | { &hf_dhcp_ip_relay, |
7809 | 14 | { "Relay agent IP address", "dhcp.ip.relay", |
7810 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7811 | 14 | NULL, HFILL }}, |
7812 | | |
7813 | 14 | { &hf_dhcp_hw_addr, |
7814 | 14 | { "Client hardware address", "dhcp.hw.addr", |
7815 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7816 | 14 | NULL, HFILL }}, |
7817 | | |
7818 | 14 | { &hf_dhcp_hw_addr_padding, |
7819 | 14 | { "Client hardware address padding", "dhcp.hw.addr_padding", |
7820 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7821 | 14 | NULL, HFILL }}, |
7822 | | |
7823 | 14 | { &hf_dhcp_hw_ether_addr, |
7824 | 14 | { "Client MAC address", "dhcp.hw.mac_addr", |
7825 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
7826 | 14 | NULL, HFILL }}, |
7827 | | |
7828 | 14 | { &hf_dhcp_server, |
7829 | 14 | { "Server host name", "dhcp.server", |
7830 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7831 | 14 | NULL, HFILL }}, |
7832 | | |
7833 | 14 | { &hf_dhcp_file, |
7834 | 14 | { "Boot file name", "dhcp.file", |
7835 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7836 | 14 | NULL, HFILL }}, |
7837 | | |
7838 | 14 | { &hf_dhcp_cookie, |
7839 | 14 | { "Magic cookie", "dhcp.cookie", |
7840 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7841 | 14 | NULL, HFILL }}, |
7842 | | |
7843 | 14 | { &hf_dhcp_vendor_specific_options, |
7844 | 14 | { "Bootp vendor specific options", "dhcp.vendor_specific_options", |
7845 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7846 | 14 | NULL, HFILL }}, |
7847 | | |
7848 | 14 | { &hf_dhcp_fqdn_s, |
7849 | 14 | { "Server", "dhcp.fqdn.s", |
7850 | 14 | FT_BOOLEAN, 8, TFS(&tfs_server_client), F_FQDN_S, |
7851 | 14 | "If true, server should do DDNS update", HFILL }}, |
7852 | | |
7853 | 14 | { &hf_dhcp_fqdn_o, |
7854 | 14 | { "Server overrides", "dhcp.fqdn.o", |
7855 | 14 | FT_BOOLEAN, 8, TFS(&tfs_fqdn_o), F_FQDN_O, |
7856 | 14 | "If true, server insists on doing DDNS update", HFILL }}, |
7857 | | |
7858 | 14 | { &hf_dhcp_fqdn_e, |
7859 | 14 | { "Encoding", "dhcp.fqdn.e", |
7860 | 14 | FT_BOOLEAN, 8, TFS(&tfs_fqdn_e), F_FQDN_E, |
7861 | 14 | "If true, name is binary encoded", HFILL }}, |
7862 | | |
7863 | 14 | { &hf_dhcp_fqdn_n, |
7864 | 14 | { "Server DDNS", "dhcp.fqdn.n", |
7865 | 14 | FT_BOOLEAN, 8, TFS(&tfs_fqdn_n), F_FQDN_N, |
7866 | 14 | "If true, server should not do any DDNS updates", HFILL }}, |
7867 | | |
7868 | 14 | { &hf_dhcp_fqdn_flags, |
7869 | 14 | { "Flags", "dhcp.fqdn.flags", |
7870 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
7871 | 14 | NULL, HFILL }}, |
7872 | | |
7873 | 14 | { &hf_dhcp_fqdn_mbz, |
7874 | 14 | { "Reserved flags", "dhcp.fqdn.mbz", |
7875 | 14 | FT_UINT8, BASE_HEX, NULL, F_FQDN_MBZ, |
7876 | 14 | NULL, HFILL }}, |
7877 | | |
7878 | 14 | { &hf_dhcp_fqdn_rcode1, |
7879 | 14 | { "A-RR result", "dhcp.fqdn.rcode1", |
7880 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7881 | 14 | "Result code of A-RR update", HFILL }}, |
7882 | | |
7883 | 14 | { &hf_dhcp_fqdn_rcode2, |
7884 | 14 | { "PTR-RR result", "dhcp.fqdn.rcode2", |
7885 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7886 | 14 | "Result code of PTR-RR update", HFILL }}, |
7887 | | |
7888 | 14 | { &hf_dhcp_fqdn_name, |
7889 | 14 | { "Client name", "dhcp.fqdn.name", |
7890 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7891 | 14 | "Name to register via DDNS", HFILL }}, |
7892 | | |
7893 | 14 | { &hf_dhcp_fqdn_asciiname, |
7894 | 14 | { "Client name", "dhcp.fqdn.name", |
7895 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7896 | 14 | "Name to register via DDNS", HFILL }}, |
7897 | | |
7898 | 14 | { &hf_dhcp_pkt_mta_cap_len, |
7899 | 14 | { "MTA DC Length", "dhcp.vendor.pktc.mta_cap_len", |
7900 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7901 | 14 | "PacketCable MTA Device Capabilities Length", HFILL }}, |
7902 | | |
7903 | 14 | { &hf_dhcp_pkt_mta_cap_type, |
7904 | 14 | { "Type", "dhcp.vendor.pktc.mta_cap_type", |
7905 | 14 | FT_UINT16, BASE_DEC, VALS(pkt_mdc_type_vals), 0x0, |
7906 | 14 | NULL, HFILL }}, |
7907 | | |
7908 | 14 | { &hf_dhcp_pkt_mdc_supp_flow_secure, |
7909 | 14 | { "Secure Flow (Full Secure Provisioning Flow)", "dhcp.vendor.pktc.mdc.supp_flow.secure", |
7910 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001, |
7911 | 14 | NULL, HFILL }}, |
7912 | | |
7913 | 14 | { &hf_dhcp_pkt_mdc_supp_flow_hybrid, |
7914 | 14 | { "Hybrid Flow", "dhcp.vendor.pktc.mdc.supp_flow.hybrid", |
7915 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002, |
7916 | 14 | NULL, HFILL }}, |
7917 | | |
7918 | 14 | { &hf_dhcp_pkt_mdc_supp_flow_basic, |
7919 | 14 | { "Basic Flow", "dhcp.vendor.pktc.mdc.supp_flow.basic", |
7920 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004, |
7921 | 14 | NULL, HFILL }}, |
7922 | | |
7923 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta, |
7924 | 14 | { "PacketCable 1.5 MTA MIB", "dhcp.vendor.pktc.mdc_cl.mib.mta", |
7925 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01, |
7926 | 14 | NULL, HFILL }}, |
7927 | | |
7928 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_signaling, |
7929 | 14 | { "PacketCable 1.5 Signaling MIB", "dhcp.vendor.pktc.mdc_cl.mib.signaling", |
7930 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02, |
7931 | 14 | NULL, HFILL }}, |
7932 | | |
7933 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_management_event, |
7934 | 14 | { "PacketCable 1.5 Management Event MIB", "dhcp.vendor.pktc.mdc_cl.mib.management_event", |
7935 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04, |
7936 | 14 | NULL, HFILL }}, |
7937 | | |
7938 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta_extension, |
7939 | 14 | { "PacketCable 1.5 MTA Extension MIB", "dhcp.vendor.pktc.mdc_cl.mib.mta_extension", |
7940 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08, |
7941 | 14 | NULL, HFILL }}, |
7942 | | |
7943 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta_signaling_extension, |
7944 | 14 | { "PacketCable 1.5 Signaling Extension MIB", "dhcp.vendor.pktc.mdc_cl.mib.signaling_extension", |
7945 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10, |
7946 | 14 | NULL, HFILL }}, |
7947 | | |
7948 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta_mem_extension, |
7949 | 14 | { "PacketCable 1.5 MEM Extension MIB", "dhcp.vendor.pktc.mdc_cl.mib.mem_extension", |
7950 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20, |
7951 | 14 | NULL, HFILL }}, |
7952 | | |
7953 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_reserved, |
7954 | 14 | { "Reserved", "dhcp.vendor.pktc.mdc_cl.mib.reserved", |
7955 | 14 | FT_UINT8, BASE_HEX, NULL, 0xC0, |
7956 | 14 | NULL, HFILL }}, |
7957 | | |
7958 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_mta, |
7959 | 14 | { "IETF MTA MIB", "dhcp.vendor.pktc.mdc_ietf.mib.mta", |
7960 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01, |
7961 | 14 | NULL, HFILL }}, |
7962 | | |
7963 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_signaling, |
7964 | 14 | { "IETF Signaling MIB", "dhcp.vendor.pktc.mdc_ietf.mib.signaling", |
7965 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02, |
7966 | 14 | NULL, HFILL }}, |
7967 | | |
7968 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_management_event, |
7969 | 14 | { "IETF Management Event MIB", "dhcp.vendor.pktc.mdc_ietf.mib.management_event", |
7970 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04, |
7971 | 14 | NULL, HFILL }}, |
7972 | | |
7973 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_reserved, |
7974 | 14 | { "Reserved", "dhcp.vendor.pktc.mdc_ietf.mib.reserved", |
7975 | 14 | FT_UINT8, BASE_HEX, NULL, 0xF8, |
7976 | 14 | NULL, HFILL }}, |
7977 | | |
7978 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta, |
7979 | 14 | { "PacketCable 1.5 MTA MIB", "dhcp.vendor.pktc.mdc_euro.mib.mta", |
7980 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01, |
7981 | 14 | NULL, HFILL }}, |
7982 | | |
7983 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_signaling, |
7984 | 14 | { "PacketCable 1.5 Signaling MIB", "dhcp.vendor.pktc.mdc_euro.mib.signaling", |
7985 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02, |
7986 | 14 | NULL, HFILL }}, |
7987 | | |
7988 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_management_event, |
7989 | 14 | { "PacketCable 1.5 Management Event MIB", "dhcp.vendor.pktc.mdc_euro.mib.management_event", |
7990 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04, |
7991 | 14 | NULL, HFILL }}, |
7992 | | |
7993 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta_extension, |
7994 | 14 | { "PacketCable 1.5 MTA Extension MIB", "dhcp.vendor.pktc.mdc_euro.mib.mta_extension", |
7995 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08, |
7996 | 14 | NULL, HFILL }}, |
7997 | | |
7998 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta_signaling_extension, |
7999 | 14 | { "PacketCable 1.5 Signaling Extension MIB", "dhcp.vendor.pktc.mdc_euro.mib.signaling_extension", |
8000 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10, |
8001 | 14 | NULL, HFILL }}, |
8002 | | |
8003 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta_mem_extension, |
8004 | 14 | { "PacketCable 1.5 MEM Extension MIB", "dhcp.vendor.pktc.mdc_euro.mib.mem_extension", |
8005 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20, |
8006 | 14 | NULL, HFILL }}, |
8007 | | |
8008 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_reserved, |
8009 | 14 | { "Reserved", "dhcp.vendor.pktc.mdc_euro.mib.reserved", |
8010 | 14 | FT_UINT8, BASE_HEX, NULL, 0xC0, |
8011 | 14 | NULL, HFILL }}, |
8012 | | |
8013 | 14 | { &hf_dhcp_docsis_cm_cap_len, |
8014 | 14 | { "CM DC Length", "dhcp.vendor.docsis.cm_cap_len", |
8015 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8016 | 14 | "DOCSIS Cable Modem Device Capabilities Length", HFILL }}, |
8017 | | |
8018 | 14 | { &hf_dhcp_docsis_cm_cap_type, |
8019 | 14 | { "CM DC Type", "dhcp.docsis_cm_cap_type", |
8020 | 14 | FT_UINT16, BASE_DEC, VALS(docsis_cm_cap_type_vals), 0x0, |
8021 | 14 | "Docsis Cable Modem Device Capability type", HFILL }}, |
8022 | | |
8023 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_cm, |
8024 | 14 | { "CM", "dhcp.docsis_cm_cap.ranging_hold_off.cm", |
8025 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001, |
8026 | 14 | NULL, HFILL }}, |
8027 | | |
8028 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_eps, |
8029 | 14 | { "ePS or eRouter", "dhcp.docsis_cm_cap.ranging_hold_off.eps", |
8030 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002, |
8031 | 14 | NULL, HFILL }}, |
8032 | | |
8033 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_emta, |
8034 | 14 | { "EMTA or EDVA", "dhcp.docsis_cm_cap.ranging_hold_off.emta", |
8035 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004, |
8036 | 14 | NULL, HFILL }}, |
8037 | | |
8038 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_dsg, |
8039 | 14 | { "DSG/eSTB", "dhcp.docsis_cm_cap.ranging_hold_off.dsg", |
8040 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008, |
8041 | 14 | NULL, HFILL }}, |
8042 | | |
8043 | | |
8044 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_stpid, |
8045 | 14 | { "[IEEE 802.1ad] S-TPID", "dhcp.docsis_cm_cap.mpls.stpid", |
8046 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001, |
8047 | 14 | NULL, HFILL }}, |
8048 | | |
8049 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_svid, |
8050 | 14 | { "[IEEE 802.1ad] S-VID", "dhcp.docsis_cm_cap.mpls.svid", |
8051 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002, |
8052 | 14 | NULL, HFILL }}, |
8053 | | |
8054 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_spcp, |
8055 | 14 | { "[IEEE 802.1ad] S-PCP", "dhcp.docsis_cm_cap.mpls.spcp", |
8056 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004, |
8057 | 14 | NULL, HFILL }}, |
8058 | | |
8059 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_sdei, |
8060 | 14 | { "[IEEE 802.1ad] S-DEI", "dhcp.docsis_cm_cap.mpls.sdei", |
8061 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008, |
8062 | 14 | NULL, HFILL }}, |
8063 | | |
8064 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ctpid, |
8065 | 14 | { "[IEEE 802.1ad] C-TPID", "dhcp.docsis_cm_cap.mpls.ctpid", |
8066 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010, |
8067 | 14 | NULL, HFILL }}, |
8068 | | |
8069 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_cvid, |
8070 | 14 | { "[IEEE 802.1ad] C-VID", "dhcp.docsis_cm_cap.mpls.cvid", |
8071 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020, |
8072 | 14 | NULL, HFILL }}, |
8073 | | |
8074 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_cpcp, |
8075 | 14 | { "[IEEE 802.1ad] C-PCP", "dhcp.docsis_cm_cap.mpls.cpcp", |
8076 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040, |
8077 | 14 | NULL, HFILL }}, |
8078 | | |
8079 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ccfi, |
8080 | 14 | { "[IEEE 802.1ad] C-CFI", "dhcp.docsis_cm_cap.mpls.ccfi", |
8081 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000080, |
8082 | 14 | NULL, HFILL }}, |
8083 | | |
8084 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_stci, |
8085 | 14 | { "[IEEE 802.1ad] S-TCI", "dhcp.docsis_cm_cap.mpls.stci", |
8086 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000100, |
8087 | 14 | NULL, HFILL }}, |
8088 | | |
8089 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ctci, |
8090 | 14 | { "[IEEE 802.1ad] C-TCI", "dhcp.docsis_cm_cap.mpls.ctci", |
8091 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000200, |
8092 | 14 | NULL, HFILL }}, |
8093 | | |
8094 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_itpid, |
8095 | 14 | { "[IEEE 802.1ad] I-TPID", "dhcp.docsis_cm_cap.mpls.itpid", |
8096 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000400, |
8097 | 14 | NULL, HFILL }}, |
8098 | | |
8099 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_isid, |
8100 | 14 | { "[IEEE 802.1ad] I-SID", "dhcp.docsis_cm_cap.mpls.isid", |
8101 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000800, |
8102 | 14 | NULL, HFILL }}, |
8103 | | |
8104 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_itci, |
8105 | 14 | { "[IEEE 802.1ad] I-TCI", "dhcp.docsis_cm_cap.mpls.itci", |
8106 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00001000, |
8107 | 14 | NULL, HFILL }}, |
8108 | | |
8109 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ipcp, |
8110 | 14 | { "[IEEE 802.1ad] I-PCP", "dhcp.docsis_cm_cap.mpls.ipcp", |
8111 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00002000, |
8112 | 14 | NULL, HFILL }}, |
8113 | | |
8114 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_idei, |
8115 | 14 | { "[IEEE 802.1ad] I-DEI", "dhcp.docsis_cm_cap.mpls.idei", |
8116 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00004000, |
8117 | 14 | NULL, HFILL }}, |
8118 | | |
8119 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_iuca, |
8120 | 14 | { "[IEEE 802.1ad] I-UCA", "dhcp.docsis_cm_cap.mpls.iuca", |
8121 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00008000, |
8122 | 14 | NULL, HFILL }}, |
8123 | | |
8124 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_btpid, |
8125 | 14 | { "[IEEE 802.1ad] B-TPID", "dhcp.docsis_cm_cap.mpls.btpid", |
8126 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00010000, |
8127 | 14 | NULL, HFILL }}, |
8128 | | |
8129 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_btci, |
8130 | 14 | { "[IEEE 802.1ad] B-TCI", "dhcp.docsis_cm_cap.mpls.btci", |
8131 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00020000, |
8132 | 14 | NULL, HFILL }}, |
8133 | | |
8134 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bpcp, |
8135 | 14 | { "[IEEE 802.1ad] B-PCP", "dhcp.docsis_cm_cap.mpls.bpcp", |
8136 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00040000, |
8137 | 14 | NULL, HFILL }}, |
8138 | | |
8139 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bdei, |
8140 | 14 | { "[IEEE 802.1ad] B-DEI", "dhcp.docsis_cm_cap.mpls.bdei", |
8141 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00080000, |
8142 | 14 | NULL, HFILL }}, |
8143 | | |
8144 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bvid, |
8145 | 14 | { "[IEEE 802.1ad] B-VID", "dhcp.docsis_cm_cap.mpls.bvid", |
8146 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00100000, |
8147 | 14 | NULL, HFILL }}, |
8148 | | |
8149 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bda, |
8150 | 14 | { "[IEEE 802.1ad] B-DA", "dhcp.docsis_cm_cap.mpls.bda", |
8151 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00200000, |
8152 | 14 | NULL, HFILL }}, |
8153 | | |
8154 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bsa, |
8155 | 14 | { "[IEEE 802.1ad] B-SA", "dhcp.docsis_cm_cap.mpls.bsa", |
8156 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00400000, |
8157 | 14 | NULL, HFILL }}, |
8158 | | |
8159 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_tc, |
8160 | 14 | { "MPLS TC", "dhcp.docsis_cm_cap.mpls.tc", |
8161 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00800000, |
8162 | 14 | NULL, HFILL }}, |
8163 | | |
8164 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_label, |
8165 | 14 | { "MPLS Label", "dhcp.docsis_cm_cap.mpls.label", |
8166 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x01000000, |
8167 | 14 | NULL, HFILL }}, |
8168 | | |
8169 | | |
8170 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_160, |
8171 | 14 | { "160 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.160", |
8172 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01, |
8173 | 14 | NULL, HFILL }}, |
8174 | | |
8175 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_320, |
8176 | 14 | { "320 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.320", |
8177 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02, |
8178 | 14 | NULL, HFILL }}, |
8179 | | |
8180 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_640, |
8181 | 14 | { "640 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.640", |
8182 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04, |
8183 | 14 | NULL, HFILL }}, |
8184 | | |
8185 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_1280, |
8186 | 14 | { "1280 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.1280", |
8187 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08, |
8188 | 14 | NULL, HFILL }}, |
8189 | | |
8190 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_2560, |
8191 | 14 | { "2560 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.2560", |
8192 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10, |
8193 | 14 | NULL, HFILL }}, |
8194 | | |
8195 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_5120, |
8196 | 14 | { "5120 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.5120", |
8197 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20, |
8198 | 14 | NULL, HFILL }}, |
8199 | | |
8200 | 14 | { &hf_dhcp_client_identifier_uuid, |
8201 | 14 | { "Client Identifier (UUID)", "dhcp.client_id.uuid", |
8202 | 14 | FT_GUID, BASE_NONE, NULL, 0x0, |
8203 | 14 | "Client Machine Identifier (UUID)", HFILL }}, |
8204 | | |
8205 | 14 | { &hf_dhcp_client_hardware_address, |
8206 | 14 | { "Client hardware address", "dhcp.client_hardware_address", |
8207 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8208 | 14 | NULL, HFILL }}, |
8209 | | |
8210 | 14 | { &hf_dhcp_client_id_iaid, |
8211 | 14 | { "IAID", "dhcp.client_id.iaid", |
8212 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8213 | 14 | NULL, HFILL }}, |
8214 | | |
8215 | 14 | { &hf_dhcp_client_id_duid_type, |
8216 | 14 | { "DUID Type", "dhcp.client_id.duid_type", |
8217 | 14 | FT_UINT16, BASE_DEC, VALS(duidtype_vals), 0x0, |
8218 | 14 | NULL, HFILL }}, |
8219 | | |
8220 | 14 | { &hf_dhcp_client_identifier_duid_llt_hw_type, |
8221 | 14 | { "Hardware type", "dhcp.client_id.duid_llt_hw_type", |
8222 | 14 | FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0x0, |
8223 | 14 | "Client Identifier DUID LLT Hardware type", HFILL }}, |
8224 | | |
8225 | 14 | { &hf_dhcp_client_identifier_duid_ll_hw_type, |
8226 | 14 | { "Hardware type", "dhcp.client_id.duid_ll_hw_type", |
8227 | 14 | FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0x0, |
8228 | 14 | "Client Identifier DUID LL Hardware type", HFILL }}, |
8229 | | |
8230 | 14 | { &hf_dhcp_client_identifier_time, |
8231 | 14 | { "Time", "dhcp.client_id.time", |
8232 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8233 | 14 | NULL, HFILL }}, |
8234 | | |
8235 | 14 | { &hf_dhcp_client_identifier_link_layer_address, |
8236 | 14 | { "Link layer address", "dhcp.client_id.link_layer_address", |
8237 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8238 | 14 | NULL, HFILL }}, |
8239 | | |
8240 | 14 | { &hf_dhcp_client_identifier_link_layer_address_ether, |
8241 | 14 | { "Link layer address (Ethernet)", "dhcp.client_id.link_layer_address_ether", |
8242 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
8243 | 14 | NULL, HFILL }}, |
8244 | | |
8245 | 14 | { &hf_dhcp_client_identifier_enterprise_num, |
8246 | 14 | { "Enterprise-number", "dhcp.client_id.enterprise_num", |
8247 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, |
8248 | 14 | NULL, HFILL }}, |
8249 | | |
8250 | 14 | { &hf_dhcp_client_identifier, |
8251 | 14 | { "Identifier", "dhcp.client_id", |
8252 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8253 | 14 | NULL, HFILL }}, |
8254 | | |
8255 | 14 | { &hf_dhcp_client_identifier_type, |
8256 | 14 | { "Type", "dhcp.client_id.type", |
8257 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8258 | 14 | NULL, HFILL }}, |
8259 | | |
8260 | 14 | { &hf_dhcp_client_identifier_undef, |
8261 | 14 | { "Client Identifier", "dhcp.client_id.undef", |
8262 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8263 | 14 | NULL, HFILL }}, |
8264 | | |
8265 | 14 | { &hf_dhcp_option_type, |
8266 | 14 | { "Option", "dhcp.option.type", |
8267 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8268 | 14 | "DHCP/BOOTP option type", HFILL }}, |
8269 | | |
8270 | 14 | { &hf_dhcp_option_length, |
8271 | 14 | { "Length", "dhcp.option.length", |
8272 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8273 | 14 | "DHCP/BOOTP option length", HFILL }}, |
8274 | | |
8275 | 14 | { &hf_dhcp_suboption_length, |
8276 | 14 | { "Length", "dhcp.option.suboption_length", |
8277 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8278 | 14 | "Suboption length", HFILL }}, |
8279 | | |
8280 | 14 | { &hf_dhcp_option_value, |
8281 | 14 | { "Value", "dhcp.option.value", |
8282 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8283 | 14 | "DHCP/BOOTP option value", HFILL }}, |
8284 | | |
8285 | 14 | { &hf_dhcp_option_value_8, |
8286 | 14 | { "Value", "dhcp.option.value.uint", |
8287 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8288 | 14 | "8-bit DHCP/BOOTP option value", HFILL }}, |
8289 | | |
8290 | 14 | { &hf_dhcp_option_value_16, |
8291 | 14 | { "Value", "dhcp.option.value.uint", |
8292 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8293 | 14 | "16-bit DHCP/BOOTP option value", HFILL }}, |
8294 | | |
8295 | 14 | { &hf_dhcp_option_value_u32, |
8296 | 14 | { "Value", "dhcp.option.value.uint", |
8297 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8298 | 14 | "32-bit DHCP/BOOTP option value", HFILL }}, |
8299 | | |
8300 | 14 | { &hf_dhcp_option_value_s_secs, |
8301 | 14 | { "Value", "dhcp.option.value.secs", |
8302 | 14 | FT_INT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_s_secs_fmt), 0x0, |
8303 | 14 | "32-bit DHCP/BOOTP option value", HFILL }}, |
8304 | | |
8305 | 14 | { &hf_dhcp_option_value_u_secs, |
8306 | 14 | { "Value", "dhcp.option.value.usecs", |
8307 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8308 | 14 | "32-bit DHCP/BOOTP option value", HFILL }}, |
8309 | | |
8310 | 14 | { &hf_dhcp_option_value_stringz, |
8311 | 14 | { "Value", "dhcp.option.value.string", |
8312 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8313 | 14 | "Z-String DHCP/BOOTP option value", HFILL }}, |
8314 | | |
8315 | 14 | { &hf_dhcp_option_value_ip_address, |
8316 | 14 | { "Value", "dhcp.option.value.address", |
8317 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8318 | 14 | "IP address DHCP/BOOTP option value", HFILL }}, |
8319 | | |
8320 | 14 | { &hf_dhcp_option_value_boolean, |
8321 | 14 | { "Value", "dhcp.option.value.bool", |
8322 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x00, |
8323 | 14 | "Boolean DHCP/BOOTP option value", HFILL }}, |
8324 | | |
8325 | 14 | { &hf_dhcp_option_rfc_3396_detected, |
8326 | 14 | { "Encoding Long Options detected (RFC 3396)", "dhcp.option.rfc_3396_detected", |
8327 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8328 | 14 | NULL, HFILL }}, |
8329 | | |
8330 | 14 | { &hf_dhcp_option_padding, |
8331 | 14 | { "Padding", "dhcp.option.padding", |
8332 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8333 | 14 | "Option 0: Padding", HFILL }}, |
8334 | | |
8335 | 14 | { &hf_dhcp_option_subnet_mask, |
8336 | 14 | { "Subnet Mask", "dhcp.option.subnet_mask", |
8337 | 14 | FT_IPv4, BASE_NETMASK, NULL, 0x00, |
8338 | 14 | "Option 1: Subnet Mask", HFILL }}, |
8339 | | |
8340 | 14 | { &hf_dhcp_option_time_offset, |
8341 | 14 | { "Time Offset", "dhcp.option.time_offset", |
8342 | 14 | FT_INT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_s_secs_fmt), 0x0, |
8343 | 14 | "Option 2: Time Offset", HFILL }}, |
8344 | | |
8345 | 14 | { &hf_dhcp_option_router, |
8346 | 14 | { "Router", "dhcp.option.router", |
8347 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8348 | 14 | "Option 3: Router", HFILL }}, |
8349 | | |
8350 | 14 | { &hf_dhcp_option_time_server, |
8351 | 14 | { "Time Server", "dhcp.option.time_server", |
8352 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8353 | 14 | "Option 4: Time Server", HFILL }}, |
8354 | | |
8355 | 14 | { &hf_dhcp_option_name_server, |
8356 | 14 | { "Name Server", "dhcp.option.name_server", |
8357 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8358 | 14 | "Option 5: Name Server", HFILL }}, |
8359 | | |
8360 | 14 | { &hf_dhcp_option_domain_name_server, |
8361 | 14 | { "Domain Name Server", "dhcp.option.domain_name_server", |
8362 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8363 | 14 | "Option 6: Domain Name Server", HFILL }}, |
8364 | | |
8365 | 14 | { &hf_dhcp_option_log_server, |
8366 | 14 | { "Log Server", "dhcp.option.log_server", |
8367 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8368 | 14 | "Option 7: Log Server", HFILL }}, |
8369 | | |
8370 | 14 | { &hf_dhcp_option_quotes_server, |
8371 | 14 | { "Quotes Server", "dhcp.option.quotes_server", |
8372 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8373 | 14 | "Option 8: Quotes Server", HFILL }}, |
8374 | | |
8375 | 14 | { &hf_dhcp_option_lpr_server, |
8376 | 14 | { "LPR Server", "dhcp.option.lpr_server", |
8377 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8378 | 14 | "Option 9: LPR Server", HFILL }}, |
8379 | | |
8380 | 14 | { &hf_dhcp_option_impress_server, |
8381 | 14 | { "Impress Server", "dhcp.option.impress_server", |
8382 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8383 | 14 | "Option 10: Impress Server", HFILL }}, |
8384 | | |
8385 | 14 | { &hf_dhcp_option_resource_location_server, |
8386 | 14 | { "Resource Location Server", "dhcp.option.resource_location_server", |
8387 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8388 | 14 | "Option 11: Resource Location Server", HFILL }}, |
8389 | | |
8390 | 14 | { &hf_dhcp_option_hostname, |
8391 | 14 | { "Host Name", "dhcp.option.hostname", |
8392 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8393 | 14 | "Option 12: Host Name", HFILL }}, |
8394 | | |
8395 | 14 | { &hf_dhcp_option_boot_file_size, |
8396 | 14 | { "Boot File Size", "dhcp.option.boot_file_size", |
8397 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8398 | 14 | "Option 13: Boot File Size", HFILL }}, |
8399 | | |
8400 | 14 | { &hf_dhcp_option_merit_dump_file, |
8401 | 14 | { "Merit Dump File", "dhcp.option.merit_dump_file", |
8402 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8403 | 14 | "Option 14: Merit Dump File", HFILL }}, |
8404 | | |
8405 | 14 | { &hf_dhcp_option_domain_name, |
8406 | 14 | { "Domain Name", "dhcp.option.domain_name", |
8407 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8408 | 14 | "Option 15: Domain Name", HFILL }}, |
8409 | | |
8410 | 14 | { &hf_dhcp_option_swap_server, |
8411 | 14 | { "Swap Server", "dhcp.option.swap_server", |
8412 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8413 | 14 | "Option 16: Swap Server", HFILL }}, |
8414 | | |
8415 | 14 | { &hf_dhcp_option_root_path, |
8416 | 14 | { "Root Path", "dhcp.option.root_path", |
8417 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8418 | 14 | "Option 17: Root Path", HFILL }}, |
8419 | | |
8420 | 14 | { &hf_dhcp_option_extension_path, |
8421 | 14 | { "Extensions Path", "dhcp.option.extension_path", |
8422 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8423 | 14 | "Option 18: Extensions Path", HFILL }}, |
8424 | | |
8425 | 14 | { &hf_dhcp_option_ip_forwarding, |
8426 | 14 | { "IP Forwarding", "dhcp.option.ip_forwarding", |
8427 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8428 | 14 | "Option 19: IP Forwarding", HFILL }}, |
8429 | | |
8430 | 14 | { &hf_dhcp_option_policy_filter_ip, |
8431 | 14 | { "IP Address", "dhcp.option.policy_filter.ip", |
8432 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8433 | 14 | "Option 21: IP address", HFILL }}, |
8434 | | |
8435 | 14 | { &hf_dhcp_option_policy_filter_subnet_mask, |
8436 | 14 | { "Subnet Mask", "dhcp.option.policy_filter.subnet_mask", |
8437 | 14 | FT_IPv4, BASE_NETMASK, NULL, 0x00, |
8438 | 14 | "Option 21: Subnet Mask", HFILL }}, |
8439 | | |
8440 | 14 | { &hf_dhcp_option_non_local_source_routing, |
8441 | 14 | { "Non-Local Source Routing", "dhcp.option.non_local_source_routing", |
8442 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8443 | 14 | "Option 20: Non-Local Source Routing", HFILL }}, |
8444 | | |
8445 | 14 | { &hf_dhcp_option_max_datagram_reassembly_size, |
8446 | 14 | { "Maximum Datagram Reassembly Size", "dhcp.option.max_datagram_reassembly_size", |
8447 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8448 | 14 | "Option 22: Maximum Datagram Reassembly Size", HFILL }}, |
8449 | | |
8450 | 14 | { &hf_dhcp_option_default_ip_ttl, |
8451 | 14 | { "Default IP Time-to-Live", "dhcp.option.default_ip_ttl", |
8452 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8453 | 14 | "Option 23: Default IP Time-to-Live", HFILL }}, |
8454 | | |
8455 | 14 | { &hf_dhcp_option_path_mtu_aging_timeout, |
8456 | 14 | { "Path MTU Aging Timeout", "dhcp.option.path_mtu_aging_timeout", |
8457 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8458 | 14 | "Option 24: Path MTU Aging Timeout", HFILL }}, |
8459 | | |
8460 | 14 | { &hf_dhcp_option_path_mtu_plateau_table_item, |
8461 | 14 | { "Path MTU Plateau Table Item", "dhcp.option.path_mtu_plateau_table_item", |
8462 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8463 | 14 | "Option 25: Path MTU Plateau Table Item", HFILL }}, |
8464 | | |
8465 | 14 | { &hf_dhcp_option_interface_mtu, |
8466 | 14 | { "Interface MTU", "dhcp.option.interface_mtu", |
8467 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8468 | 14 | "Option 26: Interface MTU", HFILL }}, |
8469 | | |
8470 | 14 | { &hf_dhcp_option_all_subnets_are_local, |
8471 | 14 | { "All Subnets are Local", "dhcp.option.all_subnets_are_local", |
8472 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
8473 | 14 | "Option 27: All Subnets are Local", HFILL }}, |
8474 | | |
8475 | 14 | { &hf_dhcp_option_broadcast_address, |
8476 | 14 | { "Broadcast Address", "dhcp.option.broadcast_address", |
8477 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8478 | 14 | "Option 28: Broadcast Address", HFILL }}, |
8479 | | |
8480 | 14 | { &hf_dhcp_option_perform_mask_discovery, |
8481 | 14 | { "Perform Mask Discovery", "dhcp.option.perform_mask_discovery", |
8482 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8483 | 14 | "Option 29: Perform Mask Discovery", HFILL }}, |
8484 | | |
8485 | 14 | { &hf_dhcp_option_mask_supplier, |
8486 | 14 | { "Mask Supplier", "dhcp.option.mask_supplier", |
8487 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
8488 | 14 | "Option 30: Mask Supplier", HFILL }}, |
8489 | | |
8490 | 14 | { &hf_dhcp_option_perform_router_discover, |
8491 | 14 | { "Perform Router Discover", "dhcp.option.perform_router_discover", |
8492 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8493 | 14 | "Option 31: Perform Router Discover", HFILL }}, |
8494 | | |
8495 | 14 | { &hf_dhcp_option_router_solicitation_address, |
8496 | 14 | { "Router Solicitation Address", "dhcp.option.router_solicitation_address", |
8497 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8498 | 14 | "Option 32: Router Solicitation Address", HFILL }}, |
8499 | | |
8500 | 14 | { &hf_dhcp_option_static_route_ip, |
8501 | 14 | { "Destination IP Address", "dhcp.option.static_route.ip", |
8502 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8503 | 14 | "Option 33: Destination IP address", HFILL }}, |
8504 | | |
8505 | 14 | { &hf_dhcp_option_static_route_router, |
8506 | 14 | { "Destination Router", "dhcp.option.static_route.router", |
8507 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8508 | 14 | "Option 33: Destination Router", HFILL }}, |
8509 | | |
8510 | 14 | { &hf_dhcp_option_trailer_encapsulation, |
8511 | 14 | { "Trailer Encapsulation", "dhcp.option.trailer_encapsulation", |
8512 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8513 | 14 | "Option 34: Trailer Encapsulation", HFILL }}, |
8514 | | |
8515 | 14 | { &hf_dhcp_option_arp_cache_timeout, |
8516 | 14 | { "ARP Cache Timeout", "dhcp.option.arp_cache_timeout", |
8517 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8518 | 14 | "Option 35: ARP Cache Timeout", HFILL }}, |
8519 | | |
8520 | 14 | { &hf_dhcp_option_ethernet_encapsulation, |
8521 | 14 | { "Ethernet Encapsulation", "dhcp.option.ethernet_encapsulation", |
8522 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8523 | 14 | "Option 36: Ethernet Encapsulation", HFILL }}, |
8524 | | |
8525 | 14 | { &hf_dhcp_option_tcp_default_ttl, |
8526 | 14 | { "TCP Default TTL", "dhcp.option.tcp_default_ttl", |
8527 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8528 | 14 | "Option 37: TCP Default TTL", HFILL }}, |
8529 | | |
8530 | 14 | { &hf_dhcp_option_tcp_keepalive_interval, |
8531 | 14 | { "TCP Keepalive Interval", "dhcp.option.tcp_keepalive_interval", |
8532 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8533 | 14 | "Option 38: TCP Keepalive Interval", HFILL }}, |
8534 | | |
8535 | 14 | { &hf_dhcp_option_tcp_keepalive_garbage, |
8536 | 14 | { "TCP Keepalive Garbage", "dhcp.option.tcp_keepalive_garbage", |
8537 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8538 | 14 | "Option 39: TCP Keepalive Garbage", HFILL }}, |
8539 | | |
8540 | 14 | { &hf_dhcp_option_nis_domain, |
8541 | 14 | { "Network Information Service Domain", "dhcp.option.nis_domain", |
8542 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8543 | 14 | "Option 40: Network Information Service Domain", HFILL }}, |
8544 | | |
8545 | 14 | { &hf_dhcp_option_nis_server, |
8546 | 14 | { "Network Information Service Server", "dhcp.option.nis_server", |
8547 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8548 | 14 | "Option 41: Network Information Service Server", HFILL }}, |
8549 | | |
8550 | 14 | { &hf_dhcp_option_ntp_server, |
8551 | 14 | { "Network Time Protocol Server", "dhcp.option.ntp_server", |
8552 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8553 | 14 | "Option 42: Network Time Protocol Server", HFILL }}, |
8554 | | |
8555 | 14 | { &hf_dhcp_option43_suboption, |
8556 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.suboption", |
8557 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8558 | 14 | NULL, HFILL }}, |
8559 | | |
8560 | 14 | { &hf_dhcp_option43_value, |
8561 | 14 | { "Value", "dhcp.option.vendor.value", |
8562 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8563 | 14 | "Option 43: Suboption value", HFILL }}, |
8564 | | |
8565 | 14 | { &hf_dhcp_option43_value_8, |
8566 | 14 | { "Value", "dhcp.option.vendor.value.uint", |
8567 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8568 | 14 | "Option 43: Suboption 8-bit value", HFILL }}, |
8569 | | |
8570 | 14 | { &hf_dhcp_option43_value_32, |
8571 | 14 | { "Value", "dhcp.option.vendor.value.uint", |
8572 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8573 | 14 | "Option 43: Suboption 32-bit value", HFILL }}, |
8574 | | |
8575 | 14 | { &hf_dhcp_option43_value_stringz, |
8576 | 14 | { "Value", "dhcp.option.vendor.value.string", |
8577 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8578 | 14 | "Option 43: Suboption Z-String value", HFILL }}, |
8579 | | |
8580 | 14 | { &hf_dhcp_option43_value_ip_address, |
8581 | 14 | { "Value", "dhcp.option.vendor.value.address", |
8582 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8583 | 14 | "Option 43: Suboption IP address", HFILL }}, |
8584 | | |
8585 | | |
8586 | 14 | { &hf_dhcp_option43_pxeclient_suboption, |
8587 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.pxeclient.suboption", |
8588 | 14 | FT_UINT8, BASE_DEC, VALS(option43_pxeclient_suboption_vals), 0x0, |
8589 | 14 | "Option 43:PXE Client Suboption", HFILL }}, |
8590 | | |
8591 | 14 | { &hf_dhcp_option43_pxeclient_padding, |
8592 | 14 | { "Padding", "dhcp.option.vendor.pxeclient.padding", |
8593 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8594 | 14 | "Option 43:PXE Client 0 Padding", HFILL }}, |
8595 | | |
8596 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_ip, |
8597 | 14 | { "mtftp IP", "dhcp.option.vendor.pxeclient.mtftp_ip", |
8598 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8599 | 14 | "Option 43:PXE Client 1 mtftp IP", HFILL }}, |
8600 | | |
8601 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_client_port, |
8602 | 14 | { "mtftp client port", "dhcp.option.vendor.pxeclient.mtftp_client_port", |
8603 | 14 | FT_UINT16, BASE_DEC, NULL, 0x00, |
8604 | 14 | "Option 43:PXE Client 2 mtftp client port", HFILL }}, |
8605 | | |
8606 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_server_port, |
8607 | 14 | { "mtftp server port", "dhcp.option.vendor.pxeclient.mtftp_server_port", |
8608 | 14 | FT_UINT16, BASE_DEC, NULL, 0x00, |
8609 | 14 | "Option 43:PXE Client 3 mtftp server port", HFILL }}, |
8610 | | |
8611 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_timeout, |
8612 | 14 | { "mtftp timeout", "dhcp.option.vendor.pxeclient.mtftp_timeout", |
8613 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8614 | 14 | "Option 43:PXE Client 4 mtftp timeout", HFILL }}, |
8615 | | |
8616 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_delay, |
8617 | 14 | { "mtftp delay", "dhcp.option.vendor.pxeclient.mtftp_delay", |
8618 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8619 | 14 | "Option 43:PXE Client 5 mtftp delay", HFILL }}, |
8620 | | |
8621 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control, |
8622 | 14 | { "discovery control", "dhcp.option.vendor.pxeclient.discovery_control", |
8623 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0, |
8624 | 14 | "Option 43:PXE Client 6 discovery control", HFILL }}, |
8625 | | |
8626 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_bc, |
8627 | 14 | { "Disable Broadcast", "dhcp.option.vendor.pxeclient.discovery_control.broadcast", |
8628 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01, |
8629 | 14 | NULL, HFILL }}, |
8630 | | |
8631 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_mc, |
8632 | 14 | { "Disable Multicast", "dhcp.option.vendor.pxeclient.discovery_control.multicast", |
8633 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02, |
8634 | 14 | NULL, HFILL }}, |
8635 | | |
8636 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_serverlist, |
8637 | 14 | { "Serverlist only", "dhcp.option.vendor.pxeclient.discovery_control.serverlist", |
8638 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04, |
8639 | 14 | NULL, HFILL }}, |
8640 | | |
8641 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_bstrap, |
8642 | 14 | { "Bootstrap override", "dhcp.option.vendor.pxeclient.discovery_control.bstrap", |
8643 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x08, |
8644 | 14 | NULL, HFILL }}, |
8645 | | |
8646 | 14 | { &hf_dhcp_option43_pxeclient_multicast_address, |
8647 | 14 | { "multicast address", "dhcp.option.vendor.pxeclient.multicast_address", |
8648 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8649 | 14 | "Option 43:PXE Client 7 multicast address", HFILL }}, |
8650 | | |
8651 | 14 | { &hf_dhcp_option43_pxeclient_boot_servers, |
8652 | 14 | { "boot servers", "dhcp.option.vendor.pxeclient.boot_servers", |
8653 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8654 | 14 | "Option 43:PXE Client 8 boot servers", HFILL }}, |
8655 | | |
8656 | 14 | { &hf_dhcp_option43_pxeclient_boot_server_type, |
8657 | 14 | { "Type", "dhcp.option.vendor.pxeclient.boot_servers.type", |
8658 | 14 | FT_UINT16, BASE_DEC, VALS(o43pxeclient_boot_server_types), 0x0, |
8659 | 14 | NULL, HFILL }}, |
8660 | | |
8661 | 14 | { &hf_dhcp_option43_pxeclient_boot_server_count, |
8662 | 14 | { "IP count", "dhcp.option.vendor.pxeclient.boot_servers.count", |
8663 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8664 | 14 | NULL, HFILL }}, |
8665 | | |
8666 | 14 | { &hf_dhcp_option43_pxeclient_boot_server_ip, |
8667 | 14 | { "IP", "dhcp.option.vendor.pxeclient.boot_servers.ip", |
8668 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8669 | 14 | NULL, HFILL }}, |
8670 | | |
8671 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu, |
8672 | 14 | { "boot menu", "dhcp.option.vendor.pxeclient.boot_menu", |
8673 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8674 | 14 | "Option 43:PXE Client 9 boot menu", HFILL }}, |
8675 | | |
8676 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu_type, |
8677 | 14 | { "Type", "dhcp.option.vendor.pxeclient.boot_menu.type", |
8678 | 14 | FT_UINT16, BASE_DEC, VALS(o43pxeclient_boot_menu_types), 0x0, |
8679 | 14 | NULL, HFILL }}, |
8680 | | |
8681 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu_length, |
8682 | 14 | { "Length", "dhcp.option.vendor.pxeclient.boot_menu.length", |
8683 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8684 | 14 | NULL, HFILL }}, |
8685 | | |
8686 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu_desc, |
8687 | 14 | { "Description", "dhcp.option.vendor.pxeclient.boot_menu.desc", |
8688 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8689 | 14 | NULL, HFILL }}, |
8690 | | |
8691 | 14 | { &hf_dhcp_option43_pxeclient_menu_prompt, |
8692 | 14 | { "menu prompt", "dhcp.option.vendor.pxeclient.menu_prompt", |
8693 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8694 | 14 | "Option 43:PXE Client 10 menu prompt", HFILL }}, |
8695 | | |
8696 | 14 | { &hf_dhcp_option43_pxeclient_menu_prompt_timeout, |
8697 | 14 | { "Timeout", "dhcp.option.vendor.pxeclient.menu_prompt.timeout", |
8698 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8699 | 14 | NULL, HFILL }}, |
8700 | | |
8701 | 14 | { &hf_dhcp_option43_pxeclient_menu_prompt_prompt, |
8702 | 14 | { "Prompt", "dhcp.option.vendor.pxeclient.menu_prompt.prompt", |
8703 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8704 | 14 | NULL, HFILL }}, |
8705 | | |
8706 | 14 | { &hf_dhcp_option43_pxeclient_multicast_address_alloc, |
8707 | 14 | { "multicast address alloc", "dhcp.option.vendor.pxeclient.multicast_address_alloc", |
8708 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8709 | 14 | "Option 43:PXE Client 11 multicast address alloc", HFILL }}, |
8710 | | |
8711 | 14 | { &hf_dhcp_option43_pxeclient_credential_types, |
8712 | 14 | { "credential types", "dhcp.option.vendor.pxeclient.credential_types", |
8713 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8714 | 14 | "Option 43:PXE Client 12 credential types", HFILL }}, |
8715 | | |
8716 | 14 | { &hf_dhcp_option43_pxeclient_boot_item, |
8717 | 14 | { "boot item", "dhcp.option.vendor.pxeclient.boot_item", |
8718 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8719 | 14 | "Option 43:PXE Client 71 boot item", HFILL }}, |
8720 | | |
8721 | 14 | { &hf_dhcp_option43_pxeclient_boot_item_type, |
8722 | 14 | { "Type", "dhcp.option.vendor.pxeclient.boot_item.type", |
8723 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8724 | 14 | NULL, HFILL }}, |
8725 | | |
8726 | 14 | { &hf_dhcp_option43_pxeclient_boot_item_layer, |
8727 | 14 | { "Layer", "dhcp.option.vendor.pxeclient.boot_item.layer", |
8728 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8729 | 14 | NULL, HFILL }}, |
8730 | | |
8731 | 14 | { &hf_dhcp_option43_pxeclient_lcm_server, |
8732 | 14 | { "LCM Server Name", "dhcp.option.vendor.pxeclient.lcm_server", |
8733 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8734 | 14 | "Option 43:PXE Client 179 LCM Server", HFILL }}, |
8735 | | |
8736 | 14 | { &hf_dhcp_option43_pxeclient_lcm_domain, |
8737 | 14 | { "LCM Domain", "dhcp.option.vendor.pxeclient.lcm_domain", |
8738 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8739 | 14 | "Option 43:PXE Client 180 LCM Domain", HFILL }}, |
8740 | | |
8741 | 14 | { &hf_dhcp_option43_pxeclient_lcm_nic_option, |
8742 | 14 | { "LCM NIC option", "dhcp.option.vendor.pxeclient.lcm_nic_option", |
8743 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8744 | 14 | "Option 43:PXE Client 181 LCM NIC Option", HFILL }}, |
8745 | | |
8746 | 14 | { &hf_dhcp_option43_pxeclient_lcm_workgroup, |
8747 | 14 | { "LCM Workgroup", "dhcp.option.vendor.pxeclient.lcm_workgroup", |
8748 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8749 | 14 | "Option 43:PXE Client 190 LCM Workgroup", HFILL }}, |
8750 | | |
8751 | 14 | { &hf_dhcp_option43_pxeclient_discovery, |
8752 | 14 | { "Discovery", "dhcp.option.vendor.pxeclient.discovery", |
8753 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, |
8754 | 14 | "Option 43:PXE Client 191 Discovery", HFILL }}, |
8755 | | |
8756 | 14 | { &hf_dhcp_option43_pxeclient_configured, |
8757 | 14 | { "Configured", "dhcp.option.vendor.pxeclient.configured", |
8758 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, |
8759 | 14 | "Option 43:PXE Client 192 Configured", HFILL }}, |
8760 | | |
8761 | 14 | { &hf_dhcp_option43_pxeclient_lcm_version, |
8762 | 14 | { "LCM Version", "dhcp.option.vendor.pxeclient.lcm_version", |
8763 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8764 | 14 | "Option 43:PXE Client 193 LCM Version", HFILL }}, |
8765 | | |
8766 | 14 | { &hf_dhcp_option43_pxeclient_lcm_serial, |
8767 | 14 | { "LCM Serial Number", "dhcp.option.vendor.pxeclient.lcm_serial", |
8768 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8769 | 14 | "Option 43:PXE Client 194 LCM Serial Number", HFILL }}, |
8770 | | |
8771 | 14 | { &hf_dhcp_option43_pxeclient_end, |
8772 | 14 | { "PXE Client End", "dhcp.option.vendor.pxeclient.end", |
8773 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8774 | 14 | "Option 43:PXE Client 255 End", HFILL }}, |
8775 | | |
8776 | | |
8777 | | /* AEROHIVE (Extremenetworks) vendor suboptions */ |
8778 | 14 | { &hf_dhcp_option43_aerohive_suboption, |
8779 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.aerohive.suboption", |
8780 | 14 | FT_UINT8, BASE_DEC, VALS(option43_aerohive_suboption_vals), 0x0, |
8781 | 14 | "Option 43:AEROHIVE Suboption", HFILL }}, |
8782 | | |
8783 | 14 | { &hf_dhcp_option43_aerohive_unknown, |
8784 | 14 | { "Unknown", "dhcp.option.vendor.aerohive.unknown", |
8785 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8786 | 14 | NULL, HFILL }}, |
8787 | | |
8788 | 14 | { &hf_dhcp_option43_aerohive_xiqhostname, |
8789 | 14 | { "HM FQDN", "dhcp.option.vendor.aerohive.xiqhostname", |
8790 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8791 | 14 | "Hive Manager NG FQDN", HFILL }}, |
8792 | | |
8793 | 14 | { &hf_dhcp_option43_aerohive_xiqipaddress, |
8794 | 14 | { "HM IP", "dhcp.option.vendor.aerohive.xiqipaddress", |
8795 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8796 | 14 | "Hive Manager NG IP address", HFILL }}, |
8797 | | |
8798 | | |
8799 | 14 | { &hf_dhcp_option43_cl_suboption, |
8800 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.cl.suboption", |
8801 | 14 | FT_UINT8, BASE_DEC, VALS(option43_cl_suboption_vals), 0x0, |
8802 | 14 | "Option 43:CL Suboption", HFILL }}, |
8803 | | |
8804 | 14 | { &hf_dhcp_option43_cl_padding, |
8805 | 14 | { "Padding", "dhcp.option.vendor.cl.padding", |
8806 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8807 | 14 | "Option 43:CL 0 Padding", HFILL }}, |
8808 | | |
8809 | 14 | { &hf_dhcp_option43_cl_suboption_request_list, |
8810 | 14 | { "Suboption Request List", "dhcp.option.vendor.cl.suboption_request_list", |
8811 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8812 | 14 | "Option 43:CL 1 Suboption Request List", HFILL }}, |
8813 | | |
8814 | 14 | { &hf_dhcp_option43_cl_device_type, |
8815 | 14 | { "Device Type", "dhcp.option.vendor.cl.device_type", |
8816 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8817 | 14 | "Option 43:CL 2 Device Type", HFILL }}, |
8818 | | |
8819 | 14 | { &hf_dhcp_option43_cl_esafe_type, |
8820 | 14 | { "eSAFE Types", "dhcp.option.vendor.cl.esafe_type", |
8821 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8822 | 14 | "Option 43:CL 3 eSAFE Types", HFILL }}, |
8823 | | |
8824 | 14 | { &hf_dhcp_option43_cl_serial_number, |
8825 | 14 | { "Serial Number", "dhcp.option.vendor.cl.serial_number", |
8826 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8827 | 14 | "Option 43:CL 4 Serial Number", HFILL }}, |
8828 | | |
8829 | 14 | { &hf_dhcp_option43_cl_hardware_version, |
8830 | 14 | { "Hardware Version", "dhcp.option.vendor.cl.hardware_version", |
8831 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8832 | 14 | "Option 43:CL 5 Hardware Version", HFILL }}, |
8833 | | |
8834 | 14 | { &hf_dhcp_option43_cl_software_version, |
8835 | 14 | { "Software Version", "dhcp.option.vendor.cl.software_version", |
8836 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8837 | 14 | "Option 43:CL 6 Software Version", HFILL }}, |
8838 | | |
8839 | 14 | { &hf_dhcp_option43_cl_boot_rom_version, |
8840 | 14 | { "Boot ROM version", "dhcp.option.vendor.cl.boot_rom_version", |
8841 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8842 | 14 | "Option 43:CL 7 Boot ROM version", HFILL }}, |
8843 | | |
8844 | 14 | { &hf_dhcp_option43_cl_oui_string, |
8845 | 14 | { "Organizationally Unique Identifier", "dhcp.option.vendor.cl.oui_string", |
8846 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8847 | 14 | "Option 43:CL 8 Organizationally Unique Identifier", HFILL }}, |
8848 | | |
8849 | 14 | { &hf_dhcp_option43_cl_oui_bytes, |
8850 | 14 | { "Organizationally Unique Identifier", "dhcp.option.vendor.cl.oui_bytes", |
8851 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8852 | 14 | "Option 43:CL 8 Organizationally Unique Identifier", HFILL }}, |
8853 | | |
8854 | 14 | { &hf_dhcp_option43_cl_model_number, |
8855 | 14 | { "Model Number", "dhcp.option.vendor.cl.model_number", |
8856 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8857 | 14 | "Option 43:CL 9 Model Number", HFILL }}, |
8858 | | |
8859 | 14 | { &hf_dhcp_option43_cl_vendor_name10, |
8860 | 14 | { "Vendor Name", "dhcp.option.vendor.cl.vendor_name10", |
8861 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8862 | 14 | "Option 43:CL 10 Vendor Name", HFILL }}, |
8863 | | |
8864 | 14 | { &hf_dhcp_option43_cl_address_realm, |
8865 | 14 | { "Address Realm", "dhcp.option.vendor.cl.address_realm", |
8866 | 14 | FT_UINT8, BASE_DEC, VALS(cablehome_subopt11_vals), 0x0, |
8867 | 14 | "Option 43:CL 11 Address Realm", HFILL }}, |
8868 | | |
8869 | 14 | { &hf_dhcp_option43_cl_cm_ps_system_desc, |
8870 | 14 | { "CM/PS System Description", "dhcp.option.vendor.cl.cm_ps_system_desc", |
8871 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8872 | 14 | "Option 43:CL 12 CM/PS System Description", HFILL }}, |
8873 | | |
8874 | 14 | { &hf_dhcp_option43_cl_cm_ps_firmware_revision, |
8875 | 14 | { "CM/PS Firmware Revision", "dhcp.option.vendor.cl.cm_ps_firmware_revision", |
8876 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8877 | 14 | "Option 43:CL 13 CM/PS Firmware Revision", HFILL }}, |
8878 | | |
8879 | 14 | { &hf_dhcp_option43_cl_firewall_policy_file_version, |
8880 | 14 | { "Firewall Policy File Version", "dhcp.option.vendor.cl.firewall_policy_file_version", |
8881 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8882 | 14 | "Option 43:CL 14 Firewall Policy File Version", HFILL }}, |
8883 | | |
8884 | 14 | { &hf_dhcp_option43_cl_esafe_config_file_devices, |
8885 | 14 | { "eSafe Config File Devices", "dhcp.option.vendor.cl.esafe_config_file_devices", |
8886 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8887 | 14 | "Option 43:CL 15 eSafe Config File Devices", HFILL }}, |
8888 | | |
8889 | 14 | { &hf_dhcp_option43_cl_video_security_tape, |
8890 | 14 | { "Video Security Type", "dhcp.option.vendor.cl.video_security_tape", |
8891 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8892 | 14 | "Option 43:CL 18 Video Security Type", HFILL }}, |
8893 | | |
8894 | 14 | { &hf_dhcp_option43_cl_mta_mac_address, |
8895 | 14 | { "MTA MAC Address", "dhcp.option.vendor.cl.mta_mac_address", |
8896 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
8897 | 14 | "Option 43:CL 31 MTA MAC Address", HFILL }}, |
8898 | | |
8899 | 14 | { &hf_dhcp_option43_cl_correlation_ID, |
8900 | 14 | { "Correlation ID", "dhcp.option.vendor.cl.correlation_ID", |
8901 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8902 | 14 | "Option 43: CL 32 Correlation ID", HFILL }}, |
8903 | | |
8904 | 14 | { &hf_dhcp_option43_cl_vendor_name51, |
8905 | 14 | { "Vendor Name", "dhcp.option.vendor.cl.vendor_name51", |
8906 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8907 | 14 | "Option 43:CL 51 Vendor Name", HFILL }}, |
8908 | | |
8909 | 14 | { &hf_dhcp_option43_cl_cablecard_capability, |
8910 | 14 | { "CableCARD Capability", "dhcp.option.vendor.cl.cablecard_capability", |
8911 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8912 | 14 | "Option 43:CL 52 CableCARD Capability", HFILL }}, |
8913 | | |
8914 | 14 | { &hf_dhcp_option43_cl_device_id_ca, |
8915 | 14 | { "Device Identification (CA)", "dhcp.option.vendor.cl.device_id_ca", |
8916 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8917 | 14 | "Option 43:CL 53 Device Identification (CA)", HFILL }}, |
8918 | | |
8919 | 14 | { &hf_dhcp_option43_cl_device_id_x509, |
8920 | 14 | { "Device Identification (X.509)", "dhcp.option.vendor.cl.device_id_x509", |
8921 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8922 | 14 | "Option 43:CL 54 Device Identification (X.509)", HFILL }}, |
8923 | | |
8924 | 14 | { &hf_dhcp_option43_cl_end, |
8925 | 14 | { "CL End", "dhcp.option.vendor.cl.end", |
8926 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8927 | 14 | "Option 43:CL 255 End", HFILL }}, |
8928 | | |
8929 | | |
8930 | 14 | { &hf_dhcp_option43_alcatel_suboption, |
8931 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.alu.suboption", |
8932 | 14 | FT_UINT8, BASE_DEC, VALS(option43_alcatel_suboption_vals), 0x0, |
8933 | 14 | "Option 43:Alcatel Suboption", HFILL }}, |
8934 | | |
8935 | 14 | { &hf_dhcp_option43_alcatel_padding, |
8936 | 14 | { "Padding", "dhcp.option.vendor.alu.padding", |
8937 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8938 | 14 | "Option 43:Alcatel 0 Padding", HFILL }}, |
8939 | | |
8940 | 14 | { &hf_dhcp_option43_alcatel_vlan_id, |
8941 | 14 | { "Voice VLAN ID", "dhcp.option.vendor.alu.vid", |
8942 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8943 | 14 | "Option 43:Alcatel 58 Voice VLAN ID", HFILL }}, |
8944 | | |
8945 | 14 | { &hf_dhcp_option43_alcatel_tftp1, |
8946 | 14 | { "Spatial Redundancy TFTP1", "dhcp.option.vendor.alu.tftp1", |
8947 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8948 | 14 | "Option 43:Alcatel 64 Spatial Redundancy TFTP1", HFILL }}, |
8949 | | |
8950 | 14 | { &hf_dhcp_option43_alcatel_tftp2, |
8951 | 14 | { "Spatial Redundancy TFTP2", "dhcp.option.vendor.alu.tftp2", |
8952 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8953 | 14 | "Option 43:Alcatel 65 Spatial Redundancy TFTP2", HFILL }}, |
8954 | | |
8955 | 14 | { &hf_dhcp_option43_alcatel_app_type, |
8956 | 14 | { "Application Type", "dhcp.option.vendor.alu.app_type", |
8957 | 14 | FT_UINT8, BASE_DEC, VALS(option43_alcatel_app_type_vals), 0x0, |
8958 | 14 | "Option 43:Alcatel 66 Application Type", HFILL }}, |
8959 | | |
8960 | 14 | { &hf_dhcp_option43_alcatel_sip_url, |
8961 | 14 | { "SIP URL", "dhcp.option.vendor.alu.sip_url", |
8962 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8963 | 14 | "Option 43:Alcatel 67 SIP URL", HFILL }}, |
8964 | | |
8965 | 14 | { &hf_dhcp_option43_alcatel_end, |
8966 | 14 | { "Alcatel End", "dhcp.option.vendor.alu.end", |
8967 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8968 | 14 | "Option 43:Alcatel 255 End", HFILL }}, |
8969 | | |
8970 | 14 | { &hf_dhcp_option43_arubaap_controllerip, |
8971 | 14 | { "Aruba Controller IP", "dhcp.option.vendor.arubaap.controllerip", |
8972 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8973 | 14 | "Address IP of Aruba controller", HFILL }}, |
8974 | | |
8975 | 14 | { &hf_dhcp_option43_arubaiap, |
8976 | 14 | { "Aruba Instant AP", "dhcp.option.vendor.arubaiap", |
8977 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8978 | 14 | "nameorg,amp-ip-address,password", HFILL }}, |
8979 | | |
8980 | 14 | { &hf_dhcp_option43_arubaiap_nameorg, |
8981 | 14 | { "Name Organisation", "dhcp.option.vendor.arubaiap.name_org", |
8982 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8983 | 14 | NULL, HFILL }}, |
8984 | | |
8985 | 14 | { &hf_dhcp_option43_arubaiap_ampip, |
8986 | 14 | { "AMP IP Address", "dhcp.option.vendor.arubaiap.amp_ip", |
8987 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8988 | 14 | "Address IP of Airwave server (AMP)", HFILL }}, |
8989 | | |
8990 | 14 | { &hf_dhcp_option43_arubaiap_password, |
8991 | 14 | { "Password", "dhcp.option.vendor.arubaiap.password", |
8992 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8993 | 14 | "Password for Instant AP Airwave server (AMP)", HFILL }}, |
8994 | | |
8995 | | |
8996 | 14 | { &hf_dhcp_option43_bsdp_suboption, |
8997 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.bsdp.suboption", |
8998 | 14 | FT_UINT8, BASE_DEC, VALS(option43_cl_suboption_vals), 0x0, |
8999 | 14 | "Option 43:BSDP Suboption", HFILL }}, |
9000 | | |
9001 | 14 | { &hf_dhcp_option43_bsdp_message_type, |
9002 | 14 | { "Message Type", "dhcp.option.vendor.bsdp.message_type", |
9003 | 14 | FT_UINT8, BASE_DEC, VALS(o43_bsdp_message_type_vals), 0x0, |
9004 | 14 | NULL, HFILL }}, |
9005 | | |
9006 | 14 | { &hf_dhcp_option43_bsdp_version, |
9007 | 14 | { "Version", "dhcp.option.vendor.bsdp.version", |
9008 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9009 | 14 | NULL, HFILL }}, |
9010 | | |
9011 | 14 | { &hf_dhcp_option43_bsdp_server_identifier, |
9012 | 14 | { "Server Identifier", "dhcp.option.vendor.bsdp.server_identifier", |
9013 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
9014 | 14 | NULL, HFILL }}, |
9015 | | |
9016 | 14 | { &hf_dhcp_option43_bsdp_server_priority, |
9017 | 14 | { "Server Priority", "dhcp.option.vendor.bsdp.server_priority", |
9018 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9019 | 14 | NULL, HFILL }}, |
9020 | | |
9021 | 14 | { &hf_dhcp_option43_bsdp_reply_port, |
9022 | 14 | { "Reply Port", "dhcp.option.vendor.bsdp.reply_port", |
9023 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9024 | 14 | NULL, HFILL }}, |
9025 | | |
9026 | 14 | { &hf_dhcp_option43_bsdp_boot_image_list_path, |
9027 | 14 | { "Boot Image List Path", "dhcp.option.vendor.bsdp.boot_image_list_path", |
9028 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9029 | 14 | NULL, HFILL }}, |
9030 | | |
9031 | 14 | { &hf_dhcp_option43_bsdp_boot_image_index, |
9032 | 14 | { "Boot Image Index", "dhcp.option.vendor.bsdp.boot_image.index", |
9033 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9034 | 14 | NULL, HFILL }}, |
9035 | | |
9036 | 14 | { &hf_dhcp_option43_bsdp_default_boot_image_id, |
9037 | 14 | { "Default Boot Image ID", "dhcp.option.vendor.bsdp.default_boot_image_id", |
9038 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9039 | 14 | NULL, HFILL }}, |
9040 | | |
9041 | 14 | { &hf_dhcp_option43_bsdp_selected_boot_image_id, |
9042 | 14 | { "Selected Boot Image ID", "dhcp.option.vendor.bsdp.selected_boot_image_id", |
9043 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9044 | 14 | NULL, HFILL }}, |
9045 | | |
9046 | 14 | { &hf_dhcp_option43_bsdp_boot_image_list, |
9047 | 14 | { "Boot Image List", "dhcp.option.vendor.bsdp.boot_image_list", |
9048 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9049 | 14 | NULL, HFILL }}, |
9050 | | |
9051 | 14 | { &hf_dhcp_option43_bsdp_image_desc, |
9052 | 14 | { "Boot Image Description", "dhcp.option.vendor.bsdp.boot_image.desc", |
9053 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9054 | 14 | NULL, HFILL }}, |
9055 | | |
9056 | 14 | { &hf_dhcp_option43_bsdp_boot_image_name_len, |
9057 | 14 | { "Boot Image Name Length", "dhcp.option.vendor.bsdp.boot_image.name_len", |
9058 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9059 | 14 | NULL, HFILL }}, |
9060 | | |
9061 | 14 | { &hf_dhcp_option43_bsdp_boot_image_name, |
9062 | 14 | { "Boot Image Name", "dhcp.option.vendor.bsdp.boot_image.name", |
9063 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9064 | 14 | NULL, HFILL }}, |
9065 | | |
9066 | 14 | { &hf_dhcp_option43_bsdp_netboot_firmware, |
9067 | 14 | { "NetBoot 1.0 Firmware", "dhcp.option.vendor.bsdp.netboot_firmware", |
9068 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
9069 | 14 | NULL, HFILL }}, |
9070 | | |
9071 | 14 | { &hf_dhcp_option43_bsdp_attributes_filter_list, |
9072 | 14 | { "Boot Image Attributes Filter List", "dhcp.option.vendor.bsdp.attributes_filter_list", |
9073 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9074 | 14 | NULL, HFILL }}, |
9075 | | |
9076 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute, |
9077 | 14 | { "Boot Image Attribute", "dhcp.option.vendor.bsdp.boot_image.attribute", |
9078 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9079 | 14 | NULL, HFILL }}, |
9080 | | |
9081 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute_install, |
9082 | 14 | { "Install", "dhcp.option.vendor.bsdp.boot_image.attribute.install", |
9083 | 14 | FT_UINT16, BASE_HEX, VALS(o43_bsdp_boot_image_install_vals), 0x8000, |
9084 | 14 | "Boot Image Attribute Install", HFILL }}, |
9085 | | |
9086 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute_kind, |
9087 | 14 | { "Kind", "dhcp.option.vendor.bsdp.boot_image.attribute.kind", |
9088 | 14 | FT_UINT16, BASE_HEX, VALS(o43_bsdp_boot_image_kind_vals), 0x7f00, |
9089 | 14 | "Boot Image Attribute Kind", HFILL }}, |
9090 | | |
9091 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute_reserved, |
9092 | 14 | { "Reserved", "dhcp.option.vendor.bsdp.boot_image.attribute.reserved", |
9093 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00ff, |
9094 | 14 | "Boot Image Attribute Reserved", HFILL }}, |
9095 | | |
9096 | 14 | { &hf_dhcp_option43_bsdp_message_size, |
9097 | 14 | { "Message Size", "dhcp.option.vendor.bsdp.message_size", |
9098 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9099 | 14 | NULL, HFILL }}, |
9100 | | |
9101 | | |
9102 | 14 | { &hf_dhcp_option_netbios_over_tcpip_name_server, |
9103 | 14 | { "NetBIOS over TCP/IP Name Server", "dhcp.option.netbios_over_tcpip_name_server", |
9104 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9105 | 14 | "Option 44: NetBIOS over TCP/IP Name Server", HFILL }}, |
9106 | | |
9107 | 14 | { &hf_dhcp_option_netbios_over_tcpip_dd_name_server, |
9108 | 14 | { "NetBIOS over TCP/IP Datagram Distribution Name Server", "dhcp.option.netbios_over_tcpip_dd_name_server", |
9109 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9110 | 14 | "Option 45: NetBIOS over TCP/IP Datagram Distribution Name Server", HFILL }}, |
9111 | | |
9112 | 14 | { &hf_dhcp_option_netbios_over_tcpip_node_type, |
9113 | 14 | { "NetBIOS over TCP/IP Node Type", "dhcp.option.netbios_over_tcpip_node_type", |
9114 | 14 | FT_UINT8, BASE_DEC, VALS(dhcp_nbnt_vals), 0x0, |
9115 | 14 | "Option 46: NetBIOS over TCP/IP Node Type", HFILL }}, |
9116 | | |
9117 | 14 | { &hf_dhcp_option_netbios_over_tcpip_scope, |
9118 | 14 | { "NetBIOS over TCP/IP Scope", "dhcp.option.netbios_over_tcpip_scope", |
9119 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9120 | 14 | "Option 47: NetBIOS over TCP/IP Scope", HFILL }}, |
9121 | | |
9122 | 14 | { &hf_dhcp_option_xwindows_system_font_server, |
9123 | 14 | { "X Window System Font Server", "dhcp.option.xwindows_system_font_server", |
9124 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9125 | 14 | "Option 48: X Window System Font Server", HFILL }}, |
9126 | | |
9127 | 14 | { &hf_dhcp_option_xwindows_system_display_manager, |
9128 | 14 | { "X Window System Display Manager", "dhcp.option.xwindows_system_display_manager", |
9129 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9130 | 14 | "Option 49: X Window System Display Manager", HFILL }}, |
9131 | | |
9132 | 14 | { &hf_dhcp_option_requested_ip_address, |
9133 | 14 | { "Requested IP Address", "dhcp.option.requested_ip_address", |
9134 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9135 | 14 | "Option 50: Requested IP Address", HFILL }}, |
9136 | | |
9137 | 14 | { &hf_dhcp_option_ip_address_lease_time, |
9138 | 14 | { "IP Address Lease Time", "dhcp.option.ip_address_lease_time", |
9139 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9140 | 14 | "Option 51: IP Address Lease Time", HFILL }}, |
9141 | | |
9142 | 14 | { &hf_dhcp_option_option_overload, |
9143 | 14 | { "Option Overload", "dhcp.option.option_overload", |
9144 | 14 | FT_UINT8, BASE_DEC, VALS(opt_overload_vals), 0x0, |
9145 | 14 | "Option 52: Option Overload", HFILL }}, |
9146 | | |
9147 | 14 | { &hf_dhcp_option_dhcp, |
9148 | 14 | { "DHCP", "dhcp.option.dhcp", |
9149 | 14 | FT_UINT8, BASE_DEC, VALS(opt53_text), 0x0, |
9150 | 14 | "Option 53: DHCP option", HFILL }}, |
9151 | | |
9152 | 14 | { &hf_dhcp_option_dhcp_server_id, |
9153 | 14 | { "DHCP Server Identifier", "dhcp.option.dhcp_server_id", |
9154 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9155 | 14 | "Option 54: DHCP Server Identifier", HFILL }}, |
9156 | | |
9157 | 14 | { &hf_dhcp_option_parameter_request_list_item, |
9158 | 14 | { "Parameter Request List Item", "dhcp.option.request_list_item", |
9159 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9160 | 14 | "Option 55: Parameter Request List Item", HFILL }}, |
9161 | | |
9162 | 14 | { &hf_dhcp_option_message, |
9163 | 14 | { "Message", "dhcp.option.message", |
9164 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9165 | 14 | "Option 56: Option message", HFILL }}, |
9166 | | |
9167 | 14 | { &hf_dhcp_option_dhcp_max_message_size, |
9168 | 14 | { "Maximum DHCP Message Size", "dhcp.option.dhcp_max_message_size", |
9169 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9170 | 14 | "Option 57: Maximum DHCP Message Size", HFILL }}, |
9171 | | |
9172 | 14 | { &hf_dhcp_option_renewal_time_value, |
9173 | 14 | { "Renewal Time Value", "dhcp.option.renewal_time_value", |
9174 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9175 | 14 | "Option 58: Renewal Time Value", HFILL }}, |
9176 | | |
9177 | 14 | { &hf_dhcp_option_rebinding_time_value, |
9178 | 14 | { "Rebinding Time Value", "dhcp.option.rebinding_time_value", |
9179 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9180 | 14 | "Option 59: Rebinding Time Value", HFILL }}, |
9181 | | |
9182 | 14 | { &hf_dhcp_option_vendor_class_id, |
9183 | 14 | { "Vendor class identifier", "dhcp.option.vendor_class_id", |
9184 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9185 | 14 | "Option 60: Vendor class identifier", HFILL }}, |
9186 | | |
9187 | 14 | { &hf_dhcp_option_vendor_class_data, |
9188 | 14 | { "vendor-class-data", "dhcp.option.vendor_class_data", |
9189 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9190 | 14 | "Option 60: Vendor class data", HFILL }}, |
9191 | | |
9192 | 14 | { &hf_dhcp_option_novell_netware_ip_domain, |
9193 | 14 | { "Novell/Netware IP domain", "dhcp.option.novell_netware_ip_domain", |
9194 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9195 | 14 | "Option 62: Novell/Netware IP domain", HFILL }}, |
9196 | | |
9197 | 14 | { &hf_dhcp_option63_suboption, |
9198 | 14 | { "Option 63 Suboption", "dhcp.option.novell_options.suboption", |
9199 | 14 | FT_UINT8, BASE_DEC, VALS(option63_suboption_vals), 0x0, |
9200 | 14 | "Option 63: Suboption", HFILL }}, |
9201 | | |
9202 | 14 | { &hf_dhcp_option63_value, |
9203 | 14 | { "Value", "dhcp.option.novell_options.value", |
9204 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9205 | 14 | "Option 63: Suboption value", HFILL }}, |
9206 | | |
9207 | 14 | { &hf_dhcp_option63_value_8, |
9208 | 14 | { "Value", "dhcp.option.novell_options.value.uint", |
9209 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9210 | 14 | "Option 63: Suboption 8-bit value", HFILL }}, |
9211 | | |
9212 | 14 | { &hf_dhcp_option63_value_ip_address, |
9213 | 14 | { "Value", "dhcp.option.novell_options.value.address", |
9214 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9215 | 14 | "Option 63: Suboption IP address", HFILL }}, |
9216 | | |
9217 | 14 | { &hf_dhcp_option63_value_boolean, |
9218 | 14 | { "Value", "dhcp.option.novell_options.value.bool", |
9219 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x00, |
9220 | 14 | "Option 63: Suboption Boolean value", HFILL }}, |
9221 | | |
9222 | 14 | { &hf_dhcp_option63_broadcast, |
9223 | 14 | { "Broadcast for nearest Netware server", "dhcp.option.novell_options.broadcast", |
9224 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
9225 | 14 | "Option 63:5 Broadcast for nearest Netware server", HFILL }}, |
9226 | | |
9227 | 14 | { &hf_dhcp_option63_preferred_dss_server, |
9228 | 14 | { "Preferred DSS server", "dhcp.option.novell_options.preferred_dss_server", |
9229 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9230 | 14 | "Option 63:6 Preferred DSS server", HFILL }}, |
9231 | | |
9232 | 14 | { &hf_dhcp_option63_nearest_nwip_server, |
9233 | 14 | { "Nearest NWIP server", "dhcp.option.novell_options.nearest_nwip_server", |
9234 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9235 | 14 | "Option 63:7 Nearest NWIP server", HFILL }}, |
9236 | | |
9237 | 14 | { &hf_dhcp_option63_autoretries, |
9238 | 14 | { "Autoretries", "dhcp.option.novell_options.autoretries", |
9239 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9240 | 14 | "Option 63:8 Autoretries", HFILL }}, |
9241 | | |
9242 | 14 | { &hf_dhcp_option63_autoretry_delay, |
9243 | 14 | { "Autoretry delay, sec", |
9244 | 14 | "dhcp.option.novell_options.autoretry_delay", FT_UINT8, BASE_DEC, NULL, |
9245 | 14 | 0x0, "Option 63:9 Autoretry delay, sec", HFILL }}, |
9246 | | |
9247 | 14 | { &hf_dhcp_option63_support_netware_v1_1, |
9248 | 14 | { "Broadcast for nearest Netware server", "dhcp.option.novell_options.support_netware_v1_1", |
9249 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
9250 | 14 | "Option 63:10 Broadcast for nearest Netware server", HFILL }}, |
9251 | | |
9252 | 14 | { &hf_dhcp_option63_primary_dss, |
9253 | 14 | { "Primary DSS", "dhcp.option.novell_options.primary_dss", |
9254 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9255 | 14 | "Option 63:11 Primary DSS", HFILL }}, |
9256 | | |
9257 | | |
9258 | 14 | { &hf_dhcp_option_nis_plus_domain, |
9259 | 14 | { "Network Information Service+ Domain", "dhcp.option.nis_plus_domain", |
9260 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9261 | 14 | "Option 64: Network Information Service+ Domain", HFILL }}, |
9262 | | |
9263 | 14 | { &hf_dhcp_option_nis_plus_server, |
9264 | 14 | { "Network Information Service+ Server", "dhcp.option.nis_plus_server", |
9265 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9266 | 14 | "Option 65: Network Information Service+ Server", HFILL }}, |
9267 | | |
9268 | 14 | { &hf_dhcp_option_tftp_server_name, |
9269 | 14 | { "TFTP Server Name", "dhcp.option.tftp_server_name", |
9270 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9271 | 14 | "Option 66: TFTP Server Name", HFILL }}, |
9272 | | |
9273 | 14 | { &hf_dhcp_option_bootfile_name, |
9274 | 14 | { "Bootfile name", "dhcp.option.bootfile_name", |
9275 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9276 | 14 | "Option 67: Bootfile name", HFILL }}, |
9277 | | |
9278 | 14 | { &hf_dhcp_option_mobile_ip_home_agent, |
9279 | 14 | { "Mobile IP Home Agent", "dhcp.option.mobile_ip_home_agent", |
9280 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9281 | 14 | "Option 68: Mobile IP Home Agent", HFILL }}, |
9282 | | |
9283 | 14 | { &hf_dhcp_option_smtp_server, |
9284 | 14 | { "SMTP Server", "dhcp.option.smtp_server", |
9285 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9286 | 14 | "Option 69: SMTP Server", HFILL }}, |
9287 | | |
9288 | 14 | { &hf_dhcp_option_pop3_server, |
9289 | 14 | { "POP3 Server", "dhcp.option.pop3_server", |
9290 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9291 | 14 | "Option 70: POP3 Server", HFILL }}, |
9292 | | |
9293 | 14 | { &hf_dhcp_option_nntp_server, |
9294 | 14 | { "NNTP Server", "dhcp.option.nntp_server", |
9295 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9296 | 14 | "Option 71: NNTP Server", HFILL }}, |
9297 | | |
9298 | 14 | { &hf_dhcp_option_default_www_server, |
9299 | 14 | { "Default WWW Server", "dhcp.option.default_www_server", |
9300 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9301 | 14 | "Option 72: Default WWW Server", HFILL }}, |
9302 | | |
9303 | 14 | { &hf_dhcp_option_default_finger_server, |
9304 | 14 | { "Default Finger Server", "dhcp.option.default_finger_server", |
9305 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9306 | 14 | "Option 73: Default Finger Server", HFILL }}, |
9307 | | |
9308 | 14 | { &hf_dhcp_option_default_irc_server, |
9309 | 14 | { "Default IRC Server", "dhcp.option.default_irc_server", |
9310 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9311 | 14 | "Option 74: Default IRC Server", HFILL }}, |
9312 | | |
9313 | 14 | { &hf_dhcp_option_streettalk_server, |
9314 | 14 | { "StreetTalk Server", "dhcp.option.streettalk_server", |
9315 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9316 | 14 | "Option 75: StreetTalk Server", HFILL }}, |
9317 | | |
9318 | 14 | { &hf_dhcp_option_streettalk_da_server, |
9319 | 14 | { "StreetTalk Directory Assistance Server", "dhcp.option.streettalk_da_server", |
9320 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9321 | 14 | "Option 76: StreetTalk Directory Assistance Server", HFILL }}, |
9322 | | |
9323 | 14 | { &hf_dhcp_option77_user_class, |
9324 | 14 | { "Instance of User Class", "dhcp.option.user_class", |
9325 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9326 | 14 | NULL, HFILL }}, |
9327 | | |
9328 | 14 | { &hf_dhcp_option77_user_class_length, |
9329 | 14 | { "User Class Length", "dhcp.option.user_class.length", |
9330 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9331 | 14 | "Length of User Class Instance", HFILL }}, |
9332 | | |
9333 | 14 | { &hf_dhcp_option77_user_class_data, |
9334 | 14 | { "User Class Data", "dhcp.option.user_class.data", |
9335 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9336 | 14 | "Data of User Class Instance", HFILL }}, |
9337 | | |
9338 | 14 | { &hf_dhcp_option77_user_class_text, |
9339 | 14 | { "User Class Data (Text)", "dhcp.option.user_class.text", |
9340 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9341 | 14 | "Text of User Class Instance", HFILL }}, |
9342 | | |
9343 | 14 | { &hf_dhcp_option77_user_class_binary_data_length, |
9344 | 14 | { "User Class Binary Data Length", "dhcp.option.user_class_binary_data_length", |
9345 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9346 | 14 | "Length of User Class Binary Data (Microsoft)", HFILL }}, |
9347 | | |
9348 | 14 | { &hf_dhcp_option77_user_class_binary_data, |
9349 | 14 | { "User Class Binary Data", "dhcp.option.user_class_binary_data", |
9350 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9351 | 14 | "User Class Binary Data (Microsoft)", HFILL }}, |
9352 | | |
9353 | 14 | { &hf_dhcp_option77_user_class_padding, |
9354 | 14 | { "User Class padding", "dhcp.option.user_class_padding", |
9355 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9356 | 14 | "User Class padding (Microsoft)", HFILL }}, |
9357 | | |
9358 | 14 | { &hf_dhcp_option77_user_class_name_length, |
9359 | 14 | { "User Class Name Length", "dhcp.option.user_class_name_length", |
9360 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9361 | 14 | "Length of User Class Name (Microsoft)", HFILL }}, |
9362 | | |
9363 | 14 | { &hf_dhcp_option77_user_class_name, |
9364 | 14 | { "User Class Name", "dhcp.option.user_class_name", |
9365 | 14 | FT_STRINGZPAD, BASE_NONE, NULL, 0x0, |
9366 | 14 | "User Class Name (Microsoft)", HFILL }}, |
9367 | | |
9368 | 14 | { &hf_dhcp_option77_user_class_description_length, |
9369 | 14 | { "User Class Description Length", "dhcp.option.user_class_description_length", |
9370 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9371 | 14 | "Length of User Class Description (Microsoft)", HFILL }}, |
9372 | | |
9373 | 14 | { &hf_dhcp_option77_user_class_description, |
9374 | 14 | { "User Class Description", "dhcp.option.user_class_description", |
9375 | 14 | FT_STRINGZPAD, BASE_NONE, NULL, 0x0, |
9376 | 14 | "User Class Description (Microsoft)", HFILL }}, |
9377 | | |
9378 | 14 | { &hf_dhcp_option_slp_directory_agent_value, |
9379 | 14 | { "Value", "dhcp.option.slp_directory_agent.value", |
9380 | 14 | FT_UINT8, BASE_DEC, VALS(slpda_vals), 0x0, |
9381 | 14 | "Option 78: SLPDA Value", HFILL }}, |
9382 | | |
9383 | 14 | { &hf_dhcp_option_slp_directory_agent_slpda_address, |
9384 | 14 | { "IP Address", "dhcp.option.slp_directory_agent.slpda_address", |
9385 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9386 | 14 | "Option 78: SLPDA Address", HFILL }}, |
9387 | | |
9388 | 14 | { &hf_dhcp_option_slp_service_scope_value, |
9389 | 14 | { "Value", "dhcp.option.slp_service_scope.value", |
9390 | 14 | FT_UINT8, BASE_DEC, VALS(slp_scope_vals), 0x0, |
9391 | 14 | "Option 79: SLP Service Scope Value", HFILL }}, |
9392 | | |
9393 | 14 | { &hf_dhcp_option_slp_service_scope_string, |
9394 | 14 | { "SLP Service Scope", "dhcp.option.slp_service_scope.string", |
9395 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9396 | 14 | "Option 79: SLP Service Scope", HFILL }}, |
9397 | | |
9398 | | |
9399 | 14 | { &hf_dhcp_option82_suboption, |
9400 | 14 | { "Option 82 Suboption", "dhcp.option.agent_information_option.suboption", |
9401 | 14 | FT_UINT8, BASE_DEC, VALS(option82_suboption_vals), 0x0, |
9402 | 14 | "Option 82: Suboption", HFILL }}, |
9403 | | |
9404 | 14 | { &hf_dhcp_option82_value, |
9405 | 14 | { "Value", "dhcp.option.agent_information_option.value", |
9406 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9407 | 14 | "Option 82: Suboption value", HFILL }}, |
9408 | | |
9409 | 14 | { &hf_dhcp_option82_value_8, |
9410 | 14 | { "Value", "dhcp.option.agent_information_option.value.uint", |
9411 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9412 | 14 | "Option 82: Suboption 8-bit value", HFILL }}, |
9413 | | |
9414 | 14 | { &hf_dhcp_option82_value_16, |
9415 | 14 | { "Value", "dhcp.option.agent_information_option.value.uint", |
9416 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9417 | 14 | "Option 162: Suboption 16-bit value", HFILL }}, |
9418 | | |
9419 | 14 | { &hf_dhcp_option82_value_32, |
9420 | 14 | { "Value", "dhcp.option.agent_information_option.value.uint", |
9421 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9422 | 14 | "Option 82: Suboption 32-bit value", HFILL }}, |
9423 | | |
9424 | 14 | { &hf_dhcp_option82_value_ip_address, |
9425 | 14 | { "Value", "dhcp.option.agent_information_option.value.address", |
9426 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9427 | 14 | "Option 82: Suboption IP address", HFILL }}, |
9428 | | |
9429 | 14 | { &hf_dhcp_option82_value_stringz, |
9430 | 14 | { "Value", "dhcp.option.agent_information_option.value.string", |
9431 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9432 | 14 | "Option 82: Suboption Z-String value", HFILL }}, |
9433 | | |
9434 | 14 | { &hf_dhcp_option82_padding, |
9435 | 14 | { "Padding", "dhcp.option.agent_information_option.padding", |
9436 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9437 | 14 | "Option 82:0 Padding", HFILL }}, |
9438 | | |
9439 | 14 | { &hf_dhcp_option82_agent_circuit_id, |
9440 | 14 | { "Agent Circuit ID", "dhcp.option.agent_information_option.agent_circuit_id", |
9441 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9442 | 14 | "Option 82:1 Agent Circuit ID", HFILL }}, |
9443 | | |
9444 | 14 | { &hf_dhcp_option82_agent_remote_id, |
9445 | 14 | { "Agent Remote ID", "dhcp.option.agent_information_option.agent_remote_id", |
9446 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9447 | 14 | "Option 82:2 Agent Remote ID", HFILL }}, |
9448 | | |
9449 | 14 | { &hf_dhcp_option82_reserved, |
9450 | 14 | { "Reserved", "dhcp.option.agent_information_option.reserved", |
9451 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9452 | 14 | "Option 82:3 Reserved", HFILL }}, |
9453 | | |
9454 | 14 | { &hf_dhcp_option82_docsis_device_class, |
9455 | 14 | { "DOCSIS Device Class", "dhcp.option.agent_information_option.docsis_device_class", |
9456 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9457 | 14 | "Option 82:4 DOCSIS Device Class", HFILL }}, |
9458 | | |
9459 | 14 | { &hf_dhcp_option82_link_selection, |
9460 | 14 | { "Link selection", "dhcp.option.agent_information_option.link_selection", |
9461 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9462 | 14 | "Option 82:5 Link selection", HFILL }}, |
9463 | | |
9464 | 14 | { &hf_dhcp_option82_subscriber_id, |
9465 | 14 | { "Subscriber ID", "dhcp.option.agent_information_option.subscriber_id", |
9466 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9467 | 14 | "Option 82:6 Subscriber ID", HFILL }}, |
9468 | | |
9469 | 14 | { &hf_dhcp_option82_radius_attributes, |
9470 | 14 | { "RADIUS Attributes", "dhcp.option.agent_information_option.radius_attributes", |
9471 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9472 | 14 | "Option 82:7 RADIUS Attributes", HFILL }}, |
9473 | | |
9474 | 14 | { &hf_dhcp_option82_authentication, |
9475 | 14 | { "Authentication", "dhcp.option.agent_information_option.authentication", |
9476 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9477 | 14 | "Option 82:8 Authentication", HFILL }}, |
9478 | | |
9479 | 14 | { &hf_dhcp_option82_vi, |
9480 | 14 | { "Vendor-Specific Information", "dhcp.option.agent_information_option.vi", |
9481 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9482 | 14 | "Option 82:9 Vendor-Specific Information", HFILL }}, |
9483 | | |
9484 | 14 | { &hf_dhcp_option82_vi_enterprise, |
9485 | 14 | { "Enterprise", "dhcp.option.agent_information_option.vi.enterprise", |
9486 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, |
9487 | 14 | "Option 82:9 VI Enterprise", HFILL }}, |
9488 | | |
9489 | 14 | { &hf_dhcp_option82_vi_data_length, |
9490 | 14 | { "Data Length", "dhcp.option.agent_information_option.vi.data_length", |
9491 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9492 | 14 | "Option 82:9 VI Data Length", HFILL }}, |
9493 | | |
9494 | 14 | { &hf_dhcp_option82_vi_cl_option, |
9495 | 14 | { "Option", "dhcp.option.agent_information_option.vi.cl.option", |
9496 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9497 | 14 | "Option 82:9 VI CL Option", HFILL }}, |
9498 | | |
9499 | 14 | { &hf_dhcp_option82_vi_cl_option_length, |
9500 | 14 | { "Option Length", "dhcp.option.agent_information_option.vi.cl.option_length", |
9501 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9502 | 14 | "Option 82:9 VI CL Option Length", HFILL }}, |
9503 | | |
9504 | 14 | { &hf_dhcp_option82_vi_cl_tag, |
9505 | 14 | { "Tag", "dhcp.option.agent_information_option.vi.cl.tag", |
9506 | 14 | FT_UINT8, BASE_DEC, VALS(option82_cl_tag_vals), 0x0, |
9507 | 14 | "Option 82:9 VI CL Tag", HFILL }}, |
9508 | | |
9509 | 14 | { &hf_dhcp_option82_vi_cl_tag_length, |
9510 | 14 | { "Tag Length", "dhcp.option.agent_information_option.vi.cl.tag_length", |
9511 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9512 | 14 | "Option 82:9 VI CL Tag Length", HFILL }}, |
9513 | | |
9514 | 14 | { &hf_dhcp_option82_vi_cl_docsis_version, |
9515 | 14 | { "DOCSIS Version Number", "dhcp.option.agent_information_option.vi.cl.docsis_version", |
9516 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9517 | 14 | "Option 82:9 VI CL DOCSIS Version Number", HFILL }}, |
9518 | | |
9519 | 14 | { &hf_dhcp_option82_vi_cl_dpoe_system_version, |
9520 | 14 | { "DPoE System Version Number", "dhcp.option.agent_information_option.vi.cl.dpoe_system_version", |
9521 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9522 | 14 | "Option 82:9 VI CL DPoE System Version Number", HFILL }}, |
9523 | | |
9524 | 14 | { &hf_dhcp_option82_vi_cl_dpoe_system_pbb_service, |
9525 | 14 | { "DPoE System PBB Service", "dhcp.option.agent_information_option.vi.cl.dpoe_system_pbb_service", |
9526 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9527 | 14 | "Option 82:9 VI CL DPoE System PBB Service", HFILL }}, |
9528 | | |
9529 | 14 | { &hf_dhcp_option82_vi_cl_service_class_name, |
9530 | 14 | { "Service Class Name", "dhcp.option.agent_information_option.vi.cl.service_class_name", |
9531 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9532 | 14 | "Option 82:9 VI CL Service Class Name", HFILL }}, |
9533 | | |
9534 | 14 | { &hf_dhcp_option82_vi_cl_mso_defined_text, |
9535 | 14 | { "MSO Defined Text", "dhcp.option.agent_information_option.vi.cl.mso_defined_text", |
9536 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9537 | 14 | "Option 82:9 VI CL MSO Defined Text", HFILL }}, |
9538 | | |
9539 | 14 | { &hf_dhcp_option82_vi_cl_secure_file_transfer_uri, |
9540 | 14 | { "Secure File Transfer URI", "dhcp.option.agent_information_option.vi.cl.secure_file_transfer_uri", |
9541 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9542 | 14 | "Option 82:9 VI CL Secure File Transfer URI", HFILL }}, |
9543 | | |
9544 | 14 | { &hf_dhcp_option82_flags, |
9545 | 14 | { "Flags", "dhcp.option.agent_information_option.flags", |
9546 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0, |
9547 | 14 | "Option 82:10 Flags", HFILL }}, |
9548 | | |
9549 | 14 | { &hf_dhcp_option82_server_id_override, |
9550 | 14 | { "Server ID Override", "dhcp.option.agent_information_option.server_id_override", |
9551 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9552 | 14 | "Option 82:11 Server ID Override", HFILL }}, |
9553 | | |
9554 | 14 | { &hf_dhcp_option82_relay_agent_id, |
9555 | 14 | { "Relay Agent Identifier", "dhcp.option.agent_information_option.relay_agent_id", |
9556 | 14 | FT_BYTES, BASE_NONE, NULL, 0x00, |
9557 | 14 | "Option 82:12 Relay Agent Identifier", HFILL }}, |
9558 | | |
9559 | 14 | { &hf_dhcp_option82_option_ani_att, |
9560 | 14 | { "Access Technology Type", "dhcp.option.agent_information_option.ani_att", |
9561 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9562 | 14 | "Option 82:13 Access Technology Type", HFILL }}, |
9563 | | |
9564 | 14 | { &hf_dhcp_option82_option_ani_att_res, |
9565 | 14 | { "Access Technology Type", "dhcp.option.agent_information_option.ani_att.res", |
9566 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9567 | 14 | "Option 82:13 Access Technology Type Reserved", HFILL }}, |
9568 | | |
9569 | 14 | { &hf_dhcp_option82_option_ani_att_att, |
9570 | 14 | { "Access Technology Type", "dhcp.option.agent_information_option.ani_att.att", |
9571 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9572 | 14 | "Option 82:13 Access Technology Type Value", HFILL }}, |
9573 | | |
9574 | 14 | { &hf_dhcp_option82_option_ani_network_name, |
9575 | 14 | { "Access Network Name", "dhcp.option.agent_information_option.ani_network_name", |
9576 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9577 | 14 | "Option 82:14 Access Network Name", HFILL }}, |
9578 | | |
9579 | 14 | { &hf_dhcp_option82_option_ani_ap_name, |
9580 | 14 | { "Access Point Name", "dhcp.option.agent_information_option.ani_ap_name", |
9581 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9582 | 14 | "Option 82:15 Access Point Name", HFILL }}, |
9583 | | |
9584 | 14 | { &hf_dhcp_option82_option_ani_ap_bssid, |
9585 | 14 | { "Access Point BSSID", "dhcp.option.agent_information_option.ani_ap_bssid", |
9586 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
9587 | 14 | "Option 82:16 Access Point BSSID", HFILL }}, |
9588 | | |
9589 | 14 | { &hf_dhcp_option82_option_ani_operator_id, |
9590 | 14 | { "Access Network Operator ID", "dhcp.option.agent_information_option.ani_operator_id", |
9591 | 14 | FT_BYTES, BASE_NONE, NULL, 0x00, |
9592 | 14 | "Option 82:17 Access Network Operator ID", HFILL }}, |
9593 | | |
9594 | 14 | { &hf_dhcp_option82_option_ani_operator_realm, |
9595 | 14 | { "Access Network Operator Realm", "dhcp.option.agent_information_option.ani_operator_realm", |
9596 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9597 | 14 | "Option 82:18 Access Network Operator Realm", HFILL }}, |
9598 | | |
9599 | 14 | { &hf_dhcp_option82_option_source_port, |
9600 | 14 | { "Source Port", "dhcp.option.agent_information_option.source_port", |
9601 | 14 | FT_NONE, BASE_NONE, NULL, 0x00, |
9602 | 14 | "Option 82:19 Source Port", HFILL }}, |
9603 | | |
9604 | 14 | { &hf_dhcp_option82_link_selection_cisco, |
9605 | 14 | { "Link selection (Cisco proprietary)", "dhcp.option.agent_information_option.link_selection_cisco", |
9606 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9607 | 14 | "Option 82:150 Link selection (Cisco proprietary)", HFILL }}, |
9608 | | |
9609 | 14 | { &hf_dhcp_option82_vrf_name_vpn_id, |
9610 | 14 | { "VRF name/VPN ID", "dhcp.option.agent_information_option.vrf_name.vpn_id", |
9611 | 14 | FT_BYTES, BASE_NONE, NULL, 0x00, |
9612 | 14 | "Option 82:151 VRF name/VPN ID", HFILL }}, |
9613 | | |
9614 | 14 | { &hf_dhcp_option82_vrf_name_global, |
9615 | 14 | { "Global, default VPN", "dhcp.option.agent_information_option.vrf_name.global", |
9616 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9617 | 14 | "Option 82:151 Global, default VPN", HFILL }}, |
9618 | | |
9619 | 14 | { &hf_dhcp_option82_vrf_name, |
9620 | 14 | { "VRF name", "dhcp.option.agent_information_option.vrf_name", |
9621 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9622 | 14 | "Option 82:151 VRF name", HFILL }}, |
9623 | | |
9624 | 14 | { &hf_dhcp_option82_vrf_name_vpn_id_oui, |
9625 | 14 | { "VRF name/VPN ID OUI", "dhcp.option.agent_information_option.vrf_name.vpn_id.oui", |
9626 | 14 | FT_UINT24, BASE_HEX, NULL, 0x00, |
9627 | 14 | "Option 82:151 VRF name/VPN ID OUI", HFILL }}, |
9628 | | |
9629 | 14 | { &hf_dhcp_option82_vrf_name_vpn_id_index, |
9630 | 14 | { "VRF name/VPN ID Index", "dhcp.option.agent_information_option.vrf_name.vpn_id.index", |
9631 | 14 | FT_UINT32, BASE_HEX, NULL, 0x00, |
9632 | 14 | "Option 82:151 VRF name/VPN ID Index", HFILL }}, |
9633 | | |
9634 | 14 | { &hf_dhcp_option82_server_id_override_cisco, |
9635 | 14 | { "Server ID Override (Cisco proprietary)", "dhcp.option.agent_information_option.server_id_override_cisco", |
9636 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9637 | 14 | "Option 82:152 Server ID Override (Cisco proprietary)", HFILL }}, |
9638 | | |
9639 | | |
9640 | 14 | { &hf_dhcp_option_isns_functions, |
9641 | 14 | { "iSNS Functions", "dhcp.option.isns.functions", |
9642 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00, |
9643 | 14 | "iSNS: the functions supported by the iSNS servers", HFILL }}, |
9644 | | |
9645 | 14 | { &hf_dhcp_option_isns_functions_enabled, |
9646 | 14 | { "Function Fields Enabled", "dhcp.option.isns.functions.enabled", |
9647 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_FUNCTIONS_ENABLED, |
9648 | 14 | "If set to zero, then the contents of all other iSNS Function fields MUST be ignored", HFILL }}, |
9649 | | |
9650 | 14 | { &hf_dhcp_option_isns_functions_dd_authorization, |
9651 | 14 | { "Discovery Domain based Authorization", "dhcp.option.isns.functions.dd_base_authorization", |
9652 | 14 | FT_BOOLEAN, 16, TFS(&tfs_isns_function_dd_based_auth), F_ISNS_FUNCTIONS_DD_AUTH, |
9653 | 14 | "If set to zero, then access authorization must be explicitly performed by each device", HFILL }}, |
9654 | | |
9655 | 14 | { &hf_dhcp_option_isns_functions_sec_policy_distibution, |
9656 | 14 | { "Security Policy Distribution", "dhcp.option.isns.functions.sec_policy_distribution", |
9657 | 14 | FT_BOOLEAN, 16, TFS(&tfs_isns_functions_sec_distrib), F_ISNS_FUNCTIONS_SEC_POLICY, |
9658 | 14 | NULL, HFILL }}, |
9659 | | |
9660 | 14 | { &hf_dhcp_option_isns_functions_reserved, |
9661 | 14 | { "Reserved flags", "dhcp.option.isns.functions.reserved", |
9662 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_FUNCTIONS_RESERVED, |
9663 | 14 | NULL, HFILL }}, |
9664 | | |
9665 | 14 | { &hf_dhcp_option_isns_discovery_domain_access, |
9666 | 14 | { "Discovery Domain Access flags", "dhcp.option.isns.discovery_domain_access", |
9667 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00, |
9668 | 14 | "iSNS: the types of iSNS clients that are allowed to modify Discovery Domains", HFILL }}, |
9669 | | |
9670 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_enabled, |
9671 | 14 | { "Discovery Domain Enabled", "dhcp.option.isns.discovery_domain_access.enabled", |
9672 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ENABLED, |
9673 | 14 | "If set to zero, then the contents of the remainder of this field MUST be ignored", HFILL }}, |
9674 | | |
9675 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_control_node, |
9676 | 14 | { "Control Node", "dhcp.option.isns.discovery_domain_access_control.node", |
9677 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_CTRL_NODE, |
9678 | 14 | NULL, HFILL }}, |
9679 | | |
9680 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_iscsi_target, |
9681 | 14 | { "iSCSI Target", "dhcp.option.isns.discovery_domain_access.iscsi_target", |
9682 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ISCSI_TARGET, |
9683 | 14 | NULL, HFILL }}, |
9684 | | |
9685 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_iscsi_inititator, |
9686 | 14 | { "iSCSI Initiator", "dhcp.option.isns.discovery_domain_access.iscsi_initiator", |
9687 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ISCSI_INITIATOR, |
9688 | 14 | NULL, HFILL }}, |
9689 | | |
9690 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_ifcp_target_port, |
9691 | 14 | { "iFCP Target Port", "dhcp.option.isns.discovery_domain_access.ifcp_target_port", |
9692 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_IFCP_TARGET_PORT, |
9693 | 14 | NULL, HFILL }}, |
9694 | | |
9695 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_ifcp_initiator_port, |
9696 | 14 | { "iFCP Initiator Port", "dhcp.option.isns.discovery_domain_access.initiator_target_port", |
9697 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_IFCP_INITIATOR_PORT, |
9698 | 14 | NULL, HFILL }}, |
9699 | | |
9700 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_reserved, |
9701 | 14 | { "Reserved Flags", "dhcp.option.isns.discovery_domain_access.reserved", |
9702 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_DD_ACCESS_RESERVED, |
9703 | 14 | NULL, HFILL }}, |
9704 | | |
9705 | 14 | { &hf_dhcp_option_isns_administrative_flags, |
9706 | 14 | { "Administrative Flags", "dhcp.option.isns.administrative_flags", |
9707 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00, |
9708 | 14 | "iSNS: administrative settings for the iSNS servers discovered through the DHCP query", HFILL }}, |
9709 | | |
9710 | 14 | { &hf_dhcp_option_isns_administrative_flags_enabled, |
9711 | 14 | { "Administrative Flags Enabled", "dhcp.option.isns.administrative_flags.enabled", |
9712 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_ENABLED, |
9713 | 14 | NULL, HFILL }}, |
9714 | | |
9715 | 14 | { &hf_dhcp_option_isns_administrative_flags_heartbeat, |
9716 | 14 | { "Heartbeat", "dhcp.option.isns.administrative_flags.heartbeat", |
9717 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_HEARTBEAT, |
9718 | 14 | NULL, HFILL }}, |
9719 | | |
9720 | 14 | { &hf_dhcp_option_isns_administrative_flags_management_scns, |
9721 | 14 | { "Management SCNs", "dhcp.option.isns.administrative_flags.management_scns", |
9722 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_MANAGEMENT_SCNS, |
9723 | 14 | NULL, HFILL }}, |
9724 | | |
9725 | 14 | { &hf_dhcp_option_isns_administrative_flags_default_dd, |
9726 | 14 | { "Default Discovery Domain", "dhcp.option.isns.administrative_flags.default_discovery_domain", |
9727 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_DEFAULT_DD, |
9728 | 14 | NULL, HFILL }}, |
9729 | | |
9730 | 14 | { &hf_dhcp_option_isns_administrative_flags_reserved, |
9731 | 14 | { "Reserved Flags", "dhcp.option.isns.administrative_flags.reserved", |
9732 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_ADMIN_FLAGS_RESERVED, |
9733 | 14 | NULL, HFILL }}, |
9734 | | |
9735 | 14 | { &hf_dhcp_option_isns_server_security_bitmap, |
9736 | 14 | { "iSNS Server Security Bitmap", "dhcp.option.isns.server_security_bitmap", |
9737 | 14 | FT_UINT32, BASE_HEX, NULL, 0x00, |
9738 | 14 | "iSNS: server security settings", HFILL }}, |
9739 | | |
9740 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_enabled, |
9741 | 14 | { "Server Security Bitmap Enabled", "dhcp.option.isns.server_security_bitmap.enabled", |
9742 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_SRV_SEC_BITMAP_ENABLED, |
9743 | 14 | NULL, HFILL }}, |
9744 | | |
9745 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_ike_ipsec_enabled, |
9746 | 14 | { "IKE/IPSec", "dhcp.option.isns.server_security_bitmap.ike_ipsec_enabled", |
9747 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_IKE_IPSEC, |
9748 | 14 | NULL, HFILL }}, |
9749 | | |
9750 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_main_mode, |
9751 | 14 | { "Main Mode", "dhcp.option.isns.server_security_bitmap.main_mode", |
9752 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_MAIN_MODE, |
9753 | 14 | NULL, HFILL }}, |
9754 | | |
9755 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_aggressive_mode, |
9756 | 14 | { "Aggressive Mode", "dhcp.option.isns.server_security_bitmap.aggressive_mode", |
9757 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_AGGRESSIVE, |
9758 | 14 | NULL, HFILL }}, |
9759 | | |
9760 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_pfs, |
9761 | 14 | { "PFS", "dhcp.option.isns.server_security_bitmap.pfs", |
9762 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_PFS, |
9763 | 14 | NULL, HFILL }}, |
9764 | | |
9765 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_transport_mode, |
9766 | 14 | { "Transport Mode", "dhcp.option.isns.server_security_bitmap.transport_mode", |
9767 | 14 | FT_BOOLEAN, 16, TFS(&tfs_preferred_no_preference), F_ISNS_SRV_SEC_BITMAP_TRASPORT_MODE, |
9768 | 14 | NULL, HFILL }}, |
9769 | | |
9770 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_tunnel_mode, |
9771 | 14 | { "Tunnel Mode", "dhcp.option.isns.server_security_bitmap.tunnel_mode", |
9772 | 14 | FT_BOOLEAN, 16, TFS(&tfs_preferred_no_preference), F_ISNS_SRV_SEC_BITMAP_TUNNEL_MODE, |
9773 | 14 | NULL, HFILL }}, |
9774 | | |
9775 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_reserved, |
9776 | 14 | { "Reserved Flags", "dhcp.option.isns.server_security_bitmap.reserved", |
9777 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_SRV_SEC_BITMAP_RESERVED, |
9778 | 14 | NULL, HFILL }}, |
9779 | | |
9780 | 14 | { &hf_dhcp_option_isns_primary_server_addr, |
9781 | 14 | { "Primary Server Address", "dhcp.option.isns.primary_server_addr", |
9782 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9783 | 14 | "iSNS: IP address of the primary server", HFILL }}, |
9784 | | |
9785 | 14 | { &hf_dhcp_option_isns_heartbeat_originator_addr, |
9786 | 14 | { "Heartbeat Originator Address", "dhcp.option.isns.heartbeat_originator_addr", |
9787 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9788 | 14 | "iSNS: IP address from which the iSNS heartbeat originates", HFILL }}, |
9789 | | |
9790 | 14 | { &hf_dhcp_option_isns_secondary_server_addr_list, |
9791 | 14 | { "Secondary Server Address", "dhcp.option.isns.secondary_server_addr", |
9792 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9793 | 14 | "iSNS: a list of IP addresses of the secondary iSNS servers", HFILL }}, |
9794 | | |
9795 | | |
9796 | 14 | { &hf_dhcp_option_novell_dss_string, |
9797 | 14 | { "Novell Directory Services Servers String", "dhcp.option.novell_dss.string", |
9798 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9799 | 14 | "Option 85: Novell Directory Services Servers String", HFILL }}, |
9800 | | |
9801 | 14 | { &hf_dhcp_option_novell_dss_ip, |
9802 | 14 | { "IP Address", "dhcp.option.novell_dss.ip", |
9803 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9804 | 14 | "Option 85: Novell Directory Services Servers IP Address", HFILL }}, |
9805 | | |
9806 | 14 | { &hf_dhcp_option_novell_ds_tree_name, |
9807 | 14 | { "Novell Directory Services Tree Name", "dhcp.option.novell_ds_tree_name", |
9808 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9809 | 14 | "Option 86: Novell Directory Services Tree Name", HFILL }}, |
9810 | | |
9811 | 14 | { &hf_dhcp_option_novell_ds_context, |
9812 | 14 | { "Novell Directory Services Context", "dhcp.option.novell_ds_context", |
9813 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9814 | 14 | "Option 87: Novell Directory Services Context", HFILL }}, |
9815 | | |
9816 | 14 | { &hf_dhcp_option_dhcp_authentication_protocol, |
9817 | 14 | { "Protocol", "dhcp.option.dhcp_authentication.protocol", |
9818 | 14 | FT_UINT8, BASE_DEC, VALS(authen_protocol_vals), 0x0, |
9819 | 14 | "Option 90: Authentication Protocol", HFILL }}, |
9820 | | |
9821 | 14 | { &hf_dhcp_option_dhcp_authentication_alg_delay, |
9822 | 14 | { "Delay Algorithm", "dhcp.option.dhcp_authentication.alg_delay", |
9823 | 14 | FT_UINT8, BASE_DEC, VALS(authen_da_algo_vals), 0x0, |
9824 | 14 | "Option 90: Delayed Authentication Algorithm", HFILL }}, |
9825 | | |
9826 | 14 | { &hf_dhcp_option_dhcp_authentication_algorithm, |
9827 | 14 | { "Algorithm", "dhcp.option.dhcp_authentication.algorithm", |
9828 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9829 | 14 | "Option 90: Authentication Algorithm", HFILL }}, |
9830 | | |
9831 | 14 | { &hf_dhcp_option_dhcp_authentication_rdm, |
9832 | 14 | { "Replay Detection Method", "dhcp.option.dhcp_authentication.rdm", |
9833 | 14 | FT_UINT8, BASE_DEC, VALS(authen_rdm_vals), 0x0, |
9834 | 14 | "Option 90: Replay Detection Method", HFILL }}, |
9835 | | |
9836 | 14 | { &hf_dhcp_option_dhcp_authentication_rdm_replay_detection, |
9837 | 14 | { "RDM Replay Detection Value", "dhcp.option.dhcp_authentication.rdm_replay_detection", |
9838 | 14 | FT_UINT64, BASE_HEX, NULL, 0x0, |
9839 | 14 | "Option 90: RDM Replay Detection Value", HFILL }}, |
9840 | | |
9841 | 14 | { &hf_dhcp_option_dhcp_authentication_rdm_rdv, |
9842 | 14 | { "Replay Detection Value", "dhcp.option.dhcp_authentication.rdm_rdv", |
9843 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9844 | 14 | "Option 90: Replay Detection Value", HFILL }}, |
9845 | | |
9846 | 14 | { &hf_dhcp_option_dhcp_authentication_secret_id, |
9847 | 14 | { "Secret ID", "dhcp.option.dhcp_authentication.secret_id", |
9848 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9849 | 14 | "Option 90: Secret ID", HFILL }}, |
9850 | | |
9851 | 14 | { &hf_dhcp_option_dhcp_authentication_hmac_md5_hash, |
9852 | 14 | { "HMAC MD5 Hash", "dhcp.option.dhcp_authentication.hmac_md5_hash", |
9853 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9854 | 14 | "Option 90: HMAC MD5 Hash", HFILL }}, |
9855 | | |
9856 | 14 | { &hf_dhcp_option_dhcp_authentication_information, |
9857 | 14 | { "Authentication Information", "dhcp.option.dhcp_authentication.information", |
9858 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9859 | 14 | "Option 90: Authentication Information", HFILL }}, |
9860 | | |
9861 | 14 | { &hf_dhcp_option_client_last_transaction_time, |
9862 | 14 | { "Client last transaction time", "dhcp.option.client_last_transaction_time", |
9863 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9864 | 14 | "Option 91: Client last transaction time", HFILL }}, |
9865 | | |
9866 | 14 | { &hf_dhcp_option_associated_ip_option, |
9867 | 14 | { "Associated IP option", "dhcp.option.associated_ip_option", |
9868 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9869 | 14 | "Option 92: Associated IP option", HFILL }}, |
9870 | | |
9871 | 14 | { &hf_dhcp_option_client_system_architecture, |
9872 | 14 | { "Client System Architecture", "dhcp.option.client_system_architecture", |
9873 | 14 | FT_UINT16, BASE_DEC, VALS(dhcp_client_arch), 0x0, |
9874 | 14 | "Option 93: Client System Architecture", HFILL }}, |
9875 | | |
9876 | 14 | { &hf_dhcp_option_client_network_id_major_ver, |
9877 | 14 | { "Major Version", "dhcp.client_network_id_major", |
9878 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9879 | 14 | "Option 94: Major Version", HFILL }}, |
9880 | | |
9881 | 14 | { &hf_dhcp_option_client_network_id_minor_ver, |
9882 | 14 | { "Minor Version", "dhcp.client_network_id_minor", |
9883 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9884 | 14 | "Option 94: Minor Version", HFILL }}, |
9885 | | |
9886 | 14 | { &hf_dhcp_option_civic_location_what, |
9887 | 14 | { "What", "dhcp.option.civic_location.what", |
9888 | 14 | FT_UINT8, BASE_DEC, VALS(civic_address_what_values), 0x0, |
9889 | 14 | "Option 99: What", HFILL }}, |
9890 | | |
9891 | 14 | { &hf_dhcp_option_civic_location_country, |
9892 | 14 | { "Country", "dhcp.option.civic_location.country", |
9893 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9894 | 14 | "Option 99: Country", HFILL }}, |
9895 | | |
9896 | 14 | { &hf_dhcp_option_civic_location_ca_type, |
9897 | 14 | { "CA Type", "dhcp.option.civic_location.ca_type", |
9898 | 14 | FT_UINT8, BASE_DEC, VALS(civic_address_type_values), 0x0, |
9899 | 14 | "Option 99: CA Type", HFILL }}, |
9900 | | |
9901 | 14 | { &hf_dhcp_option_civic_location_ca_length, |
9902 | 14 | { "CA Length", "dhcp.option.civic_location.ca_length", |
9903 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9904 | 14 | "Option 99: CA Length", HFILL }}, |
9905 | | |
9906 | 14 | { &hf_dhcp_option_civic_location_ca_value, |
9907 | 14 | { "CA Value", "dhcp.option.civic_location.ca_value", |
9908 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9909 | 14 | "Option 99: CA Value", HFILL }}, |
9910 | | |
9911 | 14 | { &hf_dhcp_option_tz_pcode, |
9912 | 14 | { "TZ PCode", "dhcp.option.tz_pcode", |
9913 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9914 | 14 | "Option 100: TZ PCode", HFILL }}, |
9915 | | |
9916 | 14 | { &hf_dhcp_option_tz_tcode, |
9917 | 14 | { "TZ TCode", "dhcp.option.tz_tcode", |
9918 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9919 | 14 | "Option 101: TZ TCode", HFILL }}, |
9920 | | |
9921 | 14 | { &hf_dhcp_option_ipv6_only_preferred_wait_time, |
9922 | 14 | { "IPv6-Only Preferred wait time", "dhcp.option.ipv6only_preferred_wait_time", |
9923 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9924 | 14 | "Option 108: IPv6-Only Preferred wait time", HFILL }}, |
9925 | | |
9926 | 14 | { &hf_dhcp_option_netinfo_parent_server_address, |
9927 | 14 | { "NetInfo Parent Server Address", "dhcp.option.netinfo_parent_server_address", |
9928 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9929 | 14 | "Option 112: NetInfo Parent Server Address", HFILL }}, |
9930 | | |
9931 | 14 | { &hf_dhcp_option_netinfo_parent_server_tag, |
9932 | 14 | { "NetInfo Parent Server Tag", "dhcp.option.netinfo_parent_server_tag", |
9933 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9934 | 14 | "Option 113: NetInfo Parent Server Tag", HFILL }}, |
9935 | | |
9936 | 14 | { &hf_dhcp_option_dhcp_auto_configuration, |
9937 | 14 | { "DHCP Auto-Configuration", "dhcp.option.dhcp_auto_configuration", |
9938 | 14 | FT_UINT8, BASE_DEC, VALS(dhcp_autoconfig), 0x0, |
9939 | 14 | "Option 116: DHCP Auto-Configuration", HFILL }}, |
9940 | | |
9941 | 14 | { &hf_dhcp_option_dhcp_name_service_search_option, |
9942 | 14 | { "Name Service", "dhcp.option.dhcp_name_service_search_option", |
9943 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9944 | 14 | "Option 117: Name Service", HFILL }}, |
9945 | | |
9946 | 14 | { &hf_dhcp_option_dhcp_dns_domain_search_list_fqdn, |
9947 | 14 | { "FQDN", "dhcp.option.dhcp_dns_domain_search_list_fqdn", |
9948 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9949 | 14 | "Option 119: FQDN", HFILL }}, |
9950 | | |
9951 | 14 | { &hf_dhcp_option_sip_server_enc, |
9952 | 14 | { "SIP Server Encoding", "dhcp.option.sip_server.encoding", |
9953 | 14 | FT_UINT8, BASE_DEC, VALS(sip_server_enc_vals), 0x0, |
9954 | 14 | "Option 120: SIP Server encoding", HFILL }}, |
9955 | | |
9956 | 14 | { &hf_dhcp_option_sip_server_name, |
9957 | 14 | { "SIP Server Name", "dhcp.option.sip_server.name", |
9958 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9959 | 14 | "Option 120: SIP Server Name", HFILL }}, |
9960 | | |
9961 | 14 | { &hf_dhcp_option_sip_server_address, |
9962 | 14 | { "SIP Server Address", "dhcp.option.sip_server.address", |
9963 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
9964 | 14 | "Option 120: SIP Server Address", HFILL }}, |
9965 | | |
9966 | 14 | { &hf_dhcp_option_classless_static_route, |
9967 | 14 | { "Subnet/MaskWidth-Router", "dhcp.option.classless_static_route", |
9968 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9969 | 14 | "Option 121: Subnet/MaskWidth-Router", HFILL }}, |
9970 | | |
9971 | 14 | { &hf_dhcp_option_rfc3825_error, |
9972 | 14 | { "Error", "dhcp.option.rfc3825.error", |
9973 | 14 | FT_UINT8, BASE_DEC, VALS(rfc3825_error_types), 0x0, |
9974 | 14 | "Option 123: Error", HFILL }}, |
9975 | | |
9976 | 14 | { &hf_dhcp_option_rfc3825_latitude, |
9977 | 14 | { "Latitude", "dhcp.option.rfc3825.latitude", |
9978 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9979 | 14 | "Option 123: Latitude", HFILL }}, |
9980 | | |
9981 | 14 | { &hf_dhcp_option_rfc3825_longitude, |
9982 | 14 | { "Longitude", "dhcp.option.rfc3825.longitude", |
9983 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9984 | 14 | "Option 123: Longitude", HFILL }}, |
9985 | | |
9986 | 14 | { &hf_dhcp_option_rfc3825_latitude_res, |
9987 | 14 | { "Latitude resolution", "dhcp.option.rfc3825.latitude_res", |
9988 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9989 | 14 | "Option 123: Latitude resolution", HFILL }}, |
9990 | | |
9991 | 14 | { &hf_dhcp_option_rfc3825_longitude_res, |
9992 | 14 | { "Longitude resolution", "dhcp.option.rfc3825.longitude_res", |
9993 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9994 | 14 | "Option 123: Longitude resolution", HFILL }}, |
9995 | | |
9996 | 14 | { &hf_dhcp_option_rfc3825_altitude, |
9997 | 14 | { "Altitude", "dhcp.option.rfc3825.altitude", |
9998 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9999 | 14 | "Option 123: Altitude", HFILL }}, |
10000 | | |
10001 | 14 | { &hf_dhcp_option_rfc3825_altitude_res, |
10002 | 14 | { "Altitude resolution", "dhcp.option.rfc3825.altitude_res", |
10003 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
10004 | 14 | "Option 123: Altitude resolution", HFILL }}, |
10005 | | |
10006 | 14 | { &hf_dhcp_option_rfc3825_altitude_type, |
10007 | 14 | { "Altitude type", "dhcp.option.rfc3825.altitude_type", |
10008 | 14 | FT_UINT8, BASE_DEC, VALS(altitude_type_values), 0x0, |
10009 | 14 | "Option 123: Altitude type", HFILL }}, |
10010 | | |
10011 | 14 | { &hf_dhcp_option_rfc3825_map_datum, |
10012 | 14 | { "Map Datum", "dhcp.option.rfc3825.map_datum", |
10013 | 14 | FT_UINT8, BASE_DEC, VALS(map_datum_type_values), 0x0, |
10014 | 14 | "Option 123: Map Datum", HFILL }}, |
10015 | | |
10016 | 14 | { &hf_dhcp_option_cl_dss_id_option, |
10017 | 14 | { "DSS_ID Type", "dhcp.option.cl_dss_id.option", |
10018 | 14 | FT_UINT8, BASE_DEC, VALS(cl_dss_id_type_vals), 0x0, |
10019 | 14 | "Option 123:CL DSS_ID Type", HFILL }}, |
10020 | | |
10021 | 14 | { &hf_dhcp_option_cl_dss_id_len, |
10022 | 14 | { "DSS_ID Length", "dhcp.option.cl_dss_id.len", |
10023 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10024 | 14 | "Option 123:CL DSS_ID Length", HFILL }}, |
10025 | | |
10026 | 14 | { &hf_dhcp_option_cl_dss_id, |
10027 | 14 | { "Country", "dhcp.option.cl_dss_id", |
10028 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10029 | 14 | "Option 123:CL DSS_ID", HFILL }}, |
10030 | | |
10031 | 14 | { &hf_dhcp_option_vi_class_cl_address_mode, |
10032 | 14 | { "CableLab Address Mode", "dhcp.option.vi_class.cl_address_mode", |
10033 | 14 | FT_UINT8, BASE_DEC, VALS(cablelab_ipaddr_mode_vals), 0x0, |
10034 | 14 | "Option 124: CableLab Address Mode", HFILL }}, |
10035 | | |
10036 | 14 | { &hf_dhcp_option_vi_class_enterprise, |
10037 | 14 | { "Enterprise", "dhcp.option.vi_class.enterprise", |
10038 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x00, |
10039 | 14 | "Option 124: Enterprise", HFILL }}, |
10040 | | |
10041 | 14 | { &hf_dhcp_option_vi_class_data_length, |
10042 | 14 | { "Length", "dhcp.option.vi_class.length", |
10043 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10044 | 14 | "Option 124: Length", HFILL }}, |
10045 | | |
10046 | 14 | { &hf_dhcp_option_vi_class_data_item_length, |
10047 | 14 | { "Length", "dhcp.option.vi_class.vendor_class_data.item.length", |
10048 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10049 | 14 | "Option 124: Length", HFILL }}, |
10050 | | |
10051 | 14 | { &hf_dhcp_option_vi_class_data_item_data, |
10052 | 14 | { "Data", "dhcp.option.vi_class.vendor_class_data.item.data", |
10053 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10054 | 14 | "Option 124: Data", HFILL }}, |
10055 | | |
10056 | 14 | { &hf_dhcp_option125_enterprise, |
10057 | 14 | { "Enterprise", "dhcp.option.vi.enterprise", |
10058 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x00, |
10059 | 14 | "Option 125: Enterprise", HFILL }}, |
10060 | | |
10061 | 14 | { &hf_dhcp_option125_length, |
10062 | 14 | { "Length", "dhcp.option.vi.length", |
10063 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
10064 | 14 | "Option 125: Length", HFILL }}, |
10065 | | |
10066 | 14 | { &hf_dhcp_option125_value, |
10067 | 14 | { "Value", "dhcp.option.vi.value", |
10068 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10069 | 14 | "Option 125: Suboption value", HFILL }}, |
10070 | | |
10071 | 14 | { &hf_dhcp_option125_value_8, |
10072 | 14 | { "Value", "dhcp.option.vi.value.uint", |
10073 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10074 | 14 | "Option 125: Suboption 8-bit value", HFILL }}, |
10075 | | |
10076 | 14 | { &hf_dhcp_option125_value_16, |
10077 | 14 | { "Value", "dhcp.option.vi.value.uint", |
10078 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10079 | 14 | "Option 125: Suboption 16-bit value", HFILL }}, |
10080 | | |
10081 | 14 | { &hf_dhcp_option125_value_ip_address, |
10082 | 14 | { "Value", "dhcp.option.vi.value.address", |
10083 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10084 | 14 | "Option 125: Suboption IP address value", HFILL }}, |
10085 | | |
10086 | 14 | { &hf_dhcp_option125_value_stringz, |
10087 | 14 | { "Value", "dhcp.option.vi.value.string", |
10088 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10089 | 14 | "Option 125: Suboption Z-String value", HFILL }}, |
10090 | | |
10091 | 14 | { &hf_dhcp_option125_tr111_suboption, |
10092 | 14 | { "Option 125 Suboption", "dhcp.option.vi.tr111.suboption", |
10093 | 14 | FT_UINT8, BASE_DEC, VALS(option125_tr111_suboption_vals), 0x0, |
10094 | 14 | "Option 125:TR 111 Suboption", HFILL }}, |
10095 | | |
10096 | 14 | { &hf_dhcp_option125_tr111_device_manufacturer_oui, |
10097 | 14 | { "DeviceManufacturerOUI", "dhcp.option.vi.tr111.device_manufacturer_oui", |
10098 | 14 | FT_UINT24, BASE_OUI, NULL, 0x0, |
10099 | 14 | "Option 125:TR 111 1 DeviceManufacturerOUI", HFILL }}, |
10100 | | |
10101 | 14 | { &hf_dhcp_option125_tr111_device_serial_number, |
10102 | 14 | { "DeviceSerialNumber", "dhcp.option.vi.tr111.device_serial_number", |
10103 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10104 | 14 | "Option 125:TR 111 2 DeviceSerialNumber", HFILL }}, |
10105 | | |
10106 | 14 | { &hf_dhcp_option125_tr111_device_product_class, |
10107 | 14 | { "DeviceProductClass", "dhcp.option.vi.tr111.device_product_class", |
10108 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10109 | 14 | "Option 125:TR 111 3 DeviceProductClass", HFILL }}, |
10110 | | |
10111 | 14 | { &hf_dhcp_option125_tr111_gateway_manufacturer_oui, |
10112 | 14 | { "GatewayManufacturerOUI", "dhcp.option.vi.tr111.gateway_manufacturer_oui", |
10113 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10114 | 14 | "Option 125:TR 111 4 GatewayManufacturerOUI", HFILL }}, |
10115 | | |
10116 | 14 | { &hf_dhcp_option125_tr111_gateway_serial_number, |
10117 | 14 | { "GatewaySerialNumber", "dhcp.option.vi.tr111.gateway_serial_number", |
10118 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10119 | 14 | "Option 125:TR 111 5 GatewaySerialNumber", HFILL }}, |
10120 | | |
10121 | 14 | { &hf_dhcp_option125_tr111_gateway_product_class, |
10122 | 14 | { "GatewayProductClass", "dhcp.option.vi.tr111.gateway_product_class", |
10123 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10124 | 14 | "Option 125:TR 111 6 GatewayProductClass", HFILL }}, |
10125 | | |
10126 | 14 | { &hf_dhcp_option125_cl_suboption, |
10127 | 14 | { "Option 125 Suboption", "dhcp.option.vi.cl.suboption", |
10128 | 14 | FT_UINT8, BASE_DEC, VALS(option125_cl_suboption_vals), 0x0, |
10129 | 14 | "Option 125:CL Suboption", HFILL }}, |
10130 | | |
10131 | 14 | { &hf_dhcp_option125_cl_option_request, |
10132 | 14 | { "Option Request", "dhcp.option.vi.cl.option_request", |
10133 | 14 | FT_BYTES, SEP_SPACE, NULL, 0x0, |
10134 | 14 | "Option 125:CL 1 Option Request", HFILL }}, |
10135 | | |
10136 | 14 | { &hf_dhcp_option125_cl_tftp_server_addresses, |
10137 | 14 | { "TFTP Server Addresses", "dhcp.option.vi.cl.tftp_server_addresses", |
10138 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10139 | 14 | "Option 125:CL 2 TFTP Server Addresses", HFILL }}, |
10140 | | |
10141 | 14 | { &hf_dhcp_option125_cl_erouter_container_option, |
10142 | 14 | { "eRouter Container Option", "dhcp.option.vi.cl.erouter_container_option", |
10143 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10144 | 14 | "Option 125:CL 3 eRouter Container Option", HFILL }}, |
10145 | | |
10146 | 14 | { &hf_dhcp_option125_cl_mib_environment_indicator_option, |
10147 | 14 | { "MIB Environment Indicator Option", "dhcp.option.vi.cl.mib_environment_indicator_option", |
10148 | 14 | FT_UINT8, BASE_DEC, VALS(pkt_mib_env_ind_opt_vals), 0x0, |
10149 | 14 | "Option 125:CL 4 MIB Environment Indicator Option", HFILL }}, |
10150 | | |
10151 | 14 | { &hf_dhcp_option125_cl_modem_capabilities, |
10152 | 14 | { "Modem Capabilities", "dhcp.option.vi.cl.modem_capabilities", |
10153 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10154 | 14 | "Option 125:CL 5 Modem Capabilities", HFILL }}, |
10155 | | |
10156 | 14 | { &hf_dhcp_option_subnet_selection_option, |
10157 | 14 | { "Subnet Selection Option", "dhcp.option.subnet_selection_option", |
10158 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10159 | 14 | "Option 118: Subnet Selection Option", HFILL }}, |
10160 | | |
10161 | 14 | { &hf_dhcp_option_pana_agent, |
10162 | 14 | { "PAA IPv4 Address", "dhcp.option.pana_agent", |
10163 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
10164 | 14 | "Protocol for Carrying Authentication for Network Access (PANA) Authentication Agents IPv4 Address", HFILL }}, |
10165 | | |
10166 | 14 | { &hf_dhcp_option_lost_server_domain_name, |
10167 | 14 | { "LoST Server Domain Name", "dhcp.option.lost_server_domain_name", |
10168 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10169 | 14 | "Option 137: LoST Server Domain Name", HFILL }}, |
10170 | | |
10171 | 14 | { &hf_dhcp_option_capwap_access_controller, |
10172 | 14 | { "CAPWAP Access Controllers", "dhcp.option.capwap_access_controller", |
10173 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10174 | 14 | "Option 138: CAPWAP Access Controllers", HFILL }}, |
10175 | | |
10176 | 14 | { &hf_dhcp_option_andsf_server, |
10177 | 14 | { "ANDSF Server", "dhcp.option.andsf_server", |
10178 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10179 | 14 | "ANDSF (Access Network Discovery and Selection Function) Server", HFILL }}, |
10180 | | |
10181 | 14 | { &hf_dhcp_option_forcerenew_nonce_algo, |
10182 | 14 | { "Algorithm", "dhcp.option.forcerenew_nonce.algorithm", |
10183 | 14 | FT_UINT8, BASE_DEC, VALS(forcerenew_nonce_algo_vals), 0x00, |
10184 | 14 | "Forcenew Nonce Algorithm", HFILL }}, |
10185 | | |
10186 | 14 | { &hf_dhcp_option_rdnss_reserved, |
10187 | 14 | { "Reserved", "dhcp.option.rdnss.reserved", |
10188 | 14 | FT_UINT8, BASE_HEX, NULL, 0xfc, |
10189 | 14 | "RDNSS Reserved", HFILL }}, |
10190 | | |
10191 | 14 | { &hf_dhcp_option_rdnss_pref, |
10192 | 14 | { "Preference", "dhcp.option.rdnss.preference", |
10193 | 14 | FT_UINT8, BASE_DEC, VALS(rdnss_pref_vals), 0x03, |
10194 | 14 | "RDNSS (Recursive DNS Server) Preference", HFILL }}, |
10195 | | |
10196 | 14 | { &hf_dhcp_option_rdnss_prim_dns_server, |
10197 | 14 | { "Primary DNS", "dhcp.option.rdnss.primary_dns", |
10198 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10199 | 14 | "RDNSS Primary DNS-recursive-name-server's IPv4 address", HFILL }}, |
10200 | | |
10201 | 14 | { &hf_dhcp_option_rdnss_sec_dns_server, |
10202 | 14 | { "Secondary DNS", "dhcp.option.rdnss.secondary_dns", |
10203 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10204 | 14 | "RDNSS Secondary DNS-recursive-name-server's IPv4 address", HFILL }}, |
10205 | | |
10206 | 14 | { &hf_dhcp_option_rdnss_domain, |
10207 | 14 | { "Domains and networks", "dhcp.option.rdnss.domain", |
10208 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
10209 | 14 | "RDNSS Domains and networks", HFILL }}, |
10210 | | |
10211 | 14 | { &hf_dhcp_option_dots_ri, |
10212 | 14 | { "DOTS Reference Identifier", "dhcp.option.dots.ri", |
10213 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
10214 | 14 | "Peer DOTS Agent name", HFILL }}, |
10215 | | |
10216 | 14 | { &hf_dhcp_option_dots_address, |
10217 | 14 | { "DOTS Address", "dhcp.option.dots.address", |
10218 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10219 | 14 | "Peer DOTS Agent Address", HFILL }}, |
10220 | | |
10221 | 14 | { &hf_dhcp_option_tftp_server_address, |
10222 | 14 | { "TFTP Server Address", "dhcp.option.tftp_server_address", |
10223 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10224 | 14 | "Option 150: TFTP Server Address", HFILL }}, |
10225 | | |
10226 | 14 | { &hf_dhcp_option_bulk_lease_status_code, |
10227 | 14 | { "Status Code", "dhcp.option.bulk_lease.status_code", |
10228 | 14 | FT_UINT8, BASE_DEC, VALS(bulk_lease_dhcp_status_code_vals), 0x00, |
10229 | 14 | "DHCPv4 Bulk Leasequery Status Code", HFILL }}, |
10230 | | |
10231 | 14 | { &hf_dhcp_option_bulk_lease_status_message, |
10232 | 14 | { "Status Code Message", "dhcp.option.bulk_lease.status_code_message", |
10233 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
10234 | 14 | "DHCPv4 Bulk Leasequery Status Code Message", HFILL }}, |
10235 | | |
10236 | 14 | { &hf_dhcp_option_bulk_lease_base_time, |
10237 | 14 | { "Base Time", "dhcp.option.bulk_lease.base_time", |
10238 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, |
10239 | 14 | "DHCPv4 Bulk Leasequery Base Time", HFILL }}, |
10240 | | |
10241 | 14 | { &hf_dhcp_option_bulk_lease_start_time_of_state, |
10242 | 14 | { "Start Time Of State", "dhcp.option.bulk_lease.start_time_of_state", |
10243 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
10244 | 14 | "DHCPv4 Bulk Leasequery Start Time Of State", HFILL }}, |
10245 | | |
10246 | 14 | { &hf_dhcp_option_bulk_lease_query_start, |
10247 | 14 | { "Query Start Time", "dhcp.option.bulk_lease.query_start_time", |
10248 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, |
10249 | 14 | "DHCPv4 Bulk Leasequery Query Start Time", HFILL }}, |
10250 | | |
10251 | 14 | { &hf_dhcp_option_bulk_lease_query_end, |
10252 | 14 | { "Query End Time", "dhcp.option.bulk_lease.query_end_time", |
10253 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, |
10254 | 14 | "DHCPv4 Bulk Leasequery Query End Time", HFILL }}, |
10255 | | |
10256 | 14 | { &hf_dhcp_option_bulk_lease_dhcp_state, |
10257 | 14 | { "Dhcp State", "dhcp.option.bulk_lease.dhcp_state", |
10258 | 14 | FT_UINT8, BASE_DEC, VALS(bulk_lease_dhcp_state_vals), 0x00, |
10259 | 14 | "DHCPv4 Bulk Leasequery Dhcp State", HFILL }}, |
10260 | | |
10261 | 14 | { &hf_dhcp_option_bulk_lease_data_source, |
10262 | 14 | { "Data Source", "dhcp.option.bulk_lease.data_source", |
10263 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_bulk_lease_data_source), 0x00, |
10264 | 14 | "DHCPv4 Bulk Leasequery Data Source", HFILL }}, |
10265 | | |
10266 | 14 | { &hf_dhcp_option_pcp_list_length, |
10267 | 14 | { "List-Length", "dhcp.option.pcp.list_length", |
10268 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10269 | 14 | "Port Control Protocol (PCP) List Length", HFILL }}, |
10270 | | |
10271 | 14 | { &hf_dhcp_option_pcp_server, |
10272 | 14 | { "PCP Server", "dhcp.option.pcp.server", |
10273 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
10274 | 14 | "Port Control Protocol (PCP) Server", HFILL }}, |
10275 | | |
10276 | 14 | { &hf_dhcp_option_portparams_offset, |
10277 | 14 | { "Offset", "dhcp.option.portparams.offset", |
10278 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10279 | 14 | "Port Set ID (PSID) offset", HFILL }}, |
10280 | | |
10281 | 14 | { &hf_dhcp_option_portparams_psid_length, |
10282 | 14 | { "PSID-Length", "dhcp.option.portparams.psid_length", |
10283 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10284 | 14 | "Port Set ID (PSID) Length", HFILL }}, |
10285 | | |
10286 | 14 | { &hf_dhcp_option_portparams_psid, |
10287 | 14 | { "PSID", "dhcp.option.portparams.psid", |
10288 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10289 | 14 | "Port Set ID (PSID)", HFILL }}, |
10290 | | |
10291 | 14 | { &hf_dhcp_option_mudurl, |
10292 | 14 | { "MUDURL", "dhcp.option.mudurl", |
10293 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10294 | 14 | "Option 161: MUDURL", HFILL }}, |
10295 | | |
10296 | 14 | { &hf_dhcp_dnr_instance, |
10297 | 14 | { "Instance", "dhcp.option.dnr", |
10298 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
10299 | 14 | "Option 162: DNR instance", HFILL }}, |
10300 | | |
10301 | 14 | { &hf_dhcp_dnr_instance_len, |
10302 | 14 | { "Instance length", "dhcp.option.dnr.length", |
10303 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10304 | 14 | "Option 162: DNR instance length", HFILL }}, |
10305 | | |
10306 | 14 | { &hf_dhcp_dnr_svcpriority, |
10307 | 14 | { "Service priority", "dhcp.option.dnr.svcpriority", |
10308 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10309 | 14 | "Option 162: DNR service priority", HFILL }}, |
10310 | | |
10311 | 14 | { &hf_dhcp_dnr_auth_domain_name_len, |
10312 | 14 | { "Authentication domain name length", "dhcp.option.dnr.adn_len", |
10313 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10314 | 14 | "Option 162: DNR authentication domain name length", HFILL }}, |
10315 | | |
10316 | 14 | { &hf_dhcp_dnr_auth_domain_name, |
10317 | 14 | { "Authentication domain name", "dhcp.option.dnr.adn", |
10318 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10319 | 14 | "Option 162: DNR authentication domain name", HFILL }}, |
10320 | | |
10321 | 14 | { &hf_dhcp_dnr_addrs_len, |
10322 | 14 | { "Addresses length", "dhcp.option.dnr.addrs_len", |
10323 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10324 | 14 | "Option 162: DNR addresses length", HFILL }}, |
10325 | | |
10326 | 14 | { &hf_dhcp_dnr_addrs, |
10327 | 14 | { "Addresses", "dhcp.option.dnr.addrs", |
10328 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
10329 | 14 | "Option 162: DNR addresses", HFILL }}, |
10330 | | |
10331 | 14 | { &hf_dhcp_dnr_addrs_ip, |
10332 | 14 | { "Address", "dhcp.option.dnr.addrs.ip", |
10333 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
10334 | 14 | "Option 162: DNR address", HFILL }}, |
10335 | | |
10336 | 14 | { &hf_dhcp_option_pxe_config_file, |
10337 | 14 | { "PXELINUX configuration file", "dhcp.option.pxe_config_file", |
10338 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10339 | 14 | "Option 209: PXE Configuration File", HFILL }}, |
10340 | | |
10341 | 14 | { &hf_dhcp_option_pxe_path_prefix, |
10342 | 14 | { "PXELINUX path prefix", "dhcp.option.pxe_path_prefix", |
10343 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10344 | 14 | "Option 210: PXE Path Prefix", HFILL }}, |
10345 | | |
10346 | 14 | { &hf_dhcp_option_pxe_reboot_time, |
10347 | 14 | { "PXELINUX Reboot Time", "dhcp.option.pxe_reboot_time", |
10348 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
10349 | 14 | "Option 211: PXE Reboot Time", HFILL }}, |
10350 | | |
10351 | 14 | { &hf_dhcp_option_captive_portal, |
10352 | 14 | { "Captive Portal", "dhcp.option.captive_portal", |
10353 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10354 | 14 | "The contact URI for the captive portal that the user should connect to", HFILL }}, |
10355 | | |
10356 | 14 | { &hf_dhcp_option_6RD_ipv4_mask_len, |
10357 | 14 | { "6RD IPv4 Mask Length", "dhcp.option.6RD.ipv4_mask_len", |
10358 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10359 | 14 | "Option 212: 6RD IPv4 Mask Length", HFILL }}, |
10360 | | |
10361 | 14 | { &hf_dhcp_option_6RD_prefix_len, |
10362 | 14 | { "6RD Prefix Length", "dhcp.option.6RD.prefix_len", |
10363 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10364 | 14 | "Option 212: 6RD Prefix Length", HFILL }}, |
10365 | | |
10366 | 14 | { &hf_dhcp_option_6RD_prefix, |
10367 | 14 | { "6RD Prefix", "dhcp.option.6RD.prefix", |
10368 | 14 | FT_IPv6, BASE_NONE, NULL, 0x00, |
10369 | 14 | "Option 212: 6RD Prefix", HFILL }}, |
10370 | | |
10371 | 14 | { &hf_dhcp_option_6RD_border_relay_ip, |
10372 | 14 | { "Border Relay IP", "dhcp.option.6RD.border_relay_ip", |
10373 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10374 | 14 | "Option 212: Border Relay IP", HFILL }}, |
10375 | | |
10376 | 14 | { &hf_dhcp_option_private_proxy_autodiscovery, |
10377 | 14 | { "Private/Proxy autodiscovery", "dhcp.option.private_proxy_autodiscovery", |
10378 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10379 | 14 | "Option 252: Private/Proxy autodiscovery", HFILL }}, |
10380 | | |
10381 | 14 | { &hf_dhcp_option_end, |
10382 | 14 | { "Option End", "dhcp.option.end", |
10383 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10384 | 14 | "Option 255: End", HFILL }}, |
10385 | | |
10386 | 14 | { &hf_dhcp_option_end_overload, |
10387 | 14 | { "Option End (Overload)", "dhcp.option.end", |
10388 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10389 | 14 | "Option 255: End (Overload)", HFILL }}, |
10390 | | |
10391 | 14 | { &hf_dhcp_vendor_unknown_suboption, |
10392 | 14 | { "Option 125 Suboption", "dhcp.vendor.suboption", |
10393 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10394 | 14 | NULL, HFILL }}, |
10395 | | |
10396 | 14 | { &hf_dhcp_suboption_data, |
10397 | 14 | { "Data", "dhcp.vendor.data", |
10398 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10399 | 14 | NULL, HFILL }}, |
10400 | | |
10401 | 14 | { &hf_dhcp_pc_ietf_ccc_suboption, |
10402 | 14 | { "Suboption", "dhcp.vendor.pc.ietf_ccc.suboption", |
10403 | 14 | FT_UINT8, BASE_DEC, VALS(pkt_draft5_ccc_opt_vals), 0x0, |
10404 | 14 | NULL, HFILL }}, |
10405 | | |
10406 | 14 | { &hf_dhcp_pc_i05_ccc_suboption, |
10407 | 14 | { "Suboption", "dhcp.vendor.pc.i05_ccc.suboption", |
10408 | 14 | FT_UINT8, BASE_DEC, VALS(pkt_i05_ccc_opt_vals), 0x0, |
10409 | 14 | NULL, HFILL }}, |
10410 | | |
10411 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, |
10412 | 14 | { "pktcMtaDevRealmUnsolicitedKeyNomTimeout", "dhcp.cl.ietf_ccc.dev_realm_unc_key_nom_timeout", |
10413 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10414 | 14 | NULL, HFILL }}, |
10415 | | |
10416 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_timeout, |
10417 | 14 | { "pktcMtaDevRealmUnsolicitedKeyMaxTimeout", "dhcp.cl.ietf_ccc.dev_realm_unc_key_max_timeout", |
10418 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10419 | 14 | NULL, HFILL }}, |
10420 | | |
10421 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_retries, |
10422 | 14 | { "pktcMtaDevRealmUnsolicitedKeyMaxRetries", "dhcp.cl.ietf_ccc.dev_realm_unc_key_max_retries", |
10423 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10424 | 14 | NULL, HFILL }}, |
10425 | | |
10426 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, |
10427 | 14 | { "pktcMtaDevProvUnsolicitedKeyNomTimeout", "dhcp.cl.ietf_ccc.dev_prov_unc_key_nom_timeout", |
10428 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10429 | 14 | NULL, HFILL }}, |
10430 | | |
10431 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_timeout, |
10432 | 14 | { "pktcMtaDevProvUnsolicitedKeyMaxTimeout", "dhcp.cl.ietf_ccc.dev_prov_unc_key_max_timeout", |
10433 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10434 | 14 | NULL, HFILL }}, |
10435 | | |
10436 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_retries, |
10437 | 14 | { "pktcMtaDevProvUnsolicitedKeyMaxRetries", "dhcp.cl.ietf_ccc.dev_prov_unc_key_max_retries", |
10438 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10439 | 14 | NULL, HFILL }}, |
10440 | | |
10441 | 14 | { &hf_dhcp_ccc_ietf_sec_tkt_pc_provision_server, |
10442 | 14 | { "Invalidate PacketCable Provisioning Server", "dhcp.ccc.ietf.sec_tkt.pc_provision_server", |
10443 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0001, |
10444 | 14 | NULL, HFILL }}, |
10445 | | |
10446 | 14 | { &hf_dhcp_ccc_ietf_sec_tkt_all_pc_call_management, |
10447 | 14 | { "Invalidate All PacketCable Call Management Servers", "dhcp.ccc.ietf.sec_tkt.all_pc_call_management", |
10448 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0002, |
10449 | 14 | NULL, HFILL }}, |
10450 | | |
10451 | 14 | { &hf_dhcp_option242_avaya, |
10452 | 14 | { "Private/Avaya IP Telephone", "dhcp.option.vendor.avaya", |
10453 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10454 | 14 | "Option 242: Private/Avaya IP Telephone", HFILL }}, |
10455 | | |
10456 | 14 | { &hf_dhcp_option242_avaya_tlssrvr, |
10457 | 14 | { "TLSSRVR", "dhcp.option.vendor.avaya.tlssrvr", |
10458 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10459 | 14 | "Option 242: TLSSRVR (HTTPS server(s) to download configuration)", HFILL }}, |
10460 | | |
10461 | 14 | { &hf_dhcp_option242_avaya_httpsrvr, |
10462 | 14 | { "HTTPSRVR", "dhcp.option.vendor.avaya.httpsrvr", |
10463 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10464 | 14 | "Option 242: HTTPSRVR (HTTP server(s) to download configuration)", HFILL }}, |
10465 | | |
10466 | 14 | { &hf_dhcp_option242_avaya_httpdir, |
10467 | 14 | { "HTTPDIR", "dhcp.option.vendor.avaya.httpdir", |
10468 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10469 | 14 | "Option 242: HTTPDIR (Path to configuration files)", HFILL }}, |
10470 | | |
10471 | 14 | { &hf_dhcp_option242_avaya_static, |
10472 | 14 | { "STATIC", "dhcp.option.vendor.avaya.static", |
10473 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10474 | 14 | "Option 242: STATIC (Static programming override flag)", HFILL }}, |
10475 | | |
10476 | 14 | { &hf_dhcp_option242_avaya_mcipadd, |
10477 | 14 | { "MCIPADD", "dhcp.option.vendor.avaya.mcipadd", |
10478 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10479 | 14 | "Option 242: MCIPADD (List of CM server(s))", HFILL }}, |
10480 | | |
10481 | 14 | { &hf_dhcp_option242_avaya_dot1x, |
10482 | 14 | { "DOT1X", "dhcp.option.vendor.avaya.dot1x", |
10483 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10484 | 14 | "Option 242: DOT1X (802.1X Supplicant operation mode)", HFILL }}, |
10485 | | |
10486 | 14 | { &hf_dhcp_option242_avaya_icmpdu, |
10487 | 14 | { "ICMPDU", "dhcp.option.vendor.avaya.icmpdu", |
10488 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10489 | 14 | "Option 242: ICMPDU (ICMP Destination Unreachable processing)", HFILL }}, |
10490 | | |
10491 | 14 | { &hf_dhcp_option242_avaya_icmpred, |
10492 | 14 | { "ICMPRED", "dhcp.option.vendor.avaya.icmpred", |
10493 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10494 | 14 | "Option 242: ICMPRED (ICMP Redirect handling)", HFILL }}, |
10495 | | |
10496 | 14 | { &hf_dhcp_option242_avaya_l2q, |
10497 | 14 | { "L2Q", "dhcp.option.vendor.avaya.l2q", |
10498 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10499 | 14 | "Option 242: L2Q (Controls 802.1Q tagging)", HFILL }}, |
10500 | | |
10501 | 14 | { &hf_dhcp_option242_avaya_l2qvlan, |
10502 | 14 | { "L2QVLAN", "dhcp.option.vendor.avaya.l2qvlan", |
10503 | 14 | FT_INT32, BASE_DEC, NULL, 0x0, |
10504 | 14 | "Option 242: L2QVLAN (VLAN ID)", HFILL }}, |
10505 | | |
10506 | 14 | { &hf_dhcp_option242_avaya_loglocal, |
10507 | 14 | { "LOGLOCAL", "dhcp.option.vendor.avaya.loglocal", |
10508 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10509 | 14 | "Option 242: LOGLOCAL (Log level)", HFILL }}, |
10510 | | |
10511 | 14 | { &hf_dhcp_option242_avaya_phy1stat, |
10512 | 14 | { "PHY1STAT", "dhcp.option.vendor.avaya.phy1stat", |
10513 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10514 | 14 | "Option 242: PHY1STAT (Interface configuration)", HFILL }}, |
10515 | | |
10516 | 14 | { &hf_dhcp_option242_avaya_phy2stat, |
10517 | 14 | { "PHY2STAT", "dhcp.option.vendor.avaya.phy2stat", |
10518 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10519 | 14 | "Option 242: PHY2STAT (Interface configuration)", HFILL }}, |
10520 | | |
10521 | 14 | { &hf_dhcp_option242_avaya_procpswd, |
10522 | 14 | { "PROCPSWD", "dhcp.option.vendor.avaya.procpswd", |
10523 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10524 | 14 | "Option 242: PROCPSWD (Security string used to access local procedures)", HFILL }}, |
10525 | | |
10526 | 14 | { &hf_dhcp_option242_avaya_procstat, |
10527 | 14 | { "PROCSTAT", "dhcp.option.vendor.avaya.procstat", |
10528 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10529 | 14 | "Option 242: PROCSTAT (Local (dialpad) Administrative access)", HFILL }}, |
10530 | | |
10531 | 14 | { &hf_dhcp_option242_avaya_snmpadd, |
10532 | 14 | { "SNMPADD", "dhcp.option.vendor.avaya.snmpadd", |
10533 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10534 | 14 | "Option 242: SNMPADD (Allowable source IP Address(es) for SNMP queries)", HFILL }}, |
10535 | | |
10536 | 14 | { &hf_dhcp_option242_avaya_snmpstring, |
10537 | 14 | { "SNMPSTRING", "dhcp.option.vendor.avaya.snmpstring", |
10538 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10539 | 14 | "Option 242: SNMPSTRING (SNMP community string)", HFILL }}, |
10540 | | |
10541 | 14 | { &hf_dhcp_option242_avaya_vlantest, |
10542 | 14 | { "VLANTEST", "dhcp.option.vendor.avaya.vlantest", |
10543 | 14 | FT_INT32, BASE_DEC, NULL, 0x0, |
10544 | 14 | "Option 242: VLANTEST (Timeout in seconds)", HFILL }}, |
10545 | | |
10546 | | /* Cisco vendor suboptions */ |
10547 | 14 | { &hf_dhcp_option43_cisco_suboption, |
10548 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.cisco.suboption", |
10549 | 14 | FT_UINT8, BASE_DEC, VALS(option43_cisco_suboption_vals), 0x0, |
10550 | 14 | "Option 43:Cisco Suboption", HFILL }}, |
10551 | | |
10552 | 14 | { &hf_dhcp_option43_cisco_unknown, |
10553 | 14 | { "Unknown", "dhcp.option.vendor.cisco.unknown", |
10554 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10555 | 14 | NULL, HFILL }}, |
10556 | | |
10557 | 14 | { &hf_dhcp_option43_cisco_unknown1, |
10558 | 14 | { "Unknown1", "dhcp.option.vendor.cisco.unknown1", |
10559 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10560 | 14 | NULL, HFILL }}, |
10561 | | |
10562 | 14 | { &hf_dhcp_option43_cisco_unknown2, |
10563 | 14 | { "Unknown2", "dhcp.option.vendor.cisco.unknown2", |
10564 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10565 | 14 | NULL, HFILL }}, |
10566 | | |
10567 | 14 | { &hf_dhcp_option43_cisco_unknown3, |
10568 | 14 | { "Unknown3", "dhcp.option.vendor.cisco.unknown3", |
10569 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10570 | 14 | NULL, HFILL }}, |
10571 | | |
10572 | 14 | { &hf_dhcp_option43_cisco_nodeid, |
10573 | 14 | { "Node ID", "dhcp.option.vendor.cisco.nodeid", |
10574 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10575 | 14 | NULL, HFILL }}, |
10576 | | |
10577 | 14 | { &hf_dhcp_option43_cisco_unknown5, |
10578 | 14 | { "Unknown5", "dhcp.option.vendor.cisco.unknown5", |
10579 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10580 | 14 | NULL, HFILL }}, |
10581 | | |
10582 | 14 | { &hf_dhcp_option43_cisco_unknown6, |
10583 | 14 | { "Unknown6", "dhcp.option.vendor.cisco.unknown6", |
10584 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10585 | 14 | NULL, HFILL }}, |
10586 | | |
10587 | 14 | { &hf_dhcp_option43_cisco_model, |
10588 | 14 | { "Model", "dhcp.option.vendor.cisco.model", |
10589 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10590 | 14 | NULL, HFILL }}, |
10591 | | |
10592 | 14 | { &hf_dhcp_option43_cisco_apicuuid, |
10593 | 14 | { "APIC UUID", "dhcp.option.vendor.cisco.apicuuid", |
10594 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10595 | 14 | NULL, HFILL }}, |
10596 | | |
10597 | 14 | { &hf_dhcp_option43_cisco_fabricname, |
10598 | 14 | { "Fabricname", "dhcp.option.vendor.cisco.fabricname", |
10599 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10600 | 14 | NULL, HFILL }}, |
10601 | | |
10602 | 14 | { &hf_dhcp_option43_cisco_unknown10, |
10603 | 14 | { "Unknown10", "dhcp.option.vendor.cisco.unknown10", |
10604 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10605 | 14 | NULL, HFILL }}, |
10606 | | |
10607 | 14 | { &hf_dhcp_option43_cisco_serialno, |
10608 | 14 | { "SerialNo", "dhcp.option.vendor.cisco.serialno", |
10609 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10610 | 14 | NULL, HFILL }}, |
10611 | | |
10612 | 14 | { &hf_dhcp_option43_cisco_clientint, |
10613 | 14 | { "Client Int", "dhcp.option.vendor.cisco.clientint", |
10614 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10615 | 14 | NULL, HFILL }}, |
10616 | 14 | }; |
10617 | | |
10618 | 14 | static uat_field_t dhcp_uat_flds[] = { |
10619 | 14 | UAT_FLD_DEC(uat_dhcp_records, opt, "Option number", "Custom Option Number"), |
10620 | 14 | UAT_FLD_CSTRING(uat_dhcp_records, text, "Option Name", "Custom Option Name"), |
10621 | 14 | UAT_FLD_VS(uat_dhcp_records, ftype, "Option type", dhcp_custom_type_vals, "Option datatype"), |
10622 | 14 | UAT_END_FIELDS |
10623 | 14 | }; |
10624 | | |
10625 | 14 | static int *ett[] = { |
10626 | 14 | &ett_dhcp, |
10627 | 14 | &ett_dhcp_flags, |
10628 | 14 | &ett_dhcp_option, |
10629 | 14 | &ett_dhcp_option43_suboption, |
10630 | 14 | &ett_dhcp_option43_suboption_discovery, |
10631 | 14 | &ett_dhcp_option43_suboption_tree, |
10632 | 14 | &ett_dhcp_option63_suboption, |
10633 | 14 | &ett_dhcp_option77_instance, |
10634 | 14 | &ett_dhcp_option82_suboption, |
10635 | 14 | &ett_dhcp_option82_suboption9, |
10636 | 14 | &ett_dhcp_option124_vendor_class_data_item, |
10637 | 14 | &ett_dhcp_option125_suboption, |
10638 | 14 | &ett_dhcp_option125_tr111_suboption, |
10639 | 14 | &ett_dhcp_option125_cl_suboption, |
10640 | 14 | &ett_dhcp_option242_suboption, |
10641 | 14 | &ett_dhcp_fqdn, |
10642 | 14 | &ett_dhcp_filename_option, |
10643 | 14 | &ett_dhcp_server_hostname, |
10644 | 14 | &ett_dhcp_fqdn_flags, |
10645 | 14 | &ett_dhcp_isns_functions, |
10646 | 14 | &ett_dhcp_isns_discovery_domain_access, |
10647 | 14 | &ett_dhcp_isns_administrative_flags, |
10648 | 14 | &ett_dhcp_isns_server_security_bitmap, |
10649 | 14 | &ett_dhcp_isns_secondary_server_addr, |
10650 | 14 | &ett_dhcp_o43_bsdp_boot_image, |
10651 | 14 | &ett_dhcp_o43_bsdp_attributes, |
10652 | 14 | &ett_dhcp_o43_bsdp_image_desc_list, |
10653 | 14 | &ett_dhcp_o43_bsdp_image_desc, |
10654 | 14 | &ett_dhcp_o43_bsdp_attributes_flags, |
10655 | 14 | &ett_dhcp_option158_pcp_list, |
10656 | 14 | &ett_dhcp_dnr_instance, |
10657 | 14 | &ett_dhcp_dnr_instance_addrs, |
10658 | 14 | }; |
10659 | | |
10660 | 14 | static ei_register_info ei[] = { |
10661 | 14 | { &ei_dhcp_bad_length, { "dhcp.bad_length", PI_PROTOCOL, PI_ERROR, "length isn't 0", EXPFILL }}, |
10662 | 14 | { &ei_dhcp_bad_bitfield, { "dhcp.bad_bitfield", PI_PROTOCOL, PI_ERROR, "Bogus bitfield", EXPFILL }}, |
10663 | 14 | { &ei_dhcp_missing_subopt_length, { "dhcp.missing_subopt_length", PI_PROTOCOL, PI_ERROR, "no room left in option for suboption length", EXPFILL }}, |
10664 | 14 | { &ei_dhcp_missing_subopt_value, { "dhcp.missing_subopt_value", PI_PROTOCOL, PI_ERROR, "no room left in option for suboption value", EXPFILL }}, |
10665 | 14 | { &ei_dhcp_mal_duid, { "dhcp.malformed.duid", PI_PROTOCOL, PI_ERROR, "DUID: malformed option", EXPFILL }}, |
10666 | 14 | { &ei_dhcp_rfc3396_refer_last_option, { "dhcp.option.refer_last_option", PI_REASSEMBLE, PI_CHAT, "For the data, please refer to the last option of this type", EXPFILL }}, |
10667 | 14 | { &ei_dhcp_opt_overload_wrong_field, { "dhcp.option.option_overload.wrong_field", PI_PROTOCOL, PI_WARN, "overload option makes no sense in the file or sname field", EXPFILL }}, |
10668 | 14 | { &ei_dhcp_opt_overload_file_end_missing, { "dhcp.option.option_overload.file_end_missing", PI_PROTOCOL, PI_ERROR, "file overload end option missing", EXPFILL }}, |
10669 | 14 | { &ei_dhcp_opt_overload_sname_end_missing, { "dhcp.option.option_overload.sname_end_missing", PI_PROTOCOL, PI_ERROR, "sname overload end option missing", EXPFILL }}, |
10670 | 14 | { &ei_dhcp_subopt_unknown_type, { "dhcp.subopt.unknown_type", PI_PROTOCOL, PI_ERROR, "ERROR, please report: Unknown subopt type handler", EXPFILL }}, |
10671 | 14 | { &ei_dhcp_option_civic_location_bad_cattype, { "dhcp.option.civic_location.bad_cattype", PI_PROTOCOL, PI_ERROR, "Error with CAType", EXPFILL }}, |
10672 | 14 | { &ei_dhcp_option_dhcp_name_service_invalid, { "dhcp.option.dhcp_name_service.invalid", PI_PROTOCOL, PI_ERROR, "Invalid Name Service", EXPFILL }}, |
10673 | 14 | { &ei_dhcp_option_sip_server_address_encoding, { "dhcp.option.sip_server_address.encoding", PI_PROTOCOL, PI_ERROR, "RFC 3361 defines only 0 and 1 for Encoding byte", EXPFILL }}, |
10674 | 14 | { &ei_dhcp_option_classless_static_route, { "dhcp.option.classless_static.route", PI_PROTOCOL, PI_ERROR, "Mask width > 32", EXPFILL }}, |
10675 | 14 | { &ei_dhcp_option125_enterprise_malformed, { "dhcp.option.enterprise.malformed", PI_PROTOCOL, PI_ERROR, "no room left in option for enterprise data", EXPFILL }}, |
10676 | 14 | { &ei_dhcp_option_6RD_malformed, { "dhcp.option.6RD.malformed", PI_PROTOCOL, PI_ERROR, "6RD: malformed option", EXPFILL }}, |
10677 | 14 | { &ei_dhcp_option82_vi_cl_tag_unknown, { "dhcp.option.option.vi.cl.tag_unknown", PI_PROTOCOL, PI_ERROR, "Unknown tag", EXPFILL }}, |
10678 | 14 | { &ei_dhcp_option_parse_err, { "dhcp.option.parse_err", PI_PROTOCOL, PI_ERROR, "Parse error", EXPFILL }}, |
10679 | 14 | { &ei_dhcp_nonstd_option_data, { "dhcp.option.nonstd_data", PI_PROTOCOL, PI_NOTE, "Non standard compliant option data", EXPFILL }}, |
10680 | 14 | { &ei_dhcp_suboption_invalid, { "dhcp.suboption_invalid", PI_PROTOCOL, PI_ERROR, "Invalid suboption", EXPFILL }}, |
10681 | 14 | { &ei_dhcp_secs_le, { "dhcp.secs_le", PI_PROTOCOL, PI_NOTE, "Seconds elapsed appears to be encoded as little-endian", EXPFILL }}, |
10682 | 14 | { &ei_dhcp_end_option_missing, { "dhcp.end_option_missing", PI_PROTOCOL, PI_ERROR, "End option missing", EXPFILL }}, |
10683 | 14 | { &ei_dhcp_client_address_not_given, { "dhcp.client_address_not_given", PI_PROTOCOL, PI_NOTE, "Client address not given", EXPFILL }}, |
10684 | 14 | { &ei_dhcp_server_name_overloaded_by_dhcp, { "dhcp.server_name_overloaded_by_dhcp", PI_PROTOCOL, PI_NOTE, "Server name option overloaded by DHCP", EXPFILL }}, |
10685 | 14 | { &ei_dhcp_boot_filename_overloaded_by_dhcp, { "dhcp.boot_filename_overloaded_by_dhcp", PI_PROTOCOL, PI_NOTE, "Boot file name option overloaded by DHCP", EXPFILL }}, |
10686 | 14 | { &ei_dhcp_option_isns_ignored_bitfield, { "dhcp.option.isns.ignored_bitfield", PI_PROTOCOL, PI_NOTE, "Enabled field is not set - non-zero bitmask ignored", EXPFILL }}, |
10687 | 14 | { &ei_dhcp_option242_avaya_l2qvlan_invalid, { "dhcp.option.vendor.avaya.l2qvlan.invalid", PI_PROTOCOL, PI_ERROR, "Option 242 (L2QVLAN) invalid", EXPFILL }}, |
10688 | 14 | { &ei_dhcp_option242_avaya_vlantest_invalid, { "dhcp.option.vendor.avaya.vlantest.invalid", PI_PROTOCOL, PI_ERROR, "Option 242 (avaya vlantest) invalid", EXPFILL }}, |
10689 | 14 | { &ei_dhcp_option93_client_arch_ambiguous, { "dhcp.option.client_architecture.ambiguous", PI_PROTOCOL, PI_WARN, "Client Architecture ID may be ambiguous", EXPFILL }}, |
10690 | 14 | { &ei_dhcp_option_dnr_adn_only_mode, { "dhcp.option.dnr.adn_only_mode", PI_COMMENTS_GROUP, PI_CHAT, "This DNR instance is in ADN-only mode", EXPFILL }}, |
10691 | 14 | }; |
10692 | | |
10693 | 14 | static tap_param dhcp_stat_params[] = { |
10694 | 14 | { PARAM_FILTER, "filter", "Filter", NULL, true } |
10695 | 14 | }; |
10696 | | |
10697 | 14 | static stat_tap_table_ui dhcp_stat_table = { |
10698 | 14 | REGISTER_PACKET_STAT_GROUP_UNSORTED, |
10699 | 14 | "DHCP (BOOTP) Statistics", |
10700 | 14 | "dhcp", |
10701 | 14 | "dhcp,stat", |
10702 | 14 | dhcp_stat_init, |
10703 | 14 | dhcp_stat_packet, |
10704 | 14 | dhcp_stat_reset, |
10705 | 14 | NULL, |
10706 | 14 | NULL, |
10707 | 14 | array_length(dhcp_stat_fields), dhcp_stat_fields, |
10708 | 14 | array_length(dhcp_stat_params), dhcp_stat_params, |
10709 | 14 | NULL, |
10710 | 14 | 0 |
10711 | 14 | }; |
10712 | | |
10713 | 14 | module_t *dhcp_module; |
10714 | 14 | expert_module_t* expert_dhcp; |
10715 | | |
10716 | 14 | proto_dhcp = proto_register_protocol("Dynamic Host Configuration Protocol", "DHCP/BOOTP", "dhcp"); |
10717 | 14 | proto_register_field_array(proto_dhcp, hf, array_length(hf)); |
10718 | 14 | proto_register_alias(proto_dhcp, "bootp"); |
10719 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
10720 | 14 | dhcp_bootp_tap = register_tap("dhcp"); |
10721 | | |
10722 | 14 | expert_dhcp = expert_register_protocol(proto_dhcp); |
10723 | 14 | expert_register_field_array(expert_dhcp, ei, array_length(ei)); |
10724 | | |
10725 | 14 | dhcp_option_table = register_dissector_table("dhcp.option", "BOOTP Options", proto_dhcp, FT_UINT8, BASE_DEC); |
10726 | 14 | dhcp_vendor_id_subdissector = register_heur_dissector_list_with_description("dhcp.vendor_id", "DHCP Vendor ID", proto_dhcp); |
10727 | 14 | dhcp_vendor_info_subdissector = register_heur_dissector_list_with_description("dhcp.vendor_info", "DHCP Vendor Info", proto_dhcp); |
10728 | 14 | dhcp_enterprise_class_table = register_dissector_table("dhcp.enterprise_class", "V-I Vendor Class Enterprise", proto_dhcp, FT_UINT32, BASE_DEC); |
10729 | 14 | dhcp_enterprise_specific_table = register_dissector_table("dhcp.enterprise", "V-I Vendor Specific Enterprise", proto_dhcp, FT_UINT32, BASE_DEC); |
10730 | | |
10731 | | /* register init/cleanup routine to handle the custom dhcp options */ |
10732 | 14 | register_init_routine(&dhcp_init_protocol); |
10733 | 14 | register_cleanup_routine(&dhcp_cleanup_protocol); |
10734 | | |
10735 | | /* Allow dissector to find be found by name. */ |
10736 | 14 | dhcp_handle = register_dissector("dhcp", dissect_dhcp, proto_dhcp); |
10737 | | |
10738 | 14 | dhcp_module = prefs_register_protocol(proto_dhcp, NULL); |
10739 | | |
10740 | 14 | prefs_register_bool_preference(dhcp_module, "novellserverstring", |
10741 | 14 | "Decode Option 85 as String", |
10742 | 14 | "Novell Servers option 85 can be configured as a string instead of address", |
10743 | 14 | &novell_string); |
10744 | | |
10745 | 14 | prefs_register_enum_preference(dhcp_module, "pkt.ccc.protocol_version", |
10746 | 14 | "PacketCable CCC protocol version", |
10747 | 14 | "The PacketCable CCC protocol version", |
10748 | 14 | &pkt_ccc_protocol_version, |
10749 | 14 | pkt_ccc_protocol_versions, |
10750 | 14 | false); |
10751 | | |
10752 | 14 | prefs_register_uint_preference(dhcp_module, "pkt.ccc.option", |
10753 | 14 | "PacketCable CCC option", |
10754 | 14 | "Option Number for PacketCable CableLabs Client Configuration", |
10755 | 14 | 10, |
10756 | 14 | &pkt_ccc_option); |
10757 | | |
10758 | 14 | prefs_register_enum_preference(dhcp_module, "uuid.endian", |
10759 | 14 | "Endianness of UUID", |
10760 | 14 | "Endianness applied to UUID fields", |
10761 | 14 | &dhcp_uuid_endian, |
10762 | 14 | dhcp_uuid_endian_vals, |
10763 | 14 | false); |
10764 | | |
10765 | 14 | prefs_register_enum_preference(dhcp_module, "secs.endian", |
10766 | 14 | "Endianness of seconds elapsed field", |
10767 | 14 | "Endianness applied to seconds elapsed field", |
10768 | 14 | &dhcp_secs_endian, |
10769 | 14 | dhcp_secs_endian_vals, |
10770 | 14 | false); |
10771 | | |
10772 | 14 | prefs_register_obsolete_preference(dhcp_module, "displayasstring"); |
10773 | | |
10774 | 14 | dhcp_uat = uat_new("Custom DHCP/BootP Options (Excl. suboptions)", |
10775 | 14 | sizeof(uat_dhcp_record_t), /* record size */ |
10776 | 14 | "custom_bootp", /* filename */ |
10777 | 14 | true, /* from_profile */ |
10778 | 14 | &uat_dhcp_records, /* data_ptr */ |
10779 | 14 | &num_dhcp_records_uat, /* numitems_ptr */ |
10780 | 14 | UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ |
10781 | 14 | NULL, /* help */ |
10782 | 14 | uat_dhcp_record_copy_cb, /* copy callback */ |
10783 | 14 | uat_dhcp_record_update_cb, /* update callback */ |
10784 | 14 | uat_dhcp_record_free_cb, /* free callback */ |
10785 | 14 | NULL, /* post update callback */ |
10786 | 14 | NULL, /* reset callback */ |
10787 | 14 | dhcp_uat_flds); /* UAT field definitions */ |
10788 | | |
10789 | 14 | prefs_register_uat_preference(dhcp_module, |
10790 | 14 | "custom_dhcp_table", |
10791 | 14 | "Custom DHCP/BootP Options (Excl. suboptions)", |
10792 | 14 | "Custom DHCP/BootP Options (Excl. suboptions)", |
10793 | 14 | dhcp_uat); |
10794 | | |
10795 | 14 | register_stat_tap_table_ui(&dhcp_stat_table); |
10796 | 14 | } |
10797 | | |
10798 | | void |
10799 | | proto_reg_handoff_dhcp(void) |
10800 | 14 | { |
10801 | 14 | range_t *dhcpopt_basictype_range; |
10802 | | |
10803 | 14 | dissector_add_uint_range_with_preference("udp.port", DHCP_UDP_PORT_RANGE, dhcp_handle); |
10804 | | |
10805 | | /* Create dissection function handles for all DHCP/BOOTP options */ |
10806 | 14 | dhcpopt_basic_handle = create_dissector_handle( dissect_dhcpopt_basic_type, proto_dhcp ); |
10807 | 14 | range_convert_str(wmem_epan_scope(), &dhcpopt_basictype_range, DHCP_OPTION_BASICTYPE_RANGE, 0xFF); |
10808 | 14 | dissector_add_uint_range("dhcp.option", dhcpopt_basictype_range, dhcpopt_basic_handle); |
10809 | | |
10810 | 14 | dissector_add_uint("dhcp.option", 21, create_dissector_handle( dissect_dhcpopt_policy_filter, proto_dhcp )); |
10811 | 14 | dissector_add_uint("dhcp.option", 33, create_dissector_handle( dissect_dhcpopt_static_route, proto_dhcp )); |
10812 | 14 | dissector_add_uint("dhcp.option", 43, create_dissector_handle( dissect_dhcpopt_vendor_specific_info, proto_dhcp )); |
10813 | 14 | dissector_add_uint("dhcp.option", 52, create_dissector_handle( dissect_dhcpopt_option_overload, proto_dhcp )); |
10814 | 14 | dissector_add_uint("dhcp.option", 53, create_dissector_handle( dissect_dhcpopt_dhcp, proto_dhcp )); |
10815 | 14 | dissector_add_uint("dhcp.option", 55, create_dissector_handle( dissect_dhcpopt_param_request_list, proto_dhcp )); |
10816 | 14 | dissector_add_uint("dhcp.option", 60, create_dissector_handle( dissect_dhcpopt_vendor_class_identifier, proto_dhcp )); |
10817 | 14 | dissector_add_uint("dhcp.option", 61, create_dissector_handle( dissect_dhcpopt_client_identifier, proto_dhcp )); |
10818 | 14 | dissector_add_uint("dhcp.option", 63, create_dissector_handle( dissect_dhcpopt_netware_ip, proto_dhcp )); |
10819 | 14 | dissector_add_uint("dhcp.option", 77, create_dissector_handle( dissect_dhcpopt_user_class_information, proto_dhcp )); |
10820 | 14 | dissector_add_uint("dhcp.option", 78, create_dissector_handle( dissect_dhcpopt_slp_directory_agent, proto_dhcp )); |
10821 | 14 | dissector_add_uint("dhcp.option", 79, create_dissector_handle( dissect_dhcpopt_slp_service_scope, proto_dhcp )); |
10822 | 14 | dissector_add_uint("dhcp.option", 81, create_dissector_handle( dissect_dhcpopt_client_full_domain_name, proto_dhcp )); |
10823 | 14 | dissector_add_uint("dhcp.option", 82, create_dissector_handle( dissect_dhcpopt_relay_agent_info, proto_dhcp )); |
10824 | 14 | dissector_add_uint("dhcp.option", 83, create_dissector_handle( dissect_dhcpopt_isns, proto_dhcp )); |
10825 | 14 | dissector_add_uint("dhcp.option", 85, create_dissector_handle( dissect_dhcpopt_novell_servers, proto_dhcp )); |
10826 | 14 | dissector_add_uint("dhcp.option", 90, create_dissector_handle( dissect_dhcpopt_dhcp_authentication, proto_dhcp )); |
10827 | 14 | dissector_add_uint("dhcp.option", 93, create_dissector_handle( dissect_dhcpopt_client_architecture, proto_dhcp )); |
10828 | 14 | dissector_add_uint("dhcp.option", 94, create_dissector_handle( dissect_dhcpopt_client_network_interface_id, proto_dhcp )); |
10829 | 14 | dissector_add_uint("dhcp.option", 97, create_dissector_handle( dissect_dhcpopt_client_identifier_uuid, proto_dhcp )); |
10830 | 14 | dissector_add_uint("dhcp.option", 99, create_dissector_handle( dissect_dhcpopt_civic_location, proto_dhcp )); |
10831 | 14 | dissector_add_uint("dhcp.option", 114, create_dissector_handle( dissect_dhcpopt_dhcp_captive_portal, proto_dhcp )); |
10832 | 14 | dissector_add_uint("dhcp.option", 117, create_dissector_handle( dissect_dhcpopt_name_server_search, proto_dhcp )); |
10833 | 14 | dissector_add_uint("dhcp.option", 119, create_dissector_handle( dissect_dhcpopt_dhcp_domain_search, proto_dhcp )); |
10834 | 14 | dissector_add_uint("dhcp.option", 120, create_dissector_handle( dissect_dhcpopt_sip_servers, proto_dhcp )); |
10835 | 14 | dissector_add_uint("dhcp.option", 121, create_dissector_handle( dissect_dhcpopt_classless_static_route, proto_dhcp )); |
10836 | | /* The PacketCable CCC option number can vary. Still handled through preference */ |
10837 | 14 | dissector_add_uint("dhcp.option", 122, create_dissector_handle( dissect_dhcpopt_packetcable_ccc, proto_dhcp )); |
10838 | | |
10839 | 14 | dissector_add_uint("dhcp.option", 123, create_dissector_handle( dissect_dhcpopt_coordinate_based_location, proto_dhcp )); |
10840 | 14 | dissector_add_uint("dhcp.option", 124, create_dissector_handle( dissect_dhcpopt_vi_vendor_class, proto_dhcp )); |
10841 | 14 | dissector_add_uint("dhcp.option", 125, create_dissector_handle( dissect_dhcpopt_vi_vendor_specific_info, proto_dhcp )); |
10842 | 14 | dissector_add_uint("dhcp.option", 145, create_dissector_handle( dissect_dhcpopt_forcerenew_nonce, proto_dhcp )); |
10843 | 14 | dissector_add_uint("dhcp.option", 146, create_dissector_handle( dissect_dhcpopt_rdnss, proto_dhcp )); |
10844 | 14 | dissector_add_uint("dhcp.option", 151, create_dissector_handle( dissect_dhcpopt_bulk_lease_status_code, proto_dhcp )); |
10845 | 14 | dissector_add_uint("dhcp.option", 152, create_dissector_handle( dissect_dhcpopt_bulk_lease_base_time, proto_dhcp )); |
10846 | 14 | dissector_add_uint("dhcp.option", 154, create_dissector_handle( dissect_dhcpopt_bulk_lease_query_start, proto_dhcp )); |
10847 | 14 | dissector_add_uint("dhcp.option", 155, create_dissector_handle( dissect_dhcpopt_bulk_lease_query_end, proto_dhcp )); |
10848 | 14 | dissector_add_uint("dhcp.option", 158, create_dissector_handle( dissect_dhcpopt_pcp_server, proto_dhcp )); |
10849 | 14 | dissector_add_uint("dhcp.option", 159, create_dissector_handle( dissect_dhcpopt_portparams, proto_dhcp )); |
10850 | 14 | dissector_add_uint("dhcp.option", 160, create_dissector_handle( dissect_dhcpopt_dhcp_captive_portal, proto_dhcp )); |
10851 | 14 | dissector_add_uint("dhcp.option", 162, create_dissector_handle( dissect_dhcpopt_dnr, proto_dhcp )); |
10852 | 14 | dissector_add_uint("dhcp.option", 212, create_dissector_handle( dissect_dhcpopt_6RD_option, proto_dhcp )); |
10853 | 14 | dissector_add_uint("dhcp.option", 242, create_dissector_handle( dissect_dhcpopt_avaya_ip_telephone, proto_dhcp )); |
10854 | 14 | dissector_add_uint("dhcp.option", 249, create_dissector_handle( dissect_dhcpopt_classless_static_route, proto_dhcp )); |
10855 | | |
10856 | | /* Create heuristic dissection for DHCP vendor class id */ |
10857 | 14 | heur_dissector_add( "dhcp.vendor_id", dissect_packetcable_mta_vendor_id_heur, "PacketCable MTA", "packetcable_mta_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10858 | 14 | heur_dissector_add( "dhcp.vendor_id", dissect_packetcable_cm_vendor_id_heur, "PacketCable CM", "packetcable_cm_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10859 | 14 | heur_dissector_add( "dhcp.vendor_id", dissect_apple_bsdp_vendor_id_heur, "Apple BSDP", "apple_bsdp_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10860 | | |
10861 | | /* Create heuristic dissection for DHCP vendor specific information */ |
10862 | | |
10863 | | /* Note that this is a rather weak (permissive) heuristic, |
10864 | | it's put first so it ends up at the end of the list, I guess this is OK. |
10865 | | Add any stronger (less permissive) heuristics after this! |
10866 | | XXX - Should we just disable by default? */ |
10867 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_alcatel_lucent_vendor_info_heur, "Alcatel-Lucent", "alcatel_lucent_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10868 | | |
10869 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_pxeclient_vendor_info_heur, "PXEClient", "pxeclient_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10870 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_cablelabs_vendor_info_heur, "CableLabs", "cablelabs_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10871 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_aruba_ap_vendor_info_heur, ARUBA_AP, "aruba_ap_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10872 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_aruba_instant_ap_vendor_info_heur, ARUBA_INSTANT_AP, "aruba_instant_ap_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10873 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_apple_bsdp_vendor_info_heur, "Apple BSDP", "apple_bsdp_info_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10874 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_aerohive_vendor_info_heur, "AEROHIVE", "aerohive_info_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10875 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_cisco_vendor_info_heur, "Cisco", "cisco_info_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10876 | | |
10877 | | /* Create dissection function handles for DHCP Enterprise dissection */ |
10878 | 14 | dissector_add_uint("dhcp.enterprise", 4491, create_dissector_handle( dissect_vendor_cl_suboption, proto_dhcp )); |
10879 | 14 | dissector_add_uint("dhcp.enterprise", 3561, create_dissector_handle( dissect_vendor_tr111_suboption, proto_dhcp )); |
10880 | | |
10881 | 14 | svc_params_handle = find_dissector("svc_params"); |
10882 | 14 | } |
10883 | | |
10884 | | /* |
10885 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
10886 | | * |
10887 | | * Local variables: |
10888 | | * c-basic-offset: 8 |
10889 | | * tab-width: 8 |
10890 | | * indent-tabs-mode: t |
10891 | | * End: |
10892 | | * |
10893 | | * vi: set shiftwidth=8 tabstop=8 noexpandtab: |
10894 | | * :indentSize=8:tabSize=8:noTabs=false: |
10895 | | */ |