/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 | 63 | #define DHCP_HW_IS_ETHER(hwtype, length) ((hwtype == 1 || hwtype == 6) && length == 6) |
779 | | |
780 | | /* RFC2937 The Name Service Search Option for DHCP */ |
781 | 436 | #define RFC2937_LOCAL_NAMING_INFORMATION 0 |
782 | 130 | #define RFC2937_DOMAIN_NAME_SERVER_OPTION 6 |
783 | 107 | #define RFC2937_NETWORK_INFORMATION_SERVERS_OPTION 41 |
784 | 83 | #define RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION 44 |
785 | 120 | #define RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION 65 |
786 | | |
787 | | /* RFC3825decoder error codes of the conversion function */ |
788 | 56 | #define RFC3825_NOERROR 0 |
789 | 3 | #define RFC3825_LATITUDE_OUTOFRANGE 1 |
790 | 1 | #define RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE 2 |
791 | 4 | #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 | 6 | #define RFC3825_ALTITUDE_TYPE_OUTOFRANGE 7 |
796 | 16 | #define RFC3825_DATUM_TYPE_OUTOFRANGE 8 |
797 | | |
798 | 30 | #define DUID_LLT 1 |
799 | 9 | #define DUID_EN 2 |
800 | 35 | #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.78k | #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.80k | #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 | 25 | #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 | 450 | ((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 | 127 | #define F_ISNS_ADMIN_FLAGS_ENABLED 0x0001 |
1090 | 79 | #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.35k | #define PACKETCABLE_MTA_CAP10 "pktc1.0:" |
1172 | 1.28k | #define PACKETCABLE_MTA_CAP15 "pktc1.5:" |
1173 | 1.19k | #define PACKETCABLE_MTA_CAP20 "pktc2.0:" |
1174 | 1.13k | #define PACKETCABLE_CM_CAP11 "docsis1.1:" |
1175 | 1.10k | #define PACKETCABLE_CM_CAP20 "docsis2.0:" |
1176 | 1.06k | #define PACKETCABLE_CM_CAP30 "docsis3.0:" |
1177 | | |
1178 | 0 | #define PACKETCABLE_CCC_I05 1 |
1179 | 289 | #define PACKETCABLE_CCC_DRAFT5 2 |
1180 | 5.74k | #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.91k | #define APPLE_BSDP_SERVER "AAPLBSDPC" |
1190 | 2.45k | #define APPLE_BSDP_CLIENT "AAPLBSDPC/" |
1191 | | |
1192 | 1.58k | #define CISCO_VCID "cisco" |
1193 | | |
1194 | 1.54k | #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.49k | #define ARUBA_INSTANT_AP "ArubaInstantAP" |
1203 | 1.39k | #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 | 48 | #define AUTHEN_PROTO_DELAYED_AUTHEN 1 |
1232 | | |
1233 | | /* DHCP Authentication algorithms for delayed authentication */ |
1234 | 15 | #define AUTHEN_DELAYED_ALGO_HMAC_MD5 1 |
1235 | | |
1236 | | /* DHCP Authentication Replay Detection Methods */ |
1237 | 5 | #define AUTHEN_RDM_MONOTONIC_COUNTER 0x00 |
1238 | | |
1239 | | /* DHCP Option Overload (option code 52) */ |
1240 | 9.57k | #define OPT_OVERLOAD_FILE 1 |
1241 | 9.57k | #define OPT_OVERLOAD_SNAME 2 |
1242 | | #define OPT_OVERLOAD_BOTH 3 |
1243 | | |
1244 | | /* Server name and boot file offsets and lengths */ |
1245 | 25.3k | #define SERVER_NAME_OFFSET 44 |
1246 | 16.7k | #define SERVER_NAME_LEN 64 |
1247 | 25.3k | #define FILE_NAME_OFFSET 108 |
1248 | 16.6k | #define FILE_NAME_LEN 128 |
1249 | 9.57k | #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.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#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 | | { 0x0021, "MIPS 32-bit UEFI" }, |
1306 | | { 0x0022, "MIPS 64-bit UEFI" }, |
1307 | | { 0x0023, "Sunway 32-bit UEFI" }, |
1308 | | { 0x0024, "Sunway 64-bit UEFI" }, |
1309 | | { 0x0025, "LoongArch 32-bit UEFI" }, |
1310 | | { 0x0026, "LoongArch 32-bit UEFI HTTP" }, |
1311 | | { 0x0027, "LoongArch 64-bit UEFI" }, |
1312 | | { 0x0028, "LoongArch 64-bit UEFI HTTP" }, |
1313 | | { 0x0029, "ARM rpiboot" }, |
1314 | | { 0, NULL } |
1315 | | }; |
1316 | | |
1317 | | static const value_string opt_overload_vals[] = { |
1318 | | { OPT_OVERLOAD_FILE, "Boot file name holds options", }, |
1319 | | { OPT_OVERLOAD_SNAME, "Server host name holds options", }, |
1320 | | { OPT_OVERLOAD_BOTH, "Boot file and server host names hold options" }, |
1321 | | { 0, NULL } }; |
1322 | | |
1323 | | static const value_string slpda_vals[] = { |
1324 | | {0x00, "Dynamic Discovery" }, |
1325 | | {0x01, "Static Discovery" }, |
1326 | | {0x80, "Backwards compatibility" }, |
1327 | | {0, NULL } }; |
1328 | | |
1329 | | static const value_string slp_scope_vals[] = { |
1330 | | {0x00, "Preferred Scope" }, |
1331 | | {0x01, "Mandatory Scope" }, |
1332 | | {0, NULL } }; |
1333 | | |
1334 | | static const value_string authen_protocol_vals[] = { |
1335 | | {AUTHEN_PROTO_CONFIG_TOKEN, "configuration token" }, |
1336 | | {AUTHEN_PROTO_DELAYED_AUTHEN, "delayed authentication" }, |
1337 | | {0, NULL } }; |
1338 | | |
1339 | | static const value_string authen_da_algo_vals[] = { |
1340 | | {AUTHEN_DELAYED_ALGO_HMAC_MD5, "HMAC_MD5" }, |
1341 | | {0, NULL } }; |
1342 | | |
1343 | | static const value_string authen_rdm_vals[] = { |
1344 | | {AUTHEN_RDM_MONOTONIC_COUNTER, "Monotonically-increasing counter" }, |
1345 | | {0, NULL } }; |
1346 | | |
1347 | | static const value_string cl_dss_id_type_vals[] = { |
1348 | | {1, "Primary DSS_ID" }, |
1349 | | {2, "Secondary DSS_ID" }, |
1350 | | {0, NULL } |
1351 | | }; |
1352 | | |
1353 | | static const value_string sip_server_enc_vals[] = { |
1354 | | {0, "Fully Qualified Domain Name" }, |
1355 | | {1, "IPv4 Address" }, |
1356 | | {0, NULL } |
1357 | | }; |
1358 | | |
1359 | | static const value_string o43_bsdp_boot_image_install_vals[] = { |
1360 | | { 0, "non-install" }, |
1361 | | { 1, "install" }, |
1362 | | { 0, NULL } |
1363 | | }; |
1364 | | |
1365 | | static const value_string o43_bsdp_boot_image_kind_vals[] = { |
1366 | | { 0, "Mac OS 9" }, |
1367 | | { 1, "Mac OS X" }, |
1368 | | { 2, "Mac OS X Server" }, |
1369 | | { 3, "Hardware Diagnostics" }, |
1370 | | { 0, NULL } |
1371 | | }; |
1372 | | |
1373 | | static const value_string o43_bsdp_message_type_vals[] = { |
1374 | | { 1, "LIST" }, |
1375 | | { 2, "SELECT" }, |
1376 | | { 3, "FAILED" }, |
1377 | | { 0, NULL } |
1378 | | }; |
1379 | | |
1380 | | static const string_string option242_avaya_phystat_vals[] = { |
1381 | | { "0", "Disabled" }, |
1382 | | { "1", "Auto" }, |
1383 | | { "2", "10Mbps half" }, |
1384 | | { "3", "10Mbps full" }, |
1385 | | { "4", "100Mbps half" }, |
1386 | | { "5", "100Mbps full" }, |
1387 | | { "6", "1000Mbps full" }, |
1388 | | { NULL, NULL } |
1389 | | }; |
1390 | | |
1391 | | static const string_string option242_avaya_l2q_vals[] = { |
1392 | | { "0", "Auto" }, |
1393 | | { "1", "Enabled" }, |
1394 | | { "2", "Disabled" }, |
1395 | | { NULL, NULL } |
1396 | | }; |
1397 | | |
1398 | | static const string_string option242_avaya_dot1x_vals[] = { |
1399 | | { "0", "With PAE pass-through" }, |
1400 | | { "1", "With PAE pass-through and proxy Logoff" }, |
1401 | | { "2", "Without PAE pass-through or proxy Logoff" }, |
1402 | | { NULL, NULL } |
1403 | | }; |
1404 | | |
1405 | | static const string_string option242_avaya_icmpdu_vals[] = { |
1406 | | { "0", "No ICMP Destination Unreachable messages" }, |
1407 | | { "1", "Send limited Port Unreachable messages" }, |
1408 | | { "2", "Send Protocol and Port Unreachable messages" }, |
1409 | | { NULL, NULL } |
1410 | | }; |
1411 | | |
1412 | | static const string_string option242_avaya_icmpred_vals[] = { |
1413 | | { "0", "Ignore ICMP Redirect messages" }, |
1414 | | { "1", "Process ICMP Redirect messages" }, |
1415 | | { NULL, NULL } |
1416 | | }; |
1417 | | |
1418 | | static const string_string option242_avaya_loglocal_vals[] = { |
1419 | | { "0", "Disabled" }, |
1420 | | { "1", "Emergency" }, |
1421 | | { "2", "Alerts" }, |
1422 | | { "3", "Critical" }, |
1423 | | { "4", "Errors" }, |
1424 | | { "5", "Warnings" }, |
1425 | | { "6", "Notices" }, |
1426 | | { "7", "Information" }, |
1427 | | { "8", "Debug" }, |
1428 | | { NULL, NULL } |
1429 | | }; |
1430 | | |
1431 | | static const string_string option242_avaya_procstat_vals[] = { |
1432 | | { "0", "All administrative options" }, |
1433 | | { "1", "Only view administrative options" }, |
1434 | | { NULL, NULL } |
1435 | | }; |
1436 | | |
1437 | | static const string_string option242_avaya_static_vals[] = { |
1438 | | { "0", "Static programming never overrides call server (DHCP) or call server administered data" }, |
1439 | | { "1", "Static programming overrides only file server administered data" }, |
1440 | | { "2", "Static programming overrides only call server administered data" }, |
1441 | | { "3", "Static programming overrides both file server- and call server-administered data" }, |
1442 | | { NULL, NULL } |
1443 | | }; |
1444 | | |
1445 | | /* dhcp options administration */ |
1446 | 43.9k | #define DHCP_OPT_NUM 256 |
1447 | | |
1448 | | /* All of the options that have a "basic" type that can be handled by dissect_dhcpopt_basic_type() */ |
1449 | 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" |
1450 | | |
1451 | | /* Re-define structure. Values to be updated by dhcp_init_protocol */ |
1452 | | static struct opt_info dhcp_opt[DHCP_OPT_NUM]; |
1453 | | |
1454 | | static const struct opt_info default_dhcp_opt[DHCP_OPT_NUM] = { |
1455 | | /* 0 */ { "Padding", none, &hf_dhcp_option_padding }, |
1456 | | /* 1 */ { "Subnet Mask", ipv4, &hf_dhcp_option_subnet_mask }, |
1457 | | /* 2 */ { "Time Offset", time_in_s_secs, &hf_dhcp_option_time_offset }, |
1458 | | /* 3 */ { "Router", ipv4_list, &hf_dhcp_option_router }, |
1459 | | /* 4 */ { "Time Server", ipv4_list, &hf_dhcp_option_time_server }, |
1460 | | /* 5 */ { "Name Server", ipv4_list, &hf_dhcp_option_name_server }, |
1461 | | /* 6 */ { "Domain Name Server", ipv4_list, &hf_dhcp_option_domain_name_server }, |
1462 | | /* 7 */ { "Log Server", ipv4_list, &hf_dhcp_option_log_server }, |
1463 | | /* 8 */ { "Quotes Server", ipv4_list, &hf_dhcp_option_quotes_server }, |
1464 | | /* 9 */ { "LPR Server", ipv4_list, &hf_dhcp_option_lpr_server }, |
1465 | | /* 10 */ { "Impress Server", ipv4_list, &hf_dhcp_option_impress_server }, |
1466 | | /* 11 */ { "Resource Location Server", ipv4_list, &hf_dhcp_option_resource_location_server }, |
1467 | | /* 12 */ { "Host Name", string, &hf_dhcp_option_hostname }, |
1468 | | /* 13 */ { "Boot File Size", val_u_short, &hf_dhcp_option_boot_file_size }, |
1469 | | /* 14 */ { "Merit Dump File", string, &hf_dhcp_option_merit_dump_file }, |
1470 | | /* 15 */ { "Domain Name", string, &hf_dhcp_option_domain_name }, |
1471 | | /* 16 */ { "Swap Server", ipv4, &hf_dhcp_option_swap_server }, |
1472 | | /* 17 */ { "Root Path", string, &hf_dhcp_option_root_path }, |
1473 | | /* 18 */ { "Extensions Path", string, &hf_dhcp_option_extension_path }, |
1474 | | /* 19 */ { "IP Forwarding", val_boolean, &hf_dhcp_option_ip_forwarding }, |
1475 | | /* 20 */ { "Non-Local Source Routing", val_boolean, &hf_dhcp_option_non_local_source_routing }, |
1476 | | /* 21 */ { "Policy Filter", special, NULL }, |
1477 | | /* 22 */ { "Maximum Datagram Reassembly Size", val_u_short, &hf_dhcp_option_max_datagram_reassembly_size }, |
1478 | | /* 23 */ { "Default IP Time-to-Live", val_u_byte, &hf_dhcp_option_default_ip_ttl }, |
1479 | | /* 24 */ { "Path MTU Aging Timeout", time_in_u_secs, &hf_dhcp_option_path_mtu_aging_timeout }, |
1480 | | /* 25 */ { "Path MTU Plateau Table", val_u_short_list, &hf_dhcp_option_path_mtu_plateau_table_item }, |
1481 | | /* 26 */ { "Interface MTU", val_u_short, &hf_dhcp_option_interface_mtu }, |
1482 | | /* 27 */ { "All Subnets are Local", val_boolean, &hf_dhcp_option_all_subnets_are_local }, |
1483 | | /* 28 */ { "Broadcast Address", ipv4, &hf_dhcp_option_broadcast_address }, |
1484 | | /* 29 */ { "Perform Mask Discovery", val_boolean, &hf_dhcp_option_perform_mask_discovery }, |
1485 | | /* 30 */ { "Mask Supplier", val_boolean, &hf_dhcp_option_mask_supplier }, |
1486 | | /* 31 */ { "Perform Router Discover", val_boolean, &hf_dhcp_option_perform_router_discover }, |
1487 | | /* 32 */ { "Router Solicitation Address", ipv4, &hf_dhcp_option_router_solicitation_address }, |
1488 | | /* 33 */ { "Static Route", special, NULL }, |
1489 | | /* 34 */ { "Trailer Encapsulation", val_boolean, &hf_dhcp_option_trailer_encapsulation }, |
1490 | | /* 35 */ { "ARP Cache Timeout", time_in_u_secs, &hf_dhcp_option_arp_cache_timeout }, |
1491 | | /* 36 */ { "Ethernet Encapsulation", val_boolean, &hf_dhcp_option_ethernet_encapsulation }, |
1492 | | /* 37 */ { "TCP Default TTL", val_u_byte, &hf_dhcp_option_tcp_default_ttl }, |
1493 | | /* 38 */ { "TCP Keepalive Interval", time_in_u_secs, &hf_dhcp_option_tcp_keepalive_interval }, |
1494 | | /* 39 */ { "TCP Keepalive Garbage", val_boolean, &hf_dhcp_option_tcp_keepalive_garbage }, |
1495 | | /* 40 */ { "Network Information Service Domain", string, &hf_dhcp_option_nis_domain }, |
1496 | | /* 41 */ { "Network Information Service Servers", ipv4_list, &hf_dhcp_option_nis_server }, |
1497 | | /* 42 */ { "Network Time Protocol Servers", ipv4_list, &hf_dhcp_option_ntp_server }, |
1498 | | /* 43 */ { "Vendor-Specific Information", special, NULL }, |
1499 | | /* 44 */ { "NetBIOS over TCP/IP Name Server", ipv4_list, &hf_dhcp_option_netbios_over_tcpip_name_server }, |
1500 | | /* 45 */ { "NetBIOS over TCP/IP Datagram Distribution Name Server", ipv4_list, &hf_dhcp_option_netbios_over_tcpip_dd_name_server }, |
1501 | | /* 46 */ { "NetBIOS over TCP/IP Node Type", val_u_byte, &hf_dhcp_option_netbios_over_tcpip_node_type }, |
1502 | | /* 47 */ { "NetBIOS over TCP/IP Scope", string, &hf_dhcp_option_netbios_over_tcpip_scope }, |
1503 | | /* 48 */ { "X Window System Font Server", ipv4_list, &hf_dhcp_option_xwindows_system_font_server }, |
1504 | | /* 49 */ { "X Window System Display Manager", ipv4_list, &hf_dhcp_option_xwindows_system_display_manager }, |
1505 | | /* 50 */ { "Requested IP Address", ipv4, &hf_dhcp_option_requested_ip_address }, |
1506 | | /* 51 */ { "IP Address Lease Time", time_in_u_secs, &hf_dhcp_option_ip_address_lease_time }, |
1507 | | /* 52 */ { "Option Overload", special, &hf_dhcp_option_option_overload }, |
1508 | | /* 53 */ { "DHCP Message Type", val_u_byte, &hf_dhcp_option_dhcp }, |
1509 | | /* 54 */ { "DHCP Server Identifier", ipv4, &hf_dhcp_option_dhcp_server_id }, |
1510 | | /* 55 */ { "Parameter Request List", special, &hf_dhcp_option_parameter_request_list_item }, |
1511 | | /* 56 */ { "Message", string, &hf_dhcp_option_message }, |
1512 | | /* 57 */ { "Maximum DHCP Message Size", val_u_short, &hf_dhcp_option_dhcp_max_message_size }, |
1513 | | /* 58 */ { "Renewal Time Value", time_in_u_secs, &hf_dhcp_option_renewal_time_value }, |
1514 | | /* 59 */ { "Rebinding Time Value", time_in_u_secs, &hf_dhcp_option_rebinding_time_value }, |
1515 | | /* 60 */ { "Vendor class identifier", special, NULL }, |
1516 | | /* 61 */ { "Client identifier", special, NULL }, |
1517 | | /* 62 */ { "Novell/Netware IP domain", string, &hf_dhcp_option_novell_netware_ip_domain }, |
1518 | | /* 63 */ { "Novell Options", special, NULL }, |
1519 | | /* 64 */ { "Network Information Service+ Domain", string, &hf_dhcp_option_nis_plus_domain }, |
1520 | | /* 65 */ { "Network Information Service+ Servers", ipv4_list, &hf_dhcp_option_nis_plus_server }, |
1521 | | /* 66 */ { "TFTP Server Name", string, &hf_dhcp_option_tftp_server_name }, |
1522 | | /* 67 */ { "Bootfile name", string, &hf_dhcp_option_bootfile_name }, |
1523 | | /* 68 */ { "Mobile IP Home Agent", ipv4_list, &hf_dhcp_option_mobile_ip_home_agent }, |
1524 | | /* 69 */ { "SMTP Server", ipv4_list, &hf_dhcp_option_smtp_server }, |
1525 | | /* 70 */ { "POP3 Server", ipv4_list, &hf_dhcp_option_pop3_server }, |
1526 | | /* 71 */ { "NNTP Server", ipv4_list, &hf_dhcp_option_nntp_server }, |
1527 | | /* 72 */ { "Default WWW Server", ipv4_list, &hf_dhcp_option_default_www_server }, |
1528 | | /* 73 */ { "Default Finger Server", ipv4_list, &hf_dhcp_option_default_finger_server }, |
1529 | | /* 74 */ { "Default IRC Server", ipv4_list, &hf_dhcp_option_default_irc_server }, |
1530 | | /* 75 */ { "StreetTalk Server", ipv4_list, &hf_dhcp_option_streettalk_server }, |
1531 | | /* 76 */ { "StreetTalk Directory Assistance Server", ipv4_list, &hf_dhcp_option_streettalk_da_server }, |
1532 | | /* 77 */ { "User Class Information", special, NULL }, |
1533 | | /* 78 */ { "Directory Agent Information", special, NULL }, |
1534 | | /* 79 */ { "Service Location Agent Scope", special, NULL }, |
1535 | | /* 80 */ { "Rapid commit", opaque, NULL }, |
1536 | | /* 81 */ { "Client Fully Qualified Domain Name", special, NULL}, |
1537 | | /* 82 */ { "Agent Information Option", special, NULL}, |
1538 | | /* 83 */ { "iSNS", opaque, NULL }, |
1539 | | /* 84 */ { "Removed/Unassigned", opaque, NULL }, |
1540 | | /* 85 */ { "Novell Directory Services Servers", special, NULL}, |
1541 | | /* 86 */ { "Novell Directory Services Tree Name", string, &hf_dhcp_option_novell_ds_tree_name }, |
1542 | | /* 87 */ { "Novell Directory Services Context", string, &hf_dhcp_option_novell_ds_context }, |
1543 | | /* 88 */ { "BCMCS Controller Domain Name [TODO:RFC4280]", opaque, NULL }, |
1544 | | /* 89 */ { "BCMCS Controller IPv4 address [TODO:RFC4280]", opaque, NULL }, |
1545 | | /* 90 */ { "Authentication", special, NULL}, |
1546 | | /* 91 */ { "Client last transaction time", time_in_u_secs, &hf_dhcp_option_client_last_transaction_time }, |
1547 | | /* 92 */ { "Associated IP option", ipv4_list, &hf_dhcp_option_associated_ip_option }, |
1548 | | /* 93 */ { "Client System Architecture", special, NULL}, |
1549 | | /* 94 */ { "Client Network Device Interface", special, NULL}, |
1550 | | /* 95 */ { "LDAP [TODO:RFC3679]", opaque, NULL }, |
1551 | | /* 96 */ { "Removed/Unassigned", opaque, NULL }, |
1552 | | /* 97 */ { "UUID/GUID-based Client Identifier", special, NULL}, |
1553 | | /* 98 */ { "Open Group's User Authentication [TODO:RFC2485]", opaque, NULL }, |
1554 | | /* 99 */ { "Civic Addresses Configuration", special, NULL}, |
1555 | | /* 100 */ { "PCode", string, &hf_dhcp_option_tz_pcode }, |
1556 | | /* 101 */ { "TCode", string, &hf_dhcp_option_tz_tcode }, |
1557 | | /* 102 */ { "Removed/unassigned", opaque, NULL }, |
1558 | | /* 103 */ { "Removed/unassigned", opaque, NULL }, |
1559 | | /* 104 */ { "Removed/unassigned", opaque, NULL }, |
1560 | | /* 105 */ { "Removed/unassigned", opaque, NULL }, |
1561 | | /* 106 */ { "Removed/unassigned", opaque, NULL }, |
1562 | | /* 107 */ { "Removed/unassigned", opaque, NULL }, |
1563 | | /* 108 */ { "IPv6-Only Preferred", time_in_u_secs, &hf_dhcp_option_ipv6_only_preferred_wait_time }, |
1564 | | /* 109 */ { "Unassigned", opaque, NULL }, |
1565 | | /* 110 */ { "Removed/Unassigned", opaque, NULL }, |
1566 | | /* 111 */ { "Unassigned", opaque, NULL }, |
1567 | | /* 112 */ { "NetInfo Parent Server Address", ipv4_list, &hf_dhcp_option_netinfo_parent_server_address }, |
1568 | | /* 113 */ { "NetInfo Parent Server Tag", string, &hf_dhcp_option_netinfo_parent_server_tag }, |
1569 | | /* 114 */ { "DHCP Captive-Portal", special, NULL }, |
1570 | | /* 115 */ { "Removed/Unassigned", opaque, NULL }, |
1571 | | /* 116 */ { "DHCP Auto-Configuration", val_u_byte, &hf_dhcp_option_dhcp_auto_configuration }, |
1572 | | /* 117 */ { "Name Service Search", special, NULL }, |
1573 | | /* 118 */ { "Subnet Selection Option", ipv4_list, &hf_dhcp_option_subnet_selection_option }, |
1574 | | /* 119 */ { "Domain Search", special, NULL }, |
1575 | | /* 120 */ { "SIP Servers", special, NULL }, |
1576 | | /* 121 */ { "Classless Static Route", special, NULL}, |
1577 | | /* 122 */ { "CableLabs Client Configuration [TODO:RFC3495]", opaque, NULL }, |
1578 | | /* 123 */ { "Coordinate-based Location Configuration", special, NULL}, |
1579 | | /* 124 */ { "V-I Vendor Class", special, NULL}, |
1580 | | /* 125 */ { "V-I Vendor-specific Information", special, NULL}, |
1581 | | /* 126 */ { "Removed/Unassigned", opaque, NULL }, |
1582 | | /* 127 */ { "Removed/Unassigned", opaque, NULL }, |
1583 | | /* 128 */ { "DOCSIS full security server IP [TODO]", opaque, NULL }, |
1584 | | /* 129 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1585 | | /* 130 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1586 | | /* 131 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1587 | | /* 132 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1588 | | /* 133 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1589 | | /* 134 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1590 | | /* 135 */ { "PXE - undefined (vendor specific)", opaque, NULL }, |
1591 | | /* 136 */ { "PANA Authentication Agent", ipv4_list, &hf_dhcp_option_pana_agent }, |
1592 | | /* 137 */ { "LoST Server Domain Name", string, &hf_dhcp_option_lost_server_domain_name }, |
1593 | | /* 138 */ { "CAPWAP Access Controllers", ipv4_list, &hf_dhcp_option_capwap_access_controller }, |
1594 | | /* 139 */ { "IPv4 Address-MoS", opaque, NULL }, |
1595 | | /* 140 */ { "IPv4 FQDN-MoS", opaque, NULL }, |
1596 | | /* 141 */ { "SIP UA Configuration Domains", opaque, NULL }, |
1597 | | /* 142 */ { "IPv4 Address ANDSF", ipv4_list, &hf_dhcp_option_andsf_server }, |
1598 | | /* 143 */ { "Zerotouch Redirect [TODO: draft-ietf-netconf-zerotouch]", opaque, NULL }, |
1599 | | /* 144 */ { "Geospatial Location [TODO:RFC6225]", opaque, NULL }, |
1600 | | /* 145 */ { "Forcerenew Nonce Capable", special, NULL }, |
1601 | | /* 146 */ { "RDNSS Selection", special, NULL }, |
1602 | | /* 147 */ { "DOTS Reference Identifier", string, &hf_dhcp_option_dots_ri }, |
1603 | | /* 148 */ { "DOTS Address", ipv4_list, &hf_dhcp_option_dots_address }, |
1604 | | /* 149 */ { "Unassigned", opaque, NULL }, |
1605 | | /* 150 */ { "TFTP Server Address", ipv4_list, &hf_dhcp_option_tftp_server_address }, |
1606 | | /* 151 */ { "Leasequery Status code", special, NULL }, |
1607 | | /* 152 */ { "Leasequery Base Time", special, NULL }, |
1608 | | /* 153 */ { "Leasequery Start Time of State", time_in_u_secs, &hf_dhcp_option_bulk_lease_start_time_of_state }, |
1609 | | /* 154 */ { "Leasequery Query Start Time", special, NULL }, |
1610 | | /* 155 */ { "Leasequery Query End Time", special, NULL }, |
1611 | | /* 156 */ { "Leasequery Dhcp State", val_u_byte, &hf_dhcp_option_bulk_lease_dhcp_state }, |
1612 | | /* 157 */ { "Leasequery Data Source", val_boolean, &hf_dhcp_option_bulk_lease_data_source }, |
1613 | | /* 158 */ { "PCP Server", special, NULL }, |
1614 | | /* 159 */ { "Portparams", special, NULL }, |
1615 | | /* 160 */ { "Unassigned (ex DHCP Captive-Portal)", special, NULL }, /* Previously assigned by [RFC7710]; known to also be used by Polycom. */ |
1616 | | /* 161 */ { "Manufacturer Usage Description", string, &hf_dhcp_option_mudurl}, |
1617 | | /* 162 */ { "Discovery of Network DNS Resolvers", special, NULL }, |
1618 | | /* 163 */ { "Unassigned", opaque, NULL }, |
1619 | | /* 164 */ { "Unassigned", opaque, NULL }, |
1620 | | /* 165 */ { "Unassigned", opaque, NULL }, |
1621 | | /* 166 */ { "Unassigned", opaque, NULL }, |
1622 | | /* 167 */ { "Unassigned", opaque, NULL }, |
1623 | | /* 168 */ { "Unassigned", opaque, NULL }, |
1624 | | /* 169 */ { "Unassigned", opaque, NULL }, |
1625 | | /* 170 */ { "Unassigned", opaque, NULL }, |
1626 | | /* 171 */ { "Unassigned", opaque, NULL }, |
1627 | | /* 172 */ { "Unassigned", opaque, NULL }, |
1628 | | /* 173 */ { "Unassigned", opaque, NULL }, |
1629 | | /* 174 */ { "Unassigned", opaque, NULL }, |
1630 | | /* 175 */ { "Etherboot", opaque, NULL }, |
1631 | | /* 176 */ { "IP Telephone", opaque, NULL }, |
1632 | | /* 177 */ { "Etherboot", opaque, NULL }, |
1633 | | /* 178 */ { "Unassigned", opaque, NULL }, |
1634 | | /* 179 */ { "Unassigned", opaque, NULL }, |
1635 | | /* 180 */ { "Unassigned", opaque, NULL }, |
1636 | | /* 181 */ { "Unassigned", opaque, NULL }, |
1637 | | /* 182 */ { "Unassigned", opaque, NULL }, |
1638 | | /* 183 */ { "Unassigned", opaque, NULL }, |
1639 | | /* 184 */ { "Unassigned", opaque, NULL }, |
1640 | | /* 185 */ { "Unassigned", opaque, NULL }, |
1641 | | /* 186 */ { "Unassigned", opaque, NULL }, |
1642 | | /* 187 */ { "Unassigned", opaque, NULL }, |
1643 | | /* 188 */ { "Unassigned", opaque, NULL }, |
1644 | | /* 189 */ { "Unassigned", opaque, NULL }, |
1645 | | /* 190 */ { "Unassigned", opaque, NULL }, |
1646 | | /* 191 */ { "Unassigned", opaque, NULL }, |
1647 | | /* 192 */ { "Unassigned", opaque, NULL }, |
1648 | | /* 193 */ { "Unassigned", opaque, NULL }, |
1649 | | /* 194 */ { "Unassigned", opaque, NULL }, |
1650 | | /* 195 */ { "Unassigned", opaque, NULL }, |
1651 | | /* 196 */ { "Unassigned", opaque, NULL }, |
1652 | | /* 197 */ { "Unassigned", opaque, NULL }, |
1653 | | /* 198 */ { "Unassigned", opaque, NULL }, |
1654 | | /* 199 */ { "Unassigned", opaque, NULL }, |
1655 | | /* 200 */ { "Unassigned", opaque, NULL }, |
1656 | | /* 201 */ { "Unassigned", opaque, NULL }, |
1657 | | /* 202 */ { "Unassigned", opaque, NULL }, |
1658 | | /* 203 */ { "Unassigned", opaque, NULL }, |
1659 | | /* 204 */ { "Unassigned", opaque, NULL }, |
1660 | | /* 205 */ { "Unassigned", opaque, NULL }, |
1661 | | /* 206 */ { "Unassigned", opaque, NULL }, |
1662 | | /* 207 */ { "Unassigned", opaque, NULL }, |
1663 | | /* 208 */ { "PXELINUX Magic", opaque, NULL }, |
1664 | | /* 209 */ { "PXE Configuration file", string, &hf_dhcp_option_pxe_config_file }, |
1665 | | /* 210 */ { "PXE Path Prefix", string, &hf_dhcp_option_pxe_path_prefix }, |
1666 | | /* 211 */ { "Reboot Time", time_in_u_secs, &hf_dhcp_option_pxe_reboot_time }, |
1667 | | /* 212 */ { "6RD", opaque, NULL }, |
1668 | | /* 213 */ { "V4 Access Domain", opaque, NULL }, |
1669 | | /* 214 */ { "Unassigned", opaque, NULL }, |
1670 | | /* 215 */ { "Unassigned", opaque, NULL }, |
1671 | | /* 216 */ { "Unassigned", opaque, NULL }, |
1672 | | /* 217 */ { "Unassigned", opaque, NULL }, |
1673 | | /* 218 */ { "Unassigned", opaque, NULL }, |
1674 | | /* 219 */ { "Unassigned", opaque, NULL }, |
1675 | | /* 220 */ { "Subnet Allocation", opaque, NULL }, |
1676 | | /* 221 */ { "Virtual Subnet Selection", opaque, NULL }, |
1677 | | /* 222 */ { "Unassigned", opaque, NULL }, |
1678 | | /* 223 */ { "Unassigned", opaque, NULL }, |
1679 | | /* 224 */ { "Private", opaque, NULL }, |
1680 | | /* 225 */ { "Private", opaque, NULL }, |
1681 | | /* 226 */ { "Private", opaque, NULL }, |
1682 | | /* 227 */ { "Private", opaque, NULL }, |
1683 | | /* 228 */ { "Private", opaque, NULL }, |
1684 | | /* 229 */ { "Private", opaque, NULL }, |
1685 | | /* 230 */ { "Private", opaque, NULL }, |
1686 | | /* 231 */ { "Private", opaque, NULL }, |
1687 | | /* 232 */ { "Private", opaque, NULL }, |
1688 | | /* 233 */ { "Private", opaque, NULL }, |
1689 | | /* 234 */ { "Private", opaque, NULL }, |
1690 | | /* 235 */ { "Private", opaque, NULL }, |
1691 | | /* 236 */ { "Private", opaque, NULL }, |
1692 | | /* 237 */ { "Private", opaque, NULL }, |
1693 | | /* 238 */ { "Private", opaque, NULL }, |
1694 | | /* 239 */ { "Private", opaque, NULL }, |
1695 | | /* 240 */ { "Private", opaque, NULL }, |
1696 | | /* 241 */ { "Private", opaque, NULL }, |
1697 | | /* 242 */ { "Private/Avaya IP Telephone", special, NULL }, |
1698 | | /* 243 */ { "Private", opaque, NULL }, |
1699 | | /* 244 */ { "Private", opaque, NULL }, |
1700 | | /* 245 */ { "Private", opaque, NULL }, |
1701 | | /* 246 */ { "Private", opaque, NULL }, |
1702 | | /* 247 */ { "Private", opaque, NULL }, |
1703 | | /* 248 */ { "Private", opaque, NULL }, |
1704 | | /* 249 */ { "Private/Classless Static Route (Microsoft)", special, NULL}, |
1705 | | /* 250 */ { "Private", opaque, NULL }, |
1706 | | /* 251 */ { "Private", opaque, NULL }, |
1707 | | /* 252 */ { "Private/Proxy autodiscovery", string, &hf_dhcp_option_private_proxy_autodiscovery }, |
1708 | | /* 253 */ { "Private", opaque, NULL }, |
1709 | | /* 254 */ { "Private", opaque, NULL }, |
1710 | | /* 255 */ { "End", opaque, NULL } |
1711 | | }; |
1712 | | |
1713 | | static void |
1714 | | dhcp_time_in_s_secs_fmt(char *s, uint32_t v) |
1715 | 0 | { |
1716 | | /* Only used by option 2 Time Offset, which is deprecated. */ |
1717 | 0 | char* secs_str = signed_time_secs_to_str(NULL, (int32_t)v); |
1718 | 0 | snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", secs_str, (int32_t)v); |
1719 | 0 | wmem_free(NULL, secs_str); |
1720 | 0 | } |
1721 | | |
1722 | | static void |
1723 | | dhcp_time_in_u_secs_fmt(char *s, uint32_t v) |
1724 | 0 | { |
1725 | | /* RFC 2131: 3.3 Interpretation and representation of time values */ |
1726 | 0 | if (v != 0xffffffff) { |
1727 | 0 | char* secs_str = unsigned_time_secs_to_str(NULL, v); |
1728 | 0 | snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", secs_str, v); |
1729 | 0 | wmem_free(NULL, secs_str); |
1730 | 0 | } else { |
1731 | 0 | snprintf(s, ITEM_LABEL_LENGTH, "infinity (%d)", v); |
1732 | 0 | } |
1733 | 0 | } |
1734 | | |
1735 | | /*------------------------------------- |
1736 | | * UAT for BOOTP |
1737 | | *------------------------------------- |
1738 | | */ |
1739 | | /* UAT entry structure. */ |
1740 | | typedef struct { |
1741 | | unsigned opt; |
1742 | | char *text; |
1743 | | enum field_type ftype; |
1744 | | |
1745 | | } uat_dhcp_record_t; |
1746 | | |
1747 | | static uat_dhcp_record_t *uat_dhcp_records; |
1748 | | static uat_t *dhcp_uat; |
1749 | | static unsigned num_dhcp_records_uat; |
1750 | | static wmem_list_t *saved_uat_opts; /* List of previous options from UAT to "free" from dissection */ |
1751 | | |
1752 | 0 | static void* uat_dhcp_record_copy_cb(void* n, const void* o, size_t siz _U_) { |
1753 | 0 | uat_dhcp_record_t* new_record = (uat_dhcp_record_t *)n; |
1754 | 0 | const uat_dhcp_record_t* old_record = (const uat_dhcp_record_t *)o; |
1755 | |
|
1756 | 0 | new_record->text = g_strdup(old_record->text); |
1757 | |
|
1758 | 0 | return new_record; |
1759 | 0 | } |
1760 | | |
1761 | 0 | static bool uat_dhcp_record_update_cb(void* r, char** err) { |
1762 | 0 | uat_dhcp_record_t* rec = (uat_dhcp_record_t *)r; |
1763 | |
|
1764 | 0 | if ((rec->opt == 0) || (rec->opt >=DHCP_OPT_NUM-1)) { |
1765 | 0 | *err = ws_strdup_printf("Option must be between 1 and %d", DHCP_OPT_NUM-2); |
1766 | 0 | return false; |
1767 | 0 | } |
1768 | 0 | return true; |
1769 | 0 | } |
1770 | | |
1771 | 0 | static void uat_dhcp_record_free_cb(void*r) { |
1772 | 0 | uat_dhcp_record_t* rec = (uat_dhcp_record_t *)r; |
1773 | |
|
1774 | 0 | g_free(rec->text); |
1775 | 0 | } |
1776 | | |
1777 | 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 |
1778 | | UAT_CSTRING_CB_DEF(uat_dhcp_records, text, uat_dhcp_record_t) |
1779 | | UAT_VS_DEF(uat_dhcp_records, ftype, uat_dhcp_record_t, enum field_type, special, "string") |
1780 | | |
1781 | | |
1782 | | static const struct opt_info* dhcp_get_opt(unsigned int idx) |
1783 | 43.2k | { |
1784 | 43.2k | if(idx>=DHCP_OPT_NUM) |
1785 | 0 | return NULL; |
1786 | | |
1787 | 43.2k | return &dhcp_opt[idx]; |
1788 | 43.2k | } |
1789 | | |
1790 | | static const char * |
1791 | | dhcp_get_opt_text(unsigned int idx) |
1792 | 707 | { |
1793 | 707 | if(idx>=DHCP_OPT_NUM) |
1794 | 0 | return "unknown"; |
1795 | 707 | return dhcp_opt[idx].text; |
1796 | 707 | } |
1797 | | |
1798 | | struct basic_types_hfs { |
1799 | | int* bytes; |
1800 | | int* ipv4; |
1801 | | int* ipv4_list; |
1802 | | int* string; |
1803 | | int* val_boolean; |
1804 | | int* val_u_byte; |
1805 | | int* val_u_short; |
1806 | | int* val_u_short_list; |
1807 | | int* val_u_long; |
1808 | | int* time_in_s_secs; |
1809 | | int* time_in_u_secs; |
1810 | | }; |
1811 | | |
1812 | | /* Handle "basic" datatypes adding to a tree */ |
1813 | | static int |
1814 | | dhcp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb, |
1815 | | enum field_type ftype, int offset, int total_len, |
1816 | | int *hf, const struct basic_types_hfs* hf_default) |
1817 | 21.6k | { |
1818 | 21.6k | int i, left; |
1819 | 21.6k | int consumed = 0; |
1820 | | |
1821 | 21.6k | switch (ftype) { |
1822 | 2.86k | case bytes: |
1823 | 2.86k | if (hf != NULL) |
1824 | 2.86k | proto_tree_add_item(tree, *hf, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1825 | 0 | else if (hf_default->bytes != NULL) |
1826 | 0 | proto_tree_add_item(tree, *hf_default->bytes, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1827 | 2.86k | consumed = total_len; |
1828 | 2.86k | break; |
1829 | | |
1830 | 1.95k | case ipv4: |
1831 | 1.95k | if (total_len != 4) { |
1832 | 1.78k | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1833 | 1.78k | break; |
1834 | 1.78k | } |
1835 | | |
1836 | 178 | if (hf != NULL) |
1837 | 178 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1838 | 0 | else if (hf_default->ipv4 != NULL) |
1839 | 0 | proto_tree_add_item(tree, *hf_default->ipv4, tvb, offset, 4, ENC_BIG_ENDIAN); |
1840 | | |
1841 | | /* Show IP address in root of option */ |
1842 | 178 | proto_item_append_text(tree, " (%s)", tvb_ip_to_str(pinfo->pool, tvb, offset)); |
1843 | 178 | consumed = 4; |
1844 | 178 | break; |
1845 | | |
1846 | 3.60k | case ipv4_list: |
1847 | 12.9k | for (i = offset, left = total_len; left > 0; i += 4, left -= 4) { |
1848 | 10.9k | if (left < 4) { |
1849 | 1.57k | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
1850 | 1.57k | break; |
1851 | 1.57k | } |
1852 | | |
1853 | 9.34k | if (hf != NULL) |
1854 | 9.34k | proto_tree_add_item(tree, *hf, tvb, i, 4, ENC_BIG_ENDIAN); |
1855 | 0 | else if (hf_default->ipv4_list != NULL) |
1856 | 0 | proto_tree_add_item(tree, *hf_default->ipv4_list, tvb, i, 4, ENC_BIG_ENDIAN); |
1857 | 9.34k | consumed += 4; |
1858 | 9.34k | } |
1859 | | |
1860 | 3.60k | break; |
1861 | | |
1862 | 2.98k | case string: |
1863 | 2.98k | if (hf != NULL) |
1864 | 2.98k | proto_tree_add_item(tree, *hf, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1865 | 0 | else if (hf_default->string != NULL) |
1866 | 0 | proto_tree_add_item(tree, *hf_default->string, tvb, offset, total_len, ENC_BIG_ENDIAN); |
1867 | 2.98k | consumed = total_len; |
1868 | 2.98k | break; |
1869 | | |
1870 | 928 | case val_boolean: |
1871 | 928 | if (total_len != 1) { |
1872 | 776 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 1"); |
1873 | 776 | break; |
1874 | 776 | } |
1875 | | |
1876 | 152 | if (hf != NULL) |
1877 | 152 | proto_tree_add_item(tree, *hf, tvb, offset, 1, ENC_BIG_ENDIAN); |
1878 | 0 | else if (hf_default->val_boolean != NULL) |
1879 | 0 | proto_tree_add_item(tree, *hf_default->val_boolean, tvb, offset, 1, ENC_BIG_ENDIAN); |
1880 | 152 | consumed = 1; |
1881 | 152 | break; |
1882 | | |
1883 | 823 | case val_u_byte: |
1884 | 823 | if (total_len != 1) { |
1885 | 650 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 1"); |
1886 | 650 | break; |
1887 | 650 | } |
1888 | | |
1889 | 173 | if (hf != NULL) |
1890 | 173 | proto_tree_add_item(tree, *hf, tvb, offset, 1, ENC_BIG_ENDIAN); |
1891 | 0 | else if (hf_default->val_u_byte != NULL) |
1892 | 0 | proto_tree_add_item(tree, *hf_default->val_u_byte, tvb, offset, 1, ENC_BIG_ENDIAN); |
1893 | 173 | consumed = 1; |
1894 | 173 | break; |
1895 | | |
1896 | 243 | case val_u_short: |
1897 | 243 | if (total_len != 2) { |
1898 | 219 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 2"); |
1899 | 219 | break; |
1900 | 219 | } |
1901 | | |
1902 | 24 | if (hf != NULL) |
1903 | 24 | proto_tree_add_item(tree, *hf, tvb, offset, 2, ENC_BIG_ENDIAN); |
1904 | 0 | else if (hf_default->val_u_short != NULL) |
1905 | 0 | proto_tree_add_item(tree, *hf_default->val_u_short, tvb, offset, 2, ENC_BIG_ENDIAN); |
1906 | 24 | consumed = 2; |
1907 | 24 | break; |
1908 | | |
1909 | 638 | case val_u_le_short: |
1910 | 638 | if (total_len != 2) { |
1911 | 368 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 2"); |
1912 | 368 | break; |
1913 | 368 | } |
1914 | | |
1915 | 270 | if (hf != NULL) |
1916 | 270 | proto_tree_add_item(tree, *hf, tvb, offset, 2, ENC_LITTLE_ENDIAN); |
1917 | 0 | else if (hf_default->val_u_short != NULL) |
1918 | 0 | proto_tree_add_item(tree, *hf_default->val_u_short, tvb, offset, 2, ENC_LITTLE_ENDIAN); |
1919 | 270 | consumed = 2; |
1920 | 270 | break; |
1921 | | |
1922 | 69 | case val_u_short_list: |
1923 | 1.20k | for (i = offset, left = total_len; left > 0; i += 2, left -= 2) { |
1924 | 1.15k | if (left < 2) { |
1925 | 15 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "Option length isn't a multiple of 2"); |
1926 | 15 | break; |
1927 | 15 | } |
1928 | | |
1929 | 1.13k | if (hf != NULL) |
1930 | 1.13k | proto_tree_add_item(tree, *hf, tvb, i, 2, ENC_BIG_ENDIAN); |
1931 | 0 | else if (hf_default->val_u_short_list != NULL) |
1932 | 0 | proto_tree_add_item(tree, *hf_default->val_u_short_list, tvb, i, 2, ENC_BIG_ENDIAN); |
1933 | 1.13k | consumed += 2; |
1934 | 1.13k | } |
1935 | 69 | break; |
1936 | | |
1937 | 438 | case val_u_long: |
1938 | 438 | if (total_len != 4) { |
1939 | 341 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1940 | 341 | break; |
1941 | 341 | } |
1942 | | |
1943 | 97 | if (hf != NULL) |
1944 | 97 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1945 | 0 | else if (hf_default->val_u_long != NULL) |
1946 | 0 | proto_tree_add_item(tree, *hf_default->val_u_long, tvb, offset, 4, ENC_BIG_ENDIAN); |
1947 | 97 | consumed = 4; |
1948 | 97 | break; |
1949 | | |
1950 | 281 | case time_in_s_secs: |
1951 | 281 | if (total_len != 4) { |
1952 | 267 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1953 | 267 | break; |
1954 | 267 | } |
1955 | | |
1956 | 14 | if (hf != NULL) { |
1957 | 14 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1958 | 14 | } |
1959 | 0 | else if (hf_default->time_in_s_secs != NULL) |
1960 | 0 | proto_tree_add_item(tree, *hf_default->time_in_s_secs, tvb, offset, 4, ENC_BIG_ENDIAN); |
1961 | | |
1962 | 14 | consumed = 4; |
1963 | 14 | break; |
1964 | | |
1965 | 369 | case time_in_u_secs: |
1966 | 369 | if (total_len != 4) { |
1967 | 344 | expert_add_info_format(pinfo, item, &ei_dhcp_bad_length, "length isn't 4"); |
1968 | 344 | break; |
1969 | 344 | } |
1970 | | |
1971 | 25 | if (hf != NULL) { |
1972 | 25 | proto_tree_add_item(tree, *hf, tvb, offset, 4, ENC_BIG_ENDIAN); |
1973 | 25 | } |
1974 | 0 | else if (hf_default->time_in_u_secs != NULL) |
1975 | 0 | proto_tree_add_item(tree, *hf_default->time_in_u_secs, tvb, offset, 4, ENC_BIG_ENDIAN); |
1976 | 25 | consumed = 4; |
1977 | 25 | break; |
1978 | 6.39k | default: |
1979 | | /* Ignore other field_types */ |
1980 | 6.39k | break; |
1981 | 21.6k | } |
1982 | | |
1983 | 21.5k | return consumed; |
1984 | 21.6k | } |
1985 | | |
1986 | | static int |
1987 | | dissect_dhcpopt_basic_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
1988 | 6.28k | { |
1989 | 6.28k | const struct opt_info *opt; |
1990 | 6.28k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
1991 | 6.28k | static const struct basic_types_hfs default_hfs = { |
1992 | 6.28k | &hf_dhcp_option_value, |
1993 | 6.28k | &hf_dhcp_option_value_ip_address, |
1994 | 6.28k | &hf_dhcp_option_value_ip_address, |
1995 | 6.28k | &hf_dhcp_option_value_stringz, |
1996 | 6.28k | &hf_dhcp_option_value_boolean, |
1997 | 6.28k | &hf_dhcp_option_value_8, |
1998 | 6.28k | &hf_dhcp_option_value_16, |
1999 | 6.28k | &hf_dhcp_option_value_16, |
2000 | 6.28k | &hf_dhcp_option_value_u32, |
2001 | 6.28k | &hf_dhcp_option_value_s_secs, |
2002 | 6.28k | &hf_dhcp_option_value_u_secs, |
2003 | 6.28k | }; |
2004 | | |
2005 | 6.28k | opt = dhcp_get_opt(option_data->option); |
2006 | 6.28k | if (opt == NULL) |
2007 | 0 | return 0; |
2008 | | |
2009 | 6.28k | return dhcp_handle_basic_types(pinfo, tree, tree, tvb, opt->ftype, |
2010 | 6.28k | 0, tvb_reported_length(tvb), opt->phf, &default_hfs); |
2011 | 6.28k | } |
2012 | | |
2013 | | /* Returns the number of bytes consumed by this option. */ |
2014 | | static int |
2015 | | dhcp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, |
2016 | | int eoff, bool first_pass, bool *at_end, const char **dhcp_type_p, |
2017 | | const uint8_t **vendor_class_id_p, uint8_t *overload_p, |
2018 | | wmem_map_t *rfc3396_map) |
2019 | 91.3k | { |
2020 | 91.3k | const struct opt_info *opt; |
2021 | 91.3k | unsigned char code = tvb_get_uint8(tvb, voff); |
2022 | 91.3k | int optlen; |
2023 | 91.3k | int i, consumed; |
2024 | 91.3k | proto_tree *v_tree; |
2025 | 91.3k | proto_item *vti, *ti_value; |
2026 | 91.3k | tvbuff_t *option_tvb; |
2027 | 91.3k | dhcp_option_data_t option_data; |
2028 | | |
2029 | | /* Note overload_p is NULL inside the overloaded areas; it makes no |
2030 | | * sense to set it again. */ |
2031 | | /* Options whose length isn't "optlen + 2". */ |
2032 | 91.3k | switch (code) { |
2033 | | |
2034 | 13.2k | case 0: /* Padding */ |
2035 | | /* check how much padding we have */ |
2036 | 38.7k | for (i = voff + 1; i < eoff; i++ ) { |
2037 | 38.3k | if (tvb_get_uint8(tvb, i) != 0) { |
2038 | 12.9k | break; |
2039 | 12.9k | } |
2040 | 38.3k | } |
2041 | 13.2k | i = i - voff; |
2042 | 13.2k | if (!first_pass) { |
2043 | 6.35k | if (bp_tree != NULL) { |
2044 | 6.35k | vti = proto_tree_add_uint_format_value(bp_tree, hf_dhcp_option_type, |
2045 | 6.35k | tvb, voff, 1, 0, "(0) Padding"); |
2046 | 6.35k | v_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
2047 | 6.35k | proto_tree_add_item(v_tree, hf_dhcp_option_padding, tvb, voff, i, ENC_NA); |
2048 | 6.35k | } |
2049 | 6.35k | } |
2050 | 13.2k | consumed = i; |
2051 | 13.2k | return consumed; |
2052 | | |
2053 | 854 | case 255: /* End Option */ |
2054 | 854 | if (!first_pass) { |
2055 | 396 | if (bp_tree != NULL) { |
2056 | 396 | vti = proto_tree_add_uint_format_value(bp_tree, hf_dhcp_option_type, |
2057 | 396 | tvb, voff, 1, 0, "(255) End"); |
2058 | 396 | v_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
2059 | 396 | if (overload_p == NULL) |
2060 | 366 | proto_tree_add_item(v_tree, hf_dhcp_option_end_overload, tvb, voff, 1, ENC_BIG_ENDIAN); |
2061 | 30 | else |
2062 | 30 | proto_tree_add_item(v_tree, hf_dhcp_option_end, tvb, voff, 1, ENC_BIG_ENDIAN); |
2063 | 396 | } |
2064 | 396 | } |
2065 | 854 | *at_end = true; |
2066 | 854 | consumed = 1; |
2067 | 854 | return consumed; |
2068 | 91.3k | } |
2069 | | |
2070 | | /* |
2071 | | * Get the length of the option, and the number of bytes it |
2072 | | * consumes (the length doesn't include the option code or |
2073 | | * length bytes). |
2074 | | * |
2075 | | * On the first pass, check first whether we have the length |
2076 | | * byte, so that we don't throw an exception; if we throw an |
2077 | | * exception in the first pass, which is only checking for options |
2078 | | * whose values we need in order to properly dissect the packet |
2079 | | * on the second pass, we won't actually dissect the options, so |
2080 | | * you won't be able to see which option had the problem. |
2081 | | */ |
2082 | 77.1k | if (first_pass) { |
2083 | 40.1k | if (!tvb_bytes_exist(tvb, voff+1, 1)) { |
2084 | | /* |
2085 | | * We don't have the length byte; just return 1 |
2086 | | * as the number of bytes we consumed, to count |
2087 | | * the code byte. |
2088 | | */ |
2089 | 15 | return 1; |
2090 | 15 | } |
2091 | 40.1k | } |
2092 | 77.1k | optlen = tvb_get_uint8(tvb, voff+1); |
2093 | 77.1k | consumed = optlen + 2; |
2094 | | |
2095 | 77.1k | struct rfc3396_for_option_t *rfc3396_data = wmem_map_lookup(rfc3396_map, GUINT_TO_POINTER(code)); |
2096 | 77.1k | if (rfc3396_data == NULL) { |
2097 | 23.7k | rfc3396_data = wmem_new0(pinfo->pool, struct rfc3396_for_option_t); |
2098 | 23.7k | wmem_map_insert(rfc3396_map, GUINT_TO_POINTER(code), rfc3396_data); |
2099 | 23.7k | } |
2100 | | |
2101 | | /* |
2102 | | * In the first pass, we don't put anything into the protocol |
2103 | | * tree; we just check for some options we have to look at |
2104 | | * in order to properly process the packet: |
2105 | | * |
2106 | | * 52 (Overload) - we need this to properly dissect the |
2107 | | * file and sname fields |
2108 | | * |
2109 | | * 53 (DHCP message type) - if this is present, this is DHCP |
2110 | | * |
2111 | | * 60 (Vendor class identifier) - we need this in order to |
2112 | | * interpret the vendor-specific info |
2113 | | * |
2114 | | * We also check, before fetching anything, to make sure we |
2115 | | * have the entire item we're fetching, so that we don't throw |
2116 | | * an exception. |
2117 | | */ |
2118 | 77.1k | if (first_pass) { |
2119 | 40.1k | if (tvb_bytes_exist(tvb, voff+2, consumed-2)) { |
2120 | 39.7k | switch (code) { |
2121 | | |
2122 | 5.45k | case 52: |
2123 | 5.45k | if (overload_p != NULL) { |
2124 | 4.88k | *overload_p = tvb_get_uint8(tvb, voff+2); |
2125 | 4.88k | } |
2126 | 5.45k | break; |
2127 | | |
2128 | 322 | case 53: |
2129 | 322 | *dhcp_type_p = |
2130 | 322 | val_to_str(pinfo->pool, tvb_get_uint8(tvb, voff+2), |
2131 | 322 | opt53_text, |
2132 | 322 | "Unknown Message Type (0x%02x)"); |
2133 | 322 | break; |
2134 | | |
2135 | 3.43k | case 60: |
2136 | 3.43k | *vendor_class_id_p = |
2137 | 3.43k | tvb_get_string_enc(pinfo->pool, |
2138 | 3.43k | tvb, voff+2, consumed-2, ENC_ASCII); |
2139 | 3.43k | break; |
2140 | 39.7k | } |
2141 | 39.7k | } |
2142 | | |
2143 | 40.1k | rfc3396_data->total_number_of_block++; |
2144 | | |
2145 | | /* |
2146 | | * We don't do anything else here. |
2147 | | */ |
2148 | 40.1k | return consumed; |
2149 | 40.1k | } |
2150 | | |
2151 | | /* Normal cases */ |
2152 | 36.9k | opt = dhcp_get_opt(code); |
2153 | 36.9k | if (opt == NULL) |
2154 | 0 | { |
2155 | | /* THIS SHOULD NEVER HAPPEN!!! */ |
2156 | 0 | return consumed; |
2157 | 0 | } |
2158 | | |
2159 | 36.9k | vti = proto_tree_add_uint_format_value(bp_tree, hf_dhcp_option_type, |
2160 | 36.9k | tvb, voff, consumed, code, "(%d) %s", code, opt->text); |
2161 | 36.9k | v_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
2162 | 36.9k | proto_tree_add_item(v_tree, hf_dhcp_option_length, tvb, voff+1, 1, ENC_BIG_ENDIAN); |
2163 | | |
2164 | 36.9k | ti_value = proto_tree_add_item(v_tree, hf_dhcp_option_value, tvb, voff+2, optlen, ENC_NA); |
2165 | 36.9k | proto_item_set_hidden(ti_value); |
2166 | | |
2167 | | /* prepare data for dissector table */ |
2168 | 36.9k | option_tvb = tvb_new_subset_length(tvb, voff+2, optlen); |
2169 | 36.9k | option_data.option = code; |
2170 | 36.9k | option_data.overload = overload_p; |
2171 | 36.9k | option_data.dhcp_type = *dhcp_type_p; |
2172 | 36.9k | option_data.vendor_class_id = *vendor_class_id_p; |
2173 | | |
2174 | | /* RFC 3396 4 Applicability and 7 Decoding Agent Behavior both clearly |
2175 | | * state that decoding agents MUST consider any case where an option |
2176 | | * code is repeated as a split option and reassemble it, even for |
2177 | | * options that are not "concatenation-requiring." |
2178 | | * |
2179 | | * However, cf. |
2180 | | * https://www.ietf.org/archive/id/draft-tojens-dhcp-option-concat-considerations-00.html |
2181 | | * which notes that real world DHCP implementations do not do this, and |
2182 | | * that, especially in the case of fixed length option types, this is |
2183 | | * less robust than actually used approaches of interpreting the options |
2184 | | * separately, and choosing one option while discarding others. |
2185 | | * |
2186 | | * XXX - Perhaps we want a preference of which options to concatenate? |
2187 | | */ |
2188 | 36.9k | if (rfc3396_data->total_number_of_block == 1) { |
2189 | 15.4k | if (!dissector_try_uint_with_data(dhcp_option_table, code, option_tvb, pinfo, v_tree, false, &option_data)) { |
2190 | | /* hf_dhcp_option_value is already in tree, just make it visible */ |
2191 | 6.46k | proto_item_set_visible(ti_value); |
2192 | 6.46k | } |
2193 | 21.5k | } else { |
2194 | 21.5k | proto_item *ti; |
2195 | 21.5k | rfc3396_data->index_current_block++; |
2196 | 21.5k | ti = proto_tree_add_string(v_tree, hf_dhcp_option_rfc_3396_detected, tvb, voff+2, optlen, |
2197 | 21.5k | wmem_strdup_printf(pinfo->pool, "%u/%u", rfc3396_data->index_current_block, rfc3396_data->total_number_of_block)); |
2198 | 21.5k | if (optlen) { |
2199 | 11.1k | if (rfc3396_data->tvb_composite == NULL) { |
2200 | 4.13k | rfc3396_data->tvb_composite = tvb_new_composite(); |
2201 | 4.13k | } |
2202 | 11.1k | tvb_composite_append(rfc3396_data->tvb_composite, option_tvb); |
2203 | 11.1k | } |
2204 | 21.5k | if (rfc3396_data->index_current_block != rfc3396_data->total_number_of_block) { |
2205 | 15.9k | 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); |
2206 | 15.9k | } else if (rfc3396_data->tvb_composite != NULL) { |
2207 | 4.02k | tvb_composite_finalize(rfc3396_data->tvb_composite); |
2208 | 4.02k | add_new_data_source(pinfo, rfc3396_data->tvb_composite, "RFC 3396 Long Option"); |
2209 | 4.02k | if (!dissector_try_uint_with_data(dhcp_option_table, code, rfc3396_data->tvb_composite, pinfo, v_tree, false, &option_data)) { |
2210 | 647 | proto_tree_add_item(v_tree, hf_dhcp_option_value, rfc3396_data->tvb_composite, 0, tvb_reported_length(rfc3396_data->tvb_composite), ENC_NA); |
2211 | 647 | } |
2212 | 4.02k | } else { |
2213 | 1.53k | expert_add_info_format(pinfo, ti, &ei_dhcp_bad_length, "RFC 3396 Long Option with combined length 0"); |
2214 | 1.53k | } |
2215 | 21.5k | } |
2216 | | |
2217 | 36.9k | return consumed; |
2218 | 36.9k | } |
2219 | | |
2220 | | static int |
2221 | | dissect_dhcpopt_policy_filter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2222 | 49 | { |
2223 | 49 | int offset = 0; |
2224 | | |
2225 | 247 | while (tvb_reported_length_remaining(tvb, offset) >= 8) { |
2226 | 198 | proto_tree_add_item(tree, hf_dhcp_option_policy_filter_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
2227 | 198 | offset += 4; |
2228 | 198 | proto_tree_add_item(tree, hf_dhcp_option_policy_filter_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN); |
2229 | 198 | offset += 4; |
2230 | 198 | } |
2231 | | |
2232 | 49 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2233 | 25 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 8"); |
2234 | 25 | } |
2235 | | |
2236 | 49 | return tvb_captured_length(tvb); |
2237 | 49 | } |
2238 | | |
2239 | | static int |
2240 | | dissect_dhcpopt_static_route(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2241 | 103 | { |
2242 | 103 | int offset = 0; |
2243 | | |
2244 | 243 | while (tvb_reported_length_remaining(tvb, offset) >= 8) { |
2245 | 140 | proto_tree_add_item(tree, hf_dhcp_option_static_route_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
2246 | 140 | offset += 4; |
2247 | 140 | proto_tree_add_item(tree, hf_dhcp_option_static_route_router, tvb, offset, 4, ENC_BIG_ENDIAN); |
2248 | 140 | offset += 4; |
2249 | 140 | } |
2250 | | |
2251 | 103 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2252 | 57 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 8"); |
2253 | 57 | } |
2254 | | |
2255 | 103 | return tvb_captured_length(tvb); |
2256 | 103 | } |
2257 | | |
2258 | | typedef unsigned(*test_option_len_t)(unsigned); |
2259 | | |
2260 | | /* Look for 'encapsulated vendor-specific options' */ |
2261 | | static bool |
2262 | | test_encapsulated_vendor_options(tvbuff_t *tvb, int optoff, int optend, test_option_len_t test_len) |
2263 | 983 | { |
2264 | 983 | uint8_t subopt; |
2265 | 983 | uint8_t subopt_len; |
2266 | | |
2267 | 15.1k | while (optoff < optend) { |
2268 | 14.8k | subopt = tvb_get_uint8(tvb, optoff); |
2269 | 14.8k | optoff++; |
2270 | | |
2271 | | /* Skip padding */ |
2272 | 14.8k | if (subopt == 0) |
2273 | 7.37k | continue; |
2274 | | /* We are done, skip any remaining bytes */ |
2275 | 7.47k | if (subopt == 255) |
2276 | 129 | break; |
2277 | | |
2278 | | /* We expect a length byte next */ |
2279 | 7.34k | if (optoff >= optend) |
2280 | 66 | return false; |
2281 | 7.27k | subopt_len = tvb_get_uint8(tvb, optoff); |
2282 | | |
2283 | 7.27k | if (test_len) { |
2284 | 1.35k | unsigned expected_subopt_len = test_len(subopt); |
2285 | 1.35k | if (expected_subopt_len && expected_subopt_len != subopt_len) |
2286 | 29 | return false; |
2287 | 1.35k | } |
2288 | 7.24k | optoff++; |
2289 | | |
2290 | | /* Check remaining room for suboption in option */ |
2291 | 7.24k | if (optoff + subopt_len > optend) |
2292 | 421 | return false; |
2293 | 6.82k | optoff += subopt_len; |
2294 | 6.82k | } |
2295 | 467 | return true; |
2296 | 983 | } |
2297 | | |
2298 | | /* Note that Option 43 encapsulated vendor-specific options (RFC 2132 8.4) |
2299 | | * treat option 0 as padding and option 255 as end of suboptions, unlike |
2300 | | * Option 125 which does not treat them specially (RFC 3925 4). |
2301 | | */ |
2302 | | static int |
2303 | | dissect_option43_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
2304 | | tvbuff_t *tvb) |
2305 | 3.88k | { |
2306 | 3.88k | unsigned suboptoff = 0; |
2307 | 3.88k | unsigned optend = tvb_reported_length(tvb); |
2308 | 3.88k | uint8_t subopt; |
2309 | 3.88k | uint32_t subopt_len; |
2310 | 3.88k | proto_item *item; |
2311 | 3.88k | proto_tree *sub_tree; |
2312 | | |
2313 | 3.88k | item = proto_tree_add_item(v_tree, hf_dhcp_option43_suboption, tvb, suboptoff, 1, ENC_NA); |
2314 | 3.88k | subopt = tvb_get_uint8(tvb, suboptoff); |
2315 | | |
2316 | 3.88k | suboptoff+=1; |
2317 | | |
2318 | 3.88k | if (subopt == 0) { |
2319 | | /* Padding */ |
2320 | 2.23k | return suboptoff; |
2321 | 2.23k | } |
2322 | | |
2323 | 1.64k | if (subopt == 255) { |
2324 | | /* END */ |
2325 | | /* XXX - Should there be expert info if there are more bytes? */ |
2326 | 114 | return optend; |
2327 | 114 | } |
2328 | | |
2329 | 1.53k | if (suboptoff >= optend) { |
2330 | 0 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
2331 | 0 | "Suboption %d: no room left in option for suboption length", subopt); |
2332 | 0 | return optend; |
2333 | 0 | } |
2334 | | |
2335 | 1.53k | sub_tree = proto_item_add_subtree(item, ett_dhcp_option43_suboption); |
2336 | 1.53k | proto_tree_add_item_ret_uint(sub_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_NA, &subopt_len); |
2337 | 1.53k | suboptoff++; |
2338 | | |
2339 | 1.53k | if (suboptoff+subopt_len > optend) { |
2340 | 0 | expert_add_info_format(pinfo, item, &ei_dhcp_missing_subopt_value, |
2341 | 0 | "Suboption %d: no room left in option for suboption value", subopt); |
2342 | 0 | return optend; |
2343 | 0 | } |
2344 | | |
2345 | 1.53k | proto_tree_add_item(sub_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
2346 | 1.53k | suboptoff+= subopt_len; |
2347 | | |
2348 | 1.53k | return suboptoff; |
2349 | | |
2350 | 1.53k | } |
2351 | | |
2352 | | static int |
2353 | | dissect_dhcpopt_vendor_specific_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2354 | 1.33k | { |
2355 | 1.33k | heur_dtbl_entry_t *hdtbl_entry; |
2356 | | |
2357 | 1.33k | if (!dissector_try_heuristic(dhcp_vendor_info_subdissector, tvb, pinfo, tree, &hdtbl_entry, data)) { |
2358 | 886 | int offset = 0; |
2359 | 886 | if (test_encapsulated_vendor_options(tvb, offset, tvb_reported_length(tvb), NULL)) { |
2360 | | /* Generic encapsulated options per RFC 2132 8.4 */ |
2361 | 4.30k | while (tvb_reported_length_remaining(tvb, offset)) { |
2362 | 3.88k | offset += dissect_option43_generic_suboption(pinfo, proto_tree_get_parent(tree), tree, tvb_new_subset_remaining(tvb, offset)); |
2363 | 3.88k | } |
2364 | 464 | } else { |
2365 | | /* Default Vendor-Specific Info.. display in bytes */ |
2366 | 464 | proto_tree_add_item(tree, hf_dhcp_option43_value, tvb, offset, tvb_reported_length(tvb), ENC_NA); |
2367 | 464 | } |
2368 | 886 | } |
2369 | | |
2370 | 1.33k | return tvb_captured_length(tvb); |
2371 | 1.33k | } |
2372 | | |
2373 | | static int |
2374 | | dissect_dhcpopt_option_overload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2375 | 4.31k | { |
2376 | 4.31k | int offset = 0; |
2377 | 4.31k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
2378 | | |
2379 | 4.31k | if (tvb_reported_length(tvb) < 1) { |
2380 | 33 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 1"); |
2381 | 33 | return 1; |
2382 | 33 | } |
2383 | | |
2384 | 4.28k | proto_tree_add_item(tree, hf_dhcp_option_option_overload, tvb, offset, 1, ENC_BIG_ENDIAN); |
2385 | 4.28k | if (option_data->overload == NULL) { |
2386 | | // Option Overload inside the overloaded fields is nonsensical |
2387 | 119 | expert_add_info(pinfo, tree, &ei_dhcp_opt_overload_wrong_field); |
2388 | 119 | } |
2389 | | |
2390 | 4.28k | return tvb_captured_length(tvb); |
2391 | 4.31k | } |
2392 | | |
2393 | | static int |
2394 | | dissect_dhcpopt_dhcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2395 | 42 | { |
2396 | 42 | uint32_t type; |
2397 | 42 | char* str_type; |
2398 | | |
2399 | 42 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_dhcp, tvb, 0, 1, ENC_NA, &type); |
2400 | | /* Show the message type name on the Message Type option, and in the protocol root */ |
2401 | 42 | str_type = val_to_str(pinfo->pool, type, opt53_text, "Unknown Message Type (0x%02x)"); |
2402 | 42 | proto_item_append_text(tree, " (%s)", str_type); |
2403 | 42 | proto_item_append_text(proto_item_get_parent(tree), " (%s)", str_type); |
2404 | | |
2405 | 42 | return tvb_captured_length(tvb); |
2406 | 42 | } |
2407 | | |
2408 | | static int |
2409 | | dissect_dhcpopt_param_request_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
2410 | 31 | { |
2411 | 31 | int offset = 0; |
2412 | 31 | uint8_t byte; |
2413 | | |
2414 | 738 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
2415 | 707 | byte = tvb_get_uint8(tvb, offset); |
2416 | 707 | proto_tree_add_uint_format_value(tree, hf_dhcp_option_parameter_request_list_item, |
2417 | 707 | tvb, offset, 1, byte, "(%d) %s", byte, dhcp_get_opt_text(byte)); |
2418 | 707 | offset++; |
2419 | 707 | } |
2420 | | |
2421 | 31 | return tvb_captured_length(tvb); |
2422 | 31 | } |
2423 | | |
2424 | | static int |
2425 | | dissect_dhcpopt_vendor_class_identifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2426 | 1.42k | { |
2427 | 1.42k | heur_dtbl_entry_t *hdtbl_entry; |
2428 | | |
2429 | | /* |
2430 | | * XXX - RFC 2132 says this is a string of octets; |
2431 | | * should we check for non-printables? |
2432 | | */ |
2433 | 1.42k | proto_tree_add_item(tree, hf_dhcp_option_vendor_class_id, tvb, 0, tvb_reported_length(tvb), ENC_ASCII); |
2434 | 1.42k | dissector_try_heuristic(dhcp_vendor_id_subdissector, tvb, pinfo, tree, &hdtbl_entry, data); |
2435 | | |
2436 | 1.42k | return tvb_captured_length(tvb); |
2437 | 1.42k | } |
2438 | | |
2439 | | static int |
2440 | | dissect_dhcpopt_client_identifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2441 | 163 | { |
2442 | 163 | int offset = 0; |
2443 | 163 | int length = tvb_reported_length(tvb); |
2444 | 163 | unsigned char byte; |
2445 | | |
2446 | 163 | if (length > 0) |
2447 | 138 | byte = tvb_get_uint8(tvb, offset); |
2448 | 25 | else |
2449 | 25 | byte = 0; |
2450 | | |
2451 | | /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll |
2452 | | guess that the first is the hwtype, and the last 6 |
2453 | | are the hw addr */ |
2454 | | /* See https://www.iana.org/assignments/arp-parameters */ |
2455 | | /* RFC2132 9.14 Client-identifier has the following to say: |
2456 | | A hardware type of 0 (zero) should be used when the value |
2457 | | field contains an identifier other than a hardware address |
2458 | | (e.g. a fully qualified domain name). */ |
2459 | | |
2460 | 163 | if (length == 7 && byte > 0 && byte < 48) { |
2461 | 7 | proto_tree_add_item(tree, hf_dhcp_hw_type, tvb, offset, 1, ENC_NA); |
2462 | | |
2463 | 7 | if (byte == ARPHRD_ETHER || byte == ARPHRD_IEEE802) |
2464 | 3 | proto_tree_add_item(tree, hf_dhcp_hw_ether_addr, tvb, offset+1, 6, ENC_NA); |
2465 | 4 | else |
2466 | 4 | proto_tree_add_string(tree, hf_dhcp_client_hardware_address, tvb, offset+1, 6, |
2467 | 4 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+1, 6, byte)); |
2468 | 156 | } else if (length == 17 && byte == 0) { |
2469 | | /* Identifier is a UUID */ |
2470 | 1 | proto_tree_add_item(tree, hf_dhcp_client_identifier_uuid, tvb, offset + 1, 16, dhcp_uuid_endian); |
2471 | | |
2472 | | /* From RFC 4361 paragraph 6.1 DHCPv4 Client Behavior: |
2473 | | To send an RFC 3315-style binding identifier in a DHCPv4 'client |
2474 | | identifier' option, the type of the 'client identifier' option is set |
2475 | | to 255. */ |
2476 | 155 | } else if (byte == 255) { |
2477 | 82 | uint16_t duidtype; |
2478 | 82 | uint16_t hwtype; |
2479 | | |
2480 | | /* The type field is immediately followed by the IAID, which is |
2481 | | an opaque 32-bit quantity */ |
2482 | 82 | proto_tree_add_string(tree, hf_dhcp_client_id_iaid, tvb, offset+1, 4, |
2483 | 82 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+1, 4, byte)); |
2484 | 82 | offset += 5; |
2485 | 82 | duidtype = tvb_get_ntohs(tvb, offset); |
2486 | 82 | proto_tree_add_item(tree, hf_dhcp_client_id_duid_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
2487 | 82 | switch (duidtype) { |
2488 | 30 | case DUID_LLT: |
2489 | 30 | if (length < 8) { |
2490 | 1 | expert_add_info(pinfo, tree, &ei_dhcp_mal_duid); |
2491 | 1 | break; |
2492 | 1 | } |
2493 | 29 | hwtype=tvb_get_ntohs(tvb, offset + 2); |
2494 | 29 | proto_tree_add_item(tree, hf_dhcp_client_identifier_duid_llt_hw_type, |
2495 | 29 | tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
2496 | | |
2497 | | /* XXX seconds since Jan 1 2000 */ |
2498 | 29 | proto_tree_add_item(tree, hf_dhcp_client_identifier_time, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
2499 | 29 | if (length > 8) { |
2500 | 28 | proto_tree_add_string(tree, hf_dhcp_client_identifier_link_layer_address, tvb, offset + 8, |
2501 | 28 | length - 13, tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+8, length-13, hwtype)); |
2502 | 28 | if(DHCP_HW_IS_ETHER(hwtype, length-13)) { |
2503 | 1 | proto_tree_add_item(tree, hf_dhcp_client_identifier_link_layer_address_ether, |
2504 | 1 | tvb, offset+8, length-13, ENC_NA); |
2505 | 1 | } |
2506 | 28 | } |
2507 | 29 | break; |
2508 | 9 | case DUID_EN: |
2509 | 9 | if (length < 6) { |
2510 | 0 | expert_add_info(pinfo, tree, &ei_dhcp_mal_duid); |
2511 | 0 | break; |
2512 | 0 | } |
2513 | 9 | proto_tree_add_item(tree, hf_dhcp_client_identifier_enterprise_num, tvb, offset + 2, 4, ENC_BIG_ENDIAN); |
2514 | 9 | if (length > 6) { |
2515 | 9 | proto_tree_add_item(tree, hf_dhcp_client_identifier, tvb, offset + 6, length - 11, ENC_NA); |
2516 | 9 | } |
2517 | 9 | break; |
2518 | 35 | case DUID_LL: |
2519 | 35 | if (length < 4) { |
2520 | 0 | expert_add_info(pinfo, tree, &ei_dhcp_mal_duid); |
2521 | 0 | break; |
2522 | 0 | } |
2523 | 35 | hwtype=tvb_get_ntohs(tvb, offset + 2); |
2524 | 35 | proto_tree_add_item(tree, hf_dhcp_client_identifier_duid_ll_hw_type, |
2525 | 35 | tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
2526 | | |
2527 | 35 | if (length > 4) { |
2528 | 35 | proto_tree_add_string(tree, hf_dhcp_client_identifier_link_layer_address, tvb, offset + 4, |
2529 | 35 | length - 9, tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+4, length-9, hwtype)); |
2530 | 35 | if(DHCP_HW_IS_ETHER(hwtype, length-9)) { |
2531 | 1 | proto_tree_add_item(tree, hf_dhcp_client_identifier_link_layer_address_ether, |
2532 | 1 | tvb, offset+4, length-9, ENC_NA); |
2533 | 1 | } |
2534 | 35 | } |
2535 | 35 | break; |
2536 | 82 | } |
2537 | 82 | } else if (byte == 0 && length > 1) { |
2538 | | /* identifier other than a hardware address (e.g. a fully qualified domain name) */ |
2539 | 4 | proto_tree_add_item(tree, hf_dhcp_client_identifier_type, tvb, offset, 1, ENC_NA); |
2540 | 4 | proto_tree_add_item(tree, hf_dhcp_client_identifier_undef, tvb, offset+1, length-1, ENC_ASCII); |
2541 | 69 | } else { |
2542 | | /* otherwise, it's opaque data */ |
2543 | 69 | } |
2544 | | |
2545 | 162 | return tvb_captured_length(tvb); |
2546 | 163 | } |
2547 | | |
2548 | | static int |
2549 | | dissect_dhcpopt_user_class_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2550 | 52 | { |
2551 | 52 | unsigned char user_class_instance_index = 0; |
2552 | 52 | int offset = 0; |
2553 | 52 | proto_item *vtix, *len_item; |
2554 | 52 | proto_tree *o77_v_tree; |
2555 | 52 | unsigned class_length, uci_len = tvb_reported_length(tvb); |
2556 | 52 | if (uci_len < 2) { |
2557 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 2"); |
2558 | 10 | return 1; |
2559 | 10 | } |
2560 | | |
2561 | | /* First byte is the length of User Class data. If it is zero, then let's assume this |
2562 | | * is a Microsoft variant that has the two-byte length field with most-significant byte |
2563 | | * as zero. |
2564 | | */ |
2565 | 42 | uint16_t ms_data_length = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN); |
2566 | 42 | if (ms_data_length <= 0xff) { |
2567 | | /* MSB is zero, this is Microsoft */ |
2568 | 8 | proto_tree_add_uint(tree, hf_dhcp_option77_user_class_binary_data_length, tvb, offset, 2, ms_data_length); |
2569 | 8 | offset += 2; |
2570 | 8 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_binary_data, tvb, offset, ms_data_length, ENC_STRING); |
2571 | 8 | offset += ms_data_length; |
2572 | | /* User Class Binary Data is padded to 4-byte boundary */ |
2573 | 8 | uint16_t padding_length = WS_PADDING_TO_4(ms_data_length); |
2574 | 8 | if (padding_length > 0) { |
2575 | 1 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_padding, tvb, offset, padding_length, ENC_NA); |
2576 | 1 | offset += padding_length; |
2577 | 1 | } |
2578 | 8 | uint32_t len; |
2579 | 8 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option77_user_class_name_length, tvb, offset, 2, ENC_BIG_ENDIAN, &len); |
2580 | 8 | offset += 2; |
2581 | 8 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_name, tvb, offset, len, ENC_UTF_16); |
2582 | 8 | offset += len; |
2583 | 8 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option77_user_class_description_length, tvb, offset, 2, ENC_BIG_ENDIAN, &len); |
2584 | 8 | offset += 2; |
2585 | 8 | proto_tree_add_item(tree, hf_dhcp_option77_user_class_description, tvb, offset, len, ENC_UTF_16); |
2586 | | |
2587 | 8 | return tvb_captured_length(tvb); |
2588 | 8 | } |
2589 | | |
2590 | 249 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
2591 | 248 | class_length = tvb_get_uint8(tvb, offset); |
2592 | 248 | if (class_length >= uci_len) { |
2593 | | /* Having the sum of the User Class data lengths exceed the total User Option Information length (uci_len) |
2594 | | * is a violation of RFC 3004. In that case the remaining data is treated as a non-conformant (text) option. |
2595 | | * This check will also catch the Microsoft 'variation' implementation (when Vendor class identifier contains |
2596 | | * "MSFT 5.0") such as "RRAS.Microsoft" and others like "iPXE". |
2597 | | * In the unlikely case that the first character can be interpreted as a valid length the next iteration |
2598 | | * of this while loop will catch that. |
2599 | | * https://gitlab.com/wireshark/wireshark/-/issues/16349 |
2600 | | * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dhcpe/fe8a2dd4-1e8c-4546-bacd-4ae10de02058 |
2601 | | */ |
2602 | 26 | proto_item *expert_ti = proto_tree_add_item(tree, hf_dhcp_option77_user_class_text, tvb, offset, uci_len, ENC_ASCII); |
2603 | 26 | expert_add_info(pinfo, expert_ti, &ei_dhcp_nonstd_option_data); |
2604 | 26 | break; |
2605 | 26 | } |
2606 | | |
2607 | | /* Create subtree for instance of User Class. */ |
2608 | 222 | vtix = proto_tree_add_uint_format_value(tree, hf_dhcp_option77_user_class, |
2609 | 222 | tvb, offset, 1, user_class_instance_index, "[%d]", user_class_instance_index); |
2610 | 222 | o77_v_tree = proto_item_add_subtree(vtix, ett_dhcp_option77_instance); |
2611 | | |
2612 | | /* Add length for instance of User Class. */ |
2613 | 222 | len_item = proto_tree_add_uint(o77_v_tree, hf_dhcp_option77_user_class_length, tvb, offset, 1, class_length); |
2614 | 222 | proto_item_set_len(vtix, class_length+1); |
2615 | 222 | offset++; |
2616 | | |
2617 | 222 | if (class_length == 0) { |
2618 | 7 | 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); |
2619 | 7 | break; |
2620 | 7 | } |
2621 | | |
2622 | | /* Add data for instance of User Class. */ |
2623 | 215 | proto_tree_add_item(o77_v_tree, hf_dhcp_option77_user_class_data, tvb, offset, class_length, ENC_NA); |
2624 | | |
2625 | 215 | offset += class_length; |
2626 | 215 | uci_len -= class_length + 1; |
2627 | 215 | user_class_instance_index++; |
2628 | 215 | } |
2629 | | |
2630 | 34 | return tvb_captured_length(tvb); |
2631 | 42 | } |
2632 | | |
2633 | | static int |
2634 | | dissect_dhcpopt_slp_directory_agent(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2635 | 53 | { |
2636 | 53 | int offset = 0; |
2637 | 53 | uint32_t byte; |
2638 | | |
2639 | 53 | if (tvb_reported_length(tvb) < 1) { |
2640 | 7 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 1"); |
2641 | 7 | return 1; |
2642 | 7 | } |
2643 | | |
2644 | 46 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_slp_directory_agent_value, tvb, offset, 1, ENC_BIG_ENDIAN, &byte); |
2645 | 46 | offset++; |
2646 | | |
2647 | 46 | if (byte == 0x80) { |
2648 | 2 | if (tvb_reported_length_remaining(tvb, offset) == 0) |
2649 | 1 | return offset; |
2650 | | |
2651 | 1 | offset++; |
2652 | 1 | } |
2653 | | |
2654 | 623 | while (tvb_reported_length_remaining(tvb, offset) >= 4) { |
2655 | 578 | proto_tree_add_item(tree, hf_dhcp_option_slp_directory_agent_slpda_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
2656 | 578 | offset += 4; |
2657 | 578 | } |
2658 | | |
2659 | 45 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2660 | 29 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
2661 | 29 | } |
2662 | | |
2663 | 45 | return tvb_captured_length(tvb); |
2664 | 46 | } |
2665 | | |
2666 | | static int |
2667 | | dissect_dhcpopt_slp_service_scope(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
2668 | 8 | { |
2669 | 8 | int offset = 0; |
2670 | | |
2671 | 8 | proto_tree_add_item(tree, hf_dhcp_option_slp_service_scope_value, tvb, offset, 1, ENC_BIG_ENDIAN); |
2672 | | |
2673 | 8 | offset++; |
2674 | 8 | proto_tree_add_item(tree, hf_dhcp_option_slp_service_scope_string, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
2675 | | |
2676 | 8 | return tvb_captured_length(tvb); |
2677 | 8 | } |
2678 | | |
2679 | | static int |
2680 | | dissect_dhcpopt_client_full_domain_name(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2681 | 21 | { |
2682 | 21 | static int * const fqdn_hf_flags[] = { |
2683 | 21 | &hf_dhcp_fqdn_mbz, |
2684 | 21 | &hf_dhcp_fqdn_n, |
2685 | 21 | &hf_dhcp_fqdn_e, |
2686 | 21 | &hf_dhcp_fqdn_o, |
2687 | 21 | &hf_dhcp_fqdn_s, |
2688 | 21 | NULL |
2689 | 21 | }; |
2690 | 21 | uint8_t fqdn_flags; |
2691 | 21 | int offset = 0, length = tvb_reported_length(tvb); |
2692 | 21 | const char *dns_name; |
2693 | 21 | int dns_name_len; |
2694 | | |
2695 | 21 | if (length < 3) { |
2696 | 8 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 3"); |
2697 | 8 | return 1; |
2698 | 8 | } |
2699 | | |
2700 | 13 | fqdn_flags = tvb_get_uint8(tvb, offset); |
2701 | 13 | proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_fqdn_flags, |
2702 | 13 | ett_dhcp_fqdn_flags, fqdn_hf_flags, ENC_BIG_ENDIAN); |
2703 | | |
2704 | | /* XXX: use code from packet-dns for return code decoding */ |
2705 | 13 | proto_tree_add_item(tree, hf_dhcp_fqdn_rcode1, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
2706 | | /* XXX: use code from packet-dns for return code decoding */ |
2707 | 13 | proto_tree_add_item(tree, hf_dhcp_fqdn_rcode2, tvb, offset+2, 1, ENC_BIG_ENDIAN); |
2708 | | |
2709 | 13 | if (length > 3) { |
2710 | 11 | if (fqdn_flags & F_FQDN_E) { |
2711 | 3 | get_dns_name(pinfo->pool, tvb, offset+3, length-3, offset+3, &dns_name, &dns_name_len); |
2712 | 3 | proto_tree_add_string(tree, hf_dhcp_fqdn_name, |
2713 | 3 | tvb, offset+3, length-3, format_text(pinfo->pool, dns_name, dns_name_len)); |
2714 | 8 | } else { |
2715 | 8 | proto_tree_add_item(tree, hf_dhcp_fqdn_asciiname, tvb, offset+3, length-3, ENC_ASCII); |
2716 | 8 | } |
2717 | 11 | } |
2718 | | |
2719 | 13 | return tvb_captured_length(tvb); |
2720 | 21 | } |
2721 | | |
2722 | | static int |
2723 | | dissect_dhcpopt_novell_servers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2724 | 31 | { |
2725 | 31 | int offset = 0; |
2726 | | |
2727 | | /* Option 85 can be sent as a string */ |
2728 | | /* Added by Greg Morris (gmorris[AT]novell.com) */ |
2729 | 31 | if (novell_string) { |
2730 | 0 | proto_tree_add_item(tree, hf_dhcp_option_novell_dss_string, tvb, offset, tvb_reported_length(tvb), ENC_ASCII); |
2731 | 31 | } else { |
2732 | | /* IP addresses */ |
2733 | 335 | while (tvb_reported_length_remaining(tvb, offset) >= 4) { |
2734 | | |
2735 | 304 | proto_tree_add_item(tree, hf_dhcp_option_novell_dss_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
2736 | 304 | offset += 4; |
2737 | 304 | } |
2738 | | |
2739 | 31 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2740 | 17 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
2741 | 17 | } |
2742 | 31 | } |
2743 | | |
2744 | 31 | return tvb_captured_length(tvb); |
2745 | 31 | } |
2746 | | |
2747 | | static int |
2748 | | dissect_dhcpopt_dhcp_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
2749 | 54 | { |
2750 | 54 | int offset = 0; |
2751 | 54 | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
2752 | 54 | uint32_t protocol, rdm; |
2753 | 54 | uint8_t algorithm; |
2754 | | |
2755 | 54 | if (tvb_reported_length(tvb) < 11) { |
2756 | 11 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 11"); |
2757 | 11 | return 1; |
2758 | 11 | } |
2759 | | |
2760 | 43 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_dhcp_authentication_protocol, tvb, offset, 1, ENC_BIG_ENDIAN, &protocol); |
2761 | 43 | offset++; |
2762 | | |
2763 | 43 | algorithm = tvb_get_uint8(tvb, offset); |
2764 | 43 | switch (protocol) { |
2765 | | |
2766 | 24 | case AUTHEN_PROTO_DELAYED_AUTHEN: |
2767 | 24 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_alg_delay, tvb, offset, 1, ENC_BIG_ENDIAN); |
2768 | 24 | break; |
2769 | | |
2770 | 19 | default: |
2771 | 19 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_algorithm, tvb, offset, 1, ENC_BIG_ENDIAN); |
2772 | 19 | break; |
2773 | 43 | } |
2774 | 43 | offset++; |
2775 | | |
2776 | 43 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_dhcp_authentication_rdm, tvb, offset, 1, ENC_BIG_ENDIAN, &rdm); |
2777 | 43 | offset++; |
2778 | | |
2779 | 43 | switch (rdm) { |
2780 | | |
2781 | 5 | case AUTHEN_RDM_MONOTONIC_COUNTER: |
2782 | 5 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_rdm_replay_detection, tvb, offset, 8, ENC_BIG_ENDIAN); |
2783 | 5 | break; |
2784 | | |
2785 | 38 | default: |
2786 | 38 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_rdm_rdv, tvb, offset, 8, ENC_ASCII); |
2787 | 38 | break; |
2788 | 43 | } |
2789 | 43 | offset += 8; |
2790 | | |
2791 | 43 | switch (protocol) { |
2792 | | |
2793 | 24 | case AUTHEN_PROTO_DELAYED_AUTHEN: |
2794 | 24 | switch (algorithm) { |
2795 | | |
2796 | 15 | case AUTHEN_DELAYED_ALGO_HMAC_MD5: |
2797 | 15 | if (option_data->dhcp_type && !strcmp(option_data->dhcp_type, OPT53_DISCOVER)) { |
2798 | | /* Discover has no Secret ID nor HMAC MD5 Hash */ |
2799 | 1 | break; |
2800 | 14 | } else { |
2801 | 14 | if (tvb_reported_length_remaining(tvb, offset) < 20) { |
2802 | 8 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 20"); |
2803 | 8 | break; |
2804 | 8 | } |
2805 | | |
2806 | 6 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_secret_id, tvb, offset, 4, ENC_BIG_ENDIAN); |
2807 | 6 | offset += 4; |
2808 | 6 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_hmac_md5_hash, tvb, offset, 16, ENC_NA); |
2809 | 6 | break; |
2810 | 14 | } |
2811 | | |
2812 | 9 | default: |
2813 | 9 | if (tvb_reported_length_remaining(tvb, offset) == 0) |
2814 | 1 | break; |
2815 | | |
2816 | 8 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_information, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
2817 | 8 | break; |
2818 | 24 | } |
2819 | 24 | break; |
2820 | | |
2821 | 24 | default: |
2822 | 19 | if (tvb_reported_length_remaining(tvb, offset) == 0) |
2823 | 2 | break; |
2824 | | |
2825 | 17 | proto_tree_add_item(tree, hf_dhcp_option_dhcp_authentication_information, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
2826 | 17 | break; |
2827 | 43 | } |
2828 | | |
2829 | 43 | return tvb_captured_length(tvb); |
2830 | 43 | } |
2831 | | |
2832 | | static int |
2833 | | dissect_dhcpopt_client_architecture(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2834 | 104 | { |
2835 | 104 | int offset = 0; |
2836 | | |
2837 | 1.26k | while (tvb_reported_length_remaining(tvb, offset) > 1) { |
2838 | 1.15k | uint32_t architecture_id; |
2839 | 1.15k | proto_item *pi; |
2840 | | |
2841 | 1.15k | pi = proto_tree_add_item_ret_uint(tree, hf_dhcp_option_client_system_architecture, tvb, offset, 2, ENC_BIG_ENDIAN, &architecture_id); |
2842 | 1.15k | offset += 2; |
2843 | | |
2844 | | /* |
2845 | | * Some Client Architecture IDs are widely misused. For |
2846 | | * details, refer to the comment at the definition of |
2847 | | * dhcp_client_arch. |
2848 | | * |
2849 | | * The most common problem is a client using architecture ID 9 |
2850 | | * when performing an EFI x64 boot. Windows Server 2008 WDS |
2851 | | * does not recognize ID 9, but most other DHCP servers |
2852 | | * (including newer versions of WDS) silently map architecture |
2853 | | * ID 9 to x64 in order to accommodate these clients. |
2854 | | */ |
2855 | 1.15k | if (architecture_id == 9) { |
2856 | 108 | expert_add_info_format(pinfo, pi, &ei_dhcp_option93_client_arch_ambiguous, "Client Architecture ID 9 is often incorrectly used for EFI x64"); |
2857 | 108 | } |
2858 | | |
2859 | | /* |
2860 | | * Technically, architecture ID 7 is ambiguous for the same |
2861 | | * reason, but it's extremely unlikely to be a real world |
2862 | | * problem, so a warning would probably just be unwelcome |
2863 | | * noise. |
2864 | | */ |
2865 | 1.15k | } |
2866 | 104 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
2867 | 18 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 2"); |
2868 | 18 | } |
2869 | | |
2870 | 104 | return tvb_captured_length(tvb); |
2871 | 104 | } |
2872 | | |
2873 | | static int |
2874 | | dissect_dhcpopt_client_network_interface_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
2875 | 14 | { |
2876 | 14 | int offset = 0; |
2877 | 14 | uint8_t id_type; |
2878 | | |
2879 | 14 | id_type = tvb_get_uint8(tvb, offset); |
2880 | 14 | offset++; |
2881 | | |
2882 | 14 | if (id_type == 0x01) { |
2883 | 4 | proto_tree_add_item(tree, hf_dhcp_option_client_network_id_major_ver, |
2884 | 4 | tvb, offset, 1, ENC_LITTLE_ENDIAN); |
2885 | 4 | offset++; |
2886 | 4 | proto_tree_add_item(tree, hf_dhcp_option_client_network_id_minor_ver, |
2887 | 4 | tvb, offset, 1, ENC_LITTLE_ENDIAN); |
2888 | 4 | } |
2889 | | |
2890 | 14 | return tvb_captured_length(tvb); |
2891 | 14 | } |
2892 | | |
2893 | | static int |
2894 | | dissect_dhcpopt_client_identifier_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2895 | 28 | { |
2896 | 28 | int offset = 0, length = tvb_reported_length(tvb); |
2897 | 28 | uint8_t byte; |
2898 | | |
2899 | 28 | if (length > 0) |
2900 | 23 | byte = tvb_get_uint8(tvb, offset); |
2901 | 5 | else |
2902 | 5 | byte = 0; |
2903 | | |
2904 | | /* We *MAY* use hwtype/hwaddr. If we have 7 bytes, I'll |
2905 | | guess that the first is the hwtype, and the last 6 |
2906 | | are the hw addr */ |
2907 | | /* See https://www.iana.org/assignments/arp-parameters */ |
2908 | | /* RFC2132 9.14 Client-identifier has the following to say: |
2909 | | A hardware type of 0 (zero) should be used when the value |
2910 | | field contains an identifier other than a hardware address |
2911 | | (e.g. a fully qualified domain name). */ |
2912 | | |
2913 | 28 | if (length == 7 && byte > 0 && byte < 48) { |
2914 | 7 | proto_tree_add_item(tree, hf_dhcp_hw_type, tvb, offset, 1, ENC_NA); |
2915 | 7 | if (byte == ARPHRD_ETHER || byte == ARPHRD_IEEE802) |
2916 | 2 | proto_tree_add_item(tree, hf_dhcp_hw_ether_addr, tvb, offset+1, 6, ENC_NA); |
2917 | 5 | else |
2918 | 5 | proto_tree_add_string(tree, hf_dhcp_client_hardware_address, tvb, offset+1, 6, |
2919 | 5 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, offset+1, 6, byte)); |
2920 | 21 | } else if (length == 17 && byte == 0) { |
2921 | | /* Identifier is a UUID */ |
2922 | 2 | proto_tree_add_item(tree, hf_dhcp_client_identifier_uuid, tvb, offset + 1, 16, dhcp_uuid_endian); |
2923 | 19 | } else { |
2924 | | /* otherwise, it's opaque data */ |
2925 | 19 | } |
2926 | | |
2927 | 28 | return tvb_captured_length(tvb); |
2928 | 28 | } |
2929 | | |
2930 | | static int |
2931 | | dissect_dhcpopt_civic_location(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2932 | 39 | { |
2933 | 39 | int offset = 0; |
2934 | | |
2935 | 39 | if (tvb_reported_length(tvb) >= 3) |
2936 | 28 | { |
2937 | 28 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_what, tvb, offset, 1, ENC_BIG_ENDIAN); |
2938 | 28 | offset++; |
2939 | 28 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_country, tvb, offset, 2, ENC_ASCII); |
2940 | 28 | offset += 2; |
2941 | | |
2942 | 646 | while (tvb_reported_length_remaining(tvb, offset) >= 2) |
2943 | 636 | { |
2944 | 636 | uint32_t calength; |
2945 | 636 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_ca_type, tvb, offset, 1, ENC_BIG_ENDIAN); |
2946 | 636 | offset++; |
2947 | 636 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_civic_location_ca_length, tvb, offset, 1, ENC_BIG_ENDIAN, &calength); |
2948 | 636 | offset++; |
2949 | | |
2950 | 636 | if (calength == 0) |
2951 | 329 | continue; |
2952 | | |
2953 | 307 | if (tvb_reported_length_remaining(tvb, offset) >= (int)calength) |
2954 | 289 | { |
2955 | 289 | proto_tree_add_item(tree, hf_dhcp_option_civic_location_ca_value, tvb, offset, calength, ENC_ASCII); |
2956 | 289 | offset += calength; |
2957 | 289 | } |
2958 | 18 | else |
2959 | 18 | { |
2960 | 18 | expert_add_info(pinfo, tree, &ei_dhcp_option_civic_location_bad_cattype); |
2961 | 18 | break; |
2962 | 18 | } |
2963 | 307 | } |
2964 | 28 | } |
2965 | | |
2966 | 39 | return tvb_captured_length(tvb); |
2967 | 39 | } |
2968 | | |
2969 | | static int |
2970 | | dissect_dhcpopt_name_server_search(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2971 | 49 | { |
2972 | 49 | int offset = 0, length = tvb_reported_length(tvb); |
2973 | 49 | uint16_t ns; |
2974 | | |
2975 | 49 | if (length < 2) { |
2976 | 6 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 2"); |
2977 | 6 | return 1; |
2978 | 43 | } else if (length & 1) { |
2979 | 7 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length (%u) isn't even number", length); |
2980 | 7 | return 1; |
2981 | 7 | } |
2982 | | |
2983 | 2.73k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
2984 | 2.70k | ns = tvb_get_ntohs(tvb, offset); |
2985 | | /* XXX - Make this a value_string */ |
2986 | 2.70k | switch (ns) { |
2987 | 436 | case RFC2937_LOCAL_NAMING_INFORMATION: |
2988 | 436 | 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)"); |
2989 | 436 | break; |
2990 | 130 | case RFC2937_DOMAIN_NAME_SERVER_OPTION: |
2991 | 130 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Domain Name Server Option (6)"); |
2992 | 130 | break; |
2993 | 107 | case RFC2937_NETWORK_INFORMATION_SERVERS_OPTION: |
2994 | 107 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Network Information Servers Option (41)"); |
2995 | 107 | break; |
2996 | 83 | case RFC2937_NETBIOS_OVER_TCP_IP_NAME_SERVER_OPTION: |
2997 | 83 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "NetBIOS over TCP/IP Name Server Option (44)"); |
2998 | 83 | break; |
2999 | 120 | case RFC2937_NETWORK_INFORMATION_SERVICE_PLUS_SERVERS_OPTION: |
3000 | 120 | proto_tree_add_string(tree, hf_dhcp_option_dhcp_name_service_search_option, tvb, offset, 2, "Network Information Service+ Servers Option (65)"); |
3001 | 120 | break; |
3002 | 1.82k | default: |
3003 | 1.82k | expert_add_info_format(pinfo, tree, &ei_dhcp_option_dhcp_name_service_invalid, |
3004 | 1.82k | "Invalid Name Service (%u). RFC 2937 defines only 0, 6, 41, 44, and 65 as possible values.", ns); |
3005 | 1.82k | break; |
3006 | 2.70k | } |
3007 | 2.70k | offset += 2; |
3008 | 2.70k | } |
3009 | | |
3010 | 36 | return tvb_captured_length(tvb); |
3011 | 36 | } |
3012 | | |
3013 | | static int |
3014 | | dissect_dhcpopt_dhcp_domain_search(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3015 | 256 | { |
3016 | 256 | int length = tvb_reported_length(tvb); |
3017 | 256 | int offset = 0; |
3018 | 256 | char *name_out; |
3019 | 256 | const char *dns_name; |
3020 | 256 | int dns_name_len; |
3021 | | |
3022 | | /* Domain Names - Implementation And Specification (RFC 1035) */ |
3023 | | |
3024 | | /* We will display the information about fqdn */ |
3025 | 256 | int consumedx = 0; |
3026 | | |
3027 | 10.4k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3028 | | /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */ |
3029 | 10.2k | consumedx = get_dns_name(pinfo->pool, tvb, offset, |
3030 | 10.2k | length, 0, &dns_name, &dns_name_len); |
3031 | 10.2k | name_out = format_text(pinfo->pool, dns_name, dns_name_len); |
3032 | 10.2k | proto_tree_add_string(tree, hf_dhcp_option_dhcp_dns_domain_search_list_fqdn, tvb, offset, consumedx, name_out); |
3033 | 10.2k | offset += consumedx; |
3034 | 10.2k | } |
3035 | | |
3036 | 256 | return tvb_captured_length(tvb); |
3037 | 256 | } |
3038 | | |
3039 | | static int |
3040 | | dissect_dhcpopt_sip_servers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3041 | 29 | { |
3042 | 29 | int length = tvb_reported_length(tvb); |
3043 | 29 | int offset = 0; |
3044 | 29 | const char *dns_name; |
3045 | 29 | int dns_name_len; |
3046 | 29 | char *name_out; |
3047 | | |
3048 | | /* Domain Names - Implementation And Specification (RFC 1035) */ |
3049 | | /* We will display the information about SIP server */ |
3050 | 29 | uint32_t enc; |
3051 | | |
3052 | 29 | proto_tree_add_item_ret_uint(tree, hf_dhcp_option_sip_server_enc, tvb, offset, 1, ENC_NA, &enc); |
3053 | 29 | offset += 1; |
3054 | | |
3055 | 29 | switch (enc) { |
3056 | 12 | case RFC_3361_ENC_FQDN: { |
3057 | 12 | int consumedx = 0; |
3058 | 12 | if (length < 3) { |
3059 | 1 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 3 (len = %u)", length); |
3060 | 1 | break; |
3061 | 1 | } |
3062 | | |
3063 | 244 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3064 | | /* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */ |
3065 | 233 | consumedx = get_dns_name(pinfo->pool, tvb, offset, length, |
3066 | 233 | 1 /* ignore enc */, &dns_name, &dns_name_len); |
3067 | 233 | name_out = format_text(pinfo->pool, dns_name, dns_name_len); |
3068 | | |
3069 | 233 | proto_tree_add_string(tree, hf_dhcp_option_sip_server_name, tvb, offset, consumedx, name_out); |
3070 | 233 | offset += consumedx; |
3071 | 233 | } |
3072 | 11 | break; |
3073 | 12 | } |
3074 | 15 | case RFC_3361_ENC_IPADDR: |
3075 | 15 | if (length < 5) { |
3076 | 2 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 5 (len = %u)", length); |
3077 | 2 | break; |
3078 | 2 | } |
3079 | | /* x % 2^n == x & (2^n - 1) note : (assuming x is a positive integer) */ |
3080 | 13 | if ((length - 1) & 3) { |
3081 | 2 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", length); |
3082 | 2 | break; |
3083 | 2 | } |
3084 | 292 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3085 | 281 | proto_tree_add_item(tree, hf_dhcp_option_sip_server_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
3086 | 281 | offset += 4; |
3087 | 281 | } |
3088 | 11 | break; |
3089 | 1 | default: |
3090 | 1 | 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); |
3091 | 1 | break; |
3092 | 29 | } |
3093 | | |
3094 | 19 | return tvb_captured_length(tvb); |
3095 | 29 | } |
3096 | | |
3097 | | static int |
3098 | | dissect_dhcpopt_classless_static_route(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3099 | 92 | { |
3100 | 92 | int offset = 0; |
3101 | 92 | int i, mask_width, significant_octets; |
3102 | 92 | proto_item* route_item; |
3103 | | |
3104 | | /* minimum length is 5 bytes */ |
3105 | 92 | if (tvb_reported_length(tvb) < 5) { |
3106 | 27 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length isn't >= 5"); |
3107 | 27 | return 1; |
3108 | 27 | } |
3109 | 1.33k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3110 | 1.31k | mask_width = tvb_get_uint8(tvb, offset); |
3111 | | /* mask_width <= 32 */ |
3112 | 1.31k | if (mask_width > 32) { |
3113 | 47 | expert_add_info_format(pinfo, tree, &ei_dhcp_option_classless_static_route, "Mask width (%d) > 32", mask_width); |
3114 | 47 | break; |
3115 | 47 | } |
3116 | 1.26k | significant_octets = (mask_width + 7) / 8; |
3117 | 1.26k | route_item = proto_tree_add_bytes_format(tree, hf_dhcp_option_classless_static_route, tvb, offset, |
3118 | 1.26k | 1 + significant_octets + 4, NULL, " "); |
3119 | 1.26k | offset++; |
3120 | | /* significant octets + router(4) */ |
3121 | 1.26k | if (tvb_reported_length_remaining(tvb, offset + significant_octets + 4) < 0) { |
3122 | 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); |
3123 | 0 | break; |
3124 | 0 | } |
3125 | 1.26k | if(mask_width == 0) |
3126 | 490 | proto_item_append_text(route_item, "default"); |
3127 | 779 | else { |
3128 | 2.11k | for(i = 0 ; i < significant_octets ; i++) { |
3129 | 1.33k | if (i > 0) |
3130 | 564 | proto_item_append_text(route_item, "."); |
3131 | 1.33k | proto_item_append_text(route_item, "%d", tvb_get_uint8(tvb, offset++)); |
3132 | 1.33k | } |
3133 | 2.51k | for(i = significant_octets ; i < 4 ; i++) |
3134 | 1.74k | proto_item_append_text(route_item, ".0"); |
3135 | 779 | proto_item_append_text(route_item, "/%d", mask_width); |
3136 | 779 | } |
3137 | 1.26k | proto_item_append_text(route_item, "-%s", tvb_ip_to_str(pinfo->pool, tvb, offset)); |
3138 | 1.26k | offset += 4; |
3139 | 1.26k | } |
3140 | | |
3141 | 65 | return tvb_captured_length(tvb); |
3142 | 92 | } |
3143 | | |
3144 | | static int |
3145 | | dissect_dhcpopt_coordinate_based_location(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3146 | 56 | { |
3147 | 56 | int offset = 0, length = tvb_reported_length(tvb); |
3148 | 56 | proto_item* ti; |
3149 | | |
3150 | 56 | if (length == 16) { |
3151 | 48 | int ret; |
3152 | 48 | unsigned char lci[16]; |
3153 | 48 | struct rfc3825_location_fixpoint_t location_fp; |
3154 | 48 | struct rfc3825_location_decimal_t location; |
3155 | | |
3156 | 48 | tvb_memcpy(tvb, lci, offset, 16); |
3157 | | |
3158 | | /* convert lci encoding into fixpoint location */ |
3159 | 48 | rfc3825_lci_to_fixpoint(lci, &location_fp); |
3160 | | |
3161 | | /* convert location from decimal to fixpoint */ |
3162 | 48 | ret = rfc3825_fixpoint_to_decimal(&location_fp, &location); |
3163 | | |
3164 | 48 | if (ret != RFC3825_NOERROR) { |
3165 | 40 | ti = proto_tree_add_uint(tree, hf_dhcp_option_rfc3825_error, tvb, offset, 1, ret); |
3166 | 40 | proto_item_set_len(ti, length); |
3167 | 40 | } else { |
3168 | 8 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_latitude, tvb, offset, 5, location.latitude, "%15.10f", location.latitude); |
3169 | 8 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_longitude, tvb, offset+5, 5, location.longitude, "%15.10f", location.longitude); |
3170 | 8 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_latitude_res, tvb, offset, 1, location.latitude_res, "%15.10f", location.latitude_res); |
3171 | 8 | 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); |
3172 | 8 | proto_tree_add_double_format_value(tree, hf_dhcp_option_rfc3825_altitude, tvb, offset+12, 4, location.altitude, "%15.10f", location.altitude); |
3173 | 8 | 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); |
3174 | 8 | proto_tree_add_uint(tree, hf_dhcp_option_rfc3825_altitude_type, tvb, offset+10, 1, location.altitude_type); |
3175 | 8 | proto_tree_add_uint(tree, hf_dhcp_option_rfc3825_map_datum, tvb, offset+15, 1, location.datum_type); |
3176 | 8 | } |
3177 | 48 | } else if (length < 69) { /* CableLabs DSS_ID */ |
3178 | 7 | int s_len; |
3179 | | |
3180 | 7 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_option, tvb, offset, 1, ENC_BIG_ENDIAN); |
3181 | 7 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_len, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3182 | 7 | s_len = tvb_get_uint8(tvb, offset+1); |
3183 | 7 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id, tvb, offset+2, s_len, ENC_ASCII); |
3184 | | |
3185 | 7 | if (length > s_len+2) { /* Second DSS_ID*/ |
3186 | | |
3187 | 3 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_option, tvb, offset+2+s_len, 1, ENC_BIG_ENDIAN); |
3188 | 3 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id_len, tvb, offset+1+2+s_len, 1, ENC_BIG_ENDIAN); |
3189 | 3 | s_len = tvb_get_uint8(tvb, offset+1+2+s_len); |
3190 | 3 | proto_tree_add_item(tree, hf_dhcp_option_cl_dss_id, tvb, offset+2+2+s_len, s_len, ENC_ASCII); |
3191 | 3 | } |
3192 | 7 | } else { |
3193 | 1 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Invalid length of DHCP option!"); |
3194 | 1 | } |
3195 | | |
3196 | 56 | return tvb_captured_length(tvb); |
3197 | 56 | } |
3198 | | |
3199 | | static int |
3200 | | dissect_dhcpopt_vi_vendor_class(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3201 | 50 | { |
3202 | 50 | int offset = 0; |
3203 | 50 | uint32_t enterprise = 0; |
3204 | 50 | uint32_t option_data_len = 0; |
3205 | 50 | int data_len = 0; |
3206 | 50 | int s_end; |
3207 | 50 | proto_item *eti, *expert_ti; |
3208 | 50 | proto_tree *e_tree; |
3209 | 50 | proto_tree *vcdi_tree; |
3210 | | |
3211 | 50 | if (tvb_reported_length(tvb) == 1) { |
3212 | | /* CableLab specific */ |
3213 | 4 | proto_tree_add_item(tree, hf_dhcp_option_vi_class_cl_address_mode, tvb, 0, 1, ENC_BIG_ENDIAN); |
3214 | 4 | return 1; |
3215 | 4 | } |
3216 | | |
3217 | 953 | while (tvb_reported_length_remaining(tvb, offset) >= 5) { |
3218 | | |
3219 | 907 | eti = proto_tree_add_item_ret_uint(tree, hf_dhcp_option_vi_class_enterprise, tvb, offset, 4, ENC_BIG_ENDIAN, &enterprise); |
3220 | 907 | e_tree = proto_item_add_subtree(eti, ett_dhcp_option); |
3221 | 907 | offset += 4; |
3222 | 907 | proto_tree_add_item_ret_uint(e_tree, hf_dhcp_option_vi_class_data_length, tvb, offset, 1, ENC_BIG_ENDIAN, &option_data_len); |
3223 | 907 | offset += 1; |
3224 | | |
3225 | 907 | s_end = offset + option_data_len; |
3226 | 907 | if ( tvb_reported_length_remaining(tvb, s_end) < 0) { |
3227 | 0 | break; |
3228 | 0 | } |
3229 | | |
3230 | 1.68k | while (offset < s_end) { |
3231 | 948 | tvbuff_t *enterprise_tvb = tvb_new_subset_length(tvb, offset, option_data_len); |
3232 | | /* XXX - Do we really want to try the dissector table for *each* |
3233 | | * vendor-class-data for the same enterprise? This tvb is too long on |
3234 | | * subsequent iterations. Only giving the table dissector one attempt |
3235 | | * (and skipping past bytes it doesn't dissect to s_end) might be simpler. |
3236 | | */ |
3237 | 948 | int bytes_dissected = dissector_try_uint(dhcp_enterprise_class_table, enterprise, enterprise_tvb, pinfo, e_tree); |
3238 | 948 | if (bytes_dissected == 0) { |
3239 | 948 | 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"); |
3240 | | /* According to RFC 3925, *each* vendor-class-data instance has |
3241 | | * its own length, but in practice some vendors have only included |
3242 | | * the overall per-enterprise option length. See the dhcwg m-l: |
3243 | | * https://mailarchive.ietf.org/arch/msg/dhcwg/B4fNsvUR0EHxcrKDsKCf7lBrc3s/ |
3244 | | */ |
3245 | 948 | data_len = tvb_get_uint8(tvb, offset); |
3246 | 948 | if (offset + data_len >= s_end) { |
3247 | 168 | expert_ti = proto_tree_add_item(vcdi_tree, hf_dhcp_option_vi_class_data_item_data, tvb, offset, s_end - offset, ENC_NA); |
3248 | 168 | expert_add_info(pinfo, expert_ti, &ei_dhcp_nonstd_option_data); |
3249 | 168 | offset = s_end; |
3250 | 168 | break; |
3251 | 168 | } |
3252 | 780 | proto_tree_add_item(vcdi_tree, hf_dhcp_option_vi_class_data_item_length, tvb, offset, 1, ENC_NA); |
3253 | 780 | offset += 1; |
3254 | 780 | proto_tree_add_item(vcdi_tree, hf_dhcp_option_vi_class_data_item_data, tvb, offset, data_len, ENC_NA); |
3255 | | |
3256 | | /* look for next vendor-class-data-item */ |
3257 | 780 | offset += data_len; |
3258 | 780 | } else { |
3259 | 0 | offset += bytes_dissected; |
3260 | 0 | } |
3261 | 948 | } |
3262 | | |
3263 | | /* loop for the next Enterprise number */ |
3264 | 907 | } |
3265 | | |
3266 | 46 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
3267 | 11 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length < 5"); |
3268 | 11 | } |
3269 | | |
3270 | 46 | return tvb_captured_length(tvb); |
3271 | 50 | } |
3272 | | |
3273 | | static int |
3274 | | dissect_dhcpopt_forcerenew_nonce(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
3275 | 39 | { |
3276 | 39 | int offset = 0; |
3277 | 1.63k | while ( tvb_reported_length_remaining(tvb, offset) > 0) { |
3278 | 1.59k | proto_tree_add_item(tree, hf_dhcp_option_forcerenew_nonce_algo, tvb, offset, 1, ENC_BIG_ENDIAN); |
3279 | 1.59k | offset += 1; |
3280 | 1.59k | } |
3281 | | |
3282 | 39 | return tvb_captured_length(tvb); |
3283 | 39 | } |
3284 | | |
3285 | | static int |
3286 | | dissect_dhcpopt_rdnss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3287 | 12 | { |
3288 | 12 | int offset = 0; |
3289 | 12 | const char *dns_name; |
3290 | 12 | int dns_name_len; |
3291 | | |
3292 | 12 | if (tvb_reported_length(tvb) < 10) { |
3293 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be >= 10"); |
3294 | 10 | return 1; |
3295 | 10 | } |
3296 | 2 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); |
3297 | 2 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_pref, tvb, offset, 1, ENC_BIG_ENDIAN); |
3298 | 2 | offset += 1; |
3299 | 2 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_prim_dns_server, tvb, offset, 4, ENC_BIG_ENDIAN); |
3300 | 2 | offset += 4; |
3301 | 2 | proto_tree_add_item(tree, hf_dhcp_option_rdnss_sec_dns_server, tvb, offset, 4, ENC_BIG_ENDIAN); |
3302 | 2 | offset += 4; |
3303 | | |
3304 | 2 | get_dns_name(pinfo->pool, tvb, offset, tvb_reported_length_remaining(tvb,offset), offset, &dns_name, &dns_name_len); |
3305 | 2 | proto_tree_add_string(tree, hf_dhcp_option_rdnss_domain, tvb, offset, |
3306 | 2 | tvb_reported_length_remaining(tvb,offset), format_text(pinfo->pool, dns_name, dns_name_len)); |
3307 | | |
3308 | 2 | return tvb_captured_length(tvb); |
3309 | 12 | } |
3310 | | |
3311 | | static int |
3312 | | dissect_dhcpopt_dhcp_captive_portal(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
3313 | 20 | { |
3314 | 20 | proto_item *ti_cp; |
3315 | 20 | ti_cp = proto_tree_add_item(tree, hf_dhcp_option_captive_portal, tvb, 0, tvb_reported_length(tvb), ENC_ASCII); |
3316 | 20 | proto_item_set_url(ti_cp); |
3317 | | |
3318 | 20 | return tvb_captured_length(tvb); |
3319 | 20 | } |
3320 | | |
3321 | | static int |
3322 | | dissect_dhcpopt_dnr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3323 | 724 | { |
3324 | 724 | int offset = 0; |
3325 | 724 | int offset_end = tvb_captured_length(tvb); |
3326 | 724 | int instance_id = 0; |
3327 | 724 | uint32_t instance_offset = 0; |
3328 | 724 | uint32_t instance_len; |
3329 | 724 | uint32_t adn_len; |
3330 | 724 | int adn_parsed_len; |
3331 | 724 | const char *adn; |
3332 | 724 | uint32_t addrs_len; |
3333 | 724 | proto_item *dnr_instance_ti; |
3334 | 724 | proto_tree *dnr_instance_tree; |
3335 | 724 | proto_item *dnr_instance_addrs_ti; |
3336 | 724 | proto_tree *dnr_instance_addrs_tree; |
3337 | 724 | tvbuff_t *next_tvb; |
3338 | | |
3339 | 724 | if (offset + 2 >= offset_end) { |
3340 | 9 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "DNR: truncated option (no DNR instance present)"); |
3341 | 9 | return offset_end; |
3342 | 9 | } |
3343 | | |
3344 | 2.25k | while (offset + 2 <= offset_end) { |
3345 | | // Handling a single DNR Instance |
3346 | 1.73k | instance_id++; |
3347 | | |
3348 | 1.73k | dnr_instance_ti = proto_tree_add_item(tree, hf_dhcp_dnr_instance, tvb, offset, -1, ENC_NA); |
3349 | 1.73k | dnr_instance_tree = proto_item_add_subtree(dnr_instance_ti, ett_dhcp_dnr_instance); |
3350 | | |
3351 | 1.73k | proto_tree_add_item_ret_uint(dnr_instance_tree, hf_dhcp_dnr_instance_len, tvb, offset, 2, ENC_BIG_ENDIAN, &instance_len); |
3352 | 1.73k | offset += 2; |
3353 | 1.73k | instance_offset = 0; |
3354 | | |
3355 | 1.73k | if (instance_len < 3) { |
3356 | 72 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: truncated option (instance length %d too short)", instance_len); |
3357 | 72 | break; |
3358 | 72 | } |
3359 | | |
3360 | 1.66k | if (offset + (int)instance_len > offset_end) { |
3361 | 75 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: truncated option (instance length %d larger than option)", instance_len); |
3362 | 75 | break; |
3363 | 75 | } |
3364 | | |
3365 | 1.59k | proto_item_append_text(dnr_instance_ti, " %d", instance_id); |
3366 | 1.59k | proto_item_set_len(dnr_instance_ti, (int)instance_len + 2); |
3367 | | |
3368 | 1.59k | proto_tree_add_item(dnr_instance_tree, hf_dhcp_dnr_svcpriority, tvb, offset + instance_offset, 2, ENC_BIG_ENDIAN); |
3369 | 1.59k | instance_offset += 2; |
3370 | | |
3371 | 1.59k | 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); |
3372 | 1.59k | instance_offset++; |
3373 | | |
3374 | 1.59k | if (instance_offset + adn_len > instance_len) { |
3375 | 15 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: truncated option (adn_len %d larger than option)", adn_len); |
3376 | 15 | break; |
3377 | 15 | } |
3378 | | |
3379 | 1.57k | get_dns_name(pinfo->pool, tvb, offset + instance_offset, adn_len, |
3380 | 1.57k | offset + instance_offset, &adn, &adn_parsed_len); |
3381 | 1.57k | proto_tree_add_string(dnr_instance_tree, hf_dhcp_dnr_auth_domain_name, tvb, offset + instance_offset, |
3382 | 1.57k | adn_len, format_text(pinfo->pool, adn, adn_parsed_len)); |
3383 | | |
3384 | 1.57k | instance_offset += adn_len; |
3385 | | |
3386 | 1.57k | if (instance_offset == instance_len) { |
3387 | | // A DNR instance with only a service priority and authentication-domain-name (ADN) is in ADN-only mode, |
3388 | | // see RFC9463, Section 3.1.6. |
3389 | 85 | proto_tree_add_expert(dnr_instance_tree, pinfo, &ei_dhcp_option_dnr_adn_only_mode, tvb, offset, instance_len); |
3390 | | |
3391 | 85 | offset += instance_len; |
3392 | 85 | continue; |
3393 | 85 | } |
3394 | | |
3395 | 1.49k | proto_tree_add_item_ret_uint(dnr_instance_tree, hf_dhcp_dnr_addrs_len, tvb, offset + instance_offset, 1, ENC_BIG_ENDIAN, &addrs_len); |
3396 | 1.49k | instance_offset++; |
3397 | | |
3398 | 1.49k | if (addrs_len == 0 || addrs_len % 4 != 0) { |
3399 | 37 | expert_add_info_format(pinfo, dnr_instance_tree, &ei_dhcp_bad_length, "DNR: invalid addrs_len %d (not divisible by 4)", addrs_len); |
3400 | 37 | break; |
3401 | 37 | } |
3402 | | |
3403 | 1.45k | dnr_instance_addrs_ti = proto_tree_add_item(dnr_instance_tree, hf_dhcp_dnr_addrs, tvb, offset + instance_offset, addrs_len, ENC_NA); |
3404 | 1.45k | dnr_instance_addrs_tree = proto_item_add_subtree(dnr_instance_addrs_ti, ett_dhcp_dnr_instance_addrs); |
3405 | | |
3406 | 1.45k | proto_item_append_text(dnr_instance_addrs_ti, ":"); |
3407 | | |
3408 | 9.08k | for (uint32_t i = 0; i < addrs_len; i += 4) { |
3409 | 7.63k | proto_tree_add_item(dnr_instance_addrs_tree, hf_dhcp_dnr_addrs_ip, tvb, offset + instance_offset + i, 4, ENC_BIG_ENDIAN); |
3410 | 7.63k | proto_item_append_text(dnr_instance_addrs_ti, "%c%s", (i == 0 ? ' ' : ','), tvb_ip_to_str(pinfo->pool, tvb, offset + instance_offset + i)); |
3411 | 7.63k | } |
3412 | | |
3413 | 1.45k | instance_offset += addrs_len; |
3414 | | |
3415 | | // Parse the service parameters |
3416 | 1.45k | next_tvb = tvb_new_subset_length(tvb, offset + instance_offset, instance_len - instance_offset); |
3417 | 1.45k | call_dissector(svc_params_handle, next_tvb, pinfo, dnr_instance_tree); |
3418 | | |
3419 | 1.45k | offset += instance_len; |
3420 | 1.45k | } |
3421 | | |
3422 | 715 | return offset_end; |
3423 | 724 | } |
3424 | | |
3425 | | static int |
3426 | | dissect_dhcpopt_bulk_lease_query_start(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3427 | 37 | { |
3428 | 37 | if (tvb_reported_length(tvb) != 4) { |
3429 | 23 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3430 | 23 | return 1; |
3431 | 23 | } |
3432 | 14 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_query_start, tvb, 0, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN); |
3433 | | |
3434 | 14 | return tvb_captured_length(tvb); |
3435 | 37 | } |
3436 | | |
3437 | | static int |
3438 | | dissect_dhcpopt_bulk_lease_query_end(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) |
3439 | 11 | { |
3440 | 11 | if (tvb_reported_length(tvb) != 4) { |
3441 | 10 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3442 | 10 | return 1; |
3443 | 10 | } |
3444 | 1 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_query_end, tvb, 0, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN); |
3445 | | |
3446 | 1 | return tvb_captured_length(tvb); |
3447 | 11 | } |
3448 | | |
3449 | | static int |
3450 | | dissect_dhcpopt_bulk_lease_base_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3451 | 16 | { |
3452 | 16 | if (tvb_reported_length(tvb) != 4) { |
3453 | 13 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3454 | 13 | return 1; |
3455 | 13 | } |
3456 | 3 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_base_time, tvb, 0, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN); |
3457 | | |
3458 | 3 | return tvb_captured_length(tvb); |
3459 | 16 | } |
3460 | | |
3461 | | static int |
3462 | | dissect_dhcpopt_bulk_lease_status_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3463 | 45 | { |
3464 | 45 | if (tvb_reported_length(tvb) < 1) { |
3465 | 22 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must >= 1"); |
3466 | 22 | return 1; |
3467 | 22 | } |
3468 | 23 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_status_code, tvb, 0, 1, ENC_BIG_ENDIAN); |
3469 | 23 | if ( tvb_reported_length_remaining(tvb, 1) > 0) { |
3470 | 14 | proto_tree_add_item(tree, hf_dhcp_option_bulk_lease_status_message, tvb, 1, tvb_reported_length_remaining(tvb, 1), ENC_UTF_8); |
3471 | 14 | } |
3472 | | |
3473 | 23 | return tvb_captured_length(tvb); |
3474 | 45 | } |
3475 | | |
3476 | | static int |
3477 | | dissect_dhcpopt_pcp_server(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3478 | 36 | { |
3479 | 36 | proto_tree *tree_pcp; |
3480 | 36 | int offset = 0; |
3481 | 36 | uint8_t list_length; |
3482 | 36 | uint8_t ip_list_length; |
3483 | 36 | proto_item *ti_pcp; |
3484 | | |
3485 | 36 | if (tvb_reported_length(tvb) < 5) { |
3486 | 11 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must >= 5"); |
3487 | 11 | return 1; |
3488 | 11 | } |
3489 | 1.11k | while (tvb_reported_length_remaining(tvb, offset) >= 5) { |
3490 | 1.09k | ip_list_length = 0; |
3491 | 1.09k | list_length = tvb_get_uint8(tvb, offset); |
3492 | 1.09k | tree_pcp = proto_tree_add_subtree(tree, tvb, offset, list_length, ett_dhcp_option158_pcp_list, |
3493 | 1.09k | &ti_pcp, "PCP server list"); |
3494 | 1.09k | proto_tree_add_item(tree_pcp, hf_dhcp_option_pcp_list_length, tvb, offset, 1, ENC_NA); |
3495 | 1.09k | offset += 1; |
3496 | 1.09k | ip_list_length += 1; |
3497 | 1.62k | while (((list_length - 1)%4 == 0) && (ip_list_length < list_length) && tvb_reported_length_remaining(tvb,offset) >= 4) { |
3498 | 529 | proto_tree_add_item(tree_pcp, hf_dhcp_option_pcp_server, tvb, offset, 4, ENC_BIG_ENDIAN); |
3499 | 529 | offset += 4; |
3500 | 529 | ip_list_length += 4; |
3501 | 529 | } |
3502 | 1.09k | } |
3503 | | |
3504 | 25 | return tvb_captured_length(tvb); |
3505 | 36 | } |
3506 | | |
3507 | | static int |
3508 | | dissect_dhcpopt_portparams(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3509 | 30 | { |
3510 | 30 | if (tvb_reported_length(tvb) != 4) { |
3511 | 28 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be 4"); |
3512 | 28 | return 1; |
3513 | 28 | } |
3514 | 2 | proto_tree_add_item(tree, hf_dhcp_option_portparams_offset, tvb, 0, 1, ENC_NA); |
3515 | 2 | proto_tree_add_item(tree, hf_dhcp_option_portparams_psid_length, tvb, 1, 1, ENC_NA); |
3516 | 2 | proto_tree_add_item(tree, hf_dhcp_option_portparams_psid, tvb, 2, 2, ENC_NA); |
3517 | | |
3518 | 2 | return tvb_captured_length(tvb); |
3519 | 30 | } |
3520 | | |
3521 | | static int |
3522 | | dissect_dhcpopt_6RD_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3523 | 29 | { |
3524 | 29 | int offset = 0; |
3525 | | |
3526 | 29 | if (tvb_reported_length(tvb) < 22) { |
3527 | 9 | expert_add_info(pinfo, tree, &ei_dhcp_option_6RD_malformed); |
3528 | 9 | return 1; |
3529 | 9 | } |
3530 | | |
3531 | 20 | proto_tree_add_item(tree, hf_dhcp_option_6RD_ipv4_mask_len, tvb, offset, 1, ENC_BIG_ENDIAN); |
3532 | 20 | proto_tree_add_item(tree, hf_dhcp_option_6RD_prefix_len, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
3533 | 20 | proto_tree_add_item(tree, hf_dhcp_option_6RD_prefix, tvb, offset+2, 16, ENC_NA); |
3534 | 20 | proto_tree_add_item(tree, hf_dhcp_option_6RD_border_relay_ip, tvb, offset+18, 4, ENC_BIG_ENDIAN); |
3535 | | |
3536 | | /* More Border Relay IPv4 addresses included */ |
3537 | 20 | if (tvb_reported_length(tvb) > 22) { |
3538 | 19 | offset += 22; |
3539 | 648 | while (tvb_reported_length_remaining(tvb, offset) >= 4) { |
3540 | 629 | proto_tree_add_item(tree, hf_dhcp_option_6RD_border_relay_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
3541 | 629 | offset += 4; |
3542 | 629 | } |
3543 | 19 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
3544 | 13 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Option length isn't a multiple of 4"); |
3545 | 13 | } |
3546 | 19 | } |
3547 | | |
3548 | 20 | return tvb_captured_length(tvb); |
3549 | 29 | } |
3550 | | |
3551 | | static int |
3552 | | dissect_dhcpopt_avaya_ip_telephone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3553 | 865 | { |
3554 | 865 | int offset = 0; |
3555 | 865 | proto_tree *o242avaya_v_tree; |
3556 | 865 | proto_item *avaya_ti; |
3557 | 865 | const char *avaya_option = NULL; |
3558 | 865 | wmem_strbuf_t *avaya_param_buf = NULL; |
3559 | | |
3560 | | /* minimum length is 5 bytes */ |
3561 | 865 | if (tvb_reported_length(tvb) < 5) { |
3562 | 7 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "Avaya IP Telephone option length isn't >= 5"); |
3563 | 7 | return 1; |
3564 | 7 | } |
3565 | 858 | 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); |
3566 | 858 | o242avaya_v_tree = proto_item_add_subtree(avaya_ti, ett_dhcp_option242_suboption); |
3567 | 858 | avaya_param_buf = wmem_strbuf_new(pinfo->pool, ""); |
3568 | 858 | char **fields = wmem_strsplit(pinfo->pool, avaya_option, ",", -1); |
3569 | 15.5k | for (int i = 0; fields[i]; i++) { |
3570 | 14.7k | const char *field = fields[i]; |
3571 | 14.7k | if (!strchr(field, '=')) { |
3572 | 2.78k | if (wmem_strbuf_get_len(avaya_param_buf) == 0) { |
3573 | 15 | expert_add_info_format(pinfo, avaya_ti, &ei_dhcp_subopt_unknown_type, "ERROR, Unknown parameter %s", field); |
3574 | 15 | offset += (int)strlen(field); |
3575 | 15 | break; |
3576 | 15 | } |
3577 | 2.76k | wmem_strbuf_append_printf(avaya_param_buf,",%s", field); |
3578 | 2.76k | } |
3579 | 11.9k | else { |
3580 | 11.9k | if (wmem_strbuf_get_len(avaya_param_buf) > 0) { |
3581 | 11.1k | dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, avaya_ti, tvb, offset, avaya_param_buf); |
3582 | 11.1k | offset += (int)wmem_strbuf_get_len(avaya_param_buf) + 1; |
3583 | 11.1k | wmem_strbuf_truncate(avaya_param_buf, 0); |
3584 | 11.1k | } |
3585 | 11.9k | wmem_strbuf_append(avaya_param_buf, field); |
3586 | 11.9k | } |
3587 | 14.7k | } |
3588 | 858 | if (wmem_strbuf_get_len(avaya_param_buf) > 0) { |
3589 | 728 | dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, avaya_ti, tvb, offset, avaya_param_buf); |
3590 | 728 | } |
3591 | | |
3592 | 858 | return tvb_captured_length(tvb); |
3593 | 865 | } |
3594 | | |
3595 | | static const value_string option82_suboption_vals[] = { |
3596 | | { 0, "Padding" }, |
3597 | | { 1, "Agent Circuit ID" }, |
3598 | | { 2, "Agent Remote ID" }, |
3599 | | { 3, "Reserved" }, |
3600 | | { 4, "DOCSIS Device Class" }, |
3601 | | { 5, "Link selection" }, |
3602 | | { 6, "Subscriber ID" }, |
3603 | | { 7, "RADIUS Attributes" }, |
3604 | | { 8, "Authentication" }, |
3605 | | { 9, "Vendor-Specific Information" }, |
3606 | | { 10, "Flags" }, |
3607 | | { 11, "Server ID Override" }, |
3608 | | { 12, "Relay Agent Identifier" }, |
3609 | | { 13, "Access Technology Type" }, |
3610 | | { 14, "Access Network Name" }, |
3611 | | { 15, "Access Point Name" }, |
3612 | | { 16, "Access Point BSSID" }, |
3613 | | { 17, "Access Network Operator ID" }, |
3614 | | { 18, "Access Network Operator Realm" }, |
3615 | | { 19, "Source Port" }, |
3616 | | { 150, "Link selection (Cisco proprietary)" }, |
3617 | | { 151, "VRF name/VPN ID" }, |
3618 | | { 152, "Server ID Override (Cisco proprietary)" }, |
3619 | | { 0, NULL } |
3620 | | }; |
3621 | | |
3622 | 135k | #define CL_AI_OPTION_DOCSIS_VERSION 1 /* 82:9:4491:1 */ |
3623 | 549 | #define CL_AI_OPTION_DPOE_SYSTEM_VERSION 2 /* 82:9:4491:2 */ |
3624 | 1.70k | #define CL_AI_OPTION_DPOE_SYSTEM_DHCPV4_PBB_SERVICE 4 /* 82:9:4491:4 */ |
3625 | 648 | #define CL_AI_OPTION_CMTS_CM_SERVICE_CLASS 5 /* 82:9:4491:5 */ |
3626 | 723 | #define CL_AI_OPTION_CMTS_MSO_DEFINED_TEXT 6 /* 82:9:4491:6 */ |
3627 | 421 | #define CL_AI_OPTION_SECURE_FILE_TRANSFER_URI 7 /* 82:9:4491:7 */ |
3628 | | |
3629 | | static const value_string option82_cl_tag_vals[] = { |
3630 | | { CL_AI_OPTION_DOCSIS_VERSION, "CMTS DOCSIS version number" }, |
3631 | | { CL_AI_OPTION_DPOE_SYSTEM_VERSION, "DPOE System version number" }, |
3632 | | { CL_AI_OPTION_DPOE_SYSTEM_DHCPV4_PBB_SERVICE, "DPOE System DHCPv4 PBB service option" }, |
3633 | | { CL_AI_OPTION_CMTS_CM_SERVICE_CLASS, "Service Class or QoS Profile Name" }, |
3634 | | { CL_AI_OPTION_CMTS_MSO_DEFINED_TEXT, "MSO Defined Text" }, |
3635 | | { CL_AI_OPTION_SECURE_FILE_TRANSFER_URI, "Secure File Transfer URI" }, |
3636 | | { 0, NULL } |
3637 | | }; |
3638 | | |
3639 | | static int |
3640 | | dhcp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, |
3641 | | int optend) |
3642 | 15.2k | { |
3643 | 15.2k | int suboptoff = optoff; |
3644 | 15.2k | uint8_t subopt, vs_opt, vs_len; |
3645 | 15.2k | size_t idx; |
3646 | 15.2k | int subopt_len, subopt_end, datalen; |
3647 | 15.2k | uint32_t enterprise; |
3648 | 15.2k | proto_item *vti, *ti; |
3649 | 15.2k | proto_tree *o82_v_tree, *o82_sub_tree; |
3650 | 15.2k | int clsuboptoff, clsubopt_end; |
3651 | | |
3652 | 15.2k | static const struct basic_types_hfs default_hfs = { |
3653 | 15.2k | &hf_dhcp_option82_value, |
3654 | 15.2k | &hf_dhcp_option82_value_ip_address, |
3655 | 15.2k | &hf_dhcp_option82_value_ip_address, |
3656 | 15.2k | &hf_dhcp_option82_value_stringz, |
3657 | 15.2k | NULL, |
3658 | 15.2k | &hf_dhcp_option82_value_8, |
3659 | 15.2k | &hf_dhcp_option82_value_16, |
3660 | 15.2k | NULL, |
3661 | 15.2k | &hf_dhcp_option82_value_32, |
3662 | 15.2k | NULL, |
3663 | 15.2k | NULL |
3664 | 15.2k | }; |
3665 | | |
3666 | 15.2k | struct opt82_info { |
3667 | 15.2k | int id; |
3668 | 15.2k | struct opt_info info; |
3669 | 15.2k | }; |
3670 | 15.2k | static const struct opt82_info o82_opt[]= { |
3671 | 15.2k | {0, {"nop", bytes, &hf_dhcp_option82_padding}}, /* dummy */ |
3672 | 15.2k | {1, {"Agent Circuit ID", bytes, &hf_dhcp_option82_agent_circuit_id}}, /* [RFC3046] */ |
3673 | 15.2k | {2, {"Agent Remote ID", bytes, &hf_dhcp_option82_agent_remote_id}}, /* [RFC3046] */ |
3674 | 15.2k | {3, {"Reserved", bytes, &hf_dhcp_option82_reserved}}, |
3675 | 15.2k | {4, {"DOCSIS Device Class", val_u_long, &hf_dhcp_option82_docsis_device_class}}, /* [RFC3256] */ |
3676 | 15.2k | {5, {"Link selection", ipv4, &hf_dhcp_option82_link_selection}}, /* [RFC3527] */ |
3677 | 15.2k | {6, {"Subscriber ID", string, &hf_dhcp_option82_subscriber_id}}, /* [RFC3993] */ /***** CHECK STRING TYPE */ |
3678 | 15.2k | {7, {"RADIUS Attributes", bytes, &hf_dhcp_option82_radius_attributes}}, /* [RFC4014] */ |
3679 | 15.2k | {8, {"Authentication", bytes, &hf_dhcp_option82_authentication}}, /* [RFC4030] */ |
3680 | 15.2k | {9, {"Vendor-Specific Information", special, &hf_dhcp_option82_vi}}, /* [RFC 4243] */ |
3681 | 15.2k | {10, {"Flags", val_u_byte, &hf_dhcp_option82_flags}}, /* [RFC5010] */ |
3682 | 15.2k | {11, {"Server ID Override", ipv4, &hf_dhcp_option82_server_id_override}}, /* [RFC 5107] */ |
3683 | 15.2k | {12, {"Relay Agent Identifier", bytes, &hf_dhcp_option82_relay_agent_id}}, /* [RFC 6925] */ |
3684 | 15.2k | {13, {"Access Technology Type", bytes, &hf_dhcp_option82_option_ani_att}}, /* [RFC7839] */ |
3685 | 15.2k | {14, {"Access Network Name", string, &hf_dhcp_option82_option_ani_network_name}}, /* [RFC7839] */ |
3686 | 15.2k | {15, {"Access Point Name", string, &hf_dhcp_option82_option_ani_ap_name}}, /* [RFC7839] */ |
3687 | 15.2k | {16, {"Access Point BSSID", special, &hf_dhcp_option82_option_ani_ap_bssid}}, /* [RFC7839] */ |
3688 | 15.2k | {17, {"Access Network Operator ID", bytes, &hf_dhcp_option82_option_ani_operator_id}}, /* [RFC7839] */ |
3689 | 15.2k | {18, {"Access Network Operator Realm", string, &hf_dhcp_option82_option_ani_operator_realm}}, /* [RFC7839] */ |
3690 | 15.2k | {19, {"Source Port", presence, &hf_dhcp_option82_option_source_port}}, /* [RFC8357] */ |
3691 | 15.2k | {150, {"Link selection (Cisco proprietary)", ipv4, &hf_dhcp_option82_link_selection_cisco}}, /* [RFC3527] */ |
3692 | 15.2k | {151, {"VRF name/VPN ID", special, &hf_dhcp_option82_vrf_name_vpn_id}}, /* [RFC2685] */ |
3693 | 15.2k | {152, {"Server ID Override (Cisco proprietary)", ipv4, &hf_dhcp_option82_server_id_override_cisco}} /* [RFC 5107] */ |
3694 | 15.2k | }; |
3695 | | |
3696 | 15.2k | subopt = tvb_get_uint8(tvb, optoff); |
3697 | 15.2k | suboptoff++; |
3698 | | |
3699 | 15.2k | if (suboptoff >= optend) { |
3700 | 21 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
3701 | 21 | "Suboption %d: no room left in option for suboption length", subopt); |
3702 | 21 | return (optend); |
3703 | 21 | } |
3704 | | |
3705 | 15.2k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
3706 | 15.2k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option82_suboption, |
3707 | 15.2k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str_const(subopt, option82_suboption_vals, "Unknown")); |
3708 | | |
3709 | 15.2k | o82_v_tree = proto_item_add_subtree(vti, ett_dhcp_option82_suboption); |
3710 | 15.2k | proto_tree_add_item(o82_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
3711 | 15.2k | suboptoff++; |
3712 | | |
3713 | 15.2k | subopt_end = suboptoff+subopt_len; |
3714 | 15.2k | if (subopt_end > optend) { |
3715 | 171 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
3716 | 171 | "Suboption %d: no room left in option for suboption value", subopt); |
3717 | 171 | return (optend); |
3718 | 171 | } |
3719 | | |
3720 | 150k | for (idx = 0; idx < array_length(o82_opt); idx++) { |
3721 | 148k | if (o82_opt[idx].id == subopt) { |
3722 | 12.5k | break; |
3723 | 12.5k | } |
3724 | 148k | } |
3725 | | |
3726 | 15.0k | ti = proto_tree_add_item(o82_v_tree, hf_dhcp_option82_value, tvb, suboptoff, subopt_len, ENC_NA); |
3727 | | |
3728 | 15.0k | if ( (idx >= 1 ) && (idx < array_length(o82_opt)) ) { |
3729 | 8.03k | proto_item_set_hidden(ti); |
3730 | 8.03k | if (o82_opt[idx].info.ftype == special) { |
3731 | 2.76k | switch(subopt) |
3732 | 2.76k | { |
3733 | 2.14k | case 9: |
3734 | 4.03k | while (suboptoff < subopt_end) { |
3735 | 1.93k | enterprise = tvb_get_ntohl(tvb, suboptoff); |
3736 | 1.93k | vti = proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vi_enterprise, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
3737 | 1.93k | suboptoff += 4; |
3738 | | |
3739 | 1.93k | o82_sub_tree = proto_item_add_subtree(vti, ett_dhcp_option82_suboption9); |
3740 | 1.93k | datalen = tvb_get_uint8(tvb, suboptoff); |
3741 | 1.93k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_data_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
3742 | 1.93k | suboptoff++; |
3743 | | |
3744 | 1.93k | switch (enterprise) { |
3745 | 1.40k | case VENDOR_CABLELABS: /* CableLabs */ |
3746 | | /* Compare CL-SP-CANN-DHCP-Reg-I06-110210 (2011) and |
3747 | | * CL-SP-CANN-DHCP-Reg-I13-160317 (2016) */ |
3748 | 1.40k | clsuboptoff = suboptoff; |
3749 | 1.40k | clsubopt_end = clsuboptoff + datalen; |
3750 | 67.7k | while (clsuboptoff < clsubopt_end) { |
3751 | 66.4k | vs_opt = tvb_get_uint8(tvb, clsuboptoff); |
3752 | 66.4k | vs_len = tvb_get_uint8(tvb, clsuboptoff+1); |
3753 | 66.4k | if (vs_opt == CL_AI_OPTION_DOCSIS_VERSION && |
3754 | 2.72k | vs_len == 4) { |
3755 | | |
3756 | | /* Superseded version with a redundant option code and option-length */ |
3757 | 330 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_option, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3758 | 330 | clsuboptoff++; |
3759 | 330 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_option_length, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3760 | 330 | clsuboptoff++; |
3761 | | |
3762 | 330 | vs_opt = tvb_get_uint8(tvb, clsuboptoff); |
3763 | 330 | vs_len = tvb_get_uint8(tvb, clsuboptoff+1); |
3764 | 330 | } |
3765 | 66.4k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_tag, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3766 | 66.4k | clsuboptoff++; |
3767 | 66.4k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_tag_length, tvb, clsuboptoff, 1, ENC_BIG_ENDIAN); |
3768 | 66.4k | clsuboptoff++; |
3769 | 66.4k | switch (vs_opt) { |
3770 | 2.51k | case CL_AI_OPTION_DOCSIS_VERSION: |
3771 | 2.51k | proto_tree_add_uint_format_value(o82_sub_tree, hf_dhcp_option82_vi_cl_docsis_version, |
3772 | 2.51k | tvb, clsuboptoff, 2, 0, "%d.%d", |
3773 | 2.51k | tvb_get_uint8(tvb, clsuboptoff), tvb_get_uint8(tvb, clsuboptoff+1)); |
3774 | 2.51k | clsuboptoff+=2; |
3775 | 2.51k | break; |
3776 | 549 | case CL_AI_OPTION_DPOE_SYSTEM_VERSION: |
3777 | 549 | proto_tree_add_uint_format_value(o82_sub_tree, hf_dhcp_option82_vi_cl_dpoe_system_version, |
3778 | 549 | tvb, clsuboptoff, 2, 0, "%d.%d", |
3779 | 549 | tvb_get_uint8(tvb, clsuboptoff), tvb_get_uint8(tvb, clsuboptoff+1)); |
3780 | 549 | clsuboptoff+=2; |
3781 | 549 | break; |
3782 | 1.70k | case CL_AI_OPTION_DPOE_SYSTEM_DHCPV4_PBB_SERVICE: |
3783 | 1.70k | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_dpoe_system_pbb_service, tvb, clsuboptoff, vs_len, ENC_NA); |
3784 | 1.70k | break; |
3785 | 648 | case CL_AI_OPTION_CMTS_CM_SERVICE_CLASS: |
3786 | 648 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_service_class_name, tvb, clsuboptoff, vs_len, ENC_ASCII); |
3787 | 648 | clsuboptoff += vs_len; |
3788 | 648 | break; |
3789 | 723 | case CL_AI_OPTION_CMTS_MSO_DEFINED_TEXT: |
3790 | 723 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_mso_defined_text, tvb, clsuboptoff, vs_len, ENC_ASCII); |
3791 | 723 | clsuboptoff += vs_len; |
3792 | 723 | break; |
3793 | 421 | case CL_AI_OPTION_SECURE_FILE_TRANSFER_URI: |
3794 | 421 | proto_tree_add_item(o82_sub_tree, hf_dhcp_option82_vi_cl_secure_file_transfer_uri, tvb, clsuboptoff, vs_len, ENC_ASCII); |
3795 | 421 | clsuboptoff += vs_len; |
3796 | 421 | break; |
3797 | 59.8k | default: |
3798 | 59.8k | expert_add_info_format(pinfo, vti, &ei_dhcp_option82_vi_cl_tag_unknown, "Unknown tag %d (%d bytes)", vs_opt, vs_len); |
3799 | 59.8k | clsuboptoff += vs_len; |
3800 | 59.8k | break; |
3801 | 66.4k | } |
3802 | 66.4k | } |
3803 | 1.38k | suboptoff = clsuboptoff; |
3804 | 1.38k | break; |
3805 | 532 | default: |
3806 | 532 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_value, tvb, suboptoff, datalen, ENC_NA); |
3807 | 532 | suboptoff += datalen; |
3808 | 532 | break; |
3809 | 1.93k | } |
3810 | 1.93k | } |
3811 | 2.09k | break; |
3812 | 2.09k | case 13: /* Access Technology Type */ |
3813 | 0 | if (subopt_len != 2) { |
3814 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 2"); |
3815 | 0 | break; |
3816 | 0 | } |
3817 | 0 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_option_ani_att_res, tvb, suboptoff, 1, ENC_NA); |
3818 | 0 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_option_ani_att_att, tvb, suboptoff+1, 1, ENC_NA); |
3819 | 0 | break; |
3820 | 0 | break; |
3821 | 428 | case 151: |
3822 | 428 | if (subopt_len == 1) { |
3823 | 158 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name_global, tvb, suboptoff, 1, ENC_NA); |
3824 | 158 | } |
3825 | 270 | else if (subopt_len != 7) { |
3826 | 162 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name, tvb, suboptoff, subopt_len, ENC_ASCII); |
3827 | 162 | } else { |
3828 | 108 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name_vpn_id_oui, tvb, suboptoff, 3, ENC_BIG_ENDIAN); |
3829 | 108 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_vrf_name_vpn_id_index, tvb, suboptoff+3, 4, ENC_BIG_ENDIAN); |
3830 | 108 | } |
3831 | 428 | break; |
3832 | 189 | default: |
3833 | 189 | if (o82_opt[idx].info.phf != NULL) |
3834 | 189 | proto_tree_add_item(o82_v_tree, *o82_opt[idx].info.phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
3835 | 0 | else |
3836 | 0 | proto_tree_add_item(o82_v_tree, hf_dhcp_option82_value, tvb, suboptoff, subopt_len, ENC_NA); |
3837 | 189 | break; |
3838 | 2.76k | } |
3839 | 2.76k | } |
3840 | 5.27k | else { |
3841 | 5.27k | dhcp_handle_basic_types(pinfo, o82_v_tree, vti, tvb, o82_opt[idx].info.ftype, |
3842 | 5.27k | suboptoff, subopt_len, o82_opt[idx].info.phf, &default_hfs); |
3843 | 5.27k | } |
3844 | 8.03k | } |
3845 | | |
3846 | 15.0k | optoff += (subopt_len + 2); |
3847 | 15.0k | return optoff; |
3848 | 15.0k | } |
3849 | | |
3850 | | static int |
3851 | | dissect_dhcpopt_relay_agent_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
3852 | 260 | { |
3853 | 260 | int offset = 0; |
3854 | | |
3855 | 15.5k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
3856 | 15.2k | offset = dhcp_dhcp_decode_agent_info(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb)); |
3857 | 15.2k | } |
3858 | | |
3859 | 260 | return tvb_captured_length(tvb); |
3860 | 260 | } |
3861 | | |
3862 | 464 | # define O43PXE_DISCOVERY 6 |
3863 | 461 | # define O43PXE_BOOT_SERVER 8 |
3864 | 480 | # define O43PXE_BOOT_MENU 9 |
3865 | 358 | # define O43PXE_MENU_PROMPT 10 |
3866 | 109 | # define O43PXE_BOOT_ITEM 71 |
3867 | | |
3868 | | static const value_string option43_pxeclient_suboption_vals[] = { |
3869 | | { 0, "Padding" }, |
3870 | | { 1, "PXE mtftp IP" }, |
3871 | | { 2, "PXE mtftp client port" }, |
3872 | | { 3, "PXE mtftp server port" }, |
3873 | | { 4, "PXE mtftp timeout" }, |
3874 | | { 5, "PXE mtftp delay" }, |
3875 | | { O43PXE_DISCOVERY, "PXE discovery control" }, |
3876 | | { 7, "PXE multicast address" }, |
3877 | | { O43PXE_BOOT_SERVER, "PXE boot servers" }, |
3878 | | { O43PXE_BOOT_MENU, "PXE boot menu" }, |
3879 | | { O43PXE_MENU_PROMPT, "PXE menu prompt" }, |
3880 | | { 11, "PXE multicast address alloc", }, |
3881 | | { 12, "PXE credential types" }, |
3882 | | { O43PXE_BOOT_ITEM, "PXE boot item" }, |
3883 | | { 179, "PXE LCM Server" }, |
3884 | | { 180, "PXE LCM Domain" }, |
3885 | | { 181, "PXE LCM NIC option 0" }, |
3886 | | { 190, "PXE LCM Workgroup" }, |
3887 | | { 191, "PXE Discovery" }, |
3888 | | { 192, "PXE Configured" }, |
3889 | | { 193, "PXE LCM version" }, |
3890 | | { 194, "PXE LCM Serial Number" }, |
3891 | | { 255, "PXE End" }, |
3892 | | { 0, NULL} |
3893 | | }; |
3894 | | |
3895 | | static int |
3896 | | dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
3897 | | tvbuff_t *tvb, int optoff, int optend) |
3898 | 8.02k | { |
3899 | 8.02k | int suboptoff = optoff; |
3900 | 8.02k | int suboptoff_start; |
3901 | 8.02k | uint8_t subopt; |
3902 | 8.02k | uint8_t subopt_len; |
3903 | 8.02k | proto_tree *o43pxeclient_v_tree, *o43pxeclient_suboption_tree; |
3904 | 8.02k | proto_item *vti, *ti; |
3905 | 8.02k | uint32_t boot_server_ip_count; |
3906 | 8.02k | uint32_t boot_menu_length; |
3907 | | |
3908 | 8.02k | static const struct basic_types_hfs default_hfs = { |
3909 | 8.02k | NULL, |
3910 | 8.02k | &hf_dhcp_option43_value_ip_address, |
3911 | 8.02k | &hf_dhcp_option43_value_ip_address, |
3912 | 8.02k | NULL, |
3913 | 8.02k | NULL, |
3914 | 8.02k | &hf_dhcp_option43_value_8, |
3915 | 8.02k | NULL, |
3916 | 8.02k | NULL, |
3917 | 8.02k | NULL, |
3918 | 8.02k | NULL, |
3919 | 8.02k | NULL |
3920 | 8.02k | }; |
3921 | | |
3922 | 8.02k | static int * const o43pxe_discovery_hf_flags[] = { |
3923 | 8.02k | &hf_dhcp_option43_pxeclient_discovery_control_bc, |
3924 | 8.02k | &hf_dhcp_option43_pxeclient_discovery_control_mc, |
3925 | 8.02k | &hf_dhcp_option43_pxeclient_discovery_control_serverlist, |
3926 | 8.02k | &hf_dhcp_option43_pxeclient_discovery_control_bstrap, |
3927 | 8.02k | NULL |
3928 | 8.02k | }; |
3929 | | |
3930 | 8.02k | static const struct opt_info o43pxeclient_opt[]= { |
3931 | 8.02k | /* 0 */ {"nop", special, &hf_dhcp_option43_pxeclient_padding}, /* dummy */ |
3932 | 8.02k | /* 1 */ {"PXE mtftp IP", ipv4_list, &hf_dhcp_option43_pxeclient_mtftp_ip}, |
3933 | 8.02k | /* 2 */ {"PXE mtftp client port", val_u_le_short, &hf_dhcp_option43_pxeclient_mtftp_client_port}, |
3934 | 8.02k | /* 3 */ {"PXE mtftp server port",val_u_le_short, &hf_dhcp_option43_pxeclient_mtftp_server_port}, |
3935 | 8.02k | /* 4 */ {"PXE mtftp timeout", val_u_byte, &hf_dhcp_option43_pxeclient_mtftp_timeout}, |
3936 | 8.02k | /* 5 */ {"PXE mtftp delay", val_u_byte, &hf_dhcp_option43_pxeclient_mtftp_delay}, |
3937 | 8.02k | /* 6 */ {"PXE discovery control", special, NULL}, |
3938 | 8.02k | /* 7 */ {"PXE multicast address", ipv4_list, &hf_dhcp_option43_pxeclient_multicast_address}, |
3939 | 8.02k | /* 8 */ {"PXE boot servers", special, NULL}, |
3940 | 8.02k | /* 9 */ {"PXE boot menu", special, NULL}, |
3941 | 8.02k | /* 10 */ {"PXE menu prompt", special, NULL}, |
3942 | 8.02k | /* 11 */ {"PXE multicast address alloc", special, &hf_dhcp_option43_pxeclient_multicast_address_alloc}, |
3943 | 8.02k | /* 12 */ {"PXE credential types", special, &hf_dhcp_option43_pxeclient_credential_types}, |
3944 | 8.02k | /* 13 */ {"Unassigned", opaque, NULL}, |
3945 | 8.02k | /* 14 */ {"Unassigned", opaque, NULL}, |
3946 | 8.02k | /* 15 */ {"Unassigned", opaque, NULL}, |
3947 | 8.02k | /* 16 */ {"Unassigned", opaque, NULL}, |
3948 | 8.02k | /* 17 */ {"Unassigned", opaque, NULL}, |
3949 | 8.02k | /* 18 */ {"Unassigned", opaque, NULL}, |
3950 | 8.02k | /* 19 */ {"Unassigned", opaque, NULL}, |
3951 | 8.02k | /* 20 */ {"Unassigned", opaque, NULL}, |
3952 | 8.02k | /* 21 */ {"Unassigned", opaque, NULL}, |
3953 | 8.02k | /* 22 */ {"Unassigned", opaque, NULL}, |
3954 | 8.02k | /* 23 */ {"Unassigned", opaque, NULL}, |
3955 | 8.02k | /* 24 */ {"Unassigned", opaque, NULL}, |
3956 | 8.02k | /* 25 */ {"Unassigned", opaque, NULL}, |
3957 | 8.02k | /* 26 */ {"Unassigned", opaque, NULL}, |
3958 | 8.02k | /* 27 */ {"Unassigned", opaque, NULL}, |
3959 | 8.02k | /* 28 */ {"Unassigned", opaque, NULL}, |
3960 | 8.02k | /* 29 */ {"Unassigned", opaque, NULL}, |
3961 | 8.02k | /* 30 */ {"Unassigned", opaque, NULL}, |
3962 | 8.02k | /* 31 */ {"Unassigned", opaque, NULL}, |
3963 | 8.02k | /* 32 */ {"Unassigned", opaque, NULL}, |
3964 | 8.02k | /* 33 */ {"Unassigned", opaque, NULL}, |
3965 | 8.02k | /* 34 */ {"Unassigned", opaque, NULL}, |
3966 | 8.02k | /* 35 */ {"Unassigned", opaque, NULL}, |
3967 | 8.02k | /* 36 */ {"Unassigned", opaque, NULL}, |
3968 | 8.02k | /* 37 */ {"Unassigned", opaque, NULL}, |
3969 | 8.02k | /* 38 */ {"Unassigned", opaque, NULL}, |
3970 | 8.02k | /* 39 */ {"Unassigned", opaque, NULL}, |
3971 | 8.02k | /* 40 */ {"Unassigned", opaque, NULL}, |
3972 | 8.02k | /* 41 */ {"Unassigned", opaque, NULL}, |
3973 | 8.02k | /* 42 */ {"Unassigned", opaque, NULL}, |
3974 | 8.02k | /* 43 */ {"Unassigned", opaque, NULL}, |
3975 | 8.02k | /* 44 */ {"Unassigned", opaque, NULL}, |
3976 | 8.02k | /* 45 */ {"Unassigned", opaque, NULL}, |
3977 | 8.02k | /* 46 */ {"Unassigned", opaque, NULL}, |
3978 | 8.02k | /* 47 */ {"Unassigned", opaque, NULL}, |
3979 | 8.02k | /* 48 */ {"Unassigned", opaque, NULL}, |
3980 | 8.02k | /* 49 */ {"Unassigned", opaque, NULL}, |
3981 | 8.02k | /* 50 */ {"Unassigned", opaque, NULL}, |
3982 | 8.02k | /* 51 */ {"Unassigned", opaque, NULL}, |
3983 | 8.02k | /* 52 */ {"Unassigned", opaque, NULL}, |
3984 | 8.02k | /* 53 */ {"Unassigned", opaque, NULL}, |
3985 | 8.02k | /* 54 */ {"Unassigned", opaque, NULL}, |
3986 | 8.02k | /* 55 */ {"Unassigned", opaque, NULL}, |
3987 | 8.02k | /* 56 */ {"Unassigned", opaque, NULL}, |
3988 | 8.02k | /* 57 */ {"Unassigned", opaque, NULL}, |
3989 | 8.02k | /* 58 */ {"Unassigned", opaque, NULL}, |
3990 | 8.02k | /* 59 */ {"Unassigned", opaque, NULL}, |
3991 | 8.02k | /* 60 */ {"Unassigned", opaque, NULL}, |
3992 | 8.02k | /* 61 */ {"Unassigned", opaque, NULL}, |
3993 | 8.02k | /* 62 */ {"Unassigned", opaque, NULL}, |
3994 | 8.02k | /* 63 */ {"Unassigned", opaque, NULL}, |
3995 | 8.02k | /* 64 */ {"Unassigned", opaque, NULL}, |
3996 | 8.02k | /* 65 */ {"Unassigned", opaque, NULL}, |
3997 | 8.02k | /* 66 */ {"Unassigned", opaque, NULL}, |
3998 | 8.02k | /* 67 */ {"Unassigned", opaque, NULL}, |
3999 | 8.02k | /* 68 */ {"Unassigned", opaque, NULL}, |
4000 | 8.02k | /* 69 */ {"Unassigned", opaque, NULL}, |
4001 | 8.02k | /* 70 */ {"Unassigned", opaque, NULL}, |
4002 | 8.02k | /* 71 */ {"PXE boot item", special, NULL}, |
4003 | 8.02k | /* 72 */ {"Unassigned", opaque, NULL}, |
4004 | 8.02k | /* 73 */ {"Unassigned", opaque, NULL}, |
4005 | 8.02k | /* 74 */ {"Unassigned", opaque, NULL}, |
4006 | 8.02k | /* 75 */ {"Unassigned", opaque, NULL}, |
4007 | 8.02k | /* 76 */ {"Unassigned", opaque, NULL}, |
4008 | 8.02k | /* 77 */ {"Unassigned", opaque, NULL}, |
4009 | 8.02k | /* 78 */ {"Unassigned", opaque, NULL}, |
4010 | 8.02k | /* 79 */ {"Unassigned", opaque, NULL}, |
4011 | 8.02k | /* 80 */ {"Unassigned", opaque, NULL}, |
4012 | 8.02k | /* 81 */ {"Unassigned", opaque, NULL}, |
4013 | 8.02k | /* 82 */ {"Unassigned", opaque, NULL}, |
4014 | 8.02k | /* 83 */ {"Unassigned", opaque, NULL}, |
4015 | 8.02k | /* 84 */ {"Unassigned", opaque, NULL}, |
4016 | 8.02k | /* 85 */ {"Unassigned", opaque, NULL}, |
4017 | 8.02k | /* 86 */ {"Unassigned", opaque, NULL}, |
4018 | 8.02k | /* 87 */ {"Unassigned", opaque, NULL}, |
4019 | 8.02k | /* 88 */ {"Unassigned", opaque, NULL}, |
4020 | 8.02k | /* 89 */ {"Unassigned", opaque, NULL}, |
4021 | 8.02k | /* 90 */ {"Unassigned", opaque, NULL}, |
4022 | 8.02k | /* 91 */ {"Unassigned", opaque, NULL}, |
4023 | 8.02k | /* 92 */ {"Unassigned", opaque, NULL}, |
4024 | 8.02k | /* 93 */ {"Unassigned", opaque, NULL}, |
4025 | 8.02k | /* 94 */ {"Unassigned", opaque, NULL}, |
4026 | 8.02k | /* 95 */ {"Unassigned", opaque, NULL}, |
4027 | 8.02k | /* 96 */ {"Unassigned", opaque, NULL}, |
4028 | 8.02k | /* 97 */ {"Unassigned", opaque, NULL}, |
4029 | 8.02k | /* 98 */ {"Unassigned", opaque, NULL}, |
4030 | 8.02k | /* 99 */ {"Unassigned", opaque, NULL}, |
4031 | 8.02k | /* 100 */ {"Unassigned", opaque, NULL}, |
4032 | 8.02k | /* 101 */ {"Unassigned", opaque, NULL}, |
4033 | 8.02k | /* 102 */ {"Unassigned", opaque, NULL}, |
4034 | 8.02k | /* 103 */ {"Unassigned", opaque, NULL}, |
4035 | 8.02k | /* 104 */ {"Unassigned", opaque, NULL}, |
4036 | 8.02k | /* 105 */ {"Unassigned", opaque, NULL}, |
4037 | 8.02k | /* 106 */ {"Unassigned", opaque, NULL}, |
4038 | 8.02k | /* 107 */ {"Unassigned", opaque, NULL}, |
4039 | 8.02k | /* 108 */ {"Unassigned", opaque, NULL}, |
4040 | 8.02k | /* 109 */ {"Unassigned", opaque, NULL}, |
4041 | 8.02k | /* 110 */ {"Unassigned", opaque, NULL}, |
4042 | 8.02k | /* 111 */ {"Unassigned", opaque, NULL}, |
4043 | 8.02k | /* 112 */ {"Unassigned", opaque, NULL}, |
4044 | 8.02k | /* 113 */ {"Unassigned", opaque, NULL}, |
4045 | 8.02k | /* 114 */ {"Unassigned", opaque, NULL}, |
4046 | 8.02k | /* 115 */ {"Unassigned", opaque, NULL}, |
4047 | 8.02k | /* 116 */ {"Unassigned", opaque, NULL}, |
4048 | 8.02k | /* 117 */ {"Unassigned", opaque, NULL}, |
4049 | 8.02k | /* 118 */ {"Unassigned", opaque, NULL}, |
4050 | 8.02k | /* 119 */ {"Unassigned", opaque, NULL}, |
4051 | 8.02k | /* 120 */ {"Unassigned", opaque, NULL}, |
4052 | 8.02k | /* 121 */ {"Unassigned", opaque, NULL}, |
4053 | 8.02k | /* 122 */ {"Unassigned", opaque, NULL}, |
4054 | 8.02k | /* 123 */ {"Unassigned", opaque, NULL}, |
4055 | 8.02k | /* 124 */ {"Unassigned", opaque, NULL}, |
4056 | 8.02k | /* 125 */ {"Unassigned", opaque, NULL}, |
4057 | 8.02k | /* 126 */ {"Unassigned", opaque, NULL}, |
4058 | 8.02k | /* 127 */ {"Unassigned", opaque, NULL}, |
4059 | 8.02k | /* 128 */ {"Unassigned", opaque, NULL}, |
4060 | 8.02k | /* 129 */ {"Unassigned", opaque, NULL}, |
4061 | 8.02k | /* 130 */ {"Unassigned", opaque, NULL}, |
4062 | 8.02k | /* 131 */ {"Unassigned", opaque, NULL}, |
4063 | 8.02k | /* 132 */ {"Unassigned", opaque, NULL}, |
4064 | 8.02k | /* 133 */ {"Unassigned", opaque, NULL}, |
4065 | 8.02k | /* 134 */ {"Unassigned", opaque, NULL}, |
4066 | 8.02k | /* 135 */ {"Unassigned", opaque, NULL}, |
4067 | 8.02k | /* 136 */ {"Unassigned", opaque, NULL}, |
4068 | 8.02k | /* 137 */ {"Unassigned", opaque, NULL}, |
4069 | 8.02k | /* 138 */ {"Unassigned", opaque, NULL}, |
4070 | 8.02k | /* 139 */ {"Unassigned", opaque, NULL}, |
4071 | 8.02k | /* 140 */ {"Unassigned", opaque, NULL}, |
4072 | 8.02k | /* 141 */ {"Unassigned", opaque, NULL}, |
4073 | 8.02k | /* 142 */ {"Unassigned", opaque, NULL}, |
4074 | 8.02k | /* 143 */ {"Unassigned", opaque, NULL}, |
4075 | 8.02k | /* 144 */ {"Unassigned", opaque, NULL}, |
4076 | 8.02k | /* 145 */ {"Unassigned", opaque, NULL}, |
4077 | 8.02k | /* 146 */ {"Unassigned", opaque, NULL}, |
4078 | 8.02k | /* 147 */ {"Unassigned", opaque, NULL}, |
4079 | 8.02k | /* 148 */ {"Unassigned", opaque, NULL}, |
4080 | 8.02k | /* 149 */ {"Unassigned", opaque, NULL}, |
4081 | 8.02k | /* 150 */ {"Unassigned", opaque, NULL}, |
4082 | 8.02k | /* 151 */ {"Unassigned", opaque, NULL}, |
4083 | 8.02k | /* 152 */ {"Unassigned", opaque, NULL}, |
4084 | 8.02k | /* 153 */ {"Unassigned", opaque, NULL}, |
4085 | 8.02k | /* 154 */ {"Unassigned", opaque, NULL}, |
4086 | 8.02k | /* 155 */ {"Unassigned", opaque, NULL}, |
4087 | 8.02k | /* 156 */ {"Unassigned", opaque, NULL}, |
4088 | 8.02k | /* 157 */ {"Unassigned", opaque, NULL}, |
4089 | 8.02k | /* 158 */ {"Unassigned", opaque, NULL}, |
4090 | 8.02k | /* 159 */ {"Unassigned", opaque, NULL}, |
4091 | 8.02k | /* 160 */ {"Unassigned", opaque, NULL}, |
4092 | 8.02k | /* 161 */ {"Unassigned", opaque, NULL}, |
4093 | 8.02k | /* 162 */ {"Unassigned", opaque, NULL}, |
4094 | 8.02k | /* 163 */ {"Unassigned", opaque, NULL}, |
4095 | 8.02k | /* 164 */ {"Unassigned", opaque, NULL}, |
4096 | 8.02k | /* 165 */ {"Unassigned", opaque, NULL}, |
4097 | 8.02k | /* 166 */ {"Unassigned", opaque, NULL}, |
4098 | 8.02k | /* 167 */ {"Unassigned", opaque, NULL}, |
4099 | 8.02k | /* 168 */ {"Unassigned", opaque, NULL}, |
4100 | 8.02k | /* 169 */ {"Unassigned", opaque, NULL}, |
4101 | 8.02k | /* 170 */ {"Unassigned", opaque, NULL}, |
4102 | 8.02k | /* 171 */ {"Unassigned", opaque, NULL}, |
4103 | 8.02k | /* 172 */ {"Unassigned", opaque, NULL}, |
4104 | 8.02k | /* 173 */ {"Unassigned", opaque, NULL}, |
4105 | 8.02k | /* 174 */ {"Unassigned", opaque, NULL}, |
4106 | 8.02k | /* 175 */ {"Unassigned", opaque, NULL}, |
4107 | 8.02k | /* 176 */ {"Unassigned", opaque, NULL}, |
4108 | 8.02k | /* 177 */ {"Unassigned", opaque, NULL}, |
4109 | 8.02k | /* 178 */ {"Unassigned", opaque, NULL}, |
4110 | 8.02k | /* 179 */ {"LCM Server", string, &hf_dhcp_option43_pxeclient_lcm_server}, |
4111 | 8.02k | /* 180 */ {"LCM Domain", string, &hf_dhcp_option43_pxeclient_lcm_domain}, |
4112 | 8.02k | /* 181 */ {"LCM NIC Option 0", bytes, &hf_dhcp_option43_pxeclient_lcm_nic_option}, |
4113 | 8.02k | /* 182 */ {"Unassigned", opaque, NULL}, |
4114 | 8.02k | /* 183 */ {"Unassigned", opaque, NULL}, |
4115 | 8.02k | /* 184 */ {"Unassigned", opaque, NULL}, |
4116 | 8.02k | /* 185 */ {"Unassigned", opaque, NULL}, |
4117 | 8.02k | /* 186 */ {"Unassigned", opaque, NULL}, |
4118 | 8.02k | /* 187 */ {"Unassigned", opaque, NULL}, |
4119 | 8.02k | /* 188 */ {"Unassigned", opaque, NULL}, |
4120 | 8.02k | /* 189 */ {"Unassigned", opaque, NULL}, |
4121 | 8.02k | /* 190 */ {"LCM Workgroup", string, &hf_dhcp_option43_pxeclient_lcm_workgroup}, |
4122 | 8.02k | /* 191 */ {"Discovery", val_boolean, &hf_dhcp_option43_pxeclient_discovery}, |
4123 | 8.02k | /* 192 */ {"Configured", val_boolean, &hf_dhcp_option43_pxeclient_configured}, |
4124 | 8.02k | /* 193 */ {"LCM Version", val_u_long, &hf_dhcp_option43_pxeclient_lcm_version}, |
4125 | 8.02k | /* 194 */ {"LCM Serial Number", string, &hf_dhcp_option43_pxeclient_lcm_serial}, |
4126 | | /* 255 {"PXE end options", special, &hf_dhcp_option43_pxeclient_end} */ |
4127 | 8.02k | }; |
4128 | | |
4129 | 8.02k | subopt = tvb_get_uint8(tvb, optoff); |
4130 | 8.02k | suboptoff++; |
4131 | | |
4132 | 8.02k | if (subopt == 0) { |
4133 | 3.24k | proto_tree_add_item(v_tree, hf_dhcp_option43_pxeclient_padding, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4134 | 3.24k | return (suboptoff); |
4135 | 4.78k | } else if (subopt == 255) { /* End Option */ |
4136 | 3 | proto_tree_add_item(v_tree, hf_dhcp_option43_pxeclient_end, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4137 | | /* Make sure we skip any junk left this option */ |
4138 | 3 | return (optend); |
4139 | 3 | } |
4140 | | |
4141 | 4.78k | if (suboptoff >= optend) { |
4142 | 13 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
4143 | 13 | "Suboption %d: no room left in option for suboption length", subopt); |
4144 | 13 | return (optend); |
4145 | 13 | } |
4146 | | |
4147 | 4.76k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
4148 | 4.76k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_pxeclient_suboption, |
4149 | 4.76k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
4150 | 4.76k | subopt, val_to_str_const(subopt, option43_pxeclient_suboption_vals, "Unknown")); |
4151 | | |
4152 | 4.76k | o43pxeclient_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
4153 | 4.76k | proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4154 | 4.76k | suboptoff++; |
4155 | | |
4156 | 4.76k | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4157 | 4.76k | proto_item_set_hidden(ti); |
4158 | | |
4159 | 4.76k | if ((subopt < 1) || (subopt >= array_length(o43pxeclient_opt))) { |
4160 | 324 | expert_add_info_format(pinfo, vti, &ei_dhcp_suboption_invalid, "Unknown suboption %d (%d bytes)", subopt, subopt_len); |
4161 | 4.44k | } else if (o43pxeclient_opt[subopt].ftype == special) { |
4162 | | /* I may need to decode that properly one day */ |
4163 | 2.11k | if (o43pxeclient_opt[subopt].phf != NULL) |
4164 | 246 | proto_tree_add_item(o43pxeclient_v_tree, *o43pxeclient_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4165 | 1.87k | else { |
4166 | 1.87k | switch(subopt) |
4167 | 1.87k | { |
4168 | 464 | case O43PXE_DISCOVERY: |
4169 | 464 | proto_tree_add_bitmask(o43pxeclient_v_tree, tvb, suboptoff, hf_dhcp_option43_pxeclient_discovery_control, |
4170 | 464 | ett_dhcp_option43_suboption_discovery, o43pxe_discovery_hf_flags, ENC_BIG_ENDIAN); |
4171 | 464 | break; |
4172 | 461 | case O43PXE_BOOT_SERVER: |
4173 | 461 | suboptoff_start = suboptoff; |
4174 | 461 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_boot_servers, tvb, suboptoff, subopt_len, ENC_NA); |
4175 | 461 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4176 | 805 | while((suboptoff - suboptoff_start) < (subopt_len - 1)) { |
4177 | 344 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_server_type, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
4178 | 344 | suboptoff += 2; |
4179 | 344 | 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); |
4180 | 344 | suboptoff += 1; |
4181 | 2.05k | while(boot_server_ip_count > 0) { |
4182 | 1.70k | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_server_ip, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
4183 | 1.70k | suboptoff += 4; |
4184 | 1.70k | boot_server_ip_count -=1; |
4185 | 1.70k | } |
4186 | 344 | } |
4187 | 461 | break; |
4188 | 480 | case O43PXE_BOOT_MENU: |
4189 | 480 | suboptoff_start = suboptoff; |
4190 | 480 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_boot_menu, tvb, suboptoff, subopt_len, ENC_NA); |
4191 | 480 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4192 | 777 | while((suboptoff - suboptoff_start) < (subopt_len - 1)) { |
4193 | 297 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_menu_type, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
4194 | 297 | suboptoff += 2; |
4195 | 297 | 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); |
4196 | 297 | suboptoff += 1; |
4197 | 297 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_menu_desc, tvb, suboptoff, boot_menu_length, ENC_ASCII); |
4198 | 297 | suboptoff += boot_menu_length; |
4199 | 297 | } |
4200 | 480 | break; |
4201 | 358 | case O43PXE_MENU_PROMPT: |
4202 | 358 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_menu_prompt, tvb, suboptoff, subopt_len, ENC_NA); |
4203 | 358 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4204 | 358 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_menu_prompt_timeout, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4205 | 358 | suboptoff += 1; |
4206 | 358 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_menu_prompt_prompt, tvb, suboptoff, subopt_len - 1, ENC_ASCII); |
4207 | 358 | break; |
4208 | 109 | case O43PXE_BOOT_ITEM: |
4209 | 109 | ti = proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_pxeclient_boot_item, tvb, suboptoff, subopt_len, ENC_NA); |
4210 | 109 | o43pxeclient_suboption_tree = proto_item_add_subtree(ti, ett_dhcp_option43_suboption_tree); |
4211 | 109 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_item_type, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
4212 | 109 | suboptoff += 2; |
4213 | 109 | proto_tree_add_item(o43pxeclient_suboption_tree, hf_dhcp_option43_pxeclient_boot_item_layer, tvb, suboptoff, 2, ENC_NA); |
4214 | 109 | break; |
4215 | 0 | default: |
4216 | 0 | proto_tree_add_item(o43pxeclient_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4217 | 0 | break; |
4218 | 1.87k | } |
4219 | 1.87k | } |
4220 | 2.32k | } else { |
4221 | 2.32k | if (dhcp_handle_basic_types(pinfo, o43pxeclient_v_tree, vti, tvb, o43pxeclient_opt[subopt].ftype, |
4222 | 2.32k | suboptoff, subopt_len, o43pxeclient_opt[subopt].phf, &default_hfs) == 0) |
4223 | 1.84k | { |
4224 | 1.84k | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); |
4225 | 1.84k | } |
4226 | 2.32k | } |
4227 | | |
4228 | 4.74k | optoff += (subopt_len + 2); |
4229 | 4.74k | return optoff; |
4230 | 4.76k | } |
4231 | | |
4232 | | static bool |
4233 | | dissect_pxeclient_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
4234 | 1.12k | { |
4235 | 1.12k | int offset = 0; |
4236 | 1.12k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4237 | 1.12k | proto_tree* vendor_tree; |
4238 | | |
4239 | | /* PXE protocol 2.1 as described in the Intel specs */ |
4240 | 1.12k | if ((option_data->vendor_class_id == NULL) || |
4241 | 870 | (strncmp((const char*)option_data->vendor_class_id, "PXEClient", strlen("PXEClient")) != 0)) |
4242 | 1.01k | return false; |
4243 | | |
4244 | 114 | proto_item_append_text(tree, " (PXEClient)"); |
4245 | 114 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
4246 | | |
4247 | 8.14k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
4248 | 8.02k | offset = dissect_vendor_pxeclient_suboption(pinfo, tree, vendor_tree, |
4249 | 8.02k | tvb, offset, tvb_reported_length(tvb)); |
4250 | 8.02k | } |
4251 | | |
4252 | 114 | return true; |
4253 | 1.12k | } |
4254 | | |
4255 | | static void |
4256 | | dissect_vendor_avaya_param(proto_tree *tree, packet_info *pinfo, proto_item *vti, |
4257 | | tvbuff_t *tvb, int optoff, wmem_strbuf_t *avaya_param_buf) |
4258 | 11.8k | { |
4259 | 11.8k | const char *field; |
4260 | 11.8k | int len; |
4261 | | |
4262 | 11.8k | field = wmem_strbuf_get_str(avaya_param_buf); |
4263 | 11.8k | len = (int)wmem_strbuf_get_len(avaya_param_buf); |
4264 | | |
4265 | 11.8k | if((strncmp(field, "TLSSRVR=", 8) == 0) && ( len > 8 )) { |
4266 | 35 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_tlssrvr, tvb, optoff, len, field + 8); |
4267 | 35 | } |
4268 | 11.8k | else if((strncmp(field, "HTTPSRVR=", 9) == 0) && ( len > 9)) { |
4269 | 79 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_httpsrvr, tvb, optoff, len, field + 9); |
4270 | 79 | } |
4271 | 11.7k | else if((strncmp(field, "HTTPDIR=", 8) == 0) && ( len > 8)) { |
4272 | 78 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_httpdir, tvb, optoff, len, field + 8); |
4273 | 78 | } |
4274 | 11.6k | else if((strncmp(field, "STATIC=", 7) == 0) && ( len > 7)) { |
4275 | 55 | 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)")); |
4276 | 55 | } |
4277 | 11.6k | else if((strncmp(field, "MCIPADD=", 8) == 0) && ( len > 8)) { |
4278 | 103 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_mcipadd, tvb, optoff, len, field + 8); |
4279 | 103 | } |
4280 | 11.5k | else if((strncmp(field, "DOT1X=", 6) == 0) && ( len > 6)) { |
4281 | 65 | 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)")); |
4282 | 65 | } |
4283 | 11.4k | else if((strncmp(field, "ICMPDU=", 7) == 0) && ( len > 7)) { |
4284 | 50 | 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)")); |
4285 | 50 | } |
4286 | 11.3k | else if((strncmp(field, "ICMPRED=", 8) == 0) && ( len > 8)) { |
4287 | 78 | 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)")); |
4288 | 78 | } |
4289 | 11.3k | else if((strncmp(field, "L2Q=", 4) == 0) && ( len > 4)) { |
4290 | 164 | 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)")); |
4291 | 164 | } |
4292 | 11.1k | else if((strncmp(field, "L2QVLAN=", 8) == 0) && ( len > 8)) { |
4293 | 342 | int32_t val = -1; |
4294 | 342 | bool val_valid; |
4295 | 342 | proto_item* pi; |
4296 | | |
4297 | 342 | val_valid = ws_strtoi32(field + 8, NULL, &val); |
4298 | 342 | pi = proto_tree_add_int(tree, hf_dhcp_option242_avaya_l2qvlan, tvb, optoff, len, val); |
4299 | 342 | if (val_valid) |
4300 | 71 | expert_add_info(pinfo, pi, &ei_dhcp_option242_avaya_l2qvlan_invalid); |
4301 | 342 | } |
4302 | 10.8k | else if((strncmp(field, "LOGLOCAL=", 9) == 0) && ( len > 9)) { |
4303 | 67 | 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)")); |
4304 | 67 | } |
4305 | 10.7k | else if((strncmp(field, "PHY1STAT=", 9) == 0) && ( len > 9)) { |
4306 | 53 | 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)")); |
4307 | 53 | } |
4308 | 10.6k | else if((strncmp(field, "PHY2STAT=", 9) == 0) && ( len > 9)) { |
4309 | 68 | 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)")); |
4310 | 68 | } |
4311 | 10.6k | else if((strncmp(field, "PROCPSWD=", 9) == 0) && ( len > 9)) { |
4312 | 71 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_procpswd, tvb, optoff, len, field + 9); |
4313 | 71 | } |
4314 | 10.5k | else if((strncmp(field, "PROCSTAT=", 9) == 0) && ( len > 9)) { |
4315 | 76 | 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)")); |
4316 | 76 | } |
4317 | 10.4k | else if((strncmp(field, "SNMPADD=", 8) == 0) && ( len > 8)) { |
4318 | 98 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_snmpadd, tvb, optoff, len, field + 8); |
4319 | 98 | } |
4320 | 10.3k | else if((strncmp(field, "SNMPSTRING=", 11) == 0) && ( len > 11)) { |
4321 | 50 | proto_tree_add_string(tree, hf_dhcp_option242_avaya_snmpstring, tvb, optoff, len, field + 11); |
4322 | 50 | } |
4323 | 10.3k | else if((strncmp(field, "VLANTEST=", 9) == 0) && ( len > 9)) { |
4324 | 778 | int32_t val = -1; |
4325 | 778 | bool val_valid; |
4326 | 778 | proto_item* pi; |
4327 | | |
4328 | 778 | val_valid = ws_strtoi32(field + 9, NULL, &val); |
4329 | 778 | pi = proto_tree_add_int(tree, hf_dhcp_option242_avaya_vlantest, tvb, optoff, len, val); |
4330 | 778 | if (!val_valid) |
4331 | 579 | expert_add_info(pinfo, pi, &ei_dhcp_option242_avaya_vlantest_invalid); |
4332 | 778 | } |
4333 | 9.55k | else { |
4334 | 9.55k | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, Unknown Avaya IP Telephone parameter %s", field); |
4335 | 9.55k | } |
4336 | 11.8k | } |
4337 | | |
4338 | | /* RFC3825Decoder: |
4339 | | * |
4340 | | * https://web.archive.org/web/20100312054301/http://www.enum.at/rfc3825encoder.529.0.html |
4341 | | * |
4342 | | * The code is no longer available. |
4343 | | */ |
4344 | | static void |
4345 | | rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fixpoint_t *fixpoint) |
4346 | 48 | { |
4347 | 48 | fixpoint->latitude_res = (lci[0]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */ |
4348 | 48 | if (lci[0] & 2) { /* LSB<<1 contains the sign of the latitude */ |
4349 | | /* Latitude is negative, expand two's complement */ |
4350 | 10 | fixpoint->latitude = (((int64_t)lci[0] & 3)<<32) | ((int64_t)lci[1]<<24) | |
4351 | 10 | ((int64_t)lci[2]<<16) | ((int64_t)lci[3]<<8) | |
4352 | 10 | (int64_t)lci[4] | ((int64_t)0x3FFFFFFF<<34); |
4353 | | |
4354 | 38 | } else { |
4355 | | /* Latitude is positive */ |
4356 | 38 | fixpoint->latitude = (((int64_t)lci[0] & 3)<<32) | ((int64_t)lci[1]<<24) | |
4357 | 38 | ((int64_t)lci[2]<<16) | ((int64_t)lci[3]<<8) | |
4358 | 38 | (int64_t)lci[4]; |
4359 | 38 | } |
4360 | 48 | fixpoint->longitude_res = (lci[5]>>2) & 0x3F; /* make sure that right-shift does not copy sign bit */ |
4361 | 48 | if (lci[5] & 2) { /* LSB<<1 contains the sign of the latitude */ |
4362 | | /* Longitude is negative, expand two's complement */ |
4363 | 12 | fixpoint->longitude = (((int64_t)lci[5] & 3)<<32) | ((int64_t)lci[6]<<24) | |
4364 | 12 | ((int64_t)lci[7]<<16) | ((int64_t)lci[8]<<8) | |
4365 | 12 | (int64_t)lci[9] | ((int64_t)0x3FFFFFFF<<34); |
4366 | | |
4367 | 36 | } else { |
4368 | | /* Longitude is positive */ |
4369 | 36 | fixpoint->longitude = (((int64_t)lci[5] & 3)<<32) | ((int64_t)lci[6]<<24) | |
4370 | 36 | ((int64_t)lci[7]<<16) | ((int64_t)lci[8]<<8) | |
4371 | 36 | (int64_t)lci[9]; |
4372 | 36 | } |
4373 | 48 | fixpoint->altitude_type = (lci[10]>>4) & 0x0F; /* make sure that right-shift does not copy sign bit */ |
4374 | 48 | fixpoint->altitude_res = ((lci[10] & 0x0F) << 2) | ((lci[11]>>6) & 0x03); |
4375 | 48 | if (lci[11] & 0x20) { /* LSB<<1 contains the sign of the latitude */ |
4376 | | /* Altitude is negative, expand two's complement */ |
4377 | 19 | fixpoint->altitude = (((int32_t)lci[11] & 0x3F)<<24) | ((int32_t)lci[12]<<16) | |
4378 | 19 | ((int32_t)lci[13]<<8) | ((int32_t)lci[14]) | |
4379 | 19 | ((int32_t)0x03<<30); |
4380 | | |
4381 | 29 | } else { |
4382 | | /* Altitude is positive */ |
4383 | 29 | fixpoint->altitude = (((int32_t)lci[11] & 0x3F)<<24) | ((int32_t)lci[12]<<16) | |
4384 | 29 | ((int32_t)lci[13]<<8) | ((int32_t)lci[14]); |
4385 | 29 | } |
4386 | | |
4387 | 48 | fixpoint->datum_type = lci[15]; |
4388 | | |
4389 | 48 | } |
4390 | | |
4391 | | /* RFC3825Decoder: |
4392 | | * |
4393 | | * https://web.archive.org/web/20100312054301/http://www.enum.at/rfc3825encoder.529.0.html |
4394 | | * |
4395 | | * The code is no longer available. |
4396 | | */ |
4397 | | static int |
4398 | | rfc3825_fixpoint_to_decimal(struct rfc3825_location_fixpoint_t *fixpoint, struct rfc3825_location_decimal_t *decimal) |
4399 | 48 | { |
4400 | | /* Latitude */ |
4401 | 48 | decimal->latitude = (double) fixpoint->latitude / (1 << 25); |
4402 | 48 | if ((decimal->latitude > 90) || (decimal->latitude < -90)) { |
4403 | 3 | return RFC3825_LATITUDE_OUTOFRANGE; |
4404 | 3 | } |
4405 | | |
4406 | | /* Latitude Uncertainty */ |
4407 | 45 | if (fixpoint->latitude_res > 34) { |
4408 | 1 | return RFC3825_LATITUDE_UNCERTAINTY_OUTOFRANGE; |
4409 | 1 | } |
4410 | 44 | if (fixpoint->latitude_res > 8 ) { |
4411 | 20 | decimal->latitude_res = (double) 1 / (UINT64_C(1) << (fixpoint->latitude_res - 8)); |
4412 | 24 | } else { |
4413 | 24 | decimal->latitude_res = (double) (UINT64_C(1) << (8 - fixpoint->latitude_res)); |
4414 | 24 | } |
4415 | | |
4416 | | /* Longitude */ |
4417 | 44 | decimal->longitude = (double) fixpoint->longitude / (1 << 25); |
4418 | 44 | if ((decimal->longitude > 180) || (decimal->longitude < -180)) { |
4419 | 4 | return RFC3825_LONGITUDE_OUTOFRANGE; |
4420 | 4 | } |
4421 | | |
4422 | | /* Longitude Uncertainty */ |
4423 | 40 | if (fixpoint->longitude_res > 34) { |
4424 | 3 | return RFC3825_LONGITUDE_UNCERTAINTY_OUTOFRANGE; |
4425 | 3 | } |
4426 | 37 | if (fixpoint->longitude_res > 8 ) { |
4427 | 17 | decimal->longitude_res = (double) 1 / (UINT64_C(1) << (fixpoint->longitude_res - 8)); |
4428 | 20 | } else { |
4429 | 20 | decimal->longitude_res = (double) (UINT64_C(1) << (8 - fixpoint->longitude_res)); |
4430 | 20 | } |
4431 | | |
4432 | | /* Altitude Type */ |
4433 | 37 | decimal->altitude_type = fixpoint->altitude_type; |
4434 | 37 | decimal->altitude = 0; |
4435 | 37 | decimal->altitude_res = 0; |
4436 | | |
4437 | 37 | if (decimal->altitude_type == 0) { /* Unknown */ |
4438 | 25 | } else if (decimal->altitude_type == 1) { /* Meters */ |
4439 | | /* Altitude */ |
4440 | 10 | decimal->altitude = (double) fixpoint->altitude / (1 << 8); |
4441 | 10 | if ((decimal->altitude > ((int32_t) 1<<21)-1) || (decimal->altitude < ((int32_t) -(1<<21)))) |
4442 | 1 | return RFC3825_ALTITUDE_OUTOFRANGE; |
4443 | | |
4444 | | /* Altitude Uncertainty */ |
4445 | 9 | if (fixpoint->altitude_res > 30) { |
4446 | 1 | return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE; |
4447 | 1 | } |
4448 | 8 | if (fixpoint->altitude_res > 21 ) { |
4449 | 2 | decimal->altitude_res = (double) 1 / (UINT64_C(1) << (fixpoint->altitude_res - 21)); |
4450 | 6 | } else { |
4451 | 6 | decimal->altitude_res = (double) (UINT64_C(1) << (21 - fixpoint->altitude_res)); |
4452 | 6 | } |
4453 | 15 | } else if (decimal->altitude_type == 2) { /* Floors */ |
4454 | | /* Altitude */ |
4455 | 9 | if ((fixpoint->altitude_res != 30) && (fixpoint->altitude_res != 0)) { |
4456 | 5 | return RFC3825_ALTITUDE_UNCERTAINTY_OUTOFRANGE; |
4457 | 5 | } |
4458 | 4 | decimal->altitude = (double) fixpoint->altitude / (1 << 8); |
4459 | 6 | } else { /* invalid type */ |
4460 | 6 | return RFC3825_ALTITUDE_TYPE_OUTOFRANGE; |
4461 | 6 | } |
4462 | | |
4463 | | /* Datum Type */ |
4464 | 24 | decimal->datum_type = 0; |
4465 | 24 | if ((fixpoint->datum_type > 3) || (fixpoint->datum_type < 1)) { |
4466 | 16 | return RFC3825_DATUM_TYPE_OUTOFRANGE; |
4467 | 16 | } |
4468 | 8 | decimal->datum_type = fixpoint->datum_type; |
4469 | | |
4470 | 8 | return RFC3825_NOERROR; |
4471 | 24 | } |
4472 | | |
4473 | | static int |
4474 | | dissect_dhcpopt_isns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
4475 | 128 | { |
4476 | 128 | static int * const isns_functions_hf_flags[] = { |
4477 | 128 | &hf_dhcp_option_isns_functions_enabled, |
4478 | 128 | &hf_dhcp_option_isns_functions_dd_authorization, |
4479 | 128 | &hf_dhcp_option_isns_functions_sec_policy_distibution, |
4480 | 128 | &hf_dhcp_option_isns_functions_reserved, |
4481 | 128 | NULL |
4482 | 128 | }; |
4483 | | |
4484 | 128 | static int * const isns_dda_hf_flags[] = { |
4485 | 128 | &hf_dhcp_option_isns_discovery_domain_access_enabled, |
4486 | 128 | &hf_dhcp_option_isns_discovery_domain_access_control_node, |
4487 | 128 | &hf_dhcp_option_isns_discovery_domain_access_iscsi_target, |
4488 | 128 | &hf_dhcp_option_isns_discovery_domain_access_iscsi_inititator, |
4489 | 128 | &hf_dhcp_option_isns_discovery_domain_access_ifcp_target_port, |
4490 | 128 | &hf_dhcp_option_isns_discovery_domain_access_ifcp_initiator_port, |
4491 | 128 | &hf_dhcp_option_isns_discovery_domain_access_reserved, |
4492 | 128 | NULL |
4493 | 128 | }; |
4494 | | |
4495 | 128 | static int * const isns_administrative_flags[] = { |
4496 | 128 | &hf_dhcp_option_isns_administrative_flags_enabled, |
4497 | 128 | &hf_dhcp_option_isns_administrative_flags_heartbeat, |
4498 | 128 | &hf_dhcp_option_isns_administrative_flags_management_scns, |
4499 | 128 | &hf_dhcp_option_isns_administrative_flags_default_dd, |
4500 | 128 | &hf_dhcp_option_isns_administrative_flags_reserved, |
4501 | 128 | NULL |
4502 | 128 | }; |
4503 | | |
4504 | 128 | static int * const isns_server_security_flags[] = { |
4505 | 128 | &hf_dhcp_option_isns_server_security_bitmap_enabled, |
4506 | 128 | &hf_dhcp_option_isns_server_security_bitmap_ike_ipsec_enabled, |
4507 | 128 | &hf_dhcp_option_isns_server_security_bitmap_main_mode, |
4508 | 128 | &hf_dhcp_option_isns_server_security_bitmap_aggressive_mode, |
4509 | 128 | &hf_dhcp_option_isns_server_security_bitmap_pfs, |
4510 | 128 | &hf_dhcp_option_isns_server_security_bitmap_transport_mode, |
4511 | 128 | &hf_dhcp_option_isns_server_security_bitmap_tunnel_mode, |
4512 | 128 | &hf_dhcp_option_isns_server_security_bitmap_reserved, |
4513 | 128 | NULL |
4514 | 128 | }; |
4515 | | |
4516 | 128 | uint16_t function_flags, dd_access_flags, administrative_flags; |
4517 | 128 | uint32_t server_security_flags; |
4518 | 128 | proto_tree *server_tree; |
4519 | 128 | proto_item *item; |
4520 | 128 | int length = tvb_reported_length(tvb); |
4521 | 128 | int offset = 0, heartbeat_set = 0; |
4522 | | |
4523 | 128 | if (length < 14) { |
4524 | 15 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be >= 14"); |
4525 | 15 | return 1; |
4526 | 15 | } |
4527 | | |
4528 | 113 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_functions, |
4529 | 113 | ett_dhcp_isns_functions, isns_functions_hf_flags, ENC_BIG_ENDIAN); |
4530 | 113 | function_flags = tvb_get_ntohs(tvb, offset); |
4531 | | /* RFC 4174, section "2.1. iSNS Functions Field" specifies that if |
4532 | | * the field "Function Fields Enabled" is set to 0, then "the contents |
4533 | | * of all other iSNS Function fields MUST be ignored. We will display |
4534 | | * the fields but add an informational expert info. This goes for all |
4535 | | * the bitmasks: iSNS Functions, DD Access, Administrative Flags, iSNS |
4536 | | * Server Security Bitmap */ |
4537 | 113 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(function_flags, F_ISNS_FUNCTIONS_ENABLED)) |
4538 | 50 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4539 | | |
4540 | 113 | offset += 2; |
4541 | 113 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_discovery_domain_access, |
4542 | 113 | ett_dhcp_isns_discovery_domain_access, isns_dda_hf_flags, ENC_BIG_ENDIAN); |
4543 | 113 | dd_access_flags = tvb_get_ntohs(tvb, offset); |
4544 | 113 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(dd_access_flags, F_ISNS_DD_ACCESS_ENABLED)) |
4545 | 69 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4546 | | |
4547 | 113 | offset += 2; |
4548 | 113 | administrative_flags = tvb_get_ntohs(tvb, offset); |
4549 | 113 | if (administrative_flags & F_ISNS_ADMIN_FLAGS_ENABLED) { |
4550 | 65 | if ((administrative_flags & F_ISNS_ADMIN_FLAGS_HEARTBEAT)) { |
4551 | 42 | if (length < 18) { |
4552 | 1 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length must be >= 18"); |
4553 | 1 | return offset; |
4554 | 1 | } |
4555 | 41 | heartbeat_set = 1; |
4556 | 41 | } |
4557 | 65 | } |
4558 | 112 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_administrative_flags, |
4559 | 112 | ett_dhcp_isns_administrative_flags, isns_administrative_flags, ENC_BIG_ENDIAN); |
4560 | 112 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(administrative_flags, F_ISNS_ADMIN_FLAGS_ENABLED)) |
4561 | 46 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4562 | | |
4563 | 112 | offset += 2; |
4564 | 112 | item = proto_tree_add_bitmask(tree, tvb, offset, hf_dhcp_option_isns_server_security_bitmap, |
4565 | 112 | ett_dhcp_isns_server_security_bitmap, isns_server_security_flags, ENC_BIG_ENDIAN); |
4566 | 112 | server_security_flags = tvb_get_ntohl(tvb, offset); |
4567 | 112 | if (ISNS_BITFIELD_NZ_MUST_BE_IGNORED(server_security_flags, F_ISNS_SRV_SEC_BITMAP_ENABLED)) |
4568 | 44 | expert_add_info(pinfo, item, &ei_dhcp_option_isns_ignored_bitfield); |
4569 | | |
4570 | 112 | offset += 4; |
4571 | 112 | if (heartbeat_set) { |
4572 | 41 | proto_tree_add_item(tree, hf_dhcp_option_isns_heartbeat_originator_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
4573 | 41 | offset += 4; |
4574 | 41 | } |
4575 | | |
4576 | 112 | proto_tree_add_item(tree, hf_dhcp_option_isns_primary_server_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
4577 | | |
4578 | 112 | offset += 4; |
4579 | 112 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
4580 | 110 | server_tree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_dhcp_isns_secondary_server_addr, |
4581 | 110 | &item, "Secondary iSNS Servers"); |
4582 | 110 | dhcp_handle_basic_types(pinfo, server_tree, item, tvb, ipv4_list, offset, tvb_reported_length_remaining(tvb, offset), |
4583 | 110 | &hf_dhcp_option_isns_secondary_server_addr_list, NULL); |
4584 | 110 | } |
4585 | | |
4586 | 112 | return tvb_captured_length(tvb); |
4587 | 113 | } |
4588 | | |
4589 | | static const value_string option43_cl_suboption_vals[] = { |
4590 | | { 0, "Padding" }, |
4591 | | { 1, "Suboption Request List" }, |
4592 | | { 2, "Device Type" }, |
4593 | | { 3, "eSAFE Types" }, |
4594 | | { 4, "Serial Number" }, |
4595 | | { 5, "Hardware Version" }, |
4596 | | { 6, "Software Version" }, |
4597 | | { 7, "Boot ROM version" }, |
4598 | | { 8, "Organizationally Unique Identifier" }, |
4599 | | { 9, "Model Number" }, |
4600 | | { 10, "Vendor Name" }, |
4601 | | { 11, "Address Realm" }, |
4602 | | { 12, "CM/PS System Description" }, |
4603 | | { 13, "CM/PS Firmware Revision" }, |
4604 | | { 14, "Firewall Policy File Version" }, |
4605 | | { 15, "eSafe Config File Devices" }, |
4606 | | { 18, "Video Security Type" }, |
4607 | | { 31, "MTA MAC Address" }, |
4608 | | { 32, "Correlation ID" }, |
4609 | | { 51, "Vendor Name" }, |
4610 | | { 52, "CableCARD Capability" }, |
4611 | | { 53, "Device Identification (CA)" }, |
4612 | | { 54, "Device Identification (X.509)" }, |
4613 | | { 179, "LCM Server" }, |
4614 | | { 180, "LCM Domain" }, |
4615 | | { 181, "LCM NIC option 0" }, |
4616 | | { 190, "LCM Workgroup" }, |
4617 | | { 191, "Discovery" }, |
4618 | | { 192, "HH Configured" }, |
4619 | | { 193, "LCM Version" }, |
4620 | | { 194, "LCM Serial Number" }, |
4621 | | { 255, "CL End" }, |
4622 | | { 0, NULL} |
4623 | | }; |
4624 | | |
4625 | | static const value_string cablehome_subopt11_vals[] = { |
4626 | | { 1, "PS WAN-Man" }, |
4627 | | { 2, "PS WAN-Data" }, |
4628 | | { 0, NULL } |
4629 | | }; |
4630 | | |
4631 | | static int |
4632 | | dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
4633 | | tvbuff_t *tvb, int optoff, int optend) |
4634 | 4.90k | { |
4635 | 4.90k | int suboptoff = optoff; |
4636 | 4.90k | uint8_t subopt; |
4637 | 4.90k | uint8_t subopt_len; |
4638 | 4.90k | proto_tree *o43cl_v_tree; |
4639 | 4.90k | proto_item *vti; |
4640 | | |
4641 | 4.90k | static const struct basic_types_hfs default_hfs = { |
4642 | 4.90k | &hf_dhcp_option43_value, |
4643 | 4.90k | NULL, |
4644 | 4.90k | NULL, |
4645 | 4.90k | &hf_dhcp_option43_value_stringz, |
4646 | 4.90k | NULL, |
4647 | 4.90k | &hf_dhcp_option43_value_8, |
4648 | 4.90k | NULL, |
4649 | 4.90k | NULL, |
4650 | 4.90k | &hf_dhcp_option43_value_32, |
4651 | 4.90k | NULL, |
4652 | 4.90k | NULL |
4653 | 4.90k | }; |
4654 | | |
4655 | 4.90k | static const struct opt_info o43cablelabs_opt[]= { |
4656 | 4.90k | /* 0 */ {"nop", special, &hf_dhcp_option43_cl_padding}, /* dummy */ |
4657 | 4.90k | /* 1 */ {"Suboption Request List", string, &hf_dhcp_option43_cl_suboption_request_list}, |
4658 | 4.90k | /* 2 */ {"Device Type", string, &hf_dhcp_option43_cl_device_type}, |
4659 | 4.90k | /* 3 */ {"eSAFE Types", string, &hf_dhcp_option43_cl_esafe_type}, |
4660 | 4.90k | /* 4 */ {"Serial Number", string, &hf_dhcp_option43_cl_serial_number}, |
4661 | 4.90k | /* 5 */ {"Hardware Version", string, &hf_dhcp_option43_cl_hardware_version}, |
4662 | 4.90k | /* 6 */ {"Software Version", string, &hf_dhcp_option43_cl_software_version}, |
4663 | 4.90k | /* 7 */ {"Boot ROM version", string, &hf_dhcp_option43_cl_boot_rom_version}, |
4664 | 4.90k | /* 8 */ {"Organizationally Unique Identifier", special, &hf_dhcp_option43_cl_oui_bytes}, |
4665 | 4.90k | /* 9 */ {"Model Number", string, &hf_dhcp_option43_cl_model_number}, |
4666 | 4.90k | /* 10 */ {"Vendor Name", string, &hf_dhcp_option43_cl_vendor_name10}, |
4667 | | /* *** 11-30: CableHome *** */ |
4668 | 4.90k | /* 11 */ {"Address Realm", val_u_byte, &hf_dhcp_option43_cl_address_realm}, |
4669 | 4.90k | /* 12 */ {"CM/PS System Description", string, &hf_dhcp_option43_cl_cm_ps_system_desc}, |
4670 | 4.90k | /* 13 */ {"CM/PS Firmware Revision", string, &hf_dhcp_option43_cl_cm_ps_firmware_revision}, |
4671 | 4.90k | /* 14 */ {"Firewall Policy File Version", string, &hf_dhcp_option43_cl_firewall_policy_file_version}, |
4672 | 4.90k | /* 15 */ {"eSafe Config File Devices", string, &hf_dhcp_option43_cl_esafe_config_file_devices}, |
4673 | 4.90k | /* 16 */ {"Unassigned (CableHome)", special, NULL}, |
4674 | 4.90k | /* 17 */ {"Unassigned (CableHome)", special, NULL}, |
4675 | 4.90k | /* 18 */ {"Video Security Type", string, &hf_dhcp_option43_cl_video_security_tape}, |
4676 | 4.90k | /* 19 */ {"Unassigned (CableHome)", special, NULL}, |
4677 | 4.90k | /* 20 */ {"Unassigned (CableHome)", special, NULL}, |
4678 | 4.90k | /* 21 */ {"Unassigned (CableHome)", special, NULL}, |
4679 | 4.90k | /* 22 */ {"Unassigned (CableHome)", special, NULL}, |
4680 | 4.90k | /* 23 */ {"Unassigned (CableHome)", special, NULL}, |
4681 | 4.90k | /* 24 */ {"Unassigned (CableHome)", special, NULL}, |
4682 | 4.90k | /* 25 */ {"Unassigned (CableHome)", special, NULL}, |
4683 | 4.90k | /* 26 */ {"Unassigned (CableHome)", special, NULL}, |
4684 | 4.90k | /* 27 */ {"Unassigned (CableHome)", special, NULL}, |
4685 | 4.90k | /* 28 */ {"Unassigned (CableHome)", special, NULL}, |
4686 | 4.90k | /* 29 */ {"Unassigned (CableHome)", special, NULL}, |
4687 | 4.90k | /* 30 */ {"Unassigned (CableHome)", special, NULL}, |
4688 | | /* *** 31-50: PacketCable *** */ |
4689 | 4.90k | /* 31 */ {"MTA MAC Address", special, &hf_dhcp_option43_cl_mta_mac_address}, |
4690 | 4.90k | /* 32 */ {"Correlation ID", val_u_long, &hf_dhcp_option43_cl_correlation_ID}, |
4691 | 4.90k | /* 33 */ {"Unassigned (PacketCable)", special, NULL}, |
4692 | 4.90k | /* 34 */ {"Unassigned (PacketCable)", special, NULL}, |
4693 | 4.90k | /* 35 */ {"Unassigned (PacketCable)", special, NULL}, |
4694 | 4.90k | /* 36 */ {"Unassigned (PacketCable)", special, NULL}, |
4695 | 4.90k | /* 37 */ {"Unassigned (PacketCable)", special, NULL}, |
4696 | 4.90k | /* 38 */ {"Unassigned (PacketCable)", special, NULL}, |
4697 | 4.90k | /* 39 */ {"Unassigned (PacketCable)", special, NULL}, |
4698 | 4.90k | /* 40 */ {"Unassigned (PacketCable)", special, NULL}, |
4699 | 4.90k | /* 41 */ {"Unassigned (PacketCable)", special, NULL}, |
4700 | 4.90k | /* 42 */ {"Unassigned (PacketCable)", special, NULL}, |
4701 | 4.90k | /* 43 */ {"Unassigned (PacketCable)", special, NULL}, |
4702 | 4.90k | /* 44 */ {"Unassigned (PacketCable)", special, NULL}, |
4703 | 4.90k | /* 45 */ {"Unassigned (PacketCable)", special, NULL}, |
4704 | 4.90k | /* 46 */ {"Unassigned (PacketCable)", special, NULL}, |
4705 | 4.90k | /* 47 */ {"Unassigned (PacketCable)", special, NULL}, |
4706 | 4.90k | /* 48 */ {"Unassigned (PacketCable)", special, NULL}, |
4707 | 4.90k | /* 49 */ {"Unassigned (PacketCable)", special, NULL}, |
4708 | 4.90k | /* 50 */ {"Unassigned (PacketCable)", special, NULL}, |
4709 | | /* *** 51-127: CableLabs *** */ |
4710 | 4.90k | /* 51 */ {"Vendor Name", string, &hf_dhcp_option43_cl_vendor_name51}, |
4711 | 4.90k | /* 52 */ {"CableCARD Capability", special, &hf_dhcp_option43_cl_cablecard_capability}, |
4712 | 4.90k | /* 53 */ {"Device Identification (CA)", special, &hf_dhcp_option43_cl_device_id_ca}, |
4713 | 4.90k | /* 54 */ {"Device Identification (X.509)", string, &hf_dhcp_option43_cl_device_id_x509}, |
4714 | 4.90k | /* 55 */ {"Unassigned (CableLabs)", special, NULL}, |
4715 | | /* *** 128-254: Vendors *** */ |
4716 | | /* 128-254 {"Unassigned (Vendors)", special, NULL}, */ |
4717 | | /* 255 {"end options", special, &hf_dhcp_option43_cl_end} */ |
4718 | 4.90k | }; |
4719 | | |
4720 | 4.90k | subopt = tvb_get_uint8(tvb, optoff); |
4721 | 4.90k | suboptoff++; |
4722 | | |
4723 | 4.90k | if (subopt == 0) { |
4724 | 1.89k | proto_tree_add_item(v_tree, hf_dhcp_option43_cl_padding, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4725 | 1.89k | return (suboptoff); |
4726 | 3.00k | } else if (subopt == 255) { /* End Option */ |
4727 | 7 | proto_tree_add_item(v_tree, hf_dhcp_option43_cl_end, tvb, optoff, 1, ENC_BIG_ENDIAN); |
4728 | | /* Make sure we skip any junk left this option */ |
4729 | 7 | return (optend); |
4730 | 7 | } |
4731 | | |
4732 | 3.00k | if (suboptoff >= optend) { |
4733 | 14 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
4734 | 14 | "Suboption %d: no room left in option for suboption length", subopt); |
4735 | 14 | return (optend); |
4736 | 14 | } |
4737 | | |
4738 | 2.98k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
4739 | 2.98k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_cl_suboption, |
4740 | 2.98k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
4741 | 2.98k | subopt, val_to_str_const(subopt, option43_cl_suboption_vals, "Unknown")); |
4742 | | |
4743 | 2.98k | o43cl_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
4744 | 2.98k | proto_tree_add_item(o43cl_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4745 | 2.98k | suboptoff++; |
4746 | | |
4747 | 2.98k | if (suboptoff+subopt_len > optend) { |
4748 | 62 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
4749 | 62 | "Suboption %d: no room left in option for suboption value", subopt); |
4750 | 62 | return (optend); |
4751 | 62 | } |
4752 | | |
4753 | 2.92k | if ( (subopt < 1 ) || (subopt >= array_length(o43cablelabs_opt)) ) { |
4754 | 516 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4755 | 2.40k | } else if (o43cablelabs_opt[subopt].ftype == special) { |
4756 | 1.41k | switch(subopt) |
4757 | 1.41k | { |
4758 | 489 | case 8:/* OUI */ |
4759 | | /* CableLabs specs treat 43.8 inconsistently |
4760 | | * as either binary (3b) or string (6b) */ |
4761 | 489 | if (subopt_len == 3) { |
4762 | 105 | proto_tree_add_bytes_format_value(o43cl_v_tree, hf_dhcp_option43_cl_oui_bytes, tvb, suboptoff, subopt_len, NULL, |
4763 | 105 | "%02x:%02x:%02x", tvb_get_uint8(tvb, suboptoff), tvb_get_uint8(tvb, suboptoff+1), tvb_get_uint8(tvb, suboptoff+2)); |
4764 | 384 | } else if (subopt_len == 6) { |
4765 | 81 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_cl_oui_string, tvb, suboptoff, subopt_len, ENC_ASCII); |
4766 | 303 | } else { |
4767 | 303 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 3 or 6"); |
4768 | 303 | } |
4769 | 489 | break; |
4770 | 256 | case 31: /* MTA MAC address */ |
4771 | 256 | if (subopt_len != 6) { |
4772 | 164 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 6"); |
4773 | 164 | break; |
4774 | 164 | } |
4775 | | |
4776 | 92 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_cl_mta_mac_address, tvb, suboptoff, 6, ENC_NA); |
4777 | 92 | break; |
4778 | 668 | default: |
4779 | 668 | if (o43cablelabs_opt[subopt].phf != NULL) |
4780 | 281 | proto_tree_add_item(o43cl_v_tree, *o43cablelabs_opt[subopt].phf, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4781 | 387 | else |
4782 | 387 | proto_tree_add_item(o43cl_v_tree, hf_dhcp_option43_value, tvb, suboptoff, subopt_len, ENC_NA); |
4783 | 1.41k | } |
4784 | 1.41k | } |
4785 | 996 | else { |
4786 | 996 | if (dhcp_handle_basic_types(pinfo, o43cl_v_tree, vti, tvb, o43cablelabs_opt[subopt].ftype, |
4787 | 996 | suboptoff, subopt_len, o43cablelabs_opt[subopt].phf, &default_hfs) == 0) { |
4788 | 544 | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); |
4789 | 544 | } |
4790 | 996 | } |
4791 | | |
4792 | 2.92k | optoff += (subopt_len + 2); |
4793 | 2.92k | return optoff; |
4794 | 2.92k | } |
4795 | | |
4796 | | static bool |
4797 | | dissect_cablelabs_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
4798 | 1.21k | { |
4799 | 1.21k | int offset = 0; |
4800 | 1.21k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4801 | 1.21k | proto_tree* vendor_tree; |
4802 | | |
4803 | | /* Vendor Class IDs |
4804 | | * DOCSIS - docsis |
4805 | | * CableHome - CableHome |
4806 | | * OpenCable2.0 - OpenCable2.0 |
4807 | | * PacketCable - pktc |
4808 | | * DEMARC - DEMARC |
4809 | | * sRouter - SROUTER |
4810 | | * Remote PHY - RPD |
4811 | | * eDOCSIS - PTA or ECM |
4812 | | * OpenCable TRIF - TR |
4813 | | */ |
4814 | | |
4815 | 1.21k | if ((option_data->vendor_class_id != NULL) && |
4816 | 956 | ((strncmp((const char*)option_data->vendor_class_id, "pktc", strlen("pktc")) == 0) || |
4817 | 932 | (strncmp((const char*)option_data->vendor_class_id, "docsis", strlen("docsis")) == 0) || |
4818 | 894 | (strncmp((const char*)option_data->vendor_class_id, "OpenCable2.0", strlen("OpenCable2.0")) == 0) || |
4819 | 892 | (strncmp((const char*)option_data->vendor_class_id, "CableHome", strlen("CableHome")) == 0) || |
4820 | 887 | (strncmp((const char*)option_data->vendor_class_id, "RPD", strlen("RPD")) == 0) || |
4821 | 883 | (strncmp((const char*)option_data->vendor_class_id, "RMD", strlen("RMD")) == 0) || |
4822 | 877 | (strncmp((const char*)option_data->vendor_class_id, "ECM", strlen("ECM")) == 0) || |
4823 | 870 | (strncmp((const char*)option_data->vendor_class_id, "PTA", strlen("PTA")) == 0) || |
4824 | 867 | (strncmp((const char*)option_data->vendor_class_id, "DEMARC", strlen("DEMARC")) == 0) || |
4825 | 861 | (strncmp((const char*)option_data->vendor_class_id, "TR", strlen("TR")) == 0) || |
4826 | 857 | (strncmp((const char*)option_data->vendor_class_id, "SROUTER", strlen("SROUTER")) == 0))) { |
4827 | | /* CableLabs standard - see www.cablelabs.com/projects */ |
4828 | 101 | proto_item_append_text(tree, " (CableLabs)"); |
4829 | 101 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
4830 | | |
4831 | 5.00k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
4832 | 4.90k | offset = dissect_vendor_cablelabs_suboption(pinfo, tree, vendor_tree, |
4833 | 4.90k | tvb, offset, tvb_reported_length(tvb)); |
4834 | 4.90k | } |
4835 | 101 | return true; |
4836 | 101 | } |
4837 | | |
4838 | 1.11k | return false; |
4839 | 1.21k | } |
4840 | | |
4841 | | static bool |
4842 | | dissect_aruba_ap_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) |
4843 | 929 | { |
4844 | 929 | int offset = 0; |
4845 | 929 | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4846 | 929 | proto_tree* vendor_tree; |
4847 | | |
4848 | 929 | if ((option_data->vendor_class_id == NULL) || |
4849 | 690 | (strncmp((const char*)option_data->vendor_class_id, ARUBA_AP, strlen(ARUBA_AP)) != 0)) |
4850 | 927 | return false; |
4851 | | |
4852 | 2 | proto_item_append_text(tree, " (Aruba AP)"); |
4853 | 2 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
4854 | | |
4855 | 2 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaap_controllerip, tvb, offset, tvb_reported_length(tvb), ENC_ASCII); |
4856 | 2 | return true; |
4857 | 929 | } |
4858 | | |
4859 | | static bool |
4860 | | dissect_aruba_instant_ap_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data) |
4861 | 988 | { |
4862 | 988 | int offset = 0; |
4863 | 988 | int reported_len = tvb_reported_length(tvb); |
4864 | 988 | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
4865 | 988 | proto_tree* vendor_tree; |
4866 | 988 | proto_item* vendor_item; |
4867 | 988 | int32_t nameorglen, ampiplen; |
4868 | | |
4869 | | /* Aruba Instant AP */ |
4870 | 988 | if ((option_data->vendor_class_id == NULL) || |
4871 | 741 | (strncmp((const char*)option_data->vendor_class_id, ARUBA_INSTANT_AP, strlen(ARUBA_INSTANT_AP)) != 0)) |
4872 | 968 | return false; |
4873 | | |
4874 | 20 | proto_item_append_text(tree, " (Aruba Instant AP)"); |
4875 | | |
4876 | 20 | vendor_item = proto_tree_add_item(tree, hf_dhcp_option43_arubaiap, tvb, offset, reported_len, ENC_ASCII); |
4877 | 20 | vendor_tree = proto_item_add_subtree(vendor_item, ett_dhcp_option43_suboption); |
4878 | 20 | nameorglen = tvb_find_uint8(tvb, offset, tvb_reported_length(tvb), ','); |
4879 | 20 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaiap_nameorg, tvb, offset, nameorglen, ENC_ASCII); |
4880 | 20 | offset += (nameorglen+1); |
4881 | 20 | ampiplen = tvb_find_uint8(tvb, offset, reported_len-nameorglen-1, ',') - offset; |
4882 | 20 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaiap_ampip, tvb, offset, ampiplen, ENC_ASCII); |
4883 | 20 | offset += (ampiplen+1); |
4884 | 20 | proto_tree_add_item(vendor_tree, hf_dhcp_option43_arubaiap_password, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII); |
4885 | | |
4886 | 20 | return true; |
4887 | 988 | } |
4888 | | |
4889 | | static const value_string option43_bsdp_suboption_vals[] = { |
4890 | | { 0, "Pad" }, |
4891 | | { 1, "Message Type" }, |
4892 | | { 2, "Version" }, |
4893 | | { 3, "Server Identifier" }, |
4894 | | { 4, "Server Priority" }, |
4895 | | { 5, "Reply Port" }, |
4896 | | { 6, "Boot Image List Path" }, |
4897 | | { 7, "Default Boot Image" }, |
4898 | | { 8, "Selected Boot Image" }, |
4899 | | { 9, "Boot Image List" }, |
4900 | | { 10, "NetBoot 1.0 Firmware" }, |
4901 | | { 11, "Boot Image Attributes Filter List" }, |
4902 | | { 12, "Maximum Message Size" }, |
4903 | | { 255, "End" }, |
4904 | | { 0, NULL} |
4905 | | }; |
4906 | | |
4907 | | static void |
4908 | | dissect_vendor_bsdp_boot_image(proto_tree *v_tree, tvbuff_t *tvb, int optoff) |
4909 | 2.14k | { |
4910 | 2.14k | static int * const dhcp_o43_bsdp_attributes_flags[] = { |
4911 | 2.14k | &hf_dhcp_option43_bsdp_boot_image_attribute_install, |
4912 | 2.14k | &hf_dhcp_option43_bsdp_boot_image_attribute_kind, |
4913 | 2.14k | &hf_dhcp_option43_bsdp_boot_image_attribute_reserved, |
4914 | 2.14k | NULL |
4915 | 2.14k | }; |
4916 | | |
4917 | 2.14k | 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); |
4918 | 2.14k | } |
4919 | | |
4920 | | static int |
4921 | | dissect_vendor_bsdp_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
4922 | | tvbuff_t *tvb, int optoff, int optend) |
4923 | 6.87k | { |
4924 | 6.87k | int suboptoff = optoff; |
4925 | 6.87k | int attributes_off; |
4926 | 6.87k | uint8_t subopt, string_len; |
4927 | 6.87k | uint8_t subopt_len, attributes_len; |
4928 | 6.87k | unsigned item_len; |
4929 | 6.87k | proto_tree *o43bsdp_v_tree, *o43bsdp_va_tree, *o43bsdp_vb_tree, *o43bsdp_vc_tree, *o43bsdp_vd_tree; |
4930 | 6.87k | proto_item *vti, *ti, *tj; |
4931 | | |
4932 | 6.87k | subopt = tvb_get_uint8(tvb, optoff); |
4933 | 6.87k | suboptoff++; |
4934 | | |
4935 | 6.87k | if (subopt == 0 || subopt == 255) { |
4936 | | /* Pad (0) and End (255) have implicit length of 1. */ |
4937 | 2.57k | item_len = 1; |
4938 | 4.30k | } else if (suboptoff >= optend) { |
4939 | 10 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
4940 | 10 | "Suboption %d: no room left in option for suboption length", subopt); |
4941 | 10 | return (optend); |
4942 | 4.29k | } else { |
4943 | 4.29k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
4944 | 4.29k | item_len = subopt_len + 2; |
4945 | 4.29k | } |
4946 | | |
4947 | 6.86k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_bsdp_suboption, |
4948 | 6.86k | tvb, optoff, item_len, subopt, "(%d) %s", |
4949 | 6.86k | subopt, val_to_str_const(subopt, option43_bsdp_suboption_vals, "Unknown")); |
4950 | 6.86k | if (item_len == 1) { |
4951 | 2.57k | return (optoff + 1); |
4952 | 2.57k | } |
4953 | | |
4954 | 4.29k | o43bsdp_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
4955 | 4.29k | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
4956 | 4.29k | suboptoff++; |
4957 | | |
4958 | 4.29k | if (suboptoff+subopt_len > optend) { |
4959 | 74 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
4960 | 74 | "Suboption %d: no room left in option for suboption value", subopt); |
4961 | 74 | return (optend); |
4962 | 74 | } |
4963 | | |
4964 | 4.22k | switch(subopt) |
4965 | 4.22k | { |
4966 | 336 | case 1: |
4967 | 336 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_message_type, tvb, suboptoff, subopt_len, ENC_NA); |
4968 | 336 | break; |
4969 | 248 | case 2: |
4970 | 248 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_version, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4971 | 248 | break; |
4972 | 303 | case 3: |
4973 | 303 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_server_identifier, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4974 | 303 | break; |
4975 | 260 | case 4: |
4976 | 260 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_server_priority, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4977 | 260 | break; |
4978 | 278 | case 5: |
4979 | 278 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_reply_port, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4980 | 278 | break; |
4981 | 321 | case 6: |
4982 | 321 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_boot_image_list_path, tvb, suboptoff, subopt_len, ENC_ASCII); |
4983 | 321 | break; |
4984 | 90 | case 7: |
4985 | 90 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_default_boot_image_id, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4986 | 90 | o43bsdp_va_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_boot_image); |
4987 | 90 | dissect_vendor_bsdp_boot_image(o43bsdp_va_tree, tvb, suboptoff); |
4988 | 90 | proto_tree_add_item(o43bsdp_va_tree, hf_dhcp_option43_bsdp_boot_image_index, tvb, suboptoff+2, subopt_len-2, ENC_BIG_ENDIAN); |
4989 | 90 | break; |
4990 | 114 | case 8: |
4991 | 114 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_selected_boot_image_id, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
4992 | 114 | o43bsdp_vc_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_boot_image); |
4993 | 114 | dissect_vendor_bsdp_boot_image(o43bsdp_vc_tree, tvb, suboptoff); |
4994 | 114 | proto_tree_add_item(o43bsdp_vc_tree, hf_dhcp_option43_bsdp_boot_image_index, tvb, suboptoff+2, subopt_len-2, ENC_BIG_ENDIAN); |
4995 | 114 | break; |
4996 | 454 | case 9: |
4997 | 454 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_boot_image_list, tvb, suboptoff, subopt_len, ENC_NA); |
4998 | 454 | attributes_len = subopt_len; |
4999 | 454 | attributes_off = suboptoff; |
5000 | 454 | o43bsdp_vd_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_image_desc_list); |
5001 | 1.21k | while (attributes_len >= 5) { |
5002 | 757 | string_len = tvb_get_uint8(tvb, attributes_off+4); |
5003 | 757 | if (string_len > 0) { |
5004 | 317 | tj = proto_tree_add_item(o43bsdp_vd_tree, hf_dhcp_option43_bsdp_image_desc, tvb, attributes_off, string_len+5, ENC_NA); |
5005 | 317 | o43bsdp_vb_tree = proto_item_add_subtree(tj, ett_dhcp_o43_bsdp_image_desc); |
5006 | 317 | dissect_vendor_bsdp_boot_image(o43bsdp_vb_tree, tvb, attributes_off); |
5007 | 317 | proto_tree_add_item(o43bsdp_vb_tree, hf_dhcp_option43_bsdp_boot_image_index, tvb, attributes_off+2, 2, ENC_BIG_ENDIAN); |
5008 | 317 | proto_tree_add_item(o43bsdp_vb_tree, hf_dhcp_option43_bsdp_boot_image_name_len, tvb, attributes_off+4, 1, ENC_BIG_ENDIAN); |
5009 | 317 | proto_tree_add_item(o43bsdp_vb_tree, hf_dhcp_option43_bsdp_boot_image_name, tvb, attributes_off+5, string_len, ENC_UTF_8); |
5010 | 317 | } |
5011 | 757 | attributes_off += 5 + string_len; |
5012 | 757 | attributes_len -= 5 + string_len; |
5013 | 757 | } |
5014 | 454 | break; |
5015 | 330 | case 10: |
5016 | 330 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_netboot_firmware, tvb, suboptoff, subopt_len, ENC_NA); |
5017 | 330 | break; |
5018 | 368 | case 11: |
5019 | 368 | ti = proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_attributes_filter_list, tvb, suboptoff, subopt_len, ENC_NA); |
5020 | 368 | attributes_len = subopt_len; |
5021 | 368 | attributes_off = suboptoff; |
5022 | 368 | o43bsdp_va_tree = proto_item_add_subtree(ti, ett_dhcp_o43_bsdp_attributes); |
5023 | 2.01k | while (attributes_len >= 2) { |
5024 | 1.64k | dissect_vendor_bsdp_boot_image(o43bsdp_va_tree, tvb, attributes_off); |
5025 | 1.64k | attributes_off+=2; |
5026 | 1.64k | attributes_len-=2; |
5027 | 1.64k | } |
5028 | 368 | break; |
5029 | 110 | case 12: |
5030 | 110 | proto_tree_add_item(o43bsdp_v_tree, hf_dhcp_option43_bsdp_message_size, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5031 | 110 | break; |
5032 | 4.22k | } |
5033 | | |
5034 | 4.19k | optoff += item_len; |
5035 | 4.19k | return optoff; |
5036 | 4.22k | } |
5037 | | |
5038 | | static bool |
5039 | | dissect_apple_bsdp_vendor_info_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
5040 | 1.21k | { |
5041 | 1.21k | int offset = 0; |
5042 | 1.21k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
5043 | 1.21k | proto_tree* vendor_tree; |
5044 | | |
5045 | 1.21k | if ((option_data->vendor_class_id == NULL) || |
5046 | 957 | (strncmp((const char*)option_data->vendor_class_id, APPLE_BSDP_SERVER, strlen(APPLE_BSDP_SERVER)) != 0)) |
5047 | 1.09k | return false; |
5048 | | |
5049 | | /* Apple BSDP */ |
5050 | 125 | proto_item_append_text(tree, " (Boot Server Discovery Protocol (BSDP))"); |
5051 | 125 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5052 | | |
5053 | 7.00k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5054 | 6.87k | offset = dissect_vendor_bsdp_suboption(pinfo, tree, vendor_tree, |
5055 | 6.87k | tvb, offset, tvb_reported_length(tvb)); |
5056 | 6.87k | } |
5057 | | |
5058 | 125 | return true; |
5059 | 1.21k | } |
5060 | | |
5061 | | /* Cisco Vendor Specific Information */ |
5062 | | |
5063 | | /* |
5064 | | { 1, "1" }, * D,R: 03 * |
5065 | | { 2, "2" }, * D,R: 01 * |
5066 | | { 3, "3" }, * D,R: 00 01 # O,A: 00 02 * |
5067 | | { 4, "Node ID" }, * O,A: 00 00 00 ca * |
5068 | | { 5, "5" }, * O,A: 01 * |
5069 | | { 6, "6" }, * D,R: 01 # O,A: 01 * |
5070 | | { 7, "Model" }, * D,R: N9K-C9336PQ * |
5071 | | { 8, "APIC UUID" }, * O,A: 09bced36-69f1-11e6-96ce-8baf09371338 * |
5072 | | { 9, "Fabricname" }, * O,A: ams-fab1 * |
5073 | | { 10, "10" }, * D,R: 00 00 00 01 * |
5074 | | { 11, "SerialNo" }, * D,R: SAL1926J4QW * |
5075 | | { 12, "Client Int" }, * D,O: eth1/20.20 # R,A: eth1/20.20 * |
5076 | | */ |
5077 | | static const value_string option43_cisco_suboption_vals[] = { |
5078 | | { 1, "Unk-1 (Node role?)" }, /* uint8 */ |
5079 | | { 2, "Unk-2 (Spine level?)" }, /* uint8 */ |
5080 | | { 3, "Unk-3 (Pod ID?)" }, /* uint16 */ |
5081 | | { 4, "Node ID" }, /* uint32 */ |
5082 | | { 5, "Unk-5" }, /* uint8 */ |
5083 | | { 6, "Unk-6" }, /* uint8 */ |
5084 | | { 7, "Model" }, /* String */ |
5085 | | { 8, "APIC UUID" }, /* String */ |
5086 | | { 9, "Fabricname" }, /* String */ |
5087 | | { 10, "Unk-10" }, /* uint32 */ |
5088 | | { 11, "SerialNo" }, /* String */ |
5089 | | { 12, "Interfacename" }, /* String */ |
5090 | | |
5091 | | { 0, NULL} |
5092 | | }; |
5093 | | |
5094 | | static int |
5095 | | dissect_vendor_cisco_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5096 | | tvbuff_t *tvb, int optoff, int optend) |
5097 | 703 | { |
5098 | 703 | int suboptoff = optoff; |
5099 | 703 | uint8_t subopt; |
5100 | 703 | uint8_t subopt_len; |
5101 | 703 | unsigned item_len; |
5102 | 703 | proto_tree *o43cisco_v_tree; |
5103 | 703 | proto_item *vti; |
5104 | | |
5105 | 703 | subopt = tvb_get_uint8(tvb, optoff); |
5106 | 703 | suboptoff++; |
5107 | | |
5108 | 703 | if (suboptoff >= optend) { |
5109 | 3 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5110 | 3 | "Suboption %d: No room left in option for suboption length", subopt); |
5111 | 3 | return (optend); |
5112 | 700 | } else { |
5113 | 700 | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5114 | 700 | item_len = subopt_len + 2; |
5115 | 700 | } |
5116 | | |
5117 | 700 | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_cisco_suboption, |
5118 | 700 | tvb, optoff, item_len, subopt, "(%d) %s", |
5119 | 700 | subopt, val_to_str_const(subopt, option43_cisco_suboption_vals, "Unknown")); |
5120 | | |
5121 | 700 | o43cisco_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
5122 | 700 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5123 | 700 | suboptoff++; |
5124 | | |
5125 | 700 | if (suboptoff+subopt_len > optend) { |
5126 | 17 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5127 | 17 | "Suboption %d: Not sufficient room left in option for suboption value", subopt); |
5128 | 17 | return (optend); |
5129 | 17 | } |
5130 | | |
5131 | 683 | switch(subopt) |
5132 | 683 | { |
5133 | 7 | case 1: |
5134 | 7 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown1, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5135 | 7 | break; |
5136 | 2 | case 2: |
5137 | 2 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown2, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5138 | 2 | break; |
5139 | 121 | case 3: |
5140 | 121 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown3, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5141 | 121 | break; |
5142 | 4 | case 4: |
5143 | 4 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_nodeid, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5144 | 4 | break; |
5145 | 4 | case 5: |
5146 | 4 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown5, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5147 | 4 | break; |
5148 | 14 | case 6: |
5149 | 14 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown6, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5150 | 14 | break; |
5151 | 6 | case 7: |
5152 | 6 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_model, tvb, suboptoff, subopt_len, ENC_ASCII); |
5153 | 6 | break; |
5154 | 34 | case 8: |
5155 | 34 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_apicuuid, tvb, suboptoff, subopt_len, ENC_ASCII); |
5156 | 34 | break; |
5157 | 1 | case 9: |
5158 | 1 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_fabricname, tvb, suboptoff, subopt_len, ENC_ASCII); |
5159 | 1 | break; |
5160 | 9 | case 10: |
5161 | 9 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown10, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5162 | 9 | break; |
5163 | 29 | case 11: |
5164 | 29 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_serialno, tvb, suboptoff, subopt_len, ENC_ASCII); |
5165 | 29 | break; |
5166 | 1 | case 12: |
5167 | 1 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_clientint, tvb, suboptoff, subopt_len, ENC_ASCII); |
5168 | 1 | break; |
5169 | 451 | default: |
5170 | 451 | proto_tree_add_item(o43cisco_v_tree, hf_dhcp_option43_cisco_unknown, tvb, suboptoff, subopt_len, ENC_NA); |
5171 | 683 | } |
5172 | | |
5173 | 683 | optoff += item_len; |
5174 | 683 | return optoff; |
5175 | 683 | } |
5176 | | |
5177 | | static bool |
5178 | | dissect_cisco_vendor_info_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
5179 | 1.04k | { |
5180 | 1.04k | int offset = 0; |
5181 | 1.04k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
5182 | 1.04k | proto_tree* vendor_tree; |
5183 | | |
5184 | 1.04k | if ((option_data->vendor_class_id == NULL) || |
5185 | 792 | (strncmp((const char*)option_data->vendor_class_id, CISCO_VCID, strlen(CISCO_VCID)) != 0)) |
5186 | 1.01k | return false; |
5187 | | |
5188 | | /* Cisco ACI Fabric*/ |
5189 | 25 | proto_item_append_text(tree, " (Cisco ACI Fabric)"); |
5190 | 25 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5191 | | |
5192 | 728 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5193 | 703 | offset = dissect_vendor_cisco_suboption(pinfo, tree, vendor_tree, |
5194 | 703 | tvb, offset, tvb_reported_length(tvb)); |
5195 | 703 | } |
5196 | | |
5197 | 25 | return true; |
5198 | 1.04k | } |
5199 | | |
5200 | | /* Aerohive (Extremenetworks) Vendor Specific Information */ |
5201 | | |
5202 | | static const value_string option43_aerohive_suboption_vals[] = { |
5203 | | { 225, "XiqHostname" }, /* String */ |
5204 | | { 226, "XiqIpAddress" }, /* Ipv4address */ |
5205 | | |
5206 | | { 0, NULL} |
5207 | | }; |
5208 | | |
5209 | | static int |
5210 | | dissect_vendor_aerohive_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5211 | | tvbuff_t *tvb, int optoff, int optend) |
5212 | 424 | { |
5213 | 424 | int suboptoff = optoff; |
5214 | 424 | uint8_t subopt; |
5215 | 424 | uint8_t subopt_len; |
5216 | 424 | unsigned item_len; |
5217 | 424 | proto_tree *o43aerohive_v_tree; |
5218 | 424 | proto_item *vti; |
5219 | | |
5220 | 424 | subopt = tvb_get_uint8(tvb, optoff); |
5221 | 424 | suboptoff++; |
5222 | | |
5223 | 424 | if (suboptoff >= optend) { |
5224 | 5 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5225 | 5 | "Suboption %d: No room left in option for suboption length", subopt); |
5226 | 5 | return (optend); |
5227 | 419 | } else { |
5228 | 419 | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5229 | 419 | item_len = subopt_len + 2; |
5230 | 419 | } |
5231 | | |
5232 | 419 | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_aerohive_suboption, |
5233 | 419 | tvb, optoff, item_len, subopt, "(%d) %s", |
5234 | 419 | subopt, val_to_str_const(subopt, option43_aerohive_suboption_vals, "Unknown")); |
5235 | | |
5236 | 419 | o43aerohive_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
5237 | 419 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5238 | 419 | suboptoff++; |
5239 | | |
5240 | 419 | if (suboptoff+subopt_len > optend) { |
5241 | 11 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5242 | 11 | "Suboption %d: Not sufficient room left in option for suboption value", subopt); |
5243 | 11 | return (optend); |
5244 | 11 | } |
5245 | | |
5246 | 408 | switch(subopt) |
5247 | 408 | { |
5248 | 1 | case 225: |
5249 | 1 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_option43_aerohive_xiqhostname, tvb, suboptoff, subopt_len, ENC_ASCII); |
5250 | 1 | break; |
5251 | 1 | case 226: |
5252 | 1 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_option43_aerohive_xiqipaddress, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); |
5253 | 1 | break; |
5254 | 406 | default: |
5255 | 406 | proto_tree_add_item(o43aerohive_v_tree, hf_dhcp_option43_aerohive_unknown, tvb, suboptoff, subopt_len, ENC_NA); |
5256 | 408 | } |
5257 | | |
5258 | 408 | optoff += item_len; |
5259 | 408 | return optoff; |
5260 | 408 | } |
5261 | | |
5262 | | static bool |
5263 | | dissect_aerohive_vendor_info_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
5264 | 1.02k | { |
5265 | 1.02k | int offset = 0; |
5266 | 1.02k | dhcp_option_data_t *option_data = (dhcp_option_data_t*)data; |
5267 | 1.02k | proto_tree* vendor_tree; |
5268 | | |
5269 | 1.02k | if ((option_data->vendor_class_id == NULL) || |
5270 | 771 | (strncmp((const char*)option_data->vendor_class_id, AEROHIVE_VCID, strlen(AEROHIVE_VCID)) != 0)) |
5271 | 1.00k | return false; |
5272 | | |
5273 | | /* Cisco ACI Fabric*/ |
5274 | 18 | proto_item_append_text(tree, " (Aerohive)"); |
5275 | 18 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5276 | | |
5277 | 442 | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5278 | 424 | offset = dissect_vendor_aerohive_suboption(pinfo, tree, vendor_tree, |
5279 | 424 | tvb, offset, tvb_reported_length(tvb)); |
5280 | 424 | } |
5281 | | |
5282 | 18 | return true; |
5283 | 1.02k | } |
5284 | | |
5285 | | static int |
5286 | | dissect_vendor_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5287 | | tvbuff_t *tvb, uint32_t optoff, uint32_t optend) |
5288 | 1.05k | { |
5289 | 1.05k | uint32_t suboptoff = optoff; |
5290 | 1.05k | uint8_t subopt; |
5291 | 1.05k | uint32_t subopt_len; |
5292 | 1.05k | proto_item *item; |
5293 | 1.05k | proto_tree *sub_tree; |
5294 | | |
5295 | 1.05k | item = proto_tree_add_item(v_tree, hf_dhcp_vendor_unknown_suboption, tvb, optoff, 1, ENC_NA); |
5296 | 1.05k | subopt = tvb_get_uint8(tvb, optoff); |
5297 | | |
5298 | 1.05k | suboptoff+=1; |
5299 | | |
5300 | 1.05k | if (suboptoff >= optend) { |
5301 | 150 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5302 | 150 | "Suboption %d: no room left in option for suboption length", subopt); |
5303 | 150 | return (optend); |
5304 | 150 | } |
5305 | | |
5306 | 904 | sub_tree = proto_item_add_subtree(item, ett_dhcp_option125_suboption); |
5307 | 904 | proto_tree_add_item_ret_uint(sub_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_NA, &subopt_len); |
5308 | 904 | suboptoff++; |
5309 | | |
5310 | 904 | if (suboptoff+subopt_len > optend) { |
5311 | 243 | expert_add_info_format(pinfo, item, &ei_dhcp_missing_subopt_value, |
5312 | 243 | "Suboption %d: no room left in option for suboption value", subopt); |
5313 | 243 | return (optend); |
5314 | 243 | } |
5315 | | |
5316 | 661 | proto_tree_add_item(sub_tree, hf_dhcp_suboption_data, tvb, suboptoff, subopt_len, ENC_NA); |
5317 | 661 | suboptoff+= subopt_len; |
5318 | | |
5319 | 661 | return suboptoff; |
5320 | | |
5321 | 904 | } |
5322 | | |
5323 | | static int |
5324 | | dissect_dhcpopt_vi_vendor_specific_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5325 | 428 | { |
5326 | 428 | uint32_t offset = 0; |
5327 | 428 | uint32_t enterprise = 0; |
5328 | 428 | uint32_t s_end = 0; |
5329 | 428 | uint32_t option_data_len = 0; |
5330 | 428 | proto_item *vti; |
5331 | 428 | proto_tree *e_tree; |
5332 | | |
5333 | 2.52k | while (tvb_reported_length_remaining(tvb, offset) >= 5) { |
5334 | | |
5335 | 2.09k | vti = proto_tree_add_item_ret_uint(tree, hf_dhcp_option125_enterprise, tvb, offset, 4, ENC_BIG_ENDIAN, &enterprise); |
5336 | 2.09k | e_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
5337 | 2.09k | offset += 4; |
5338 | | |
5339 | 2.09k | proto_tree_add_item_ret_uint(e_tree, hf_dhcp_option125_length, tvb, offset, 1, ENC_NA, &option_data_len); |
5340 | 2.09k | offset += 1; |
5341 | | |
5342 | 2.09k | s_end = offset + option_data_len; |
5343 | 2.09k | if ( tvb_reported_length_remaining(tvb, s_end) < 0 ) { |
5344 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise); |
5345 | 0 | break; |
5346 | 0 | } |
5347 | | |
5348 | 11.9k | while (offset < s_end) { |
5349 | 9.86k | tvbuff_t *enterprise_tvb = tvb_new_subset_length(tvb, offset, option_data_len); |
5350 | 9.86k | int bytes_dissected = dissector_try_uint(dhcp_enterprise_specific_table, enterprise, enterprise_tvb, pinfo, e_tree); |
5351 | 9.86k | if (bytes_dissected == 0) { |
5352 | 1.05k | offset = dissect_vendor_generic_suboption(pinfo, vti, e_tree, tvb, offset, s_end); |
5353 | 8.80k | } else{ |
5354 | 8.80k | offset += bytes_dissected; |
5355 | 8.80k | } |
5356 | 9.86k | } |
5357 | 2.09k | } |
5358 | | |
5359 | 428 | if (tvb_reported_length_remaining(tvb, offset) > 0) { |
5360 | 12 | expert_add_info_format(pinfo, tree, &ei_dhcp_bad_length, "length < 5"); |
5361 | 12 | } |
5362 | | |
5363 | 428 | return tvb_captured_length(tvb); |
5364 | 428 | } |
5365 | | |
5366 | | static const value_string option43_alcatel_suboption_vals[] = { |
5367 | | { 0, "Padding" }, |
5368 | | { 58, "Voice VLAN ID" }, |
5369 | | { 64, "Spatial Redundancy TFTP1" }, |
5370 | | { 65, "Spatial Redundancy TFTP2" }, |
5371 | | { 66, "Application Type" }, |
5372 | | { 67, "SIP URL" }, |
5373 | | { 255, "Alcatel-Lucent End" }, |
5374 | | { 0, NULL} |
5375 | | }; |
5376 | | |
5377 | | static const value_string option43_alcatel_app_type_vals[] = { |
5378 | | { 0, "NOE" }, |
5379 | | { 1, "SIP" }, |
5380 | | { 0, NULL} |
5381 | | }; |
5382 | | |
5383 | | /* If an Alcatel-Lucent Option 43 suboption has a known fixed length, |
5384 | | * return that length. Returns 0 for variable length options and unknown |
5385 | | * options. |
5386 | | */ |
5387 | | static unsigned |
5388 | | get_alcatel_suboption_len(unsigned subopt) |
5389 | 1.99k | { |
5390 | 1.99k | switch(subopt) { |
5391 | 234 | case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */ |
5392 | 234 | return 2; |
5393 | 210 | case 64: /* 0x40 - Alcatel-Lucent TFTP1 */ |
5394 | 210 | return 4; |
5395 | 237 | case 65: /* 0x41 - Alcatel-Lucent TFTP2 */ |
5396 | 237 | return 4; |
5397 | 152 | case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */ |
5398 | 152 | return 1; |
5399 | 0 | case 0: /* Alcatel-Lucent Padding */ |
5400 | 556 | case 67: /* 0x43 - Alcatel-Lucent SIP URL */ |
5401 | 556 | case 255: /* Alcatel-Lucent End */ |
5402 | 1.16k | default: |
5403 | 1.16k | return 0; |
5404 | 1.99k | } |
5405 | 1.99k | } |
5406 | | |
5407 | | static int |
5408 | | dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5409 | | tvbuff_t *tvb, int optoff, int optend) |
5410 | 1.96k | { |
5411 | 1.96k | int suboptoff = optoff; |
5412 | 1.96k | uint8_t subopt; |
5413 | 1.96k | uint8_t subopt_len; |
5414 | 1.96k | proto_item *vti; |
5415 | 1.96k | proto_tree *o43alcatel_v_tree; |
5416 | | |
5417 | 1.96k | subopt = tvb_get_uint8(tvb, optoff); |
5418 | 1.96k | suboptoff++; |
5419 | | |
5420 | 1.96k | if (subopt == 0) { |
5421 | 1.32k | proto_tree_add_item(v_tree, hf_dhcp_option43_alcatel_padding, tvb, optoff, 1, ENC_BIG_ENDIAN); |
5422 | 1.32k | return (suboptoff); |
5423 | 1.32k | } else if (subopt == 255) { /* End Option */ |
5424 | 4 | proto_tree_add_item(v_tree, hf_dhcp_option43_alcatel_end, tvb, optoff, 1, ENC_BIG_ENDIAN); |
5425 | | /* Make sure we skip any junk left this option */ |
5426 | 4 | return (optend); |
5427 | 4 | } |
5428 | | |
5429 | 635 | if (suboptoff >= optend) { |
5430 | 0 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5431 | 0 | "Suboption %d: no room left in option for suboption length", subopt); |
5432 | 0 | return (optend); |
5433 | 0 | } |
5434 | | |
5435 | 635 | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5436 | 635 | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option43_alcatel_suboption, |
5437 | 635 | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
5438 | 635 | subopt, val_to_str_const(subopt, option43_alcatel_suboption_vals, "Unknown")); |
5439 | | |
5440 | 635 | o43alcatel_v_tree = proto_item_add_subtree(vti, ett_dhcp_option43_suboption); |
5441 | 635 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5442 | 635 | suboptoff++; |
5443 | | |
5444 | 635 | if (suboptoff+subopt_len > optend) { |
5445 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5446 | 0 | "Suboption %d: no room left in option for suboption value", subopt); |
5447 | 0 | return (optend); |
5448 | 0 | } |
5449 | | |
5450 | 635 | unsigned subopt_len_expected = get_alcatel_suboption_len(subopt); |
5451 | 635 | if (subopt_len_expected && subopt_len_expected != subopt_len) { |
5452 | 0 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't %u", subopt_len_expected); |
5453 | 0 | return optend; |
5454 | 0 | } |
5455 | 635 | switch (subopt) |
5456 | 635 | { |
5457 | 93 | case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */ |
5458 | 93 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_vlan_id, tvb, suboptoff, 2, ENC_BIG_ENDIAN); |
5459 | 93 | break; |
5460 | 94 | case 64: /* 0x40 - Alcatel-Lucent TFTP1 */ |
5461 | 94 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_tftp1, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
5462 | 94 | break; |
5463 | 96 | case 65: /* 0x41 - Alcatel-Lucent TFTP2 */ |
5464 | 96 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_tftp2, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
5465 | 96 | break; |
5466 | 68 | case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */ |
5467 | 68 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_app_type, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5468 | 68 | break; |
5469 | 257 | case 67: /* 0x43 - Alcatel-Lucent SIP URL */ |
5470 | 257 | proto_tree_add_item(o43alcatel_v_tree, hf_dhcp_option43_alcatel_sip_url, tvb, suboptoff, subopt_len, ENC_ASCII); |
5471 | 257 | break; |
5472 | 27 | default: |
5473 | 27 | expert_add_info_format(pinfo, vti, &ei_dhcp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); |
5474 | 27 | return optend; |
5475 | 635 | } |
5476 | | |
5477 | 608 | optoff += (subopt_len + 2); |
5478 | 608 | return optoff; |
5479 | 635 | } |
5480 | | |
5481 | | static bool |
5482 | | dissect_alcatel_lucent_vendor_info_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) |
5483 | 1.10k | { |
5484 | 1.10k | int offset = 0; |
5485 | 1.10k | uint8_t s_option; |
5486 | 1.10k | proto_tree* vendor_tree; |
5487 | | |
5488 | 1.10k | if (tvb_reported_length(tvb) < 1) |
5489 | 237 | return false; |
5490 | | |
5491 | 868 | s_option = tvb_get_uint8(tvb, offset); |
5492 | 868 | if ((s_option==58 || s_option==64 || s_option==65 |
5493 | 831 | || s_option==66 || s_option==67) |
5494 | 97 | && test_encapsulated_vendor_options(tvb, offset, tvb_reported_length(tvb), get_alcatel_suboption_len)) { |
5495 | | |
5496 | | /* Alcatel-Lucent DHCP Extensions */ |
5497 | 45 | proto_item_append_text(tree, " (Alcatel-Lucent)"); |
5498 | 45 | vendor_tree = proto_item_add_subtree(tree, ett_dhcp_option); |
5499 | | |
5500 | 2.00k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5501 | 1.96k | offset = dissect_vendor_alcatel_suboption(pinfo, tree, vendor_tree, |
5502 | 1.96k | tvb, offset, tvb_reported_length(tvb)); |
5503 | 1.96k | } |
5504 | 45 | return true; |
5505 | 45 | } |
5506 | | |
5507 | 823 | return false; |
5508 | 868 | } |
5509 | | |
5510 | | static const value_string option63_suboption_vals[] = { |
5511 | | { 1, "NWIP does not exist on subnet" }, |
5512 | | { 2, "NWIP exists in options area" }, |
5513 | | { 3, "NWIP exists in sname/file" }, |
5514 | | { 4, "NWIP exists, but too big" }, |
5515 | | { 5, "Broadcast for nearest Netware server" }, |
5516 | | { 6, "Preferred DSS server" }, |
5517 | | { 7, "Nearest NWIP server" }, |
5518 | | { 8, "Autoretries" }, |
5519 | | { 9, "Autoretry delay, secs" }, |
5520 | | { 10, "Support NetWare/IP v1.1" }, |
5521 | | { 11, "Primary DSS" }, |
5522 | | { 0, NULL } |
5523 | | }; |
5524 | | |
5525 | | static int |
5526 | | dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
5527 | | tvbuff_t *tvb, int optoff, int optend) |
5528 | 1.96k | { |
5529 | 1.96k | int suboptoff = optoff; |
5530 | 1.96k | uint8_t subopt, subopt_len; |
5531 | 1.96k | proto_tree *o63_v_tree; |
5532 | 1.96k | proto_item *vti, *ti; |
5533 | | |
5534 | 1.96k | static const struct basic_types_hfs default_hfs = { |
5535 | 1.96k | NULL, |
5536 | 1.96k | &hf_dhcp_option63_value_ip_address, |
5537 | 1.96k | &hf_dhcp_option63_value_ip_address, |
5538 | 1.96k | NULL, |
5539 | 1.96k | &hf_dhcp_option63_value_boolean, |
5540 | 1.96k | &hf_dhcp_option63_value_8, |
5541 | 1.96k | NULL, |
5542 | 1.96k | NULL, |
5543 | 1.96k | NULL, |
5544 | 1.96k | NULL, |
5545 | 1.96k | NULL |
5546 | 1.96k | }; |
5547 | | |
5548 | 1.96k | static const struct opt_info o63_opt[]= { |
5549 | 1.96k | /* 0 */ {"",none,NULL}, |
5550 | 1.96k | /* 1 */ {"NWIP does not exist on subnet",presence,NULL}, |
5551 | 1.96k | /* 2 */ {"NWIP exists in options area",presence,NULL}, |
5552 | 1.96k | /* 3 */ {"NWIP exists in sname/file",presence,NULL}, |
5553 | 1.96k | /* 4 */ {"NWIP exists, but too big",presence,NULL}, |
5554 | 1.96k | /* 5 */ {"Broadcast for nearest Netware server",val_boolean, &hf_dhcp_option63_broadcast}, |
5555 | 1.96k | /* 6 */ {"Preferred DSS server",ipv4_list,&hf_dhcp_option63_preferred_dss_server}, |
5556 | 1.96k | /* 7 */ {"Nearest NWIP server",ipv4_list,&hf_dhcp_option63_nearest_nwip_server}, |
5557 | 1.96k | /* 8 */ {"Autoretries",val_u_byte,&hf_dhcp_option63_autoretries}, |
5558 | 1.96k | /* 9 */ {"Autoretry delay, secs",val_u_byte,&hf_dhcp_option63_autoretry_delay}, |
5559 | 1.96k | /* 10*/ {"Support NetWare/IP v1.1",val_boolean,&hf_dhcp_option63_support_netware_v1_1}, |
5560 | 1.96k | /* 11*/ {"Primary DSS",ipv4,&hf_dhcp_option63_primary_dss} |
5561 | 1.96k | }; |
5562 | | |
5563 | 1.96k | subopt = tvb_get_uint8(tvb, optoff); |
5564 | 1.96k | suboptoff++; |
5565 | | |
5566 | 1.96k | if (suboptoff >= optend) { |
5567 | 13 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
5568 | 13 | "Suboption %d: no room left in option for suboption length", subopt); |
5569 | 13 | return (optend); |
5570 | 13 | } |
5571 | | |
5572 | 1.94k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
5573 | 1.94k | vti = proto_tree_add_uint_format_value(v_tree, hf_dhcp_option63_suboption, |
5574 | 1.94k | tvb, optoff, subopt_len+2, subopt, "(%d) %s", |
5575 | 1.94k | subopt, val_to_str_const(subopt, option63_suboption_vals, "Unknown")); |
5576 | | |
5577 | 1.94k | o63_v_tree = proto_item_add_subtree(vti, ett_dhcp_option63_suboption); |
5578 | 1.94k | proto_tree_add_item(o63_v_tree, hf_dhcp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN); |
5579 | 1.94k | suboptoff++; |
5580 | | |
5581 | 1.94k | ti = proto_tree_add_item(o63_v_tree, hf_dhcp_option63_value, tvb, suboptoff, subopt_len, ENC_NA); |
5582 | 1.94k | proto_item_set_hidden(ti); |
5583 | | |
5584 | 1.94k | if (subopt < array_length(o63_opt)) { |
5585 | 1.51k | if (dhcp_handle_basic_types(pinfo, o63_v_tree, vti, tvb, o63_opt[subopt].ftype, |
5586 | 1.51k | suboptoff, subopt_len, o63_opt[subopt].phf, &default_hfs) == 0) { |
5587 | 1.35k | switch(o63_opt[subopt].ftype) |
5588 | 1.35k | { |
5589 | 508 | case presence: |
5590 | 508 | if (subopt_len != 0) { |
5591 | 240 | expert_add_info_format(pinfo, vti, &ei_dhcp_bad_length, "length isn't 0"); |
5592 | 240 | } |
5593 | 508 | break; |
5594 | 845 | default: |
5595 | 845 | if (o63_opt[subopt].phf == NULL) |
5596 | 474 | proto_tree_add_item(o63_v_tree, hf_dhcp_option63_value, tvb, suboptoff, subopt_len, ENC_NA); |
5597 | 845 | break; |
5598 | 1.35k | } |
5599 | 1.35k | } |
5600 | 1.51k | } |
5601 | 1.94k | optoff += (subopt_len + 2); |
5602 | 1.94k | return optoff; |
5603 | 1.94k | } |
5604 | | |
5605 | | static int |
5606 | | dissect_dhcpopt_netware_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5607 | 73 | { |
5608 | 73 | int offset = 0; |
5609 | | |
5610 | 2.03k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
5611 | 1.96k | offset = dissect_netware_ip_suboption(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb)); |
5612 | 1.96k | } |
5613 | | |
5614 | 73 | return tvb_captured_length(tvb); |
5615 | 73 | } |
5616 | | |
5617 | | static const value_string option125_tr111_suboption_vals[] = { |
5618 | | { 1, "DeviceManufacturerOUI" }, |
5619 | | { 2, "DeviceSerialNumber" }, |
5620 | | { 3, "DeviceProductClass" }, |
5621 | | { 4, "GatewayManufacturerOUI" }, |
5622 | | { 5, "GatewaySerialNumber" }, |
5623 | | { 6, "GatewayProductClass" }, |
5624 | | { 0, NULL } |
5625 | | }; |
5626 | | |
5627 | | static int |
5628 | | dissect_vendor_tr111_suboption(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5629 | 2.27k | { |
5630 | 2.27k | int offset = 0; |
5631 | 2.27k | proto_tree *o125_v_tree; |
5632 | 2.27k | proto_item *vti, *ti; |
5633 | 2.27k | uint8_t subopt, subopt_len; |
5634 | | |
5635 | 2.27k | static const struct basic_types_hfs default_hfs = { |
5636 | 2.27k | NULL, |
5637 | 2.27k | NULL, |
5638 | 2.27k | NULL, |
5639 | 2.27k | &hf_dhcp_option125_value_stringz, |
5640 | 2.27k | NULL, |
5641 | 2.27k | NULL, |
5642 | 2.27k | NULL, |
5643 | 2.27k | NULL, |
5644 | 2.27k | NULL, |
5645 | 2.27k | NULL, |
5646 | 2.27k | NULL |
5647 | 2.27k | }; |
5648 | | |
5649 | | /* Reference: TR-111 DHCP Option 125 Sub-Option Data Fields |
5650 | | Page 10. |
5651 | | */ |
5652 | | |
5653 | 2.27k | static const struct opt_info o125_tr111_opt[]= { |
5654 | 2.27k | /* 0 */ {"nop", special, NULL}, /* dummy */ |
5655 | 2.27k | /* 1 */ {"DeviceManufacturerOUI", oui, &hf_dhcp_option125_tr111_device_manufacturer_oui}, |
5656 | 2.27k | /* 2 */ {"DeviceSerialNumber", string, &hf_dhcp_option125_tr111_device_serial_number}, |
5657 | 2.27k | /* 3 */ {"DeviceProductClass", string, &hf_dhcp_option125_tr111_device_product_class}, |
5658 | 2.27k | /* 4 */ {"GatewayManufacturerOUI", string, &hf_dhcp_option125_tr111_gateway_manufacturer_oui}, |
5659 | 2.27k | /* 5 */ {"GatewaySerialNumber", string, &hf_dhcp_option125_tr111_gateway_serial_number}, |
5660 | 2.27k | /* 6 */ {"GatewayProductClass", string, &hf_dhcp_option125_tr111_gateway_product_class}, |
5661 | 2.27k | }; |
5662 | | |
5663 | 2.27k | subopt = tvb_get_uint8(tvb, offset); |
5664 | 2.27k | offset++; |
5665 | | |
5666 | 2.27k | if (tvb_reported_length_remaining(tvb, offset) < 1) { |
5667 | 13 | expert_add_info_format(pinfo, tree, &ei_dhcp_missing_subopt_length, |
5668 | 13 | "Suboption %d: no room left in option for suboption length", subopt); |
5669 | 13 | return offset; |
5670 | 13 | } |
5671 | | |
5672 | 2.26k | subopt_len = tvb_get_uint8(tvb, offset); |
5673 | 2.26k | vti = proto_tree_add_uint_format_value(tree, hf_dhcp_option125_tr111_suboption, |
5674 | 2.26k | tvb, offset, subopt_len+2, subopt, "(%d) %s", |
5675 | 2.26k | subopt, val_to_str_const(subopt, option125_tr111_suboption_vals, "Unknown")); |
5676 | | |
5677 | 2.26k | o125_v_tree = proto_item_add_subtree(vti, ett_dhcp_option125_tr111_suboption); |
5678 | 2.26k | proto_tree_add_item(o125_v_tree, hf_dhcp_suboption_length, tvb, offset, 1, ENC_BIG_ENDIAN); |
5679 | 2.26k | offset++; |
5680 | | |
5681 | 2.26k | if (tvb_reported_length_remaining(tvb, offset) < subopt_len) { |
5682 | 343 | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5683 | 343 | "Suboption %d: no room left in option for suboption value", subopt); |
5684 | 343 | return offset; |
5685 | 343 | } |
5686 | | |
5687 | 1.92k | ti = proto_tree_add_item(tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5688 | 1.92k | proto_item_set_hidden(ti); |
5689 | | |
5690 | 1.92k | if (subopt < array_length(o125_tr111_opt)) { |
5691 | 1.34k | 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) { |
5692 | 1.21k | if (o125_tr111_opt[subopt].ftype == special) { |
5693 | 657 | if (o125_tr111_opt[subopt].phf != NULL) |
5694 | 0 | proto_tree_add_item(o125_v_tree, *o125_tr111_opt[subopt].phf, tvb, offset, subopt_len, ENC_BIG_ENDIAN); |
5695 | 657 | else |
5696 | 657 | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5697 | 657 | } |
5698 | 559 | else if (o125_tr111_opt[subopt].ftype == oui) { |
5699 | | /* Get hex string. Expecting 6 characters. */ |
5700 | 242 | const char *oui_string = (char *)tvb_get_string_enc(pinfo->pool, tvb, offset, subopt_len, ENC_ASCII); |
5701 | | /* Convert to OUI number. Only 3 bytes so no data lost in downcast. */ |
5702 | 242 | uint32_t oui_number = (uint32_t)strtol(oui_string, NULL, 16); |
5703 | | /* Add item using oui_vals */ |
5704 | 242 | proto_tree_add_uint(o125_v_tree, *o125_tr111_opt[subopt].phf, tvb, offset, subopt_len, oui_number); |
5705 | 317 | } else if (o125_tr111_opt[subopt].phf == NULL) |
5706 | 0 | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5707 | 1.21k | } |
5708 | 1.34k | } |
5709 | | |
5710 | 1.92k | return subopt_len + 2; |
5711 | 2.26k | } |
5712 | | |
5713 | | static const value_string option125_cl_suboption_vals[] = { |
5714 | | { 1, "Option Request" }, |
5715 | | { 2, "TFTP Server Addresses" }, |
5716 | | { 3, "eRouter Container Option" }, |
5717 | | { 4, "MIB Environment Indicator Option" }, |
5718 | | { 5, "Modem Capabilities" }, |
5719 | | { 0, NULL } |
5720 | | }; |
5721 | | |
5722 | | static const value_string pkt_mib_env_ind_opt_vals[] = { |
5723 | | { 0x00, "Reserved" }, |
5724 | | { 0x01, "CableLabs" }, |
5725 | | { 0x02, "IETF" }, |
5726 | | { 0x03, "EuroCableLabs" }, |
5727 | | { 0, NULL } |
5728 | | }; |
5729 | | |
5730 | | static int |
5731 | | dissect_vendor_cl_suboption(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
5732 | 6.50k | { |
5733 | 6.50k | int offset = 0; |
5734 | 6.50k | uint8_t subopt, subopt_len; |
5735 | 6.50k | proto_tree *o125_v_tree; |
5736 | 6.50k | proto_item *vti; |
5737 | | |
5738 | 6.50k | static const struct basic_types_hfs default_hfs = { |
5739 | 6.50k | &hf_dhcp_option125_value, |
5740 | 6.50k | &hf_dhcp_option125_value_ip_address, |
5741 | 6.50k | &hf_dhcp_option125_value_ip_address, |
5742 | 6.50k | &hf_dhcp_option125_value_stringz, |
5743 | 6.50k | NULL, |
5744 | 6.50k | &hf_dhcp_option125_value_8, |
5745 | 6.50k | &hf_dhcp_option125_value_16, |
5746 | 6.50k | NULL, |
5747 | 6.50k | NULL, |
5748 | 6.50k | NULL, |
5749 | 6.50k | NULL |
5750 | 6.50k | }; |
5751 | | |
5752 | 6.50k | static const struct opt_info o125_cl_opt[]= { |
5753 | 6.50k | /* 0 */ {"nop", special, NULL}, /* dummy */ |
5754 | 6.50k | /* 1 */ {"Option Request = ", bytes, &hf_dhcp_option125_cl_option_request}, |
5755 | 6.50k | /* 2 */ {"TFTP Server Addresses : ", ipv4_list, &hf_dhcp_option125_cl_tftp_server_addresses}, |
5756 | 6.50k | /* 3 */ {"eRouter Container Option : ", bytes, &hf_dhcp_option125_cl_erouter_container_option}, |
5757 | 6.50k | /* 4 */ {"MIB Environment Indicator Option = ", val_u_byte, &hf_dhcp_option125_cl_mib_environment_indicator_option}, |
5758 | 6.50k | /* 5 */ {"Modem Capabilities : ", special, &hf_dhcp_option125_cl_modem_capabilities}, |
5759 | 6.50k | }; |
5760 | | |
5761 | 6.50k | subopt = tvb_get_uint8(tvb, offset); |
5762 | 6.50k | offset++; |
5763 | | |
5764 | 6.50k | if (tvb_reported_length_remaining(tvb, offset) < 1) { |
5765 | 38 | expert_add_info_format(pinfo, tree, &ei_dhcp_missing_subopt_length, |
5766 | 38 | "Suboption %d: no room left in option for suboption length", subopt); |
5767 | 38 | return offset; |
5768 | 38 | } |
5769 | | |
5770 | 6.46k | subopt_len = tvb_get_uint8(tvb, offset); |
5771 | 6.46k | vti = proto_tree_add_uint_format_value(tree, hf_dhcp_option125_cl_suboption, |
5772 | 6.46k | tvb, offset, subopt_len+2, subopt, "(%d) %s", |
5773 | 6.46k | subopt, val_to_str_const(subopt, option125_cl_suboption_vals, "Unknown")); |
5774 | | |
5775 | 6.46k | o125_v_tree = proto_item_add_subtree(vti, ett_dhcp_option125_cl_suboption); |
5776 | 6.46k | proto_tree_add_item(o125_v_tree, hf_dhcp_suboption_length, tvb, offset, 1, ENC_BIG_ENDIAN); |
5777 | 6.46k | offset++; |
5778 | | |
5779 | 6.46k | if (tvb_reported_length_remaining(tvb, offset) < subopt_len) { |
5780 | 1.26k | expert_add_info_format(pinfo, vti, &ei_dhcp_missing_subopt_value, |
5781 | 1.26k | "Suboption %d: no room left in option for suboption value", subopt); |
5782 | 1.26k | return offset; |
5783 | 1.26k | } |
5784 | | |
5785 | 5.19k | if (subopt < array_length(o125_cl_opt)) { |
5786 | 3.80k | if (dhcp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_cl_opt[subopt].ftype, |
5787 | 3.80k | offset, subopt_len, o125_cl_opt[subopt].phf, &default_hfs) == 0) { |
5788 | | |
5789 | 3.67k | switch(o125_cl_opt[subopt].ftype) { |
5790 | 3.17k | case special: |
5791 | 3.17k | if (o125_cl_opt[subopt].phf != NULL) |
5792 | 560 | proto_tree_add_item(o125_v_tree, *o125_cl_opt[subopt].phf, tvb, offset, subopt_len, ENC_BIG_ENDIAN); |
5793 | 2.61k | else |
5794 | 2.61k | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5795 | 3.17k | switch(subopt){ |
5796 | 559 | case 5: /* Modem Capabilities */ |
5797 | 559 | dissect_docsis_cm_cap(pinfo, o125_v_tree, tvb, offset-2, subopt_len+2, true); |
5798 | 559 | break; |
5799 | 3.17k | } |
5800 | 3.01k | break; |
5801 | 3.01k | default: |
5802 | 496 | if (o125_cl_opt[subopt].phf == NULL) |
5803 | 0 | proto_tree_add_item(o125_v_tree, hf_dhcp_option125_value, tvb, offset, subopt_len, ENC_NA); |
5804 | 496 | break; |
5805 | 3.67k | } |
5806 | 3.67k | } |
5807 | 3.80k | } |
5808 | | |
5809 | 5.03k | return subopt_len + 2; |
5810 | 5.19k | } |
5811 | | |
5812 | | /* PacketCable Multimedia Terminal Adapter device capabilities (option 60). |
5813 | | Ref: PKT-SP-I05-021127 sections 8.2 and 10 */ |
5814 | | |
5815 | 216 | #define PKT_MDC_TLV_OFF 10 |
5816 | | |
5817 | | |
5818 | | /* These are ASCII-encoded hexadecimal digits. We use the raw hex equivalent for |
5819 | | convenience. */ |
5820 | 68 | #define PKT_MDC_VERSION 0x3031 /* "01" */ |
5821 | 51 | #define PKT_MDC_TEL_END 0x3032 /* "02" */ |
5822 | 66 | #define PKT_MDC_TGT 0x3033 /* "03" */ |
5823 | 151 | #define PKT_MDC_HTTP_ACC 0x3034 /* "04" */ |
5824 | 193 | #define PKT_MDC_SYSLOG 0x3035 /* "05" */ |
5825 | 221 | #define PKT_MDC_NCS 0x3036 /* "06" */ |
5826 | 266 | #define PKT_MDC_PRI_LINE 0x3037 /* "07" */ |
5827 | 6 | #define PKT_MDC_VENDOR_TLV 0x3038 /* "08" */ |
5828 | 325 | #define PKT_MDC_NVRAM_STOR 0x3039 /* "09" */ |
5829 | 375 | #define PKT_MDC_PROV_REP 0x3041 /* "0A" */ |
5830 | 454 | #define PKT_MDC_PROV_REP_LC 0x3061 /* "0a" */ |
5831 | 89 | #define PKT_MDC_SUPP_CODECS 0x3042 /* "0B" */ |
5832 | 179 | #define PKT_MDC_SUPP_CODECS_LC 0x3062 /* "0b" */ |
5833 | 510 | #define PKT_MDC_SILENCE 0x3043 /* "0C" */ |
5834 | 565 | #define PKT_MDC_SILENCE_LC 0x3063 /* "0c" */ |
5835 | 640 | #define PKT_MDC_ECHO_CANCEL 0x3044 /* "0D" */ |
5836 | 696 | #define PKT_MDC_ECHO_CANCEL_LC 0x3064 /* "0d" */ |
5837 | 746 | #define PKT_MDC_RSVP 0x3045 /* "0E" */ |
5838 | 807 | #define PKT_MDC_RSVP_LC 0x3065 /* "0e" */ |
5839 | 872 | #define PKT_MDC_UGS_AD 0x3046 /* "0F" */ |
5840 | 996 | #define PKT_MDC_UGS_AD_LC 0x3066 /* "0f" */ |
5841 | 132 | #define PKT_MDC_IF_INDEX 0x3130 /* "10" */ |
5842 | 1.10k | #define PKT_MDC_FLOW_LOG 0x3131 /* "11" */ |
5843 | 3.58k | #define PKT_MDC_PROV_FLOWS 0x3132 /* "12" */ |
5844 | | /* PacketCable 1.5: */ |
5845 | 66 | #define PKT_MDC_T38_VERSION 0x3133 /* "13" */ |
5846 | 144 | #define PKT_MDC_T38_EC 0x3134 /* "14" */ |
5847 | 1.18k | #define PKT_MDC_RFC2833_DTMF 0x3135 /* "15" */ |
5848 | 1.26k | #define PKT_MDC_VOICE_METRICS 0x3136 /* "16" */ |
5849 | 3.22k | #define PKT_MDC_MIBS 0x3137 /* "17" */ |
5850 | 1.31k | #define PKT_MDC_MGPI 0x3138 /* "18" */ |
5851 | 1.38k | #define PKT_MDC_V152 0x3139 /* "19" */ |
5852 | 1.43k | #define PKT_MDC_CBS 0x3141 /* "1A" */ |
5853 | 1.47k | #define PKT_MDC_CBS_LC 0x3161 /* "1a" */ |
5854 | | |
5855 | | static const value_string pkt_mdc_type_vals[] = { |
5856 | | { PKT_MDC_VERSION, "PacketCable Version" }, |
5857 | | { PKT_MDC_TEL_END, "Number Of Telephony Endpoints" }, |
5858 | | { PKT_MDC_TGT, "TGT Support" }, |
5859 | | { PKT_MDC_HTTP_ACC, "HTTP Download File Access Method Support" }, |
5860 | | { PKT_MDC_SYSLOG, "MTA-24 Event SYSLOG Notification Support" }, |
5861 | | { PKT_MDC_NCS, "NCS Service Flow Support" }, |
5862 | | { PKT_MDC_PRI_LINE, "Primary Line Support" }, |
5863 | | { PKT_MDC_VENDOR_TLV, "Vendor Specific TLV Type(s)" }, |
5864 | | { PKT_MDC_NVRAM_STOR, "NVRAM Ticket/Session Keys Storage Support" }, |
5865 | | { PKT_MDC_PROV_REP, "Provisioning Event Reporting Support" }, |
5866 | | { PKT_MDC_PROV_REP_LC, "Provisioning Event Reporting Support" }, |
5867 | | { PKT_MDC_SUPP_CODECS, "Supported CODEC(s)" }, |
5868 | | { PKT_MDC_SUPP_CODECS_LC, "Supported CODEC(s)" }, |
5869 | | { PKT_MDC_SILENCE, "Silence Suppression Support" }, |
5870 | | { PKT_MDC_SILENCE_LC, "Silence Suppression Support" }, |
5871 | | { PKT_MDC_ECHO_CANCEL, "Echo Cancellation Support" }, |
5872 | | { PKT_MDC_ECHO_CANCEL_LC, "Echo Cancellation Support" }, |
5873 | | { PKT_MDC_RSVP, "RSVP Support/ Reserved" }, |
5874 | | { PKT_MDC_RSVP_LC, "RSVP Support/ Reserved" }, |
5875 | | { PKT_MDC_UGS_AD, "UGS-AD Support" }, |
5876 | | { PKT_MDC_UGS_AD_LC, "UGS-AD Support" }, |
5877 | | { PKT_MDC_IF_INDEX, "MTA's \"ifIndex\" starting number in \"ifTable\"" }, |
5878 | | { PKT_MDC_FLOW_LOG, "Provisioning Flow Logging Support" }, |
5879 | | { PKT_MDC_PROV_FLOWS, "Supported Provisioning Flows" }, |
5880 | | /* PacketCable 1.5: */ |
5881 | | { PKT_MDC_T38_VERSION, "T38 Version Support" }, |
5882 | | { PKT_MDC_T38_EC, "T38 Error Correction Support" }, |
5883 | | { PKT_MDC_RFC2833_DTMF, "RFC 2833 DTMF Support" }, |
5884 | | { PKT_MDC_VOICE_METRICS, "Voice Metrics Support" }, |
5885 | | { PKT_MDC_MIBS, "MIB Support" }, |
5886 | | { PKT_MDC_MGPI, "Multiple Grants Per Interval Support" }, |
5887 | | { PKT_MDC_V152, "V.152 Support" }, |
5888 | | /* PacketCable 2.0: */ |
5889 | | { PKT_MDC_CBS, "Certificate Bootstrapping Support" }, |
5890 | | { PKT_MDC_CBS_LC, "Certificate Bootstrapping Support" }, |
5891 | | { 0, NULL } |
5892 | | }; |
5893 | | |
5894 | | static const value_string pkt_mdc_version_vals[] = { |
5895 | | { 0x3030, "PacketCable 1.0" }, |
5896 | | { 0x3031, "PacketCable 1.1/1.5" }, /* 1.5 replaces 1.1-1.3 */ |
5897 | | { 0x3032, "PacketCable 2.0" }, |
5898 | | { 0, NULL } |
5899 | | }; |
5900 | | |
5901 | | static const value_string pkt_mdc_boolean_vals[] = { |
5902 | | { 0x3030, "No" }, |
5903 | | { 0x3031, "Yes" }, |
5904 | | { 0, NULL } |
5905 | | }; |
5906 | | |
5907 | | static const value_string pkt_mdc_codec_vals[] = { |
5908 | | { 0x3031, "other" }, /* "01" */ |
5909 | | { 0x3032, "unknown" }, |
5910 | | { 0x3033, "G.729" }, |
5911 | | { 0x3034, "reserved" }, |
5912 | | { 0x3035, "G.729E" }, |
5913 | | { 0x3036, "PCMU" }, |
5914 | | { 0x3037, "G.726-32" }, |
5915 | | { 0x3038, "G.728" }, |
5916 | | { 0x3039, "PCMA" }, /* "09" */ |
5917 | | { 0x3041, "G.726-16" }, /* "0A" */ |
5918 | | { 0x3042, "G.726-24" }, |
5919 | | { 0x3043, "G.726-40" }, |
5920 | | { 0x3044, "iLBC" }, |
5921 | | { 0x3045, "BV16" }, |
5922 | | { 0x3046, "telephone-event" }, /* "0F" */ |
5923 | | { 0, NULL } |
5924 | | }; |
5925 | | |
5926 | | static const value_string pkt_mdc_t38_version_vals[] = { |
5927 | | { 0x3030, "Unsupported" }, |
5928 | | { 0x3031, "T.38 Version Zero" }, /* default */ |
5929 | | { 0x3032, "T.38 Version One" }, |
5930 | | { 0x3033, "T.38 Version Two" }, |
5931 | | { 0x3035, "T.38 Version Three" }, |
5932 | | { 0, NULL } |
5933 | | }; |
5934 | | |
5935 | | static const value_string pkt_mdc_t38_ec_vals[] = { |
5936 | | { 0x3030, "None" }, |
5937 | | { 0x3031, "Redundancy" }, /* default */ |
5938 | | { 0x3032, "FEC" }, |
5939 | | { 0, NULL } |
5940 | | }; |
5941 | | |
5942 | | static const value_string pkt_mdc_mib_orgs[] = { |
5943 | | { 0x3030, "CableLabs" }, |
5944 | | { 0x3031, "IETF" }, |
5945 | | { 0x3032, "EuroCableLabs" }, |
5946 | | { 0x3033, "Reserved" }, |
5947 | | { 0x3034, "Reserved" }, |
5948 | | { 0x3035, "Reserved" }, |
5949 | | { 0x3036, "Reserved" }, |
5950 | | { 0x3037, "Reserved" }, |
5951 | | { 0x3038, "Reserved" }, |
5952 | | { 0x3039, "Reserved" }, |
5953 | | { 0, NULL } |
5954 | | }; |
5955 | | |
5956 | | static int hf_dhcp_pkt_mdc_supp_flow_secure; |
5957 | | static int hf_dhcp_pkt_mdc_supp_flow_hybrid; |
5958 | | static int hf_dhcp_pkt_mdc_supp_flow_basic; |
5959 | | |
5960 | 0 | #define PKT_MDC_MIB_CL 0x3030 |
5961 | | static int hf_dhcp_pkt_mdc_mib_cl_mta; |
5962 | | static int hf_dhcp_pkt_mdc_mib_cl_signaling; |
5963 | | static int hf_dhcp_pkt_mdc_mib_cl_management_event; |
5964 | | static int hf_dhcp_pkt_mdc_mib_cl_mta_extension; |
5965 | | static int hf_dhcp_pkt_mdc_mib_cl_mta_signaling_extension; |
5966 | | static int hf_dhcp_pkt_mdc_mib_cl_mta_mem_extension; |
5967 | | static int hf_dhcp_pkt_mdc_mib_cl_reserved; |
5968 | | |
5969 | 17 | #define PKT_MDC_MIB_IETF 0x3031 |
5970 | | static int hf_dhcp_pkt_mdc_mib_ietf_mta; |
5971 | | static int hf_dhcp_pkt_mdc_mib_ietf_signaling; |
5972 | | static int hf_dhcp_pkt_mdc_mib_ietf_management_event; |
5973 | | static int hf_dhcp_pkt_mdc_mib_ietf_reserved; |
5974 | | |
5975 | 12 | #define PKT_MDC_MIB_EURO 0x3032 |
5976 | | static int hf_dhcp_pkt_mdc_mib_euro_mta; |
5977 | | static int hf_dhcp_pkt_mdc_mib_euro_signaling; |
5978 | | static int hf_dhcp_pkt_mdc_mib_euro_management_event; |
5979 | | static int hf_dhcp_pkt_mdc_mib_euro_mta_extension; |
5980 | | static int hf_dhcp_pkt_mdc_mib_euro_mta_signaling_extension; |
5981 | | static int hf_dhcp_pkt_mdc_mib_euro_mta_mem_extension; |
5982 | | static int hf_dhcp_pkt_mdc_mib_euro_reserved; |
5983 | | |
5984 | | |
5985 | | static void |
5986 | | dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tvb, int voff, int len) |
5987 | 216 | { |
5988 | 216 | uint16_t raw_val; |
5989 | 216 | uint32_t flow_val = 0; |
5990 | 216 | int off = PKT_MDC_TLV_OFF + voff; |
5991 | 216 | int subopt_off, max_len; |
5992 | 216 | unsigned tlv_len, i, mib_val; |
5993 | 216 | uint8_t flow_val_str[5]; |
5994 | 216 | const char *asc_val; |
5995 | 216 | proto_item *ti, *mib_ti; |
5996 | 216 | proto_tree *subtree, *subtree2; |
5997 | | |
5998 | 216 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, off, 2, ENC_ASCII); |
5999 | 216 | if (sscanf(asc_val, "%x", &tlv_len) != 1 || tlv_len > 0xff) { |
6000 | 12 | proto_tree_add_expert_format(v_tree, pinfo, &ei_dhcp_bad_length, tvb, off, len - off, |
6001 | 12 | "Bogus length: %s", |
6002 | 12 | format_text_string(pinfo->pool, asc_val)); |
6003 | 12 | return; |
6004 | 204 | } else { |
6005 | 204 | proto_tree_add_uint(v_tree, hf_dhcp_pkt_mta_cap_len, tvb, off, 2, tlv_len); |
6006 | 204 | off += 2; |
6007 | | |
6008 | 3.68k | while (off - voff < len) { |
6009 | | /* Type */ |
6010 | 3.62k | raw_val = tvb_get_ntohs (tvb, off); |
6011 | | |
6012 | | /* Length */ |
6013 | 3.62k | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, off + 2, 2, ENC_ASCII); |
6014 | 3.62k | if (sscanf(asc_val, "%x", &tlv_len) != 1 |
6015 | 3.58k | || tlv_len < 1 || tlv_len > UINT16_MAX) { |
6016 | 46 | proto_tree_add_expert_format(v_tree, pinfo, &ei_dhcp_bad_length, tvb, off, len - off, |
6017 | 46 | "Bogus length: %s", |
6018 | 46 | format_text_string(pinfo->pool, asc_val)); |
6019 | 46 | return; |
6020 | 3.58k | } else { |
6021 | | /* Value(s) */ |
6022 | | |
6023 | 3.58k | ti = proto_tree_add_uint_format(v_tree, hf_dhcp_pkt_mta_cap_type, |
6024 | 3.58k | tvb, off, 2, raw_val, "0x%s: %s = ", |
6025 | 3.58k | tvb_format_text(pinfo->pool, tvb, off, 2), |
6026 | 3.58k | val_to_str_const(raw_val, pkt_mdc_type_vals, "unknown")); |
6027 | 3.58k | proto_item_set_len(ti, (tlv_len * 2) + 4); |
6028 | 3.58k | switch (raw_val) { |
6029 | | |
6030 | 68 | case PKT_MDC_VERSION: |
6031 | 68 | raw_val = tvb_get_ntohs(tvb, off + 4); |
6032 | 68 | proto_item_append_text(ti, |
6033 | 68 | "%s (%s)", |
6034 | 68 | val_to_str_const(raw_val, pkt_mdc_version_vals, "Reserved"), |
6035 | 68 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6036 | 68 | break; |
6037 | | |
6038 | 51 | case PKT_MDC_TEL_END: |
6039 | 132 | case PKT_MDC_IF_INDEX: |
6040 | 132 | proto_item_append_text(ti, |
6041 | 132 | "%s", |
6042 | 132 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6043 | 132 | break; |
6044 | | |
6045 | 66 | case PKT_MDC_TGT: |
6046 | 151 | case PKT_MDC_HTTP_ACC: |
6047 | 193 | case PKT_MDC_SYSLOG: |
6048 | 221 | case PKT_MDC_NCS: |
6049 | 266 | case PKT_MDC_PRI_LINE: |
6050 | 325 | case PKT_MDC_NVRAM_STOR: |
6051 | 375 | case PKT_MDC_PROV_REP: |
6052 | 454 | case PKT_MDC_PROV_REP_LC: |
6053 | 510 | case PKT_MDC_SILENCE: |
6054 | 565 | case PKT_MDC_SILENCE_LC: |
6055 | 640 | case PKT_MDC_ECHO_CANCEL: |
6056 | 696 | case PKT_MDC_ECHO_CANCEL_LC: |
6057 | 746 | case PKT_MDC_RSVP: |
6058 | 807 | case PKT_MDC_RSVP_LC: |
6059 | 872 | case PKT_MDC_UGS_AD: |
6060 | 996 | case PKT_MDC_UGS_AD_LC: |
6061 | 1.10k | case PKT_MDC_FLOW_LOG: |
6062 | 1.18k | case PKT_MDC_RFC2833_DTMF: |
6063 | 1.26k | case PKT_MDC_VOICE_METRICS: |
6064 | 1.31k | case PKT_MDC_MGPI: |
6065 | 1.38k | case PKT_MDC_V152: |
6066 | 1.43k | case PKT_MDC_CBS: |
6067 | 1.47k | case PKT_MDC_CBS_LC: |
6068 | 1.47k | raw_val = tvb_get_ntohs(tvb, off + 4); |
6069 | 1.47k | proto_item_append_text(ti, |
6070 | 1.47k | "%s (%s)", |
6071 | 1.47k | val_to_str_const(raw_val, pkt_mdc_boolean_vals, "unknown"), |
6072 | 1.47k | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6073 | 1.47k | break; |
6074 | | |
6075 | 89 | case PKT_MDC_SUPP_CODECS: |
6076 | 179 | case PKT_MDC_SUPP_CODECS_LC: |
6077 | 1.72k | for (i = 0; i < tlv_len; i++) { |
6078 | 1.54k | raw_val = tvb_get_ntohs(tvb, off + 4 + (i * 2) ); |
6079 | 1.54k | proto_item_append_text(ti, |
6080 | 1.54k | "%s%s (%s)", |
6081 | 1.54k | plurality(i + 1, "", ", "), |
6082 | 1.54k | val_to_str_const(raw_val, pkt_mdc_codec_vals, "unknown"), |
6083 | 1.54k | tvb_format_stringzpad(pinfo->pool, tvb, off + 4 + (i * 2), 2) ); |
6084 | 1.54k | } |
6085 | 179 | break; |
6086 | | |
6087 | 71 | case PKT_MDC_PROV_FLOWS: |
6088 | 71 | tvb_memcpy(tvb, flow_val_str, off + 4, 4); |
6089 | 71 | flow_val_str[4] = '\0'; |
6090 | | /* We are only reading 4 digits which should fit in 32 bits */ |
6091 | 71 | flow_val = (uint32_t)strtoul((char*)flow_val_str, NULL, 16); |
6092 | 71 | proto_item_append_text(ti, |
6093 | 71 | "0x%04x", flow_val); |
6094 | 71 | break; |
6095 | | |
6096 | 66 | case PKT_MDC_T38_VERSION: |
6097 | 66 | raw_val = tvb_get_ntohs(tvb, off + 4); |
6098 | 66 | proto_item_append_text(ti, |
6099 | 66 | "%s (%s)", |
6100 | 66 | val_to_str_const(raw_val, pkt_mdc_t38_version_vals, "unknown"), |
6101 | 66 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6102 | 66 | break; |
6103 | | |
6104 | 144 | case PKT_MDC_T38_EC: |
6105 | 144 | raw_val = tvb_get_ntohs(tvb, off + 4); |
6106 | 144 | proto_item_append_text(ti, |
6107 | 144 | "%s (%s)", |
6108 | 144 | val_to_str_const(raw_val, pkt_mdc_t38_ec_vals, "unknown"), |
6109 | 144 | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) ); |
6110 | 144 | break; |
6111 | | |
6112 | 73 | case PKT_MDC_MIBS: |
6113 | 73 | break; |
6114 | | |
6115 | 6 | case PKT_MDC_VENDOR_TLV: |
6116 | 1.36k | default: |
6117 | 1.36k | proto_item_append_text(ti, |
6118 | 1.36k | "%s", |
6119 | 1.36k | tvb_format_stringzpad(pinfo->pool, tvb, off + 4, tlv_len * 2) ); |
6120 | 1.36k | break; |
6121 | 3.58k | } |
6122 | 3.58k | } |
6123 | 3.50k | subtree = proto_item_add_subtree(ti, ett_dhcp_option); |
6124 | 3.50k | if (raw_val == PKT_MDC_PROV_FLOWS) { |
6125 | 362 | static int * const flows[] = { |
6126 | 362 | &hf_dhcp_pkt_mdc_supp_flow_secure, |
6127 | 362 | &hf_dhcp_pkt_mdc_supp_flow_hybrid, |
6128 | 362 | &hf_dhcp_pkt_mdc_supp_flow_basic, |
6129 | 362 | NULL |
6130 | 362 | }; |
6131 | | |
6132 | 362 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 4, 4, flows, flow_val); |
6133 | 3.14k | } else if (raw_val == PKT_MDC_MIBS) { |
6134 | | /* 17 06 02 00 38 02 01 07 */ |
6135 | 73 | subopt_off = off + 4; |
6136 | 73 | max_len = subopt_off + (tlv_len * 2); |
6137 | 163 | while (subopt_off < max_len) { |
6138 | 122 | raw_val = tvb_get_ntohs(tvb, subopt_off); |
6139 | 122 | if (raw_val != 0x3032) { /* We only know how to handle a length of 2 */ |
6140 | 29 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, subopt_off, 2, ENC_ASCII); |
6141 | 29 | proto_tree_add_expert_format(subtree, pinfo, &ei_dhcp_bad_length, tvb, subopt_off, 2, |
6142 | 29 | "Bogus length: %s", |
6143 | 29 | format_text_string(pinfo->pool, asc_val)); |
6144 | 29 | return; |
6145 | 29 | } |
6146 | | |
6147 | 93 | subopt_off += 2; |
6148 | 93 | raw_val = tvb_get_ntohs(tvb, subopt_off); |
6149 | 93 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, subopt_off, 2, ENC_ASCII); |
6150 | 93 | subtree2 = proto_tree_add_subtree_format(subtree, tvb, subopt_off, 2, |
6151 | 93 | ett_dhcp_option, &mib_ti, "%s (%s)", |
6152 | 93 | val_to_str_const(raw_val, pkt_mdc_mib_orgs, "Unknown"), |
6153 | 93 | format_text_string(pinfo->pool, asc_val)); |
6154 | 93 | if (subopt_off > off + 4 + 2) { |
6155 | 37 | proto_item_append_text(ti, ", "); |
6156 | 37 | } |
6157 | 93 | proto_item_append_text(ti, "%s", val_to_str_const(raw_val, pkt_mdc_mib_orgs, "Unknown")); |
6158 | | |
6159 | 93 | subopt_off += 2; |
6160 | 93 | asc_val = (char*)tvb_get_string_enc(pinfo->pool, tvb, subopt_off, 2, ENC_ASCII); |
6161 | 93 | if (sscanf(asc_val, "%x", &mib_val) != 1) { |
6162 | 3 | proto_tree_add_expert_format(v_tree, pinfo, &ei_dhcp_bad_bitfield, tvb, subopt_off, 2, |
6163 | 3 | "Bogus bitfield: %s", format_text_string(pinfo->pool, asc_val)); |
6164 | 3 | return; |
6165 | 3 | } |
6166 | 90 | switch (raw_val) { |
6167 | | |
6168 | 0 | case PKT_MDC_MIB_CL: { |
6169 | 0 | static int * const cl_flags[] = { |
6170 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta, |
6171 | 0 | &hf_dhcp_pkt_mdc_mib_cl_signaling, |
6172 | 0 | &hf_dhcp_pkt_mdc_mib_cl_management_event, |
6173 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta_extension, |
6174 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta_signaling_extension, |
6175 | 0 | &hf_dhcp_pkt_mdc_mib_cl_mta_mem_extension, |
6176 | 0 | &hf_dhcp_pkt_mdc_mib_cl_reserved, |
6177 | 0 | NULL |
6178 | 0 | }; |
6179 | |
|
6180 | 0 | proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, cl_flags, mib_val); |
6181 | 0 | } |
6182 | 0 | break; |
6183 | | |
6184 | 17 | case PKT_MDC_MIB_IETF: { |
6185 | 17 | static int * const ietf_flags[] = { |
6186 | 17 | &hf_dhcp_pkt_mdc_mib_ietf_mta, |
6187 | 17 | &hf_dhcp_pkt_mdc_mib_ietf_signaling, |
6188 | 17 | &hf_dhcp_pkt_mdc_mib_ietf_management_event, |
6189 | 17 | &hf_dhcp_pkt_mdc_mib_ietf_reserved, |
6190 | 17 | NULL |
6191 | 17 | }; |
6192 | | |
6193 | 17 | proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, ietf_flags, mib_val); |
6194 | 17 | } |
6195 | 17 | break; |
6196 | | |
6197 | 12 | case PKT_MDC_MIB_EURO: { |
6198 | 12 | static int * const euro_flags[] = { |
6199 | 12 | &hf_dhcp_pkt_mdc_mib_euro_mta, |
6200 | 12 | &hf_dhcp_pkt_mdc_mib_euro_signaling, |
6201 | 12 | &hf_dhcp_pkt_mdc_mib_euro_management_event, |
6202 | 12 | &hf_dhcp_pkt_mdc_mib_euro_mta_extension, |
6203 | 12 | &hf_dhcp_pkt_mdc_mib_euro_mta_signaling_extension, |
6204 | 12 | &hf_dhcp_pkt_mdc_mib_euro_mta_mem_extension, |
6205 | 12 | &hf_dhcp_pkt_mdc_mib_euro_reserved, |
6206 | 12 | NULL |
6207 | 12 | }; |
6208 | | |
6209 | 12 | proto_tree_add_bitmask_list_value(subtree2, tvb, subopt_off, 2, euro_flags, mib_val); |
6210 | 12 | } |
6211 | 12 | break; |
6212 | | |
6213 | 61 | default: |
6214 | 61 | break; |
6215 | 90 | } |
6216 | 90 | subopt_off += 2; |
6217 | 90 | } |
6218 | | |
6219 | 73 | } |
6220 | 3.47k | off += (tlv_len * 2) + 4; |
6221 | 3.47k | } |
6222 | 204 | } |
6223 | 216 | } |
6224 | | |
6225 | | static bool |
6226 | | dissect_packetcable_mta_vendor_id_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ ) |
6227 | 1.39k | { |
6228 | 1.39k | uint8_t* vendor_id; |
6229 | | |
6230 | 1.39k | if (tvb_reported_length(tvb) < 8) { |
6231 | 37 | return false; |
6232 | 37 | } |
6233 | | |
6234 | 1.35k | vendor_id = tvb_get_string_enc(pinfo->pool, tvb, 0, 8, ENC_ASCII|ENC_NA); |
6235 | 1.35k | if ((strcmp((const char*)vendor_id, PACKETCABLE_MTA_CAP10) == 0) || |
6236 | 1.28k | (strcmp((const char*)vendor_id, PACKETCABLE_MTA_CAP15) == 0) || |
6237 | 1.19k | (strcmp((const char*)vendor_id, PACKETCABLE_MTA_CAP20) == 0)) { |
6238 | 216 | dissect_packetcable_mta_cap(tree, pinfo, tvb, 0, tvb_reported_length(tvb)); |
6239 | 216 | return true; |
6240 | 216 | } |
6241 | | |
6242 | 1.13k | return false; |
6243 | 1.35k | } |
6244 | | |
6245 | | /* DOCSIS Cable Modem device capabilities (option 60/option 125). */ |
6246 | 76 | #define DOCSIS_CM_CAP_TLV_OFF 12 |
6247 | | |
6248 | 722 | #define DOCSIS_CM_CAP_CONCAT_SUP 0x01 |
6249 | 391 | #define DOCSIS_CM_CAP_DOCSIS_VER 0x02 |
6250 | 1.03k | #define DOCSIS_CM_CAP_FRAG_SUP 0x03 |
6251 | 1.38k | #define DOCSIS_CM_CAP_PHS_SUP 0x04 |
6252 | 1.67k | #define DOCSIS_CM_CAP_IGMP_SUP 0x05 |
6253 | 272 | #define DOCSIS_CM_CAP_PRIV_SUP 0x06 |
6254 | 205 | #define DOCSIS_CM_CAP_DSAID_SUP 0x07 |
6255 | 1.60k | #define DOCSIS_CM_CAP_USSF_SUP 0x08 |
6256 | 123 | #define DOCSIS_CM_CAP_FILT_SUP 0x09 |
6257 | 780 | #define DOCSIS_CM_CAP_TET_MI 0x0a |
6258 | 495 | #define DOCSIS_CM_CAP_TET 0x0b |
6259 | 1.84k | #define DOCSIS_CM_CAP_DCC_SUP 0x0c |
6260 | 256 | #define DOCSIS_CM_CAP_IPFILT_SUP 0x0d |
6261 | 436 | #define DOCSIS_CM_CAP_LLCFILT_SUP 0x0e |
6262 | 2.02k | #define DOCSIS_CM_CAP_EXPUNI_SPACE 0x0f |
6263 | 34.3k | #define DOCSIS_CM_CAP_RNGHLDOFF_SUP 0x10 |
6264 | 168 | #define DOCSIS_CM_CAP_L2VPN_SUP 0x11 |
6265 | 166 | #define DOCSIS_CM_CAP_L2VPN_HOST_SUP 0x12 |
6266 | 2.20k | #define DOCSIS_CM_CAP_DUTFILT_SUP 0x13 |
6267 | 149 | #define DOCSIS_CM_CAP_USFREQRNG_SUP 0x14 |
6268 | 17.2k | #define DOCSIS_CM_CAP_USSYMRATE_SUP 0x15 |
6269 | 2.35k | #define DOCSIS_CM_CAP_SACM2_SUP 0x16 |
6270 | 2.52k | #define DOCSIS_CM_CAP_SACM2HOP_SUP 0x17 |
6271 | 409 | #define DOCSIS_CM_CAP_MULTTXCHAN_SUP 0x18 |
6272 | 570 | #define DOCSIS_CM_CAP_512USTXCHAN_SUP 0x19 |
6273 | 742 | #define DOCSIS_CM_CAP_256USTXCHAN_SUP 0x1a |
6274 | 981 | #define DOCSIS_CM_CAP_TOTALSIDCLU_SUP 0x1b |
6275 | 610 | #define DOCSIS_CM_CAP_SIDCLUPERSF_SUP 0x1c |
6276 | 1.17k | #define DOCSIS_CM_CAP_MULTRXCHAN_SUP 0x1d |
6277 | 774 | #define DOCSIS_CM_CAP_TOTALDSID_SUP 0x1e |
6278 | 181 | #define DOCSIS_CM_CAP_RESEQDSID_SUP 0x1f |
6279 | 773 | #define DOCSIS_CM_CAP_MULTDSID_SUP 0x20 |
6280 | 144 | #define DOCSIS_CM_CAP_MULTDSIDFW_SUP 0x21 |
6281 | 116 | #define DOCSIS_CM_CAP_FCTF_SUP 0x22 |
6282 | 182 | #define DOCSIS_CM_CAP_DPV_SUP 0x23 |
6283 | 1.38k | #define DOCSIS_CM_CAP_UGSPERUSFLOW_SUP 0x24 |
6284 | 323 | #define DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP 0x25 |
6285 | 447 | #define DOCSIS_CM_CAP_USDROPCLASSIF_SUP 0x26 |
6286 | 2.64k | #define DOCSIS_CM_CAP_IPV6_SUP 0x27 |
6287 | 535 | #define DOCSIS_CM_CAP_ExUsTrPow 0x28 |
6288 | 34.3k | #define DOCSIS_CM_CAP_Opt802MPLSSup 0x29 |
6289 | 367 | #define DOCSIS_CM_CAP_DounEnc 0x2a |
6290 | 123 | #define DOCSIS_CM_CAP_EnrgMang 0x2c |
6291 | | |
6292 | | static const value_string docsis_cm_cap_type_vals[] = { |
6293 | | { DOCSIS_CM_CAP_CONCAT_SUP, "Concatenation Support" }, |
6294 | | { DOCSIS_CM_CAP_DOCSIS_VER, "DOCSIS Version" }, |
6295 | | { DOCSIS_CM_CAP_FRAG_SUP, "Fragmentation Support" }, |
6296 | | { DOCSIS_CM_CAP_PHS_SUP, "Payload Header Suppression Support" }, |
6297 | | { DOCSIS_CM_CAP_IGMP_SUP, "IGMP Support" }, |
6298 | | { DOCSIS_CM_CAP_PRIV_SUP, "Privacy Support" }, |
6299 | | { DOCSIS_CM_CAP_DSAID_SUP, "Downstream SAID Support" }, |
6300 | | { DOCSIS_CM_CAP_USSF_SUP, "Upstream Service Flow Support" }, |
6301 | | { DOCSIS_CM_CAP_FILT_SUP, "Optional Filtering Support" }, |
6302 | | { DOCSIS_CM_CAP_TET_MI, "Transmit Equalizer Taps per Modulation Interval" }, |
6303 | | { DOCSIS_CM_CAP_TET, "Number of Transmit Equalizer Taps" }, |
6304 | | { DOCSIS_CM_CAP_DCC_SUP, "DCC Support" }, |
6305 | | { DOCSIS_CM_CAP_IPFILT_SUP, "IP Filters Support" }, |
6306 | | { DOCSIS_CM_CAP_LLCFILT_SUP, "LLC Filters Support" }, |
6307 | | { DOCSIS_CM_CAP_EXPUNI_SPACE, "Expanded Unicast SID Space" }, |
6308 | | { DOCSIS_CM_CAP_RNGHLDOFF_SUP, "Ranging Hold-Off Support" }, |
6309 | | { DOCSIS_CM_CAP_L2VPN_SUP, "L2VPN Capability" }, |
6310 | | { DOCSIS_CM_CAP_L2VPN_HOST_SUP, "L2VPN eSAFE Host Capability" }, |
6311 | | { DOCSIS_CM_CAP_DUTFILT_SUP, "Downstream Unencrypted Traffic (DUT) Filtering" }, |
6312 | | { DOCSIS_CM_CAP_USFREQRNG_SUP, "Upstream Frequency Range Support" }, |
6313 | | { DOCSIS_CM_CAP_USSYMRATE_SUP, "Upstream Symbol Rate Support" }, |
6314 | | { DOCSIS_CM_CAP_SACM2_SUP, "Selectable Active Code Mode 2 Support" }, |
6315 | | { DOCSIS_CM_CAP_SACM2HOP_SUP, "Code Hopping Mode 2 Support" }, |
6316 | | { DOCSIS_CM_CAP_MULTTXCHAN_SUP, "Multiple Transmit Channel Support" }, |
6317 | | { DOCSIS_CM_CAP_512USTXCHAN_SUP, "5.12 Msps Upstream Transmit Channel Support" }, |
6318 | | { DOCSIS_CM_CAP_256USTXCHAN_SUP, "2.56 Msps Upstream Transmit Channel Support" }, |
6319 | | { DOCSIS_CM_CAP_TOTALSIDCLU_SUP, "Total SID Cluster Support" }, |
6320 | | { DOCSIS_CM_CAP_SIDCLUPERSF_SUP, "SID Clusters per Service Flow Support" }, |
6321 | | { DOCSIS_CM_CAP_MULTRXCHAN_SUP, "Multiple Receive Channel Support" }, |
6322 | | { DOCSIS_CM_CAP_TOTALDSID_SUP, "Total Downstream Service ID (DSID) Support" }, |
6323 | | { DOCSIS_CM_CAP_RESEQDSID_SUP, "Resequencing Downstream Service ID (DSID) Support" }, |
6324 | | { DOCSIS_CM_CAP_MULTDSID_SUP, "Multicast Downstream Service ID (DSID) Support" }, |
6325 | | { DOCSIS_CM_CAP_MULTDSIDFW_SUP, "Multicast DSID Forwarding" }, |
6326 | | { DOCSIS_CM_CAP_FCTF_SUP, "Frame Control Type Forwarding Capability" }, |
6327 | | { DOCSIS_CM_CAP_DPV_SUP, "DPV Capability" }, |
6328 | | { DOCSIS_CM_CAP_UGSPERUSFLOW_SUP, "Unsolicited Grant Service/Upstream Service Flow Support" }, |
6329 | | { DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP, "MAP and UCD Receipt Support" }, |
6330 | | { DOCSIS_CM_CAP_USDROPCLASSIF_SUP, "Upstream Drop Classifier Support" }, |
6331 | | { DOCSIS_CM_CAP_IPV6_SUP, "IPv6 Support" }, |
6332 | | { DOCSIS_CM_CAP_ExUsTrPow, "Extended Upstream Transmit Power Capability (1/4 dB)" }, |
6333 | | { DOCSIS_CM_CAP_Opt802MPLSSup, "Optional 802.1ad, 802.1ah, MPLS Classification Support" }, |
6334 | | { DOCSIS_CM_CAP_DounEnc, "D-ONU Capabilities Encoding" }, |
6335 | | { DOCSIS_CM_CAP_EnrgMang, "Energy Management Capabilities" }, |
6336 | | { 0, NULL } |
6337 | | }; |
6338 | | |
6339 | | static const value_string docsis_cm_cap_supported_vals[] = { |
6340 | | { 0x00, "Not Support" }, |
6341 | | { 0x01, "Supported" }, |
6342 | | { 0, NULL } |
6343 | | }; |
6344 | | |
6345 | | static const value_string docsis_cm_cap_version_vals[] = { |
6346 | | { 0x00, "DOCSIS 1.0" }, |
6347 | | { 0x01, "DOCSIS 1.1" }, |
6348 | | { 0x02, "DOCSIS 2.0" }, |
6349 | | { 0x03, "DOCSIS 3.0" }, |
6350 | | { 0, NULL } |
6351 | | }; |
6352 | | |
6353 | | static const value_string docsis_cm_cap_privacy_vals[] = { |
6354 | | { 0x00, "BPI Support" }, |
6355 | | { 0x01, "BPI Plus Support" }, |
6356 | | { 0, NULL } |
6357 | | }; |
6358 | | |
6359 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_cm; |
6360 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_eps; |
6361 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_emta; |
6362 | | static int hf_dhcp_docsis_cm_cap_ranging_hold_off_dsg; |
6363 | | |
6364 | | static const value_string docsis_cm_cap_l2vpn_vals[] = { |
6365 | | { 0x00, "CM not compliant with DOCSIS L2VPN Section 7 (default)" }, |
6366 | | { 0x01, "CM compliant with DOCSIS L2VPN Section 7" }, |
6367 | | { 0, NULL } |
6368 | | }; |
6369 | | |
6370 | | static const value_string docsis_cm_cap_filt_vals[] = { |
6371 | | { 0x00, "802.1P Filtering" }, |
6372 | | { 0x01, "802.1Q Filtering" }, |
6373 | | { 0, NULL } |
6374 | | }; |
6375 | | |
6376 | | static int hf_dhcp_docsis_cm_cap_mpls_stpid; |
6377 | | static int hf_dhcp_docsis_cm_cap_mpls_svid; |
6378 | | static int hf_dhcp_docsis_cm_cap_mpls_spcp; |
6379 | | static int hf_dhcp_docsis_cm_cap_mpls_sdei; |
6380 | | static int hf_dhcp_docsis_cm_cap_mpls_ctpid; |
6381 | | static int hf_dhcp_docsis_cm_cap_mpls_cvid; |
6382 | | static int hf_dhcp_docsis_cm_cap_mpls_cpcp; |
6383 | | static int hf_dhcp_docsis_cm_cap_mpls_ccfi; |
6384 | | static int hf_dhcp_docsis_cm_cap_mpls_stci; |
6385 | | static int hf_dhcp_docsis_cm_cap_mpls_ctci; |
6386 | | static int hf_dhcp_docsis_cm_cap_mpls_itpid; |
6387 | | static int hf_dhcp_docsis_cm_cap_mpls_isid; |
6388 | | static int hf_dhcp_docsis_cm_cap_mpls_itci; |
6389 | | static int hf_dhcp_docsis_cm_cap_mpls_ipcp; |
6390 | | static int hf_dhcp_docsis_cm_cap_mpls_idei; |
6391 | | static int hf_dhcp_docsis_cm_cap_mpls_iuca; |
6392 | | static int hf_dhcp_docsis_cm_cap_mpls_btpid; |
6393 | | static int hf_dhcp_docsis_cm_cap_mpls_btci; |
6394 | | static int hf_dhcp_docsis_cm_cap_mpls_bpcp; |
6395 | | static int hf_dhcp_docsis_cm_cap_mpls_bdei; |
6396 | | static int hf_dhcp_docsis_cm_cap_mpls_bvid; |
6397 | | static int hf_dhcp_docsis_cm_cap_mpls_bda; |
6398 | | static int hf_dhcp_docsis_cm_cap_mpls_bsa; |
6399 | | static int hf_dhcp_docsis_cm_cap_mpls_tc; |
6400 | | static int hf_dhcp_docsis_cm_cap_mpls_label; |
6401 | | |
6402 | | static const value_string docsis_cm_cap_enrgmang_vals[] = { |
6403 | | { 0x00, "Energy Management 1x1 Feature" }, |
6404 | | { 0, NULL } |
6405 | | }; |
6406 | | |
6407 | | static const value_string docsis_cm_cap_usfreqrng_vals[] = { |
6408 | | { 0x00, "Standard Upstream Frequency Range" }, |
6409 | | { 0x01, "Standard Upstream Frequency Range and Extended Upstream Frequency Range" }, |
6410 | | { 0, NULL } |
6411 | | }; |
6412 | | |
6413 | | static const value_string docsis_cm_cap_map_ucd_receipt_vals[] = { |
6414 | | { 0x00, "CM cannot support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" }, |
6415 | | { 0x01, "CM can support the receipt of MAPs and UCDs on downstreams other than the Primary Downstream Channel" }, |
6416 | | { 0, NULL } |
6417 | | }; |
6418 | | |
6419 | | static const value_string docsis_cm_cap_map_dpv_support_vals[] = { |
6420 | | { 0x00, "U1 supported as a Start Reference Point for DPV per Path" }, |
6421 | | { 0x01, "U1 supported as a Start Reference Point for DPV per Packet" }, |
6422 | | { 0, NULL } |
6423 | | }; |
6424 | | |
6425 | | static const value_string docsis_cm_cap_map_multDsidForward_support_vals[] = { |
6426 | | { 0x00, "No support for multicast DSID forwarding" }, |
6427 | | { 0x01, "Support for GMAC explicit multicast DSID forwarding" }, |
6428 | | { 0x02, "Support for GMAC promiscuous multicast DSID forwarding" }, |
6429 | | { 0, NULL } |
6430 | | }; |
6431 | | |
6432 | | static const value_string docsis_cm_cap_map_fctfc_support_vals[] = { |
6433 | | { 0x00, "Isolation Packet PDU MAC Header (FC_Type of 10) is not forwarded" }, |
6434 | | { 0x01, "Isolation Packet PDU MAC Header (FC_Type of 10) is forwarded" }, |
6435 | | { 0, NULL } |
6436 | | }; |
6437 | | |
6438 | | static const value_string docsis_cm_cap_map_l2vpn_esafe_index_support_vals[] = { |
6439 | | { 0x01, "ePs or eRouter" }, |
6440 | | { 0x10, "eMTA" }, |
6441 | | { 0x11, "eSTB-IP" }, |
6442 | | { 0x12, "eSTB-DSG" }, |
6443 | | { 0x13, "eTEA" }, |
6444 | | { 0, NULL } |
6445 | | }; |
6446 | | |
6447 | | static int hf_dhcp_docsis_cm_cap_ussymrate_160; |
6448 | | static int hf_dhcp_docsis_cm_cap_ussymrate_320; |
6449 | | static int hf_dhcp_docsis_cm_cap_ussymrate_640; |
6450 | | static int hf_dhcp_docsis_cm_cap_ussymrate_1280; |
6451 | | static int hf_dhcp_docsis_cm_cap_ussymrate_2560; |
6452 | | static int hf_dhcp_docsis_cm_cap_ussymrate_5120; |
6453 | | |
6454 | | static void |
6455 | | display_uint_with_range_checking(proto_item *ti, uint8_t val_byte, uint16_t val_uint16, int min_value, int max_value) |
6456 | 5.47k | { |
6457 | 5.47k | uint16_t value; |
6458 | | |
6459 | 5.47k | if (0 != val_byte) |
6460 | 2.00k | { |
6461 | 2.00k | value = val_byte; |
6462 | 2.00k | } |
6463 | 3.47k | else |
6464 | 3.47k | { |
6465 | 3.47k | value = val_uint16; |
6466 | 3.47k | } |
6467 | 5.47k | proto_item_append_text(ti, "%i", value); |
6468 | 5.47k | if ((value < min_value) || |
6469 | 3.44k | (value > max_value)) |
6470 | 3.09k | { |
6471 | 3.09k | proto_item_append_text(ti, " (Value Out-of-Range [%i..%i])", min_value, max_value); |
6472 | 3.09k | } |
6473 | 5.47k | } |
6474 | | |
6475 | | static void get_opt125_tlv(wmem_allocator_t *scope, tvbuff_t *tvb, unsigned off, uint8_t *tlvtype, uint8_t *tlvlen, uint8_t **value) |
6476 | 14.6k | { |
6477 | | /* Type */ |
6478 | 14.6k | *tlvtype = tvb_get_uint8(tvb, off); |
6479 | | /* Length */ |
6480 | 14.6k | *tlvlen = tvb_get_uint8(tvb, off+1); |
6481 | | /* Value */ |
6482 | 14.6k | *value = (uint8_t *)tvb_memdup(scope, tvb, off + 2, *tlvlen); |
6483 | 14.6k | } |
6484 | | |
6485 | | static void get_opt60_tlv(wmem_allocator_t *scope, tvbuff_t *tvb, unsigned off, uint8_t *tlvtype, uint8_t *tlvlen, uint8_t **value) |
6486 | 2.57k | { |
6487 | 2.57k | unsigned i; |
6488 | 2.57k | uint8_t *val_asc; |
6489 | | |
6490 | 2.57k | val_asc = (uint8_t *)wmem_alloc0(scope, 4); |
6491 | | /* Type */ |
6492 | 2.57k | tvb_memcpy(tvb, val_asc, off, 2); |
6493 | 2.57k | *tlvtype = (uint8_t)strtoul((char*)val_asc, NULL, 16); |
6494 | | /* Length */ |
6495 | 2.57k | tvb_memcpy(tvb, val_asc, off + 2, 2); |
6496 | 2.57k | *tlvlen = (uint8_t)strtoul((char*)val_asc, NULL, 16); |
6497 | | /* Value */ |
6498 | 2.57k | *value = (uint8_t *)wmem_alloc0(scope, *tlvlen); |
6499 | 8.09k | for (i=0; i<*tlvlen; i++) |
6500 | 5.52k | { |
6501 | 5.52k | memset(val_asc, 0, 4); |
6502 | 5.52k | tvb_memcpy(tvb, val_asc, off + ((i*2) + 4), 2); |
6503 | 5.52k | (*value)[i] = (uint8_t)strtoul((char*)val_asc, NULL, 16); |
6504 | 5.52k | } |
6505 | 2.57k | } |
6506 | | |
6507 | | static void |
6508 | | dissect_docsis_cm_cap(packet_info *pinfo, proto_tree *v_tree, tvbuff_t *tvb, int voff, int len, bool opt125) |
6509 | 635 | { |
6510 | 635 | uint8_t *asc_val; |
6511 | 635 | proto_item *ti; |
6512 | 635 | proto_tree *subtree; |
6513 | 635 | uint8_t tlv_type; |
6514 | 635 | uint8_t tlv_len; |
6515 | 635 | uint8_t val_byte = 0; |
6516 | 635 | uint16_t val_uint16 = 0; |
6517 | 635 | uint8_t *val_other = NULL; |
6518 | 635 | unsigned off = voff; |
6519 | | |
6520 | 635 | asc_val = (uint8_t*)wmem_alloc0(pinfo->pool, 4); |
6521 | | |
6522 | 635 | if (opt125) |
6523 | 559 | { |
6524 | | /* Option 125 is formatted as uint8's */ |
6525 | | /* Type */ |
6526 | 559 | tlv_type = tvb_get_uint8(tvb, off); |
6527 | | /* Length */ |
6528 | 559 | tlv_len = tvb_get_uint8(tvb, off+1); |
6529 | 559 | proto_tree_add_uint(v_tree, hf_dhcp_docsis_cm_cap_len, tvb, off+1, 1, tlv_len); |
6530 | 559 | } |
6531 | 76 | else |
6532 | 76 | { |
6533 | | /* Option 60 is formatted as an ASCII string. |
6534 | | Since the capabilities are the same for both options |
6535 | | I am converting the Option 60 values from ASCII to |
6536 | | uint8s to allow the same parser to work for both */ |
6537 | 76 | off += DOCSIS_CM_CAP_TLV_OFF; |
6538 | 76 | tvb_memcpy (tvb, asc_val, off, 2); |
6539 | 76 | tlv_len = (uint8_t)strtoul((char*)asc_val, NULL, 16); |
6540 | 76 | proto_tree_add_uint(v_tree, hf_dhcp_docsis_cm_cap_len, tvb, off+2, 2, tlv_len); |
6541 | 76 | } |
6542 | | |
6543 | 635 | off+=2; |
6544 | | |
6545 | 17.6k | while (off - ((unsigned) voff) < ((unsigned) len)) |
6546 | 17.1k | { |
6547 | 17.1k | tlv_type = 0; |
6548 | 17.1k | tlv_len = 0; |
6549 | 17.1k | val_byte = 0; |
6550 | 17.1k | val_uint16 = 0; |
6551 | | |
6552 | 17.1k | if (opt125) |
6553 | 14.6k | { |
6554 | 14.6k | get_opt125_tlv(pinfo->pool, tvb, off, &tlv_type, &tlv_len, &val_other); |
6555 | 14.6k | ti = proto_tree_add_uint_format(v_tree, hf_dhcp_docsis_cm_cap_type, tvb, off, |
6556 | 14.6k | tlv_len + 2, |
6557 | 14.6k | tlv_type, |
6558 | 14.6k | "0x%02x: %s = ", |
6559 | 14.6k | tlv_type, |
6560 | 14.6k | val_to_str_const(tlv_type, docsis_cm_cap_type_vals, "unknown")); |
6561 | 14.6k | } |
6562 | 2.57k | else |
6563 | 2.57k | { |
6564 | | /* Option 60 is formatted as an ASCII string. Since the capabilities |
6565 | | are the same for both options I am converting the Option 60 values |
6566 | | from ASCII to uint8s to allow the same parser to work for both */ |
6567 | 2.57k | get_opt60_tlv(pinfo->pool, tvb, off, &tlv_type, &tlv_len, &val_other); |
6568 | 2.57k | ti = proto_tree_add_uint_format(v_tree, hf_dhcp_docsis_cm_cap_type, tvb, off, |
6569 | 2.57k | (tlv_len * 2) + 4, |
6570 | 2.57k | tlv_type, |
6571 | 2.57k | "0x%02x: %s = ", |
6572 | 2.57k | tlv_type, |
6573 | 2.57k | val_to_str_const(tlv_type, docsis_cm_cap_type_vals, "unknown")); |
6574 | 2.57k | } |
6575 | | |
6576 | 17.1k | if (tlv_len == 1) |
6577 | 4.38k | { |
6578 | | /* The value refers to a byte. */ |
6579 | 4.38k | val_byte = val_other[0]; |
6580 | 4.38k | } |
6581 | 12.8k | else |
6582 | 12.8k | { |
6583 | 12.8k | if (tlv_len == 2) |
6584 | 1.29k | { |
6585 | | /* The value refers to a uint16. */ |
6586 | 1.29k | val_uint16 = (val_other[0] << 8) + val_other[1]; |
6587 | 1.29k | } |
6588 | 12.8k | } |
6589 | | |
6590 | 17.1k | switch (tlv_type) |
6591 | 17.1k | { |
6592 | 722 | case DOCSIS_CM_CAP_CONCAT_SUP: |
6593 | 1.03k | case DOCSIS_CM_CAP_FRAG_SUP: |
6594 | 1.38k | case DOCSIS_CM_CAP_PHS_SUP: |
6595 | 1.67k | case DOCSIS_CM_CAP_IGMP_SUP: |
6596 | 1.84k | case DOCSIS_CM_CAP_DCC_SUP: |
6597 | 2.02k | case DOCSIS_CM_CAP_EXPUNI_SPACE: |
6598 | 2.20k | case DOCSIS_CM_CAP_DUTFILT_SUP: |
6599 | 2.35k | case DOCSIS_CM_CAP_SACM2_SUP: |
6600 | 2.52k | case DOCSIS_CM_CAP_SACM2HOP_SUP: |
6601 | 2.64k | case DOCSIS_CM_CAP_IPV6_SUP: |
6602 | 2.64k | proto_item_append_text(ti, |
6603 | 2.64k | "%s", |
6604 | 2.64k | val_to_str_const(val_byte, docsis_cm_cap_supported_vals, "Reserved")); |
6605 | 2.64k | break; |
6606 | 391 | case DOCSIS_CM_CAP_DOCSIS_VER: |
6607 | 391 | proto_item_append_text(ti, |
6608 | 391 | "%s", |
6609 | 391 | val_to_str_const(val_byte, docsis_cm_cap_version_vals, "Reserved")); |
6610 | 391 | break; |
6611 | 272 | case DOCSIS_CM_CAP_PRIV_SUP: |
6612 | 272 | proto_item_append_text(ti, |
6613 | 272 | "%s", |
6614 | 272 | val_to_str_const(val_byte, docsis_cm_cap_privacy_vals, "Reserved")); |
6615 | 272 | break; |
6616 | 123 | case DOCSIS_CM_CAP_FILT_SUP: |
6617 | 123 | proto_item_append_text(ti, |
6618 | 123 | "%s", |
6619 | 123 | val_to_str_const(val_byte, docsis_cm_cap_filt_vals, "Reserved")); |
6620 | 123 | break; |
6621 | 168 | case DOCSIS_CM_CAP_L2VPN_SUP: |
6622 | 168 | proto_item_append_text(ti, |
6623 | 168 | "%s", |
6624 | 168 | val_to_str_const(val_byte, docsis_cm_cap_l2vpn_vals, "Reserved")); |
6625 | 168 | break; |
6626 | 166 | case DOCSIS_CM_CAP_L2VPN_HOST_SUP: |
6627 | 166 | if (tlv_len == 7) { |
6628 | 35 | proto_item_append_text(ti, |
6629 | 35 | "eSAFE ifIndex %s (%i)/eSAFE MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x", |
6630 | 35 | val_to_str_const(val_other[0], docsis_cm_cap_map_l2vpn_esafe_index_support_vals, "Reserved"), |
6631 | 35 | val_other[0], |
6632 | 35 | val_other[1], |
6633 | 35 | val_other[2], |
6634 | 35 | val_other[3], |
6635 | 35 | val_other[4], |
6636 | 35 | val_other[5], |
6637 | 35 | val_other[6]); |
6638 | 131 | } else { |
6639 | 131 | proto_item_append_text(ti, |
6640 | 131 | "Invalid (length should be 7, is %d)", |
6641 | 131 | tlv_len); |
6642 | 131 | } |
6643 | 166 | break; |
6644 | 149 | case DOCSIS_CM_CAP_USFREQRNG_SUP: |
6645 | 149 | proto_item_append_text(ti, |
6646 | 149 | "%s", |
6647 | 149 | val_to_str_const(val_byte, docsis_cm_cap_usfreqrng_vals, "Reserved")); |
6648 | 149 | break; |
6649 | 323 | case DOCSIS_CM_CAP_MAPUCDRECEIPT_SUP: |
6650 | 323 | proto_item_append_text(ti, |
6651 | 323 | "%s", |
6652 | 323 | val_to_str_const(val_byte, docsis_cm_cap_map_ucd_receipt_vals, "Reserved")); |
6653 | 323 | break; |
6654 | 182 | case DOCSIS_CM_CAP_DPV_SUP: |
6655 | 182 | proto_item_append_text(ti, |
6656 | 182 | "%s", |
6657 | 182 | val_to_str_const(val_byte, docsis_cm_cap_map_dpv_support_vals, "Reserved")); |
6658 | 182 | break; |
6659 | 205 | case DOCSIS_CM_CAP_DSAID_SUP: |
6660 | 409 | case DOCSIS_CM_CAP_MULTTXCHAN_SUP: |
6661 | 570 | case DOCSIS_CM_CAP_512USTXCHAN_SUP: |
6662 | 742 | case DOCSIS_CM_CAP_256USTXCHAN_SUP: |
6663 | 981 | case DOCSIS_CM_CAP_TOTALSIDCLU_SUP: |
6664 | 1.17k | case DOCSIS_CM_CAP_MULTRXCHAN_SUP: |
6665 | 1.38k | case DOCSIS_CM_CAP_UGSPERUSFLOW_SUP: |
6666 | 1.60k | case DOCSIS_CM_CAP_USSF_SUP: |
6667 | 1.60k | display_uint_with_range_checking(ti, val_byte, val_uint16, 0, 255); |
6668 | 1.60k | break; |
6669 | 181 | case DOCSIS_CM_CAP_RESEQDSID_SUP: |
6670 | 773 | case DOCSIS_CM_CAP_MULTDSID_SUP: |
6671 | 773 | display_uint_with_range_checking(ti, val_byte, val_uint16, 16, 255); |
6672 | 773 | break; |
6673 | 610 | case DOCSIS_CM_CAP_SIDCLUPERSF_SUP: |
6674 | 610 | display_uint_with_range_checking(ti, val_byte, val_uint16, 2, 8); |
6675 | 610 | break; |
6676 | 774 | case DOCSIS_CM_CAP_TOTALDSID_SUP: |
6677 | 774 | display_uint_with_range_checking(ti, val_byte, val_uint16, 32, 255); |
6678 | 774 | break; |
6679 | 495 | case DOCSIS_CM_CAP_TET: |
6680 | 495 | display_uint_with_range_checking(ti, val_byte, val_uint16, 8, 64); |
6681 | 495 | break; |
6682 | 780 | case DOCSIS_CM_CAP_TET_MI: |
6683 | 780 | if ((val_byte == 1) || |
6684 | 657 | (val_byte == 2) || |
6685 | 566 | (val_byte == 4)) |
6686 | 414 | { |
6687 | 414 | proto_item_append_text(ti, |
6688 | 414 | " %i", |
6689 | 414 | val_byte); |
6690 | 414 | } |
6691 | 366 | else |
6692 | 366 | { |
6693 | 366 | proto_item_append_text(ti, |
6694 | 366 | " (Invalid Value %i : Should be [1,2,4]", |
6695 | 366 | val_byte); |
6696 | 366 | } |
6697 | 780 | break; |
6698 | 256 | case DOCSIS_CM_CAP_IPFILT_SUP: |
6699 | 447 | case DOCSIS_CM_CAP_USDROPCLASSIF_SUP: |
6700 | 447 | display_uint_with_range_checking(ti, val_byte, val_uint16, 64, 65535); |
6701 | 447 | break; |
6702 | 436 | case DOCSIS_CM_CAP_LLCFILT_SUP: |
6703 | 436 | display_uint_with_range_checking(ti, val_byte, val_uint16, 10, 65535); |
6704 | 436 | break; |
6705 | 535 | case DOCSIS_CM_CAP_ExUsTrPow: |
6706 | 535 | if (val_byte == 0) |
6707 | 192 | { |
6708 | 192 | proto_item_append_text(ti, "%i", val_byte); |
6709 | 192 | } |
6710 | 343 | else |
6711 | 343 | { |
6712 | 343 | display_uint_with_range_checking(ti, val_byte, val_uint16, 205, 244); |
6713 | 343 | } |
6714 | 535 | break; |
6715 | 356 | case DOCSIS_CM_CAP_Opt802MPLSSup: |
6716 | 356 | proto_item_append_text(ti, |
6717 | 356 | "0x%02x", val_byte); |
6718 | 367 | case DOCSIS_CM_CAP_DounEnc: |
6719 | | /* TODO: add D-ONU Capabilities Encoding according DPoE-SP-MULPIv1.0-I02-120607 */ |
6720 | 367 | break; |
6721 | 123 | case DOCSIS_CM_CAP_EnrgMang: |
6722 | 123 | proto_item_append_text(ti, |
6723 | 123 | "%s", |
6724 | 123 | val_to_str_const(val_byte, docsis_cm_cap_enrgmang_vals, "Reserved")); |
6725 | 123 | break; |
6726 | 345 | case DOCSIS_CM_CAP_RNGHLDOFF_SUP: |
6727 | 345 | proto_item_append_text(ti, |
6728 | 345 | "Ranging ID "); |
6729 | 345 | if (tlv_len == 4) |
6730 | 119 | { |
6731 | 119 | proto_item_append_text(ti, |
6732 | 119 | "(0x%04x)", (val_other[0] << sizeof(uint8_t)) + val_other[1]); |
6733 | 119 | proto_item_append_text(ti, |
6734 | 119 | " Component Bit Mask "); |
6735 | 119 | proto_item_append_text(ti, |
6736 | 119 | "(0x%04x)", (val_other[2] << sizeof(uint8_t)) + val_other[3]); |
6737 | 119 | } |
6738 | 226 | else |
6739 | 226 | { |
6740 | 226 | proto_item_append_text(ti, |
6741 | 226 | " (Invalid Length %u : Should be 4", |
6742 | 226 | tlv_len); |
6743 | 226 | } |
6744 | 345 | break; |
6745 | 271 | case DOCSIS_CM_CAP_USSYMRATE_SUP: |
6746 | 271 | proto_item_append_text(ti, |
6747 | 271 | "0x%02x", val_byte); |
6748 | 271 | break; |
6749 | 116 | case DOCSIS_CM_CAP_FCTF_SUP: |
6750 | 116 | proto_item_append_text(ti, |
6751 | 116 | "%s", |
6752 | 116 | val_to_str_const(val_byte, docsis_cm_cap_map_fctfc_support_vals, "Reserved")); |
6753 | 116 | break; |
6754 | 144 | case DOCSIS_CM_CAP_MULTDSIDFW_SUP: |
6755 | 144 | proto_item_append_text(ti, |
6756 | 144 | "%s", |
6757 | 144 | val_to_str_const(val_byte, docsis_cm_cap_map_multDsidForward_support_vals, "Reserved")); |
6758 | 144 | break; |
6759 | 17.1k | } |
6760 | | |
6761 | 16.9k | subtree = proto_item_add_subtree(ti, ett_dhcp_option); |
6762 | 16.9k | if (tlv_type == DOCSIS_CM_CAP_RNGHLDOFF_SUP && tlv_len >= 4) |
6763 | 161 | { |
6764 | 161 | static int * const flags[] = { |
6765 | 161 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_cm, |
6766 | 161 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_eps, |
6767 | 161 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_emta, |
6768 | 161 | &hf_dhcp_docsis_cm_cap_ranging_hold_off_dsg, |
6769 | 161 | NULL |
6770 | 161 | }; |
6771 | 161 | val_uint16 = (val_other[2] << sizeof(uint8_t)) + val_other[3]; |
6772 | | |
6773 | 161 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 4, flags, val_uint16); |
6774 | 161 | } |
6775 | 16.9k | if (tlv_type == DOCSIS_CM_CAP_USSYMRATE_SUP) |
6776 | 271 | { |
6777 | 271 | static int * const flags[] = { |
6778 | 271 | &hf_dhcp_docsis_cm_cap_ussymrate_160, |
6779 | 271 | &hf_dhcp_docsis_cm_cap_ussymrate_320, |
6780 | 271 | &hf_dhcp_docsis_cm_cap_ussymrate_640, |
6781 | 271 | &hf_dhcp_docsis_cm_cap_ussymrate_1280, |
6782 | 271 | &hf_dhcp_docsis_cm_cap_ussymrate_2560, |
6783 | 271 | &hf_dhcp_docsis_cm_cap_ussymrate_5120, |
6784 | 271 | NULL |
6785 | 271 | }; |
6786 | | |
6787 | 271 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 1, flags, val_byte); |
6788 | 271 | } |
6789 | 16.9k | if (tlv_type == DOCSIS_CM_CAP_Opt802MPLSSup && tlv_len >= 4) |
6790 | 122 | { |
6791 | 122 | static int * const flags[] = { |
6792 | 122 | &hf_dhcp_docsis_cm_cap_mpls_stpid, |
6793 | 122 | &hf_dhcp_docsis_cm_cap_mpls_svid, |
6794 | 122 | &hf_dhcp_docsis_cm_cap_mpls_spcp, |
6795 | 122 | &hf_dhcp_docsis_cm_cap_mpls_sdei, |
6796 | 122 | &hf_dhcp_docsis_cm_cap_mpls_ctpid, |
6797 | 122 | &hf_dhcp_docsis_cm_cap_mpls_cvid, |
6798 | 122 | &hf_dhcp_docsis_cm_cap_mpls_cpcp, |
6799 | 122 | &hf_dhcp_docsis_cm_cap_mpls_ccfi, |
6800 | 122 | &hf_dhcp_docsis_cm_cap_mpls_stci, |
6801 | 122 | &hf_dhcp_docsis_cm_cap_mpls_ctci, |
6802 | 122 | &hf_dhcp_docsis_cm_cap_mpls_itpid, |
6803 | 122 | &hf_dhcp_docsis_cm_cap_mpls_isid, |
6804 | 122 | &hf_dhcp_docsis_cm_cap_mpls_itci, |
6805 | 122 | &hf_dhcp_docsis_cm_cap_mpls_ipcp, |
6806 | 122 | &hf_dhcp_docsis_cm_cap_mpls_idei, |
6807 | 122 | &hf_dhcp_docsis_cm_cap_mpls_iuca, |
6808 | 122 | &hf_dhcp_docsis_cm_cap_mpls_btpid, |
6809 | 122 | &hf_dhcp_docsis_cm_cap_mpls_btci, |
6810 | 122 | &hf_dhcp_docsis_cm_cap_mpls_bpcp, |
6811 | 122 | &hf_dhcp_docsis_cm_cap_mpls_bdei, |
6812 | 122 | &hf_dhcp_docsis_cm_cap_mpls_bvid, |
6813 | 122 | &hf_dhcp_docsis_cm_cap_mpls_bda, |
6814 | 122 | &hf_dhcp_docsis_cm_cap_mpls_bsa, |
6815 | 122 | &hf_dhcp_docsis_cm_cap_mpls_tc, |
6816 | 122 | &hf_dhcp_docsis_cm_cap_mpls_label, |
6817 | 122 | NULL |
6818 | 122 | }; |
6819 | 122 | val_uint16 = (val_other[2] << sizeof(uint8_t)) + val_other[3]; |
6820 | | |
6821 | 122 | proto_tree_add_bitmask_list_value(subtree, tvb, off + 2, 4, flags, val_uint16); |
6822 | 122 | } |
6823 | 16.9k | if (opt125) |
6824 | 14.4k | { |
6825 | 14.4k | off += (tlv_len) + 2; |
6826 | 14.4k | } |
6827 | 2.50k | else |
6828 | 2.50k | { |
6829 | 2.50k | off += (tlv_len *2) + 4; |
6830 | 2.50k | } |
6831 | | |
6832 | 16.9k | } |
6833 | 635 | } |
6834 | | |
6835 | | static bool |
6836 | | dissect_packetcable_cm_vendor_id_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ ) |
6837 | 1.17k | { |
6838 | 1.17k | uint8_t* vendor_id; |
6839 | | |
6840 | 1.17k | if (tvb_reported_length(tvb) < 10) { |
6841 | 41 | return false; |
6842 | 41 | } |
6843 | | |
6844 | 1.13k | vendor_id = tvb_get_string_enc(pinfo->pool, tvb, 0, 10, ENC_ASCII|ENC_NA); |
6845 | 1.13k | if ((strcmp((const char*)vendor_id, PACKETCABLE_CM_CAP11) == 0) || |
6846 | 1.10k | (strcmp((const char*)vendor_id, PACKETCABLE_CM_CAP20) == 0)) { |
6847 | 76 | dissect_docsis_cm_cap(pinfo, tree, tvb, 0, tvb_reported_length(tvb), false); |
6848 | 76 | return true; |
6849 | 76 | } |
6850 | | |
6851 | 1.06k | if ((strcmp((const char*)vendor_id, PACKETCABLE_CM_CAP30) == 0)) { |
6852 | 2 | proto_tree_add_item(tree, hf_dhcp_option_vendor_class_data, tvb, 0, tvb_reported_length(tvb), ENC_ASCII); |
6853 | 2 | return true; |
6854 | 2 | } |
6855 | | |
6856 | 1.05k | return false; |
6857 | 1.06k | } |
6858 | | |
6859 | | static bool |
6860 | | dissect_apple_bsdp_vendor_id_heur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) |
6861 | | |
6862 | 1.24k | { |
6863 | 1.24k | int vendor_id_len = (int)strlen(APPLE_BSDP_CLIENT); |
6864 | 1.24k | if ((int)tvb_reported_length(tvb) < vendor_id_len) { |
6865 | 41 | return false; |
6866 | 41 | } |
6867 | | |
6868 | 1.20k | if (tvb_memeql(tvb, 0, (const uint8_t*)APPLE_BSDP_CLIENT, vendor_id_len) == 0) { |
6869 | 58 | 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); |
6870 | 58 | return true; |
6871 | 58 | } |
6872 | | |
6873 | 1.14k | return false; |
6874 | 1.20k | } |
6875 | | |
6876 | | |
6877 | | /* Definitions specific to PKT-SP-PROV-I05-021127 begin with "PKT_CCC_I05". |
6878 | | Definitions specific to IETF draft 5 and RFC 3495 begin with "PKT_CCC_IETF". |
6879 | | Shared definitions begin with "PKT_CCC". |
6880 | | */ |
6881 | 536 | #define PKT_CCC_PRI_DHCP 1 |
6882 | 912 | #define PKT_CCC_SEC_DHCP 2 |
6883 | 0 | #define PKT_CCC_I05_SNMP 3 |
6884 | 727 | #define PKT_CCC_IETF_PROV_SRV 3 |
6885 | 0 | #define PKT_CCC_I05_PRI_DNS 4 |
6886 | 199 | #define PKT_CCC_IETF_AS_KRB 4 |
6887 | 0 | #define PKT_CCC_I05_SEC_DNS 5 |
6888 | 450 | #define PKT_CCC_IETF_AP_KRB 5 |
6889 | 286 | #define PKT_CCC_KRB_REALM 6 |
6890 | 315 | #define PKT_CCC_TGT_FLAG 7 |
6891 | 293 | #define PKT_CCC_PROV_TIMER 8 |
6892 | 0 | #define PKT_CCC_CMS_FQDN 9 |
6893 | 230 | #define PKT_CCC_IETF_SEC_TKT 9 |
6894 | 0 | #define PKT_CCC_AS_KRB 10 |
6895 | 0 | #define PKT_CCC_AP_KRB 11 |
6896 | 0 | #define PKT_CCC_MTA_KRB_CLEAR 12 |
6897 | | |
6898 | | static const value_string pkt_i05_ccc_opt_vals[] = { |
6899 | | { PKT_CCC_PRI_DHCP, "Primary DHCP Server" }, |
6900 | | { PKT_CCC_SEC_DHCP, "Secondary DHCP Server" }, |
6901 | | { PKT_CCC_I05_SNMP, "SNMP Entity" }, |
6902 | | { PKT_CCC_I05_PRI_DNS, "Primary DNS Server" }, |
6903 | | { PKT_CCC_I05_SEC_DNS, "Secondary DNS Server" }, |
6904 | | { PKT_CCC_KRB_REALM, "Kerberos Realm" }, |
6905 | | { PKT_CCC_TGT_FLAG, "MTA should fetch TGT?" }, |
6906 | | { PKT_CCC_PROV_TIMER, "Provisioning Timer" }, |
6907 | | { PKT_CCC_CMS_FQDN, "CMS FQDN" }, |
6908 | | { PKT_CCC_AS_KRB, "AS-REQ/AS-REP Backoff and Retry" }, |
6909 | | { PKT_CCC_AP_KRB, "AP-REQ/AP-REP Backoff and Retry" }, |
6910 | | { PKT_CCC_MTA_KRB_CLEAR, "MTA should clear Kerberos tickets?" }, |
6911 | | { 0, NULL }, |
6912 | | }; |
6913 | | |
6914 | | static const value_string pkt_draft5_ccc_opt_vals[] = { |
6915 | | { PKT_CCC_PRI_DHCP, "TSP's Primary DHCP Server" }, |
6916 | | { PKT_CCC_SEC_DHCP, "TSP's Secondary DHCP Server" }, |
6917 | | { PKT_CCC_IETF_PROV_SRV, "TSP's Provisioning Server" }, |
6918 | | { PKT_CCC_IETF_AS_KRB, "TSP's AS-REQ/AS-REP Backoff and Retry" }, |
6919 | | { PKT_CCC_IETF_AP_KRB, "TSP's AP-REQ/AP-REP Backoff and Retry" }, |
6920 | | { PKT_CCC_KRB_REALM, "TSP's Kerberos Realm Name" }, |
6921 | | { PKT_CCC_TGT_FLAG, "TSP's Ticket Granting Server Utilization" }, |
6922 | | { PKT_CCC_PROV_TIMER, "TSP's Provisioning Timer Value" }, |
6923 | | { PKT_CCC_IETF_SEC_TKT, "PacketCable Security Ticket Control" }, |
6924 | | { 0, NULL }, |
6925 | | }; |
6926 | | |
6927 | | static const value_string pkt_i05_ccc_ticket_ctl_vals[] = { |
6928 | | { 1, "Invalidate Provisioning Application Server's ticket" }, |
6929 | | { 2, "Invalidate all CMS Application Server tickets" }, |
6930 | | { 3, "Invalidate all Application Server tickets" }, |
6931 | | { 0, NULL }, |
6932 | | }; |
6933 | | |
6934 | | static int |
6935 | | dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
6936 | | tvbuff_t *tvb, int optoff, int optend) |
6937 | 0 | { |
6938 | 0 | int suboptoff = optoff; |
6939 | 0 | uint8_t subopt, subopt_len, fetch_tgt, timer_val, ticket_ctl; |
6940 | 0 | proto_tree *pkt_s_tree; |
6941 | 0 | proto_item *vti; |
6942 | |
|
6943 | 0 | subopt = tvb_get_uint8(tvb, optoff); |
6944 | 0 | suboptoff++; |
6945 | |
|
6946 | 0 | if (suboptoff >= optend) { |
6947 | 0 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
6948 | 0 | "Suboption %d: no room left in option for suboption length", subopt); |
6949 | 0 | return (optend); |
6950 | 0 | } |
6951 | | |
6952 | 0 | subopt_len = tvb_get_uint8(tvb, optoff); |
6953 | 0 | suboptoff++; |
6954 | |
|
6955 | 0 | vti = proto_tree_add_uint(v_tree, hf_dhcp_pc_i05_ccc_suboption, tvb, optoff, 1, subopt); |
6956 | 0 | proto_item_set_len(vti, subopt_len + 2); |
6957 | 0 | proto_item_append_text(vti, ": "); |
6958 | |
|
6959 | 0 | switch (subopt) { |
6960 | | |
6961 | 0 | case PKT_CCC_PRI_DHCP: /* String values */ |
6962 | 0 | case PKT_CCC_SEC_DHCP: |
6963 | 0 | case PKT_CCC_I05_SNMP: |
6964 | 0 | case PKT_CCC_I05_PRI_DNS: |
6965 | 0 | case PKT_CCC_I05_SEC_DNS: |
6966 | 0 | case PKT_CCC_KRB_REALM: |
6967 | 0 | case PKT_CCC_CMS_FQDN: |
6968 | 0 | proto_item_append_text(vti, "%s (%u byte%s)", |
6969 | 0 | tvb_format_stringzpad(pinfo->pool, tvb, suboptoff, subopt_len), |
6970 | 0 | subopt_len, |
6971 | 0 | plurality(subopt_len, "", "s") ); |
6972 | 0 | suboptoff += subopt_len; |
6973 | 0 | break; |
6974 | | |
6975 | 0 | case PKT_CCC_TGT_FLAG: |
6976 | 0 | if (suboptoff+1 > optend) { |
6977 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
6978 | 0 | return (optend); |
6979 | 0 | } |
6980 | 0 | fetch_tgt = tvb_get_uint8(tvb, suboptoff); |
6981 | 0 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
6982 | 0 | fetch_tgt ? "Yes" : "No", |
6983 | 0 | subopt_len, |
6984 | 0 | plurality(subopt_len, "", "s"), |
6985 | 0 | subopt_len != 1 ? " [Invalid]" : ""); |
6986 | 0 | suboptoff += subopt_len; |
6987 | 0 | break; |
6988 | | |
6989 | 0 | case PKT_CCC_PROV_TIMER: |
6990 | 0 | if (suboptoff+1 > optend) { |
6991 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
6992 | 0 | return (optend); |
6993 | 0 | } |
6994 | 0 | timer_val = tvb_get_uint8(tvb, suboptoff); |
6995 | 0 | proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val, |
6996 | 0 | timer_val > 30 ? " [Invalid]" : "", |
6997 | 0 | subopt_len, |
6998 | 0 | plurality(subopt_len, "", "s"), |
6999 | 0 | subopt_len != 1 ? " [Invalid]" : ""); |
7000 | 0 | suboptoff += subopt_len; |
7001 | 0 | break; |
7002 | | |
7003 | 0 | case PKT_CCC_AS_KRB: |
7004 | 0 | if (suboptoff+12 > optend) { |
7005 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7006 | 0 | return (optend); |
7007 | 0 | } |
7008 | 0 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7009 | 0 | plurality(subopt_len, "", "s"), |
7010 | 0 | subopt_len != 12 ? " [Invalid]" : ""); |
7011 | 0 | if (subopt_len == 12) { |
7012 | 0 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7013 | 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); |
7014 | 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); |
7015 | 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); |
7016 | 0 | } |
7017 | 0 | suboptoff += subopt_len; |
7018 | 0 | break; |
7019 | | |
7020 | 0 | case PKT_CCC_AP_KRB: |
7021 | 0 | if (suboptoff+12 > optend) { |
7022 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7023 | 0 | return (optend); |
7024 | 0 | } |
7025 | 0 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7026 | 0 | plurality(subopt_len, "", "s"), |
7027 | 0 | subopt_len != 12 ? " [Invalid]" : ""); |
7028 | 0 | if (subopt_len == 12) { |
7029 | 0 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7030 | 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); |
7031 | 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); |
7032 | 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); |
7033 | 0 | } |
7034 | 0 | suboptoff += subopt_len; |
7035 | 0 | break; |
7036 | | |
7037 | 0 | case PKT_CCC_MTA_KRB_CLEAR: |
7038 | 0 | if (suboptoff+1 > optend) { |
7039 | 0 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7040 | 0 | return (optend); |
7041 | 0 | } |
7042 | 0 | ticket_ctl = tvb_get_uint8(tvb, suboptoff); |
7043 | 0 | proto_item_append_text(vti, "%s (%u) (%u byte%s%s)", |
7044 | 0 | val_to_str_const (ticket_ctl, pkt_i05_ccc_ticket_ctl_vals, "unknown/invalid"), |
7045 | 0 | ticket_ctl, |
7046 | 0 | subopt_len, |
7047 | 0 | plurality(subopt_len, "", "s"), |
7048 | 0 | subopt_len != 1 ? " [Invalid]" : ""); |
7049 | 0 | suboptoff += subopt_len; |
7050 | 0 | break; |
7051 | | |
7052 | 0 | default: |
7053 | 0 | suboptoff += subopt_len; |
7054 | 0 | break; |
7055 | |
|
7056 | 0 | } |
7057 | 0 | return suboptoff; |
7058 | 0 | } |
7059 | | |
7060 | | static int hf_dhcp_ccc_ietf_sec_tkt_pc_provision_server; |
7061 | | static int hf_dhcp_ccc_ietf_sec_tkt_all_pc_call_management; |
7062 | | |
7063 | | static int |
7064 | | dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, |
7065 | | tvbuff_t *tvb, int optoff, int optend, int revision) |
7066 | 5.74k | { |
7067 | 5.74k | int suboptoff = optoff; |
7068 | 5.74k | uint8_t subopt, subopt_len; |
7069 | 5.74k | uint8_t prov_type, fetch_tgt, timer_val; |
7070 | 5.74k | uint16_t sec_tcm; |
7071 | 5.74k | proto_tree *pkt_s_tree; |
7072 | 5.74k | proto_item *vti; |
7073 | 5.74k | int max_timer_val = 255; |
7074 | 5.74k | const char *dns_name; |
7075 | 5.74k | int dns_name_len; |
7076 | | |
7077 | 5.74k | subopt = tvb_get_uint8(tvb, suboptoff); |
7078 | 5.74k | suboptoff++; |
7079 | | |
7080 | 5.74k | if (suboptoff >= optend) { |
7081 | 15 | expert_add_info_format(pinfo, v_ti, &ei_dhcp_missing_subopt_length, |
7082 | 15 | "Suboption %d: no room left in option for suboption length", subopt); |
7083 | 15 | return (optend); |
7084 | 15 | } |
7085 | 5.73k | subopt_len = tvb_get_uint8(tvb, suboptoff); |
7086 | 5.73k | suboptoff++; |
7087 | | |
7088 | 5.73k | vti = proto_tree_add_uint(v_tree, hf_dhcp_pc_ietf_ccc_suboption, tvb, optoff, 1, subopt); |
7089 | 5.73k | proto_item_set_len(vti, subopt_len + 2); |
7090 | 5.73k | proto_item_append_text(vti, ": "); |
7091 | | |
7092 | 5.73k | switch (subopt) { |
7093 | | |
7094 | 536 | case PKT_CCC_PRI_DHCP: /* IPv4 values */ |
7095 | 912 | case PKT_CCC_SEC_DHCP: |
7096 | 912 | if (suboptoff+4 > optend) { |
7097 | 7 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7098 | 7 | return (optend); |
7099 | 7 | } |
7100 | 905 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
7101 | 905 | tvb_ip_to_str(pinfo->pool, tvb, suboptoff), |
7102 | 905 | subopt_len, |
7103 | 905 | plurality(subopt_len, "", "s"), |
7104 | 905 | subopt_len != 4 ? " [Invalid]" : ""); |
7105 | 905 | suboptoff += subopt_len; |
7106 | 905 | break; |
7107 | | |
7108 | 727 | case PKT_CCC_IETF_PROV_SRV: |
7109 | 727 | if (suboptoff+1 > optend) { |
7110 | 1 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7111 | 1 | return (optend); |
7112 | 1 | } |
7113 | 726 | prov_type = tvb_get_uint8(tvb, suboptoff); |
7114 | 726 | suboptoff += 1; |
7115 | 726 | switch (prov_type) { |
7116 | | |
7117 | 166 | case 0: |
7118 | 166 | get_dns_name(pinfo->pool, tvb, suboptoff, subopt_len, suboptoff, (const char **)&dns_name, &dns_name_len); |
7119 | 166 | proto_item_append_text(vti, "%s (%u byte%s)", format_text(pinfo->pool, dns_name, dns_name_len), |
7120 | 166 | subopt_len - 1, plurality(subopt_len, "", "s") ); |
7121 | 166 | break; |
7122 | | |
7123 | 136 | case 1: |
7124 | 136 | if (suboptoff+4 > optend) { |
7125 | 3 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7126 | 3 | return (optend); |
7127 | 3 | } |
7128 | 133 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
7129 | 133 | tvb_ip_to_str(pinfo->pool, tvb, suboptoff), |
7130 | 133 | subopt_len, |
7131 | 133 | plurality(subopt_len, "", "s"), |
7132 | 133 | subopt_len != 5 ? " [Invalid]" : ""); |
7133 | 133 | break; |
7134 | | |
7135 | 424 | default: |
7136 | 424 | proto_item_append_text(vti, "Invalid type: %u (%u byte%s)", |
7137 | 424 | prov_type, |
7138 | 424 | subopt_len, |
7139 | 424 | plurality(subopt_len, "", "s") ); |
7140 | 424 | break; |
7141 | 726 | } |
7142 | 713 | suboptoff += subopt_len - 1; |
7143 | 713 | break; |
7144 | | |
7145 | 199 | case PKT_CCC_IETF_AS_KRB: |
7146 | 199 | if (suboptoff+12 > optend) { |
7147 | 5 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7148 | 5 | return (optend); |
7149 | 5 | } |
7150 | 194 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7151 | 194 | plurality(subopt_len, "", "s"), |
7152 | 194 | subopt_len != 12 ? " [Invalid]" : ""); |
7153 | 194 | if (subopt_len == 12) { |
7154 | 35 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7155 | 35 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
7156 | 35 | 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); |
7157 | 35 | 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); |
7158 | 35 | } |
7159 | 194 | suboptoff += subopt_len; |
7160 | 194 | break; |
7161 | | |
7162 | 450 | case PKT_CCC_IETF_AP_KRB: |
7163 | 450 | proto_item_append_text(vti, "(%u byte%s%s)", subopt_len, |
7164 | 450 | plurality(subopt_len, "", "s"), |
7165 | 450 | subopt_len != 12 ? " [Invalid]" : ""); |
7166 | 450 | if (subopt_len == 12) { |
7167 | 43 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7168 | 43 | proto_tree_add_item(pkt_s_tree, hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN); |
7169 | 43 | 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); |
7170 | 43 | 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); |
7171 | 43 | } |
7172 | 450 | suboptoff += subopt_len; |
7173 | 450 | break; |
7174 | | |
7175 | 286 | case PKT_CCC_KRB_REALM: /* String values */ |
7176 | 286 | get_dns_name(pinfo->pool, tvb, suboptoff, subopt_len, suboptoff, &dns_name, &dns_name_len); |
7177 | 286 | proto_item_append_text(vti, "%s (%u byte%s)", format_text(pinfo->pool, dns_name, dns_name_len), |
7178 | 286 | subopt_len, plurality(subopt_len, "", "s") ); |
7179 | 286 | suboptoff += subopt_len; |
7180 | 286 | break; |
7181 | | |
7182 | 315 | case PKT_CCC_TGT_FLAG: |
7183 | 315 | if (suboptoff+1 > optend) { |
7184 | 5 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7185 | 5 | return (optend); |
7186 | 5 | } |
7187 | 310 | fetch_tgt = tvb_get_uint8(tvb, suboptoff); |
7188 | 310 | proto_item_append_text(vti, "%s (%u byte%s%s)", |
7189 | 310 | fetch_tgt ? "Yes" : "No", |
7190 | 310 | subopt_len, |
7191 | 310 | plurality(subopt_len, "", "s"), |
7192 | 310 | subopt_len != 1 ? " [Invalid]" : ""); |
7193 | 310 | suboptoff += 1; |
7194 | 310 | break; |
7195 | | |
7196 | 293 | case PKT_CCC_PROV_TIMER: |
7197 | 293 | if (suboptoff+1 > optend) { |
7198 | 4 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7199 | 4 | return (optend); |
7200 | 4 | } |
7201 | 289 | if (revision == PACKETCABLE_CCC_DRAFT5) |
7202 | 0 | max_timer_val = 30; |
7203 | 289 | timer_val = tvb_get_uint8(tvb, suboptoff); |
7204 | 289 | proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val, |
7205 | 289 | timer_val > max_timer_val ? " [Invalid]" : "", |
7206 | 289 | subopt_len, |
7207 | 289 | plurality(subopt_len, "", "s"), |
7208 | 289 | subopt_len != 1 ? " [Invalid]" : ""); |
7209 | 289 | suboptoff += 1; |
7210 | 289 | break; |
7211 | | |
7212 | 230 | case PKT_CCC_IETF_SEC_TKT: |
7213 | 230 | if (suboptoff+2 > optend) { |
7214 | 1 | expert_add_info(pinfo, vti, &ei_dhcp_missing_subopt_value); |
7215 | 1 | return (optend); |
7216 | 1 | } |
7217 | 229 | sec_tcm = tvb_get_ntohs(tvb, suboptoff); |
7218 | 229 | proto_item_append_text(vti, "0x%04x (%u byte%s%s)", sec_tcm, subopt_len, |
7219 | 229 | plurality(subopt_len, "", "s"), |
7220 | 229 | subopt_len != 2 ? " [Invalid]" : ""); |
7221 | 229 | if (subopt_len == 2) { |
7222 | 82 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcp_option); |
7223 | 82 | proto_tree_add_boolean(pkt_s_tree, hf_dhcp_ccc_ietf_sec_tkt_pc_provision_server, tvb, suboptoff, 2, sec_tcm); |
7224 | 82 | proto_tree_add_boolean(pkt_s_tree, hf_dhcp_ccc_ietf_sec_tkt_all_pc_call_management, tvb, suboptoff, 2, sec_tcm); |
7225 | 82 | } |
7226 | 229 | suboptoff += subopt_len; |
7227 | 229 | break; |
7228 | | |
7229 | 2.31k | default: |
7230 | 2.31k | suboptoff += subopt_len; |
7231 | 2.31k | break; |
7232 | 5.73k | } |
7233 | 5.68k | return suboptoff; |
7234 | 5.73k | } |
7235 | | |
7236 | | static int |
7237 | | dissect_dhcpopt_packetcable_ccc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
7238 | 177 | { |
7239 | 177 | int offset = 0; |
7240 | | |
7241 | 5.90k | while (tvb_reported_length_remaining(tvb, offset) > 0) { |
7242 | 5.74k | switch (pkt_ccc_protocol_version) { |
7243 | | |
7244 | 0 | case PACKETCABLE_CCC_I05: |
7245 | 0 | offset = dissect_packetcable_i05_ccc(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb)); |
7246 | 0 | break; |
7247 | 0 | case PACKETCABLE_CCC_DRAFT5: |
7248 | 5.74k | case PACKETCABLE_CCC_RFC_3495: |
7249 | 5.74k | offset = dissect_packetcable_ietf_ccc(pinfo, tree, tree, tvb, offset, tvb_reported_length(tvb), pkt_ccc_protocol_version); |
7250 | 5.74k | break; |
7251 | 0 | default: /* XXX Should we do something here? */ |
7252 | 0 | break; |
7253 | 5.74k | } |
7254 | 5.74k | } |
7255 | | |
7256 | 159 | return tvb_captured_length(tvb); |
7257 | 177 | } |
7258 | | |
7259 | 470 | #define BOOTREQUEST 1 |
7260 | 11 | #define BOOTREPLY 2 |
7261 | | |
7262 | | static const value_string op_vals[] = { |
7263 | | { BOOTREQUEST, "Boot Request" }, |
7264 | | { BOOTREPLY, "Boot Reply" }, |
7265 | | { 0, NULL } |
7266 | | }; |
7267 | | |
7268 | | static int |
7269 | | dissect_dhcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
7270 | 4.84k | { |
7271 | 4.84k | proto_tree *bp_tree; |
7272 | 4.84k | proto_item *bp_ti, *ti; |
7273 | 4.84k | proto_item *file_ti, *sname_ti; |
7274 | 4.84k | proto_item *fi, *hidden_item; |
7275 | 4.84k | uint8_t op; |
7276 | 4.84k | uint8_t htype, hlen; |
7277 | 4.84k | int voff, eoff; /* vendor offset, end offset */ |
7278 | 4.84k | int tmpvoff, tmpvoff_end; |
7279 | 4.84k | uint32_t ip_addr; |
7280 | 4.84k | bool at_end; |
7281 | 4.84k | bool isProxyDhcp; |
7282 | 4.84k | const char *dhcp_type = NULL; |
7283 | 4.84k | const uint8_t *vendor_class_id = NULL; |
7284 | 4.84k | uint16_t flags, secs; |
7285 | 4.84k | int offset_delta; |
7286 | 4.84k | uint8_t overload = 0; /* DHCP option overload */ |
7287 | 4.84k | static int * const dhcp_flags[] = { |
7288 | 4.84k | &hf_dhcp_flags_broadcast, |
7289 | 4.84k | &hf_dhcp_flags_reserved, |
7290 | 4.84k | NULL |
7291 | 4.84k | }; |
7292 | | |
7293 | 4.84k | if (pinfo->srcport == PROXYDHCP_UDP_PORT || |
7294 | 4.84k | pinfo->destport == PROXYDHCP_UDP_PORT) { |
7295 | | /* The "DHCP magic" is mandatory for proxyDHCP. Use it as a heuristic. */ |
7296 | 0 | if (!tvb_bytes_exist(tvb, VENDOR_INFO_OFFSET, 4) || |
7297 | 0 | tvb_get_ntohl(tvb, VENDOR_INFO_OFFSET) != 0x63825363) { |
7298 | | /* Not a DHCP packet at all. */ |
7299 | 0 | return 0; |
7300 | 0 | } |
7301 | 0 | isProxyDhcp = true; |
7302 | 4.84k | } else { |
7303 | 4.84k | isProxyDhcp = false; |
7304 | 4.84k | } |
7305 | | |
7306 | 4.84k | col_set_str(pinfo->cinfo, COL_PROTOCOL, "BOOTP"); |
7307 | | /* |
7308 | | * In case we throw an exception fetching the opcode, etc. |
7309 | | */ |
7310 | 4.84k | col_clear(pinfo->cinfo, COL_INFO); |
7311 | | |
7312 | 4.84k | op = tvb_get_uint8(tvb, 0); |
7313 | 4.84k | htype = tvb_get_uint8(tvb, 1); |
7314 | 4.84k | hlen = tvb_get_uint8(tvb, 2); |
7315 | 4.84k | switch (op) { |
7316 | | |
7317 | 470 | case BOOTREQUEST: |
7318 | 470 | if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802) |
7319 | 193 | && hlen == 6) { |
7320 | 149 | col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s (%s)", |
7321 | 149 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, 28, hlen, htype), |
7322 | 149 | tvb_get_ether_name(tvb, 28)); |
7323 | 149 | } |
7324 | 321 | else { |
7325 | 321 | col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s", |
7326 | 321 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, 28, hlen, htype)); |
7327 | 321 | } |
7328 | 470 | break; |
7329 | | |
7330 | 11 | case BOOTREPLY: |
7331 | 11 | col_set_str(pinfo->cinfo, COL_INFO, "Boot Reply"); |
7332 | 11 | break; |
7333 | | |
7334 | 4.35k | default: |
7335 | 4.35k | col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)", op); |
7336 | 4.35k | break; |
7337 | 4.84k | } |
7338 | | |
7339 | 4.78k | voff = VENDOR_INFO_OFFSET; |
7340 | | |
7341 | | /* rfc2132 says it SHOULD exist, not that it MUST exist */ |
7342 | 4.78k | if (tvb_bytes_exist(tvb, voff, 4) && |
7343 | 4.49k | (tvb_get_ntohl(tvb, voff) == 0x63825363)) { |
7344 | 3.64k | voff += 4; |
7345 | 3.64k | } else { |
7346 | 1.14k | voff += 64; |
7347 | 1.14k | } |
7348 | 4.78k | eoff = tvb_reported_length(tvb); |
7349 | | |
7350 | 4.78k | bp_ti = proto_tree_add_item(tree, proto_dhcp, tvb, 0, -1, ENC_NA); |
7351 | 4.78k | bp_tree = proto_item_add_subtree(bp_ti, ett_dhcp); |
7352 | | |
7353 | 4.78k | wmem_map_t *rfc3396_map = wmem_map_new(pinfo->pool, g_direct_hash, g_direct_equal); |
7354 | | /* |
7355 | | * In the first pass, we just look for the overload, DHCP message type |
7356 | | * and Vendor class identifier options, and any repeated options for |
7357 | | * RFC 3396 long option concatenation. |
7358 | | */ |
7359 | 4.78k | tmpvoff = voff; |
7360 | 4.78k | at_end = false; |
7361 | 15.5k | while (tmpvoff < eoff && !at_end) { |
7362 | 10.7k | offset_delta = dhcp_option(tvb, pinfo, NULL, tmpvoff, eoff, true, &at_end, |
7363 | 10.7k | &dhcp_type, &vendor_class_id, &overload, rfc3396_map); |
7364 | 10.7k | if (offset_delta <= 0) { |
7365 | 0 | proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_option_parse_err, |
7366 | 0 | tvb, tmpvoff, eoff); |
7367 | 0 | return tmpvoff; |
7368 | 0 | } |
7369 | 10.7k | tmpvoff += offset_delta; |
7370 | 10.7k | } |
7371 | | |
7372 | | /* |
7373 | | * If there was a DHCP message type option, flag this packet |
7374 | | * as DHCP. |
7375 | | */ |
7376 | 4.78k | if (dhcp_type != NULL) { |
7377 | | /* |
7378 | | * Yes, this is a DHCP packet, and "dhcp_type" is the |
7379 | | * packet type. |
7380 | | */ |
7381 | 15 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCP"); |
7382 | | |
7383 | 15 | col_add_fstr(pinfo->cinfo, COL_INFO, "%sDHCP %-8s - Transaction ID 0x%x", |
7384 | 15 | isProxyDhcp ? "proxy" : "", dhcp_type, tvb_get_ntohl(tvb, 4)); |
7385 | 15 | tap_queue_packet( dhcp_bootp_tap, pinfo, dhcp_type); |
7386 | 15 | } |
7387 | | |
7388 | | /* |
7389 | | * OK, now populate the protocol tree. |
7390 | | */ |
7391 | | |
7392 | 4.78k | proto_tree_add_uint(bp_tree, hf_dhcp_type, tvb, |
7393 | 4.78k | 0, 1, |
7394 | 4.78k | op); |
7395 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_hw_type, tvb, |
7396 | 4.78k | 1, 1, ENC_BIG_ENDIAN); |
7397 | 4.78k | proto_tree_add_uint(bp_tree, hf_dhcp_hw_len, tvb, |
7398 | 4.78k | 2, 1, hlen); |
7399 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_hops, tvb, |
7400 | 4.78k | 3, 1, ENC_BIG_ENDIAN); |
7401 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_id, tvb, |
7402 | 4.78k | 4, 4, ENC_BIG_ENDIAN); |
7403 | | /* |
7404 | | * Windows (98, XP and Vista tested) sends the "secs" value on |
7405 | | * the wire formatted as little-endian. See if the LE value |
7406 | | * makes sense, if autodetect is used. |
7407 | | */ |
7408 | 4.78k | if (dhcp_secs_endian == DHCP_SECS_ENDIAN_AUTODETECT) { |
7409 | 4.77k | secs = tvb_get_letohs(tvb, 8); |
7410 | 4.77k | if (secs > 0 && secs <= 0xff) { |
7411 | 499 | ti = proto_tree_add_uint(bp_tree, hf_dhcp_secs, tvb, 8, 2, secs); |
7412 | 499 | expert_add_info(pinfo, ti, &ei_dhcp_secs_le); |
7413 | 4.27k | } else { |
7414 | 4.27k | proto_tree_add_item(bp_tree, hf_dhcp_secs, tvb, |
7415 | 4.27k | 8, 2, ENC_BIG_ENDIAN); |
7416 | 4.27k | } |
7417 | 4.77k | } |
7418 | 15 | else { |
7419 | | /* Use whatever endianness is configured */ |
7420 | 15 | proto_tree_add_item(bp_tree, hf_dhcp_secs, tvb, 8, 2, dhcp_secs_endian); |
7421 | 15 | } |
7422 | 4.78k | flags = tvb_get_ntohs(tvb, 10); |
7423 | 4.78k | fi = proto_tree_add_bitmask(bp_tree, tvb, 10, hf_dhcp_flags, |
7424 | 4.78k | ett_dhcp_flags, dhcp_flags, ENC_BIG_ENDIAN); |
7425 | 4.78k | proto_item_append_text(fi, " (%s)", |
7426 | 4.78k | (flags & BOOTP_BC) ? "Broadcast" : "Unicast"); |
7427 | | |
7428 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_ip_client, tvb, |
7429 | 4.78k | 12, 4, ENC_BIG_ENDIAN); |
7430 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_ip_your, tvb, |
7431 | 4.78k | 16, 4, ENC_BIG_ENDIAN); |
7432 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_ip_server, tvb, |
7433 | 4.78k | 20, 4, ENC_BIG_ENDIAN); |
7434 | 4.78k | proto_tree_add_item(bp_tree, hf_dhcp_ip_relay, tvb, |
7435 | 4.78k | 24, 4, ENC_BIG_ENDIAN); |
7436 | | |
7437 | 4.78k | if (hlen > 0 && hlen <= 16) { |
7438 | 578 | if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802) |
7439 | 218 | && hlen == 6) |
7440 | 144 | proto_tree_add_item(bp_tree, hf_dhcp_hw_ether_addr, tvb, 28, 6, ENC_NA); |
7441 | 434 | else |
7442 | | /* The chaddr element is 16 bytes in length, |
7443 | | although only the first hlen bytes are used */ |
7444 | 434 | proto_tree_add_bytes_format_value(bp_tree, hf_dhcp_hw_addr, tvb, 28, 16, |
7445 | 434 | NULL, "%s", tvb_arphrdaddr_to_str(pinfo->pool, tvb, 28, hlen, htype)); |
7446 | 578 | if ((16 - hlen) > 0) |
7447 | 459 | proto_tree_add_item(bp_tree, hf_dhcp_hw_addr_padding, tvb, 28+hlen, 16-hlen, ENC_NA); |
7448 | 4.21k | } else { |
7449 | 4.21k | proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_client_address_not_given, tvb, 28, 16); |
7450 | 4.21k | } |
7451 | | |
7452 | | /* RFC 3396 5: "The aggregate option buffer is made up of the optional |
7453 | | * parameters field, the file field, and the sname field, in that order. |
7454 | | * WARNING: This is not the physical ordering of these fields in the |
7455 | | * DHCP packet." |
7456 | | * |
7457 | | * RFC 3396 6: "[I]f an option were split into three parts and each |
7458 | | * part went into one of the possible option fields, the first part |
7459 | | * would go into the optional parameters field, the second part would |
7460 | | * go into the file field, and the third part would go into the sname |
7461 | | * field." |
7462 | | * |
7463 | | * So we process and reassemble the options in the order listed above, |
7464 | | * and move the items after processing so that they are generally in |
7465 | | * physical ordering in the tree. (Whichever ordering choice we make |
7466 | | * is bound to confused someone.) |
7467 | | */ |
7468 | | |
7469 | 4.78k | if (overload & OPT_OVERLOAD_FILE) { |
7470 | 3.95k | file_ti = proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_boot_filename_overloaded_by_dhcp, tvb, |
7471 | 3.95k | FILE_NAME_OFFSET, FILE_NAME_LEN); |
7472 | 3.95k | tmpvoff = FILE_NAME_OFFSET; |
7473 | 3.95k | tmpvoff_end = FILE_NAME_OFFSET + FILE_NAME_LEN; |
7474 | 3.95k | at_end = false; |
7475 | 27.7k | while (tmpvoff < tmpvoff_end && !at_end) { |
7476 | 23.7k | tmpvoff += dhcp_option(tvb, pinfo, NULL, tmpvoff, |
7477 | 23.7k | tmpvoff_end, true, &at_end, |
7478 | 23.7k | &dhcp_type, &vendor_class_id, |
7479 | 23.7k | NULL, rfc3396_map); |
7480 | 23.7k | } |
7481 | 3.95k | } else { |
7482 | | /* Boot file is optional */ |
7483 | 839 | if (tvb_get_uint8(tvb, FILE_NAME_OFFSET) != '\0') { |
7484 | 398 | file_ti = proto_tree_add_item(bp_tree, hf_dhcp_file, tvb, |
7485 | 398 | FILE_NAME_OFFSET, |
7486 | 398 | FILE_NAME_LEN, ENC_ASCII); |
7487 | 441 | } else { |
7488 | 441 | file_ti = proto_tree_add_string_format(bp_tree, hf_dhcp_file, tvb, |
7489 | 441 | FILE_NAME_OFFSET, |
7490 | 441 | FILE_NAME_LEN, |
7491 | 441 | "", "Boot file name not given"); |
7492 | 441 | } |
7493 | 839 | } |
7494 | | |
7495 | | |
7496 | 4.78k | if (overload & OPT_OVERLOAD_SNAME) { |
7497 | 4.29k | sname_ti = proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_server_name_overloaded_by_dhcp, tvb, |
7498 | 4.29k | SERVER_NAME_OFFSET, SERVER_NAME_LEN); |
7499 | 4.29k | tmpvoff = SERVER_NAME_OFFSET; |
7500 | 4.29k | tmpvoff_end = SERVER_NAME_OFFSET + SERVER_NAME_LEN; |
7501 | 4.29k | at_end = false; |
7502 | 17.3k | while (tmpvoff < tmpvoff_end && !at_end) { |
7503 | 13.0k | tmpvoff += dhcp_option(tvb, pinfo, NULL, tmpvoff, |
7504 | 13.0k | tmpvoff_end, true, &at_end, |
7505 | 13.0k | &dhcp_type, &vendor_class_id, |
7506 | 13.0k | NULL, rfc3396_map); |
7507 | 13.0k | } |
7508 | 4.29k | } else { |
7509 | | /* The server host name is optional */ |
7510 | 490 | if (tvb_get_uint8(tvb, SERVER_NAME_OFFSET) != '\0') { |
7511 | 148 | sname_ti = proto_tree_add_item(bp_tree, hf_dhcp_server, tvb, |
7512 | 148 | SERVER_NAME_OFFSET, |
7513 | 148 | SERVER_NAME_LEN, ENC_ASCII); |
7514 | | |
7515 | 342 | } else { |
7516 | 342 | sname_ti = proto_tree_add_string_format(bp_tree, hf_dhcp_server, tvb, |
7517 | 342 | SERVER_NAME_OFFSET, |
7518 | 342 | SERVER_NAME_LEN, |
7519 | 342 | "", "Server host name not given"); |
7520 | 342 | } |
7521 | 490 | } |
7522 | | |
7523 | 4.78k | proto_tree_move_item(bp_tree, sname_ti, file_ti); |
7524 | | |
7525 | 4.78k | voff = VENDOR_INFO_OFFSET; |
7526 | 4.78k | if (dhcp_type == NULL) { |
7527 | 4.43k | hidden_item = proto_tree_add_boolean(bp_tree, hf_dhcp_bootp, tvb, 0, 0, 1); |
7528 | 4.43k | proto_item_set_hidden(hidden_item); |
7529 | 4.43k | } |
7530 | 4.78k | if (tvb_bytes_exist(tvb, voff, 4) && |
7531 | 4.48k | (tvb_get_ntohl(tvb, voff) == 0x63825363)) { |
7532 | 3.63k | ip_addr = tvb_get_ipv4(tvb, voff); |
7533 | 3.63k | proto_tree_add_ipv4_format_value(bp_tree, hf_dhcp_cookie, tvb, |
7534 | 3.63k | voff, 4, ip_addr, "DHCP"); |
7535 | 3.63k | voff += 4; |
7536 | 3.63k | } else { |
7537 | 1.15k | proto_tree_add_item(bp_tree, hf_dhcp_vendor_specific_options, tvb, |
7538 | 1.15k | voff, 64, ENC_NA); |
7539 | 1.15k | voff += 64; |
7540 | 1.15k | } |
7541 | | |
7542 | 4.78k | at_end = false; |
7543 | 14.8k | while (voff < eoff && !at_end) { |
7544 | 10.0k | offset_delta = dhcp_option(tvb, pinfo, bp_tree, voff, eoff, false, &at_end, |
7545 | 10.0k | &dhcp_type, &vendor_class_id, &overload, rfc3396_map); |
7546 | 10.0k | if (offset_delta <= 0) { |
7547 | 0 | proto_tree_add_expert(bp_tree, pinfo, &ei_dhcp_option_parse_err, |
7548 | 0 | tvb, voff, eoff); |
7549 | 0 | return voff; |
7550 | 0 | } |
7551 | 10.0k | voff += offset_delta; |
7552 | 10.0k | } |
7553 | 4.78k | if ((dhcp_type != NULL) && (!at_end)) |
7554 | 46 | { |
7555 | 46 | expert_add_info(pinfo, bp_ti, &ei_dhcp_end_option_missing); |
7556 | 46 | } |
7557 | | |
7558 | 4.78k | if (overload & OPT_OVERLOAD_FILE) { |
7559 | 3.93k | proto_item *oti; |
7560 | 3.93k | proto_tree *overload_tree = proto_tree_add_subtree(bp_tree, tvb, |
7561 | 3.93k | FILE_NAME_OFFSET, FILE_NAME_LEN, ett_dhcp_filename_option, &oti, |
7562 | 3.93k | "Boot file name option overload"); |
7563 | 3.93k | tmpvoff = FILE_NAME_OFFSET; |
7564 | 3.93k | tmpvoff_end = FILE_NAME_OFFSET + FILE_NAME_LEN; |
7565 | 3.93k | at_end = false; |
7566 | 26.5k | while (tmpvoff < tmpvoff_end && !at_end) { |
7567 | 22.6k | tmpvoff += dhcp_option(tvb, pinfo, overload_tree, tmpvoff, |
7568 | 22.6k | tmpvoff_end, false, &at_end, |
7569 | 22.6k | &dhcp_type, &vendor_class_id, |
7570 | 22.6k | NULL, rfc3396_map); |
7571 | 22.6k | } |
7572 | 3.93k | if (!at_end) |
7573 | 3.14k | { |
7574 | 3.14k | expert_add_info(pinfo, oti, &ei_dhcp_opt_overload_file_end_missing); |
7575 | 3.14k | } |
7576 | 3.93k | proto_tree_move_item(bp_tree, file_ti, oti); |
7577 | 3.93k | } |
7578 | 4.78k | if (overload & OPT_OVERLOAD_SNAME) { |
7579 | 3.83k | proto_item *oti; |
7580 | 3.83k | proto_tree *overload_tree = proto_tree_add_subtree(bp_tree, tvb, |
7581 | 3.83k | SERVER_NAME_OFFSET, SERVER_NAME_LEN, ett_dhcp_server_hostname, &oti, |
7582 | 3.83k | "Server host name option overload"); |
7583 | 3.83k | tmpvoff = SERVER_NAME_OFFSET; |
7584 | 3.83k | tmpvoff_end = SERVER_NAME_OFFSET + SERVER_NAME_LEN; |
7585 | 3.83k | at_end = false; |
7586 | 14.8k | while (tmpvoff < tmpvoff_end && !at_end) { |
7587 | 11.0k | tmpvoff += dhcp_option(tvb, pinfo, overload_tree, tmpvoff, |
7588 | 11.0k | tmpvoff_end, false, &at_end, |
7589 | 11.0k | &dhcp_type, &vendor_class_id, |
7590 | 11.0k | NULL, rfc3396_map); |
7591 | 11.0k | } |
7592 | 3.83k | if (!at_end) |
7593 | 2.35k | { |
7594 | 2.35k | expert_add_info(pinfo, oti, &ei_dhcp_opt_overload_sname_end_missing); |
7595 | 2.35k | } |
7596 | 3.83k | proto_tree_move_item(bp_tree, sname_ti, oti); |
7597 | 3.83k | } |
7598 | | |
7599 | 4.78k | if (voff < eoff) { |
7600 | | /* |
7601 | | * Padding after the end option. |
7602 | | */ |
7603 | 15 | proto_tree_add_item(bp_tree, hf_dhcp_option_padding, tvb, voff, eoff - voff, ENC_NA); |
7604 | 15 | } |
7605 | | |
7606 | 4.78k | return tvb_captured_length(tvb); |
7607 | 4.78k | } |
7608 | | |
7609 | | static void |
7610 | | dhcp_init_protocol(void) |
7611 | 14 | { |
7612 | 14 | unsigned i; |
7613 | | |
7614 | | /* first copy default_dhcp_opt[] to dhcp_opt[]. This resets all values to default */ |
7615 | 14 | memcpy(dhcp_opt, default_dhcp_opt, sizeof(dhcp_opt)); |
7616 | | |
7617 | 14 | if ((num_dhcp_records_uat > 0) && (saved_uat_opts == NULL)) |
7618 | 0 | { |
7619 | 0 | saved_uat_opts = wmem_list_new(NULL); |
7620 | 0 | } |
7621 | | |
7622 | | /* Now apply the custom options */ |
7623 | 14 | for (i = 0; i < num_dhcp_records_uat; i++) |
7624 | 0 | { |
7625 | 0 | dhcp_opt[uat_dhcp_records[i].opt].text = wmem_strdup(wmem_file_scope(), uat_dhcp_records[i].text); |
7626 | 0 | dhcp_opt[uat_dhcp_records[i].opt].ftype = uat_dhcp_records[i].ftype; |
7627 | 0 | dhcp_opt[uat_dhcp_records[i].opt].phf = NULL; |
7628 | | |
7629 | | /* Apply the custom option to the dissection table*/ |
7630 | 0 | dissector_change_uint("dhcp.option", uat_dhcp_records[i].opt, dhcpopt_basic_handle); |
7631 | | |
7632 | | /* Save the option so it can be cleared later */ |
7633 | 0 | wmem_list_append(saved_uat_opts, GUINT_TO_POINTER(uat_dhcp_records[i].opt)); |
7634 | 0 | } |
7635 | 14 | } |
7636 | | |
7637 | | static void |
7638 | | dhcp_clear_uat_dhcpopt(void *data, void *user_data _U_) |
7639 | 0 | { |
7640 | 0 | dissector_reset_uint("dhcp.option", GPOINTER_TO_UINT(data)); |
7641 | 0 | } |
7642 | | |
7643 | | static void |
7644 | | dhcp_cleanup_protocol(void) |
7645 | 0 | { |
7646 | 0 | if (saved_uat_opts != NULL) { |
7647 | 0 | wmem_list_foreach(saved_uat_opts, dhcp_clear_uat_dhcpopt, |
7648 | 0 | NULL); |
7649 | |
|
7650 | 0 | wmem_destroy_list(saved_uat_opts); |
7651 | 0 | saved_uat_opts = NULL; |
7652 | 0 | } |
7653 | 0 | } |
7654 | | |
7655 | | |
7656 | | /* TAP STAT INFO */ |
7657 | | typedef enum |
7658 | | { |
7659 | | MESSAGE_TYPE_COLUMN = 0, |
7660 | | PACKET_COLUMN |
7661 | | } dhcp_stat_columns; |
7662 | | |
7663 | | 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"}}; |
7664 | | |
7665 | | static void dhcp_stat_init(stat_tap_table_ui* new_stat) |
7666 | 0 | { |
7667 | 0 | const char *table_name = "DHCP Statistics"; |
7668 | 0 | int num_fields = array_length(dhcp_stat_fields); |
7669 | 0 | stat_tap_table *table; |
7670 | 0 | int i = 0; |
7671 | 0 | stat_tap_table_item_type items[array_length(dhcp_stat_fields)]; |
7672 | |
|
7673 | 0 | table = stat_tap_find_table(new_stat, table_name); |
7674 | 0 | if (table) { |
7675 | 0 | if (new_stat->stat_tap_reset_table_cb) { |
7676 | 0 | new_stat->stat_tap_reset_table_cb(table); |
7677 | 0 | } |
7678 | 0 | return; |
7679 | 0 | } |
7680 | | |
7681 | 0 | table = stat_tap_init_table(table_name, num_fields, 0, NULL); |
7682 | 0 | stat_tap_add_table(new_stat, table); |
7683 | |
|
7684 | 0 | memset(items, 0x0, sizeof(items)); |
7685 | | /* Add a row for each value type */ |
7686 | 0 | while (opt53_text[i].strptr) |
7687 | 0 | { |
7688 | 0 | items[MESSAGE_TYPE_COLUMN].type = TABLE_ITEM_STRING; |
7689 | 0 | items[MESSAGE_TYPE_COLUMN].value.string_value = opt53_text[i].strptr; |
7690 | 0 | items[PACKET_COLUMN].type = TABLE_ITEM_UINT; |
7691 | 0 | items[PACKET_COLUMN].value.uint_value = 0; |
7692 | |
|
7693 | 0 | stat_tap_init_table_row(table, i, num_fields, items); |
7694 | 0 | i++; |
7695 | 0 | } |
7696 | 0 | } |
7697 | | |
7698 | | static tap_packet_status |
7699 | | dhcp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data, tap_flags_t flags _U_) |
7700 | 0 | { |
7701 | 0 | stat_data_t* stat_data = (stat_data_t*)tapdata; |
7702 | 0 | const char* value = (const char*)data; |
7703 | 0 | stat_tap_table* table; |
7704 | 0 | stat_tap_table_item_type* msg_data; |
7705 | 0 | int idx; |
7706 | |
|
7707 | 0 | idx = str_to_val_idx(value, opt53_text); |
7708 | 0 | if (idx < 0) |
7709 | 0 | return TAP_PACKET_DONT_REDRAW; |
7710 | | |
7711 | 0 | table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0); |
7712 | 0 | msg_data = stat_tap_get_field_data(table, idx, PACKET_COLUMN); |
7713 | 0 | msg_data->value.uint_value++; |
7714 | 0 | stat_tap_set_field_data(table, idx, PACKET_COLUMN, msg_data); |
7715 | |
|
7716 | 0 | return TAP_PACKET_REDRAW; |
7717 | 0 | } |
7718 | | |
7719 | | static void |
7720 | | dhcp_stat_reset(stat_tap_table* table) |
7721 | 0 | { |
7722 | 0 | unsigned element; |
7723 | 0 | stat_tap_table_item_type* item_data; |
7724 | |
|
7725 | 0 | for (element = 0; element < table->num_elements; element++) |
7726 | 0 | { |
7727 | 0 | item_data = stat_tap_get_field_data(table, element, PACKET_COLUMN); |
7728 | 0 | item_data->value.uint_value = 0; |
7729 | 0 | stat_tap_set_field_data(table, element, PACKET_COLUMN, item_data); |
7730 | 0 | } |
7731 | 0 | } |
7732 | | |
7733 | | void |
7734 | | proto_register_dhcp(void) |
7735 | 14 | { |
7736 | 14 | static const value_string dhcp_custom_type_vals[] = { |
7737 | 14 | { ipv4, "IP Address"}, |
7738 | 14 | { ipv4_list, "IP Address List" }, |
7739 | 14 | { string, "string" }, |
7740 | 14 | { bytes, "bytes" }, |
7741 | 14 | { val_boolean, "boolean" }, |
7742 | 14 | { val_u_byte, "byte" }, |
7743 | 14 | { val_u_short, "unsigned short" }, |
7744 | 14 | { val_u_short_list, "unsigned short list" }, |
7745 | 14 | { val_u_long, "unsigned long" }, |
7746 | 14 | { time_in_s_secs, "integer time in seconds" }, |
7747 | 14 | { time_in_u_secs, "unsigned integer time in seconds" }, |
7748 | 14 | { 0x00, NULL } |
7749 | 14 | }; |
7750 | | |
7751 | 14 | static hf_register_info hf[] = { |
7752 | 14 | { &hf_dhcp_bootp, |
7753 | 14 | { "Frame is BOOTP", "dhcp.bootp", |
7754 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
7755 | 14 | NULL, HFILL }}, |
7756 | | |
7757 | 14 | { &hf_dhcp_type, |
7758 | 14 | { "Message type", "dhcp.type", |
7759 | 14 | FT_UINT8, BASE_DEC, VALS(op_vals), 0x0, |
7760 | 14 | NULL, HFILL }}, |
7761 | | |
7762 | 14 | { &hf_dhcp_hw_type, |
7763 | 14 | { "Hardware type", "dhcp.hw.type", |
7764 | 14 | FT_UINT8, BASE_HEX, VALS(arp_hrd_vals), 0x0, |
7765 | 14 | NULL, HFILL }}, |
7766 | | |
7767 | 14 | { &hf_dhcp_hw_len, |
7768 | 14 | { "Hardware address length", "dhcp.hw.len", |
7769 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7770 | 14 | NULL, HFILL }}, |
7771 | | |
7772 | 14 | { &hf_dhcp_hops, |
7773 | 14 | { "Hops", "dhcp.hops", |
7774 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7775 | 14 | NULL, HFILL }}, |
7776 | | |
7777 | 14 | { &hf_dhcp_id, |
7778 | 14 | { "Transaction ID", "dhcp.id", |
7779 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
7780 | 14 | NULL, HFILL }}, |
7781 | | |
7782 | 14 | { &hf_dhcp_secs, |
7783 | 14 | { "Seconds elapsed", "dhcp.secs", |
7784 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7785 | 14 | NULL, HFILL }}, |
7786 | | |
7787 | 14 | { &hf_dhcp_flags, |
7788 | 14 | { "Bootp flags", "dhcp.flags", |
7789 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
7790 | 14 | NULL, HFILL }}, |
7791 | | |
7792 | 14 | { &hf_dhcp_flags_broadcast, |
7793 | 14 | { "Broadcast flag", "dhcp.flags.bc", |
7794 | 14 | FT_BOOLEAN, 16, TFS(&flag_set_broadcast), BOOTP_BC, |
7795 | 14 | NULL, HFILL }}, |
7796 | | |
7797 | 14 | { &hf_dhcp_flags_reserved, |
7798 | 14 | { "Reserved flags", "dhcp.flags.reserved", |
7799 | 14 | FT_UINT16, BASE_HEX, NULL, BOOTP_MBZ, |
7800 | 14 | NULL, HFILL }}, |
7801 | | |
7802 | 14 | { &hf_dhcp_ip_client, |
7803 | 14 | { "Client IP address", "dhcp.ip.client", |
7804 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7805 | 14 | NULL, HFILL }}, |
7806 | | |
7807 | 14 | { &hf_dhcp_ip_your, |
7808 | 14 | { "Your (client) IP address", "dhcp.ip.your", |
7809 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7810 | 14 | NULL, HFILL }}, |
7811 | | |
7812 | 14 | { &hf_dhcp_ip_server, |
7813 | 14 | { "Next server IP address", "dhcp.ip.server", |
7814 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7815 | 14 | NULL, HFILL }}, |
7816 | | |
7817 | 14 | { &hf_dhcp_ip_relay, |
7818 | 14 | { "Relay agent IP address", "dhcp.ip.relay", |
7819 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7820 | 14 | NULL, HFILL }}, |
7821 | | |
7822 | 14 | { &hf_dhcp_hw_addr, |
7823 | 14 | { "Client hardware address", "dhcp.hw.addr", |
7824 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7825 | 14 | NULL, HFILL }}, |
7826 | | |
7827 | 14 | { &hf_dhcp_hw_addr_padding, |
7828 | 14 | { "Client hardware address padding", "dhcp.hw.addr_padding", |
7829 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7830 | 14 | NULL, HFILL }}, |
7831 | | |
7832 | 14 | { &hf_dhcp_hw_ether_addr, |
7833 | 14 | { "Client MAC address", "dhcp.hw.mac_addr", |
7834 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
7835 | 14 | NULL, HFILL }}, |
7836 | | |
7837 | 14 | { &hf_dhcp_server, |
7838 | 14 | { "Server host name", "dhcp.server", |
7839 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7840 | 14 | NULL, HFILL }}, |
7841 | | |
7842 | 14 | { &hf_dhcp_file, |
7843 | 14 | { "Boot file name", "dhcp.file", |
7844 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7845 | 14 | NULL, HFILL }}, |
7846 | | |
7847 | 14 | { &hf_dhcp_cookie, |
7848 | 14 | { "Magic cookie", "dhcp.cookie", |
7849 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7850 | 14 | NULL, HFILL }}, |
7851 | | |
7852 | 14 | { &hf_dhcp_vendor_specific_options, |
7853 | 14 | { "Bootp vendor specific options", "dhcp.vendor_specific_options", |
7854 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7855 | 14 | NULL, HFILL }}, |
7856 | | |
7857 | 14 | { &hf_dhcp_fqdn_s, |
7858 | 14 | { "Server", "dhcp.fqdn.s", |
7859 | 14 | FT_BOOLEAN, 8, TFS(&tfs_server_client), F_FQDN_S, |
7860 | 14 | "If true, server should do DDNS update", HFILL }}, |
7861 | | |
7862 | 14 | { &hf_dhcp_fqdn_o, |
7863 | 14 | { "Server overrides", "dhcp.fqdn.o", |
7864 | 14 | FT_BOOLEAN, 8, TFS(&tfs_fqdn_o), F_FQDN_O, |
7865 | 14 | "If true, server insists on doing DDNS update", HFILL }}, |
7866 | | |
7867 | 14 | { &hf_dhcp_fqdn_e, |
7868 | 14 | { "Encoding", "dhcp.fqdn.e", |
7869 | 14 | FT_BOOLEAN, 8, TFS(&tfs_fqdn_e), F_FQDN_E, |
7870 | 14 | "If true, name is binary encoded", HFILL }}, |
7871 | | |
7872 | 14 | { &hf_dhcp_fqdn_n, |
7873 | 14 | { "Server DDNS", "dhcp.fqdn.n", |
7874 | 14 | FT_BOOLEAN, 8, TFS(&tfs_fqdn_n), F_FQDN_N, |
7875 | 14 | "If true, server should not do any DDNS updates", HFILL }}, |
7876 | | |
7877 | 14 | { &hf_dhcp_fqdn_flags, |
7878 | 14 | { "Flags", "dhcp.fqdn.flags", |
7879 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
7880 | 14 | NULL, HFILL }}, |
7881 | | |
7882 | 14 | { &hf_dhcp_fqdn_mbz, |
7883 | 14 | { "Reserved flags", "dhcp.fqdn.mbz", |
7884 | 14 | FT_UINT8, BASE_HEX, NULL, F_FQDN_MBZ, |
7885 | 14 | NULL, HFILL }}, |
7886 | | |
7887 | 14 | { &hf_dhcp_fqdn_rcode1, |
7888 | 14 | { "A-RR result", "dhcp.fqdn.rcode1", |
7889 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7890 | 14 | "Result code of A-RR update", HFILL }}, |
7891 | | |
7892 | 14 | { &hf_dhcp_fqdn_rcode2, |
7893 | 14 | { "PTR-RR result", "dhcp.fqdn.rcode2", |
7894 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7895 | 14 | "Result code of PTR-RR update", HFILL }}, |
7896 | | |
7897 | 14 | { &hf_dhcp_fqdn_name, |
7898 | 14 | { "Client name", "dhcp.fqdn.name", |
7899 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7900 | 14 | "Name to register via DDNS", HFILL }}, |
7901 | | |
7902 | 14 | { &hf_dhcp_fqdn_asciiname, |
7903 | 14 | { "Client name", "dhcp.fqdn.name", |
7904 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7905 | 14 | "Name to register via DDNS", HFILL }}, |
7906 | | |
7907 | 14 | { &hf_dhcp_pkt_mta_cap_len, |
7908 | 14 | { "MTA DC Length", "dhcp.vendor.pktc.mta_cap_len", |
7909 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7910 | 14 | "PacketCable MTA Device Capabilities Length", HFILL }}, |
7911 | | |
7912 | 14 | { &hf_dhcp_pkt_mta_cap_type, |
7913 | 14 | { "Type", "dhcp.vendor.pktc.mta_cap_type", |
7914 | 14 | FT_UINT16, BASE_DEC, VALS(pkt_mdc_type_vals), 0x0, |
7915 | 14 | NULL, HFILL }}, |
7916 | | |
7917 | 14 | { &hf_dhcp_pkt_mdc_supp_flow_secure, |
7918 | 14 | { "Secure Flow (Full Secure Provisioning Flow)", "dhcp.vendor.pktc.mdc.supp_flow.secure", |
7919 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001, |
7920 | 14 | NULL, HFILL }}, |
7921 | | |
7922 | 14 | { &hf_dhcp_pkt_mdc_supp_flow_hybrid, |
7923 | 14 | { "Hybrid Flow", "dhcp.vendor.pktc.mdc.supp_flow.hybrid", |
7924 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002, |
7925 | 14 | NULL, HFILL }}, |
7926 | | |
7927 | 14 | { &hf_dhcp_pkt_mdc_supp_flow_basic, |
7928 | 14 | { "Basic Flow", "dhcp.vendor.pktc.mdc.supp_flow.basic", |
7929 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004, |
7930 | 14 | NULL, HFILL }}, |
7931 | | |
7932 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta, |
7933 | 14 | { "PacketCable 1.5 MTA MIB", "dhcp.vendor.pktc.mdc_cl.mib.mta", |
7934 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01, |
7935 | 14 | NULL, HFILL }}, |
7936 | | |
7937 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_signaling, |
7938 | 14 | { "PacketCable 1.5 Signaling MIB", "dhcp.vendor.pktc.mdc_cl.mib.signaling", |
7939 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02, |
7940 | 14 | NULL, HFILL }}, |
7941 | | |
7942 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_management_event, |
7943 | 14 | { "PacketCable 1.5 Management Event MIB", "dhcp.vendor.pktc.mdc_cl.mib.management_event", |
7944 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04, |
7945 | 14 | NULL, HFILL }}, |
7946 | | |
7947 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta_extension, |
7948 | 14 | { "PacketCable 1.5 MTA Extension MIB", "dhcp.vendor.pktc.mdc_cl.mib.mta_extension", |
7949 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08, |
7950 | 14 | NULL, HFILL }}, |
7951 | | |
7952 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta_signaling_extension, |
7953 | 14 | { "PacketCable 1.5 Signaling Extension MIB", "dhcp.vendor.pktc.mdc_cl.mib.signaling_extension", |
7954 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10, |
7955 | 14 | NULL, HFILL }}, |
7956 | | |
7957 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_mta_mem_extension, |
7958 | 14 | { "PacketCable 1.5 MEM Extension MIB", "dhcp.vendor.pktc.mdc_cl.mib.mem_extension", |
7959 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20, |
7960 | 14 | NULL, HFILL }}, |
7961 | | |
7962 | 14 | { &hf_dhcp_pkt_mdc_mib_cl_reserved, |
7963 | 14 | { "Reserved", "dhcp.vendor.pktc.mdc_cl.mib.reserved", |
7964 | 14 | FT_UINT8, BASE_HEX, NULL, 0xC0, |
7965 | 14 | NULL, HFILL }}, |
7966 | | |
7967 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_mta, |
7968 | 14 | { "IETF MTA MIB", "dhcp.vendor.pktc.mdc_ietf.mib.mta", |
7969 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01, |
7970 | 14 | NULL, HFILL }}, |
7971 | | |
7972 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_signaling, |
7973 | 14 | { "IETF Signaling MIB", "dhcp.vendor.pktc.mdc_ietf.mib.signaling", |
7974 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02, |
7975 | 14 | NULL, HFILL }}, |
7976 | | |
7977 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_management_event, |
7978 | 14 | { "IETF Management Event MIB", "dhcp.vendor.pktc.mdc_ietf.mib.management_event", |
7979 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04, |
7980 | 14 | NULL, HFILL }}, |
7981 | | |
7982 | 14 | { &hf_dhcp_pkt_mdc_mib_ietf_reserved, |
7983 | 14 | { "Reserved", "dhcp.vendor.pktc.mdc_ietf.mib.reserved", |
7984 | 14 | FT_UINT8, BASE_HEX, NULL, 0xF8, |
7985 | 14 | NULL, HFILL }}, |
7986 | | |
7987 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta, |
7988 | 14 | { "PacketCable 1.5 MTA MIB", "dhcp.vendor.pktc.mdc_euro.mib.mta", |
7989 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01, |
7990 | 14 | NULL, HFILL }}, |
7991 | | |
7992 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_signaling, |
7993 | 14 | { "PacketCable 1.5 Signaling MIB", "dhcp.vendor.pktc.mdc_euro.mib.signaling", |
7994 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02, |
7995 | 14 | NULL, HFILL }}, |
7996 | | |
7997 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_management_event, |
7998 | 14 | { "PacketCable 1.5 Management Event MIB", "dhcp.vendor.pktc.mdc_euro.mib.management_event", |
7999 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x04, |
8000 | 14 | NULL, HFILL }}, |
8001 | | |
8002 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta_extension, |
8003 | 14 | { "PacketCable 1.5 MTA Extension MIB", "dhcp.vendor.pktc.mdc_euro.mib.mta_extension", |
8004 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08, |
8005 | 14 | NULL, HFILL }}, |
8006 | | |
8007 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta_signaling_extension, |
8008 | 14 | { "PacketCable 1.5 Signaling Extension MIB", "dhcp.vendor.pktc.mdc_euro.mib.signaling_extension", |
8009 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10, |
8010 | 14 | NULL, HFILL }}, |
8011 | | |
8012 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_mta_mem_extension, |
8013 | 14 | { "PacketCable 1.5 MEM Extension MIB", "dhcp.vendor.pktc.mdc_euro.mib.mem_extension", |
8014 | 14 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20, |
8015 | 14 | NULL, HFILL }}, |
8016 | | |
8017 | 14 | { &hf_dhcp_pkt_mdc_mib_euro_reserved, |
8018 | 14 | { "Reserved", "dhcp.vendor.pktc.mdc_euro.mib.reserved", |
8019 | 14 | FT_UINT8, BASE_HEX, NULL, 0xC0, |
8020 | 14 | NULL, HFILL }}, |
8021 | | |
8022 | 14 | { &hf_dhcp_docsis_cm_cap_len, |
8023 | 14 | { "CM DC Length", "dhcp.vendor.docsis.cm_cap_len", |
8024 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8025 | 14 | "DOCSIS Cable Modem Device Capabilities Length", HFILL }}, |
8026 | | |
8027 | 14 | { &hf_dhcp_docsis_cm_cap_type, |
8028 | 14 | { "CM DC Type", "dhcp.docsis_cm_cap_type", |
8029 | 14 | FT_UINT16, BASE_DEC, VALS(docsis_cm_cap_type_vals), 0x0, |
8030 | 14 | "Docsis Cable Modem Device Capability type", HFILL }}, |
8031 | | |
8032 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_cm, |
8033 | 14 | { "CM", "dhcp.docsis_cm_cap.ranging_hold_off.cm", |
8034 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001, |
8035 | 14 | NULL, HFILL }}, |
8036 | | |
8037 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_eps, |
8038 | 14 | { "ePS or eRouter", "dhcp.docsis_cm_cap.ranging_hold_off.eps", |
8039 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0002, |
8040 | 14 | NULL, HFILL }}, |
8041 | | |
8042 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_emta, |
8043 | 14 | { "EMTA or EDVA", "dhcp.docsis_cm_cap.ranging_hold_off.emta", |
8044 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0004, |
8045 | 14 | NULL, HFILL }}, |
8046 | | |
8047 | 14 | { &hf_dhcp_docsis_cm_cap_ranging_hold_off_dsg, |
8048 | 14 | { "DSG/eSTB", "dhcp.docsis_cm_cap.ranging_hold_off.dsg", |
8049 | 14 | FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0008, |
8050 | 14 | NULL, HFILL }}, |
8051 | | |
8052 | | |
8053 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_stpid, |
8054 | 14 | { "[IEEE 802.1ad] S-TPID", "dhcp.docsis_cm_cap.mpls.stpid", |
8055 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001, |
8056 | 14 | NULL, HFILL }}, |
8057 | | |
8058 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_svid, |
8059 | 14 | { "[IEEE 802.1ad] S-VID", "dhcp.docsis_cm_cap.mpls.svid", |
8060 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002, |
8061 | 14 | NULL, HFILL }}, |
8062 | | |
8063 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_spcp, |
8064 | 14 | { "[IEEE 802.1ad] S-PCP", "dhcp.docsis_cm_cap.mpls.spcp", |
8065 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004, |
8066 | 14 | NULL, HFILL }}, |
8067 | | |
8068 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_sdei, |
8069 | 14 | { "[IEEE 802.1ad] S-DEI", "dhcp.docsis_cm_cap.mpls.sdei", |
8070 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008, |
8071 | 14 | NULL, HFILL }}, |
8072 | | |
8073 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ctpid, |
8074 | 14 | { "[IEEE 802.1ad] C-TPID", "dhcp.docsis_cm_cap.mpls.ctpid", |
8075 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010, |
8076 | 14 | NULL, HFILL }}, |
8077 | | |
8078 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_cvid, |
8079 | 14 | { "[IEEE 802.1ad] C-VID", "dhcp.docsis_cm_cap.mpls.cvid", |
8080 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020, |
8081 | 14 | NULL, HFILL }}, |
8082 | | |
8083 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_cpcp, |
8084 | 14 | { "[IEEE 802.1ad] C-PCP", "dhcp.docsis_cm_cap.mpls.cpcp", |
8085 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040, |
8086 | 14 | NULL, HFILL }}, |
8087 | | |
8088 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ccfi, |
8089 | 14 | { "[IEEE 802.1ad] C-CFI", "dhcp.docsis_cm_cap.mpls.ccfi", |
8090 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000080, |
8091 | 14 | NULL, HFILL }}, |
8092 | | |
8093 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_stci, |
8094 | 14 | { "[IEEE 802.1ad] S-TCI", "dhcp.docsis_cm_cap.mpls.stci", |
8095 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000100, |
8096 | 14 | NULL, HFILL }}, |
8097 | | |
8098 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ctci, |
8099 | 14 | { "[IEEE 802.1ad] C-TCI", "dhcp.docsis_cm_cap.mpls.ctci", |
8100 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000200, |
8101 | 14 | NULL, HFILL }}, |
8102 | | |
8103 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_itpid, |
8104 | 14 | { "[IEEE 802.1ad] I-TPID", "dhcp.docsis_cm_cap.mpls.itpid", |
8105 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000400, |
8106 | 14 | NULL, HFILL }}, |
8107 | | |
8108 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_isid, |
8109 | 14 | { "[IEEE 802.1ad] I-SID", "dhcp.docsis_cm_cap.mpls.isid", |
8110 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000800, |
8111 | 14 | NULL, HFILL }}, |
8112 | | |
8113 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_itci, |
8114 | 14 | { "[IEEE 802.1ad] I-TCI", "dhcp.docsis_cm_cap.mpls.itci", |
8115 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00001000, |
8116 | 14 | NULL, HFILL }}, |
8117 | | |
8118 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_ipcp, |
8119 | 14 | { "[IEEE 802.1ad] I-PCP", "dhcp.docsis_cm_cap.mpls.ipcp", |
8120 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00002000, |
8121 | 14 | NULL, HFILL }}, |
8122 | | |
8123 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_idei, |
8124 | 14 | { "[IEEE 802.1ad] I-DEI", "dhcp.docsis_cm_cap.mpls.idei", |
8125 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00004000, |
8126 | 14 | NULL, HFILL }}, |
8127 | | |
8128 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_iuca, |
8129 | 14 | { "[IEEE 802.1ad] I-UCA", "dhcp.docsis_cm_cap.mpls.iuca", |
8130 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00008000, |
8131 | 14 | NULL, HFILL }}, |
8132 | | |
8133 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_btpid, |
8134 | 14 | { "[IEEE 802.1ad] B-TPID", "dhcp.docsis_cm_cap.mpls.btpid", |
8135 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00010000, |
8136 | 14 | NULL, HFILL }}, |
8137 | | |
8138 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_btci, |
8139 | 14 | { "[IEEE 802.1ad] B-TCI", "dhcp.docsis_cm_cap.mpls.btci", |
8140 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00020000, |
8141 | 14 | NULL, HFILL }}, |
8142 | | |
8143 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bpcp, |
8144 | 14 | { "[IEEE 802.1ad] B-PCP", "dhcp.docsis_cm_cap.mpls.bpcp", |
8145 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00040000, |
8146 | 14 | NULL, HFILL }}, |
8147 | | |
8148 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bdei, |
8149 | 14 | { "[IEEE 802.1ad] B-DEI", "dhcp.docsis_cm_cap.mpls.bdei", |
8150 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00080000, |
8151 | 14 | NULL, HFILL }}, |
8152 | | |
8153 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bvid, |
8154 | 14 | { "[IEEE 802.1ad] B-VID", "dhcp.docsis_cm_cap.mpls.bvid", |
8155 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00100000, |
8156 | 14 | NULL, HFILL }}, |
8157 | | |
8158 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bda, |
8159 | 14 | { "[IEEE 802.1ad] B-DA", "dhcp.docsis_cm_cap.mpls.bda", |
8160 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00200000, |
8161 | 14 | NULL, HFILL }}, |
8162 | | |
8163 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_bsa, |
8164 | 14 | { "[IEEE 802.1ad] B-SA", "dhcp.docsis_cm_cap.mpls.bsa", |
8165 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00400000, |
8166 | 14 | NULL, HFILL }}, |
8167 | | |
8168 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_tc, |
8169 | 14 | { "MPLS TC", "dhcp.docsis_cm_cap.mpls.tc", |
8170 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00800000, |
8171 | 14 | NULL, HFILL }}, |
8172 | | |
8173 | 14 | { &hf_dhcp_docsis_cm_cap_mpls_label, |
8174 | 14 | { "MPLS Label", "dhcp.docsis_cm_cap.mpls.label", |
8175 | 14 | FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x01000000, |
8176 | 14 | NULL, HFILL }}, |
8177 | | |
8178 | | |
8179 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_160, |
8180 | 14 | { "160 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.160", |
8181 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01, |
8182 | 14 | NULL, HFILL }}, |
8183 | | |
8184 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_320, |
8185 | 14 | { "320 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.320", |
8186 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02, |
8187 | 14 | NULL, HFILL }}, |
8188 | | |
8189 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_640, |
8190 | 14 | { "640 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.640", |
8191 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04, |
8192 | 14 | NULL, HFILL }}, |
8193 | | |
8194 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_1280, |
8195 | 14 | { "1280 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.1280", |
8196 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08, |
8197 | 14 | NULL, HFILL }}, |
8198 | | |
8199 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_2560, |
8200 | 14 | { "2560 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.2560", |
8201 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10, |
8202 | 14 | NULL, HFILL }}, |
8203 | | |
8204 | 14 | { &hf_dhcp_docsis_cm_cap_ussymrate_5120, |
8205 | 14 | { "5120 ksps symbol rate", "dhcp.docsis_cm_cap.ussymrate.5120", |
8206 | 14 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20, |
8207 | 14 | NULL, HFILL }}, |
8208 | | |
8209 | 14 | { &hf_dhcp_client_identifier_uuid, |
8210 | 14 | { "Client Identifier (UUID)", "dhcp.client_id.uuid", |
8211 | 14 | FT_GUID, BASE_NONE, NULL, 0x0, |
8212 | 14 | "Client Machine Identifier (UUID)", HFILL }}, |
8213 | | |
8214 | 14 | { &hf_dhcp_client_hardware_address, |
8215 | 14 | { "Client hardware address", "dhcp.client_hardware_address", |
8216 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8217 | 14 | NULL, HFILL }}, |
8218 | | |
8219 | 14 | { &hf_dhcp_client_id_iaid, |
8220 | 14 | { "IAID", "dhcp.client_id.iaid", |
8221 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8222 | 14 | NULL, HFILL }}, |
8223 | | |
8224 | 14 | { &hf_dhcp_client_id_duid_type, |
8225 | 14 | { "DUID Type", "dhcp.client_id.duid_type", |
8226 | 14 | FT_UINT16, BASE_DEC, VALS(duidtype_vals), 0x0, |
8227 | 14 | NULL, HFILL }}, |
8228 | | |
8229 | 14 | { &hf_dhcp_client_identifier_duid_llt_hw_type, |
8230 | 14 | { "Hardware type", "dhcp.client_id.duid_llt_hw_type", |
8231 | 14 | FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0x0, |
8232 | 14 | "Client Identifier DUID LLT Hardware type", HFILL }}, |
8233 | | |
8234 | 14 | { &hf_dhcp_client_identifier_duid_ll_hw_type, |
8235 | 14 | { "Hardware type", "dhcp.client_id.duid_ll_hw_type", |
8236 | 14 | FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0x0, |
8237 | 14 | "Client Identifier DUID LL Hardware type", HFILL }}, |
8238 | | |
8239 | 14 | { &hf_dhcp_client_identifier_time, |
8240 | 14 | { "Time", "dhcp.client_id.time", |
8241 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8242 | 14 | NULL, HFILL }}, |
8243 | | |
8244 | 14 | { &hf_dhcp_client_identifier_link_layer_address, |
8245 | 14 | { "Link layer address", "dhcp.client_id.link_layer_address", |
8246 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8247 | 14 | NULL, HFILL }}, |
8248 | | |
8249 | 14 | { &hf_dhcp_client_identifier_link_layer_address_ether, |
8250 | 14 | { "Link layer address (Ethernet)", "dhcp.client_id.link_layer_address_ether", |
8251 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
8252 | 14 | NULL, HFILL }}, |
8253 | | |
8254 | 14 | { &hf_dhcp_client_identifier_enterprise_num, |
8255 | 14 | { "Enterprise-number", "dhcp.client_id.enterprise_num", |
8256 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, |
8257 | 14 | NULL, HFILL }}, |
8258 | | |
8259 | 14 | { &hf_dhcp_client_identifier, |
8260 | 14 | { "Identifier", "dhcp.client_id", |
8261 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8262 | 14 | NULL, HFILL }}, |
8263 | | |
8264 | 14 | { &hf_dhcp_client_identifier_type, |
8265 | 14 | { "Type", "dhcp.client_id.type", |
8266 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8267 | 14 | NULL, HFILL }}, |
8268 | | |
8269 | 14 | { &hf_dhcp_client_identifier_undef, |
8270 | 14 | { "Client Identifier", "dhcp.client_id.undef", |
8271 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8272 | 14 | NULL, HFILL }}, |
8273 | | |
8274 | 14 | { &hf_dhcp_option_type, |
8275 | 14 | { "Option", "dhcp.option.type", |
8276 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8277 | 14 | "DHCP/BOOTP option type", HFILL }}, |
8278 | | |
8279 | 14 | { &hf_dhcp_option_length, |
8280 | 14 | { "Length", "dhcp.option.length", |
8281 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8282 | 14 | "DHCP/BOOTP option length", HFILL }}, |
8283 | | |
8284 | 14 | { &hf_dhcp_suboption_length, |
8285 | 14 | { "Length", "dhcp.option.suboption_length", |
8286 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8287 | 14 | "Suboption length", HFILL }}, |
8288 | | |
8289 | 14 | { &hf_dhcp_option_value, |
8290 | 14 | { "Value", "dhcp.option.value", |
8291 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8292 | 14 | "DHCP/BOOTP option value", HFILL }}, |
8293 | | |
8294 | 14 | { &hf_dhcp_option_value_8, |
8295 | 14 | { "Value", "dhcp.option.value.uint", |
8296 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8297 | 14 | "8-bit DHCP/BOOTP option value", HFILL }}, |
8298 | | |
8299 | 14 | { &hf_dhcp_option_value_16, |
8300 | 14 | { "Value", "dhcp.option.value.uint", |
8301 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8302 | 14 | "16-bit DHCP/BOOTP option value", HFILL }}, |
8303 | | |
8304 | 14 | { &hf_dhcp_option_value_u32, |
8305 | 14 | { "Value", "dhcp.option.value.uint", |
8306 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8307 | 14 | "32-bit DHCP/BOOTP option value", HFILL }}, |
8308 | | |
8309 | 14 | { &hf_dhcp_option_value_s_secs, |
8310 | 14 | { "Value", "dhcp.option.value.secs", |
8311 | 14 | FT_INT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_s_secs_fmt), 0x0, |
8312 | 14 | "32-bit DHCP/BOOTP option value", HFILL }}, |
8313 | | |
8314 | 14 | { &hf_dhcp_option_value_u_secs, |
8315 | 14 | { "Value", "dhcp.option.value.usecs", |
8316 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8317 | 14 | "32-bit DHCP/BOOTP option value", HFILL }}, |
8318 | | |
8319 | 14 | { &hf_dhcp_option_value_stringz, |
8320 | 14 | { "Value", "dhcp.option.value.string", |
8321 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8322 | 14 | "Z-String DHCP/BOOTP option value", HFILL }}, |
8323 | | |
8324 | 14 | { &hf_dhcp_option_value_ip_address, |
8325 | 14 | { "Value", "dhcp.option.value.address", |
8326 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8327 | 14 | "IP address DHCP/BOOTP option value", HFILL }}, |
8328 | | |
8329 | 14 | { &hf_dhcp_option_value_boolean, |
8330 | 14 | { "Value", "dhcp.option.value.bool", |
8331 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x00, |
8332 | 14 | "Boolean DHCP/BOOTP option value", HFILL }}, |
8333 | | |
8334 | 14 | { &hf_dhcp_option_rfc_3396_detected, |
8335 | 14 | { "Encoding Long Options detected (RFC 3396)", "dhcp.option.rfc_3396_detected", |
8336 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8337 | 14 | NULL, HFILL }}, |
8338 | | |
8339 | 14 | { &hf_dhcp_option_padding, |
8340 | 14 | { "Padding", "dhcp.option.padding", |
8341 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8342 | 14 | "Option 0: Padding", HFILL }}, |
8343 | | |
8344 | 14 | { &hf_dhcp_option_subnet_mask, |
8345 | 14 | { "Subnet Mask", "dhcp.option.subnet_mask", |
8346 | 14 | FT_IPv4, BASE_NETMASK, NULL, 0x00, |
8347 | 14 | "Option 1: Subnet Mask", HFILL }}, |
8348 | | |
8349 | 14 | { &hf_dhcp_option_time_offset, |
8350 | 14 | { "Time Offset", "dhcp.option.time_offset", |
8351 | 14 | FT_INT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_s_secs_fmt), 0x0, |
8352 | 14 | "Option 2: Time Offset", HFILL }}, |
8353 | | |
8354 | 14 | { &hf_dhcp_option_router, |
8355 | 14 | { "Router", "dhcp.option.router", |
8356 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8357 | 14 | "Option 3: Router", HFILL }}, |
8358 | | |
8359 | 14 | { &hf_dhcp_option_time_server, |
8360 | 14 | { "Time Server", "dhcp.option.time_server", |
8361 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8362 | 14 | "Option 4: Time Server", HFILL }}, |
8363 | | |
8364 | 14 | { &hf_dhcp_option_name_server, |
8365 | 14 | { "Name Server", "dhcp.option.name_server", |
8366 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8367 | 14 | "Option 5: Name Server", HFILL }}, |
8368 | | |
8369 | 14 | { &hf_dhcp_option_domain_name_server, |
8370 | 14 | { "Domain Name Server", "dhcp.option.domain_name_server", |
8371 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8372 | 14 | "Option 6: Domain Name Server", HFILL }}, |
8373 | | |
8374 | 14 | { &hf_dhcp_option_log_server, |
8375 | 14 | { "Log Server", "dhcp.option.log_server", |
8376 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8377 | 14 | "Option 7: Log Server", HFILL }}, |
8378 | | |
8379 | 14 | { &hf_dhcp_option_quotes_server, |
8380 | 14 | { "Quotes Server", "dhcp.option.quotes_server", |
8381 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8382 | 14 | "Option 8: Quotes Server", HFILL }}, |
8383 | | |
8384 | 14 | { &hf_dhcp_option_lpr_server, |
8385 | 14 | { "LPR Server", "dhcp.option.lpr_server", |
8386 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8387 | 14 | "Option 9: LPR Server", HFILL }}, |
8388 | | |
8389 | 14 | { &hf_dhcp_option_impress_server, |
8390 | 14 | { "Impress Server", "dhcp.option.impress_server", |
8391 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8392 | 14 | "Option 10: Impress Server", HFILL }}, |
8393 | | |
8394 | 14 | { &hf_dhcp_option_resource_location_server, |
8395 | 14 | { "Resource Location Server", "dhcp.option.resource_location_server", |
8396 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8397 | 14 | "Option 11: Resource Location Server", HFILL }}, |
8398 | | |
8399 | 14 | { &hf_dhcp_option_hostname, |
8400 | 14 | { "Host Name", "dhcp.option.hostname", |
8401 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8402 | 14 | "Option 12: Host Name", HFILL }}, |
8403 | | |
8404 | 14 | { &hf_dhcp_option_boot_file_size, |
8405 | 14 | { "Boot File Size", "dhcp.option.boot_file_size", |
8406 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8407 | 14 | "Option 13: Boot File Size", HFILL }}, |
8408 | | |
8409 | 14 | { &hf_dhcp_option_merit_dump_file, |
8410 | 14 | { "Merit Dump File", "dhcp.option.merit_dump_file", |
8411 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8412 | 14 | "Option 14: Merit Dump File", HFILL }}, |
8413 | | |
8414 | 14 | { &hf_dhcp_option_domain_name, |
8415 | 14 | { "Domain Name", "dhcp.option.domain_name", |
8416 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8417 | 14 | "Option 15: Domain Name", HFILL }}, |
8418 | | |
8419 | 14 | { &hf_dhcp_option_swap_server, |
8420 | 14 | { "Swap Server", "dhcp.option.swap_server", |
8421 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8422 | 14 | "Option 16: Swap Server", HFILL }}, |
8423 | | |
8424 | 14 | { &hf_dhcp_option_root_path, |
8425 | 14 | { "Root Path", "dhcp.option.root_path", |
8426 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8427 | 14 | "Option 17: Root Path", HFILL }}, |
8428 | | |
8429 | 14 | { &hf_dhcp_option_extension_path, |
8430 | 14 | { "Extensions Path", "dhcp.option.extension_path", |
8431 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8432 | 14 | "Option 18: Extensions Path", HFILL }}, |
8433 | | |
8434 | 14 | { &hf_dhcp_option_ip_forwarding, |
8435 | 14 | { "IP Forwarding", "dhcp.option.ip_forwarding", |
8436 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8437 | 14 | "Option 19: IP Forwarding", HFILL }}, |
8438 | | |
8439 | 14 | { &hf_dhcp_option_policy_filter_ip, |
8440 | 14 | { "IP Address", "dhcp.option.policy_filter.ip", |
8441 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8442 | 14 | "Option 21: IP address", HFILL }}, |
8443 | | |
8444 | 14 | { &hf_dhcp_option_policy_filter_subnet_mask, |
8445 | 14 | { "Subnet Mask", "dhcp.option.policy_filter.subnet_mask", |
8446 | 14 | FT_IPv4, BASE_NETMASK, NULL, 0x00, |
8447 | 14 | "Option 21: Subnet Mask", HFILL }}, |
8448 | | |
8449 | 14 | { &hf_dhcp_option_non_local_source_routing, |
8450 | 14 | { "Non-Local Source Routing", "dhcp.option.non_local_source_routing", |
8451 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8452 | 14 | "Option 20: Non-Local Source Routing", HFILL }}, |
8453 | | |
8454 | 14 | { &hf_dhcp_option_max_datagram_reassembly_size, |
8455 | 14 | { "Maximum Datagram Reassembly Size", "dhcp.option.max_datagram_reassembly_size", |
8456 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8457 | 14 | "Option 22: Maximum Datagram Reassembly Size", HFILL }}, |
8458 | | |
8459 | 14 | { &hf_dhcp_option_default_ip_ttl, |
8460 | 14 | { "Default IP Time-to-Live", "dhcp.option.default_ip_ttl", |
8461 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8462 | 14 | "Option 23: Default IP Time-to-Live", HFILL }}, |
8463 | | |
8464 | 14 | { &hf_dhcp_option_path_mtu_aging_timeout, |
8465 | 14 | { "Path MTU Aging Timeout", "dhcp.option.path_mtu_aging_timeout", |
8466 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8467 | 14 | "Option 24: Path MTU Aging Timeout", HFILL }}, |
8468 | | |
8469 | 14 | { &hf_dhcp_option_path_mtu_plateau_table_item, |
8470 | 14 | { "Path MTU Plateau Table Item", "dhcp.option.path_mtu_plateau_table_item", |
8471 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8472 | 14 | "Option 25: Path MTU Plateau Table Item", HFILL }}, |
8473 | | |
8474 | 14 | { &hf_dhcp_option_interface_mtu, |
8475 | 14 | { "Interface MTU", "dhcp.option.interface_mtu", |
8476 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8477 | 14 | "Option 26: Interface MTU", HFILL }}, |
8478 | | |
8479 | 14 | { &hf_dhcp_option_all_subnets_are_local, |
8480 | 14 | { "All Subnets are Local", "dhcp.option.all_subnets_are_local", |
8481 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
8482 | 14 | "Option 27: All Subnets are Local", HFILL }}, |
8483 | | |
8484 | 14 | { &hf_dhcp_option_broadcast_address, |
8485 | 14 | { "Broadcast Address", "dhcp.option.broadcast_address", |
8486 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8487 | 14 | "Option 28: Broadcast Address", HFILL }}, |
8488 | | |
8489 | 14 | { &hf_dhcp_option_perform_mask_discovery, |
8490 | 14 | { "Perform Mask Discovery", "dhcp.option.perform_mask_discovery", |
8491 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8492 | 14 | "Option 29: Perform Mask Discovery", HFILL }}, |
8493 | | |
8494 | 14 | { &hf_dhcp_option_mask_supplier, |
8495 | 14 | { "Mask Supplier", "dhcp.option.mask_supplier", |
8496 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
8497 | 14 | "Option 30: Mask Supplier", HFILL }}, |
8498 | | |
8499 | 14 | { &hf_dhcp_option_perform_router_discover, |
8500 | 14 | { "Perform Router Discover", "dhcp.option.perform_router_discover", |
8501 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8502 | 14 | "Option 31: Perform Router Discover", HFILL }}, |
8503 | | |
8504 | 14 | { &hf_dhcp_option_router_solicitation_address, |
8505 | 14 | { "Router Solicitation Address", "dhcp.option.router_solicitation_address", |
8506 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8507 | 14 | "Option 32: Router Solicitation Address", HFILL }}, |
8508 | | |
8509 | 14 | { &hf_dhcp_option_static_route_ip, |
8510 | 14 | { "Destination IP Address", "dhcp.option.static_route.ip", |
8511 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8512 | 14 | "Option 33: Destination IP address", HFILL }}, |
8513 | | |
8514 | 14 | { &hf_dhcp_option_static_route_router, |
8515 | 14 | { "Destination Router", "dhcp.option.static_route.router", |
8516 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8517 | 14 | "Option 33: Destination Router", HFILL }}, |
8518 | | |
8519 | 14 | { &hf_dhcp_option_trailer_encapsulation, |
8520 | 14 | { "Trailer Encapsulation", "dhcp.option.trailer_encapsulation", |
8521 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8522 | 14 | "Option 34: Trailer Encapsulation", HFILL }}, |
8523 | | |
8524 | 14 | { &hf_dhcp_option_arp_cache_timeout, |
8525 | 14 | { "ARP Cache Timeout", "dhcp.option.arp_cache_timeout", |
8526 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8527 | 14 | "Option 35: ARP Cache Timeout", HFILL }}, |
8528 | | |
8529 | 14 | { &hf_dhcp_option_ethernet_encapsulation, |
8530 | 14 | { "Ethernet Encapsulation", "dhcp.option.ethernet_encapsulation", |
8531 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8532 | 14 | "Option 36: Ethernet Encapsulation", HFILL }}, |
8533 | | |
8534 | 14 | { &hf_dhcp_option_tcp_default_ttl, |
8535 | 14 | { "TCP Default TTL", "dhcp.option.tcp_default_ttl", |
8536 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8537 | 14 | "Option 37: TCP Default TTL", HFILL }}, |
8538 | | |
8539 | 14 | { &hf_dhcp_option_tcp_keepalive_interval, |
8540 | 14 | { "TCP Keepalive Interval", "dhcp.option.tcp_keepalive_interval", |
8541 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
8542 | 14 | "Option 38: TCP Keepalive Interval", HFILL }}, |
8543 | | |
8544 | 14 | { &hf_dhcp_option_tcp_keepalive_garbage, |
8545 | 14 | { "TCP Keepalive Garbage", "dhcp.option.tcp_keepalive_garbage", |
8546 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0x00, |
8547 | 14 | "Option 39: TCP Keepalive Garbage", HFILL }}, |
8548 | | |
8549 | 14 | { &hf_dhcp_option_nis_domain, |
8550 | 14 | { "Network Information Service Domain", "dhcp.option.nis_domain", |
8551 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8552 | 14 | "Option 40: Network Information Service Domain", HFILL }}, |
8553 | | |
8554 | 14 | { &hf_dhcp_option_nis_server, |
8555 | 14 | { "Network Information Service Server", "dhcp.option.nis_server", |
8556 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8557 | 14 | "Option 41: Network Information Service Server", HFILL }}, |
8558 | | |
8559 | 14 | { &hf_dhcp_option_ntp_server, |
8560 | 14 | { "Network Time Protocol Server", "dhcp.option.ntp_server", |
8561 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8562 | 14 | "Option 42: Network Time Protocol Server", HFILL }}, |
8563 | | |
8564 | 14 | { &hf_dhcp_option43_suboption, |
8565 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.suboption", |
8566 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8567 | 14 | NULL, HFILL }}, |
8568 | | |
8569 | 14 | { &hf_dhcp_option43_value, |
8570 | 14 | { "Value", "dhcp.option.vendor.value", |
8571 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8572 | 14 | "Option 43: Suboption value", HFILL }}, |
8573 | | |
8574 | 14 | { &hf_dhcp_option43_value_8, |
8575 | 14 | { "Value", "dhcp.option.vendor.value.uint", |
8576 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8577 | 14 | "Option 43: Suboption 8-bit value", HFILL }}, |
8578 | | |
8579 | 14 | { &hf_dhcp_option43_value_32, |
8580 | 14 | { "Value", "dhcp.option.vendor.value.uint", |
8581 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8582 | 14 | "Option 43: Suboption 32-bit value", HFILL }}, |
8583 | | |
8584 | 14 | { &hf_dhcp_option43_value_stringz, |
8585 | 14 | { "Value", "dhcp.option.vendor.value.string", |
8586 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8587 | 14 | "Option 43: Suboption Z-String value", HFILL }}, |
8588 | | |
8589 | 14 | { &hf_dhcp_option43_value_ip_address, |
8590 | 14 | { "Value", "dhcp.option.vendor.value.address", |
8591 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8592 | 14 | "Option 43: Suboption IP address", HFILL }}, |
8593 | | |
8594 | | |
8595 | 14 | { &hf_dhcp_option43_pxeclient_suboption, |
8596 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.pxeclient.suboption", |
8597 | 14 | FT_UINT8, BASE_DEC, VALS(option43_pxeclient_suboption_vals), 0x0, |
8598 | 14 | "Option 43:PXE Client Suboption", HFILL }}, |
8599 | | |
8600 | 14 | { &hf_dhcp_option43_pxeclient_padding, |
8601 | 14 | { "Padding", "dhcp.option.vendor.pxeclient.padding", |
8602 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8603 | 14 | "Option 43:PXE Client 0 Padding", HFILL }}, |
8604 | | |
8605 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_ip, |
8606 | 14 | { "mtftp IP", "dhcp.option.vendor.pxeclient.mtftp_ip", |
8607 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8608 | 14 | "Option 43:PXE Client 1 mtftp IP", HFILL }}, |
8609 | | |
8610 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_client_port, |
8611 | 14 | { "mtftp client port", "dhcp.option.vendor.pxeclient.mtftp_client_port", |
8612 | 14 | FT_UINT16, BASE_DEC, NULL, 0x00, |
8613 | 14 | "Option 43:PXE Client 2 mtftp client port", HFILL }}, |
8614 | | |
8615 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_server_port, |
8616 | 14 | { "mtftp server port", "dhcp.option.vendor.pxeclient.mtftp_server_port", |
8617 | 14 | FT_UINT16, BASE_DEC, NULL, 0x00, |
8618 | 14 | "Option 43:PXE Client 3 mtftp server port", HFILL }}, |
8619 | | |
8620 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_timeout, |
8621 | 14 | { "mtftp timeout", "dhcp.option.vendor.pxeclient.mtftp_timeout", |
8622 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8623 | 14 | "Option 43:PXE Client 4 mtftp timeout", HFILL }}, |
8624 | | |
8625 | 14 | { &hf_dhcp_option43_pxeclient_mtftp_delay, |
8626 | 14 | { "mtftp delay", "dhcp.option.vendor.pxeclient.mtftp_delay", |
8627 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8628 | 14 | "Option 43:PXE Client 5 mtftp delay", HFILL }}, |
8629 | | |
8630 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control, |
8631 | 14 | { "discovery control", "dhcp.option.vendor.pxeclient.discovery_control", |
8632 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0, |
8633 | 14 | "Option 43:PXE Client 6 discovery control", HFILL }}, |
8634 | | |
8635 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_bc, |
8636 | 14 | { "Disable Broadcast", "dhcp.option.vendor.pxeclient.discovery_control.broadcast", |
8637 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01, |
8638 | 14 | NULL, HFILL }}, |
8639 | | |
8640 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_mc, |
8641 | 14 | { "Disable Multicast", "dhcp.option.vendor.pxeclient.discovery_control.multicast", |
8642 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02, |
8643 | 14 | NULL, HFILL }}, |
8644 | | |
8645 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_serverlist, |
8646 | 14 | { "Serverlist only", "dhcp.option.vendor.pxeclient.discovery_control.serverlist", |
8647 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04, |
8648 | 14 | NULL, HFILL }}, |
8649 | | |
8650 | 14 | { &hf_dhcp_option43_pxeclient_discovery_control_bstrap, |
8651 | 14 | { "Bootstrap override", "dhcp.option.vendor.pxeclient.discovery_control.bstrap", |
8652 | 14 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x08, |
8653 | 14 | NULL, HFILL }}, |
8654 | | |
8655 | 14 | { &hf_dhcp_option43_pxeclient_multicast_address, |
8656 | 14 | { "multicast address", "dhcp.option.vendor.pxeclient.multicast_address", |
8657 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
8658 | 14 | "Option 43:PXE Client 7 multicast address", HFILL }}, |
8659 | | |
8660 | 14 | { &hf_dhcp_option43_pxeclient_boot_servers, |
8661 | 14 | { "boot servers", "dhcp.option.vendor.pxeclient.boot_servers", |
8662 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8663 | 14 | "Option 43:PXE Client 8 boot servers", HFILL }}, |
8664 | | |
8665 | 14 | { &hf_dhcp_option43_pxeclient_boot_server_type, |
8666 | 14 | { "Type", "dhcp.option.vendor.pxeclient.boot_servers.type", |
8667 | 14 | FT_UINT16, BASE_DEC, VALS(o43pxeclient_boot_server_types), 0x0, |
8668 | 14 | NULL, HFILL }}, |
8669 | | |
8670 | 14 | { &hf_dhcp_option43_pxeclient_boot_server_count, |
8671 | 14 | { "IP count", "dhcp.option.vendor.pxeclient.boot_servers.count", |
8672 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8673 | 14 | NULL, HFILL }}, |
8674 | | |
8675 | 14 | { &hf_dhcp_option43_pxeclient_boot_server_ip, |
8676 | 14 | { "IP", "dhcp.option.vendor.pxeclient.boot_servers.ip", |
8677 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8678 | 14 | NULL, HFILL }}, |
8679 | | |
8680 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu, |
8681 | 14 | { "boot menu", "dhcp.option.vendor.pxeclient.boot_menu", |
8682 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8683 | 14 | "Option 43:PXE Client 9 boot menu", HFILL }}, |
8684 | | |
8685 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu_type, |
8686 | 14 | { "Type", "dhcp.option.vendor.pxeclient.boot_menu.type", |
8687 | 14 | FT_UINT16, BASE_DEC, VALS(o43pxeclient_boot_menu_types), 0x0, |
8688 | 14 | NULL, HFILL }}, |
8689 | | |
8690 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu_length, |
8691 | 14 | { "Length", "dhcp.option.vendor.pxeclient.boot_menu.length", |
8692 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8693 | 14 | NULL, HFILL }}, |
8694 | | |
8695 | 14 | { &hf_dhcp_option43_pxeclient_boot_menu_desc, |
8696 | 14 | { "Description", "dhcp.option.vendor.pxeclient.boot_menu.desc", |
8697 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8698 | 14 | NULL, HFILL }}, |
8699 | | |
8700 | 14 | { &hf_dhcp_option43_pxeclient_menu_prompt, |
8701 | 14 | { "menu prompt", "dhcp.option.vendor.pxeclient.menu_prompt", |
8702 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8703 | 14 | "Option 43:PXE Client 10 menu prompt", HFILL }}, |
8704 | | |
8705 | 14 | { &hf_dhcp_option43_pxeclient_menu_prompt_timeout, |
8706 | 14 | { "Timeout", "dhcp.option.vendor.pxeclient.menu_prompt.timeout", |
8707 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8708 | 14 | NULL, HFILL }}, |
8709 | | |
8710 | 14 | { &hf_dhcp_option43_pxeclient_menu_prompt_prompt, |
8711 | 14 | { "Prompt", "dhcp.option.vendor.pxeclient.menu_prompt.prompt", |
8712 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8713 | 14 | NULL, HFILL }}, |
8714 | | |
8715 | 14 | { &hf_dhcp_option43_pxeclient_multicast_address_alloc, |
8716 | 14 | { "multicast address alloc", "dhcp.option.vendor.pxeclient.multicast_address_alloc", |
8717 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8718 | 14 | "Option 43:PXE Client 11 multicast address alloc", HFILL }}, |
8719 | | |
8720 | 14 | { &hf_dhcp_option43_pxeclient_credential_types, |
8721 | 14 | { "credential types", "dhcp.option.vendor.pxeclient.credential_types", |
8722 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8723 | 14 | "Option 43:PXE Client 12 credential types", HFILL }}, |
8724 | | |
8725 | 14 | { &hf_dhcp_option43_pxeclient_boot_item, |
8726 | 14 | { "boot item", "dhcp.option.vendor.pxeclient.boot_item", |
8727 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8728 | 14 | "Option 43:PXE Client 71 boot item", HFILL }}, |
8729 | | |
8730 | 14 | { &hf_dhcp_option43_pxeclient_boot_item_type, |
8731 | 14 | { "Type", "dhcp.option.vendor.pxeclient.boot_item.type", |
8732 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8733 | 14 | NULL, HFILL }}, |
8734 | | |
8735 | 14 | { &hf_dhcp_option43_pxeclient_boot_item_layer, |
8736 | 14 | { "Layer", "dhcp.option.vendor.pxeclient.boot_item.layer", |
8737 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8738 | 14 | NULL, HFILL }}, |
8739 | | |
8740 | 14 | { &hf_dhcp_option43_pxeclient_lcm_server, |
8741 | 14 | { "LCM Server Name", "dhcp.option.vendor.pxeclient.lcm_server", |
8742 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8743 | 14 | "Option 43:PXE Client 179 LCM Server", HFILL }}, |
8744 | | |
8745 | 14 | { &hf_dhcp_option43_pxeclient_lcm_domain, |
8746 | 14 | { "LCM Domain", "dhcp.option.vendor.pxeclient.lcm_domain", |
8747 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8748 | 14 | "Option 43:PXE Client 180 LCM Domain", HFILL }}, |
8749 | | |
8750 | 14 | { &hf_dhcp_option43_pxeclient_lcm_nic_option, |
8751 | 14 | { "LCM NIC option", "dhcp.option.vendor.pxeclient.lcm_nic_option", |
8752 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8753 | 14 | "Option 43:PXE Client 181 LCM NIC Option", HFILL }}, |
8754 | | |
8755 | 14 | { &hf_dhcp_option43_pxeclient_lcm_workgroup, |
8756 | 14 | { "LCM Workgroup", "dhcp.option.vendor.pxeclient.lcm_workgroup", |
8757 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8758 | 14 | "Option 43:PXE Client 190 LCM Workgroup", HFILL }}, |
8759 | | |
8760 | 14 | { &hf_dhcp_option43_pxeclient_discovery, |
8761 | 14 | { "Discovery", "dhcp.option.vendor.pxeclient.discovery", |
8762 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, |
8763 | 14 | "Option 43:PXE Client 191 Discovery", HFILL }}, |
8764 | | |
8765 | 14 | { &hf_dhcp_option43_pxeclient_configured, |
8766 | 14 | { "Configured", "dhcp.option.vendor.pxeclient.configured", |
8767 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, |
8768 | 14 | "Option 43:PXE Client 192 Configured", HFILL }}, |
8769 | | |
8770 | 14 | { &hf_dhcp_option43_pxeclient_lcm_version, |
8771 | 14 | { "LCM Version", "dhcp.option.vendor.pxeclient.lcm_version", |
8772 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8773 | 14 | "Option 43:PXE Client 193 LCM Version", HFILL }}, |
8774 | | |
8775 | 14 | { &hf_dhcp_option43_pxeclient_lcm_serial, |
8776 | 14 | { "LCM Serial Number", "dhcp.option.vendor.pxeclient.lcm_serial", |
8777 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8778 | 14 | "Option 43:PXE Client 194 LCM Serial Number", HFILL }}, |
8779 | | |
8780 | 14 | { &hf_dhcp_option43_pxeclient_end, |
8781 | 14 | { "PXE Client End", "dhcp.option.vendor.pxeclient.end", |
8782 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8783 | 14 | "Option 43:PXE Client 255 End", HFILL }}, |
8784 | | |
8785 | | |
8786 | | /* AEROHIVE (Extremenetworks) vendor suboptions */ |
8787 | 14 | { &hf_dhcp_option43_aerohive_suboption, |
8788 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.aerohive.suboption", |
8789 | 14 | FT_UINT8, BASE_DEC, VALS(option43_aerohive_suboption_vals), 0x0, |
8790 | 14 | "Option 43:AEROHIVE Suboption", HFILL }}, |
8791 | | |
8792 | 14 | { &hf_dhcp_option43_aerohive_unknown, |
8793 | 14 | { "Unknown", "dhcp.option.vendor.aerohive.unknown", |
8794 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8795 | 14 | NULL, HFILL }}, |
8796 | | |
8797 | 14 | { &hf_dhcp_option43_aerohive_xiqhostname, |
8798 | 14 | { "HM FQDN", "dhcp.option.vendor.aerohive.xiqhostname", |
8799 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8800 | 14 | "Hive Manager NG FQDN", HFILL }}, |
8801 | | |
8802 | 14 | { &hf_dhcp_option43_aerohive_xiqipaddress, |
8803 | 14 | { "HM IP", "dhcp.option.vendor.aerohive.xiqipaddress", |
8804 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8805 | 14 | "Hive Manager NG IP address", HFILL }}, |
8806 | | |
8807 | | |
8808 | 14 | { &hf_dhcp_option43_cl_suboption, |
8809 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.cl.suboption", |
8810 | 14 | FT_UINT8, BASE_DEC, VALS(option43_cl_suboption_vals), 0x0, |
8811 | 14 | "Option 43:CL Suboption", HFILL }}, |
8812 | | |
8813 | 14 | { &hf_dhcp_option43_cl_padding, |
8814 | 14 | { "Padding", "dhcp.option.vendor.cl.padding", |
8815 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8816 | 14 | "Option 43:CL 0 Padding", HFILL }}, |
8817 | | |
8818 | 14 | { &hf_dhcp_option43_cl_suboption_request_list, |
8819 | 14 | { "Suboption Request List", "dhcp.option.vendor.cl.suboption_request_list", |
8820 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8821 | 14 | "Option 43:CL 1 Suboption Request List", HFILL }}, |
8822 | | |
8823 | 14 | { &hf_dhcp_option43_cl_device_type, |
8824 | 14 | { "Device Type", "dhcp.option.vendor.cl.device_type", |
8825 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8826 | 14 | "Option 43:CL 2 Device Type", HFILL }}, |
8827 | | |
8828 | 14 | { &hf_dhcp_option43_cl_esafe_type, |
8829 | 14 | { "eSAFE Types", "dhcp.option.vendor.cl.esafe_type", |
8830 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8831 | 14 | "Option 43:CL 3 eSAFE Types", HFILL }}, |
8832 | | |
8833 | 14 | { &hf_dhcp_option43_cl_serial_number, |
8834 | 14 | { "Serial Number", "dhcp.option.vendor.cl.serial_number", |
8835 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8836 | 14 | "Option 43:CL 4 Serial Number", HFILL }}, |
8837 | | |
8838 | 14 | { &hf_dhcp_option43_cl_hardware_version, |
8839 | 14 | { "Hardware Version", "dhcp.option.vendor.cl.hardware_version", |
8840 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8841 | 14 | "Option 43:CL 5 Hardware Version", HFILL }}, |
8842 | | |
8843 | 14 | { &hf_dhcp_option43_cl_software_version, |
8844 | 14 | { "Software Version", "dhcp.option.vendor.cl.software_version", |
8845 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8846 | 14 | "Option 43:CL 6 Software Version", HFILL }}, |
8847 | | |
8848 | 14 | { &hf_dhcp_option43_cl_boot_rom_version, |
8849 | 14 | { "Boot ROM version", "dhcp.option.vendor.cl.boot_rom_version", |
8850 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8851 | 14 | "Option 43:CL 7 Boot ROM version", HFILL }}, |
8852 | | |
8853 | 14 | { &hf_dhcp_option43_cl_oui_string, |
8854 | 14 | { "Organizationally Unique Identifier", "dhcp.option.vendor.cl.oui_string", |
8855 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8856 | 14 | "Option 43:CL 8 Organizationally Unique Identifier", HFILL }}, |
8857 | | |
8858 | 14 | { &hf_dhcp_option43_cl_oui_bytes, |
8859 | 14 | { "Organizationally Unique Identifier", "dhcp.option.vendor.cl.oui_bytes", |
8860 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8861 | 14 | "Option 43:CL 8 Organizationally Unique Identifier", HFILL }}, |
8862 | | |
8863 | 14 | { &hf_dhcp_option43_cl_model_number, |
8864 | 14 | { "Model Number", "dhcp.option.vendor.cl.model_number", |
8865 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8866 | 14 | "Option 43:CL 9 Model Number", HFILL }}, |
8867 | | |
8868 | 14 | { &hf_dhcp_option43_cl_vendor_name10, |
8869 | 14 | { "Vendor Name", "dhcp.option.vendor.cl.vendor_name10", |
8870 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8871 | 14 | "Option 43:CL 10 Vendor Name", HFILL }}, |
8872 | | |
8873 | 14 | { &hf_dhcp_option43_cl_address_realm, |
8874 | 14 | { "Address Realm", "dhcp.option.vendor.cl.address_realm", |
8875 | 14 | FT_UINT8, BASE_DEC, VALS(cablehome_subopt11_vals), 0x0, |
8876 | 14 | "Option 43:CL 11 Address Realm", HFILL }}, |
8877 | | |
8878 | 14 | { &hf_dhcp_option43_cl_cm_ps_system_desc, |
8879 | 14 | { "CM/PS System Description", "dhcp.option.vendor.cl.cm_ps_system_desc", |
8880 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8881 | 14 | "Option 43:CL 12 CM/PS System Description", HFILL }}, |
8882 | | |
8883 | 14 | { &hf_dhcp_option43_cl_cm_ps_firmware_revision, |
8884 | 14 | { "CM/PS Firmware Revision", "dhcp.option.vendor.cl.cm_ps_firmware_revision", |
8885 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8886 | 14 | "Option 43:CL 13 CM/PS Firmware Revision", HFILL }}, |
8887 | | |
8888 | 14 | { &hf_dhcp_option43_cl_firewall_policy_file_version, |
8889 | 14 | { "Firewall Policy File Version", "dhcp.option.vendor.cl.firewall_policy_file_version", |
8890 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8891 | 14 | "Option 43:CL 14 Firewall Policy File Version", HFILL }}, |
8892 | | |
8893 | 14 | { &hf_dhcp_option43_cl_esafe_config_file_devices, |
8894 | 14 | { "eSafe Config File Devices", "dhcp.option.vendor.cl.esafe_config_file_devices", |
8895 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8896 | 14 | "Option 43:CL 15 eSafe Config File Devices", HFILL }}, |
8897 | | |
8898 | 14 | { &hf_dhcp_option43_cl_video_security_tape, |
8899 | 14 | { "Video Security Type", "dhcp.option.vendor.cl.video_security_tape", |
8900 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8901 | 14 | "Option 43:CL 18 Video Security Type", HFILL }}, |
8902 | | |
8903 | 14 | { &hf_dhcp_option43_cl_mta_mac_address, |
8904 | 14 | { "MTA MAC Address", "dhcp.option.vendor.cl.mta_mac_address", |
8905 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
8906 | 14 | "Option 43:CL 31 MTA MAC Address", HFILL }}, |
8907 | | |
8908 | 14 | { &hf_dhcp_option43_cl_correlation_ID, |
8909 | 14 | { "Correlation ID", "dhcp.option.vendor.cl.correlation_ID", |
8910 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8911 | 14 | "Option 43: CL 32 Correlation ID", HFILL }}, |
8912 | | |
8913 | 14 | { &hf_dhcp_option43_cl_vendor_name51, |
8914 | 14 | { "Vendor Name", "dhcp.option.vendor.cl.vendor_name51", |
8915 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8916 | 14 | "Option 43:CL 51 Vendor Name", HFILL }}, |
8917 | | |
8918 | 14 | { &hf_dhcp_option43_cl_cablecard_capability, |
8919 | 14 | { "CableCARD Capability", "dhcp.option.vendor.cl.cablecard_capability", |
8920 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8921 | 14 | "Option 43:CL 52 CableCARD Capability", HFILL }}, |
8922 | | |
8923 | 14 | { &hf_dhcp_option43_cl_device_id_ca, |
8924 | 14 | { "Device Identification (CA)", "dhcp.option.vendor.cl.device_id_ca", |
8925 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8926 | 14 | "Option 43:CL 53 Device Identification (CA)", HFILL }}, |
8927 | | |
8928 | 14 | { &hf_dhcp_option43_cl_device_id_x509, |
8929 | 14 | { "Device Identification (X.509)", "dhcp.option.vendor.cl.device_id_x509", |
8930 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
8931 | 14 | "Option 43:CL 54 Device Identification (X.509)", HFILL }}, |
8932 | | |
8933 | 14 | { &hf_dhcp_option43_cl_end, |
8934 | 14 | { "CL End", "dhcp.option.vendor.cl.end", |
8935 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8936 | 14 | "Option 43:CL 255 End", HFILL }}, |
8937 | | |
8938 | | |
8939 | 14 | { &hf_dhcp_option43_alcatel_suboption, |
8940 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.alu.suboption", |
8941 | 14 | FT_UINT8, BASE_DEC, VALS(option43_alcatel_suboption_vals), 0x0, |
8942 | 14 | "Option 43:Alcatel Suboption", HFILL }}, |
8943 | | |
8944 | 14 | { &hf_dhcp_option43_alcatel_padding, |
8945 | 14 | { "Padding", "dhcp.option.vendor.alu.padding", |
8946 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8947 | 14 | "Option 43:Alcatel 0 Padding", HFILL }}, |
8948 | | |
8949 | 14 | { &hf_dhcp_option43_alcatel_vlan_id, |
8950 | 14 | { "Voice VLAN ID", "dhcp.option.vendor.alu.vid", |
8951 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8952 | 14 | "Option 43:Alcatel 58 Voice VLAN ID", HFILL }}, |
8953 | | |
8954 | 14 | { &hf_dhcp_option43_alcatel_tftp1, |
8955 | 14 | { "Spatial Redundancy TFTP1", "dhcp.option.vendor.alu.tftp1", |
8956 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8957 | 14 | "Option 43:Alcatel 64 Spatial Redundancy TFTP1", HFILL }}, |
8958 | | |
8959 | 14 | { &hf_dhcp_option43_alcatel_tftp2, |
8960 | 14 | { "Spatial Redundancy TFTP2", "dhcp.option.vendor.alu.tftp2", |
8961 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8962 | 14 | "Option 43:Alcatel 65 Spatial Redundancy TFTP2", HFILL }}, |
8963 | | |
8964 | 14 | { &hf_dhcp_option43_alcatel_app_type, |
8965 | 14 | { "Application Type", "dhcp.option.vendor.alu.app_type", |
8966 | 14 | FT_UINT8, BASE_DEC, VALS(option43_alcatel_app_type_vals), 0x0, |
8967 | 14 | "Option 43:Alcatel 66 Application Type", HFILL }}, |
8968 | | |
8969 | 14 | { &hf_dhcp_option43_alcatel_sip_url, |
8970 | 14 | { "SIP URL", "dhcp.option.vendor.alu.sip_url", |
8971 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8972 | 14 | "Option 43:Alcatel 67 SIP URL", HFILL }}, |
8973 | | |
8974 | 14 | { &hf_dhcp_option43_alcatel_end, |
8975 | 14 | { "Alcatel End", "dhcp.option.vendor.alu.end", |
8976 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8977 | 14 | "Option 43:Alcatel 255 End", HFILL }}, |
8978 | | |
8979 | 14 | { &hf_dhcp_option43_arubaap_controllerip, |
8980 | 14 | { "Aruba Controller IP", "dhcp.option.vendor.arubaap.controllerip", |
8981 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8982 | 14 | "Address IP of Aruba controller", HFILL }}, |
8983 | | |
8984 | 14 | { &hf_dhcp_option43_arubaiap, |
8985 | 14 | { "Aruba Instant AP", "dhcp.option.vendor.arubaiap", |
8986 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8987 | 14 | "nameorg,amp-ip-address,password", HFILL }}, |
8988 | | |
8989 | 14 | { &hf_dhcp_option43_arubaiap_nameorg, |
8990 | 14 | { "Name Organisation", "dhcp.option.vendor.arubaiap.name_org", |
8991 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8992 | 14 | NULL, HFILL }}, |
8993 | | |
8994 | 14 | { &hf_dhcp_option43_arubaiap_ampip, |
8995 | 14 | { "AMP IP Address", "dhcp.option.vendor.arubaiap.amp_ip", |
8996 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8997 | 14 | "Address IP of Airwave server (AMP)", HFILL }}, |
8998 | | |
8999 | 14 | { &hf_dhcp_option43_arubaiap_password, |
9000 | 14 | { "Password", "dhcp.option.vendor.arubaiap.password", |
9001 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9002 | 14 | "Password for Instant AP Airwave server (AMP)", HFILL }}, |
9003 | | |
9004 | | |
9005 | 14 | { &hf_dhcp_option43_bsdp_suboption, |
9006 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.bsdp.suboption", |
9007 | 14 | FT_UINT8, BASE_DEC, VALS(option43_cl_suboption_vals), 0x0, |
9008 | 14 | "Option 43:BSDP Suboption", HFILL }}, |
9009 | | |
9010 | 14 | { &hf_dhcp_option43_bsdp_message_type, |
9011 | 14 | { "Message Type", "dhcp.option.vendor.bsdp.message_type", |
9012 | 14 | FT_UINT8, BASE_DEC, VALS(o43_bsdp_message_type_vals), 0x0, |
9013 | 14 | NULL, HFILL }}, |
9014 | | |
9015 | 14 | { &hf_dhcp_option43_bsdp_version, |
9016 | 14 | { "Version", "dhcp.option.vendor.bsdp.version", |
9017 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9018 | 14 | NULL, HFILL }}, |
9019 | | |
9020 | 14 | { &hf_dhcp_option43_bsdp_server_identifier, |
9021 | 14 | { "Server Identifier", "dhcp.option.vendor.bsdp.server_identifier", |
9022 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
9023 | 14 | NULL, HFILL }}, |
9024 | | |
9025 | 14 | { &hf_dhcp_option43_bsdp_server_priority, |
9026 | 14 | { "Server Priority", "dhcp.option.vendor.bsdp.server_priority", |
9027 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9028 | 14 | NULL, HFILL }}, |
9029 | | |
9030 | 14 | { &hf_dhcp_option43_bsdp_reply_port, |
9031 | 14 | { "Reply Port", "dhcp.option.vendor.bsdp.reply_port", |
9032 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9033 | 14 | NULL, HFILL }}, |
9034 | | |
9035 | 14 | { &hf_dhcp_option43_bsdp_boot_image_list_path, |
9036 | 14 | { "Boot Image List Path", "dhcp.option.vendor.bsdp.boot_image_list_path", |
9037 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9038 | 14 | NULL, HFILL }}, |
9039 | | |
9040 | 14 | { &hf_dhcp_option43_bsdp_boot_image_index, |
9041 | 14 | { "Boot Image Index", "dhcp.option.vendor.bsdp.boot_image.index", |
9042 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9043 | 14 | NULL, HFILL }}, |
9044 | | |
9045 | 14 | { &hf_dhcp_option43_bsdp_default_boot_image_id, |
9046 | 14 | { "Default Boot Image ID", "dhcp.option.vendor.bsdp.default_boot_image_id", |
9047 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9048 | 14 | NULL, HFILL }}, |
9049 | | |
9050 | 14 | { &hf_dhcp_option43_bsdp_selected_boot_image_id, |
9051 | 14 | { "Selected Boot Image ID", "dhcp.option.vendor.bsdp.selected_boot_image_id", |
9052 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9053 | 14 | NULL, HFILL }}, |
9054 | | |
9055 | 14 | { &hf_dhcp_option43_bsdp_boot_image_list, |
9056 | 14 | { "Boot Image List", "dhcp.option.vendor.bsdp.boot_image_list", |
9057 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9058 | 14 | NULL, HFILL }}, |
9059 | | |
9060 | 14 | { &hf_dhcp_option43_bsdp_image_desc, |
9061 | 14 | { "Boot Image Description", "dhcp.option.vendor.bsdp.boot_image.desc", |
9062 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9063 | 14 | NULL, HFILL }}, |
9064 | | |
9065 | 14 | { &hf_dhcp_option43_bsdp_boot_image_name_len, |
9066 | 14 | { "Boot Image Name Length", "dhcp.option.vendor.bsdp.boot_image.name_len", |
9067 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9068 | 14 | NULL, HFILL }}, |
9069 | | |
9070 | 14 | { &hf_dhcp_option43_bsdp_boot_image_name, |
9071 | 14 | { "Boot Image Name", "dhcp.option.vendor.bsdp.boot_image.name", |
9072 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9073 | 14 | NULL, HFILL }}, |
9074 | | |
9075 | 14 | { &hf_dhcp_option43_bsdp_netboot_firmware, |
9076 | 14 | { "NetBoot 1.0 Firmware", "dhcp.option.vendor.bsdp.netboot_firmware", |
9077 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
9078 | 14 | NULL, HFILL }}, |
9079 | | |
9080 | 14 | { &hf_dhcp_option43_bsdp_attributes_filter_list, |
9081 | 14 | { "Boot Image Attributes Filter List", "dhcp.option.vendor.bsdp.attributes_filter_list", |
9082 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9083 | 14 | NULL, HFILL }}, |
9084 | | |
9085 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute, |
9086 | 14 | { "Boot Image Attribute", "dhcp.option.vendor.bsdp.boot_image.attribute", |
9087 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9088 | 14 | NULL, HFILL }}, |
9089 | | |
9090 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute_install, |
9091 | 14 | { "Install", "dhcp.option.vendor.bsdp.boot_image.attribute.install", |
9092 | 14 | FT_UINT16, BASE_HEX, VALS(o43_bsdp_boot_image_install_vals), 0x8000, |
9093 | 14 | "Boot Image Attribute Install", HFILL }}, |
9094 | | |
9095 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute_kind, |
9096 | 14 | { "Kind", "dhcp.option.vendor.bsdp.boot_image.attribute.kind", |
9097 | 14 | FT_UINT16, BASE_HEX, VALS(o43_bsdp_boot_image_kind_vals), 0x7f00, |
9098 | 14 | "Boot Image Attribute Kind", HFILL }}, |
9099 | | |
9100 | 14 | { &hf_dhcp_option43_bsdp_boot_image_attribute_reserved, |
9101 | 14 | { "Reserved", "dhcp.option.vendor.bsdp.boot_image.attribute.reserved", |
9102 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00ff, |
9103 | 14 | "Boot Image Attribute Reserved", HFILL }}, |
9104 | | |
9105 | 14 | { &hf_dhcp_option43_bsdp_message_size, |
9106 | 14 | { "Message Size", "dhcp.option.vendor.bsdp.message_size", |
9107 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9108 | 14 | NULL, HFILL }}, |
9109 | | |
9110 | | |
9111 | 14 | { &hf_dhcp_option_netbios_over_tcpip_name_server, |
9112 | 14 | { "NetBIOS over TCP/IP Name Server", "dhcp.option.netbios_over_tcpip_name_server", |
9113 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9114 | 14 | "Option 44: NetBIOS over TCP/IP Name Server", HFILL }}, |
9115 | | |
9116 | 14 | { &hf_dhcp_option_netbios_over_tcpip_dd_name_server, |
9117 | 14 | { "NetBIOS over TCP/IP Datagram Distribution Name Server", "dhcp.option.netbios_over_tcpip_dd_name_server", |
9118 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9119 | 14 | "Option 45: NetBIOS over TCP/IP Datagram Distribution Name Server", HFILL }}, |
9120 | | |
9121 | 14 | { &hf_dhcp_option_netbios_over_tcpip_node_type, |
9122 | 14 | { "NetBIOS over TCP/IP Node Type", "dhcp.option.netbios_over_tcpip_node_type", |
9123 | 14 | FT_UINT8, BASE_DEC, VALS(dhcp_nbnt_vals), 0x0, |
9124 | 14 | "Option 46: NetBIOS over TCP/IP Node Type", HFILL }}, |
9125 | | |
9126 | 14 | { &hf_dhcp_option_netbios_over_tcpip_scope, |
9127 | 14 | { "NetBIOS over TCP/IP Scope", "dhcp.option.netbios_over_tcpip_scope", |
9128 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9129 | 14 | "Option 47: NetBIOS over TCP/IP Scope", HFILL }}, |
9130 | | |
9131 | 14 | { &hf_dhcp_option_xwindows_system_font_server, |
9132 | 14 | { "X Window System Font Server", "dhcp.option.xwindows_system_font_server", |
9133 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9134 | 14 | "Option 48: X Window System Font Server", HFILL }}, |
9135 | | |
9136 | 14 | { &hf_dhcp_option_xwindows_system_display_manager, |
9137 | 14 | { "X Window System Display Manager", "dhcp.option.xwindows_system_display_manager", |
9138 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9139 | 14 | "Option 49: X Window System Display Manager", HFILL }}, |
9140 | | |
9141 | 14 | { &hf_dhcp_option_requested_ip_address, |
9142 | 14 | { "Requested IP Address", "dhcp.option.requested_ip_address", |
9143 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9144 | 14 | "Option 50: Requested IP Address", HFILL }}, |
9145 | | |
9146 | 14 | { &hf_dhcp_option_ip_address_lease_time, |
9147 | 14 | { "IP Address Lease Time", "dhcp.option.ip_address_lease_time", |
9148 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9149 | 14 | "Option 51: IP Address Lease Time", HFILL }}, |
9150 | | |
9151 | 14 | { &hf_dhcp_option_option_overload, |
9152 | 14 | { "Option Overload", "dhcp.option.option_overload", |
9153 | 14 | FT_UINT8, BASE_DEC, VALS(opt_overload_vals), 0x0, |
9154 | 14 | "Option 52: Option Overload", HFILL }}, |
9155 | | |
9156 | 14 | { &hf_dhcp_option_dhcp, |
9157 | 14 | { "DHCP", "dhcp.option.dhcp", |
9158 | 14 | FT_UINT8, BASE_DEC, VALS(opt53_text), 0x0, |
9159 | 14 | "Option 53: DHCP option", HFILL }}, |
9160 | | |
9161 | 14 | { &hf_dhcp_option_dhcp_server_id, |
9162 | 14 | { "DHCP Server Identifier", "dhcp.option.dhcp_server_id", |
9163 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9164 | 14 | "Option 54: DHCP Server Identifier", HFILL }}, |
9165 | | |
9166 | 14 | { &hf_dhcp_option_parameter_request_list_item, |
9167 | 14 | { "Parameter Request List Item", "dhcp.option.request_list_item", |
9168 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9169 | 14 | "Option 55: Parameter Request List Item", HFILL }}, |
9170 | | |
9171 | 14 | { &hf_dhcp_option_message, |
9172 | 14 | { "Message", "dhcp.option.message", |
9173 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9174 | 14 | "Option 56: Option message", HFILL }}, |
9175 | | |
9176 | 14 | { &hf_dhcp_option_dhcp_max_message_size, |
9177 | 14 | { "Maximum DHCP Message Size", "dhcp.option.dhcp_max_message_size", |
9178 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9179 | 14 | "Option 57: Maximum DHCP Message Size", HFILL }}, |
9180 | | |
9181 | 14 | { &hf_dhcp_option_renewal_time_value, |
9182 | 14 | { "Renewal Time Value", "dhcp.option.renewal_time_value", |
9183 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9184 | 14 | "Option 58: Renewal Time Value", HFILL }}, |
9185 | | |
9186 | 14 | { &hf_dhcp_option_rebinding_time_value, |
9187 | 14 | { "Rebinding Time Value", "dhcp.option.rebinding_time_value", |
9188 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9189 | 14 | "Option 59: Rebinding Time Value", HFILL }}, |
9190 | | |
9191 | 14 | { &hf_dhcp_option_vendor_class_id, |
9192 | 14 | { "Vendor class identifier", "dhcp.option.vendor_class_id", |
9193 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9194 | 14 | "Option 60: Vendor class identifier", HFILL }}, |
9195 | | |
9196 | 14 | { &hf_dhcp_option_vendor_class_data, |
9197 | 14 | { "vendor-class-data", "dhcp.option.vendor_class_data", |
9198 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9199 | 14 | "Option 60: Vendor class data", HFILL }}, |
9200 | | |
9201 | 14 | { &hf_dhcp_option_novell_netware_ip_domain, |
9202 | 14 | { "Novell/Netware IP domain", "dhcp.option.novell_netware_ip_domain", |
9203 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9204 | 14 | "Option 62: Novell/Netware IP domain", HFILL }}, |
9205 | | |
9206 | 14 | { &hf_dhcp_option63_suboption, |
9207 | 14 | { "Option 63 Suboption", "dhcp.option.novell_options.suboption", |
9208 | 14 | FT_UINT8, BASE_DEC, VALS(option63_suboption_vals), 0x0, |
9209 | 14 | "Option 63: Suboption", HFILL }}, |
9210 | | |
9211 | 14 | { &hf_dhcp_option63_value, |
9212 | 14 | { "Value", "dhcp.option.novell_options.value", |
9213 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9214 | 14 | "Option 63: Suboption value", HFILL }}, |
9215 | | |
9216 | 14 | { &hf_dhcp_option63_value_8, |
9217 | 14 | { "Value", "dhcp.option.novell_options.value.uint", |
9218 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9219 | 14 | "Option 63: Suboption 8-bit value", HFILL }}, |
9220 | | |
9221 | 14 | { &hf_dhcp_option63_value_ip_address, |
9222 | 14 | { "Value", "dhcp.option.novell_options.value.address", |
9223 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9224 | 14 | "Option 63: Suboption IP address", HFILL }}, |
9225 | | |
9226 | 14 | { &hf_dhcp_option63_value_boolean, |
9227 | 14 | { "Value", "dhcp.option.novell_options.value.bool", |
9228 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x00, |
9229 | 14 | "Option 63: Suboption Boolean value", HFILL }}, |
9230 | | |
9231 | 14 | { &hf_dhcp_option63_broadcast, |
9232 | 14 | { "Broadcast for nearest Netware server", "dhcp.option.novell_options.broadcast", |
9233 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
9234 | 14 | "Option 63:5 Broadcast for nearest Netware server", HFILL }}, |
9235 | | |
9236 | 14 | { &hf_dhcp_option63_preferred_dss_server, |
9237 | 14 | { "Preferred DSS server", "dhcp.option.novell_options.preferred_dss_server", |
9238 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9239 | 14 | "Option 63:6 Preferred DSS server", HFILL }}, |
9240 | | |
9241 | 14 | { &hf_dhcp_option63_nearest_nwip_server, |
9242 | 14 | { "Nearest NWIP server", "dhcp.option.novell_options.nearest_nwip_server", |
9243 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9244 | 14 | "Option 63:7 Nearest NWIP server", HFILL }}, |
9245 | | |
9246 | 14 | { &hf_dhcp_option63_autoretries, |
9247 | 14 | { "Autoretries", "dhcp.option.novell_options.autoretries", |
9248 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9249 | 14 | "Option 63:8 Autoretries", HFILL }}, |
9250 | | |
9251 | 14 | { &hf_dhcp_option63_autoretry_delay, |
9252 | 14 | { "Autoretry delay, sec", |
9253 | 14 | "dhcp.option.novell_options.autoretry_delay", FT_UINT8, BASE_DEC, NULL, |
9254 | 14 | 0x0, "Option 63:9 Autoretry delay, sec", HFILL }}, |
9255 | | |
9256 | 14 | { &hf_dhcp_option63_support_netware_v1_1, |
9257 | 14 | { "Broadcast for nearest Netware server", "dhcp.option.novell_options.support_netware_v1_1", |
9258 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x00, |
9259 | 14 | "Option 63:10 Broadcast for nearest Netware server", HFILL }}, |
9260 | | |
9261 | 14 | { &hf_dhcp_option63_primary_dss, |
9262 | 14 | { "Primary DSS", "dhcp.option.novell_options.primary_dss", |
9263 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9264 | 14 | "Option 63:11 Primary DSS", HFILL }}, |
9265 | | |
9266 | | |
9267 | 14 | { &hf_dhcp_option_nis_plus_domain, |
9268 | 14 | { "Network Information Service+ Domain", "dhcp.option.nis_plus_domain", |
9269 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9270 | 14 | "Option 64: Network Information Service+ Domain", HFILL }}, |
9271 | | |
9272 | 14 | { &hf_dhcp_option_nis_plus_server, |
9273 | 14 | { "Network Information Service+ Server", "dhcp.option.nis_plus_server", |
9274 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9275 | 14 | "Option 65: Network Information Service+ Server", HFILL }}, |
9276 | | |
9277 | 14 | { &hf_dhcp_option_tftp_server_name, |
9278 | 14 | { "TFTP Server Name", "dhcp.option.tftp_server_name", |
9279 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9280 | 14 | "Option 66: TFTP Server Name", HFILL }}, |
9281 | | |
9282 | 14 | { &hf_dhcp_option_bootfile_name, |
9283 | 14 | { "Bootfile name", "dhcp.option.bootfile_name", |
9284 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9285 | 14 | "Option 67: Bootfile name", HFILL }}, |
9286 | | |
9287 | 14 | { &hf_dhcp_option_mobile_ip_home_agent, |
9288 | 14 | { "Mobile IP Home Agent", "dhcp.option.mobile_ip_home_agent", |
9289 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9290 | 14 | "Option 68: Mobile IP Home Agent", HFILL }}, |
9291 | | |
9292 | 14 | { &hf_dhcp_option_smtp_server, |
9293 | 14 | { "SMTP Server", "dhcp.option.smtp_server", |
9294 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9295 | 14 | "Option 69: SMTP Server", HFILL }}, |
9296 | | |
9297 | 14 | { &hf_dhcp_option_pop3_server, |
9298 | 14 | { "POP3 Server", "dhcp.option.pop3_server", |
9299 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9300 | 14 | "Option 70: POP3 Server", HFILL }}, |
9301 | | |
9302 | 14 | { &hf_dhcp_option_nntp_server, |
9303 | 14 | { "NNTP Server", "dhcp.option.nntp_server", |
9304 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9305 | 14 | "Option 71: NNTP Server", HFILL }}, |
9306 | | |
9307 | 14 | { &hf_dhcp_option_default_www_server, |
9308 | 14 | { "Default WWW Server", "dhcp.option.default_www_server", |
9309 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9310 | 14 | "Option 72: Default WWW Server", HFILL }}, |
9311 | | |
9312 | 14 | { &hf_dhcp_option_default_finger_server, |
9313 | 14 | { "Default Finger Server", "dhcp.option.default_finger_server", |
9314 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9315 | 14 | "Option 73: Default Finger Server", HFILL }}, |
9316 | | |
9317 | 14 | { &hf_dhcp_option_default_irc_server, |
9318 | 14 | { "Default IRC Server", "dhcp.option.default_irc_server", |
9319 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9320 | 14 | "Option 74: Default IRC Server", HFILL }}, |
9321 | | |
9322 | 14 | { &hf_dhcp_option_streettalk_server, |
9323 | 14 | { "StreetTalk Server", "dhcp.option.streettalk_server", |
9324 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9325 | 14 | "Option 75: StreetTalk Server", HFILL }}, |
9326 | | |
9327 | 14 | { &hf_dhcp_option_streettalk_da_server, |
9328 | 14 | { "StreetTalk Directory Assistance Server", "dhcp.option.streettalk_da_server", |
9329 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9330 | 14 | "Option 76: StreetTalk Directory Assistance Server", HFILL }}, |
9331 | | |
9332 | 14 | { &hf_dhcp_option77_user_class, |
9333 | 14 | { "Instance of User Class", "dhcp.option.user_class", |
9334 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9335 | 14 | NULL, HFILL }}, |
9336 | | |
9337 | 14 | { &hf_dhcp_option77_user_class_length, |
9338 | 14 | { "User Class Length", "dhcp.option.user_class.length", |
9339 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9340 | 14 | "Length of User Class Instance", HFILL }}, |
9341 | | |
9342 | 14 | { &hf_dhcp_option77_user_class_data, |
9343 | 14 | { "User Class Data", "dhcp.option.user_class.data", |
9344 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9345 | 14 | "Data of User Class Instance", HFILL }}, |
9346 | | |
9347 | 14 | { &hf_dhcp_option77_user_class_text, |
9348 | 14 | { "User Class Data (Text)", "dhcp.option.user_class.text", |
9349 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9350 | 14 | "Text of User Class Instance", HFILL }}, |
9351 | | |
9352 | 14 | { &hf_dhcp_option77_user_class_binary_data_length, |
9353 | 14 | { "User Class Binary Data Length", "dhcp.option.user_class_binary_data_length", |
9354 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9355 | 14 | "Length of User Class Binary Data (Microsoft)", HFILL }}, |
9356 | | |
9357 | 14 | { &hf_dhcp_option77_user_class_binary_data, |
9358 | 14 | { "User Class Binary Data", "dhcp.option.user_class_binary_data", |
9359 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9360 | 14 | "User Class Binary Data (Microsoft)", HFILL }}, |
9361 | | |
9362 | 14 | { &hf_dhcp_option77_user_class_padding, |
9363 | 14 | { "User Class padding", "dhcp.option.user_class_padding", |
9364 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9365 | 14 | "User Class padding (Microsoft)", HFILL }}, |
9366 | | |
9367 | 14 | { &hf_dhcp_option77_user_class_name_length, |
9368 | 14 | { "User Class Name Length", "dhcp.option.user_class_name_length", |
9369 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9370 | 14 | "Length of User Class Name (Microsoft)", HFILL }}, |
9371 | | |
9372 | 14 | { &hf_dhcp_option77_user_class_name, |
9373 | 14 | { "User Class Name", "dhcp.option.user_class_name", |
9374 | 14 | FT_STRINGZPAD, BASE_NONE, NULL, 0x0, |
9375 | 14 | "User Class Name (Microsoft)", HFILL }}, |
9376 | | |
9377 | 14 | { &hf_dhcp_option77_user_class_description_length, |
9378 | 14 | { "User Class Description Length", "dhcp.option.user_class_description_length", |
9379 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9380 | 14 | "Length of User Class Description (Microsoft)", HFILL }}, |
9381 | | |
9382 | 14 | { &hf_dhcp_option77_user_class_description, |
9383 | 14 | { "User Class Description", "dhcp.option.user_class_description", |
9384 | 14 | FT_STRINGZPAD, BASE_NONE, NULL, 0x0, |
9385 | 14 | "User Class Description (Microsoft)", HFILL }}, |
9386 | | |
9387 | 14 | { &hf_dhcp_option_slp_directory_agent_value, |
9388 | 14 | { "Value", "dhcp.option.slp_directory_agent.value", |
9389 | 14 | FT_UINT8, BASE_DEC, VALS(slpda_vals), 0x0, |
9390 | 14 | "Option 78: SLPDA Value", HFILL }}, |
9391 | | |
9392 | 14 | { &hf_dhcp_option_slp_directory_agent_slpda_address, |
9393 | 14 | { "IP Address", "dhcp.option.slp_directory_agent.slpda_address", |
9394 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9395 | 14 | "Option 78: SLPDA Address", HFILL }}, |
9396 | | |
9397 | 14 | { &hf_dhcp_option_slp_service_scope_value, |
9398 | 14 | { "Value", "dhcp.option.slp_service_scope.value", |
9399 | 14 | FT_UINT8, BASE_DEC, VALS(slp_scope_vals), 0x0, |
9400 | 14 | "Option 79: SLP Service Scope Value", HFILL }}, |
9401 | | |
9402 | 14 | { &hf_dhcp_option_slp_service_scope_string, |
9403 | 14 | { "SLP Service Scope", "dhcp.option.slp_service_scope.string", |
9404 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9405 | 14 | "Option 79: SLP Service Scope", HFILL }}, |
9406 | | |
9407 | | |
9408 | 14 | { &hf_dhcp_option82_suboption, |
9409 | 14 | { "Option 82 Suboption", "dhcp.option.agent_information_option.suboption", |
9410 | 14 | FT_UINT8, BASE_DEC, VALS(option82_suboption_vals), 0x0, |
9411 | 14 | "Option 82: Suboption", HFILL }}, |
9412 | | |
9413 | 14 | { &hf_dhcp_option82_value, |
9414 | 14 | { "Value", "dhcp.option.agent_information_option.value", |
9415 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9416 | 14 | "Option 82: Suboption value", HFILL }}, |
9417 | | |
9418 | 14 | { &hf_dhcp_option82_value_8, |
9419 | 14 | { "Value", "dhcp.option.agent_information_option.value.uint", |
9420 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9421 | 14 | "Option 82: Suboption 8-bit value", HFILL }}, |
9422 | | |
9423 | 14 | { &hf_dhcp_option82_value_16, |
9424 | 14 | { "Value", "dhcp.option.agent_information_option.value.uint", |
9425 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
9426 | 14 | "Option 162: Suboption 16-bit value", HFILL }}, |
9427 | | |
9428 | 14 | { &hf_dhcp_option82_value_32, |
9429 | 14 | { "Value", "dhcp.option.agent_information_option.value.uint", |
9430 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9431 | 14 | "Option 82: Suboption 32-bit value", HFILL }}, |
9432 | | |
9433 | 14 | { &hf_dhcp_option82_value_ip_address, |
9434 | 14 | { "Value", "dhcp.option.agent_information_option.value.address", |
9435 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9436 | 14 | "Option 82: Suboption IP address", HFILL }}, |
9437 | | |
9438 | 14 | { &hf_dhcp_option82_value_stringz, |
9439 | 14 | { "Value", "dhcp.option.agent_information_option.value.string", |
9440 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9441 | 14 | "Option 82: Suboption Z-String value", HFILL }}, |
9442 | | |
9443 | 14 | { &hf_dhcp_option82_padding, |
9444 | 14 | { "Padding", "dhcp.option.agent_information_option.padding", |
9445 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9446 | 14 | "Option 82:0 Padding", HFILL }}, |
9447 | | |
9448 | 14 | { &hf_dhcp_option82_agent_circuit_id, |
9449 | 14 | { "Agent Circuit ID", "dhcp.option.agent_information_option.agent_circuit_id", |
9450 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9451 | 14 | "Option 82:1 Agent Circuit ID", HFILL }}, |
9452 | | |
9453 | 14 | { &hf_dhcp_option82_agent_remote_id, |
9454 | 14 | { "Agent Remote ID", "dhcp.option.agent_information_option.agent_remote_id", |
9455 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9456 | 14 | "Option 82:2 Agent Remote ID", HFILL }}, |
9457 | | |
9458 | 14 | { &hf_dhcp_option82_reserved, |
9459 | 14 | { "Reserved", "dhcp.option.agent_information_option.reserved", |
9460 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9461 | 14 | "Option 82:3 Reserved", HFILL }}, |
9462 | | |
9463 | 14 | { &hf_dhcp_option82_docsis_device_class, |
9464 | 14 | { "DOCSIS Device Class", "dhcp.option.agent_information_option.docsis_device_class", |
9465 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9466 | 14 | "Option 82:4 DOCSIS Device Class", HFILL }}, |
9467 | | |
9468 | 14 | { &hf_dhcp_option82_link_selection, |
9469 | 14 | { "Link selection", "dhcp.option.agent_information_option.link_selection", |
9470 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9471 | 14 | "Option 82:5 Link selection", HFILL }}, |
9472 | | |
9473 | 14 | { &hf_dhcp_option82_subscriber_id, |
9474 | 14 | { "Subscriber ID", "dhcp.option.agent_information_option.subscriber_id", |
9475 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9476 | 14 | "Option 82:6 Subscriber ID", HFILL }}, |
9477 | | |
9478 | 14 | { &hf_dhcp_option82_radius_attributes, |
9479 | 14 | { "RADIUS Attributes", "dhcp.option.agent_information_option.radius_attributes", |
9480 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9481 | 14 | "Option 82:7 RADIUS Attributes", HFILL }}, |
9482 | | |
9483 | 14 | { &hf_dhcp_option82_authentication, |
9484 | 14 | { "Authentication", "dhcp.option.agent_information_option.authentication", |
9485 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9486 | 14 | "Option 82:8 Authentication", HFILL }}, |
9487 | | |
9488 | 14 | { &hf_dhcp_option82_vi, |
9489 | 14 | { "Vendor-Specific Information", "dhcp.option.agent_information_option.vi", |
9490 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9491 | 14 | "Option 82:9 Vendor-Specific Information", HFILL }}, |
9492 | | |
9493 | 14 | { &hf_dhcp_option82_vi_enterprise, |
9494 | 14 | { "Enterprise", "dhcp.option.agent_information_option.vi.enterprise", |
9495 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, |
9496 | 14 | "Option 82:9 VI Enterprise", HFILL }}, |
9497 | | |
9498 | 14 | { &hf_dhcp_option82_vi_data_length, |
9499 | 14 | { "Data Length", "dhcp.option.agent_information_option.vi.data_length", |
9500 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9501 | 14 | "Option 82:9 VI Data Length", HFILL }}, |
9502 | | |
9503 | 14 | { &hf_dhcp_option82_vi_cl_option, |
9504 | 14 | { "Option", "dhcp.option.agent_information_option.vi.cl.option", |
9505 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9506 | 14 | "Option 82:9 VI CL Option", HFILL }}, |
9507 | | |
9508 | 14 | { &hf_dhcp_option82_vi_cl_option_length, |
9509 | 14 | { "Option Length", "dhcp.option.agent_information_option.vi.cl.option_length", |
9510 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9511 | 14 | "Option 82:9 VI CL Option Length", HFILL }}, |
9512 | | |
9513 | 14 | { &hf_dhcp_option82_vi_cl_tag, |
9514 | 14 | { "Tag", "dhcp.option.agent_information_option.vi.cl.tag", |
9515 | 14 | FT_UINT8, BASE_DEC, VALS(option82_cl_tag_vals), 0x0, |
9516 | 14 | "Option 82:9 VI CL Tag", HFILL }}, |
9517 | | |
9518 | 14 | { &hf_dhcp_option82_vi_cl_tag_length, |
9519 | 14 | { "Tag Length", "dhcp.option.agent_information_option.vi.cl.tag_length", |
9520 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9521 | 14 | "Option 82:9 VI CL Tag Length", HFILL }}, |
9522 | | |
9523 | 14 | { &hf_dhcp_option82_vi_cl_docsis_version, |
9524 | 14 | { "DOCSIS Version Number", "dhcp.option.agent_information_option.vi.cl.docsis_version", |
9525 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9526 | 14 | "Option 82:9 VI CL DOCSIS Version Number", HFILL }}, |
9527 | | |
9528 | 14 | { &hf_dhcp_option82_vi_cl_dpoe_system_version, |
9529 | 14 | { "DPoE System Version Number", "dhcp.option.agent_information_option.vi.cl.dpoe_system_version", |
9530 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9531 | 14 | "Option 82:9 VI CL DPoE System Version Number", HFILL }}, |
9532 | | |
9533 | 14 | { &hf_dhcp_option82_vi_cl_dpoe_system_pbb_service, |
9534 | 14 | { "DPoE System PBB Service", "dhcp.option.agent_information_option.vi.cl.dpoe_system_pbb_service", |
9535 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9536 | 14 | "Option 82:9 VI CL DPoE System PBB Service", HFILL }}, |
9537 | | |
9538 | 14 | { &hf_dhcp_option82_vi_cl_service_class_name, |
9539 | 14 | { "Service Class Name", "dhcp.option.agent_information_option.vi.cl.service_class_name", |
9540 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9541 | 14 | "Option 82:9 VI CL Service Class Name", HFILL }}, |
9542 | | |
9543 | 14 | { &hf_dhcp_option82_vi_cl_mso_defined_text, |
9544 | 14 | { "MSO Defined Text", "dhcp.option.agent_information_option.vi.cl.mso_defined_text", |
9545 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9546 | 14 | "Option 82:9 VI CL MSO Defined Text", HFILL }}, |
9547 | | |
9548 | 14 | { &hf_dhcp_option82_vi_cl_secure_file_transfer_uri, |
9549 | 14 | { "Secure File Transfer URI", "dhcp.option.agent_information_option.vi.cl.secure_file_transfer_uri", |
9550 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9551 | 14 | "Option 82:9 VI CL Secure File Transfer URI", HFILL }}, |
9552 | | |
9553 | 14 | { &hf_dhcp_option82_flags, |
9554 | 14 | { "Flags", "dhcp.option.agent_information_option.flags", |
9555 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0, |
9556 | 14 | "Option 82:10 Flags", HFILL }}, |
9557 | | |
9558 | 14 | { &hf_dhcp_option82_server_id_override, |
9559 | 14 | { "Server ID Override", "dhcp.option.agent_information_option.server_id_override", |
9560 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9561 | 14 | "Option 82:11 Server ID Override", HFILL }}, |
9562 | | |
9563 | 14 | { &hf_dhcp_option82_relay_agent_id, |
9564 | 14 | { "Relay Agent Identifier", "dhcp.option.agent_information_option.relay_agent_id", |
9565 | 14 | FT_BYTES, BASE_NONE, NULL, 0x00, |
9566 | 14 | "Option 82:12 Relay Agent Identifier", HFILL }}, |
9567 | | |
9568 | 14 | { &hf_dhcp_option82_option_ani_att, |
9569 | 14 | { "Access Technology Type", "dhcp.option.agent_information_option.ani_att", |
9570 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9571 | 14 | "Option 82:13 Access Technology Type", HFILL }}, |
9572 | | |
9573 | 14 | { &hf_dhcp_option82_option_ani_att_res, |
9574 | 14 | { "Access Technology Type", "dhcp.option.agent_information_option.ani_att.res", |
9575 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9576 | 14 | "Option 82:13 Access Technology Type Reserved", HFILL }}, |
9577 | | |
9578 | 14 | { &hf_dhcp_option82_option_ani_att_att, |
9579 | 14 | { "Access Technology Type", "dhcp.option.agent_information_option.ani_att.att", |
9580 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9581 | 14 | "Option 82:13 Access Technology Type Value", HFILL }}, |
9582 | | |
9583 | 14 | { &hf_dhcp_option82_option_ani_network_name, |
9584 | 14 | { "Access Network Name", "dhcp.option.agent_information_option.ani_network_name", |
9585 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9586 | 14 | "Option 82:14 Access Network Name", HFILL }}, |
9587 | | |
9588 | 14 | { &hf_dhcp_option82_option_ani_ap_name, |
9589 | 14 | { "Access Point Name", "dhcp.option.agent_information_option.ani_ap_name", |
9590 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9591 | 14 | "Option 82:15 Access Point Name", HFILL }}, |
9592 | | |
9593 | 14 | { &hf_dhcp_option82_option_ani_ap_bssid, |
9594 | 14 | { "Access Point BSSID", "dhcp.option.agent_information_option.ani_ap_bssid", |
9595 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
9596 | 14 | "Option 82:16 Access Point BSSID", HFILL }}, |
9597 | | |
9598 | 14 | { &hf_dhcp_option82_option_ani_operator_id, |
9599 | 14 | { "Access Network Operator ID", "dhcp.option.agent_information_option.ani_operator_id", |
9600 | 14 | FT_BYTES, BASE_NONE, NULL, 0x00, |
9601 | 14 | "Option 82:17 Access Network Operator ID", HFILL }}, |
9602 | | |
9603 | 14 | { &hf_dhcp_option82_option_ani_operator_realm, |
9604 | 14 | { "Access Network Operator Realm", "dhcp.option.agent_information_option.ani_operator_realm", |
9605 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9606 | 14 | "Option 82:18 Access Network Operator Realm", HFILL }}, |
9607 | | |
9608 | 14 | { &hf_dhcp_option82_option_source_port, |
9609 | 14 | { "Source Port", "dhcp.option.agent_information_option.source_port", |
9610 | 14 | FT_NONE, BASE_NONE, NULL, 0x00, |
9611 | 14 | "Option 82:19 Source Port", HFILL }}, |
9612 | | |
9613 | 14 | { &hf_dhcp_option82_link_selection_cisco, |
9614 | 14 | { "Link selection (Cisco proprietary)", "dhcp.option.agent_information_option.link_selection_cisco", |
9615 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9616 | 14 | "Option 82:150 Link selection (Cisco proprietary)", HFILL }}, |
9617 | | |
9618 | 14 | { &hf_dhcp_option82_vrf_name_vpn_id, |
9619 | 14 | { "VRF name/VPN ID", "dhcp.option.agent_information_option.vrf_name.vpn_id", |
9620 | 14 | FT_BYTES, BASE_NONE, NULL, 0x00, |
9621 | 14 | "Option 82:151 VRF name/VPN ID", HFILL }}, |
9622 | | |
9623 | 14 | { &hf_dhcp_option82_vrf_name_global, |
9624 | 14 | { "Global, default VPN", "dhcp.option.agent_information_option.vrf_name.global", |
9625 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
9626 | 14 | "Option 82:151 Global, default VPN", HFILL }}, |
9627 | | |
9628 | 14 | { &hf_dhcp_option82_vrf_name, |
9629 | 14 | { "VRF name", "dhcp.option.agent_information_option.vrf_name", |
9630 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
9631 | 14 | "Option 82:151 VRF name", HFILL }}, |
9632 | | |
9633 | 14 | { &hf_dhcp_option82_vrf_name_vpn_id_oui, |
9634 | 14 | { "VRF name/VPN ID OUI", "dhcp.option.agent_information_option.vrf_name.vpn_id.oui", |
9635 | 14 | FT_UINT24, BASE_HEX, NULL, 0x00, |
9636 | 14 | "Option 82:151 VRF name/VPN ID OUI", HFILL }}, |
9637 | | |
9638 | 14 | { &hf_dhcp_option82_vrf_name_vpn_id_index, |
9639 | 14 | { "VRF name/VPN ID Index", "dhcp.option.agent_information_option.vrf_name.vpn_id.index", |
9640 | 14 | FT_UINT32, BASE_HEX, NULL, 0x00, |
9641 | 14 | "Option 82:151 VRF name/VPN ID Index", HFILL }}, |
9642 | | |
9643 | 14 | { &hf_dhcp_option82_server_id_override_cisco, |
9644 | 14 | { "Server ID Override (Cisco proprietary)", "dhcp.option.agent_information_option.server_id_override_cisco", |
9645 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9646 | 14 | "Option 82:152 Server ID Override (Cisco proprietary)", HFILL }}, |
9647 | | |
9648 | | |
9649 | 14 | { &hf_dhcp_option_isns_functions, |
9650 | 14 | { "iSNS Functions", "dhcp.option.isns.functions", |
9651 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00, |
9652 | 14 | "iSNS: the functions supported by the iSNS servers", HFILL }}, |
9653 | | |
9654 | 14 | { &hf_dhcp_option_isns_functions_enabled, |
9655 | 14 | { "Function Fields Enabled", "dhcp.option.isns.functions.enabled", |
9656 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_FUNCTIONS_ENABLED, |
9657 | 14 | "If set to zero, then the contents of all other iSNS Function fields MUST be ignored", HFILL }}, |
9658 | | |
9659 | 14 | { &hf_dhcp_option_isns_functions_dd_authorization, |
9660 | 14 | { "Discovery Domain based Authorization", "dhcp.option.isns.functions.dd_base_authorization", |
9661 | 14 | FT_BOOLEAN, 16, TFS(&tfs_isns_function_dd_based_auth), F_ISNS_FUNCTIONS_DD_AUTH, |
9662 | 14 | "If set to zero, then access authorization must be explicitly performed by each device", HFILL }}, |
9663 | | |
9664 | 14 | { &hf_dhcp_option_isns_functions_sec_policy_distibution, |
9665 | 14 | { "Security Policy Distribution", "dhcp.option.isns.functions.sec_policy_distribution", |
9666 | 14 | FT_BOOLEAN, 16, TFS(&tfs_isns_functions_sec_distrib), F_ISNS_FUNCTIONS_SEC_POLICY, |
9667 | 14 | NULL, HFILL }}, |
9668 | | |
9669 | 14 | { &hf_dhcp_option_isns_functions_reserved, |
9670 | 14 | { "Reserved flags", "dhcp.option.isns.functions.reserved", |
9671 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_FUNCTIONS_RESERVED, |
9672 | 14 | NULL, HFILL }}, |
9673 | | |
9674 | 14 | { &hf_dhcp_option_isns_discovery_domain_access, |
9675 | 14 | { "Discovery Domain Access flags", "dhcp.option.isns.discovery_domain_access", |
9676 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00, |
9677 | 14 | "iSNS: the types of iSNS clients that are allowed to modify Discovery Domains", HFILL }}, |
9678 | | |
9679 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_enabled, |
9680 | 14 | { "Discovery Domain Enabled", "dhcp.option.isns.discovery_domain_access.enabled", |
9681 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ENABLED, |
9682 | 14 | "If set to zero, then the contents of the remainder of this field MUST be ignored", HFILL }}, |
9683 | | |
9684 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_control_node, |
9685 | 14 | { "Control Node", "dhcp.option.isns.discovery_domain_access_control.node", |
9686 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_CTRL_NODE, |
9687 | 14 | NULL, HFILL }}, |
9688 | | |
9689 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_iscsi_target, |
9690 | 14 | { "iSCSI Target", "dhcp.option.isns.discovery_domain_access.iscsi_target", |
9691 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ISCSI_TARGET, |
9692 | 14 | NULL, HFILL }}, |
9693 | | |
9694 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_iscsi_inititator, |
9695 | 14 | { "iSCSI Initiator", "dhcp.option.isns.discovery_domain_access.iscsi_initiator", |
9696 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_ISCSI_INITIATOR, |
9697 | 14 | NULL, HFILL }}, |
9698 | | |
9699 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_ifcp_target_port, |
9700 | 14 | { "iFCP Target Port", "dhcp.option.isns.discovery_domain_access.ifcp_target_port", |
9701 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_IFCP_TARGET_PORT, |
9702 | 14 | NULL, HFILL }}, |
9703 | | |
9704 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_ifcp_initiator_port, |
9705 | 14 | { "iFCP Initiator Port", "dhcp.option.isns.discovery_domain_access.initiator_target_port", |
9706 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_DD_ACCESS_IFCP_INITIATOR_PORT, |
9707 | 14 | NULL, HFILL }}, |
9708 | | |
9709 | 14 | { &hf_dhcp_option_isns_discovery_domain_access_reserved, |
9710 | 14 | { "Reserved Flags", "dhcp.option.isns.discovery_domain_access.reserved", |
9711 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_DD_ACCESS_RESERVED, |
9712 | 14 | NULL, HFILL }}, |
9713 | | |
9714 | 14 | { &hf_dhcp_option_isns_administrative_flags, |
9715 | 14 | { "Administrative Flags", "dhcp.option.isns.administrative_flags", |
9716 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00, |
9717 | 14 | "iSNS: administrative settings for the iSNS servers discovered through the DHCP query", HFILL }}, |
9718 | | |
9719 | 14 | { &hf_dhcp_option_isns_administrative_flags_enabled, |
9720 | 14 | { "Administrative Flags Enabled", "dhcp.option.isns.administrative_flags.enabled", |
9721 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_ENABLED, |
9722 | 14 | NULL, HFILL }}, |
9723 | | |
9724 | 14 | { &hf_dhcp_option_isns_administrative_flags_heartbeat, |
9725 | 14 | { "Heartbeat", "dhcp.option.isns.administrative_flags.heartbeat", |
9726 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_HEARTBEAT, |
9727 | 14 | NULL, HFILL }}, |
9728 | | |
9729 | 14 | { &hf_dhcp_option_isns_administrative_flags_management_scns, |
9730 | 14 | { "Management SCNs", "dhcp.option.isns.administrative_flags.management_scns", |
9731 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_MANAGEMENT_SCNS, |
9732 | 14 | NULL, HFILL }}, |
9733 | | |
9734 | 14 | { &hf_dhcp_option_isns_administrative_flags_default_dd, |
9735 | 14 | { "Default Discovery Domain", "dhcp.option.isns.administrative_flags.default_discovery_domain", |
9736 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_ADMIN_FLAGS_DEFAULT_DD, |
9737 | 14 | NULL, HFILL }}, |
9738 | | |
9739 | 14 | { &hf_dhcp_option_isns_administrative_flags_reserved, |
9740 | 14 | { "Reserved Flags", "dhcp.option.isns.administrative_flags.reserved", |
9741 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_ADMIN_FLAGS_RESERVED, |
9742 | 14 | NULL, HFILL }}, |
9743 | | |
9744 | 14 | { &hf_dhcp_option_isns_server_security_bitmap, |
9745 | 14 | { "iSNS Server Security Bitmap", "dhcp.option.isns.server_security_bitmap", |
9746 | 14 | FT_UINT32, BASE_HEX, NULL, 0x00, |
9747 | 14 | "iSNS: server security settings", HFILL }}, |
9748 | | |
9749 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_enabled, |
9750 | 14 | { "Server Security Bitmap Enabled", "dhcp.option.isns.server_security_bitmap.enabled", |
9751 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), F_ISNS_SRV_SEC_BITMAP_ENABLED, |
9752 | 14 | NULL, HFILL }}, |
9753 | | |
9754 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_ike_ipsec_enabled, |
9755 | 14 | { "IKE/IPSec", "dhcp.option.isns.server_security_bitmap.ike_ipsec_enabled", |
9756 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_IKE_IPSEC, |
9757 | 14 | NULL, HFILL }}, |
9758 | | |
9759 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_main_mode, |
9760 | 14 | { "Main Mode", "dhcp.option.isns.server_security_bitmap.main_mode", |
9761 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_MAIN_MODE, |
9762 | 14 | NULL, HFILL }}, |
9763 | | |
9764 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_aggressive_mode, |
9765 | 14 | { "Aggressive Mode", "dhcp.option.isns.server_security_bitmap.aggressive_mode", |
9766 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_AGGRESSIVE, |
9767 | 14 | NULL, HFILL }}, |
9768 | | |
9769 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_pfs, |
9770 | 14 | { "PFS", "dhcp.option.isns.server_security_bitmap.pfs", |
9771 | 14 | FT_BOOLEAN, 16, TFS(&tfs_enabled_disabled), F_ISNS_SRV_SEC_BITMAP_PFS, |
9772 | 14 | NULL, HFILL }}, |
9773 | | |
9774 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_transport_mode, |
9775 | 14 | { "Transport Mode", "dhcp.option.isns.server_security_bitmap.transport_mode", |
9776 | 14 | FT_BOOLEAN, 16, TFS(&tfs_preferred_no_preference), F_ISNS_SRV_SEC_BITMAP_TRASPORT_MODE, |
9777 | 14 | NULL, HFILL }}, |
9778 | | |
9779 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_tunnel_mode, |
9780 | 14 | { "Tunnel Mode", "dhcp.option.isns.server_security_bitmap.tunnel_mode", |
9781 | 14 | FT_BOOLEAN, 16, TFS(&tfs_preferred_no_preference), F_ISNS_SRV_SEC_BITMAP_TUNNEL_MODE, |
9782 | 14 | NULL, HFILL }}, |
9783 | | |
9784 | 14 | { &hf_dhcp_option_isns_server_security_bitmap_reserved, |
9785 | 14 | { "Reserved Flags", "dhcp.option.isns.server_security_bitmap.reserved", |
9786 | 14 | FT_UINT16, BASE_HEX, NULL, F_ISNS_SRV_SEC_BITMAP_RESERVED, |
9787 | 14 | NULL, HFILL }}, |
9788 | | |
9789 | 14 | { &hf_dhcp_option_isns_primary_server_addr, |
9790 | 14 | { "Primary Server Address", "dhcp.option.isns.primary_server_addr", |
9791 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9792 | 14 | "iSNS: IP address of the primary server", HFILL }}, |
9793 | | |
9794 | 14 | { &hf_dhcp_option_isns_heartbeat_originator_addr, |
9795 | 14 | { "Heartbeat Originator Address", "dhcp.option.isns.heartbeat_originator_addr", |
9796 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9797 | 14 | "iSNS: IP address from which the iSNS heartbeat originates", HFILL }}, |
9798 | | |
9799 | 14 | { &hf_dhcp_option_isns_secondary_server_addr_list, |
9800 | 14 | { "Secondary Server Address", "dhcp.option.isns.secondary_server_addr", |
9801 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9802 | 14 | "iSNS: a list of IP addresses of the secondary iSNS servers", HFILL }}, |
9803 | | |
9804 | | |
9805 | 14 | { &hf_dhcp_option_novell_dss_string, |
9806 | 14 | { "Novell Directory Services Servers String", "dhcp.option.novell_dss.string", |
9807 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9808 | 14 | "Option 85: Novell Directory Services Servers String", HFILL }}, |
9809 | | |
9810 | 14 | { &hf_dhcp_option_novell_dss_ip, |
9811 | 14 | { "IP Address", "dhcp.option.novell_dss.ip", |
9812 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9813 | 14 | "Option 85: Novell Directory Services Servers IP Address", HFILL }}, |
9814 | | |
9815 | 14 | { &hf_dhcp_option_novell_ds_tree_name, |
9816 | 14 | { "Novell Directory Services Tree Name", "dhcp.option.novell_ds_tree_name", |
9817 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9818 | 14 | "Option 86: Novell Directory Services Tree Name", HFILL }}, |
9819 | | |
9820 | 14 | { &hf_dhcp_option_novell_ds_context, |
9821 | 14 | { "Novell Directory Services Context", "dhcp.option.novell_ds_context", |
9822 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9823 | 14 | "Option 87: Novell Directory Services Context", HFILL }}, |
9824 | | |
9825 | 14 | { &hf_dhcp_option_dhcp_authentication_protocol, |
9826 | 14 | { "Protocol", "dhcp.option.dhcp_authentication.protocol", |
9827 | 14 | FT_UINT8, BASE_DEC, VALS(authen_protocol_vals), 0x0, |
9828 | 14 | "Option 90: Authentication Protocol", HFILL }}, |
9829 | | |
9830 | 14 | { &hf_dhcp_option_dhcp_authentication_alg_delay, |
9831 | 14 | { "Delay Algorithm", "dhcp.option.dhcp_authentication.alg_delay", |
9832 | 14 | FT_UINT8, BASE_DEC, VALS(authen_da_algo_vals), 0x0, |
9833 | 14 | "Option 90: Delayed Authentication Algorithm", HFILL }}, |
9834 | | |
9835 | 14 | { &hf_dhcp_option_dhcp_authentication_algorithm, |
9836 | 14 | { "Algorithm", "dhcp.option.dhcp_authentication.algorithm", |
9837 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9838 | 14 | "Option 90: Authentication Algorithm", HFILL }}, |
9839 | | |
9840 | 14 | { &hf_dhcp_option_dhcp_authentication_rdm, |
9841 | 14 | { "Replay Detection Method", "dhcp.option.dhcp_authentication.rdm", |
9842 | 14 | FT_UINT8, BASE_DEC, VALS(authen_rdm_vals), 0x0, |
9843 | 14 | "Option 90: Replay Detection Method", HFILL }}, |
9844 | | |
9845 | 14 | { &hf_dhcp_option_dhcp_authentication_rdm_replay_detection, |
9846 | 14 | { "RDM Replay Detection Value", "dhcp.option.dhcp_authentication.rdm_replay_detection", |
9847 | 14 | FT_UINT64, BASE_HEX, NULL, 0x0, |
9848 | 14 | "Option 90: RDM Replay Detection Value", HFILL }}, |
9849 | | |
9850 | 14 | { &hf_dhcp_option_dhcp_authentication_rdm_rdv, |
9851 | 14 | { "Replay Detection Value", "dhcp.option.dhcp_authentication.rdm_rdv", |
9852 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9853 | 14 | "Option 90: Replay Detection Value", HFILL }}, |
9854 | | |
9855 | 14 | { &hf_dhcp_option_dhcp_authentication_secret_id, |
9856 | 14 | { "Secret ID", "dhcp.option.dhcp_authentication.secret_id", |
9857 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9858 | 14 | "Option 90: Secret ID", HFILL }}, |
9859 | | |
9860 | 14 | { &hf_dhcp_option_dhcp_authentication_hmac_md5_hash, |
9861 | 14 | { "HMAC MD5 Hash", "dhcp.option.dhcp_authentication.hmac_md5_hash", |
9862 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9863 | 14 | "Option 90: HMAC MD5 Hash", HFILL }}, |
9864 | | |
9865 | 14 | { &hf_dhcp_option_dhcp_authentication_information, |
9866 | 14 | { "Authentication Information", "dhcp.option.dhcp_authentication.information", |
9867 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9868 | 14 | "Option 90: Authentication Information", HFILL }}, |
9869 | | |
9870 | 14 | { &hf_dhcp_option_client_last_transaction_time, |
9871 | 14 | { "Client last transaction time", "dhcp.option.client_last_transaction_time", |
9872 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9873 | 14 | "Option 91: Client last transaction time", HFILL }}, |
9874 | | |
9875 | 14 | { &hf_dhcp_option_associated_ip_option, |
9876 | 14 | { "Associated IP option", "dhcp.option.associated_ip_option", |
9877 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9878 | 14 | "Option 92: Associated IP option", HFILL }}, |
9879 | | |
9880 | 14 | { &hf_dhcp_option_client_system_architecture, |
9881 | 14 | { "Client System Architecture", "dhcp.option.client_system_architecture", |
9882 | 14 | FT_UINT16, BASE_DEC, VALS(dhcp_client_arch), 0x0, |
9883 | 14 | "Option 93: Client System Architecture", HFILL }}, |
9884 | | |
9885 | 14 | { &hf_dhcp_option_client_network_id_major_ver, |
9886 | 14 | { "Major Version", "dhcp.client_network_id_major", |
9887 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9888 | 14 | "Option 94: Major Version", HFILL }}, |
9889 | | |
9890 | 14 | { &hf_dhcp_option_client_network_id_minor_ver, |
9891 | 14 | { "Minor Version", "dhcp.client_network_id_minor", |
9892 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9893 | 14 | "Option 94: Minor Version", HFILL }}, |
9894 | | |
9895 | 14 | { &hf_dhcp_option_civic_location_what, |
9896 | 14 | { "What", "dhcp.option.civic_location.what", |
9897 | 14 | FT_UINT8, BASE_DEC, VALS(civic_address_what_values), 0x0, |
9898 | 14 | "Option 99: What", HFILL }}, |
9899 | | |
9900 | 14 | { &hf_dhcp_option_civic_location_country, |
9901 | 14 | { "Country", "dhcp.option.civic_location.country", |
9902 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9903 | 14 | "Option 99: Country", HFILL }}, |
9904 | | |
9905 | 14 | { &hf_dhcp_option_civic_location_ca_type, |
9906 | 14 | { "CA Type", "dhcp.option.civic_location.ca_type", |
9907 | 14 | FT_UINT8, BASE_DEC, VALS(civic_address_type_values), 0x0, |
9908 | 14 | "Option 99: CA Type", HFILL }}, |
9909 | | |
9910 | 14 | { &hf_dhcp_option_civic_location_ca_length, |
9911 | 14 | { "CA Length", "dhcp.option.civic_location.ca_length", |
9912 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
9913 | 14 | "Option 99: CA Length", HFILL }}, |
9914 | | |
9915 | 14 | { &hf_dhcp_option_civic_location_ca_value, |
9916 | 14 | { "CA Value", "dhcp.option.civic_location.ca_value", |
9917 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9918 | 14 | "Option 99: CA Value", HFILL }}, |
9919 | | |
9920 | 14 | { &hf_dhcp_option_tz_pcode, |
9921 | 14 | { "TZ PCode", "dhcp.option.tz_pcode", |
9922 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9923 | 14 | "Option 100: TZ PCode", HFILL }}, |
9924 | | |
9925 | 14 | { &hf_dhcp_option_tz_tcode, |
9926 | 14 | { "TZ TCode", "dhcp.option.tz_tcode", |
9927 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9928 | 14 | "Option 101: TZ TCode", HFILL }}, |
9929 | | |
9930 | 14 | { &hf_dhcp_option_ipv6_only_preferred_wait_time, |
9931 | 14 | { "IPv6-Only Preferred wait time", "dhcp.option.ipv6only_preferred_wait_time", |
9932 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
9933 | 14 | "Option 108: IPv6-Only Preferred wait time", HFILL }}, |
9934 | | |
9935 | 14 | { &hf_dhcp_option_netinfo_parent_server_address, |
9936 | 14 | { "NetInfo Parent Server Address", "dhcp.option.netinfo_parent_server_address", |
9937 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
9938 | 14 | "Option 112: NetInfo Parent Server Address", HFILL }}, |
9939 | | |
9940 | 14 | { &hf_dhcp_option_netinfo_parent_server_tag, |
9941 | 14 | { "NetInfo Parent Server Tag", "dhcp.option.netinfo_parent_server_tag", |
9942 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9943 | 14 | "Option 113: NetInfo Parent Server Tag", HFILL }}, |
9944 | | |
9945 | 14 | { &hf_dhcp_option_dhcp_auto_configuration, |
9946 | 14 | { "DHCP Auto-Configuration", "dhcp.option.dhcp_auto_configuration", |
9947 | 14 | FT_UINT8, BASE_DEC, VALS(dhcp_autoconfig), 0x0, |
9948 | 14 | "Option 116: DHCP Auto-Configuration", HFILL }}, |
9949 | | |
9950 | 14 | { &hf_dhcp_option_dhcp_name_service_search_option, |
9951 | 14 | { "Name Service", "dhcp.option.dhcp_name_service_search_option", |
9952 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9953 | 14 | "Option 117: Name Service", HFILL }}, |
9954 | | |
9955 | 14 | { &hf_dhcp_option_dhcp_dns_domain_search_list_fqdn, |
9956 | 14 | { "FQDN", "dhcp.option.dhcp_dns_domain_search_list_fqdn", |
9957 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9958 | 14 | "Option 119: FQDN", HFILL }}, |
9959 | | |
9960 | 14 | { &hf_dhcp_option_sip_server_enc, |
9961 | 14 | { "SIP Server Encoding", "dhcp.option.sip_server.encoding", |
9962 | 14 | FT_UINT8, BASE_DEC, VALS(sip_server_enc_vals), 0x0, |
9963 | 14 | "Option 120: SIP Server encoding", HFILL }}, |
9964 | | |
9965 | 14 | { &hf_dhcp_option_sip_server_name, |
9966 | 14 | { "SIP Server Name", "dhcp.option.sip_server.name", |
9967 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
9968 | 14 | "Option 120: SIP Server Name", HFILL }}, |
9969 | | |
9970 | 14 | { &hf_dhcp_option_sip_server_address, |
9971 | 14 | { "SIP Server Address", "dhcp.option.sip_server.address", |
9972 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
9973 | 14 | "Option 120: SIP Server Address", HFILL }}, |
9974 | | |
9975 | 14 | { &hf_dhcp_option_classless_static_route, |
9976 | 14 | { "Subnet/MaskWidth-Router", "dhcp.option.classless_static_route", |
9977 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9978 | 14 | "Option 121: Subnet/MaskWidth-Router", HFILL }}, |
9979 | | |
9980 | 14 | { &hf_dhcp_option_rfc3825_error, |
9981 | 14 | { "Error", "dhcp.option.rfc3825.error", |
9982 | 14 | FT_UINT8, BASE_DEC, VALS(rfc3825_error_types), 0x0, |
9983 | 14 | "Option 123: Error", HFILL }}, |
9984 | | |
9985 | 14 | { &hf_dhcp_option_rfc3825_latitude, |
9986 | 14 | { "Latitude", "dhcp.option.rfc3825.latitude", |
9987 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9988 | 14 | "Option 123: Latitude", HFILL }}, |
9989 | | |
9990 | 14 | { &hf_dhcp_option_rfc3825_longitude, |
9991 | 14 | { "Longitude", "dhcp.option.rfc3825.longitude", |
9992 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9993 | 14 | "Option 123: Longitude", HFILL }}, |
9994 | | |
9995 | 14 | { &hf_dhcp_option_rfc3825_latitude_res, |
9996 | 14 | { "Latitude resolution", "dhcp.option.rfc3825.latitude_res", |
9997 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
9998 | 14 | "Option 123: Latitude resolution", HFILL }}, |
9999 | | |
10000 | 14 | { &hf_dhcp_option_rfc3825_longitude_res, |
10001 | 14 | { "Longitude resolution", "dhcp.option.rfc3825.longitude_res", |
10002 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
10003 | 14 | "Option 123: Longitude resolution", HFILL }}, |
10004 | | |
10005 | 14 | { &hf_dhcp_option_rfc3825_altitude, |
10006 | 14 | { "Altitude", "dhcp.option.rfc3825.altitude", |
10007 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
10008 | 14 | "Option 123: Altitude", HFILL }}, |
10009 | | |
10010 | 14 | { &hf_dhcp_option_rfc3825_altitude_res, |
10011 | 14 | { "Altitude resolution", "dhcp.option.rfc3825.altitude_res", |
10012 | 14 | FT_DOUBLE, BASE_NONE, NULL, 0x0, |
10013 | 14 | "Option 123: Altitude resolution", HFILL }}, |
10014 | | |
10015 | 14 | { &hf_dhcp_option_rfc3825_altitude_type, |
10016 | 14 | { "Altitude type", "dhcp.option.rfc3825.altitude_type", |
10017 | 14 | FT_UINT8, BASE_DEC, VALS(altitude_type_values), 0x0, |
10018 | 14 | "Option 123: Altitude type", HFILL }}, |
10019 | | |
10020 | 14 | { &hf_dhcp_option_rfc3825_map_datum, |
10021 | 14 | { "Map Datum", "dhcp.option.rfc3825.map_datum", |
10022 | 14 | FT_UINT8, BASE_DEC, VALS(map_datum_type_values), 0x0, |
10023 | 14 | "Option 123: Map Datum", HFILL }}, |
10024 | | |
10025 | 14 | { &hf_dhcp_option_cl_dss_id_option, |
10026 | 14 | { "DSS_ID Type", "dhcp.option.cl_dss_id.option", |
10027 | 14 | FT_UINT8, BASE_DEC, VALS(cl_dss_id_type_vals), 0x0, |
10028 | 14 | "Option 123:CL DSS_ID Type", HFILL }}, |
10029 | | |
10030 | 14 | { &hf_dhcp_option_cl_dss_id_len, |
10031 | 14 | { "DSS_ID Length", "dhcp.option.cl_dss_id.len", |
10032 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10033 | 14 | "Option 123:CL DSS_ID Length", HFILL }}, |
10034 | | |
10035 | 14 | { &hf_dhcp_option_cl_dss_id, |
10036 | 14 | { "Country", "dhcp.option.cl_dss_id", |
10037 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10038 | 14 | "Option 123:CL DSS_ID", HFILL }}, |
10039 | | |
10040 | 14 | { &hf_dhcp_option_vi_class_cl_address_mode, |
10041 | 14 | { "CableLab Address Mode", "dhcp.option.vi_class.cl_address_mode", |
10042 | 14 | FT_UINT8, BASE_DEC, VALS(cablelab_ipaddr_mode_vals), 0x0, |
10043 | 14 | "Option 124: CableLab Address Mode", HFILL }}, |
10044 | | |
10045 | 14 | { &hf_dhcp_option_vi_class_enterprise, |
10046 | 14 | { "Enterprise", "dhcp.option.vi_class.enterprise", |
10047 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x00, |
10048 | 14 | "Option 124: Enterprise", HFILL }}, |
10049 | | |
10050 | 14 | { &hf_dhcp_option_vi_class_data_length, |
10051 | 14 | { "Length", "dhcp.option.vi_class.length", |
10052 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10053 | 14 | "Option 124: Length", HFILL }}, |
10054 | | |
10055 | 14 | { &hf_dhcp_option_vi_class_data_item_length, |
10056 | 14 | { "Length", "dhcp.option.vi_class.vendor_class_data.item.length", |
10057 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10058 | 14 | "Option 124: Length", HFILL }}, |
10059 | | |
10060 | 14 | { &hf_dhcp_option_vi_class_data_item_data, |
10061 | 14 | { "Data", "dhcp.option.vi_class.vendor_class_data.item.data", |
10062 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10063 | 14 | "Option 124: Data", HFILL }}, |
10064 | | |
10065 | 14 | { &hf_dhcp_option125_enterprise, |
10066 | 14 | { "Enterprise", "dhcp.option.vi.enterprise", |
10067 | 14 | FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x00, |
10068 | 14 | "Option 125: Enterprise", HFILL }}, |
10069 | | |
10070 | 14 | { &hf_dhcp_option125_length, |
10071 | 14 | { "Length", "dhcp.option.vi.length", |
10072 | 14 | FT_UINT8, BASE_DEC, NULL, 0x00, |
10073 | 14 | "Option 125: Length", HFILL }}, |
10074 | | |
10075 | 14 | { &hf_dhcp_option125_value, |
10076 | 14 | { "Value", "dhcp.option.vi.value", |
10077 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10078 | 14 | "Option 125: Suboption value", HFILL }}, |
10079 | | |
10080 | 14 | { &hf_dhcp_option125_value_8, |
10081 | 14 | { "Value", "dhcp.option.vi.value.uint", |
10082 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10083 | 14 | "Option 125: Suboption 8-bit value", HFILL }}, |
10084 | | |
10085 | 14 | { &hf_dhcp_option125_value_16, |
10086 | 14 | { "Value", "dhcp.option.vi.value.uint", |
10087 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10088 | 14 | "Option 125: Suboption 16-bit value", HFILL }}, |
10089 | | |
10090 | 14 | { &hf_dhcp_option125_value_ip_address, |
10091 | 14 | { "Value", "dhcp.option.vi.value.address", |
10092 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10093 | 14 | "Option 125: Suboption IP address value", HFILL }}, |
10094 | | |
10095 | 14 | { &hf_dhcp_option125_value_stringz, |
10096 | 14 | { "Value", "dhcp.option.vi.value.string", |
10097 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10098 | 14 | "Option 125: Suboption Z-String value", HFILL }}, |
10099 | | |
10100 | 14 | { &hf_dhcp_option125_tr111_suboption, |
10101 | 14 | { "Option 125 Suboption", "dhcp.option.vi.tr111.suboption", |
10102 | 14 | FT_UINT8, BASE_DEC, VALS(option125_tr111_suboption_vals), 0x0, |
10103 | 14 | "Option 125:TR 111 Suboption", HFILL }}, |
10104 | | |
10105 | 14 | { &hf_dhcp_option125_tr111_device_manufacturer_oui, |
10106 | 14 | { "DeviceManufacturerOUI", "dhcp.option.vi.tr111.device_manufacturer_oui", |
10107 | 14 | FT_UINT24, BASE_OUI, NULL, 0x0, |
10108 | 14 | "Option 125:TR 111 1 DeviceManufacturerOUI", HFILL }}, |
10109 | | |
10110 | 14 | { &hf_dhcp_option125_tr111_device_serial_number, |
10111 | 14 | { "DeviceSerialNumber", "dhcp.option.vi.tr111.device_serial_number", |
10112 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10113 | 14 | "Option 125:TR 111 2 DeviceSerialNumber", HFILL }}, |
10114 | | |
10115 | 14 | { &hf_dhcp_option125_tr111_device_product_class, |
10116 | 14 | { "DeviceProductClass", "dhcp.option.vi.tr111.device_product_class", |
10117 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10118 | 14 | "Option 125:TR 111 3 DeviceProductClass", HFILL }}, |
10119 | | |
10120 | 14 | { &hf_dhcp_option125_tr111_gateway_manufacturer_oui, |
10121 | 14 | { "GatewayManufacturerOUI", "dhcp.option.vi.tr111.gateway_manufacturer_oui", |
10122 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10123 | 14 | "Option 125:TR 111 4 GatewayManufacturerOUI", HFILL }}, |
10124 | | |
10125 | 14 | { &hf_dhcp_option125_tr111_gateway_serial_number, |
10126 | 14 | { "GatewaySerialNumber", "dhcp.option.vi.tr111.gateway_serial_number", |
10127 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10128 | 14 | "Option 125:TR 111 5 GatewaySerialNumber", HFILL }}, |
10129 | | |
10130 | 14 | { &hf_dhcp_option125_tr111_gateway_product_class, |
10131 | 14 | { "GatewayProductClass", "dhcp.option.vi.tr111.gateway_product_class", |
10132 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10133 | 14 | "Option 125:TR 111 6 GatewayProductClass", HFILL }}, |
10134 | | |
10135 | 14 | { &hf_dhcp_option125_cl_suboption, |
10136 | 14 | { "Option 125 Suboption", "dhcp.option.vi.cl.suboption", |
10137 | 14 | FT_UINT8, BASE_DEC, VALS(option125_cl_suboption_vals), 0x0, |
10138 | 14 | "Option 125:CL Suboption", HFILL }}, |
10139 | | |
10140 | 14 | { &hf_dhcp_option125_cl_option_request, |
10141 | 14 | { "Option Request", "dhcp.option.vi.cl.option_request", |
10142 | 14 | FT_BYTES, SEP_SPACE, NULL, 0x0, |
10143 | 14 | "Option 125:CL 1 Option Request", HFILL }}, |
10144 | | |
10145 | 14 | { &hf_dhcp_option125_cl_tftp_server_addresses, |
10146 | 14 | { "TFTP Server Addresses", "dhcp.option.vi.cl.tftp_server_addresses", |
10147 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10148 | 14 | "Option 125:CL 2 TFTP Server Addresses", HFILL }}, |
10149 | | |
10150 | 14 | { &hf_dhcp_option125_cl_erouter_container_option, |
10151 | 14 | { "eRouter Container Option", "dhcp.option.vi.cl.erouter_container_option", |
10152 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10153 | 14 | "Option 125:CL 3 eRouter Container Option", HFILL }}, |
10154 | | |
10155 | 14 | { &hf_dhcp_option125_cl_mib_environment_indicator_option, |
10156 | 14 | { "MIB Environment Indicator Option", "dhcp.option.vi.cl.mib_environment_indicator_option", |
10157 | 14 | FT_UINT8, BASE_DEC, VALS(pkt_mib_env_ind_opt_vals), 0x0, |
10158 | 14 | "Option 125:CL 4 MIB Environment Indicator Option", HFILL }}, |
10159 | | |
10160 | 14 | { &hf_dhcp_option125_cl_modem_capabilities, |
10161 | 14 | { "Modem Capabilities", "dhcp.option.vi.cl.modem_capabilities", |
10162 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10163 | 14 | "Option 125:CL 5 Modem Capabilities", HFILL }}, |
10164 | | |
10165 | 14 | { &hf_dhcp_option_subnet_selection_option, |
10166 | 14 | { "Subnet Selection Option", "dhcp.option.subnet_selection_option", |
10167 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10168 | 14 | "Option 118: Subnet Selection Option", HFILL }}, |
10169 | | |
10170 | 14 | { &hf_dhcp_option_pana_agent, |
10171 | 14 | { "PAA IPv4 Address", "dhcp.option.pana_agent", |
10172 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
10173 | 14 | "Protocol for Carrying Authentication for Network Access (PANA) Authentication Agents IPv4 Address", HFILL }}, |
10174 | | |
10175 | 14 | { &hf_dhcp_option_lost_server_domain_name, |
10176 | 14 | { "LoST Server Domain Name", "dhcp.option.lost_server_domain_name", |
10177 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10178 | 14 | "Option 137: LoST Server Domain Name", HFILL }}, |
10179 | | |
10180 | 14 | { &hf_dhcp_option_capwap_access_controller, |
10181 | 14 | { "CAPWAP Access Controllers", "dhcp.option.capwap_access_controller", |
10182 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10183 | 14 | "Option 138: CAPWAP Access Controllers", HFILL }}, |
10184 | | |
10185 | 14 | { &hf_dhcp_option_andsf_server, |
10186 | 14 | { "ANDSF Server", "dhcp.option.andsf_server", |
10187 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10188 | 14 | "ANDSF (Access Network Discovery and Selection Function) Server", HFILL }}, |
10189 | | |
10190 | 14 | { &hf_dhcp_option_forcerenew_nonce_algo, |
10191 | 14 | { "Algorithm", "dhcp.option.forcerenew_nonce.algorithm", |
10192 | 14 | FT_UINT8, BASE_DEC, VALS(forcerenew_nonce_algo_vals), 0x00, |
10193 | 14 | "Forcenew Nonce Algorithm", HFILL }}, |
10194 | | |
10195 | 14 | { &hf_dhcp_option_rdnss_reserved, |
10196 | 14 | { "Reserved", "dhcp.option.rdnss.reserved", |
10197 | 14 | FT_UINT8, BASE_HEX, NULL, 0xfc, |
10198 | 14 | "RDNSS Reserved", HFILL }}, |
10199 | | |
10200 | 14 | { &hf_dhcp_option_rdnss_pref, |
10201 | 14 | { "Preference", "dhcp.option.rdnss.preference", |
10202 | 14 | FT_UINT8, BASE_DEC, VALS(rdnss_pref_vals), 0x03, |
10203 | 14 | "RDNSS (Recursive DNS Server) Preference", HFILL }}, |
10204 | | |
10205 | 14 | { &hf_dhcp_option_rdnss_prim_dns_server, |
10206 | 14 | { "Primary DNS", "dhcp.option.rdnss.primary_dns", |
10207 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10208 | 14 | "RDNSS Primary DNS-recursive-name-server's IPv4 address", HFILL }}, |
10209 | | |
10210 | 14 | { &hf_dhcp_option_rdnss_sec_dns_server, |
10211 | 14 | { "Secondary DNS", "dhcp.option.rdnss.secondary_dns", |
10212 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10213 | 14 | "RDNSS Secondary DNS-recursive-name-server's IPv4 address", HFILL }}, |
10214 | | |
10215 | 14 | { &hf_dhcp_option_rdnss_domain, |
10216 | 14 | { "Domains and networks", "dhcp.option.rdnss.domain", |
10217 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
10218 | 14 | "RDNSS Domains and networks", HFILL }}, |
10219 | | |
10220 | 14 | { &hf_dhcp_option_dots_ri, |
10221 | 14 | { "DOTS Reference Identifier", "dhcp.option.dots.ri", |
10222 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
10223 | 14 | "Peer DOTS Agent name", HFILL }}, |
10224 | | |
10225 | 14 | { &hf_dhcp_option_dots_address, |
10226 | 14 | { "DOTS Address", "dhcp.option.dots.address", |
10227 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10228 | 14 | "Peer DOTS Agent Address", HFILL }}, |
10229 | | |
10230 | 14 | { &hf_dhcp_option_tftp_server_address, |
10231 | 14 | { "TFTP Server Address", "dhcp.option.tftp_server_address", |
10232 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10233 | 14 | "Option 150: TFTP Server Address", HFILL }}, |
10234 | | |
10235 | 14 | { &hf_dhcp_option_bulk_lease_status_code, |
10236 | 14 | { "Status Code", "dhcp.option.bulk_lease.status_code", |
10237 | 14 | FT_UINT8, BASE_DEC, VALS(bulk_lease_dhcp_status_code_vals), 0x00, |
10238 | 14 | "DHCPv4 Bulk Leasequery Status Code", HFILL }}, |
10239 | | |
10240 | 14 | { &hf_dhcp_option_bulk_lease_status_message, |
10241 | 14 | { "Status Code Message", "dhcp.option.bulk_lease.status_code_message", |
10242 | 14 | FT_STRING, BASE_NONE, NULL, 0x00, |
10243 | 14 | "DHCPv4 Bulk Leasequery Status Code Message", HFILL }}, |
10244 | | |
10245 | 14 | { &hf_dhcp_option_bulk_lease_base_time, |
10246 | 14 | { "Base Time", "dhcp.option.bulk_lease.base_time", |
10247 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, |
10248 | 14 | "DHCPv4 Bulk Leasequery Base Time", HFILL }}, |
10249 | | |
10250 | 14 | { &hf_dhcp_option_bulk_lease_start_time_of_state, |
10251 | 14 | { "Start Time Of State", "dhcp.option.bulk_lease.start_time_of_state", |
10252 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
10253 | 14 | "DHCPv4 Bulk Leasequery Start Time Of State", HFILL }}, |
10254 | | |
10255 | 14 | { &hf_dhcp_option_bulk_lease_query_start, |
10256 | 14 | { "Query Start Time", "dhcp.option.bulk_lease.query_start_time", |
10257 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, |
10258 | 14 | "DHCPv4 Bulk Leasequery Query Start Time", HFILL }}, |
10259 | | |
10260 | 14 | { &hf_dhcp_option_bulk_lease_query_end, |
10261 | 14 | { "Query End Time", "dhcp.option.bulk_lease.query_end_time", |
10262 | 14 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, |
10263 | 14 | "DHCPv4 Bulk Leasequery Query End Time", HFILL }}, |
10264 | | |
10265 | 14 | { &hf_dhcp_option_bulk_lease_dhcp_state, |
10266 | 14 | { "Dhcp State", "dhcp.option.bulk_lease.dhcp_state", |
10267 | 14 | FT_UINT8, BASE_DEC, VALS(bulk_lease_dhcp_state_vals), 0x00, |
10268 | 14 | "DHCPv4 Bulk Leasequery Dhcp State", HFILL }}, |
10269 | | |
10270 | 14 | { &hf_dhcp_option_bulk_lease_data_source, |
10271 | 14 | { "Data Source", "dhcp.option.bulk_lease.data_source", |
10272 | 14 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_bulk_lease_data_source), 0x00, |
10273 | 14 | "DHCPv4 Bulk Leasequery Data Source", HFILL }}, |
10274 | | |
10275 | 14 | { &hf_dhcp_option_pcp_list_length, |
10276 | 14 | { "List-Length", "dhcp.option.pcp.list_length", |
10277 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10278 | 14 | "Port Control Protocol (PCP) List Length", HFILL }}, |
10279 | | |
10280 | 14 | { &hf_dhcp_option_pcp_server, |
10281 | 14 | { "PCP Server", "dhcp.option.pcp.server", |
10282 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
10283 | 14 | "Port Control Protocol (PCP) Server", HFILL }}, |
10284 | | |
10285 | 14 | { &hf_dhcp_option_portparams_offset, |
10286 | 14 | { "Offset", "dhcp.option.portparams.offset", |
10287 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10288 | 14 | "Port Set ID (PSID) offset", HFILL }}, |
10289 | | |
10290 | 14 | { &hf_dhcp_option_portparams_psid_length, |
10291 | 14 | { "PSID-Length", "dhcp.option.portparams.psid_length", |
10292 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10293 | 14 | "Port Set ID (PSID) Length", HFILL }}, |
10294 | | |
10295 | 14 | { &hf_dhcp_option_portparams_psid, |
10296 | 14 | { "PSID", "dhcp.option.portparams.psid", |
10297 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10298 | 14 | "Port Set ID (PSID)", HFILL }}, |
10299 | | |
10300 | 14 | { &hf_dhcp_option_mudurl, |
10301 | 14 | { "MUDURL", "dhcp.option.mudurl", |
10302 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10303 | 14 | "Option 161: MUDURL", HFILL }}, |
10304 | | |
10305 | 14 | { &hf_dhcp_dnr_instance, |
10306 | 14 | { "Instance", "dhcp.option.dnr", |
10307 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
10308 | 14 | "Option 162: DNR instance", HFILL }}, |
10309 | | |
10310 | 14 | { &hf_dhcp_dnr_instance_len, |
10311 | 14 | { "Instance length", "dhcp.option.dnr.length", |
10312 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10313 | 14 | "Option 162: DNR instance length", HFILL }}, |
10314 | | |
10315 | 14 | { &hf_dhcp_dnr_svcpriority, |
10316 | 14 | { "Service priority", "dhcp.option.dnr.svcpriority", |
10317 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10318 | 14 | "Option 162: DNR service priority", HFILL }}, |
10319 | | |
10320 | 14 | { &hf_dhcp_dnr_auth_domain_name_len, |
10321 | 14 | { "Authentication domain name length", "dhcp.option.dnr.adn_len", |
10322 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10323 | 14 | "Option 162: DNR authentication domain name length", HFILL }}, |
10324 | | |
10325 | 14 | { &hf_dhcp_dnr_auth_domain_name, |
10326 | 14 | { "Authentication domain name", "dhcp.option.dnr.adn", |
10327 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10328 | 14 | "Option 162: DNR authentication domain name", HFILL }}, |
10329 | | |
10330 | 14 | { &hf_dhcp_dnr_addrs_len, |
10331 | 14 | { "Addresses length", "dhcp.option.dnr.addrs_len", |
10332 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10333 | 14 | "Option 162: DNR addresses length", HFILL }}, |
10334 | | |
10335 | 14 | { &hf_dhcp_dnr_addrs, |
10336 | 14 | { "Addresses", "dhcp.option.dnr.addrs", |
10337 | 14 | FT_NONE, BASE_NONE, NULL, 0x0, |
10338 | 14 | "Option 162: DNR addresses", HFILL }}, |
10339 | | |
10340 | 14 | { &hf_dhcp_dnr_addrs_ip, |
10341 | 14 | { "Address", "dhcp.option.dnr.addrs.ip", |
10342 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
10343 | 14 | "Option 162: DNR address", HFILL }}, |
10344 | | |
10345 | 14 | { &hf_dhcp_option_pxe_config_file, |
10346 | 14 | { "PXELINUX configuration file", "dhcp.option.pxe_config_file", |
10347 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10348 | 14 | "Option 209: PXE Configuration File", HFILL }}, |
10349 | | |
10350 | 14 | { &hf_dhcp_option_pxe_path_prefix, |
10351 | 14 | { "PXELINUX path prefix", "dhcp.option.pxe_path_prefix", |
10352 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10353 | 14 | "Option 210: PXE Path Prefix", HFILL }}, |
10354 | | |
10355 | 14 | { &hf_dhcp_option_pxe_reboot_time, |
10356 | 14 | { "PXELINUX Reboot Time", "dhcp.option.pxe_reboot_time", |
10357 | 14 | FT_UINT32, BASE_CUSTOM, CF_FUNC(dhcp_time_in_u_secs_fmt), 0x0, |
10358 | 14 | "Option 211: PXE Reboot Time", HFILL }}, |
10359 | | |
10360 | 14 | { &hf_dhcp_option_captive_portal, |
10361 | 14 | { "Captive Portal", "dhcp.option.captive_portal", |
10362 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10363 | 14 | "The contact URI for the captive portal that the user should connect to", HFILL }}, |
10364 | | |
10365 | 14 | { &hf_dhcp_option_6RD_ipv4_mask_len, |
10366 | 14 | { "6RD IPv4 Mask Length", "dhcp.option.6RD.ipv4_mask_len", |
10367 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10368 | 14 | "Option 212: 6RD IPv4 Mask Length", HFILL }}, |
10369 | | |
10370 | 14 | { &hf_dhcp_option_6RD_prefix_len, |
10371 | 14 | { "6RD Prefix Length", "dhcp.option.6RD.prefix_len", |
10372 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10373 | 14 | "Option 212: 6RD Prefix Length", HFILL }}, |
10374 | | |
10375 | 14 | { &hf_dhcp_option_6RD_prefix, |
10376 | 14 | { "6RD Prefix", "dhcp.option.6RD.prefix", |
10377 | 14 | FT_IPv6, BASE_NONE, NULL, 0x00, |
10378 | 14 | "Option 212: 6RD Prefix", HFILL }}, |
10379 | | |
10380 | 14 | { &hf_dhcp_option_6RD_border_relay_ip, |
10381 | 14 | { "Border Relay IP", "dhcp.option.6RD.border_relay_ip", |
10382 | 14 | FT_IPv4, BASE_NONE, NULL, 0x00, |
10383 | 14 | "Option 212: Border Relay IP", HFILL }}, |
10384 | | |
10385 | 14 | { &hf_dhcp_option_private_proxy_autodiscovery, |
10386 | 14 | { "Private/Proxy autodiscovery", "dhcp.option.private_proxy_autodiscovery", |
10387 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10388 | 14 | "Option 252: Private/Proxy autodiscovery", HFILL }}, |
10389 | | |
10390 | 14 | { &hf_dhcp_option_end, |
10391 | 14 | { "Option End", "dhcp.option.end", |
10392 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10393 | 14 | "Option 255: End", HFILL }}, |
10394 | | |
10395 | 14 | { &hf_dhcp_option_end_overload, |
10396 | 14 | { "Option End (Overload)", "dhcp.option.end", |
10397 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10398 | 14 | "Option 255: End (Overload)", HFILL }}, |
10399 | | |
10400 | 14 | { &hf_dhcp_vendor_unknown_suboption, |
10401 | 14 | { "Option 125 Suboption", "dhcp.vendor.suboption", |
10402 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10403 | 14 | NULL, HFILL }}, |
10404 | | |
10405 | 14 | { &hf_dhcp_suboption_data, |
10406 | 14 | { "Data", "dhcp.vendor.data", |
10407 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10408 | 14 | NULL, HFILL }}, |
10409 | | |
10410 | 14 | { &hf_dhcp_pc_ietf_ccc_suboption, |
10411 | 14 | { "Suboption", "dhcp.vendor.pc.ietf_ccc.suboption", |
10412 | 14 | FT_UINT8, BASE_DEC, VALS(pkt_draft5_ccc_opt_vals), 0x0, |
10413 | 14 | NULL, HFILL }}, |
10414 | | |
10415 | 14 | { &hf_dhcp_pc_i05_ccc_suboption, |
10416 | 14 | { "Suboption", "dhcp.vendor.pc.i05_ccc.suboption", |
10417 | 14 | FT_UINT8, BASE_DEC, VALS(pkt_i05_ccc_opt_vals), 0x0, |
10418 | 14 | NULL, HFILL }}, |
10419 | | |
10420 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_nom_timeout, |
10421 | 14 | { "pktcMtaDevRealmUnsolicitedKeyNomTimeout", "dhcp.cl.ietf_ccc.dev_realm_unc_key_nom_timeout", |
10422 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10423 | 14 | NULL, HFILL }}, |
10424 | | |
10425 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_timeout, |
10426 | 14 | { "pktcMtaDevRealmUnsolicitedKeyMaxTimeout", "dhcp.cl.ietf_ccc.dev_realm_unc_key_max_timeout", |
10427 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10428 | 14 | NULL, HFILL }}, |
10429 | | |
10430 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_realm_unc_key_max_retries, |
10431 | 14 | { "pktcMtaDevRealmUnsolicitedKeyMaxRetries", "dhcp.cl.ietf_ccc.dev_realm_unc_key_max_retries", |
10432 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10433 | 14 | NULL, HFILL }}, |
10434 | | |
10435 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_nom_timeout, |
10436 | 14 | { "pktcMtaDevProvUnsolicitedKeyNomTimeout", "dhcp.cl.ietf_ccc.dev_prov_unc_key_nom_timeout", |
10437 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10438 | 14 | NULL, HFILL }}, |
10439 | | |
10440 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_timeout, |
10441 | 14 | { "pktcMtaDevProvUnsolicitedKeyMaxTimeout", "dhcp.cl.ietf_ccc.dev_prov_unc_key_max_timeout", |
10442 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10443 | 14 | NULL, HFILL }}, |
10444 | | |
10445 | 14 | { &hf_dhcp_cl_ietf_ccc_dev_prov_unc_key_max_retries, |
10446 | 14 | { "pktcMtaDevProvUnsolicitedKeyMaxRetries", "dhcp.cl.ietf_ccc.dev_prov_unc_key_max_retries", |
10447 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10448 | 14 | NULL, HFILL }}, |
10449 | | |
10450 | 14 | { &hf_dhcp_ccc_ietf_sec_tkt_pc_provision_server, |
10451 | 14 | { "Invalidate PacketCable Provisioning Server", "dhcp.ccc.ietf.sec_tkt.pc_provision_server", |
10452 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0001, |
10453 | 14 | NULL, HFILL }}, |
10454 | | |
10455 | 14 | { &hf_dhcp_ccc_ietf_sec_tkt_all_pc_call_management, |
10456 | 14 | { "Invalidate All PacketCable Call Management Servers", "dhcp.ccc.ietf.sec_tkt.all_pc_call_management", |
10457 | 14 | FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0002, |
10458 | 14 | NULL, HFILL }}, |
10459 | | |
10460 | 14 | { &hf_dhcp_option242_avaya, |
10461 | 14 | { "Private/Avaya IP Telephone", "dhcp.option.vendor.avaya", |
10462 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10463 | 14 | "Option 242: Private/Avaya IP Telephone", HFILL }}, |
10464 | | |
10465 | 14 | { &hf_dhcp_option242_avaya_tlssrvr, |
10466 | 14 | { "TLSSRVR", "dhcp.option.vendor.avaya.tlssrvr", |
10467 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10468 | 14 | "Option 242: TLSSRVR (HTTPS server(s) to download configuration)", HFILL }}, |
10469 | | |
10470 | 14 | { &hf_dhcp_option242_avaya_httpsrvr, |
10471 | 14 | { "HTTPSRVR", "dhcp.option.vendor.avaya.httpsrvr", |
10472 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10473 | 14 | "Option 242: HTTPSRVR (HTTP server(s) to download configuration)", HFILL }}, |
10474 | | |
10475 | 14 | { &hf_dhcp_option242_avaya_httpdir, |
10476 | 14 | { "HTTPDIR", "dhcp.option.vendor.avaya.httpdir", |
10477 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10478 | 14 | "Option 242: HTTPDIR (Path to configuration files)", HFILL }}, |
10479 | | |
10480 | 14 | { &hf_dhcp_option242_avaya_static, |
10481 | 14 | { "STATIC", "dhcp.option.vendor.avaya.static", |
10482 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10483 | 14 | "Option 242: STATIC (Static programming override flag)", HFILL }}, |
10484 | | |
10485 | 14 | { &hf_dhcp_option242_avaya_mcipadd, |
10486 | 14 | { "MCIPADD", "dhcp.option.vendor.avaya.mcipadd", |
10487 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10488 | 14 | "Option 242: MCIPADD (List of CM server(s))", HFILL }}, |
10489 | | |
10490 | 14 | { &hf_dhcp_option242_avaya_dot1x, |
10491 | 14 | { "DOT1X", "dhcp.option.vendor.avaya.dot1x", |
10492 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10493 | 14 | "Option 242: DOT1X (802.1X Supplicant operation mode)", HFILL }}, |
10494 | | |
10495 | 14 | { &hf_dhcp_option242_avaya_icmpdu, |
10496 | 14 | { "ICMPDU", "dhcp.option.vendor.avaya.icmpdu", |
10497 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10498 | 14 | "Option 242: ICMPDU (ICMP Destination Unreachable processing)", HFILL }}, |
10499 | | |
10500 | 14 | { &hf_dhcp_option242_avaya_icmpred, |
10501 | 14 | { "ICMPRED", "dhcp.option.vendor.avaya.icmpred", |
10502 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10503 | 14 | "Option 242: ICMPRED (ICMP Redirect handling)", HFILL }}, |
10504 | | |
10505 | 14 | { &hf_dhcp_option242_avaya_l2q, |
10506 | 14 | { "L2Q", "dhcp.option.vendor.avaya.l2q", |
10507 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10508 | 14 | "Option 242: L2Q (Controls 802.1Q tagging)", HFILL }}, |
10509 | | |
10510 | 14 | { &hf_dhcp_option242_avaya_l2qvlan, |
10511 | 14 | { "L2QVLAN", "dhcp.option.vendor.avaya.l2qvlan", |
10512 | 14 | FT_INT32, BASE_DEC, NULL, 0x0, |
10513 | 14 | "Option 242: L2QVLAN (VLAN ID)", HFILL }}, |
10514 | | |
10515 | 14 | { &hf_dhcp_option242_avaya_loglocal, |
10516 | 14 | { "LOGLOCAL", "dhcp.option.vendor.avaya.loglocal", |
10517 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10518 | 14 | "Option 242: LOGLOCAL (Log level)", HFILL }}, |
10519 | | |
10520 | 14 | { &hf_dhcp_option242_avaya_phy1stat, |
10521 | 14 | { "PHY1STAT", "dhcp.option.vendor.avaya.phy1stat", |
10522 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10523 | 14 | "Option 242: PHY1STAT (Interface configuration)", HFILL }}, |
10524 | | |
10525 | 14 | { &hf_dhcp_option242_avaya_phy2stat, |
10526 | 14 | { "PHY2STAT", "dhcp.option.vendor.avaya.phy2stat", |
10527 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10528 | 14 | "Option 242: PHY2STAT (Interface configuration)", HFILL }}, |
10529 | | |
10530 | 14 | { &hf_dhcp_option242_avaya_procpswd, |
10531 | 14 | { "PROCPSWD", "dhcp.option.vendor.avaya.procpswd", |
10532 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10533 | 14 | "Option 242: PROCPSWD (Security string used to access local procedures)", HFILL }}, |
10534 | | |
10535 | 14 | { &hf_dhcp_option242_avaya_procstat, |
10536 | 14 | { "PROCSTAT", "dhcp.option.vendor.avaya.procstat", |
10537 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10538 | 14 | "Option 242: PROCSTAT (Local (dialpad) Administrative access)", HFILL }}, |
10539 | | |
10540 | 14 | { &hf_dhcp_option242_avaya_snmpadd, |
10541 | 14 | { "SNMPADD", "dhcp.option.vendor.avaya.snmpadd", |
10542 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10543 | 14 | "Option 242: SNMPADD (Allowable source IP Address(es) for SNMP queries)", HFILL }}, |
10544 | | |
10545 | 14 | { &hf_dhcp_option242_avaya_snmpstring, |
10546 | 14 | { "SNMPSTRING", "dhcp.option.vendor.avaya.snmpstring", |
10547 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
10548 | 14 | "Option 242: SNMPSTRING (SNMP community string)", HFILL }}, |
10549 | | |
10550 | 14 | { &hf_dhcp_option242_avaya_vlantest, |
10551 | 14 | { "VLANTEST", "dhcp.option.vendor.avaya.vlantest", |
10552 | 14 | FT_INT32, BASE_DEC, NULL, 0x0, |
10553 | 14 | "Option 242: VLANTEST (Timeout in seconds)", HFILL }}, |
10554 | | |
10555 | | /* Cisco vendor suboptions */ |
10556 | 14 | { &hf_dhcp_option43_cisco_suboption, |
10557 | 14 | { "Option 43 Suboption", "dhcp.option.vendor.cisco.suboption", |
10558 | 14 | FT_UINT8, BASE_DEC, VALS(option43_cisco_suboption_vals), 0x0, |
10559 | 14 | "Option 43:Cisco Suboption", HFILL }}, |
10560 | | |
10561 | 14 | { &hf_dhcp_option43_cisco_unknown, |
10562 | 14 | { "Unknown", "dhcp.option.vendor.cisco.unknown", |
10563 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
10564 | 14 | NULL, HFILL }}, |
10565 | | |
10566 | 14 | { &hf_dhcp_option43_cisco_unknown1, |
10567 | 14 | { "Unknown1", "dhcp.option.vendor.cisco.unknown1", |
10568 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10569 | 14 | NULL, HFILL }}, |
10570 | | |
10571 | 14 | { &hf_dhcp_option43_cisco_unknown2, |
10572 | 14 | { "Unknown2", "dhcp.option.vendor.cisco.unknown2", |
10573 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10574 | 14 | NULL, HFILL }}, |
10575 | | |
10576 | 14 | { &hf_dhcp_option43_cisco_unknown3, |
10577 | 14 | { "Unknown3", "dhcp.option.vendor.cisco.unknown3", |
10578 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
10579 | 14 | NULL, HFILL }}, |
10580 | | |
10581 | 14 | { &hf_dhcp_option43_cisco_nodeid, |
10582 | 14 | { "Node ID", "dhcp.option.vendor.cisco.nodeid", |
10583 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10584 | 14 | NULL, HFILL }}, |
10585 | | |
10586 | 14 | { &hf_dhcp_option43_cisco_unknown5, |
10587 | 14 | { "Unknown5", "dhcp.option.vendor.cisco.unknown5", |
10588 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10589 | 14 | NULL, HFILL }}, |
10590 | | |
10591 | 14 | { &hf_dhcp_option43_cisco_unknown6, |
10592 | 14 | { "Unknown6", "dhcp.option.vendor.cisco.unknown6", |
10593 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
10594 | 14 | NULL, HFILL }}, |
10595 | | |
10596 | 14 | { &hf_dhcp_option43_cisco_model, |
10597 | 14 | { "Model", "dhcp.option.vendor.cisco.model", |
10598 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10599 | 14 | NULL, HFILL }}, |
10600 | | |
10601 | 14 | { &hf_dhcp_option43_cisco_apicuuid, |
10602 | 14 | { "APIC UUID", "dhcp.option.vendor.cisco.apicuuid", |
10603 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10604 | 14 | NULL, HFILL }}, |
10605 | | |
10606 | 14 | { &hf_dhcp_option43_cisco_fabricname, |
10607 | 14 | { "Fabricname", "dhcp.option.vendor.cisco.fabricname", |
10608 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10609 | 14 | NULL, HFILL }}, |
10610 | | |
10611 | 14 | { &hf_dhcp_option43_cisco_unknown10, |
10612 | 14 | { "Unknown10", "dhcp.option.vendor.cisco.unknown10", |
10613 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
10614 | 14 | NULL, HFILL }}, |
10615 | | |
10616 | 14 | { &hf_dhcp_option43_cisco_serialno, |
10617 | 14 | { "SerialNo", "dhcp.option.vendor.cisco.serialno", |
10618 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10619 | 14 | NULL, HFILL }}, |
10620 | | |
10621 | 14 | { &hf_dhcp_option43_cisco_clientint, |
10622 | 14 | { "Client Int", "dhcp.option.vendor.cisco.clientint", |
10623 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
10624 | 14 | NULL, HFILL }}, |
10625 | 14 | }; |
10626 | | |
10627 | 14 | static uat_field_t dhcp_uat_flds[] = { |
10628 | 14 | UAT_FLD_DEC(uat_dhcp_records, opt, "Option number", "Custom Option Number"), |
10629 | 14 | UAT_FLD_CSTRING(uat_dhcp_records, text, "Option Name", "Custom Option Name"), |
10630 | 14 | UAT_FLD_VS(uat_dhcp_records, ftype, "Option type", dhcp_custom_type_vals, "Option datatype"), |
10631 | 14 | UAT_END_FIELDS |
10632 | 14 | }; |
10633 | | |
10634 | 14 | static int *ett[] = { |
10635 | 14 | &ett_dhcp, |
10636 | 14 | &ett_dhcp_flags, |
10637 | 14 | &ett_dhcp_option, |
10638 | 14 | &ett_dhcp_option43_suboption, |
10639 | 14 | &ett_dhcp_option43_suboption_discovery, |
10640 | 14 | &ett_dhcp_option43_suboption_tree, |
10641 | 14 | &ett_dhcp_option63_suboption, |
10642 | 14 | &ett_dhcp_option77_instance, |
10643 | 14 | &ett_dhcp_option82_suboption, |
10644 | 14 | &ett_dhcp_option82_suboption9, |
10645 | 14 | &ett_dhcp_option124_vendor_class_data_item, |
10646 | 14 | &ett_dhcp_option125_suboption, |
10647 | 14 | &ett_dhcp_option125_tr111_suboption, |
10648 | 14 | &ett_dhcp_option125_cl_suboption, |
10649 | 14 | &ett_dhcp_option242_suboption, |
10650 | 14 | &ett_dhcp_fqdn, |
10651 | 14 | &ett_dhcp_filename_option, |
10652 | 14 | &ett_dhcp_server_hostname, |
10653 | 14 | &ett_dhcp_fqdn_flags, |
10654 | 14 | &ett_dhcp_isns_functions, |
10655 | 14 | &ett_dhcp_isns_discovery_domain_access, |
10656 | 14 | &ett_dhcp_isns_administrative_flags, |
10657 | 14 | &ett_dhcp_isns_server_security_bitmap, |
10658 | 14 | &ett_dhcp_isns_secondary_server_addr, |
10659 | 14 | &ett_dhcp_o43_bsdp_boot_image, |
10660 | 14 | &ett_dhcp_o43_bsdp_attributes, |
10661 | 14 | &ett_dhcp_o43_bsdp_image_desc_list, |
10662 | 14 | &ett_dhcp_o43_bsdp_image_desc, |
10663 | 14 | &ett_dhcp_o43_bsdp_attributes_flags, |
10664 | 14 | &ett_dhcp_option158_pcp_list, |
10665 | 14 | &ett_dhcp_dnr_instance, |
10666 | 14 | &ett_dhcp_dnr_instance_addrs, |
10667 | 14 | }; |
10668 | | |
10669 | 14 | static ei_register_info ei[] = { |
10670 | 14 | { &ei_dhcp_bad_length, { "dhcp.bad_length", PI_PROTOCOL, PI_ERROR, "length isn't 0", EXPFILL }}, |
10671 | 14 | { &ei_dhcp_bad_bitfield, { "dhcp.bad_bitfield", PI_PROTOCOL, PI_ERROR, "Bogus bitfield", EXPFILL }}, |
10672 | 14 | { &ei_dhcp_missing_subopt_length, { "dhcp.missing_subopt_length", PI_PROTOCOL, PI_ERROR, "no room left in option for suboption length", EXPFILL }}, |
10673 | 14 | { &ei_dhcp_missing_subopt_value, { "dhcp.missing_subopt_value", PI_PROTOCOL, PI_ERROR, "no room left in option for suboption value", EXPFILL }}, |
10674 | 14 | { &ei_dhcp_mal_duid, { "dhcp.malformed.duid", PI_PROTOCOL, PI_ERROR, "DUID: malformed option", EXPFILL }}, |
10675 | 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 }}, |
10676 | 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 }}, |
10677 | 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 }}, |
10678 | 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 }}, |
10679 | 14 | { &ei_dhcp_subopt_unknown_type, { "dhcp.subopt.unknown_type", PI_PROTOCOL, PI_ERROR, "ERROR, please report: Unknown subopt type handler", EXPFILL }}, |
10680 | 14 | { &ei_dhcp_option_civic_location_bad_cattype, { "dhcp.option.civic_location.bad_cattype", PI_PROTOCOL, PI_ERROR, "Error with CAType", EXPFILL }}, |
10681 | 14 | { &ei_dhcp_option_dhcp_name_service_invalid, { "dhcp.option.dhcp_name_service.invalid", PI_PROTOCOL, PI_ERROR, "Invalid Name Service", EXPFILL }}, |
10682 | 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 }}, |
10683 | 14 | { &ei_dhcp_option_classless_static_route, { "dhcp.option.classless_static.route", PI_PROTOCOL, PI_ERROR, "Mask width > 32", EXPFILL }}, |
10684 | 14 | { &ei_dhcp_option125_enterprise_malformed, { "dhcp.option.enterprise.malformed", PI_PROTOCOL, PI_ERROR, "no room left in option for enterprise data", EXPFILL }}, |
10685 | 14 | { &ei_dhcp_option_6RD_malformed, { "dhcp.option.6RD.malformed", PI_PROTOCOL, PI_ERROR, "6RD: malformed option", EXPFILL }}, |
10686 | 14 | { &ei_dhcp_option82_vi_cl_tag_unknown, { "dhcp.option.option.vi.cl.tag_unknown", PI_PROTOCOL, PI_ERROR, "Unknown tag", EXPFILL }}, |
10687 | 14 | { &ei_dhcp_option_parse_err, { "dhcp.option.parse_err", PI_PROTOCOL, PI_ERROR, "Parse error", EXPFILL }}, |
10688 | 14 | { &ei_dhcp_nonstd_option_data, { "dhcp.option.nonstd_data", PI_PROTOCOL, PI_NOTE, "Non standard compliant option data", EXPFILL }}, |
10689 | 14 | { &ei_dhcp_suboption_invalid, { "dhcp.suboption_invalid", PI_PROTOCOL, PI_ERROR, "Invalid suboption", EXPFILL }}, |
10690 | 14 | { &ei_dhcp_secs_le, { "dhcp.secs_le", PI_PROTOCOL, PI_NOTE, "Seconds elapsed appears to be encoded as little-endian", EXPFILL }}, |
10691 | 14 | { &ei_dhcp_end_option_missing, { "dhcp.end_option_missing", PI_PROTOCOL, PI_ERROR, "End option missing", EXPFILL }}, |
10692 | 14 | { &ei_dhcp_client_address_not_given, { "dhcp.client_address_not_given", PI_PROTOCOL, PI_NOTE, "Client address not given", EXPFILL }}, |
10693 | 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 }}, |
10694 | 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 }}, |
10695 | 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 }}, |
10696 | 14 | { &ei_dhcp_option242_avaya_l2qvlan_invalid, { "dhcp.option.vendor.avaya.l2qvlan.invalid", PI_PROTOCOL, PI_ERROR, "Option 242 (L2QVLAN) invalid", EXPFILL }}, |
10697 | 14 | { &ei_dhcp_option242_avaya_vlantest_invalid, { "dhcp.option.vendor.avaya.vlantest.invalid", PI_PROTOCOL, PI_ERROR, "Option 242 (avaya vlantest) invalid", EXPFILL }}, |
10698 | 14 | { &ei_dhcp_option93_client_arch_ambiguous, { "dhcp.option.client_architecture.ambiguous", PI_PROTOCOL, PI_WARN, "Client Architecture ID may be ambiguous", EXPFILL }}, |
10699 | 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 }}, |
10700 | 14 | }; |
10701 | | |
10702 | 14 | static tap_param dhcp_stat_params[] = { |
10703 | 14 | { PARAM_FILTER, "filter", "Filter", NULL, true } |
10704 | 14 | }; |
10705 | | |
10706 | 14 | static stat_tap_table_ui dhcp_stat_table = { |
10707 | 14 | REGISTER_PACKET_STAT_GROUP_UNSORTED, |
10708 | 14 | "DHCP (BOOTP) Statistics", |
10709 | 14 | "dhcp", |
10710 | 14 | "dhcp,stat", |
10711 | 14 | dhcp_stat_init, |
10712 | 14 | dhcp_stat_packet, |
10713 | 14 | dhcp_stat_reset, |
10714 | 14 | NULL, |
10715 | 14 | NULL, |
10716 | 14 | array_length(dhcp_stat_fields), dhcp_stat_fields, |
10717 | 14 | array_length(dhcp_stat_params), dhcp_stat_params, |
10718 | 14 | NULL, |
10719 | 14 | 0 |
10720 | 14 | }; |
10721 | | |
10722 | 14 | module_t *dhcp_module; |
10723 | 14 | expert_module_t* expert_dhcp; |
10724 | | |
10725 | 14 | proto_dhcp = proto_register_protocol("Dynamic Host Configuration Protocol", "DHCP/BOOTP", "dhcp"); |
10726 | 14 | proto_register_field_array(proto_dhcp, hf, array_length(hf)); |
10727 | 14 | proto_register_alias(proto_dhcp, "bootp"); |
10728 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
10729 | 14 | dhcp_bootp_tap = register_tap("dhcp"); |
10730 | | |
10731 | 14 | expert_dhcp = expert_register_protocol(proto_dhcp); |
10732 | 14 | expert_register_field_array(expert_dhcp, ei, array_length(ei)); |
10733 | | |
10734 | 14 | dhcp_option_table = register_dissector_table("dhcp.option", "BOOTP Options", proto_dhcp, FT_UINT8, BASE_DEC); |
10735 | 14 | dhcp_vendor_id_subdissector = register_heur_dissector_list_with_description("dhcp.vendor_id", "DHCP Vendor ID", proto_dhcp); |
10736 | 14 | dhcp_vendor_info_subdissector = register_heur_dissector_list_with_description("dhcp.vendor_info", "DHCP Vendor Info", proto_dhcp); |
10737 | 14 | dhcp_enterprise_class_table = register_dissector_table("dhcp.enterprise_class", "V-I Vendor Class Enterprise", proto_dhcp, FT_UINT32, BASE_DEC); |
10738 | 14 | dhcp_enterprise_specific_table = register_dissector_table("dhcp.enterprise", "V-I Vendor Specific Enterprise", proto_dhcp, FT_UINT32, BASE_DEC); |
10739 | | |
10740 | | /* register init/cleanup routine to handle the custom dhcp options */ |
10741 | 14 | register_init_routine(&dhcp_init_protocol); |
10742 | 14 | register_cleanup_routine(&dhcp_cleanup_protocol); |
10743 | | |
10744 | | /* Allow dissector to find be found by name. */ |
10745 | 14 | dhcp_handle = register_dissector("dhcp", dissect_dhcp, proto_dhcp); |
10746 | | |
10747 | 14 | dhcp_module = prefs_register_protocol(proto_dhcp, NULL); |
10748 | | |
10749 | 14 | prefs_register_bool_preference(dhcp_module, "novellserverstring", |
10750 | 14 | "Decode Option 85 as String", |
10751 | 14 | "Novell Servers option 85 can be configured as a string instead of address", |
10752 | 14 | &novell_string); |
10753 | | |
10754 | 14 | prefs_register_enum_preference(dhcp_module, "pkt.ccc.protocol_version", |
10755 | 14 | "PacketCable CCC protocol version", |
10756 | 14 | "The PacketCable CCC protocol version", |
10757 | 14 | &pkt_ccc_protocol_version, |
10758 | 14 | pkt_ccc_protocol_versions, |
10759 | 14 | false); |
10760 | | |
10761 | 14 | prefs_register_uint_preference(dhcp_module, "pkt.ccc.option", |
10762 | 14 | "PacketCable CCC option", |
10763 | 14 | "Option Number for PacketCable CableLabs Client Configuration", |
10764 | 14 | 10, |
10765 | 14 | &pkt_ccc_option); |
10766 | | |
10767 | 14 | prefs_register_enum_preference(dhcp_module, "uuid.endian", |
10768 | 14 | "Endianness of UUID", |
10769 | 14 | "Endianness applied to UUID fields", |
10770 | 14 | &dhcp_uuid_endian, |
10771 | 14 | dhcp_uuid_endian_vals, |
10772 | 14 | false); |
10773 | | |
10774 | 14 | prefs_register_enum_preference(dhcp_module, "secs.endian", |
10775 | 14 | "Endianness of seconds elapsed field", |
10776 | 14 | "Endianness applied to seconds elapsed field", |
10777 | 14 | &dhcp_secs_endian, |
10778 | 14 | dhcp_secs_endian_vals, |
10779 | 14 | false); |
10780 | | |
10781 | 14 | prefs_register_obsolete_preference(dhcp_module, "displayasstring"); |
10782 | | |
10783 | 14 | dhcp_uat = uat_new("Custom DHCP/BootP Options (Excl. suboptions)", |
10784 | 14 | sizeof(uat_dhcp_record_t), /* record size */ |
10785 | 14 | "custom_bootp", /* filename */ |
10786 | 14 | true, /* from_profile */ |
10787 | 14 | &uat_dhcp_records, /* data_ptr */ |
10788 | 14 | &num_dhcp_records_uat, /* numitems_ptr */ |
10789 | 14 | UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ |
10790 | 14 | NULL, /* help */ |
10791 | 14 | uat_dhcp_record_copy_cb, /* copy callback */ |
10792 | 14 | uat_dhcp_record_update_cb, /* update callback */ |
10793 | 14 | uat_dhcp_record_free_cb, /* free callback */ |
10794 | 14 | NULL, /* post update callback */ |
10795 | 14 | NULL, /* reset callback */ |
10796 | 14 | dhcp_uat_flds); /* UAT field definitions */ |
10797 | | |
10798 | 14 | prefs_register_uat_preference(dhcp_module, |
10799 | 14 | "custom_dhcp_table", |
10800 | 14 | "Custom DHCP/BootP Options (Excl. suboptions)", |
10801 | 14 | "Custom DHCP/BootP Options (Excl. suboptions)", |
10802 | 14 | dhcp_uat); |
10803 | | |
10804 | 14 | register_stat_tap_table_ui(&dhcp_stat_table); |
10805 | 14 | } |
10806 | | |
10807 | | void |
10808 | | proto_reg_handoff_dhcp(void) |
10809 | 14 | { |
10810 | 14 | range_t *dhcpopt_basictype_range; |
10811 | | |
10812 | 14 | dissector_add_uint_range_with_preference("udp.port", DHCP_UDP_PORT_RANGE, dhcp_handle); |
10813 | | |
10814 | | /* Create dissection function handles for all DHCP/BOOTP options */ |
10815 | 14 | dhcpopt_basic_handle = create_dissector_handle( dissect_dhcpopt_basic_type, proto_dhcp ); |
10816 | 14 | range_convert_str(wmem_epan_scope(), &dhcpopt_basictype_range, DHCP_OPTION_BASICTYPE_RANGE, 0xFF); |
10817 | 14 | dissector_add_uint_range("dhcp.option", dhcpopt_basictype_range, dhcpopt_basic_handle); |
10818 | | |
10819 | 14 | dissector_add_uint("dhcp.option", 21, create_dissector_handle( dissect_dhcpopt_policy_filter, proto_dhcp )); |
10820 | 14 | dissector_add_uint("dhcp.option", 33, create_dissector_handle( dissect_dhcpopt_static_route, proto_dhcp )); |
10821 | 14 | dissector_add_uint("dhcp.option", 43, create_dissector_handle( dissect_dhcpopt_vendor_specific_info, proto_dhcp )); |
10822 | 14 | dissector_add_uint("dhcp.option", 52, create_dissector_handle( dissect_dhcpopt_option_overload, proto_dhcp )); |
10823 | 14 | dissector_add_uint("dhcp.option", 53, create_dissector_handle( dissect_dhcpopt_dhcp, proto_dhcp )); |
10824 | 14 | dissector_add_uint("dhcp.option", 55, create_dissector_handle( dissect_dhcpopt_param_request_list, proto_dhcp )); |
10825 | 14 | dissector_add_uint("dhcp.option", 60, create_dissector_handle( dissect_dhcpopt_vendor_class_identifier, proto_dhcp )); |
10826 | 14 | dissector_add_uint("dhcp.option", 61, create_dissector_handle( dissect_dhcpopt_client_identifier, proto_dhcp )); |
10827 | 14 | dissector_add_uint("dhcp.option", 63, create_dissector_handle( dissect_dhcpopt_netware_ip, proto_dhcp )); |
10828 | 14 | dissector_add_uint("dhcp.option", 77, create_dissector_handle( dissect_dhcpopt_user_class_information, proto_dhcp )); |
10829 | 14 | dissector_add_uint("dhcp.option", 78, create_dissector_handle( dissect_dhcpopt_slp_directory_agent, proto_dhcp )); |
10830 | 14 | dissector_add_uint("dhcp.option", 79, create_dissector_handle( dissect_dhcpopt_slp_service_scope, proto_dhcp )); |
10831 | 14 | dissector_add_uint("dhcp.option", 81, create_dissector_handle( dissect_dhcpopt_client_full_domain_name, proto_dhcp )); |
10832 | 14 | dissector_add_uint("dhcp.option", 82, create_dissector_handle( dissect_dhcpopt_relay_agent_info, proto_dhcp )); |
10833 | 14 | dissector_add_uint("dhcp.option", 83, create_dissector_handle( dissect_dhcpopt_isns, proto_dhcp )); |
10834 | 14 | dissector_add_uint("dhcp.option", 85, create_dissector_handle( dissect_dhcpopt_novell_servers, proto_dhcp )); |
10835 | 14 | dissector_add_uint("dhcp.option", 90, create_dissector_handle( dissect_dhcpopt_dhcp_authentication, proto_dhcp )); |
10836 | 14 | dissector_add_uint("dhcp.option", 93, create_dissector_handle( dissect_dhcpopt_client_architecture, proto_dhcp )); |
10837 | 14 | dissector_add_uint("dhcp.option", 94, create_dissector_handle( dissect_dhcpopt_client_network_interface_id, proto_dhcp )); |
10838 | 14 | dissector_add_uint("dhcp.option", 97, create_dissector_handle( dissect_dhcpopt_client_identifier_uuid, proto_dhcp )); |
10839 | 14 | dissector_add_uint("dhcp.option", 99, create_dissector_handle( dissect_dhcpopt_civic_location, proto_dhcp )); |
10840 | 14 | dissector_add_uint("dhcp.option", 114, create_dissector_handle( dissect_dhcpopt_dhcp_captive_portal, proto_dhcp )); |
10841 | 14 | dissector_add_uint("dhcp.option", 117, create_dissector_handle( dissect_dhcpopt_name_server_search, proto_dhcp )); |
10842 | 14 | dissector_add_uint("dhcp.option", 119, create_dissector_handle( dissect_dhcpopt_dhcp_domain_search, proto_dhcp )); |
10843 | 14 | dissector_add_uint("dhcp.option", 120, create_dissector_handle( dissect_dhcpopt_sip_servers, proto_dhcp )); |
10844 | 14 | dissector_add_uint("dhcp.option", 121, create_dissector_handle( dissect_dhcpopt_classless_static_route, proto_dhcp )); |
10845 | | /* The PacketCable CCC option number can vary. Still handled through preference */ |
10846 | 14 | dissector_add_uint("dhcp.option", 122, create_dissector_handle( dissect_dhcpopt_packetcable_ccc, proto_dhcp )); |
10847 | | |
10848 | 14 | dissector_add_uint("dhcp.option", 123, create_dissector_handle( dissect_dhcpopt_coordinate_based_location, proto_dhcp )); |
10849 | 14 | dissector_add_uint("dhcp.option", 124, create_dissector_handle( dissect_dhcpopt_vi_vendor_class, proto_dhcp )); |
10850 | 14 | dissector_add_uint("dhcp.option", 125, create_dissector_handle( dissect_dhcpopt_vi_vendor_specific_info, proto_dhcp )); |
10851 | 14 | dissector_add_uint("dhcp.option", 145, create_dissector_handle( dissect_dhcpopt_forcerenew_nonce, proto_dhcp )); |
10852 | 14 | dissector_add_uint("dhcp.option", 146, create_dissector_handle( dissect_dhcpopt_rdnss, proto_dhcp )); |
10853 | 14 | dissector_add_uint("dhcp.option", 151, create_dissector_handle( dissect_dhcpopt_bulk_lease_status_code, proto_dhcp )); |
10854 | 14 | dissector_add_uint("dhcp.option", 152, create_dissector_handle( dissect_dhcpopt_bulk_lease_base_time, proto_dhcp )); |
10855 | 14 | dissector_add_uint("dhcp.option", 154, create_dissector_handle( dissect_dhcpopt_bulk_lease_query_start, proto_dhcp )); |
10856 | 14 | dissector_add_uint("dhcp.option", 155, create_dissector_handle( dissect_dhcpopt_bulk_lease_query_end, proto_dhcp )); |
10857 | 14 | dissector_add_uint("dhcp.option", 158, create_dissector_handle( dissect_dhcpopt_pcp_server, proto_dhcp )); |
10858 | 14 | dissector_add_uint("dhcp.option", 159, create_dissector_handle( dissect_dhcpopt_portparams, proto_dhcp )); |
10859 | 14 | dissector_add_uint("dhcp.option", 160, create_dissector_handle( dissect_dhcpopt_dhcp_captive_portal, proto_dhcp )); |
10860 | 14 | dissector_add_uint("dhcp.option", 162, create_dissector_handle( dissect_dhcpopt_dnr, proto_dhcp )); |
10861 | 14 | dissector_add_uint("dhcp.option", 212, create_dissector_handle( dissect_dhcpopt_6RD_option, proto_dhcp )); |
10862 | 14 | dissector_add_uint("dhcp.option", 242, create_dissector_handle( dissect_dhcpopt_avaya_ip_telephone, proto_dhcp )); |
10863 | 14 | dissector_add_uint("dhcp.option", 249, create_dissector_handle( dissect_dhcpopt_classless_static_route, proto_dhcp )); |
10864 | | |
10865 | | /* Create heuristic dissection for DHCP vendor class id */ |
10866 | 14 | heur_dissector_add( "dhcp.vendor_id", dissect_packetcable_mta_vendor_id_heur, "PacketCable MTA", "packetcable_mta_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10867 | 14 | heur_dissector_add( "dhcp.vendor_id", dissect_packetcable_cm_vendor_id_heur, "PacketCable CM", "packetcable_cm_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10868 | 14 | heur_dissector_add( "dhcp.vendor_id", dissect_apple_bsdp_vendor_id_heur, "Apple BSDP", "apple_bsdp_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10869 | | |
10870 | | /* Create heuristic dissection for DHCP vendor specific information */ |
10871 | | |
10872 | | /* Note that this is a rather weak (permissive) heuristic, |
10873 | | it's put first so it ends up at the end of the list, I guess this is OK. |
10874 | | Add any stronger (less permissive) heuristics after this! |
10875 | | XXX - Should we just disable by default? */ |
10876 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_alcatel_lucent_vendor_info_heur, "Alcatel-Lucent", "alcatel_lucent_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10877 | | |
10878 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_pxeclient_vendor_info_heur, "PXEClient", "pxeclient_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10879 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_cablelabs_vendor_info_heur, "CableLabs", "cablelabs_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10880 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_aruba_ap_vendor_info_heur, ARUBA_AP, "aruba_ap_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10881 | 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 ); |
10882 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_apple_bsdp_vendor_info_heur, "Apple BSDP", "apple_bsdp_info_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10883 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_aerohive_vendor_info_heur, "AEROHIVE", "aerohive_info_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10884 | 14 | heur_dissector_add( "dhcp.vendor_info", dissect_cisco_vendor_info_heur, "Cisco", "cisco_info_dhcp", proto_dhcp, HEURISTIC_ENABLE ); |
10885 | | |
10886 | | /* Create dissection function handles for DHCP Enterprise dissection */ |
10887 | 14 | dissector_add_uint("dhcp.enterprise", 4491, create_dissector_handle( dissect_vendor_cl_suboption, proto_dhcp )); |
10888 | 14 | dissector_add_uint("dhcp.enterprise", 3561, create_dissector_handle( dissect_vendor_tr111_suboption, proto_dhcp )); |
10889 | | |
10890 | 14 | svc_params_handle = find_dissector("svc_params"); |
10891 | 14 | } |
10892 | | |
10893 | | /* |
10894 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
10895 | | * |
10896 | | * Local variables: |
10897 | | * c-basic-offset: 8 |
10898 | | * tab-width: 8 |
10899 | | * indent-tabs-mode: t |
10900 | | * End: |
10901 | | * |
10902 | | * vi: set shiftwidth=8 tabstop=8 noexpandtab: |
10903 | | * :indentSize=8:tabSize=8:noTabs=false: |
10904 | | */ |