### Bug Summary

File: | epan/dissectors/packet-dhcpv6.c
Warning: | line 3414, column 9 Value stored to 'offset' is never read

### Annotated Source Code

Press '?' to see keyboard shortcuts

Show analyzer invocation
clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-dhcpv6.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -ffloat16-excess-precision=fast -fbfloat16-excess-precision=fast -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/builds/wireshark/wireshark/build -fcoverage-compilation-dir=/builds/wireshark/wireshark/build -resource-dir /usr/lib/llvm-21/lib/clang/21 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /builds/wireshark/wireshark/epan/dissectors -isystem /builds/wireshark/wireshark/build/epan/dissectors -isystem /usr/include/mit-krb5 -isystem /usr/include/libxml2 -isystem /builds/wireshark/wireshark/epan -D G_DISABLE_DEPRECATED -D G_DISABLE_SINGLE_INCLUDES -D WS_BUILD_DLL -D WS_DEBUG -D WS_DEBUG_UTF_8 -I /builds/wireshark/wireshark/build -I /builds/wireshark/wireshark -I /builds/wireshark/wireshark/include -D _GLIBCXX_ASSERTIONS -internal-isystem /usr/lib/llvm-21/lib/clang/21/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -Wno-format-truncation -Wno-format-nonliteral -Wno-pointer-sign -std=gnu11 -ferror-limit 19 -fvisibility=hidden -fwrapv -fwrapv-pointer -fstrict-flex-arrays=3 -stack-protector 2 -fstack-clash-protection -fcf-protection=full -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fexceptions -fcolor-diagnostics -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /builds/wireshark/wireshark/sbout/2025-11-03-100323-3624-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-dhcpv6.c

Keyboard shortcuts:

- Use 'j/k' keys for keyboard navigation
- Use 'Shift+S' to show/hide relevant lines
- Use '?' to toggle this window

Close
Show only relevant lines Show control flow arrows

1 | /* packet-dhcpv6.c
2 | * Routines for DHCPv6 packet disassembly
3 | * Copyright 2004, Nicolas DICHTEL - 6WIND - <nicolas.dichtel@6wind.com>
4 | * Jun-ichiro itojun Hagino <itojun@iijlab.net>
5 | * IItom Tsutomu MIENO <iitom@utouto.com>
6 | * SHIRASAKI Yasuhiro <yasuhiro@gnome.gr.jp>
7 | * Tony Lindstrom <tony.lindstrom@ericsson.com>
8 | * Copyright 2012, Jerome LAFORGE <jerome.laforge@gmail.com>
9 | *
10 | * The information used comes from:
11 | * RFC1034 (DOMAIN NAMES - CONCEPTS AND FACILITIES)
12 | * RFC1035 (DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION)
13 | * RFC1535 (A Security Problem with DNS) [clear definition of Partial names]
14 | * RFC2181 (Clarifications to the DNS Specification)
15 | * RFC3319 (SIP options)
16 | * RFC3633 (Prefix options) replaces draft-ietf-dhc-dhcpv6-opt-lifetime-00
17 | * RFC3646 (DNS Configuration options for DHCP for IPv6 (DHCPv6))
18 | * RFC3898 (NIS options)
19 | * RFC4075 (SNTP - Configuration Option for DHCPv6)
20 | - replaces "draft-ietf-dhc-dhcpv6-opt-timeconfig-03"
21 | * RFC4242 (Information Refresh Time Option)
22 | * RFC4280 (Broadcast and Multicast Control Servers Options)
23 | * RFC4649 (Remote ID option)
24 | * RFC4704 (DHCPv6 Client FQDN Option)
25 | * RFC5007 (DHCPv6 Leasequery)
26 | * RFC5417 (CAPWAP Access Controller DHCP Option)
27 | * RFC5460 (DHCPv6 Bulk Leasequery)
28 | * RFC5678 (DHCP Options for IEEE 802.21 Mobility Services (MoS) Discovery)
29 | * RFC5908 (Network Time Protocol (NTP) Server Option)
30 | * RFC5970 (DHCPv6 Options for Network Boot)
31 | * RFC6334 (Dual-Stack Lite Option)
32 | * RFC6422 (Relay-Supplied DHCP Options)
33 | * RFC6603 (Prefix Exclude Option)
34 | * RFC6607 (Virtual Subnet Selection Options for DHCPv4 and DHCPv6)
35 | * RFC6610 (DHCP Options for Home Information Discovery in Mobile IPv6 (MIPv6))
36 | * RFC6939 (Client Link-Layer Address Option in DHCPv6)
37 | * RFC7037 (RADIUS Option for the DHCPv6 Relay Agent)
38 | * RFC7598 (Configuration of Softwire Address and Port-Mapped Clients)
39 | * RFC8415 (Dynamic Host Configuration Protocol for IPv6 (DHCPv6))
40 | * RFC8520 (Manufacturer Usage Descriptions) replaces "draft-ietf-opsawg-mud-02"
41 | * RFC8947 (Link-Layer Address Assignment Mechanism for DHCPv6)
42 | * RFC9463 (Discovery of Network-designated Resolvers - DoT, DoH, DoQ)
43 | * RFC9527 (DHCPv6 Options for the Homenet Naming Authority)
44 | * RFC9686 (Registering self-generated addresses)
45 | * draft-ietf-dhc-rfc8415bis-12 (Dynamic Host Configuration Protocol for IPv6 (DHCPv6))
46 | * Submitted to IESG for Publication - replace references in comments after publication
47 | * CL-SP-CANN-DHCP-Reg-I15-180509 (CableLabs' DHCP Options Registry) latest
48 | *
49 | * Note that protocol constants are still subject to change, based on IANA
50 | * assignment decisions.
51 | *
52 | * Wireshark - Network traffic analyzer
53 | * By Gerald Combs <gerald@wireshark.org>
54 | * Copyright 1998 Gerald Combs
55 | *
56 | * SPDX-License-Identifier: GPL-2.0-or-later
57 | */
58 |
59 | #include "config.h"
60 |
61 | #include <epan/packet.h>
62 | #include <epan/addr_resolv.h>
63 | #include <epan/expert.h>
64 | #include <epan/prefs.h>
65 | #include <epan/arptypes.h>
66 | #include <epan/sminmpec.h>
67 | #include <epan/strutil.h>
68 | #include <epan/tfs.h>
69 | #include <epan/unit_strings.h>
70 | #include "packet-tcp.h"
71 | #include "packet-arp.h"
72 | #include "packet-dns.h"
73 | #include "packet-radius.h"
74 |
75 | void proto_register_dhcpv6(void);
76 | void proto_reg_handoff_dhcpv6(void);
77 |
78 | static bool_Bool dhcpv6_bulk_leasequery_desegment = true1;
79 | static bool_Bool cablelabs_interface_id;
80 |
81 | static int proto_dhcpv6;
82 | static int proto_dhcpv6_bulk_leasequery;
83 | static int proto_dhcpv6_cablelabs;
84 |
85 | static int hf_dhcpv6_msgtype;
86 | static int hf_clientfqdn_bad_msgtype;
87 | static int hf_clientfqdn_flags;
88 | static int hf_clientfqdn_client_n;
89 | static int hf_clientfqdn_client_s;
90 | static int hf_clientfqdn_server_n;
91 | static int hf_clientfqdn_server_o;
92 | static int hf_clientfqdn_server_s;
93 | static int hf_option_type_str;
94 | static int hf_option_type_num;
95 | static int hf_option_length;
96 | static int hf_option_data;
97 | static int hf_empty_domain_name;
98 | static int hf_remoteid_enterprise;
99 | static int hf_vendoropts_enterprise;
100 | static int hf_duid_bytes;
101 | static int hf_duid_type;
102 | static int hf_duidllt_time;
103 | static int hf_duidllt_link_layer_addr;
104 | static int hf_duidllt_link_layer_addr_ether;
105 | static int hf_duidllt_hwtype;
106 | static int hf_duidll_hwtype;
107 | static int hf_duiden_enterprise;
108 | static int hf_duiden_identifier;
109 | static int hf_duidll_link_layer_addr;
110 | static int hf_duidll_link_layer_addr_ether;
111 | static int hf_duiduuid_bytes;
112 | static int hf_iaid;
113 | static int hf_iaid_t1;
114 | static int hf_iaid_t2;
115 | static int hf_iata;
116 | static int hf_iaaddr_ip;
117 | static int hf_iaaddr_pref_lifetime;
118 | static int hf_iaaddr_valid_lifetime;
119 | static int hf_lladdr_linklayer_type;
120 | static int hf_lladdr_linklayer_len;
121 | static int hf_lladdr_linklayer_addr;
122 | static int hf_lladdr_linklayer_addr_ether;
123 | static int hf_lladdr_extra_addr;
124 | static int hf_lladdr_valid_lifetime;
125 | static int hf_requested_option_code;
126 | static int hf_option_preference;
127 | static int hf_elapsed_time;
128 | static int hf_auth_protocol;
129 | static int hf_auth_algorithm;
130 | static int hf_auth_rdm;
131 | static int hf_auth_replay_detection;
132 | static int hf_auth_info;
133 | static int hf_auth_realm;
134 | static int hf_auth_key_id;
135 | static int hf_auth_md5_data;
136 | static int hf_opt_unicast;
137 | static int hf_opt_status_code;
138 | static int hf_opt_status_msg;
139 | static int hf_vendorclass_enterprise;
140 | static int hf_vendorclass_data;
141 | static int hf_vendoropts_enterprise_option_code;
142 | static int hf_vendoropts_enterprise_option_length;
143 | static int hf_vendoropts_enterprise_option_data;
144 | static int hf_interface_id;
145 | static int hf_reconf_msg;
146 | static int hf_sip_server_domain_search_fqdn;
147 | static int hf_sip_server_a;
148 | static int hf_dns_servers;
149 | static int hf_dhcp4o6_servers;
150 | static int hf_domain_search_list_entry;
151 | static int hf_nis_servers;
152 | static int hf_nisp_servers;
153 | static int hf_nis_fqdn;
154 | static int hf_nisp_fqdn;
155 | static int hf_sntp_servers;
156 | static int hf_opt_lifetime;
157 | static int hf_bcmcs_servers_fqdn;
158 | static int hf_bcmcs_servers_a;
159 | static int hf_remoteid_enterprise_id;
160 | static int hf_subscriber_id;
161 | static int hf_client_fqdn;
162 | static int hf_pana_agent;
163 | static int hf_opt_timezone;
164 | static int hf_opt_tzdb;
165 | static int hf_lq_query;
166 | static int hf_lq_query_link_address;
167 | static int hf_clt_time;
168 | static int hf_lq_relay_data_peer_addr;
169 | static int hf_lq_relay_data_msg;
170 | static int hf_lq_client_link;
171 | static int hf_capwap_ac_v6;
172 | static int hf_aftr_name;
173 | static int hf_bootfile_url;
174 | static int hf_bootfile_param_len;
175 | static int hf_bootfile_param_data;
176 | static int hf_nii_type;
177 | static int hf_nii_major;
178 | static int hf_nii_minor;
179 | static int hf_client_arch_type;
180 | static int hf_mos_address_code;
181 | static int hf_mos_address_len;
182 | static int hf_mos_address_ipv6_addr;
183 | static int hf_mos_address_ipv6_fqdn;
184 | static int hf_mip6_hnidf_fqdn;
185 | static int hf_mip6_hnp_pref_len;
186 | static int hf_mip6_hnp_pref_addr;
187 | static int hf_mip6_haa_addr;
188 | static int hf_mip6_haf_fqdn;
189 | static int hf_homenet_registered_domain;
190 | static int hf_homenet_fwd_dist_mgr;
191 | static int hf_homenet_rev_dist_mgr;
192 | static int hf_homenet_transport;
193 | static int hf_homenet_transport_reserved_flag;
194 | static int hf_homenet_transport_mtls_flag;
195 | static int hf_iaprefix_pref_lifetime;
196 | static int hf_iaprefix_valid_lifetime;
197 | static int hf_iaprefix_pref_len;
198 | static int hf_iaprefix_pref_addr;
199 | static int hf_pd_exclude_pref_len;
200 | static int hf_pd_exclude_subnet_id;
201 | static int hf_option_captive_portal;
202 | static int hf_option_s46_option_code;
203 | static int hf_option_failover_binding_status;
204 | static int hf_option_failover_connect_flags;
205 | static int hf_option_failover_connect_reserved_flag;
206 | static int hf_option_failover_connect_f_flag;
207 | static int hf_option_failover_dns_hostname;
208 | static int hf_option_failover_dns_zonename;
209 | static int hf_option_failover_dns_flags;
210 | static int hf_option_failover_dns_reserved_flag;
211 | static int hf_option_failover_dns_u_flag;
212 | static int hf_option_failover_dns_s_flag;
213 | static int hf_option_failover_dns_r_flag;
214 | static int hf_option_failover_dns_f_flag;
215 | static int hf_option_failover_expiration_time;
216 | static int hf_option_failover_max_unacked_bndupd;
217 | static int hf_option_failover_mclt;
218 | static int hf_option_failover_partner_lifetime;
219 | static int hf_option_failover_partner_lifetime_sent;
220 | static int hf_option_failover_partner_downtime;
221 | static int hf_option_failover_partner_raw_clt_time;
222 | static int hf_option_failover_major_version;
223 | static int hf_option_failover_minor_version;
224 | static int hf_option_failover_keepalive_time;
225 | static int hf_option_failover_reconfigure_time;
226 | static int hf_option_failover_reconfigure_key;
227 | static int hf_option_failover_relationship_name;
228 | static int hf_option_failover_server_flags;
229 | static int hf_option_failover_server_reserved_flag;
230 | static int hf_option_failover_server_a_flag;
231 | static int hf_option_failover_server_s_flag;
232 | static int hf_option_failover_server_c_flag;
233 | static int hf_option_failover_server_state;
234 | static int hf_option_failover_start_time_of_state;
235 | static int hf_option_failover_state_expiration_time;
236 | static int hf_option_relay_port;
237 | static int hf_dhcpv6_hopcount;
238 | static int hf_dhcpv6_xid;
239 | static int hf_dhcpv6_peeraddr;
240 | static int hf_dhcpv6_linkaddr;
241 | static int hf_opt_mudurl;
242 | static int hf_option_userclass_length;
243 | static int hf_option_userclass_opaque_data;
244 | static int hf_option_ntpserver_type;
245 | static int hf_option_ntpserver_length;
246 | static int hf_option_ntpserver_addr;
247 | static int hf_option_ntpserver_mc_addr;
248 | static int hf_option_ntpserver_fqdn;
249 | static int hf_option_vss_type;
250 | static int hf_option_vss_info_nvt;
251 | static int hf_option_vss_info_vpn_id;
252 | static int hf_packetcable_ccc_suboption;
253 | static int hf_packetcable_ccc_pri_dhcp;
254 | static int hf_packetcable_ccc_sec_dhcp;
255 | static int hf_packetcable_cccV6_suboption;
256 | static int hf_packetcable_cccV6_pri_dss;
257 | static int hf_packetcable_cccV6_sec_dss;
258 | static int hf_packetcable_cccV6_prov_srv_type;
259 | static int hf_packetcable_cccV6_prov_srv_fqdn;
260 | static int hf_packetcable_cccV6_prov_srv_ipv6;
261 | static int hf_packetcable_cccV6_as_krb_nominal_timeout;
262 | static int hf_packetcable_cccV6_as_krb_max_timeout;
263 | static int hf_packetcable_cccV6_as_krb_max_retry_count;
264 | static int hf_packetcable_cccV6_ap_krb_nominal_timeout;
265 | static int hf_packetcable_cccV6_ap_krb_max_timeout;
266 | static int hf_packetcable_cccV6_ap_krb_max_retry_count;
267 | static int hf_packetcable_cccV6_krb_realm;
268 | static int hf_packetcable_cccV6_tgt_flag;
269 | static int hf_packetcable_cccV6_tgt_flag_fetch;
270 | static int hf_packetcable_cccV6_prov_timer;
271 | static int hf_packetcable_cccV6_sec_tcm;
272 | static int hf_packetcable_cccV6_sec_tcm_provisioning_server;
273 | static int hf_packetcable_cccV6_sec_tcm_call_manager_server;
274 | static int hf_cablelabs_opts;
275 | static int hf_modem_capabilities_encoding_type;
276 | static int hf_eue_capabilities_encoding_type;
277 | static int hf_capabilities_encoding_length;
278 | static int hf_capabilities_encoding_bytes;
279 | static int hf_capabilities_encoding_number;
280 | static int hf_cablelabs_ipv6_server;
281 | static int hf_cablelabs_docsis_version_number;
282 | static int hf_cablelabs_dpoe_server_version_number;
283 | static int hf_cablelabs_interface_id;
284 | static int hf_cablelabs_interface_id_link_address;
285 | static int hf_option_s46_rule_flags;
286 | static int hf_option_s46_rule_reserved_flag;
287 | static int hf_option_s46_rule_fmr_flag;
288 | static int hf_option_s46_rule_ea_len;
289 | static int hf_option_s46_rule_ipv4_pref_len;
290 | static int hf_option_s46_rule_ipv4_prefix;
291 | static int hf_option_s46_rule_ipv6_pref_len;
292 | static int hf_option_s46_rule_ipv6_prefix;
293 | static int hf_option_s46_br_address;
294 | static int hf_option_s46_dmr_pref_len;
295 | static int hf_option_s46_dmr_prefix;
296 | static int hf_option_s46_v4v6bind_ipv4_address;
297 | static int hf_option_s46_v4v6bind_ipv6_pref_len;
298 | static int hf_option_s46_v4v6bind_ipv6_prefix;
299 | static int hf_option_s46_portparam_offset;
300 | static int hf_option_s46_portparam_psid_len;
301 | static int hf_option_s46_portparam_psid;
302 | static int hf_client_link_layer_addr_hwtype;
303 | static int hf_client_link_layer_addr;
304 | static int hf_client_link_layer_addr_ether;
305 |
306 | static int hf_dnr_svcpriority;
307 | static int hf_dnr_auth_domain_name_len;
308 | static int hf_dnr_auth_domain_name;
309 | static int hf_dnr_addrs_len;
310 | static int hf_dnr_addrs;
311 |
312 | static int hf_dhcpv6_non_dns_encoded_name;
313 | static int hf_dhcpv6_domain_field_len_exceeded;
314 | static int hf_dhcpv6_decoded_portion;
315 | static int hf_dhcpv6_encoded_fqdn_len_gt_255;
316 | static int hf_dhcpv6_root_only_domain_name;
317 | static int hf_dhcpv6_tld;
318 | static int hf_dhcpv6_partial_name_preceded_by_fqdn;
319 |
320 | static int ett_dhcpv6;
321 | static int ett_dhcpv6_option;
322 | static int ett_dhcpv6_option_vsoption;
323 | static int ett_dhcpv6_vendor_option;
324 | static int ett_dhcpv6_pkt_option;
325 | static int ett_dhcpv6_userclass_option;
326 | static int ett_dhcpv6_netserver_option;
327 | static int ett_dhcpv6_tlv5_type;
328 | static int ett_dhcpv6_sip_server_domain_search_list_option;
329 | static int ett_dhcpv6_dns_domain_search_list_option;
330 | static int ett_dhcpv6_nis_domain_name_option;
331 | static int ett_dhcpv6_nisp_domain_name_option;
332 | static int ett_dhcpv6_bcmcs_servers_domain_search_list_option;
333 | static int ett_dhcpv6_s46_rule_flags;
334 | static int ett_dhcpv6_failover_connect_flags;
335 | static int ett_dhcpv6_failover_dns_flags;
336 | static int ett_dhcpv6_failover_server_flags;
337 | static int ett_dhcpv6_homenet_transport_flags;
338 | static int ett_clientfqdn_flags;
339 | static int ett_clientfqdn_expert;
340 |
341 | /* Expert fields relating to domain names */
342 | static expert_field ei_dhcpv6_non_dns_encoded_name;
343 | static expert_field ei_dhcpv6_domain_field_len_exceeded;
344 | static expert_field ei_dhcpv6_encoded_fqdn_len_gt_255;
345 | static expert_field ei_dhcpv6_root_only_domain_name;
346 | static expert_field ei_dhcpv6_tld_lookup;
347 | static expert_field ei_dhcpv6_partial_name_preceded_by_fqdn;
348 | /*
349 | * Expert fields triggered in dhcpv6_option() and others */
350 | static expert_field ei_dhcpv6_bogus_length;
351 | static expert_field ei_dhcpv6_malformed_option;
352 | static expert_field ei_dhcpv6_deprecated_option;
353 | static expert_field ei_dhcpv6_obsoleted_option;
354 | static expert_field ei_dhcpv6_no_suboption_len;
355 | static expert_field ei_dhcpv6_invalid_time_value;
356 | static expert_field ei_dhcpv6_invalid_type;
357 | static expert_field ei_dhcpv6_error_hopcount;
358 | static expert_field ei_dhcpv6_clientfqdn_bad_msgtype;
359 | static expert_field ei_dhcpv6_s_bit_should_be_zero;
360 | static expert_field ei_dhcpv6_dnr_adn_only_mode;
361 |
362 |
363 | static int hf_dhcpv6_bulk_leasequery_size;
364 | static int hf_dhcpv6_bulk_leasequery_msgtype;
365 | static int hf_dhcpv6_bulk_leasequery_reserved;
366 | static int hf_dhcpv6_bulk_leasequery_trans_id;
367 |
368 | static int ett_dhcpv6_bulk_leasequery;
369 | static int ett_dhcpv6_bulk_leasequery_options;
370 |
371 | static expert_field ei_dhcpv6_bulk_leasequery_bad_query_type;
372 | static expert_field ei_dhcpv6_bulk_leasequery_bad_msg_type;
373 |
374 | static dissector_handle_t dhcpv6_handle;
375 | static dissector_handle_t dhcpv6_cablelabs_handle;
376 | static dissector_handle_t dhcpv4_handle;
377 | static dissector_handle_t svc_params_handle;
378 |
379 | static dissector_table_t dhcpv6_enterprise_opts_dissector_table;
380 |
381 | #define DHCPV6_HW_IS_ETHER(hwtype, length)((hwtype == 1 || hwtype == 6) && length == 6) ((hwtype == 1 || hwtype == 6) && length == 6)
382 |
383 | #define TCP_PORT_DHCPV6_UPSTREAM547 547
384 | #define UDP_PORT_DHCPV6_RANGE"546-547" "546-547" /* Downstream + Upstream */
385 | #define HOP_COUNT_LIMIT32 32
386 |
387 | /*
388 | * IANA Ref:
389 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-1
390 | */
391 |
392 | /********************************************************************************************/
393 | /********************************** MESSAGE TYPES *******************************************/
394 | /********************************************************************************************/
395 | /* SENT BY */
396 | /* ------- */
397 | #define SOLICIT1 1 /* CLIENT */
398 | #define ADVERTISE2 2 /* SERVER(S) */
399 | #define REQUEST3 3 /* CLIENT */
400 | #define CONFIRM4 4 /* CLIENT */
401 | #define RENEW5 5 /* CLIENT */
402 | #define REBIND6 6 /* CLIENT */
403 | #define REPLY7 7 /* SERVER(S) */
404 | #define RELEASE8 8 /* CLIENT */
405 | #define DECLINE9 9 /* CLIENT */
406 | #define RECONFIGURE10 10 /* SERVER(S) (see 18-19) */
407 | #define INFORMATION_REQUEST11 11 /* CLIENT */
408 | #define RELAY_FORW12 12 /* relay agents */
409 | #define RELAY_REPLY13 13 /* relay agents */
410 | #define LEASEQUERY14 14 /* */
411 | #define LEASEQUERY_REPLY15 15 /* */
412 | #define LEASEQUERY_DONE16 16 /* */
413 | #define LEASEQUERY_DATA17 17 /* */
414 | #define RECONFIGURE_REQUEST18 18 /* SERVER (Server requests client to send requests) */
415 | #define RECONFIGURE_REPLY19 19 /* CLIENT (Client replies with the requested requests) */
416 |
417 | #define DHCPV4_QUERY20 20 /* [RFC7341] */
418 | #define DHCPV4_RESPONSE21 21 /* [RFC7341] */
419 | #define ADDR_REG_INFORM36 36 /* [RFC9686] */
420 | #define ADDR_REG_REPLY37 37 /* [RFC9686] */
421 | /* TODO: add support the following message types
422 | #define ACTIVELEASEQUERY 22 [RFC7653]
423 | #define STARTTLS 23 [RFC7653]
424 | #define BNDUPD 24 [RFC8156]
425 | #define BNDREPLY 25 [RFC8156]
426 | #define POOLREQ 26 [RFC8156]
427 | #define POOLRESP 27 [RFC8156]
428 | #define UPDREQ 28 [RFC8156]
429 | #define UPDREQALL 29 [RFC8156]
430 | #define UPDDONE 30 [RFC8156]
431 | #define CONNECT 31 [RFC8156]
432 | #define CONNECTREPLY 32 [RFC8156]
433 | #define DISCONNECT 33 [RFC8156]
434 | #define STATE 34 [RFC8156]
435 | #define CONTACT 35 [RFC8156]
436 | 38-255 Unassigned
437 | *********************************************************************************************/
438 |
439 | static const value_string msgtype_vals[] = {
440 | { SOLICIT1, "Solicit" },
441 | { ADVERTISE2, "Advertise" },
442 | { REQUEST3, "Request" },
443 | { CONFIRM4, "Confirm" },
444 | { RENEW5, "Renew" },
445 | { REBIND6, "Rebind" },
446 | { REPLY7, "Reply" },
447 | { RELEASE8, "Release" },
448 | { DECLINE9, "Decline" },
449 | { RECONFIGURE10, "Reconfigure" },
450 | { INFORMATION_REQUEST11, "Information-request" },
451 | { RELAY_FORW12, "Relay-forw" },
452 | { RELAY_REPLY13, "Relay-reply" },
453 | { LEASEQUERY14, "Leasequery" },
454 | { LEASEQUERY_REPLY15, "Leasequery-reply" },
455 | { LEASEQUERY_DONE16, "Leasequery-done" },
456 | { LEASEQUERY_DATA17, "Leasequery-data" },
457 | { RECONFIGURE_REQUEST18, "Reconfigure-request" },
458 | { RECONFIGURE_REPLY19, "Reconfigure-reply" },
459 | { DHCPV4_QUERY20, "4o6 Query" },
460 | { DHCPV4_RESPONSE21, "4o6 Response" },
461 | { ADDR_REG_INFORM36, "Address Registration Inform" },
462 | { ADDR_REG_REPLY37, "Address Registration Reply" },
463 | { 0, NULL((void*)0) }
464 | };
465 | static value_string_ext msgtype_vals_ext = VALUE_STRING_EXT_INIT(msgtype_vals){ _try_val_to_str_ext_init, 0, (sizeof (msgtype_vals) / sizeof ((msgtype_vals)[0]))-1, msgtype_vals, "msgtype_vals", ((void *)0) };
466 |
467 | /*
468 | * IANA Ref:
469 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2
470 | */
471 |
472 | /********************************************************************************************/
473 | /**************************************** OPTIONS *******************************************/
474 | /********************************************************************************************/
475 | #define OPTION_CLIENTID1 1
476 | #define OPTION_SERVERID2 2
477 | #define OPTION_IA_NA3 3
478 | #define OPTION_IA_TA4 4
479 | #define OPTION_IAADDR5 5
480 | #define OPTION_ORO6 6
481 | #define OPTION_PREFERENCE7 7
482 | #define OPTION_ELAPSED_TIME8 8
483 | #define OPTION_RELAY_MSG9 9
484 | /* 10 - Unassigned */
485 | #define OPTION_AUTH11 11
486 | #define OPTION_UNICAST12 12
487 | #define OPTION_STATUS_CODE13 13
488 | #define OPTION_RAPID_COMMIT14 14
489 | #define OPTION_USER_CLASS15 15
490 | #define OPTION_VENDOR_CLASS16 16
491 | #define OPTION_VENDOR_OPTS17 17
492 | #define OPTION_INTERFACE_ID18 18
493 | #define OPTION_RECONF_MSG19 19
494 | #define OPTION_RECONF_ACCEPT20 20
495 | #define OPTION_SIP_SERVER_D21 21 /* RFC 3319 */
496 | #define OPTION_SIP_SERVER_A22 22 /* RFC 3319 */
497 | #define OPTION_DNS_SERVERS23 23 /* RFC 3646 */
498 | #define OPTION_DOMAIN_LIST24 24 /* RFC 3646 */
499 | #define OPTION_IA_PD25 25 /* RFC 3633 */
500 | #define OPTION_IAPREFIX26 26 /* RFC 3633 */
501 | #define OPTION_NIS_SERVERS27 27 /* RFC 3898 */
502 | #define OPTION_NISP_SERVERS28 28 /* RFC 3898 */
503 | #define OPTION_NIS_DOMAIN_NAME29 29 /* RFC 3898 */
504 | #define OPTION_NISP_DOMAIN_NAME30 30 /* RFC 3898 */
505 | #define OPTION_SNTP_SERVERS31 31 /* RFC 4075 */
506 | #define OPTION_LIFETIME32 32 /* RFC 4242: OPTION_INFORMATION_REFRESH_TIME */
507 | #define OPTION_BCMCS_SERVER_D33 33 /* RFC 4280 */
508 | #define OPTION_BCMCS_SERVER_A34 34 /* RFC 4280 */
509 | /* 35 - Unassigned */
510 | #define OPTION_GEOCONF_CIVIC36 36 /* RFC 4776 */
511 | #define OPTION_REMOTE_ID37 37 /* RFC 4649 */
512 | #define OPTION_SUBSCRIBER_ID38 38 /* RFC 4580 */
513 | #define OPTION_CLIENT_FQDN39 39 /* RFC 4704 */
514 | #define OPTION_PANA_AGENT40 40 /* RFC 5192 */
515 | #define OPTION_TIME_ZONE41 41 /* RFC 4833: OPTION_NEW_POSIX_TIMEZONE */
516 | #define OPTION_TZDB42 42 /* RFC 4833: OPTION_NEW_TZDB_TIMEZONE */
517 | #define OPTION_ERO43 43 /* RFC 4994 */
518 | #define OPTION_LQ_QUERY44 44 /* RFC 5007 */
519 | #define OPTION_CLIENT_DATA45 45 /* RFC 5007 */
520 | #define OPTION_CLT_TIME46 46 /* RFC 5007 */
521 | #define OPTION_LQ_RELAY_DATA47 47 /* RFC 5007 */
522 | #define OPTION_LQ_CLIENT_LINK48 48 /* RFC 5007 */
523 | #define OPTION_MIP6_HNIDF49 49 /* RFC 6610 */
524 | #define OPTION_MIP6_VDINF50 50 /* RFC 6610 */
525 | #define OPTION_V6_LOST51 51 /* RFC 5223 */
526 | #define OPTION_CAPWAP_AC_V652 52 /* RFC 5417 */
527 | #define OPTION_RELAYID53 53 /* RFC 5460 */
528 | #define OPTION_IPV6_ADDRESS_MOS54 54 /* RFC 5678: OPTION-IPv6_Address-MoS */
529 | #define OPTION_IPV6_FQDN_MOS55 55 /* RFC 5678: OPTION-IPv6_FQDN-MoS */
530 | #define OPTION_NTP_SERVER56 56 /* RFC 5908 */
531 | #define OPTION_V6_ACCESS_DOMAIN57 57 /* RFC 5986 */
532 | #define OPTION_SIP_UA_CS_LIST58 58 /* RFC 6011 */
533 | #define OPTION_BOOTFILE_URL59 59 /* RFC 5970: OPT_BOOTFILE_URL */
534 | #define OPTION_BOOTFILE_PARAM60 60 /* RFC 5970: OPT_BOOTFILE_PARAM */
535 | #define OPTION_CLIENT_ARCH_TYPE61 61 /* RFC 5970 */
536 | #define OPTION_NII62 62 /* RFC 5970 */
537 | #define OPTION_GEOLOCATION63 63 /* RFC 6225 */
538 | #define OPTION_AFTR_NAME64 64 /* RFC 6334 */
539 | #define OPTION_ERP_LOCAL_DOMAIN_NAME65 65 /* RFC 6440 */
540 | #define OPTION_RSOO66 66 /* RFC 6422 */
541 | #define OPTION_PD_EXCLUDE67 67 /* RFC 6603 */
542 | #define OPTION_VSS68 68 /* RFC 6607 */
543 | #define OPTION_MIP6_IDINF69 69 /* RFC 6610 */
544 | #define OPTION_MIP6_UDINF70 70 /* RFC 6610 */
545 | #define OPTION_MIP6_HNP71 71 /* RFC 6610 */
546 | #define OPTION_MIP6_HAA72 72 /* RFC 6610 */
547 | #define OPTION_MIP6_HAF73 73 /* RFC 6610 */
548 | #define OPTION_RDNSS_SELECTION74 74 /* RFC 6731 */
549 | #define OPTION_KRB_PRINCIPAL_NAME75 75 /* RFC 6784 */
550 | #define OPTION_KRB_REALM_NAME76 76 /* RFC 6784 */
551 | #define OPTION_KRB_DEFAULT_REALM_NAME77 77 /* RFC 6784 */
552 | #define OPTION_KRB_KDC78 78 /* RFC 6784 */
553 | #define OPTION_CLIENT_LINKLAYER_ADDR79 79 /* RFC 6939 */
554 | #define OPTION_LINK_ADDRESS80 80 /* RFC 6977 */
555 | #define OPTION_RADIUS81 81 /* RFC 7037 */
556 | #define OPTION_SOL_MAX_RT82 82 /* RFC 7083 */
557 | #define OPTION_INF_MAX_RT83 83 /* RFC 7083 */
558 | #define OPTION_ADDRSEL84 84 /* RFC 7078 */
559 | #define OPTION_ADDRSEL_TABLE85 85 /* RFC 7078 */
560 | #define OPTION_V6_PCP_SERVER86 86 /* RFC 7291 */
561 | #define OPTION_DHCPV4_MSG87 87 /* RFC 7341 */
562 | #define OPTION_DHCP4_O_DHCP6_SERVER88 88 /* RFC 7341 */
563 | #define OPTION_S46_RULE89 89 /* RFC 7598 */
564 | #define OPTION_S46_BR90 90 /* RFC 7598 */
565 | #define OPTION_S46_DMR91 91 /* RFC 7598 */
566 | #define OPTION_S46_V4V6BIND92 92 /* RFC 7598 */
567 | #define OPTION_S46_PORTPARAMS93 93 /* RFC 7598 */
568 | #define OPTION_S46_CONT_MAPE94 94 /* RFC 7598 */
569 | #define OPTION_S46_CONT_MAPT95 95 /* RFC 7598 */
570 | #define OPTION_S46_CONT_LW96 96 /* RFC 7598 */
571 | #define OPTION_4RD97 97 /* RFC 7600 */
572 | #define OPTION_4RD_MAP_RULE98 98 /* RFC 7600 */
573 | #define OPTION_4RD_NON_MAP_RULE99 99 /* RFC 7600 */
574 | #define OPTION_LQ_BASE_TIME100 100 /* RFC 7653 */
575 | #define OPTION_LQ_START_TIME101 101 /* RFC 7653 */
576 | #define OPTION_LQ_END_TIME102 102 /* RFC 7653 */
577 | #define OPTION_CAPTIVE_PORTAL103 103 /* RFC 7710: DHCP Captive-Portal */
578 | #define OPTION_MPL_PARAMETERS104 104 /* RFC 7774 */
579 | #define OPTION_ANI_ATT105 105 /* RFC 7839 */
580 | #define OPTION_ANI_NETWORK_NAME106 106 /* RFC 7839 */
581 | #define OPTION_ANI_AP_NAME107 107 /* RFC 7839 */
582 | #define OPTION_ANI_AP_BSSID108 108 /* RFC 7839 */
583 | #define OPTION_ANI_OPERATOR_ID109 109 /* RFC 7839 */
584 | #define OPTION_ANI_OPERATOR_REALM110 110 /* RFC 7839 */
585 | #define OPTION_S46_PRIORITY111 111 /* RFC 8026 */
586 | #define OPTION_MUDURL112 112 /* MUDURL */
587 | #define OPTION_V6_PREFIX64113 113 /* RFC 8115 */
588 | #define OPTION_F_BINDING_STATUS114 114 /* RFC 8156 */
589 | #define OPTION_F_CONNECT_FLAGS115 115 /* RFC 8156 */
590 | #define OPTION_F_DNS_REMOVAL_INFO116 116 /* RFC 8156 */
591 | #define OPTION_F_DNS_HOST_NAME117 117 /* RFC 8156 */
592 | #define OPTION_F_DNS_ZONE_NAME118 118 /* RFC 8156 */
593 | #define OPTION_F_DNS_FLAGS119 119 /* RFC 8156 */
594 | #define OPTION_F_EXPIRATION_TIME120 120 /* RFC 8156 */
595 | #define OPTION_F_MAX_UNACKED_BNDUPD121 121 /* RFC 8156 */
596 | #define OPTION_F_MCLT122 122 /* RFC 8156 */
597 | #define OPTION_F_PARTNER_LIFETIME123 123 /* RFC 8156 */
598 | #define OPTION_F_PARTNER_LIFETIME_SENT124 124 /* RFC 8156 */
599 | #define OPTION_F_PARTNER_DOWN_TIME125 125 /* RFC 8156 */
600 | #define OPTION_F_PARTNER_RAW_CLT_TIME126 126 /* RFC 8156 */
601 | #define OPTION_F_PROTOCOL_VERSION127 127 /* RFC 8156 */
602 | #define OPTION_F_KEEPALIVE_TIME128 128 /* RFC 8156 */
603 | #define OPTION_F_RECONFIGURE_DATA129 129 /* RFC 8156 */
604 | #define OPTION_F_RELATIONSHIP_NAME130 130 /* RFC 8156 */
605 | #define OPTION_F_SERVER_FLAGS131 131 /* RFC 8156 */
606 | #define OPTION_F_SERVER_STATE132 132 /* RFC 8156 */
607 | #define OPTION_F_START_TIME_OF_STATE133 133 /* RFC 8156 */
608 | #define OPTION_F_STATE_EXPIRATION_TIME134 134 /* RFC 8156 */
609 | #define OPTION_RELAY_PORT135 135 /* RFC 8357 */
610 | #define OPTION_V6_SZTP_REDIRECT136 136 /* RFC 8572 */
611 | #define OPTION_S46_BIND_IPV6_PREFIX137 137 /* RFC 8539 */
612 | #define OPTION_IA_LL138 138 /* RFC 8947 */
613 | #define OPTION_LLADDR139 139 /* RFC 8947 */
614 | #define OPTION_SLAP_QUAD140 140 /* RFC 8948 */
615 | #define OPTION_V6_DOTS_RI141 141 /* RFC 8973 */
616 | #define OPTION_V6_DOTS_ADDRESS142 142 /* RFC 8973 */
617 | #define OPTION_IPv6_ADDRESS_ANDSF143 143 /* RFC 6153 */
618 | #define OPTION_V6_DNR144 144 /* RFC 9463 */
619 | #define OPTION_REGISTERED_DOMAIN145 145 /* RFC 9527 */
620 | #define OPTION_FORWARD_DIST_MANAGER146 146 /* RFC 9527 */
621 | #define OPTION_REVERSE_DIST_MANAGER147 147 /* RFC 9527 */
622 | #define OPTION_ADDR_REG_ENABLE148 148 /* RFC 9686 */
623 |
624 | /* temporary value until defined by IETF */
625 | #define OPTION_IA_SRV6_LOCATOR149 149 /* draft-ietf-spring-dhc-distribute-srv6-locator-dhcp-02 */
626 | #define OPTION_IALOCATOR150 150 /* draft-ietf-spring-dhc-distribute-srv6-locator-dhcp-02 */
627 | /********************************************************************************************/
628 |
629 | static const value_string opttype_vals[] = {
630 | { OPTION_CLIENTID1, "Client Identifier" },
631 | { OPTION_SERVERID2, "Server Identifier" },
632 | { OPTION_IA_NA3, "Identity Association for Non-temporary Address" },
633 | { OPTION_IA_TA4, "Identity Association for Temporary Address" },
634 | { OPTION_IAADDR5, "IA Address" },
635 | { OPTION_ORO6, "Option Request" },
636 | { OPTION_PREFERENCE7, "Preference" },
637 | { OPTION_ELAPSED_TIME8, "Elapsed time" },
638 | { OPTION_RELAY_MSG9, "Relay Message" },
639 | { OPTION_AUTH11, "Authentication" },
640 | { OPTION_UNICAST12, "Server unicast" },
641 | { OPTION_STATUS_CODE13, "Status code" },
642 | { OPTION_RAPID_COMMIT14, "Rapid Commit" },
643 | { OPTION_USER_CLASS15, "User Class" },
644 | { OPTION_VENDOR_CLASS16, "Vendor Class" },
645 | { OPTION_VENDOR_OPTS17, "Vendor-specific Information" },
646 | { OPTION_INTERFACE_ID18, "Interface-Id" },
647 | { OPTION_RECONF_MSG19, "Reconfigure Message" },
648 | { OPTION_RECONF_ACCEPT20, "Reconfigure Accept" },
649 | { OPTION_SIP_SERVER_D21, "SIP Server Domain Name List" },
650 | { OPTION_SIP_SERVER_A22, "SIP Servers IPv6 Address List" },
651 | { OPTION_DNS_SERVERS23, "DNS recursive name server" },
652 | { OPTION_DOMAIN_LIST24, "Domain Search List" },
653 | { OPTION_IA_PD25, "Identity Association for Prefix Delegation" },
654 | { OPTION_IAPREFIX26, "IA Prefix" },
655 | { OPTION_NIS_SERVERS27, "Network Information Server" },
656 | { OPTION_NISP_SERVERS28, "Network Information Server V2" },
657 | { OPTION_NIS_DOMAIN_NAME29, "Network Information Server Domain Name" },
658 | { OPTION_NISP_DOMAIN_NAME30, "Network Information Server V2 Domain Name" },
659 | { OPTION_SNTP_SERVERS31, "Simple Network Time Protocol Server" },
660 | { OPTION_LIFETIME32, "Lifetime" },
661 | { OPTION_BCMCS_SERVER_D33, "BCMCS Server Domain" },
662 | { OPTION_BCMCS_SERVER_A34, "BCMCS Servers IPv6 Address List" },
663 | { OPTION_GEOCONF_CIVIC36, "Geoconf Civic Address" },
664 | { OPTION_REMOTE_ID37, "Remote Identifier" },
665 | { OPTION_SUBSCRIBER_ID38, "Subscriber Identifier" },
666 | { OPTION_CLIENT_FQDN39, "Client Fully Qualified Domain Name" },
667 | { OPTION_PANA_AGENT40, "PANA Agents IPv6 Address List" },
668 | { OPTION_TIME_ZONE41, "Time Zone" },
669 | { OPTION_TZDB42, "Time Zone Database" },
670 | { OPTION_ERO43, "Echo Request Option" },
671 | { OPTION_LQ_QUERY44, "Leasequery Query" },
672 | { OPTION_CLIENT_DATA45, "Leasequery Client Data" },
673 | { OPTION_CLT_TIME46, "Client Last Transaction Time" },
674 | { OPTION_LQ_RELAY_DATA47, "Leasequery Relay Data" },
675 | { OPTION_LQ_CLIENT_LINK48, "Leasequery Client Link Address List" },
676 | { OPTION_MIP6_HNIDF49, "Home Network Identifier FQDN" },
677 | { OPTION_MIP6_VDINF50, "Visited Home Network Information" },
678 | { OPTION_V6_LOST51, "LoST Server" },
679 | { OPTION_CAPWAP_AC_V652, "CAPWAP Access Controllers" },
680 | { OPTION_RELAYID53, "Relay-ID" },
681 | { OPTION_IPV6_ADDRESS_MOS54, "MoS IPv6 Address" },
682 | { OPTION_IPV6_FQDN_MOS55, "MoS Domain Name List" },
683 | { OPTION_NTP_SERVER56, "NTP Server" },
684 | { OPTION_V6_ACCESS_DOMAIN57, "Access Network Domain Name" },
685 | { OPTION_SIP_UA_CS_LIST58, "SIP User Agent Configuration Service Domains" },
686 | { OPTION_BOOTFILE_URL59, "Boot File URL" },
687 | { OPTION_BOOTFILE_PARAM60, "Boot File Parameters" },
688 | { OPTION_CLIENT_ARCH_TYPE61, "Client System Architecture Type" },
689 | { OPTION_NII62, "Client Network Interface Identifier" },
690 | { OPTION_GEOLOCATION63, "Geolocation" },
691 | { OPTION_AFTR_NAME64, "Dual-Stack Lite AFTR Name" },
692 | { OPTION_ERP_LOCAL_DOMAIN_NAME65, "ERP Local Domain Name" },
693 | { OPTION_RSOO66, "Relay-Supplied Options" },
694 | { OPTION_PD_EXCLUDE67, "Prefix Exclude" },
695 | { OPTION_VSS68, "Virtual Subnet Selection" },
696 | { OPTION_MIP6_IDINF69, "Identified Home Network Information" },
697 | { OPTION_MIP6_UDINF70, "Unrestricted Home Network Information" },
698 | { OPTION_MIP6_HNP71, "Home Network Prefix" },
699 | { OPTION_MIP6_HAA72, "Home Agent Address" },
700 | { OPTION_MIP6_HAF73, "Home Agent FQDN" },
701 | { OPTION_RDNSS_SELECTION74, "RDNSS Selection" },
702 | { OPTION_KRB_PRINCIPAL_NAME75, "Kerberos Principal Name" },
703 | { OPTION_KRB_REALM_NAME76, "Kerberos Realm Name" },
704 | { OPTION_KRB_DEFAULT_REALM_NAME77, "Kerberos Default Realm Name" },
705 | { OPTION_KRB_KDC78, "Kerberos KDC" },
706 | { OPTION_CLIENT_LINKLAYER_ADDR79, "Client Link-Layer Address" },
707 | { OPTION_LINK_ADDRESS80, "Link Address" },
708 | { OPTION_RADIUS81, "RADIUS" },
709 | { OPTION_SOL_MAX_RT82, "SOL_MAX_RT" },
710 | { OPTION_INF_MAX_RT83, "INF_MAX_RT" },
711 | { OPTION_ADDRSEL84, "Address Selection" },
712 | { OPTION_ADDRSEL_TABLE85, "Address Selection table" },
713 | { OPTION_V6_PCP_SERVER86, "PCP Server" },
714 | { OPTION_DHCPV4_MSG87, "DHCPv4 Message" },
715 | { OPTION_DHCP4_O_DHCP6_SERVER88, "DHCP 4o6 Servers Address" },
716 | { OPTION_S46_RULE89, "S46 Rule" },
717 | { OPTION_S46_BR90, "S46 BR" },
718 | { OPTION_S46_DMR91, "S46 DMR" },
719 | { OPTION_S46_V4V6BIND92, "S46 IPv4/IPv6 Address Binding" },
720 | { OPTION_S46_PORTPARAMS93, "S46 Port Parameters" },
721 | { OPTION_S46_CONT_MAPE94, "S46 MAP-E Container" },
722 | { OPTION_S46_CONT_MAPT95, "S46 MAP-T Container" },
723 | { OPTION_S46_CONT_LW96, "S46 Lightweight 4over6 Container" },
724 | { OPTION_4RD97, "4rd Options" },
725 | { OPTION_4RD_MAP_RULE98, "4rd Mapping Rule" },
726 | { OPTION_4RD_NON_MAP_RULE99, "4rd Non-Mapping Rule" },
727 | { OPTION_LQ_BASE_TIME100, "LQ Server Base Time" },
728 | { OPTION_LQ_START_TIME101, "LQ Server Query Start Time" },
729 | { OPTION_LQ_END_TIME102, "LQ Server Query End Time" },
730 | { OPTION_CAPTIVE_PORTAL103, "Captive Portal" },
731 | { OPTION_MPL_PARAMETERS104, "MPL Parameter Configuration" },
732 | { OPTION_ANI_ATT105, "Access Technology Type" },
733 | { OPTION_ANI_NETWORK_NAME106, "Access Network Name" },
734 | { OPTION_ANI_AP_NAME107, "Access Point Name" },
735 | { OPTION_ANI_AP_BSSID108, "Access Point BSSID" },
736 | { OPTION_ANI_OPERATOR_ID109, "Access Network Operator ID" },
737 | { OPTION_ANI_OPERATOR_REALM110, "Access Network Operator Realm" },
738 | { OPTION_S46_PRIORITY111, "S46 Priority" },
739 | { OPTION_MUDURL112, "Manufacturer Usage Description" },
740 | { OPTION_V6_PREFIX64113, "IPv4/IPv6 Multicast Prefixes" },
741 | { OPTION_F_BINDING_STATUS114, "Failover Binding Status" },
742 | { OPTION_F_CONNECT_FLAGS115, "Failover Connect Flags" },
743 | { OPTION_F_DNS_REMOVAL_INFO116, "Failover DNS Removal Info" },
744 | { OPTION_F_DNS_HOST_NAME117, "Failover DNS Hostname" },
745 | { OPTION_F_DNS_ZONE_NAME118, "Failover DNS Zone Name" },
746 | { OPTION_F_DNS_FLAGS119, "Failover DNS Flags" },
747 | { OPTION_F_EXPIRATION_TIME120, "Failover Expiration Time" },
748 | { OPTION_F_MAX_UNACKED_BNDUPD121, "Failover Maximum Number Unacked BNDUPD Messages" },
749 | { OPTION_F_MCLT122, "Failover Maximum Client Lead Time (MCLT)" },
750 | { OPTION_F_PARTNER_LIFETIME123, "Failover Partner Lifetime" },
751 | { OPTION_F_PARTNER_LIFETIME_SENT124,"Failover Partner Lifetime Sent" },
752 | { OPTION_F_PARTNER_DOWN_TIME125, "Failover Partner Down Time" },
753 | { OPTION_F_PARTNER_RAW_CLT_TIME126, "Failover Partner Raw Client Time" },
754 | { OPTION_F_PROTOCOL_VERSION127, "Failover Protocol Version" },
755 | { OPTION_F_KEEPALIVE_TIME128, "Failover Keepalive Time" },
756 | { OPTION_F_RECONFIGURE_DATA129, "Failover Reconfigure Data" },
757 | { OPTION_F_RELATIONSHIP_NAME130, "Failover Relationship Name" },
758 | { OPTION_F_SERVER_FLAGS131, "Failover Server Flags" },
759 | { OPTION_F_SERVER_STATE132, "Failover Server State" },
760 | { OPTION_F_START_TIME_OF_STATE133, "Failover Start Time of State" },
761 | { OPTION_F_STATE_EXPIRATION_TIME134,"Failover State Expiration Time" },
762 | { OPTION_RELAY_PORT135, "Relay Source Port" },
763 | { OPTION_V6_SZTP_REDIRECT136, "SZTP Redirect" },
764 | { OPTION_S46_BIND_IPV6_PREFIX137, "Softwire Source Binding Prefix Hint" },
765 | { OPTION_IA_LL138, "Identity Association for Link-Layer Addresses" },
766 | { OPTION_LLADDR139, "Link-Layer Address" },
767 | { OPTION_SLAP_QUAD140, "QUAD" },
768 | { OPTION_V6_DOTS_RI141, "DOTS Reference Identifier" },
769 | { OPTION_V6_DOTS_ADDRESS142, "DOTS Address" },
770 | { OPTION_IPv6_ADDRESS_ANDSF143, "ANDSF IPv6 Address" },
771 | { OPTION_V6_DNR144, "Discovery of Network DNS Resolvers" },
772 | { OPTION_REGISTERED_DOMAIN145, "Registered Domain" },
773 | { OPTION_FORWARD_DIST_MANAGER146, "Forward Distribution Manager" },
774 | { OPTION_REVERSE_DIST_MANAGER147, "Reverse Distribution Manager" },
775 | { OPTION_ADDR_REG_ENABLE148, "Address Registration Enable" },
776 | /* temporary value until defined by IETF */
777 | { OPTION_IA_SRV6_LOCATOR149, "Identity Association for SRv6 Locator" },
778 | { OPTION_IALOCATOR150, "IA SRv6 Locator" },
779 | { 0, NULL((void*)0) }
780 | };
781 | static value_string_ext opttype_vals_ext = VALUE_STRING_EXT_INIT(opttype_vals){ _try_val_to_str_ext_init, 0, (sizeof (opttype_vals) / sizeof ((opttype_vals)[0]))-1, opttype_vals, "opttype_vals", ((void *)0) };
782 |
783 | /*
784 | * IANA Ref:
785 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-6
786 | */
787 | #define DUID_LLT1 1
788 | #define DUID_EN2 2
789 | #define DUID_LL3 3
790 | #define DUID_UUID4 4
791 |
792 | static const value_string duidtype_vals[] =
793 | {
794 | { DUID_LLT1, "link-layer address plus time" },
795 | { DUID_EN2, "assigned by vendor based on Enterprise number" },
796 | { DUID_LL3, "link-layer address" },
797 | { DUID_UUID4, "Universally Unique IDentifier (UUID)" },
798 | { 0, NULL((void*)0) }
799 | };
800 |
801 | /*
802 | * IANA Ref:
803 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5
804 | */
805 | static const value_string statuscode_vals[] =
806 | {
807 | { 0, "Success" },
808 | { 1, "UnspecFail" },
809 | { 2, "NoAddrsAvail" },
810 | { 3, "NoBinding" },
811 | { 4, "NotOnLink" },
812 | { 5, "UseMulticast (obsolete)" }, /* obsoleted draft-ietf-dhc-rfc8415bis-12 */
813 | { 6, "NoPrefixAvail" },
814 | { 7, "UnknownQueryType" },
815 | { 8, "MalformedQuery" },
816 | { 9, "NotConfigured" },
817 | {10, "NotAllowed" },
818 | {11, "QueryTerminated" },
819 | {12, "DataMissing" }, /* RFC 7653 */
820 | {13, "CatchUpComplete" }, /* RFC 7653 */
821 | {14, "NotSupported" }, /* RFC 7653 */
822 | {15, "TLSConnectionRefused" }, /* RFC 7653 */
823 | {16, "AddressInUse" }, /* RFC 8156 */
824 | {17, "ConfigurationConflict" }, /* RFC 8156 */
825 | {18, "MissingBindingInformation" }, /* RFC 8156 */
826 | {19, "OutdatedBindingInformation" }, /* RFC 8156 */
827 | {20, "ServerShuttingDown" }, /* RFC 8156 */
828 | {21, "DNSUpdateNotSupported" }, /* RFC 8156 */
829 | {22, "ExcessiveTimeSkew" }, /* RFC 8156 */
830 | {0, NULL((void*)0) }
831 | };
832 | static value_string_ext statuscode_vals_ext = VALUE_STRING_EXT_INIT(statuscode_vals){ _try_val_to_str_ext_init, 0, (sizeof (statuscode_vals) / sizeof ((statuscode_vals)[0]))-1, statuscode_vals, "statuscode_vals" , ((void*)0) };
833 |
834 | /*
835 | * IANA Ref:
836 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#ieee-80221-service-type
837 | */
838 |
839 | static const value_string ieee802_21_service_vals[] =
840 | {
841 | { 0, "Reserved" },
842 | { 1, "IS" },
843 | { 2, "CS" },
844 | { 3, "ES" },
845 | { 65535, "Reserved"},
846 | { 0, NULL((void*)0) }
847 | };
848 |
849 | #define DHCPV6_LEASEDURATION_INFINITY0xffffffff 0xffffffff
850 |
851 | static const value_string infinity_val[] = {
852 | { DHCPV6_LEASEDURATION_INFINITY0xffffffff, "infinity" },
853 | { 0, NULL((void*)0) }
854 | };
855 |
856 | /*
857 | * IANA Ref:
858 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#ntp-time-source
859 | */
860 | #define NTP_SUBOPTION_SRV_ADDR1 1
861 | #define NTP_SUBOPTION_MC_ADDR2 2
862 | #define NTP_SUBOPTION_SRV_FQDN3 3
863 |
864 | static const value_string ntp_server_opttype_vals[] =
865 | {
866 | { NTP_SUBOPTION_SRV_ADDR1, "NTP Server Address" },
867 | { NTP_SUBOPTION_MC_ADDR2, "NTP Multicast Address" },
868 | { NTP_SUBOPTION_SRV_FQDN3, "NTP Server FQDN" },
869 | { 0, NULL((void*)0) }
870 | };
871 |
872 | /*
873 | * RFC 5970 3.4 Client Network Interface Identifier Option
874 | */
875 | static const value_string nii_type_vals[] = {
876 | { 1, "Universal Network Device Interface (UNDI)" },
877 | { 0, NULL((void*)0) },
878 | };
879 |
880 | /*
881 | * IANA Ref:
882 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#processor-architecture
883 | */
884 | static const value_string client_arch_type_vals[] =
885 | {
886 | { 0x0000, "x86 BIOS" },
887 | { 0x0001, "NEC/PC98 (DEPRECATED)" },
888 | { 0x0002, "Itanium" },
889 | { 0x0003, "DEC Alpha (DEPRECATED)" },
890 | { 0x0004, "Arc x86 (DEPRECATED)" },
891 | { 0x0005, "Intel Lean Client (DEPRECATED)" },
892 | { 0x0006, "x86 UEFI" },
893 | { 0x0007, "x64 UEFI" },
894 | { 0x0008, "EFI Xscale (DEPRECATED)" },
895 | { 0x0009, "EBC" },
896 | { 0x000A, "ARM 32-bit UEFI" },
897 | { 0x000B, "ARM 64-bit UEFI" },
898 | { 0x000C, "PowerPC Open Firmware" },
899 | { 0x000D, "PowerPC ePAPR" },
900 | { 0x000E, "POWER OPAL v3" },
901 | { 0x000F, "x86 uefi boot from http" },
902 | { 0x0010, "x64 uefi boot from http" },
903 | { 0x0011, "ebc boot from http" },
904 | { 0x0012, "arm uefi 32 boot from http" },
905 | { 0x0013, "arm uefi 64 boot from http" },
906 | { 0x0014, "pc/at bios boot from http" },
907 | { 0x0015, "arm 32 uboot" },
908 | { 0x0016, "arm 64 uboot" },
909 | { 0x0017, "arm uboot 32 boot from http" },
910 | { 0x0018, "arm uboot 64 boot from http" },
911 | { 0x0019, "RISC-V 32-bit UEFI" },
912 | { 0x001A, "RISC-V 32-bit UEFI boot from http" },
913 | { 0x001B, "RISC-V 64-bit UEFI" },
914 | { 0x001C, "RISC-V 64-bit UEFI boot from http" },
915 | { 0x001D, "RISC-V 128-bit UEFI" },
916 | { 0x001E, "RISC-V 128-bit UEFI boot from http" },
917 | { 0x001F, "s390 Basic" },
918 | { 0x0020, "s390 Extended" },
919 | { 0x0021, "MIPS 32-bit UEFI" },
920 | { 0x0022, "MIPS 64-bit UEFI" },
921 | { 0x0023, "Sunway 32-bit UEFI" },
922 | { 0x0024, "Sunway 64-bit UEFI" },
923 | { 0x0025, "LoongArch 32-bit UEFI" },
924 | { 0x0026, "LoongArch 32-bit UEFI boot from http" },
925 | { 0x0027, "LoongArch 64-bit UEFI" },
926 | { 0x0028, "LoongArch 64-bit UEFI boot from http" },
927 | { 0x0029, "arm rpiboot" },
928 | { 0, NULL((void*)0) }
929 | };
930 |
931 | static const true_false_string fqdn_n = {
932 | "Server SHOULD NOT perform PTR RR updates",
933 | "Server SHOULD perform PTR RR updates"
934 | };
935 |
936 | static const true_false_string fqdn_o = {
937 | "Server HAS overridden client's S bit preference",
938 | "Server HAS NOT overridden client's S bit preference"
939 | };
940 |
941 | static const true_false_string fqdn_s = {
942 | "Server SHOULD perform AAAA RR updates",
943 | "Server SHOULD NOT perform AAAA RR updates"
944 | };
945 |
946 | /*
947 | * IANA Ref:
948 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-7
949 | */
950 | #define LQ_QUERY_ADDRESS1 1
951 | #define LQ_QUERY_CLIENTID2 2
952 | #define LQ_QUERY_RELAYID3 3
953 | #define LQ_QUERY_LINK_ADDRESS4 4
954 | #define LQ_QUERY_REMOTEID5 5
955 |
956 | static const value_string lq_query_vals[] = {
957 | { LQ_QUERY_ADDRESS1, "by-address" },
958 | { LQ_QUERY_CLIENTID2, "by-clientID" },
959 | { LQ_QUERY_RELAYID3, "by-relayID" },
960 | { LQ_QUERY_LINK_ADDRESS4, "by-linkAddress" },
961 | { LQ_QUERY_REMOTEID5, "by-remoteID" },
962 | { 0, NULL((void*)0) },
963 | };
964 |
965 | /*
966 | * IANA Ref:
967 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#vss-type
968 | */
969 | #define VSS_TYPE_NVT_ASCII0 0
970 | #define VSS_TYPE_VPN_ID1 1
971 | #define VSS_TYPE_ALL254 254
972 | #define VSS_TYPE_GLOBAL255 255
973 |
974 | static const value_string vss_type_options_vals[] = {
975 | { VSS_TYPE_NVT_ASCII0, "Network Virtual Terminal (NVT) ASCII VPN identifier" },
976 | { VSS_TYPE_VPN_ID1, "RFC2685 VPN-ID" },
977 | { VSS_TYPE_ALL254, "All VPNs (wildcard)" },
978 | { VSS_TYPE_GLOBAL255, "Global, default VPN" },
979 | { 0, NULL((void*)0) },
980 | };
981 |
982 | /* CableLabs Common Vendor Specific Options */
983 | #define CL_OPTION_ORO0x0001 0x0001 /* 1 */
984 | #define CL_OPTION_DEVICE_TYPE0x0002 0x0002 /* 2 */
985 | #define CL_OPTION_EMBEDDED_COMPONENT_LIST0x0003 0x0003 /* 3 */
986 | #define CL_OPTION_DEVICE_SERIAL_NUMBER0x0004 0x0004 /* 4 */
987 | #define CL_OPTION_HARDWARE_VERSION_NUMBER0x0005 0x0005 /* 5 */
988 | #define CL_OPTION_SOFTWARE_VERSION_NUMBER0x0006 0x0006 /* 6 */
989 | #define CL_OPTION_BOOT_ROM_VERSION0x0007 0x0007 /* 7 */
990 | #define CL_OPTION_VENDOR_OUI0x0008 0x0008 /* 8 */
991 | #define CL_OPTION_MODEL_NUMBER0x0009 0x0009 /* 9 */
992 | #define CL_OPTION_VENDOR_NAME0x000a 0x000a /* 10 */
993 | /* 11-32 are currently reserved */
994 | #define CL_OPTION_TFTP_SERVERS0x0020 0x0020 /* 32 */
995 | #define CL_OPTION_CONFIG_FILE_NAME0x0021 0x0021 /* 33 */
996 | #define CL_OPTION_SYSLOG_SERVERS0x0022 0x0022 /* 34 */
997 | #define CL_OPTION_TLV50x0023 0x0023 /* 35 */
998 | #define CL_OPTION_DEVICE_ID0x0024 0x0024 /* 36 */
999 | #define CL_OPTION_RFC868_SERVERS0x0025 0x0025 /* 37 */
1000 | #define CL_OPTION_TIME_OFFSET0x0026 0x0026 /* 38 */
1001 | #define CL_OPTION_IP_PREF0x0027 0x0027 /* 39 */
1002 | #define CL_OPTION_CCAP_CORES0x003D 0x003D /* 61 */
1003 |
1004 | /** CableLabs DOCSIS Project Vendor Specific Options */
1005 | #define CL_OPTION_DOCS_CMTS_CAP0x0401 0x0401 /* 1025 */
1006 | #define CL_CM_MAC_ADDR0x0402 0x0402 /* 1026 */
1007 | #define CL_EROUTER_CONTAINER_OPTION0x403 0x403 /* 1027 */
1008 |
1009 | /** CableLabs PacketCable Project Vendor Specific Options **/
1010 | #define CL_OPTION_CCC0x087a 0x087a /* 2170 */
1011 | #define CL_OPTION_CCCV60x087b 0x087b /* 2171 */
1012 | #define CL_OPTION_CORRELATION_ID0x087c 0x087c /* 2172 */
1013 |
1014 | /** CableLabs TLVs for DOCS_CMTS_CAP Vendor Option **/
1015 | #define CL_OPTION_DOCS_CMTS_TLV_VERS_NUM0x01 0x01 /* 1 */
1016 | #define CL_OPTION_DOCS_DPOE_TLV_VERS_NUM0x02 0x02 /* 2 */
1017 |
1018 | static const value_string cl_vendor_subopt_values[] = {
1019 | /* 1 */ { CL_OPTION_ORO0x0001, "Option Request = " },
1020 | /* 2 */ { CL_OPTION_DEVICE_TYPE0x0002, "Device Type = " },
1021 | /* 3 */ { CL_OPTION_EMBEDDED_COMPONENT_LIST0x0003, "Embedded Components = " },
1022 | /* 4 */ { CL_OPTION_DEVICE_SERIAL_NUMBER0x0004, "Serial Number = " },
1023 | /* 5 */ { CL_OPTION_HARDWARE_VERSION_NUMBER0x0005, "Hardware Version = " },
1024 | /* 6 */ { CL_OPTION_SOFTWARE_VERSION_NUMBER0x0006, "Software Version = " },
1025 | /* 7 */ { CL_OPTION_BOOT_ROM_VERSION0x0007, "Boot ROM Version = " },
1026 | /* 8 */ { CL_OPTION_VENDOR_OUI0x0008, "Organization Unique Identifier = " },
1027 | /* 9 */ { CL_OPTION_MODEL_NUMBER0x0009, "Model Number = " },
1028 | /* 10 */ { CL_OPTION_VENDOR_NAME0x000a, "Vendor Name = " },
1029 | /* 32 */ { CL_OPTION_TFTP_SERVERS0x0020, "TFTP Server Addresses : " },
1030 | /* 33 */ { CL_OPTION_CONFIG_FILE_NAME0x0021, "Configuration File Name = " },
1031 | /* 34 */ { CL_OPTION_SYSLOG_SERVERS0x0022, "Syslog Servers : " },
1032 | /* 35 */ { CL_OPTION_TLV50x0023, "TLV5 = " },
1033 | /* 36 */ { CL_OPTION_DEVICE_ID0x0024, "Device Identifier = " },
1034 | /* 37 */ { CL_OPTION_RFC868_SERVERS0x0025, "Time Protocol Servers : " },
1035 | /* 38 */ { CL_OPTION_TIME_OFFSET0x0026, "Time Offset = " },
1036 | /* 39 */ { CL_OPTION_IP_PREF0x0027, "IP preference : " },
1037 | /* 61 */ { CL_OPTION_CCAP_CORES0x003D, "CCAP-CORES : " },
1038 | /* 1025 */ { CL_OPTION_DOCS_CMTS_CAP0x0401, "CMTS Capabilities Option : " },
1039 | /* 1026 */ { CL_CM_MAC_ADDR0x0402, "CM MAC Address Option = " },
1040 | /* 1027 */ { CL_EROUTER_CONTAINER_OPTION0x403, "eRouter Container Option : " },
1041 | /* 2170 */ { CL_OPTION_CCC0x087a, "CableLabs Client Configuration : " },
1042 | /* 2171 */ { CL_OPTION_CCCV60x087b, "CableLabs Client Configuration IPv6 : " },
1043 | /* 2172 */ { CL_OPTION_CORRELATION_ID0x087c, "CableLabs Correlation ID = " },
1044 | { 0, NULL((void*)0) }
1045 | };
1046 | static value_string_ext cl_vendor_subopt_values_ext = VALUE_STRING_EXT_INIT(cl_vendor_subopt_values){ _try_val_to_str_ext_init, 0, (sizeof (cl_vendor_subopt_values ) / sizeof ((cl_vendor_subopt_values)[0]))-1, cl_vendor_subopt_values , "cl_vendor_subopt_values", ((void*)0) };
1047 |
1048 | /* 17:2170: CL_OPTION_CCC */
1049 | #define PKT_CCC_PRI_DHCP0x0001 0x0001
1050 | #define PKT_CCC_SEC_DHCP0x0002 0x0002
1051 |
1052 | static const value_string pkt_ccc_opt_vals[] = {
1053 | { PKT_CCC_PRI_DHCP0x0001, "TSP's Primary DHCP Server" },
1054 | { PKT_CCC_SEC_DHCP0x0002, "TSP's Secondary DHCP Server" },
1055 | { 0, NULL((void*)0) },
1056 | };
1057 |
1058 | /* 17:2171: CL_OPTION_CCCV6 */
1059 | #define PKT_CCCV6_PRI_DSS0x0001 0x0001
1060 | #define PKT_CCCV6_SEC_DSS0x0002 0x0002
1061 | #define PKT_CCCV6_IETF_PROV_SRV0x0003 0x0003
1062 | #define PKT_CCCV6_IETF_AS_KRB0x0004 0x0004
1063 | #define PKT_CCCV6_IETF_AP_KRB0x0005 0x0005
1064 | #define PKT_CCCV6_KRB_REALM0x0006 0x0006
1065 | #define PKT_CCCV6_TGT_FLAG0x0007 0x0007
1066 | #define PKT_CCCV6_PROV_TIMER0x0008 0x0008
1067 | #define PKT_CCCV6_IETF_SEC_TKT0x0009 0x0009
1068 | /** 10 -255 Reserved for future extensions **/
1069 |
1070 | static const value_string pkt_cccV6_opt_vals[] = {
1071 | { PKT_CCCV6_PRI_DSS0x0001, "TSP's Primary DHCPv6 Server Selector ID" },
1072 | { PKT_CCCV6_SEC_DSS0x0002, "TSP's Secondary DHCPv6 Server Selector ID " },
1073 | { PKT_CCCV6_IETF_PROV_SRV0x0003, "TSP's Provisioning Server" },
1074 | { PKT_CCCV6_IETF_AS_KRB0x0004, "TSP's AS-REQ/AS-REP Backoff and Retry" },
1075 | { PKT_CCCV6_IETF_AP_KRB0x0005, "TSP's AP-REQ/AP-REP Backoff and Retry" },
1076 | { PKT_CCCV6_KRB_REALM0x0006, "TSP's Kerberos Realm Name" },
1077 | { PKT_CCCV6_TGT_FLAG0x0007, "TSP's Ticket Granting Server Utilization" },
1078 | { PKT_CCCV6_PROV_TIMER0x0008, "TSP's Provisioning Timer Value" },
1079 | { PKT_CCCV6_IETF_SEC_TKT0x0009, "PacketCable Security Ticket Control" },
1080 | { 0, NULL((void*)0) }
1081 | };
1082 | static value_string_ext pkt_cccV6_opt_vals_ext = VALUE_STRING_EXT_INIT(pkt_cccV6_opt_vals){ _try_val_to_str_ext_init, 0, (sizeof (pkt_cccV6_opt_vals) / sizeof ((pkt_cccV6_opt_vals)[0]))-1, pkt_cccV6_opt_vals, "pkt_cccV6_opt_vals" , ((void*)0) };
1083 |
1084 | static const value_string pkt_cccV6_prov_srv_type_vals[] = {
1085 | { 0, "FQDN" },
1086 | { 1, "IPv6" },
1087 | { 0, NULL((void*)0) },
1088 | };
1089 |
1090 | #if 0
1091 | static const value_string sec_tcm_vals[] = {
1092 | { 1 << 0, "PacketCable Provisioning Server" },
1093 | { 1 << 1, "PacketCable Call Manager Servers" },
1094 | { 0, NULL((void*)0) },
1095 | };
1096 | #endif
1097 |
1098 | static const value_string modem_capabilities_encoding [] = {
1099 | { 1, "Concatenation Support" },
1100 | { 2, "DOCSIS Version" },
1101 | { 3, "Fragmentation Support" },
1102 | { 4, "Payload Header Suppression Support" },
1103 | { 5, "IGMP Support" },
1104 | { 6, "Privacy Support" },
1105 | { 7, "Downstream SAID Support" },
1106 | { 8, "Upstream Service Flow Support" },
1107 | { 9, "Optional Filtering Support" },
1108 | { 10, "Transmit Pre-Equalizer Taps per Modulation Interval" },
1109 | { 11, "Number of Transmit Equalizer Taps" },
1110 | { 12, "DCC Support" },
1111 | { 13, "IP Filters Support" },
1112 | { 14, "LLC Filters Support" },
1113 | { 15, "Expanded Unicast SID Space" },
1114 | { 16, "Ranging Hold-Off Support" },
1115 | { 17, "L2VPN Capability" },
1116 | { 18, "L2VPN eSAFE Host Capability" },
1117 | { 19, "Downstream Unencrypted Traffic (DUT) Filtering" },
1118 | { 20, "Upstream Frequency Range Support" },
1119 | { 21, "Upstream Symbol Rate Support" },
1120 | { 22, "Selectable Active Code Mode 2 Support" },
1121 | { 23, "Code Hopping Mode 2 Support" },
1122 | { 24, "Multiple Transmit Channel Support" },
1123 | { 25, "5.12 Msps UpstreamTransmit Channel Support" },
1124 | { 26, "2.56 Msps Upstream Transmit Channel Support" },
1125 | { 27, "Total SID Cluster Support" },
1126 | { 28, "SID Clusters per Service Flow Support" },
1127 | { 29, "Multiple Receive Channel Support" },
1128 | { 30, "Total Downstream Service ID (DSID) Support" },
1129 | { 31, "Resequencing Downstream Service ID (DSID) Support" },
1130 | { 32, "Multicast Downstream Service ID (DSID) Support" },
1131 | { 33, "Multicast DSID Forwarding" },
1132 | { 34, "Frame Control Type Forwarding Capability" },
1133 | { 35, "DPV Capability" },
1134 | { 36, "Unsolicited Grant Service/Upstream Service Flow Support" },
1135 | { 37, "MAP and UCD Receipt Support" },
1136 | { 38, "Upstream Drop Classifier Support" },
1137 | { 39, "IPv6 Support" },
1138 | { 40, "Extended Upstream Transmit Power Capability" },
1139 | { 41, "Optional 802.1ad, 802.1ah, MPLS Classification Support" },
1140 | { 42, "D-ONU Capabilities Encoding" },
1141 | { 43, "Reserved" },
1142 | { 44, "Energy Management Capabilities" },
1143 | /* Added TLV5.45-62 from CL-SP-CANN-I18-180509 */
1144 | { 45, "C-DOCSIS Capability Encoding" },
1145 | { 46, "CM-STATUS-ACK" },
1146 | { 47, "Energy Management Preferences" },
1147 | { 48, "Extended Packet Length Support Capability" },
1148 | { 49, "Multiple Receive OFDM Channel Support" },
1149 | { 50, "Multiple Transmit OFDMA Channel Support" },
1150 | { 51, "Downstream OFDM Profile Support" },
1151 | { 52, "Downstream OFDM channel subcarrier QAM modulation support" },
1152 | { 53, "Upstream OFDM channel subcarrier QAM modulation support" },
1153 | { 54, "Downstream Lower Band Edge Support" },
1154 | { 55, "Downstream Upper Band Edge Support" },
1155 | { 56, "Upstream Upper Band Edge Support" },
1156 | { 57, "DOCSIS Time Protocol Support" },
1157 | { 58, "DOCSIS Time Protocol Performance Support" },
1158 | { 59, "Pmax" },
1159 | { 60, "Diplexer Downstream Lower Band Edge" },
1160 | { 61, "Diplexer Downstream Upper Band Edge" },
1161 | { 62, "Diplexer Upstream Upper Band Edge" },
1162 | { 0, NULL((void*)0) },
1163 | };
1164 | static value_string_ext modem_capabilities_encoding_ext = VALUE_STRING_EXT_INIT(modem_capabilities_encoding){ _try_val_to_str_ext_init, 0, (sizeof (modem_capabilities_encoding ) / sizeof ((modem_capabilities_encoding)[0]))-1, modem_capabilities_encoding , "modem_capabilities_encoding", ((void*)0) };
1165 |
1166 | static const value_string eue_capabilities_encoding [] = {
1167 | { 1, "PacketCable Version" },
1168 | { 2, "Number Of Telephony Endpoints" },
1169 | { 3, "TGT Support" },
1170 | { 4, "HTTP Download File Access Method Support" },
1171 | { 5, "MTA-24 Event SYSLOG Notification Support" },
1172 | { 6, "NCS Service Flow Support" },
1173 | { 7, "Primary Line Support" },
1174 | { 8, "Vendor Specific TLV Type(s)" },
1175 | { 9, "NVRAM Ticket/Ticket Information Storage Support" },
1176 | { 10, "Provisioning Event Reporting Support" },
1177 | { 11, "Supported CODEC(s)" },
1178 | { 12, "Silence Suppression Support" },
1179 | { 13, "Echo Cancellation Support" },
1180 | { 14, "RSVP Support" },
1181 | { 15, "UGS-AD Support" },
1182 | { 16, "MTA's \"ifIndex\" starting number in \"ifTable\"" },
1183 | { 17, "Provisioning Flow Logging Support" },
1184 | { 18, "Supported Provisioning Flows" },
1185 | { 19, "T38 Version Support" },
1186 | { 20, "T38 Error Correction Support" },
1187 | { 21, "RFC2833 DTMF Support" },
1188 | { 22, "Voice Metrics Support" },
1189 | { 23, "Device MIB Support" },
1190 | { 24, "Multiple Grants Per Interval Support" },
1191 | { 25, "V.152 Support" },
1192 | { 26, "Certificate Bootstrapping Support" },
1193 | { 38, "IP Address Provisioning Capability" },
1194 | { 0, NULL((void*)0) },
1195 | };
1196 | static value_string_ext eue_capabilities_encoding_ext = VALUE_STRING_EXT_INIT(eue_capabilities_encoding){ _try_val_to_str_ext_init, 0, (sizeof (eue_capabilities_encoding ) / sizeof ((eue_capabilities_encoding)[0]))-1, eue_capabilities_encoding , "eue_capabilities_encoding", ((void*)0) };
1197 |
1198 | /*
1199 | * IANA Ref:
1200 | * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#option-codes-s46-priority-option
1201 | */
1202 | static const value_string s46_opt_code_vals[] = {
1203 | { 64, "DS-Lite" },
1204 | { 88, "DHCPv4 over DHCPv6" },
1205 | { 94, "MAP-E" },
1206 | { 95, "MAP-T" },
1207 | { 96, "Lightweight 4over6" },
1208 | { 0, NULL((void*)0) },
1209 | };
1210 |
1211 | static const value_string failover_binding_status_vals[] = {
1212 | { 0, "reserved" },
1213 | { 1, "ACTIVE" },
1214 | { 2, "EXPIRED" },
1215 | { 3, "RELEASED" },
1216 | { 4, "PENDING-FREE" },
1217 | { 5, "FREE" },
1218 | { 6, "FREE-BACKUP" },
1219 | { 7, "ABANDONED" },
1220 | { 8, "RESET" },
1221 | { 0, NULL((void*)0) },
1222 | };
1223 |
1224 | static const value_string failover_server_state_vals[] = {
1225 | { 0, "reserved" },
1226 | { 1, "Startup state (1)" },
1227 | { 2, "Normal state" },
1228 | { 3, "Communications interrupted" },
1229 | { 4, "Partner down" },
1230 | { 5, "Synchronizing" },
1231 | { 6, "Recovering bindings from partner" },
1232 | { 7, "Waiting out MCLT after RECOVER" },
1233 | { 8, "Interlock state prior to NORMAL" },
1234 | { 9, "Comm. failed during resolution" },
1235 | { 10, "Primary resolved its conflicts" },
1236 | { 0, NULL((void*)0) },
1237 | };
1238 |
1239 | static int * const dhcpv6_failover_connect_flags_fields[] = {
1240 | &hf_option_failover_connect_reserved_flag,
1241 | &hf_option_failover_connect_f_flag,
1242 | NULL((void*)0)
1243 | };
1244 |
1245 | static int * const dhcpv6_failover_dns_flags_fields[] = {
1246 | &hf_option_failover_dns_reserved_flag,
1247 | &hf_option_failover_dns_u_flag,
1248 | &hf_option_failover_dns_s_flag,
1249 | &hf_option_failover_dns_r_flag,
1250 | &hf_option_failover_dns_f_flag,
1251 | NULL((void*)0)
1252 | };
1253 |
1254 | static int * const dhcpv6_failover_server_flags_fields[] = {
1255 | &hf_option_failover_server_reserved_flag,
1256 | &hf_option_failover_server_a_flag,
1257 | &hf_option_failover_server_s_flag,
1258 | &hf_option_failover_server_c_flag,
1259 | NULL((void*)0)
1260 | };
1261 |
1262 | static int * const dhcpv6_homenet_transport_flags_fields[] = {
1263 | &hf_homenet_transport_reserved_flag,
1264 | &hf_homenet_transport_mtls_flag,
1265 | NULL((void*)0)
1266 | };
1267 |
1268 | typedef struct hopcount_info_t {
1269 | uint8_t hopcount;
1270 | proto_item *pi;
1271 | bool_Bool relay_message_previously_detected;
1272 | } hopcount_info;
1273 |
1274 | static int * const dhcpv6_s46_rule_flags_fields[] = {
1275 | &hf_option_s46_rule_reserved_flag,
1276 | &hf_option_s46_rule_fmr_flag,
1277 | NULL((void*)0)
1278 | };
1279 |
1280 |
1281 | static void
1282 | initialize_hopount_info(hopcount_info *hpi) {
1283 | memset(hpi, 0, sizeof(hopcount_info));
1284 | }
1285 |
1286 | static void
1287 | dissect_dhcpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1288 | int off, int eoff, hopcount_info hpi);
1289 |
1290 | static int
1291 | dissect_dhcpv6_s46_ipv6_prefix(tvbuff_t *tvb, int hf, int offset, int prefix_length, proto_tree *tree);
1292 |
1293 |
1294 | static int
1295 | dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_info *pinfo, tvbuff_t *tvb, int optoff,
1296 | int optend)
1297 | {
1298 | /** THE ENCODING OF THIS SUBOPTION HAS CHANGED FROM DHCPv4
1299 | the code and length fields have grown from a single octet to
1300 | two octets each. **/
1301 | int suboptoff = optoff;
1302 | uint16_t subopt, subopt_len;
1303 | proto_item *vti;
1304 | proto_tree *pkt_s_tree;
1305 |
1306 | subopt = tvb_get_ntohs(tvb, optoff);
1307 | suboptoff += 2;
1308 |
1309 | subopt_len = tvb_get_ntohs(tvb, suboptoff);
1310 | suboptoff += 2;
1311 |
1312 | /* There must be at least five octets left to be a valid sub element */
1313 | if (optend <= 0) {
1314 | expert_add_info_format(pinfo, v_item, &ei_dhcpv6_no_suboption_len, "Sub element %d: no room left in option for suboption length", subopt);
1315 | return (suboptoff - optoff);
1316 | }
1317 | /* g_print("dissect packetcable ccc option subopt_len=%d optend=%d\n\n", subopt_len, optend); */
1318 |
1319 | vti = proto_tree_add_item(v_tree, hf_packetcable_ccc_suboption, tvb, optoff, 2, ENC_BIG_ENDIAN0x00000000);
1320 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcpv6_pkt_option);
1321 |
1322 | switch (subopt) {
1323 | case PKT_CCC_PRI_DHCP0x0001: /* IPv4 address values */
1324 | if (subopt_len == 4) {
1325 | proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_pri_dhcp, tvb, suboptoff, 4, ENC_BIG_ENDIAN0x00000000);
1326 | }
1327 | else {
1328 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1329 | }
1330 |
1331 | suboptoff += subopt_len;
1332 | break;
1333 | case PKT_CCC_SEC_DHCP0x0002:
1334 | if (subopt_len == 4) {
1335 | proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_sec_dhcp, tvb, suboptoff, 4, ENC_BIG_ENDIAN0x00000000);
1336 | }
1337 | else {
1338 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1339 | }
1340 |
1341 | suboptoff += subopt_len;
1342 | break;
1343 | default:
1344 | suboptoff += subopt_len;
1345 | break;
1346 |
1347 | }
1348 |
1349 | /** Return the number of bytes processed **/
1350 | return (suboptoff - optoff);
1351 | }
1352 |
1353 |
1354 | /** Dissect one or more domain names within an option's domain name field and verify conformance
1355 | * with RFCs 8415, 3646, 4704, 2181, 1535, 1035, and 1034. Sufficiently detailed info is provided
1356 | * as to the cause of each error.
1357 | *
1358 | * TERMINOLOGY:
1359 | * field An option's domain name field containing from 0-n domain names (DNs)
1360 | * DN Decoded FQDN or a partial (relative) name.
1361 | * label A DNS-encoded name consisting of length octet followed by a name of that many
1362 | * octets. Bits 7 and 8 of the length octet are 0 thus the maximum length of a
1363 | * name is 63 octets.
1364 | * root "the null length of the root". An encoded root label only consists of its length,
1365 | * [0] and decoded as a dot. The trailing dot of an FQDN should not be confused with
1366 | * dots within a DN which are used to delineate its names.
1367 | * TLD or tld A Top Level Domain name consisting of *two* encoded labels: name and root.
1368 | * For example, [3org0] are decoded as [org.]
1369 | * FQDN: Fully Qualified Domain Name: A "complete" or "absolute" domain name that consists
1370 | * of *three* or more labels the last of which is root [0].
1371 | * partial name One or more labels *not* terminated by root. Partial names consisting of two or
1372 | * more names are referred to as "multi-part partially qualified Domain Names"
1373 | * [RFC 1535 pg 4.]. They are also called "relative" names. "Relative names are either
1374 | * taken relative to a well known origin, or to a list of domains used as a search
1375 | * list." [RFC 1034 3.1]. A partial name must be the only DN in the field.
1376 | *
1377 | * TODO: Revise DNS routines such as dissect_dns_query(), get_dns_name(), and expand_dns_name()
1378 | * (a.) to be aware of relative/partial names
1379 | * (b.) to detect protocol violations per keywords "MUST" "REQUIRED" and "SHALL"
1380 | */
1381 | /*
1382 | * This function assumes labels are encoded using ASCII. While RFC 1305 section 3.1
1383 | * supposedly doesn't formally mandate any one encoding, from my understanding of it,
1384 | * ASCII is "assumed" (and a de facto requirement for interoperability).
1385 | * An expert info for invalid ASCII in domain name labels would be a useful enhancement.
1386 | */
1387 | static void
1388 | dhcpv6_domain(proto_tree *subtree, proto_item *v_item _U___attribute__((unused)), packet_info *pinfo, int hfindex,
1389 | tvbuff_t *tvb, int dn_field_off, uint16_t dn_field_len)
1390 | {
1391 | int final_field_off; /* Last offset of in DN field */
1392 | uint8_t *label_str;
1393 | uint8_t label_len;
1394 | int remlen; /* The number of remaining octets in a domain field */
1395 | uint8_t num_labels;
1396 | int first_lab_off; /* Offset of the first label of a DN */
1397 | wmem_strbuf_t *decoded_name_buf; /* Array used to construct an FQDN or partial name. */
1398 | int total_label_ascii_len; /* Accumulated count of decoded label bytes, including separators. */
1399 | int offset;
1400 | bool_Bool fqdn_seen, inc;
1401 | proto_item *exi;
1402 | proto_tree *ex_subtree;
1403 |
1404 | /* Empty domain name
1405 | * [RFC 4704 4.2.] "A client MAY also leave the Domain Name field empty if it desires the server
1406 | * to provide a name." If the domain field is empty, dn_field_len = 0; however, if the field only
1407 | * contains a root label(0), it consumes one octet so in that case dn_field_len = 1.
1408 | * See [RFC 1034 3.1] for details.
1409 | */
1410 | if (dn_field_len == 0) {
1411 | proto_tree_add_uint_format(subtree, hf_empty_domain_name, tvb, dn_field_off-3, 2, dn_field_len,
1412 | "Empty domain field: the client requests the server to provide a domain name");
1413 | return;
1414 | }
1415 | offset = dn_field_off;
1416 | first_lab_off = dn_field_off;
1417 | final_field_off = dn_field_off + dn_field_len - 1;
1418 | remlen = dn_field_len;
1419 | num_labels = 0;
1420 | total_label_ascii_len = 0;
1421 | decoded_name_buf = wmem_strbuf_new(pinfo->pool, NULL((void*)0));
1422 | fqdn_seen = false0;
1423 | inc = true1;
1424 |
1425 | /* Decode one label of an FQDN or partial domain name per iteration. [RFC 1034 3.1] "labels are
1426 | * separated by dots ('.'). Since a complete domain name ends with the root label, this leads to
1427 | * a printed form which ends in a dot."
1428 | */
1429 | while (remlen) {
1430 | label_len = tvb_get_uint8(tvb, offset);
1431 | if (label_len > 63) {
1432 | /*
1433 | * Bits 7 and 8 of the label length octet are zero, so the max length of a label is 63
1434 | * octets. If greater, it is likely the first char of a non-DNS-encoded name.
1435 | */
1436 | exi = proto_tree_add_uint_format(subtree, hf_dhcpv6_non_dns_encoded_name, tvb,
1437 | offset, 1, label_len,
1438 | "Label Length: %u\n"
1439 | "This is not a DNS record encoded domain name. The value in the first octet of\n"
1440 | "a label is the length of the name that follows and must be 63 octets or less.\n"
1441 | "However, in this case it is %u which typically means the name is not DNS encoded.\n",
1442 | label_len, label_len);
1443 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
1444 |
1445 | if (num_labels) {
1446 | proto_tree_add_string_format(ex_subtree, hf_dhcpv6_decoded_portion, tvb,
1447 | first_lab_off, total_label_ascii_len, decoded_name_buf->str,
1448 | "The decoded portion of this FQDN to this point is [%s]\n", decoded_name_buf->str);
1449 | }
1450 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_non_dns_encoded_name, tvb, offset, 1);
1451 | return;
1452 | }
1453 |
1454 | if(total_label_ascii_len == 0)
1455 | first_lab_off = offset;
1456 | offset++;
1457 | remlen--;
1458 |
1459 | if (label_len > remlen) {
1460 | /*
1461 | * FQDN len exceeds domain field len.
1462 | */
1463 | col_append_str(pinfo->cinfo, COL_INFO, " [DOMAIN FIELD LEN EXCEEDED]");
1464 |
1465 | exi = proto_tree_add_uint_format(subtree, hf_dhcpv6_domain_field_len_exceeded, tvb,
1466 | offset-1, 1, label_len,
1467 | "ERROR: The length of this name, %u, exceeds the remaining length, %d, in the\n"
1468 | "domain name field.\n", label_len, remlen);
1469 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
1470 |
1471 | if (num_labels) {
1472 | proto_tree_add_string_format(ex_subtree, hf_dhcpv6_decoded_portion, tvb,
1473 | first_lab_off, total_label_ascii_len, decoded_name_buf->str,
1474 | "The successfully decoded portion of this FQDN: [%s]\n", decoded_name_buf->str);
1475 | }
1476 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_domain_field_len_exceeded, tvb,
1477 | dn_field_off, dn_field_len);
1478 | return;
1479 | }
1480 |
1481 | if (total_label_ascii_len + label_len + 2 > 255) {
1482 | /*
1483 | * RFC 1034 Section 3.1: "To simplify implementations, the total number of octets that
1484 | * represent a domain name (i.e., the sum of all label octets and label lengths) is
1485 | * limited to 255."
1486 | */
1487 | col_append_str(pinfo->cinfo, COL_INFO, " [FQDN > 255]");
1488 | /*
1489 | * Since label_len is valid (<=63 and the name has not been truncated (i.e., its length
1490 | * is <= remlen), display this oversized FQDN.
1491 | */
1492 | wmem_strbuf_append_c(decoded_name_buf, '.');
1493 | total_label_ascii_len++;
1494 | label_str = tvb_get_string_enc(pinfo->pool, tvb, offset, label_len, ENC_ASCII0x00000000);
1495 | wmem_strbuf_append(decoded_name_buf, label_str);
1496 | offset += label_len;
1497 | total_label_ascii_len += label_len;
1498 | if (tvb_get_uint8(tvb, offset) == 0) {
1499 | wmem_strbuf_append_c(decoded_name_buf, '.');
1500 | total_label_ascii_len++;
1501 | offset++;
1502 | inc = false0;
1503 | }
1504 | exi = proto_tree_add_uint_format(subtree, hf_dhcpv6_encoded_fqdn_len_gt_255, tvb,
1505 | first_lab_off, total_label_ascii_len-1, total_label_ascii_len,
1506 | "FQDN: %s%s\n"
1507 | "ERROR: The total length of DNS-encoded names of this FQDN, %d, exceeds 255,\n"
1508 | "the maximum allowed.", decoded_name_buf->str, (inc ? "<incomplete>" : " "), total_label_ascii_len);
1509 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
1510 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_encoded_fqdn_len_gt_255, tvb,
1511 | first_lab_off, total_label_ascii_len-1);
1512 | return;
1513 | }
1514 |
1515 | if (label_len==0) {
1516 | wmem_strbuf_append_c(decoded_name_buf, '.');
1517 | total_label_ascii_len++;
1518 |
1519 | if (num_labels == 0) {
1520 | /*
1521 | * This a standalone root label thus the client has request the resolver to return
1522 | * the IP address of root.
1523 | */
1524 | col_append_str(pinfo->cinfo, COL_INFO, " [ROOT-ONLY DOMAIN NAME]");
1525 | exi = proto_tree_add_string(subtree, hf_dhcpv6_root_only_domain_name, tvb,
1526 | offset-1, 1, "['.' (0)]");
1527 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
1528 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_root_only_domain_name, tvb,
1529 | offset-1, 1);
1530 | return;
1531 | }
1532 | else if (num_labels == 1) {
1533 | /*
1534 | * TLDs consist of one DNS encoded label and a root label(0) (e.g., [com.] is
1535 | * encoded as [03 64 6F 6D 00]).
1536 | */
1537 | exi = proto_tree_add_string_format(subtree, hf_dhcpv6_tld, tvb, first_lab_off, total_label_ascii_len+1,
1538 | decoded_name_buf->str, "Top Level Domain name (TLD): %s", decoded_name_buf->str);
1539 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
1540 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_tld_lookup, tvb, first_lab_off, total_label_ascii_len+1);
1541 |
1542 | num_labels = 0;
1543 | total_label_ascii_len = 0;
1544 | fqdn_seen = true1;
1545 | continue; /* This was only a COMMENT/WARNING so continue */
1546 | }
1547 |
1548 | /* This is a fully decoded FQDN. Add it to the tree with a trailing dot for root to
1549 | * indicate that the domain name is in fact an FQDN and not a multi-part partially
1550 | * qualified domain name.
1551 | */
1552 | proto_tree_add_string(subtree, hfindex, tvb, first_lab_off, total_label_ascii_len+1, decoded_name_buf->str);
1553 | num_labels = 0;
1554 | total_label_ascii_len = 0;
1555 | fqdn_seen = true1;
1556 | continue; /* Decode the next FQDN, if any */
1557 | }
1558 | /**************** End of label_len==0 (root) ****************/
1559 |
1560 | /* If a DN's last offset equals final_field_off, this marks the end of a partial name. Due
1561 | * to the fact that they are root-terminated, only one partial name or 'multi-part partially
1562 | * qualified domain name' is permitted per option field; otherwise, the labels of a
1563 | * subsequent DN would be appended to it.
1564 | *
1565 | * If a client with a domain name suffix search list configured manually, via GPO, or
1566 | * OPTION_DOMAIN_LIST response, appends each of the (rooted) list entries and queries the
1567 | * DNS server for each. If a search list is unavailable, the client sends a partial name to
1568 | * the server which will use its own search list. According to RFC 1535 Pg 4, "where a '.'
1569 | * exists in a specified name it should be assumed to be a fully qualified domain name (FQDN)
1570 | * and SHOULD be tried as a rooted name first." Some client implementations, most notably MS
1571 | * Windows, do the opposite; the client issues several superfluous (silly-named) queries all
1572 | * of which fail, followed by a successful rooted name query. See RFCs 1034 3.1 and 4704 4.2
1573 | * for more info.
1574 | */
1575 | if (offset + label_len - 1 == final_field_off) {
1576 | label_str = tvb_get_string_enc(pinfo->pool, tvb, first_lab_off + 1, label_len, ENC_ASCII0x00000000);
1577 | wmem_strbuf_append(decoded_name_buf, label_str);
1578 | total_label_ascii_len += label_len;
1579 | num_labels++;
1580 |
1581 | if (fqdn_seen) {
1582 | /*
1583 | * An FQDN precedes this partial name. Partial names must be the only DN in the
1584 | * domain field.
1585 | */
1586 | col_append_str(pinfo->cinfo, COL_INFO, " [PROTOCOL VIOLATION]");
1587 |
1588 | exi = proto_tree_add_string_format(subtree, hf_dhcpv6_partial_name_preceded_by_fqdn,
1589 | tvb, first_lab_off, label_len, decoded_name_buf->str,
1590 | "Partial name: %s\n"
1591 | "ERROR: A single or multi-part partial name must be the only name in "
1592 | "the domain field", decoded_name_buf->str);
1593 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
1594 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_partial_name_preceded_by_fqdn,
1595 | tvb, first_lab_off, label_len);
1596 | return;
1597 | }
1598 |
1599 | /* A conformant partial name
1600 | */
1601 | if (num_labels==1) {
1602 | proto_tree_add_string_format(subtree, hfindex, tvb, first_lab_off, total_label_ascii_len+1,
1603 | decoded_name_buf->str, "Partial domain name: %s", decoded_name_buf->str);
1604 | }
1605 | else {
1606 | proto_tree_add_string_format(subtree, hfindex, tvb, first_lab_off, total_label_ascii_len+1,
1607 | decoded_name_buf->str, "Multi-part partially qualified Domain Name: %s",
1608 | decoded_name_buf->str);
1609 | }
1610 | return;
1611 | }
1612 |
1613 | /* Add this name it to the array. Prepend it with a dot unless it's the first name of the DN.
1614 | * Dots are only used to separate (delineate) the decoded names of a DN; however, an FQDN's
1615 | * trailing root label (0) is decoded as a dot. This is handled above.
1616 | */
1617 | if (num_labels) {
1618 | wmem_strbuf_append_c(decoded_name_buf, '.');
1619 | total_label_ascii_len++;
1620 | }
1621 | label_str = tvb_get_string_enc(pinfo->pool, tvb, offset, label_len, ENC_ASCII0x00000000);
1622 | wmem_strbuf_append(decoded_name_buf, label_str);
1623 | offset += label_len;
1624 | remlen -= label_len;
1625 | total_label_ascii_len += label_len;
1626 | num_labels++;
1627 | }
1628 | /* End of while() loop */
1629 | }
1630 |
1631 |
1632 | static int
1633 | dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_info *pinfo, tvbuff_t *tvb, int optoff,
1634 | int optend)
1635 | {
1636 | int suboptoff = optoff;
1637 | uint16_t subopt, subopt_len;
1638 | uint8_t type;
1639 | proto_item *vti, *ti;
1640 | proto_tree *pkt_s_tree;
1641 | int i;
1642 |
1643 | subopt = tvb_get_ntohs(tvb, optoff);
1644 | suboptoff += 2;
1645 |
1646 | subopt_len = tvb_get_ntohs(tvb, suboptoff);
1647 | suboptoff += 2;
1648 |
1649 | /* There must be at least five octets left to be a valid sub element */
1650 | if (optend <= 0) {
1651 | expert_add_info_format(pinfo, v_item, &ei_dhcpv6_no_suboption_len, "Sub element %d: no room left in option for suboption length", subopt);
1652 | return (suboptoff - optoff);
1653 | }
1654 |
1655 | vti = proto_tree_add_item(v_tree, hf_packetcable_cccV6_suboption, tvb, optoff, 2, ENC_BIG_ENDIAN0x00000000);
1656 | pkt_s_tree = proto_item_add_subtree(vti, ett_dhcpv6_pkt_option);
1657 |
1658 | switch (subopt) {
1659 | case PKT_CCCV6_PRI_DSS0x0001:
1660 | if (subopt_len < 35) {
1661 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_pri_dss, tvb, suboptoff, subopt_len, ENC_ASCII0x00000000);
1662 | } else {
1663 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1664 | }
1665 | suboptoff += subopt_len;
1666 | break;
1667 | case PKT_CCCV6_SEC_DSS0x0002:
1668 | if (subopt_len < 35) {
1669 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_dss, tvb, suboptoff, subopt_len, ENC_ASCII0x00000000);
1670 | } else {
1671 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1672 | }
1673 | suboptoff += subopt_len;
1674 | break;
1675 | case PKT_CCCV6_IETF_PROV_SRV0x0003:
1676 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_prov_srv_type, tvb, suboptoff, 1, ENC_BIG_ENDIAN0x00000000);
1677 | type = tvb_get_uint8(tvb, suboptoff);
1678 |
1679 | /** Type 0 is FQDN **/
1680 | if (type == 0) {
1681 | dhcpv6_domain(pkt_s_tree, vti, pinfo, hf_packetcable_cccV6_prov_srv_fqdn, tvb, suboptoff+1, subopt_len-1);
1682 |
1683 | /** Type 1 is IPv6 **/
1684 | } else if (type == 1) {
1685 | if ((subopt_len % 16) == 0) {
1686 | for (i = 0; i < subopt_len/16; i++) {
1687 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_prov_srv_ipv6, tvb, suboptoff+1, 4, ENC_NA0x00000000);
1688 | suboptoff += 16;
1689 | }
1690 | }
1691 | } else {
1692 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_invalid_type, "Invalid type: %u (%u byte%s)",
1693 | type, subopt_len, plurality(subopt_len, "", "s")((subopt_len) == 1 ? ("") : ("s")));
1694 | }
1695 | suboptoff += subopt_len;
1696 | break;
1697 | case PKT_CCCV6_IETF_AS_KRB0x0004:
1698 | if (subopt_len == 12) {
1699 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_as_krb_nominal_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN0x00000000);
1700 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_as_krb_max_timeout, tvb, suboptoff+4, 4, ENC_BIG_ENDIAN0x00000000);
1701 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_as_krb_max_retry_count, tvb, suboptoff+8, 4, ENC_BIG_ENDIAN0x00000000);
1702 | } else {
1703 | proto_item_append_text(vti, "Bogus length: %d", subopt_len);
1704 | }
1705 | suboptoff += subopt_len;
1706 | break;
1707 | case PKT_CCCV6_IETF_AP_KRB0x0005:
1708 | if (subopt_len == 12) {
1709 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_ap_krb_nominal_timeout, tvb, suboptoff, 4, ENC_BIG_ENDIAN0x00000000);
1710 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_ap_krb_max_timeout, tvb, suboptoff+4, 4, ENC_BIG_ENDIAN0x00000000);
1711 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_ap_krb_max_retry_count, tvb, suboptoff+8, 4, ENC_BIG_ENDIAN0x00000000);
1712 | } else {
1713 | proto_item_append_text(vti, "Bogus length: %d", subopt_len);
1714 | }
1715 | suboptoff += subopt_len;
1716 | break;
1717 | case PKT_CCCV6_KRB_REALM0x0006:
1718 | if (subopt_len > 0) {
1719 | dhcpv6_domain(pkt_s_tree, vti, pinfo, hf_packetcable_cccV6_krb_realm, tvb, suboptoff, subopt_len);
1720 | }
1721 | suboptoff += subopt_len;
1722 | break;
1723 | case PKT_CCCV6_TGT_FLAG0x0007:
1724 | if (subopt_len == 1) {
1725 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_tgt_flag, tvb, suboptoff, 1, ENC_BIG_ENDIAN0x00000000);
1726 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_tgt_flag_fetch, tvb, suboptoff, 1, ENC_BIG_ENDIAN0x00000000);
1727 | }
1728 | else {
1729 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1730 | }
1731 | suboptoff += subopt_len;
1732 | break;
1733 | case PKT_CCCV6_PROV_TIMER0x0008:
1734 | if (subopt_len == 1) {
1735 | ti = proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_prov_timer, tvb, suboptoff, 1, ENC_BIG_ENDIAN0x00000000);
1736 | if (tvb_get_uint8(tvb, suboptoff) > 30)
1737 | expert_add_info(pinfo, ti, &ei_dhcpv6_invalid_time_value);
1738 | }
1739 | else {
1740 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1741 | }
1742 | suboptoff += subopt_len;
1743 | break;
1744 | case PKT_CCCV6_IETF_SEC_TKT0x0009:
1745 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_tcm, tvb, suboptoff, 2, ENC_BIG_ENDIAN0x00000000);
1746 | if (subopt_len == 2) {
1747 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_tcm_provisioning_server, tvb, suboptoff, 2, ENC_BIG_ENDIAN0x00000000);
1748 | proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_tcm_call_manager_server, tvb, suboptoff, 2, ENC_BIG_ENDIAN0x00000000);
1749 | } else {
1750 | expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len);
1751 | }
1752 | suboptoff += subopt_len;
1753 | break;
1754 | default:
1755 | suboptoff += subopt_len;
1756 | break;
1757 | }
1758 | /** Return the number of bytes processed **/
1759 | return (suboptoff - optoff);
1760 | }
1761 |
1762 | /* ToDo: review latest CL docs for updates */
1763 | static int
1764 | dissect_cablelabs_specific_opts(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1765 | {
1766 | unsigned type,
1767 | sub_value;
1768 | proto_item *v_item;
1769 | proto_item *ti;
1770 | proto_item *ti2;
1771 | proto_tree *subtree;
1772 | proto_tree *subtree2;
1773 | int tlv5_cap_index,
1774 | tlv5_counter,
1775 | tlv5_cap_len;
1776 | int off = 0,
1777 | len,
1778 | sub_off, /** The offset for the sub-option */
1779 | i,
1780 | tlv_len, /* holds the number of elements in the tlv */
1781 | field_len, /* holds the length of one occurrence of a field */
1782 | opt_len, /* holds the length of the suboption */
1783 | field_value;
1784 | char *device_type = NULL((void*)0);
1785 |
1786 | len = tvb_reported_length(tvb);
1787 |
1788 | /* Enterprise */
1789 | v_item = proto_tree_add_item(tree, hf_vendoropts_enterprise, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
1790 | off += 4;
1791 | len -= 4;
1792 |
1793 | if (len > 4) {
1794 | while (off < len) {
1795 |
1796 | /* Type */
1797 | type = tvb_get_ntohs(tvb, off);
1798 | ti = proto_tree_add_item(tree, hf_cablelabs_opts, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
1799 | /* Length */
1800 | tlv_len = tvb_get_ntohs(tvb, off+2);
1801 |
1802 | /* Values */
1803 | sub_off = off + 4;
1804 |
1805 | switch (type) {
1806 | /* String types */
1807 | case CL_OPTION_DEVICE_TYPE0x0002:
1808 | opt_len = tlv_len;
1809 | field_len = tlv_len;
1810 |
1811 | device_type = tvb_get_string_enc(pinfo->pool, tvb, sub_off, field_len, ENC_ASCII0x00000000);
1812 |
1813 | if ((device_type == NULL((void*)0)) || (strlen(device_type) == 0)) {
1814 | proto_item_append_text(ti, "Packet does not contain Device Type.");
1815 | } else {
1816 | proto_item_append_text(ti, "\"%s\"", device_type);
1817 | }
1818 | break;
1819 | case CL_OPTION_DEVICE_SERIAL_NUMBER0x0004:
1820 | case CL_OPTION_HARDWARE_VERSION_NUMBER0x0005:
1821 | case CL_OPTION_SOFTWARE_VERSION_NUMBER0x0006:
1822 | case CL_OPTION_BOOT_ROM_VERSION0x0007:
1823 | case CL_OPTION_MODEL_NUMBER0x0009:
1824 | case CL_OPTION_VENDOR_NAME0x000a:
1825 | case CL_OPTION_CONFIG_FILE_NAME0x0021:
1826 | case CL_OPTION_EMBEDDED_COMPONENT_LIST0x0003:
1827 | opt_len = tlv_len;
1828 | field_len = tlv_len;
1829 | proto_item_append_text(ti, "\"%s\"",
1830 | tvb_format_stringzpad(pinfo->pool, tvb, sub_off, field_len));
1831 | break;
1832 | case CL_OPTION_VENDOR_OUI0x0008:
1833 | /* CableLabs specs treat 17.8 inconsistently
1834 | * as either binary (3b) or string (6b) */
1835 | opt_len = tlv_len;
1836 | if (tlv_len == 3) {
1837 | proto_item_append_text(ti, "%s",
1838 | tvb_bytes_to_str_punct(pinfo->pool, tvb, sub_off, 3, ':'));
1839 | } else if (tlv_len == 6) {
1840 | proto_item_append_text(ti, "\"%s\"", tvb_format_stringzpad(pinfo->pool, tvb, sub_off, tlv_len));
1841 | } else {
1842 | expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Suboption %d: suboption length isn't 3 or 6", type);
1843 | }
1844 | break;
1845 | case CL_OPTION_ORO0x0001:
1846 | field_len = 2;
1847 | opt_len = tlv_len;
1848 | if (opt_len > 0) {
1849 | for (i = 0; i < tlv_len; i += field_len) {
1850 | sub_value = tvb_get_ntohs(tvb, sub_off);
1851 | proto_item_append_text(ti, " %d", sub_value);
1852 | sub_off += field_len;
1853 | }
1854 | }
1855 | break;
1856 | /* List of IPv6 Address */
1857 | case CL_OPTION_TFTP_SERVERS0x0020:
1858 | case CL_OPTION_SYSLOG_SERVERS0x0022:
1859 | case CL_OPTION_RFC868_SERVERS0x0025:
1860 | case CL_OPTION_CCAP_CORES0x003D:
1861 | field_len = 16;
1862 | opt_len = tlv_len;
1863 | subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
1864 |
1865 | if ((tlv_len % field_len) == 0) {
1866 | for (i = 0; i < tlv_len/field_len; i++) {
1867 | ti = proto_tree_add_item(subtree, hf_cablelabs_ipv6_server, tvb, sub_off, 16, ENC_NA0x00000000);
1868 | proto_item_prepend_text(ti, " %d ", i + 1);
1869 | sub_off += field_len;
1870 | }
1871 | }
1872 | break;
1873 | case CL_OPTION_DEVICE_ID0x0024:
1874 | opt_len = tlv_len;
1875 | field_len = tlv_len;
1876 | if (tlv_len != 6) {
1877 | expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Bogus length: %d", tlv_len);
1878 | }
1879 | else {
1880 | proto_item_append_text(ti, "%s",
1881 | tvb_bytes_to_str(pinfo->pool, tvb, sub_off, field_len));
1882 | }
1883 | break;
1884 | case CL_OPTION_TLV50x0023:
1885 | /* ToDo: review latest CL docs for updates */
1886 | opt_len = tlv_len;
1887 |
1888 |
1889 | tlv5_counter = 0;
1890 | tlv5_cap_index = sub_off;
1891 |
1892 | subtree = proto_item_add_subtree(ti, ett_dhcpv6_tlv5_type);
1893 |
1894 | while (tlv5_counter < tlv_len) {
1895 | /*Device type is not mandatory for CM (see par 10.2.5.2.3 "Obtain IPv6 Management Address and Other Configuration Parameters" in CM-SP-MULPIv3.1-114-180130*/
1896 | if (device_type == NULL((void*)0) || !g_ascii_strncasecmp(device_type, "ecm", 3)) {
1897 | ti2 = proto_tree_add_item(subtree, hf_modem_capabilities_encoding_type, tvb, tlv5_cap_index, 1, ENC_BIG_ENDIAN0x00000000);
1898 | } else if (!g_ascii_strncasecmp(device_type, "edva", 3)) {
1899 | ti2 = proto_tree_add_item(subtree, hf_eue_capabilities_encoding_type, tvb, tlv5_cap_index, 1, ENC_BIG_ENDIAN0x00000000);
1900 | } else {
1901 | break;
1902 | }
1903 |
1904 | tlv5_cap_index++;
1905 | tlv5_counter++;
1906 |
1907 | /* Why make another subtree (subtree2) below?
1908 | The addition of a subtree is not needed for the display.
1909 | However, when parsing the PDML, each Type 'contains' it's Length and Value.
1910 | */
1911 | subtree2 = proto_item_add_subtree(ti2, ett_dhcpv6_tlv5_type);
1912 |
1913 | proto_tree_add_item(subtree2, hf_capabilities_encoding_length, tvb, tlv5_cap_index, 1, ENC_BIG_ENDIAN0x00000000);
1914 | tlv5_cap_len = (uint8_t) tvb_get_uint8(tvb, tlv5_cap_index);
1915 |
1916 | tlv5_cap_index++;
1917 | tlv5_counter += tlv5_cap_len;
1918 |
1919 | /* In cases where the TLV length is greater than 2, the value fields should be displayed
1920 | according to the encoding of the values as described in the CL-SP-CANN-DHCP-Reg specification.
1921 | Below, these values are simply displayed as hex.
1922 | */
1923 | if (tlv5_cap_len > 2) {
1924 | proto_tree_add_item(subtree2, hf_capabilities_encoding_bytes, tvb, tlv5_cap_index, tlv5_cap_len, ENC_NA0x00000000);
1925 | } else {
1926 | proto_tree_add_item(subtree2, hf_capabilities_encoding_number, tvb, tlv5_cap_index, tlv5_cap_len, ENC_BIG_ENDIAN0x00000000);
1927 | }
1928 |
1929 | tlv5_cap_index += tlv5_cap_len;
1930 | tlv5_counter++;
1931 | }
1932 | break;
1933 | case CL_OPTION_TIME_OFFSET0x0026:
1934 | opt_len = tlv_len;
1935 | proto_item_append_text(ti, "%d", tvb_get_ntohl(tvb, sub_off));
1936 | break;
1937 | case CL_OPTION_IP_PREF0x0027:
1938 | opt_len = tlv_len;
1939 | field_value = tvb_get_uint8(tvb, sub_off);
1940 | if (field_value == 1) {
1941 | proto_item_append_text(ti, "%s", "IPv4");
1942 | } else if (field_value == 2) {
1943 | proto_item_append_text(ti, "%s", "IPv6");
1944 | } else if (field_value == 6) {
1945 | proto_item_append_text(ti, "%s", "Dual Stack");
1946 | } else {
1947 | proto_item_append_text(ti, "%s%d", "Invalid IP Preference value ", field_value);
1948 | }
1949 | break;
1950 | case CL_OPTION_DOCS_CMTS_CAP0x0401:
1951 | opt_len = tlv_len;
1952 | field_len = 0;
1953 | subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
1954 |
1955 | /* tlv_len contains the total length of all the TLVs for this
1956 | option */
1957 | if (tlv_len > 0) {
1958 | for (i = 0; field_len < opt_len; i++) {
1959 | int tagLen = 0;
1960 | int tag = 0;
1961 | tag = tvb_get_uint8(tvb, sub_off);
1962 | sub_off++;
1963 | tagLen = tvb_get_uint8(tvb, sub_off);
1964 | sub_off++;
1965 | if ((tag == CL_OPTION_DOCS_CMTS_TLV_VERS_NUM0x01) && (tagLen == 2)) {
1966 | proto_tree_add_item(subtree, hf_cablelabs_docsis_version_number, tvb, sub_off,
1967 | 2, ENC_BIG_ENDIAN0x00000000);
1968 | sub_off += 2;
1969 | }
1970 | else if ((tag == CL_OPTION_DOCS_DPOE_TLV_VERS_NUM0x02) && (tagLen == 2)) {
1971 | proto_tree_add_item(subtree, hf_cablelabs_dpoe_server_version_number, tvb, sub_off,
1972 | 2, ENC_BIG_ENDIAN0x00000000);
1973 | sub_off += 2;
1974 | }
1975 | else
1976 | sub_off += tagLen;
1977 |
1978 | field_len += tagLen + 2;
1979 | }
1980 | }
1981 | else
1982 | proto_item_append_text(ti, " (empty)");
1983 | break;
1984 | case CL_CM_MAC_ADDR0x0402:
1985 | opt_len = tlv_len;
1986 | if (tlv_len != 6) {
1987 | expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Bogus length: %d", tlv_len);
1988 | }
1989 | else {
1990 | /*proto_item_append_text(ti, "CM MAC Address Option = %s", */
1991 | proto_item_append_text(ti, "%s", tvb_bytes_to_str_punct(pinfo->pool, tvb, sub_off, opt_len, ':'));
1992 | /* tvb_bytes_to_str(pinfo->pool, tvb, sub_off, opt_len)); */
1993 | }
1994 | break;
1995 | case CL_EROUTER_CONTAINER_OPTION0x403:
1996 | opt_len = tlv_len;
1997 | proto_item_append_text(ti, " %s (len=%d)",
1998 | tvb_bytes_to_str(pinfo->pool, tvb, sub_off, opt_len), tlv_len);
1999 | break;
2000 | case CL_OPTION_CCC0x087a:
2001 | opt_len = tlv_len;
2002 | field_len = 0;
2003 | subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
2004 | proto_item_append_text(ti, " (%d bytes)", opt_len);
2005 | while (field_len < opt_len) {
2006 | sub_value = dissect_packetcable_ccc_option(subtree, ti, pinfo, tvb,
2007 | sub_off, (opt_len - field_len));
2008 | sub_off += sub_value;
2009 | field_len += sub_value;
2010 | }
2011 | break;
2012 | case CL_OPTION_CCCV60x087b:
2013 | opt_len = tlv_len;
2014 | field_len = 0;
2015 | subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
2016 | proto_item_append_text(ti, " (%d bytes)", opt_len);
2017 | while (field_len < opt_len) {
2018 | sub_value = dissect_packetcable_cccV6_option(subtree, ti, pinfo, tvb,
2019 | sub_off, (opt_len - field_len));
2020 | sub_off += sub_value;
2021 | field_len += sub_value;
2022 | }
2023 | break;
2024 | case CL_OPTION_CORRELATION_ID0x087c:
2025 | opt_len = tlv_len;
2026 | if (tlv_len != 4) {
2027 | proto_item_append_text(ti, "Bogus value length=%d",
2028 | tlv_len);
2029 | }
2030 | else {
2031 | proto_item_append_text(ti, "%u", tvb_get_ntohl(tvb, sub_off));
2032 | }
2033 | break;
2034 | default:
2035 | opt_len = tlv_len;
2036 | break;
2037 | }
2038 | off += (opt_len + 4);
2039 |
2040 | }
2041 | }
2042 | else {
2043 | expert_add_info_format(pinfo, v_item, &ei_dhcpv6_bogus_length, "Bogus length: %d", len);
2044 | }
2045 | return tvb_reported_length(tvb);
2046 | }
2047 |
2048 | static void
2049 | cablelabs_fmt_docsis_version( char *result, uint32_t revision )
2050 | {
2051 | snprintf( result, ITEM_LABEL_LENGTH240, "%d.%02d", (uint8_t)(( revision & 0xFF00 ) >> 8), (uint8_t)(revision & 0xFF) );
2052 | }
2053 |
2054 |
2055 | static void
2056 | cablelabs_fmt_dpoe_server_version( char *result, uint32_t revision )
2057 | {
2058 | snprintf( result, ITEM_LABEL_LENGTH240, "%d.%02d", (uint8_t)(( revision & 0xFF00 ) >> 8), (uint8_t)(revision & 0xFF) );
2059 | }
2060 |
2061 |
2062 | /* Returns the number of bytes consumed by this option. */
2063 | static int
2064 | // NOLINTNEXTLINE(misc-no-recursion)
2065 | dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
2066 | int off, int eoff, bool_Bool *at_end, int protocol, hopcount_info hpi, uint8_t msgtype)
2067 | {
2068 | uint16_t opttype, hwtype, subopt_type;
2069 | int temp_optlen, optlen, subopt_len; /* 16-bit values that need 16-bit rollover protection */
2070 | proto_item *ti = NULL((void*)0), *option_item;
2071 | proto_tree *subtree;
2072 | proto_tree *subtree_2;
2073 | int i;
2074 | uint16_t duidtype;
2075 | uint32_t enterprise_no, temp_uint32;
2076 | unsigned algorithm;
2077 |
2078 | /* option type and length must be present */
2079 | if ((eoff - off) < 4) {
2080 | *at_end = true1;
2081 | return 0;
2082 | }
2083 |
2084 | opttype = tvb_get_ntohs(tvb, off);
2085 | optlen = tvb_get_ntohs(tvb, off + 2);
2086 |
2087 | /* all option data must be present */
2088 | if ((eoff - off) < (4 + optlen)) {
2089 | *at_end = true1;
2090 | return 0;
2091 | }
2092 |
2093 | /* Replace "Text item" option header with a filterable field which in turn eliminates the need
2094 | * for the "Value:" raw data field. */
2095 | option_item = proto_tree_add_string_format(bp_tree, hf_option_type_str, tvb, off, 4 + optlen,
2096 | val_to_str_ext(pinfo->pool, opttype, &opttype_vals_ext, "DHCP option %u"),
2097 | "%s", val_to_str_ext(pinfo->pool, opttype, &opttype_vals_ext, "DHCP option %u"));
2098 |
2099 | subtree = proto_item_add_subtree(option_item, ett_dhcpv6_option);
2100 |
2101 | proto_tree_add_item(subtree, hf_option_type_num, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
2102 | proto_tree_add_item(subtree, hf_option_length, tvb, off + 2, 2, ENC_BIG_ENDIAN0x00000000);
2103 | off += 4;
2104 |
2105 | increment_dissection_depth(pinfo);
2106 |
2107 | switch (opttype) {
2108 | case OPTION_CLIENTID1:
2109 | if (optlen > 0) {
2110 | col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_str(pinfo->pool, tvb, off, optlen));
2111 | }
2112 | /* Fall through */
2113 | case OPTION_SERVERID2:
2114 | case OPTION_RELAYID53:
2115 | if (optlen < 2) {
2116 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
2117 | break;
2118 | }
2119 | proto_tree_add_item(subtree, hf_duid_bytes, tvb, off, optlen, ENC_NA0x00000000);
2120 | duidtype = tvb_get_ntohs(tvb, off);
2121 | proto_tree_add_item(subtree, hf_duid_type, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
2122 |
2123 | switch (duidtype) {
2124 | case DUID_LLT1:
2125 | {
2126 | nstime_t llt_time;
2127 |
2128 | if (optlen < 8) {
2129 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
2130 | break;
2131 | }
2132 | proto_tree_add_item(subtree, hf_duidllt_hwtype, tvb, off + 2, 2, ENC_BIG_ENDIAN0x00000000);
2133 |
2134 | /* Packet specifies seconds since Jan 1 2000, so add 946684800U (30 years) to get back to epoch */
2135 | llt_time.secs = tvb_get_ntohl(tvb, off + 4) + 946684800U;
2136 | llt_time.nsecs = 0;
2137 |
2138 | proto_tree_add_time(subtree, hf_duidllt_time, tvb, off + 4, 4, &llt_time);
2139 | if (optlen > 8) {
2140 | hwtype = tvb_get_ntohs(tvb, off + 2);
2141 | proto_tree_add_string(subtree, hf_duidllt_link_layer_addr, tvb, off + 8,
2142 | optlen - 8, tvb_arphrdaddr_to_str(pinfo->pool, tvb, off+8, optlen-8, hwtype));
2143 | if(DHCPV6_HW_IS_ETHER(hwtype, optlen-8)((hwtype == 1 || hwtype == 6) && optlen-8 == 6)) {
2144 | proto_tree_add_item(subtree, hf_duidllt_link_layer_addr_ether, tvb, off+8, optlen-8, ENC_NA0x00000000);
2145 | }
2146 | }
2147 | }
2148 | break;
2149 | case DUID_EN2:
2150 | if (optlen < 6) {
2151 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
2152 | break;
2153 | }
2154 | proto_tree_add_item(subtree, hf_duiden_enterprise, tvb, off + 2, 4, ENC_BIG_ENDIAN0x00000000);
2155 | if (optlen > 6) {
2156 | proto_tree_add_item(subtree, hf_duiden_identifier, tvb, off + 6, optlen - 6, ENC_NA0x00000000);
2157 | }
2158 | break;
2159 | case DUID_LL3:
2160 | if (optlen < 4) {
2161 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
2162 | break;
2163 | }
2164 | proto_tree_add_item(subtree, hf_duidll_hwtype, tvb, off + 2, 2, ENC_BIG_ENDIAN0x00000000);
2165 | if (optlen > 4) {
2166 | hwtype = tvb_get_ntohs(tvb, off + 2);
2167 | proto_tree_add_string(subtree, hf_duidll_link_layer_addr, tvb, off + 4,
2168 | optlen - 4, tvb_arphrdaddr_to_str(pinfo->pool, tvb, off+4, optlen-4, hwtype));
2169 | if(DHCPV6_HW_IS_ETHER(hwtype, optlen-4)((hwtype == 1 || hwtype == 6) && optlen-4 == 6)) {
2170 | proto_tree_add_item(subtree, hf_duidll_link_layer_addr_ether, tvb, off+4, optlen-4, ENC_NA0x00000000);
2171 | }
2172 | }
2173 | break;
2174 | case DUID_UUID4:
2175 | if (optlen != 18) {
2176 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
2177 | break;
2178 | }
2179 | proto_tree_add_item(subtree, hf_duiduuid_bytes, tvb, off + 2, 16, ENC_NA0x00000000);
2180 | break;
2181 | }
2182 | break;
2183 | case OPTION_USER_CLASS15:
2184 | {
2185 | temp_optlen = 0;
2186 | while (optlen > temp_optlen) {
2187 | subopt_len = tvb_get_ntohs(tvb, off + temp_optlen);
2188 | if (subopt_len > optlen - temp_optlen) {
2189 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "User Class: suboption too long");
2190 | break;
2191 | }
2192 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off+temp_optlen, subopt_len, ett_dhcpv6_userclass_option, &ti, "User Class suboption");
2193 | proto_tree_add_item(subtree_2, hf_option_userclass_length, tvb, off + temp_optlen, 2, ENC_BIG_ENDIAN0x00000000);
2194 | proto_tree_add_item(subtree_2, hf_option_userclass_opaque_data, tvb, off + temp_optlen + 2, subopt_len, ENC_NA0x00000000);
2195 |
2196 | temp_optlen += subopt_len + 2;
2197 | }
2198 | break;
2199 | }
2200 | case OPTION_NTP_SERVER56:
2201 | if (optlen < 4) {
2202 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NTP Server: malformed option");
2203 | break;
2204 | }
2205 | temp_optlen = 0;
2206 | while (optlen > temp_optlen) {
2207 | subopt_type = tvb_get_ntohs(tvb, off + temp_optlen);
2208 | subopt_len = tvb_get_ntohs(tvb, off + 2 + temp_optlen);
2209 | if (subopt_len > optlen - temp_optlen) {
2210 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NTP Server: suboption too long");
2211 | break;
2212 | }
2213 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off+temp_optlen, 4 + subopt_len, ett_dhcpv6_netserver_option, &ti,
2214 | val_to_str(pinfo->pool, subopt_type, ntp_server_opttype_vals, "NTP Server suboption %u"));
2215 | proto_tree_add_item(subtree_2, hf_option_ntpserver_type, tvb, off + temp_optlen, 2, ENC_BIG_ENDIAN0x00000000);
2216 | proto_tree_add_item(subtree_2, hf_option_ntpserver_length, tvb, off + temp_optlen + 2, 2, ENC_BIG_ENDIAN0x00000000);
2217 | temp_optlen += 4;
2218 | switch (subopt_type) {
2219 | case NTP_SUBOPTION_SRV_ADDR1:
2220 | proto_tree_add_item(subtree_2, hf_option_ntpserver_addr, tvb, off + temp_optlen, 16, ENC_NA0x00000000);
2221 | break;
2222 | case NTP_SUBOPTION_MC_ADDR2:
2223 | proto_tree_add_item(subtree_2, hf_option_ntpserver_mc_addr, tvb, off + temp_optlen, 16, ENC_NA0x00000000);
2224 | break;
2225 | case NTP_SUBOPTION_SRV_FQDN3:
2226 | /* RFC 5906: section 4.3: "Internationalized domain names are not allowed ..." */
2227 | dhcpv6_domain(subtree_2, ti, pinfo, hf_option_ntpserver_fqdn, tvb, off + temp_optlen, subopt_len);
2228 | break;
2229 | }
2230 |
2231 | temp_optlen += subopt_len;
2232 | }
2233 | break;
2234 | case OPTION_S46_RULE89:
2235 | {
2236 | uint8_t ipv4_pref_len, ipv6_pref_len;
2237 | int ipv6_pref_len_bytes;
2238 |
2239 | if (optlen < 8) {
2240 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_RULE: malformed option");
2241 | break;
2242 | }
2243 |
2244 | /* 0 1 2 3 4 5 6 7
2245 | * +-+-+-+-+-+-+-+-+
2246 | * |Reserved |F|
2247 | * +-+-+-+-+-+-+-+-+
2248 | */
2249 | proto_tree_add_bitmask(subtree, tvb, off, hf_option_s46_rule_flags, ett_dhcpv6_s46_rule_flags, dhcpv6_s46_rule_flags_fields, ENC_BIG_ENDIAN0x00000000);
2250 | proto_tree_add_item(subtree, hf_option_s46_rule_ea_len, tvb, off + 1, 1, ENC_BIG_ENDIAN0x00000000);
2251 | proto_tree_add_item(subtree, hf_option_s46_rule_ipv4_pref_len, tvb, off + 2, 1, ENC_BIG_ENDIAN0x00000000);
2252 | ipv4_pref_len = tvb_get_uint8(tvb, off + 2);
2253 |
2254 | if (ipv4_pref_len > 32) {
2255 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_RULE: malformed option");
2256 | break;
2257 | }
2258 |
2259 | proto_tree_add_item(subtree, hf_option_s46_rule_ipv4_prefix, tvb, off + 3, 4, ENC_BIG_ENDIAN0x00000000);
2260 | proto_tree_add_item(subtree, hf_option_s46_rule_ipv6_pref_len, tvb, off + 7, 1, ENC_BIG_ENDIAN0x00000000);
2261 | ipv6_pref_len = tvb_get_uint8(tvb, off + 7);
2262 |
2263 | if (ipv6_pref_len > 128) {
2264 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_RULE: malformed option");
2265 | break;
2266 | }
2267 |
2268 | ipv6_pref_len_bytes =
2269 | dissect_dhcpv6_s46_ipv6_prefix(tvb, hf_option_s46_rule_ipv6_prefix, off + 8, ipv6_pref_len, subtree);
2270 |
2271 | temp_optlen = 8 + ipv6_pref_len_bytes;
2272 | while ((optlen - temp_optlen) > 0) {
2273 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2274 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
2275 | if (*at_end) {
2276 | /* Bad option - just skip to the end */
2277 | temp_optlen = optlen;
2278 | }
2279 | }
2280 | }
2281 | break;
2282 | case OPTION_S46_BR90:
2283 | if (optlen != 16) {
2284 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_BR: malformed option");
2285 | break;
2286 | }
2287 |
2288 | proto_tree_add_item(subtree, hf_option_s46_br_address, tvb, off, 16, ENC_NA0x00000000);
2289 | break;
2290 | case OPTION_S46_DMR91:
2291 | {
2292 | uint8_t dmr_pref_len;
2293 |
2294 | if (optlen < 1 || optlen > 17) {
2295 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_DMR: malformed option");
2296 | break;
2297 | }
2298 |
2299 | proto_tree_add_item(subtree, hf_option_s46_dmr_pref_len, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2300 | dmr_pref_len = tvb_get_uint8(tvb, off);
2301 |
2302 | if (dmr_pref_len > 128) {
2303 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_DMR: malformed option");
2304 | break;
2305 | }
2306 |
2307 | dissect_dhcpv6_s46_ipv6_prefix(tvb, hf_option_s46_dmr_prefix, off + 1, dmr_pref_len, subtree);
2308 | }
2309 | break;
2310 | case OPTION_S46_V4V6BIND92:
2311 | {
2312 | uint8_t ipv6_pref_len;
2313 | int ipv6_pref_len_bytes;
2314 |
2315 | if (optlen < 5) {
2316 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_V4V6BIND: malformed option");
2317 | break;
2318 | }
2319 |
2320 | proto_tree_add_item(subtree, hf_option_s46_v4v6bind_ipv4_address, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
2321 | proto_tree_add_item(subtree, hf_option_s46_v4v6bind_ipv6_pref_len, tvb, off + 4, 1, ENC_BIG_ENDIAN0x00000000);
2322 | ipv6_pref_len = tvb_get_uint8(tvb, off + 4);
2323 |
2324 | if (ipv6_pref_len > 128) {
2325 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_V4V6BIND: malformed option");
2326 | break;
2327 | }
2328 |
2329 | ipv6_pref_len_bytes =
2330 | dissect_dhcpv6_s46_ipv6_prefix(tvb, hf_option_s46_v4v6bind_ipv6_prefix, off + 5, ipv6_pref_len, subtree);
2331 |
2332 | temp_optlen = 5 + ipv6_pref_len_bytes;
2333 | while ((optlen - temp_optlen) > 0) {
2334 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2335 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
2336 | if (*at_end) {
2337 | /* Bad option - just skip to the end */
2338 | temp_optlen = optlen;
2339 | }
2340 | }
2341 | }
2342 | break;
2343 | case OPTION_S46_PORTPARAMS93:
2344 | {
2345 | uint16_t psid;
2346 | uint8_t offset, psid_len;
2347 |
2348 | if (optlen != 4) {
2349 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_PORTPARAMS: malformed option");
2350 | break;
2351 | }
2352 |
2353 | proto_tree_add_item(subtree, hf_option_s46_portparam_offset, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2354 | offset = tvb_get_uint8(tvb, off);
2355 |
2356 | if (offset > 15) {
2357 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_PORTPARAMS: malformed option");
2358 | break;
2359 | }
2360 |
2361 | proto_tree_add_item(subtree, hf_option_s46_portparam_psid_len, tvb, off + 1, 1, ENC_BIG_ENDIAN0x00000000);
2362 | psid_len = tvb_get_uint8(tvb, off + 1);
2363 |
2364 | if (psid_len > 16) {
2365 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "S46_PORTPARAMS: malformed option");
2366 | break;
2367 | }
2368 |
2369 | psid = tvb_get_ntohs(tvb, off + 2);
2370 | proto_tree_add_uint(subtree, hf_option_s46_portparam_psid, tvb, off + 2, 2, psid >> (16 - psid_len));
2371 | }
2372 | break;
2373 | case OPTION_IA_NA3:
2374 | case OPTION_IA_LL138:
2375 | case OPTION_IA_PD25:
2376 | if (optlen < 12) {
2377 | if (opttype == OPTION_IA_NA3)
2378 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_NA: malformed option");
2379 | else if (opttype == OPTION_IA_LL138)
2380 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_LL: malformed option");
2381 | else
2382 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_PD: malformed option");
2383 | break;
2384 | }
2385 | proto_tree_add_string(subtree, hf_iaid, tvb, off,
2386 | 4, tvb_arphrdaddr_to_str(pinfo->pool, tvb, off, 4, opttype)); /* XXX: IAID is opaque ? review ... */
2387 | proto_tree_add_item(subtree, hf_iaid_t1, tvb, off+4, 4, ENC_BIG_ENDIAN0x00000000);
2388 | proto_tree_add_item(subtree, hf_iaid_t2, tvb, off+8, 4, ENC_BIG_ENDIAN0x00000000);
2389 |
2390 | temp_optlen = 12;
2391 | while ((optlen - temp_optlen) > 0) {
2392 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2393 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
2394 | if (*at_end) {
2395 | /* Bad option - just skip to the end */
2396 | temp_optlen = optlen;
2397 | }
2398 | }
2399 | break;
2400 | case OPTION_IA_TA4:
2401 | if (optlen < 4) {
2402 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_TA: malformed option");
2403 | break;
2404 | }
2405 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_obsoleted_option, "IA_TA: obsoleted option (RFC draft-ietf-dhc-rfc8415bis-12)");
2406 | proto_tree_add_string(subtree, hf_iata, tvb, off,
2407 | 4, tvb_arphrdaddr_to_str(pinfo->pool, tvb, off, 4, opttype)); /* XXX: IAID is opaque ? review ... */
2408 | temp_optlen = 4;
2409 | while ((optlen - temp_optlen) > 0) {
2410 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2411 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
2412 | if (*at_end) {
2413 | /* Bad option - just skip to the end */
2414 | temp_optlen = optlen;
2415 | }
2416 | }
2417 | break;
2418 | case OPTION_IAADDR5:
2419 | if (optlen < 24) {
2420 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IAA: malformed option");
2421 | break;
2422 | }
2423 |
2424 | proto_tree_add_item(subtree, hf_iaaddr_ip, tvb, off, 16, ENC_NA0x00000000);
2425 | col_append_fstr(pinfo->cinfo, COL_INFO, "IAA: %s ", tvb_ip6_to_str(pinfo->pool, tvb, off)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, off));
2426 |
2427 | proto_tree_add_item(subtree, hf_iaaddr_pref_lifetime, tvb, off+16, 4, ENC_BIG_ENDIAN0x00000000);
2428 | proto_tree_add_item(subtree, hf_iaaddr_valid_lifetime, tvb, off+20, 4, ENC_BIG_ENDIAN0x00000000);
2429 |
2430 | temp_optlen = 24;
2431 | while ((optlen - temp_optlen) > 0) {
2432 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2433 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
2434 | if (*at_end) {
2435 | /* Bad option - just skip to the end */
2436 | temp_optlen = optlen;
2437 | }
2438 | }
2439 | break;
2440 | case OPTION_LLADDR139:
2441 | if (optlen < 12) {
2442 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LLA: malformed option");
2443 | break;
2444 | }
2445 |
2446 | uint32_t ll_len;
2447 | uint32_t ll_type;
2448 | proto_tree_add_item_ret_uint(subtree, hf_lladdr_linklayer_type, tvb, off, 2, ENC_BIG_ENDIAN0x00000000, &ll_type);
2449 | proto_tree_add_item_ret_uint(subtree, hf_lladdr_linklayer_len, tvb, off+2, 2, ENC_BIG_ENDIAN0x00000000, &ll_len);
2450 |
2451 | if (optlen < (int)(12 + ll_len)) {
2452 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LLA: malformed option");
2453 | break;
2454 | }
2455 | proto_tree_add_string(subtree, hf_lladdr_linklayer_addr, tvb, off+4, ll_len,
2456 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, off+4, ll_len, ll_type));
2457 | if (DHCPV6_HW_IS_ETHER(ll_type, ll_len)((ll_type == 1 || ll_type == 6) && ll_len == 6)) {
2458 | proto_tree_add_item(subtree, hf_client_link_layer_addr_ether, tvb, off+4, ll_len, ENC_NA0x00000000);
2459 | col_append_fstr(pinfo->cinfo, COL_INFO, "LLA: %s ", tvb_ether_to_str(pinfo->pool, tvb, off+4)tvb_address_to_str(pinfo->pool, tvb, AT_ETHER, off+4));
2460 | }
2461 |
2462 | proto_tree_add_item(subtree, hf_lladdr_extra_addr, tvb, off+4+ll_len, 4, ENC_BIG_ENDIAN0x00000000);
2463 | proto_tree_add_item(subtree, hf_lladdr_valid_lifetime, tvb, off+8+ll_len, 4, ENC_BIG_ENDIAN0x00000000);
2464 |
2465 | temp_optlen = ll_len+12;
2466 | while ((optlen - temp_optlen) > 0) {
2467 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2468 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
2469 | if (*at_end) {
2470 | /* Bad option - just skip to the end */
2471 | temp_optlen = optlen;
2472 | }
2473 | }
2474 | break;
2475 | case OPTION_ORO6:
2476 | case OPTION_ERO43:
2477 | for (i = 0; i < optlen; i += 2) {
2478 | proto_tree_add_item(subtree, hf_requested_option_code, tvb, off+i,
2479 | 2, ENC_BIG_ENDIAN0x00000000);
2480 | }
2481 | break;
2482 | case OPTION_PREFERENCE7:
2483 | if (optlen != 1) {
2484 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "PREFERENCE: malformed option");
2485 | break;
2486 | }
2487 | proto_tree_add_item(subtree, hf_option_preference, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2488 | break;
2489 | case OPTION_ELAPSED_TIME8:
2490 | if (optlen != 2) {
2491 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "ELAPSED-TIME: malformed option");
2492 | break;
2493 | }
2494 |
2495 | temp_optlen = tvb_get_ntohs(tvb, off);
2496 | proto_tree_add_uint(subtree, hf_elapsed_time, tvb, off, 2, temp_optlen*10);
2497 | break;
2498 | case OPTION_RELAY_MSG9:
2499 | if (optlen == 0) {
2500 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RELAY-MSG: malformed option");
2501 | } else {
2502 | /* here, we should dissect a full DHCP message */
2503 | dissect_dhcpv6(tvb, pinfo, subtree, off, off + optlen, hpi);
2504 | }
2505 | break;
2506 | case OPTION_AUTH11:
2507 | if (optlen < 11) {
2508 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "AUTH: malformed option");
2509 | break;
2510 | }
2511 |
2512 | proto_tree_add_item(subtree, hf_auth_protocol, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2513 | proto_tree_add_item_ret_uint(subtree, hf_auth_algorithm, tvb, off+1, 1, ENC_BIG_ENDIAN0x00000000, &algorithm);
2514 | proto_tree_add_item(subtree, hf_auth_rdm, tvb, off+2, 1, ENC_BIG_ENDIAN0x00000000);
2515 | proto_tree_add_item(subtree, hf_auth_replay_detection, tvb, off+3, 8, ENC_NA0x00000000);
2516 | if (optlen > 11+20 && algorithm == 1) { // RFC 3315, HMAC-MD5 (16) + Key ID (4) => 20 bytes
2517 | if (optlen-11-20 < 256) {
2518 | proto_tree_add_item(subtree, hf_auth_realm, tvb, off+11, optlen-11-20, ENC_ASCII0x00000000);
2519 | } else {
2520 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DHCP realm: probably malformed option");
2521 | }
2522 | proto_tree_add_item(subtree, hf_auth_key_id, tvb, off+optlen-16-4, 4, ENC_BIG_ENDIAN0x00000000);
2523 | proto_tree_add_item(subtree, hf_auth_md5_data, tvb, off+optlen-16, 16, ENC_NA0x00000000);
2524 | } else {
2525 | proto_tree_add_item(subtree, hf_auth_info, tvb, off+11, optlen-11, ENC_NA0x00000000);
2526 | }
2527 | break;
2528 | case OPTION_UNICAST12:
2529 | if (optlen != 16) {
2530 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "UNICAST: malformed option");
2531 | break;
2532 | }
2533 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_obsoleted_option, "UNICAST: obsoleted option (RFC draft-ietf-dhc-rfc8415bis-12)");
2534 | proto_tree_add_item(subtree, hf_opt_unicast, tvb, off, 16, ENC_NA0x00000000);
2535 | break;
2536 | case OPTION_STATUS_CODE13:
2537 | proto_tree_add_item(subtree, hf_opt_status_code, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
2538 | if (optlen > 2)
2539 | proto_tree_add_item(subtree, hf_opt_status_msg, tvb, off+2, optlen - 2, ENC_ASCII0x00000000);
2540 | break;
2541 | case OPTION_VENDOR_CLASS16:
2542 | if (optlen < 4) {
2543 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "VENDOR_CLASS: malformed option");
2544 | break;
2545 | }
2546 | proto_tree_add_item(subtree, hf_vendorclass_enterprise, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
2547 | if (optlen > 4)
2548 | proto_tree_add_item(subtree, hf_vendorclass_data, tvb, off+6, optlen-6, ENC_ASCII0x00000000);
2549 | break;
2550 | case OPTION_VENDOR_OPTS17:
2551 | {
2552 | if (optlen < 4) {
2553 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "VENDOR_OPTS: malformed option");
2554 | break;
2555 | }
2556 |
2557 | tvbuff_t *opt_tvb;
2558 |
2559 | enterprise_no = tvb_get_ntohl(tvb, off);
2560 | opt_tvb = tvb_new_subset_length(tvb, off, optlen);
2561 |
2562 | // Find a per-vendor dissector or fallback to the generic-enterprise-dissector.
2563 | if (!dissector_try_uint_with_data(dhcpv6_enterprise_opts_dissector_table, enterprise_no, opt_tvb, pinfo, subtree, false0, &msgtype)) {
2564 | proto_tree_add_item(subtree, hf_vendoropts_enterprise, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
2565 | int optoffset = 0;
2566 |
2567 | while ((optlen - 4 - optoffset) > 0) {
2568 | int olen = tvb_get_ntohs(tvb, off + optoffset + 6);
2569 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off + optoffset + 4,
2570 | 4 + olen, ett_dhcpv6_option_vsoption, NULL((void*)0), "option");
2571 | proto_tree_add_item(subtree_2, hf_vendoropts_enterprise_option_code, tvb, off + optoffset + 4, 2, ENC_BIG_ENDIAN0x00000000);
2572 | proto_tree_add_item(subtree_2, hf_vendoropts_enterprise_option_length, tvb, off + optoffset + 6, 2, ENC_BIG_ENDIAN0x00000000);
2573 | proto_tree_add_item(subtree_2, hf_vendoropts_enterprise_option_data, tvb, off + optoffset + 8, olen, ENC_NA0x00000000);
2574 | optoffset += (4 + olen);
2575 | }
2576 | }
2577 | break;
2578 | }
2579 | case OPTION_INTERFACE_ID18:
2580 | {
2581 | if (optlen == 0) {
2582 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "INTERFACE_ID: malformed option");
2583 | break;
2584 | }
2585 |
2586 | if (cablelabs_interface_id) {
2587 | int namelen = tvb_strnlen(tvb, off, optlen)+1;
2588 | if (namelen == 0) {
2589 | proto_tree_add_item(subtree, hf_cablelabs_interface_id, tvb, off, optlen, ENC_ASCII0x00000000);
2590 | } else {
2591 | proto_tree_add_item(subtree, hf_cablelabs_interface_id, tvb, off, namelen-1, ENC_ASCII0x00000000);
2592 |
2593 | temp_optlen = optlen - namelen;
2594 | off += namelen;
2595 | if (temp_optlen >= 6)
2596 | proto_tree_add_string(subtree, hf_cablelabs_interface_id_link_address, tvb, off, temp_optlen, tvb_arphrdaddr_to_str(pinfo->pool, tvb, off, 6, ARPHRD_ETHER1));
2597 | }
2598 | } else {
2599 | proto_tree_add_item(subtree, hf_interface_id, tvb, off, optlen, ENC_NA0x00000000);
2600 | }
2601 | }
2602 | break;
2603 | case OPTION_RECONF_MSG19:
2604 | if (optlen != 1) {
2605 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RECONF_MSG: malformed option");
2606 | break;
2607 | }
2608 |
2609 | proto_tree_add_item(subtree, hf_reconf_msg, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2610 | break;
2611 | case OPTION_RECONF_ACCEPT20:
2612 | if (optlen)
2613 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RECONF_ACCEPT: malformed option");
2614 | break;
2615 | case OPTION_SIP_SERVER_D21:
2616 | if (optlen > 0) {
2617 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off, optlen, ett_dhcpv6_sip_server_domain_search_list_option, &ti, "SIP Servers Domain Search List");
2618 | dhcpv6_domain(subtree_2, ti, pinfo, hf_sip_server_domain_search_fqdn, tvb, off, optlen);
2619 | }
2620 | break;
2621 | case OPTION_SIP_SERVER_A22:
2622 | if (optlen % 16) {
2623 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "SIP servers address: malformed option");
2624 | break;
2625 | }
2626 |
2627 | for (i = 0; i < optlen; i += 16)
2628 | proto_tree_add_item(subtree, hf_sip_server_a, tvb, off + i, 16, ENC_NA0x00000000);
2629 | break;
2630 | case OPTION_DNS_SERVERS23:
2631 | if (optlen % 16) {
2632 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DNS servers address: malformed option");
2633 | break;
2634 | }
2635 |
2636 | for (i = 0; i < optlen; i += 16) {
2637 | ti = proto_tree_add_item(subtree, hf_dns_servers, tvb, off + i, 16, ENC_NA0x00000000);
2638 | proto_item_prepend_text(ti, " %d ", i/16 + 1);
2639 | }
2640 | break;
2641 |
2642 | case OPTION_DHCP4_O_DHCP6_SERVER88:
2643 | if (optlen % 16) {
2644 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DHCP4_O_DHCP6_SERVER: malformed option");
2645 | break;
2646 | }
2647 |
2648 | for (i = 0; i < optlen; i += 16) {
2649 | ti = proto_tree_add_item(subtree, hf_dhcp4o6_servers, tvb, off + i, 16, ENC_NA0x00000000);
2650 | proto_item_prepend_text(ti, " %d ", i/16 + 1);
2651 | }
2652 | break;
2653 |
2654 | case OPTION_DHCPV4_MSG87:
2655 | {
2656 | tvbuff_t *dhcpv4_tvb;
2657 |
2658 | dhcpv4_tvb = tvb_new_subset_length(tvb, off, optlen);
2659 | call_dissector(dhcpv4_handle, dhcpv4_tvb, pinfo, subtree);
2660 |
2661 | /* the DHCP(v4) dissector overwrites COL_PROTOCOL. This is probably
2662 | * good, because the DHCP(v4) message will be the main content of this
2663 | * packet. But at least disambiguate it a little bit vs. "regular"
2664 | * DHCP.
2665 | */
2666 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv4o6");
2667 | col_prepend_fstr(pinfo->cinfo, COL_INFO, "%-12s ", val_to_str_ext(pinfo->pool, msgtype, &msgtype_vals_ext, "Message Type %u"));
2668 | break;
2669 | }
2670 |
2671 | case OPTION_DOMAIN_LIST24:
2672 | if (optlen > 0) {
2673 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off, optlen, ett_dhcpv6_dns_domain_search_list_option, &ti,
2674 | "Domain name suffix search list");
2675 | dhcpv6_domain(subtree_2, ti, pinfo, hf_domain_search_list_entry, tvb, off, optlen);
2676 | }
2677 | break;
2678 |
2679 | /* NIS...: RFC 3898 */
2680 | case OPTION_NIS_SERVERS27:
2681 | if (optlen % 16) {
2682 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NIS servers address: malformed option");
2683 | break;
2684 | }
2685 | for (i = 0; i < optlen; i += 16)
2686 | proto_tree_add_item(subtree, hf_nis_servers, tvb, off + i, 16, ENC_NA0x00000000);
2687 | break;
2688 | case OPTION_NISP_SERVERS28:
2689 | if (optlen % 16) {
2690 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NISP servers address: malformed option");
2691 | break;
2692 | }
2693 | for (i = 0; i < optlen; i += 16)
2694 | proto_tree_add_item(subtree, hf_nisp_servers, tvb, off + i, 16, ENC_NA0x00000000);
2695 | break;
2696 | case OPTION_NIS_DOMAIN_NAME29:
2697 | if (optlen > 0) {
2698 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off, optlen, ett_dhcpv6_nis_domain_name_option, &ti, "nis-domain-name");
2699 | dhcpv6_domain(subtree_2, ti, pinfo, hf_nis_fqdn, tvb, off, optlen);
2700 | }
2701 | break;
2702 | case OPTION_NISP_DOMAIN_NAME30:
2703 | if (optlen > 0) {
2704 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off, optlen, ett_dhcpv6_nisp_domain_name_option, &ti, "nisp-domain-name");
2705 | dhcpv6_domain(subtree_2, ti, pinfo, hf_nisp_fqdn, tvb, off, optlen);
2706 | }
2707 | break;
2708 |
2709 | case OPTION_SNTP_SERVERS31:
2710 | /* Deprecated as of RFC 5908 */
2711 | if (optlen % 16) {
2712 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "SNTP servers address: malformed option");
2713 | break;
2714 | }
2715 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_deprecated_option, "SNTP servers address: deprecated option (RFC 5908)");
2716 | for (i = 0; i < optlen; i += 16){
2717 | ti = proto_tree_add_item(subtree, hf_sntp_servers, tvb, off + i, 16, ENC_NA0x00000000);
2718 | proto_item_prepend_text(ti, " %d ", i/16 + 1);
2719 | }
2720 | break;
2721 | case OPTION_LIFETIME32:
2722 | if (optlen != 4) {
2723 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LIFETIME: malformed option");
2724 | break;
2725 | }
2726 | proto_tree_add_item(subtree, hf_opt_lifetime, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
2727 | break;
2728 |
2729 | /* BCMCS...: RFC 4280 */
2730 | case OPTION_BCMCS_SERVER_D33:
2731 | if (optlen > 0) {
2732 | subtree_2 = proto_tree_add_subtree(subtree, tvb, off, optlen, ett_dhcpv6_bcmcs_servers_domain_search_list_option, &ti, "BCMCS Servers Domain Search List");
2733 | dhcpv6_domain(subtree_2, ti, pinfo, hf_bcmcs_servers_fqdn, tvb, off, optlen);
2734 | }
2735 | break;
2736 | case OPTION_BCMCS_SERVER_A34:
2737 | if (optlen % 16) {
2738 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "BCMCS servers address: malformed option");
2739 | break;
2740 | }
2741 | for (i = 0; i < optlen; i += 16)
2742 | proto_tree_add_item(subtree, hf_bcmcs_servers_a, tvb, off + i, 16, ENC_NA0x00000000);
2743 | break;
2744 |
2745 | case OPTION_REMOTE_ID37:
2746 | if (optlen < 4) {
2747 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "REMOTE_ID: malformed option");
2748 | break;
2749 | }
2750 | proto_tree_add_item(subtree, hf_remoteid_enterprise, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
2751 | off += 4;
2752 | proto_tree_add_item(subtree, hf_remoteid_enterprise_id, tvb, off, optlen - 4, ENC_NA0x00000000);
2753 | break;
2754 | case OPTION_SUBSCRIBER_ID38:
2755 | if (optlen == 0) {
2756 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "SUBSCRIBER_ID: malformed option");
2757 | break;
2758 | }
2759 | proto_tree_add_item(subtree, hf_subscriber_id, tvb, off, optlen, ENC_ASCII0x00000000);
2760 | break;
2761 | case OPTION_CLIENT_FQDN39:
2762 | if (optlen < 1) {
2763 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "FQDN: malformed option");
2764 | } else {
2765 | uint8_t flags;
2766 | proto_item *fi = NULL((void*)0);
2767 | proto_tree *flags_tree = NULL((void*)0);
2768 | char *flags_str= NULL((void*)0), *suffix;
2769 | bool_Bool is_client;
2770 | proto_item *exi;
2771 | proto_tree *ex_subtree;
2772 |
2773 | /*
2774 | * A client MUST only include the OPTION_CLIENT_FQDN in SOLICIT, REQUEST, RENEW, or REBIND messages.
2775 | * [RFC 4704 Section 5.]
2776 | * Servers MUST only include a OPTION_CLIENT_FQDN in ADVERTISE and REPLY messages.
2777 | * [RFC 4704 Section 6.]
2778 | */
2779 | if (msgtype == SOLICIT1 || msgtype == REQUEST3 || msgtype == RENEW5 || msgtype == REBIND6)
2780 | is_client = true1;
2781 | else if (msgtype == ADVERTISE2 || msgtype == REPLY7)
2782 | is_client = false0;
2783 | else {
2784 | exi = proto_tree_add_uint_format(subtree, hf_clientfqdn_bad_msgtype, tvb, off-4, 1,
2785 | msgtype,
2786 | "Only the following message types are permitted to use OPTION_CLIENT_FQDN:\n"
2787 | "SOLICIT, REQUEST, RENEW, REBIND, ADVERTISE, and REPLY");
2788 | ex_subtree = proto_item_add_subtree(exi, ett_clientfqdn_expert);
2789 | proto_tree_add_expert(ex_subtree, pinfo, &ei_dhcpv6_clientfqdn_bad_msgtype, tvb, off-4, 1);
2790 | break;
2791 | }
2792 | /*
2793 | * +-----+-+-+-+
2794 | * | MBZ |N|O|S|
2795 | * +-----+-+-+-+
2796 | *
2797 | * [RFC4704 Section 4.1]
2798 | * "The 'S' bit indicates whether the server SHOULD or SHOULD NOT perform the AAAA RR (FQDN-to-address)
2799 | * DNS updates. A client sets the bit to 0 to indicate that the server SHOULD NOT perform the updates
2800 | * and 1 to indicate that the server SHOULD perform the updates. The state of the bit in the reply from
2801 | * the server indicates the action to be taken by the server; if it is 1 the server has taken
2802 | * responsibility for AAAA RR updates for the FQDN.
2803 | *
2804 | * The 'O' bit indicates whether the server has overridden the client's preference for the 'S' bit.
2805 | * A client MUST set this bit to 0. A server MUST set this bit to 1 if the "S" bit in its reply to the
2806 | * client does not match the 'S' bit received from the client.
2807 | *
2808 | * The 'N' bit indicates whether the server SHOULD NOT perform any DNS updates. A client sets this bit to
2809 | * 0 to request that the server SHOULD perform updates (the PTR RR and possibly the AAAA RR based on the
2810 | * 'S' bit) 1 to request that the server SHOULD NOT perform any DNS updates. A server sets the 'N' bit to
2811 | * indicate whether the server SHALL (0) or SHALL NOT (1) perform DNS updates. If the 'N' bit is 1, the
2812 | * 'S' bit MUST be 0."
2813 | */
2814 | flags = tvb_get_uint8(tvb, off);
2815 | suffix = "]";
2816 |
2817 | if (is_client) {
2818 | /*CLIENT*/
2819 | if ((flags & 0x5)==0) flags_str = "[CLIENT wants to update its AAAA RRs and SERVER to update its PTR RRs";
2820 | if ((flags & 0x5)==1) flags_str = "[CLIENT wants SERVER to update both its AAAA and PTR RRs";
2821 | if ((flags & 0x5)==4) flags_str = "[CLIENT prefers that the server not perform *any* DNS updates";
2822 | if ((flags & 0x5)==5) flags_str = "[ERROR: CLIENT prefers that the server not perform *any* DNS updates\n"
2823 | " In which case the 'S' bit MUST be 0";
2824 | /* The client MUST set this bit to 0 (in that it is meaningless). */
2825 | }
2826 | else {
2827 | /*SERVER*/
2828 | if ((flags & 0x5)==0) flags_str = "[CLIENT SHALL update AAAA RRs; SERVER SHALL update PTR RRs";
2829 | if ((flags & 0x5)==1) flags_str = "[SERVER SHALL update both AAAA and PTR RRs";
2830 | if ((flags & 0x5)==4) flags_str = "[CLIENT SHALL update AAAA RRs; SERVER SHALL NOT perform any DNS updates";
2831 | if ((flags & 0x5)==5) flags_str = "[ERROR: SERVER SHALL NOT perform *any* DNS updates in which case "
2832 | " the 'S' bit MUST be 0";
2833 | if ((flags & 0x2)==2
2834 | && ((flags & 0x5)==0 || (flags & 0x5)==1))
2835 | suffix = "]\n[Server has overridden the client's S bit]";
2836 | }
2837 | fi = proto_tree_add_uint_format(subtree, hf_clientfqdn_flags, tvb, off, 1, flags,
2838 | "Flags: 0x%02x %s%s", flags, flags_str, suffix);
2839 | flags_tree = proto_item_add_subtree(fi, ett_clientfqdn_flags);
2840 |
2841 | if (is_client) {
2842 | proto_tree_add_item(flags_tree, hf_clientfqdn_client_n, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2843 | proto_tree_add_item(flags_tree, hf_clientfqdn_client_s, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2844 | }
2845 | else {
2846 | proto_tree_add_item(flags_tree, hf_clientfqdn_server_n, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2847 | proto_tree_add_item(flags_tree, hf_clientfqdn_server_o, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2848 | proto_tree_add_item(flags_tree, hf_clientfqdn_server_s, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2849 | }
2850 | if ((flags & 0x5)==5)
2851 | proto_tree_add_expert(subtree, pinfo, &ei_dhcpv6_s_bit_should_be_zero, tvb, off, 1);
2852 |
2853 | dhcpv6_domain(subtree, option_item, pinfo, hf_client_fqdn, tvb, off+1, optlen-1);
2854 | }
2855 | break;
2856 | case OPTION_PANA_AGENT40:
2857 | if (optlen % 16) {
2858 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "PANA agent address: malformed option");
2859 | break;
2860 | }
2861 | for (i = 0; i < optlen; i += 16)
2862 | proto_tree_add_item(subtree, hf_pana_agent, tvb, off + i, 16, ENC_NA0x00000000);
2863 | break;
2864 | case OPTION_TIME_ZONE41:
2865 | if (optlen > 0)
2866 | proto_tree_add_item(subtree, hf_opt_timezone, tvb, off, optlen, ENC_ASCII0x00000000);
2867 | break;
2868 | case OPTION_TZDB42:
2869 | if (optlen > 0)
2870 | proto_tree_add_item(subtree, hf_opt_tzdb, tvb, off, optlen, ENC_ASCII0x00000000);
2871 | break;
2872 |
2873 | case OPTION_MUDURL112:
2874 | if (optlen > 0)
2875 | proto_tree_add_item(subtree, hf_opt_mudurl, tvb, off, optlen, ENC_ASCII0x00000000);
2876 | break;
2877 |
2878 | case OPTION_LQ_QUERY44:
2879 | {
2880 | uint8_t query_type;
2881 | if (optlen < 17) {
2882 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ-QUERY: malformed option");
2883 | break;
2884 | }
2885 | query_type = tvb_get_uint8(tvb, off);
2886 | ti = proto_tree_add_item(subtree, hf_lq_query, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2887 | if ((protocol == proto_dhcpv6) &&
2888 | ((query_type == LQ_QUERY_RELAYID3) ||
2889 | (query_type == LQ_QUERY_LINK_ADDRESS4) ||
2890 | (query_type == LQ_QUERY_REMOTEID5))) {
2891 | expert_add_info(pinfo, ti, &ei_dhcpv6_bulk_leasequery_bad_query_type);
2892 | }
2893 |
2894 | proto_tree_add_item(subtree, hf_lq_query_link_address, tvb, off+1, 16, ENC_NA0x00000000);
2895 | temp_optlen = 17;
2896 | while ((optlen - temp_optlen) > 0) {
2897 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2898 | off + temp_optlen,
2899 | off + optlen, at_end, protocol, hpi, msgtype);
2900 | if (*at_end) {
2901 | /* Bad option - just skip to the end */
2902 | temp_optlen = optlen;
2903 | }
2904 | }
2905 | }
2906 | break;
2907 | case OPTION_RSOO66:
2908 | case OPTION_MIP6_IDINF69:
2909 | case OPTION_MIP6_VDINF50:
2910 | case OPTION_MIP6_UDINF70:
2911 | case OPTION_S46_CONT_MAPE94:
2912 | case OPTION_S46_CONT_MAPT95:
2913 | case OPTION_S46_CONT_LW96:
2914 | case OPTION_CLIENT_DATA45:
2915 | /* Intended fall-through for options which can only carry further options */
2916 | temp_optlen = 0;
2917 | while ((optlen - temp_optlen) > 0) {
2918 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
2919 | off + temp_optlen,
2920 | off + optlen, at_end, protocol, hpi, msgtype);
2921 | if (*at_end) {
2922 | /* Bad option - just skip to the end */
2923 | temp_optlen = optlen;
2924 | }
2925 | }
2926 | break;
2927 | case OPTION_CLT_TIME46:
2928 | if (optlen != 4) {
2929 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "CLT_TIME: malformed option");
2930 | break;
2931 | }
2932 |
2933 | proto_tree_add_item(subtree, hf_clt_time, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
2934 | break;
2935 | case OPTION_LQ_RELAY_DATA47:
2936 | if (optlen < 16) {
2937 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ_RELAY_DATA: malformed option");
2938 | break;
2939 | }
2940 |
2941 | proto_tree_add_item(subtree, hf_lq_relay_data_peer_addr, tvb, off, 16, ENC_NA0x00000000);
2942 | proto_tree_add_item(subtree, hf_lq_relay_data_msg, tvb, off+16, optlen - 16, ENC_ASCII0x00000000);
2943 | break;
2944 | case OPTION_LQ_CLIENT_LINK48:
2945 | if (optlen % 16) {
2946 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ client links address: malformed option");
2947 | break;
2948 | }
2949 | for (i = 0; i < optlen; i += 16)
2950 | proto_tree_add_item(subtree, hf_lq_client_link, tvb, off + i, 16, ENC_NA0x00000000);
2951 | break;
2952 | case OPTION_CAPWAP_AC_V652:
2953 | if (optlen % 16) {
2954 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "CAPWAP Access Controllers address: malformed option");
2955 | break;
2956 | }
2957 | for (i = 0; i < optlen; i += 16)
2958 | proto_tree_add_item(subtree, hf_capwap_ac_v6, tvb, off + i, 16, ENC_NA0x00000000);
2959 | break;
2960 |
2961 | case OPTION_AFTR_NAME64:
2962 | dhcpv6_domain(subtree, option_item, pinfo, hf_aftr_name, tvb, off, optlen);
2963 | break;
2964 | case OPTION_MIP6_HNIDF49:
2965 | if (optlen < 1) {
2966 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HNIDF: malformed option");
2967 | break;
2968 | }
2969 | dhcpv6_domain(subtree, option_item, pinfo, hf_mip6_hnidf_fqdn, tvb, off, optlen);
2970 | break;
2971 | case OPTION_MIP6_HNP71:
2972 | if (optlen < 17) {
2973 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HNP: malformed option");
2974 | break;
2975 | }
2976 |
2977 | proto_tree_add_item(subtree, hf_mip6_hnp_pref_len, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
2978 | proto_tree_add_item(subtree, hf_mip6_hnp_pref_addr, tvb, off+1, 16, ENC_NA0x00000000);
2979 | break;
2980 | case OPTION_MIP6_HAA72:
2981 | if (optlen < 16) {
2982 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HAA: malformed option");
2983 | break;
2984 | }
2985 |
2986 | proto_tree_add_item(subtree, hf_mip6_haa_addr, tvb, off, 16, ENC_NA0x00000000);
2987 | break;
2988 | case OPTION_MIP6_HAF73:
2989 | if (optlen < 1) {
2990 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HAF: malformed option");
2991 | break;
2992 | }
2993 |
2994 | dhcpv6_domain(subtree, option_item, pinfo, hf_mip6_haf_fqdn, tvb, off, optlen);
2995 | break;
2996 | case OPTION_BOOTFILE_URL59:
2997 | if(optlen > 0)
2998 | proto_tree_add_item(subtree, hf_bootfile_url, tvb, off, optlen, ENC_UTF_80x00000002);
2999 | break;
3000 | case OPTION_BOOTFILE_PARAM60:
3001 | temp_optlen = 0;
3002 | while (optlen > temp_optlen) {
3003 | subopt_len = tvb_get_ntohs(tvb, off + temp_optlen);
3004 | if (subopt_len > optlen - temp_optlen) {
3005 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Boot file parameter: suboption too long");
3006 | break;
3007 | }
3008 | proto_tree_add_item(subtree, hf_bootfile_param_len, tvb, off + temp_optlen, 2, ENC_BIG_ENDIAN0x00000000);
3009 | proto_tree_add_item(subtree, hf_bootfile_param_data, tvb, off + temp_optlen + 2, subopt_len, ENC_UTF_80x00000002);
3010 |
3011 | temp_optlen += subopt_len + 2;
3012 | }
3013 | break;
3014 | case OPTION_NII62:
3015 | if (optlen != 3) {
3016 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NII: malformed option");
3017 | break;
3018 | }
3019 |
3020 | proto_tree_add_item(subtree, hf_nii_type, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
3021 | proto_tree_add_item(subtree, hf_nii_major, tvb, off+1, 1, ENC_BIG_ENDIAN0x00000000);
3022 | proto_tree_add_item(subtree, hf_nii_minor, tvb, off+2, 1, ENC_BIG_ENDIAN0x00000000);
3023 | break;
3024 | case OPTION_CLIENT_ARCH_TYPE61:
3025 | if (optlen < 1 || optlen % 2) {
3026 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "CLIENT_ARCH_TYPE: malformed option");
3027 | break;
3028 | }
3029 |
3030 | for (i = 0; i < optlen; i += 2) {
3031 | proto_tree_add_item(subtree, hf_client_arch_type, tvb, off + i, 2, ENC_BIG_ENDIAN0x00000000);
3032 | }
3033 | break;
3034 | case OPTION_IPV6_ADDRESS_MOS54:
3035 | temp_optlen = 0;
3036 | while (optlen > temp_optlen) {
3037 | subopt_len = tvb_get_ntohs(tvb, off + temp_optlen + 2);
3038 | if (subopt_len > optlen - temp_optlen) {
3039 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MoS IPv6 Address: suboption too long");
3040 | break;
3041 | }
3042 | if ( subopt_len % 16) {
3043 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MoS IPv6 Address: malformed suboption");
3044 | break;
3045 | }
3046 | proto_tree_add_item(subtree, hf_mos_address_code, tvb, off + temp_optlen, 2, ENC_BIG_ENDIAN0x00000000);
3047 | proto_tree_add_item(subtree, hf_mos_address_len, tvb, off + temp_optlen + 2, 2, ENC_BIG_ENDIAN0x00000000);
3048 | for (i = 0; i < (subopt_len - 4); i += 16) {
3049 | proto_tree_add_item(subtree, hf_mos_address_ipv6_addr, tvb, off + temp_optlen + 4 + i, 16, ENC_NA0x00000000);
3050 | }
3051 |
3052 | temp_optlen += subopt_len + 4;
3053 | }
3054 | break;
3055 | case OPTION_RADIUS81:
3056 | if (optlen < 1) {
3057 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RADIUS: malformed option");
3058 | break;
3059 | }
3060 | dissect_attribute_value_pairs(subtree, pinfo, tvb, off, optlen, NULL((void*)0));
3061 | break;
3062 | case OPTION_REGISTERED_DOMAIN145:
3063 | if (optlen < 1) {
3064 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Homenet Registered Domain: malformed option");
3065 | break;
3066 | }
3067 | dhcpv6_domain(subtree, option_item, pinfo, hf_homenet_registered_domain, tvb, off, optlen);
3068 | break;
3069 | case OPTION_FORWARD_DIST_MANAGER146:
3070 | if (optlen < 3) {
3071 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Homenet Forward Distribution Manager: malformed option");
3072 | break;
3073 | }
3074 | proto_tree_add_bitmask(subtree, tvb, off, hf_homenet_transport, ett_dhcpv6_homenet_transport_flags, dhcpv6_homenet_transport_flags_fields, ENC_BIG_ENDIAN0x00000000);
3075 | dhcpv6_domain(subtree, option_item, pinfo, hf_homenet_fwd_dist_mgr, tvb, off+2, optlen-2);
3076 | break;
3077 | case OPTION_REVERSE_DIST_MANAGER147:
3078 | if (optlen < 3) {
3079 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Homenet Reverse Distribution Manager: malformed option");
3080 | break;
3081 | }
3082 | proto_tree_add_bitmask(subtree, tvb, off, hf_homenet_transport, ett_dhcpv6_homenet_transport_flags, dhcpv6_homenet_transport_flags_fields, ENC_BIG_ENDIAN0x00000000);
3083 | dhcpv6_domain(subtree, option_item, pinfo, hf_homenet_rev_dist_mgr, tvb, off+2, optlen-2);
3084 | break;
3085 | case OPTION_VSS68:
3086 | if (optlen < 1) {
3087 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Virtual Subnet Selection: malformed option");
3088 | break;
3089 | }
3090 | uint32_t vss_type;
3091 | proto_tree_add_item_ret_uint(subtree, hf_option_vss_type, tvb, off, 1, ENC_BIG_ENDIAN0x00000000, &vss_type);
3092 | switch (vss_type)
3093 | {
3094 | case VSS_TYPE_NVT_ASCII0:
3095 | proto_tree_add_item(subtree, hf_option_vss_info_nvt, tvb, off+1, optlen-1, ENC_ASCII0x00000000);
3096 | break;
3097 | case VSS_TYPE_VPN_ID1:
3098 | if (optlen != 8) {
3099 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Virtual Subnet Selection: malformed VPN-ID");
3100 | break;
3101 | }
3102 | proto_tree_add_item(subtree, hf_option_vss_info_vpn_id, tvb, off+1, 7, ENC_NA0x00000000);
3103 | break;
3104 | case VSS_TYPE_ALL254:
3105 | case VSS_TYPE_GLOBAL255:
3106 | if (optlen != 1) {
3107 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Virtual Subnet Selection: malformed suboption");
3108 | break;
3109 | }
3110 | break;
3111 | }
3112 | break;
3113 | case OPTION_IPV6_FQDN_MOS55:
3114 | temp_optlen = 0;
3115 | while (optlen > temp_optlen) {
3116 | subopt_len = tvb_get_ntohs(tvb, off + temp_optlen + 2);
3117 | if (subopt_len > optlen - temp_optlen) {
3118 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MoS IPv6 FQDN: suboption too long");
3119 | break;
3120 | }
3121 | proto_tree_add_item(subtree, hf_mos_address_code, tvb, off + temp_optlen, 2, ENC_BIG_ENDIAN0x00000000);
3122 | proto_tree_add_item(subtree, hf_mos_address_len, tvb, off + temp_optlen + 2, 2, ENC_BIG_ENDIAN0x00000000);
3123 | dhcpv6_domain(subtree, option_item, pinfo, hf_mos_address_ipv6_fqdn, tvb, off + temp_optlen + 4, subopt_len);
3124 | temp_optlen += subopt_len + 4;
3125 | }
3126 | break;
3127 | case OPTION_IAPREFIX26:
3128 | if (optlen < 25) {
3129 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IAPREFIX: malformed option");
3130 | break;
3131 | }
3132 |
3133 | proto_tree_add_item(subtree, hf_iaprefix_pref_lifetime, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3134 | proto_tree_add_item(subtree, hf_iaprefix_valid_lifetime, tvb, off+4, 4, ENC_BIG_ENDIAN0x00000000);
3135 | proto_tree_add_item(subtree, hf_iaprefix_pref_len, tvb, off+8, 1, ENC_BIG_ENDIAN0x00000000);
3136 | proto_tree_add_item(subtree, hf_iaprefix_pref_addr, tvb, off+9, 16, ENC_NA0x00000000);
3137 | temp_optlen = 25;
3138 | while ((optlen - temp_optlen) > 0) {
3139 | temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
3140 | off+temp_optlen, off + optlen, at_end, protocol, hpi, msgtype);
3141 | if (*at_end) {
3142 | /* Bad option - just skip to the end */
3143 | temp_optlen = optlen;
3144 | }
3145 | }
3146 | break;
3147 | case OPTION_PD_EXCLUDE67:
3148 | if ((optlen < 2) || (optlen > 17)) {
3149 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "PD_EXCLUDE: malformed option");
3150 | break;
3151 | }
3152 | proto_tree_add_item(subtree, hf_pd_exclude_pref_len, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
3153 | proto_tree_add_item(subtree, hf_pd_exclude_subnet_id , tvb, off+1, optlen-1, ENC_NA0x00000000);
3154 | break;
3155 | case OPTION_CAPTIVE_PORTAL103:{
3156 | proto_item *ti_cp;
3157 | ti_cp = proto_tree_add_item(subtree, hf_option_captive_portal, tvb, off, optlen, ENC_ASCII0x00000000);
3158 | proto_item_set_url(ti_cp);
3159 | break;
3160 | }
3161 | case OPTION_S46_PRIORITY111:
3162 | temp_optlen = optlen;
3163 | while (temp_optlen >= 2) {
3164 | proto_tree_add_item(subtree, hf_option_s46_option_code, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
3165 | temp_optlen -= 2;
3166 | off += 2;
3167 | }
3168 | break;
3169 | case OPTION_F_BINDING_STATUS114:
3170 | if (optlen != 1) {
3171 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3172 | break;
3173 | }
3174 | proto_tree_add_item(subtree, hf_option_failover_binding_status, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
3175 | break;
3176 | case OPTION_F_CONNECT_FLAGS115:
3177 | if (optlen != 2) {
3178 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3179 | break;
3180 | }
3181 | proto_tree_add_bitmask(subtree, tvb, off, hf_option_failover_connect_flags, ett_dhcpv6_failover_connect_flags, dhcpv6_failover_connect_flags_fields, ENC_BIG_ENDIAN0x00000000);
3182 | break;
3183 | case OPTION_F_DNS_HOST_NAME117:
3184 | {
3185 | const char *dns_name;
3186 | int dns_name_len;
3187 |
3188 | get_dns_name(pinfo->pool, tvb, off, optlen, off, &dns_name, &dns_name_len);
3189 | proto_tree_add_string(subtree, hf_option_failover_dns_hostname, tvb, off, optlen, format_text(pinfo->pool, dns_name, dns_name_len));
3190 | break;
3191 | }
3192 | case OPTION_F_DNS_ZONE_NAME118:
3193 | {
3194 | const char *dns_name;
3195 | int dns_name_len;
3196 |
3197 | get_dns_name(pinfo->pool, tvb, off, optlen, off, &dns_name, &dns_name_len);
3198 | proto_tree_add_string(subtree, hf_option_failover_dns_zonename, tvb, off, optlen, format_text(pinfo->pool, dns_name, dns_name_len));
3199 | break;
3200 | }
3201 | case OPTION_F_DNS_FLAGS119:
3202 | if (optlen != 2) {
3203 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3204 | break;
3205 | }
3206 | proto_tree_add_bitmask(subtree, tvb, off, hf_option_failover_dns_flags, ett_dhcpv6_failover_dns_flags, dhcpv6_failover_dns_flags_fields, ENC_BIG_ENDIAN0x00000000);
3207 | break;
3208 | case OPTION_F_EXPIRATION_TIME120:
3209 | if (optlen != 4) {
3210 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3211 | break;
3212 | }
3213 | proto_tree_add_item(subtree, hf_option_failover_expiration_time, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3214 | break;
3215 | case OPTION_F_MAX_UNACKED_BNDUPD121:
3216 | if (optlen != 4) {
3217 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3218 | break;
3219 | }
3220 | proto_tree_add_item(subtree, hf_option_failover_max_unacked_bndupd, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3221 | break;
3222 | case OPTION_F_MCLT122:
3223 | if (optlen != 4) {
3224 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3225 | break;
3226 | }
3227 | proto_tree_add_item(subtree, hf_option_failover_mclt, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3228 | break;
3229 | case OPTION_F_PARTNER_LIFETIME123:
3230 | if (optlen != 4) {
3231 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3232 | break;
3233 | }
3234 | proto_tree_add_item(subtree, hf_option_failover_partner_lifetime, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3235 | break;
3236 | case OPTION_F_PARTNER_LIFETIME_SENT124:
3237 | if (optlen != 4) {
3238 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3239 | break;
3240 | }
3241 | proto_tree_add_item(subtree, hf_option_failover_partner_lifetime_sent, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3242 | break;
3243 | case OPTION_F_PARTNER_DOWN_TIME125:
3244 | if (optlen != 4) {
3245 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3246 | break;
3247 | }
3248 | proto_tree_add_item(subtree, hf_option_failover_partner_downtime, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3249 | break;
3250 | case OPTION_F_PARTNER_RAW_CLT_TIME126:
3251 | if (optlen != 4) {
3252 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3253 | break;
3254 | }
3255 | proto_tree_add_item(subtree, hf_option_failover_partner_raw_clt_time, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3256 | break;
3257 | case OPTION_F_PROTOCOL_VERSION127:
3258 | if (optlen != 4) {
3259 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3260 | break;
3261 | }
3262 | proto_tree_add_item(subtree, hf_option_failover_major_version, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
3263 | proto_tree_add_item(subtree, hf_option_failover_minor_version, tvb, off+2, 2, ENC_BIG_ENDIAN0x00000000);
3264 | break;
3265 | case OPTION_F_KEEPALIVE_TIME128:
3266 | if (optlen != 4) {
3267 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3268 | break;
3269 | }
3270 | proto_tree_add_item(subtree, hf_option_failover_keepalive_time, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3271 | break;
3272 | case OPTION_F_RECONFIGURE_DATA129:
3273 | if (optlen < 4) {
3274 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3275 | break;
3276 | }
3277 | proto_tree_add_item(subtree, hf_option_failover_reconfigure_time, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3278 | proto_tree_add_item(subtree, hf_option_failover_reconfigure_key, tvb, off+4, optlen-4, ENC_NA0x00000000);
3279 | break;
3280 | case OPTION_F_RELATIONSHIP_NAME130:
3281 | proto_tree_add_item(subtree, hf_option_failover_relationship_name, tvb, off, optlen, ENC_UTF_80x00000002);
3282 | break;
3283 | case OPTION_F_SERVER_FLAGS131:
3284 | if (optlen != 1) {
3285 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3286 | break;
3287 | }
3288 | proto_tree_add_bitmask(subtree, tvb, off, hf_option_failover_server_flags, ett_dhcpv6_failover_server_flags, dhcpv6_failover_server_flags_fields, ENC_BIG_ENDIAN0x00000000);
3289 | break;
3290 | case OPTION_F_SERVER_STATE132:
3291 | if (optlen != 1) {
3292 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3293 | break;
3294 | }
3295 | proto_tree_add_item(subtree, hf_option_failover_server_state, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
3296 | break;
3297 | case OPTION_F_START_TIME_OF_STATE133:
3298 | if (optlen != 4) {
3299 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3300 | break;
3301 | }
3302 | proto_tree_add_item(subtree, hf_option_failover_start_time_of_state, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3303 | break;
3304 | case OPTION_F_STATE_EXPIRATION_TIME134:
3305 | if (optlen != 4) {
3306 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Failover: malformed option");
3307 | break;
3308 | }
3309 | proto_tree_add_item(subtree, hf_option_failover_state_expiration_time, tvb, off, 4, ENC_BIG_ENDIAN0x00000000);
3310 | break;
3311 | case OPTION_RELAY_PORT135:
3312 | if (optlen != 2) {
3313 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Relay Port: malformed option");
3314 | break;
3315 | }
3316 | proto_tree_add_item(subtree, hf_option_relay_port, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
3317 | break;
3318 | case OPTION_CLIENT_LINKLAYER_ADDR79:
3319 | if (optlen < 2) {
3320 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "Client link-layer address: malformed option");
3321 | break;
3322 | }
3323 | proto_tree_add_item_ret_uint(subtree, hf_client_link_layer_addr_hwtype, tvb, off, 2, ENC_BIG_ENDIAN0x00000000, &temp_uint32);
3324 | hwtype = temp_uint32 & 0xffff;
3325 | if (optlen > 2) {
3326 | proto_tree_add_string(subtree, hf_client_link_layer_addr, tvb, off+2, optlen-2,
3327 | tvb_arphrdaddr_to_str(pinfo->pool, tvb, off+2, optlen-2, hwtype));
3328 | if (DHCPV6_HW_IS_ETHER(hwtype, optlen-2)((hwtype == 1 || hwtype == 6) && optlen-2 == 6)) {
3329 | proto_tree_add_item(subtree, hf_client_link_layer_addr_ether, tvb, off+2, optlen-2, ENC_NA0x00000000);
3330 | }
3331 | }
3332 | break;
3333 | case OPTION_V6_DNR144: {
3334 | // This option is pretty complex, with variable-length fields, FQDN, list of addresses, and service parameters
3335 | // that have their own encoding, borrowed from DNS on-wire. Ugh. For option syntax, see RFC9463, Section 4.1.
3336 | // The svcparams field is encoded according to RFC9460, Section 2.2. There is a registry of supported
3337 | // service parameters, maintained by IANA (see https://www.iana.org/assignments/dns-svcb/dns-svcb.xhtml).
3338 | // Initial (currently defined, as of Aug 2024) list of parmaters (that are usable in DHCPv6 DNR option) are:
3339 | // alpn, port, dohpath.
3340 | //
3341 | // This is a very active discussion area in the IETF, so more parameters are expected in the future.
3342 |
3343 | int adn_len = 0;
3344 | int addrs_len = 0;
3345 | // off is an offset from the beginning of a DHCPv6 packet. It is NOT zero when we start.
3346 | int offset = 0; // offset within the DNR option. This starts at zero.
3347 | tvbuff_t *next_tvb;
3348 |
3349 | if (optlen < 6) {
3350 | // At the very least svcpriority, an empty auth-domain-name, and empty address list is
3351 | // necessary. The option would be still broken, but at least we could parse something.
3352 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option,
3353 | "DNR v6 error: truncated option (shorter than 6 octets)");
3354 | break;
3355 | }
3356 |
3357 | // Parsing service priority
3358 | proto_tree_add_item(subtree, hf_dnr_svcpriority, tvb, off, 2, ENC_BIG_ENDIAN0x00000000);
3359 | offset += 2;
3360 |
3361 | // Parsing authentication-domain-name (len + FQDN field)
3362 | proto_tree_add_item(subtree, hf_dnr_auth_domain_name_len, tvb, off+offset, 2, ENC_BIG_ENDIAN0x00000000);
3363 | adn_len = tvb_get_ntohs(tvb, off+offset);
3364 | offset += 2;
3365 | if (optlen < offset + adn_len) {
3366 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option,
3367 | "DNR v6 error: truncated option (too long authentication-domain-name)");
3368 | break;
3369 | }
3370 | dhcpv6_domain(subtree, ti, pinfo, hf_dnr_auth_domain_name, tvb, off+offset, adn_len);
3371 | offset += adn_len;
3372 |
3373 | if (optlen == offset) {
3374 | // A DNR option with only a service priority and authentication-domain-name (ADN) is in ADN-only mode,
3375 | // see RFC9463, Section 3.1.6.
3376 | proto_tree_add_expert(subtree, pinfo, &ei_dhcpv6_dnr_adn_only_mode, tvb, off, optlen);
3377 | break;
3378 | }
3379 |
3380 | // Parse Addresses list (length + actual list)
3381 | if (optlen < offset + 2) {
3382 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option,
3383 | "DNR v6 error: truncated option (Addr Length truncated)");
3384 | break;
3385 | }
3386 | addrs_len = tvb_get_ntohs(tvb, off+offset);
3387 | proto_tree_add_item(subtree, hf_dnr_addrs_len, tvb, off+offset, 2, ENC_BIG_ENDIAN0x00000000);
3388 | offset += 2;
3389 |
3390 | if (addrs_len % 16) {
3391 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option,
3392 | "v6 Discovery of Network Resolvers: invalid addrs_len %d (not divisible by 16)", addrs_len);
3393 | break;
3394 | }
3395 | if (optlen < offset + addrs_len) {
3396 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option,
3397 | "DNR v6 error: truncated option (too long addrs_len or not enough octets with addresses)");
3398 | break;
3399 | }
3400 |
3401 | for (i = 0; i < addrs_len; i += 16) {
3402 | ti = proto_tree_add_item(subtree, hf_dnr_addrs, tvb, off + offset + i, 16, ENC_NA0x00000000);
3403 | proto_item_prepend_text(ti, " %d ", i/16 + 1);
3404 | }
3405 | offset += addrs_len;
3406 |
3407 | if (optlen <= offset) {
3408 | expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option,
3409 | "DNR v6 error: truncated option (missing service parameters)");
3410 | }
3411 |
3412 | // Parse the service parameters
3413 | next_tvb = tvb_new_subset_length(tvb, off + offset, optlen - offset);
3414 | offset += call_dissector(svc_params_handle, next_tvb, pinfo, subtree);
| Value stored to 'offset' is never read
3415 |
3416 | break;
3417 | }
3418 | default:
3419 | /* When we got here, we hit either an option which does not need dissection (e.g. Rapid Commit)
3420 | or an unsupported option. If data is available, let's at least display the bytes */
3421 | if(optlen > 0)
3422 | proto_tree_add_item(subtree, hf_option_data, tvb, off, optlen, ENC_NA0x00000000);
3423 | break;
3424 | }
3425 |
3426 | decrement_dissection_depth(pinfo);
3427 |
3428 | return 4 + optlen;
3429 | }
3430 |
3431 |
3432 | /* May be called recursively via dhcpv6_option */
3433 | static void
3434 | // NOLINTNEXTLINE(misc-no-recursion)
3435 | dissect_dhcpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
3436 | int off, int eoff, hopcount_info hpi)
3437 | {
3438 | proto_tree *bp_tree = NULL((void*)0);
3439 | proto_item *ti;
3440 | bool_Bool at_end;
3441 | uint8_t msgtype;
3442 | msgtype = tvb_get_uint8(tvb, off);
3443 |
3444 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_ext(pinfo->pool, msgtype, &msgtype_vals_ext, "Message Type %u"));
3445 |
3446 | if (tree) {
3447 | ti = proto_tree_add_item(tree, proto_dhcpv6, tvb, off, eoff - off, ENC_NA0x00000000);
3448 | bp_tree = proto_item_add_subtree(ti, ett_dhcpv6);
3449 | }
3450 |
3451 |
3452 | if ((msgtype == RELAY_FORW12) || (msgtype == RELAY_REPLY13)) {
3453 | const uint8_t previous_hopcount = hpi.hopcount;
3454 | proto_item *previous_pi = hpi.pi;
3455 | if (tree) {
3456 | proto_tree_add_item(bp_tree, hf_dhcpv6_msgtype, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
3457 | hpi.pi = proto_tree_add_item(bp_tree, hf_dhcpv6_hopcount, tvb, off + 1, 1, ENC_BIG_ENDIAN0x00000000);
3458 | proto_tree_add_item(bp_tree, hf_dhcpv6_linkaddr, tvb, off + 2, 16, ENC_NA0x00000000);
3459 | proto_tree_add_item(bp_tree, hf_dhcpv6_peeraddr, tvb, off + 18, 16, ENC_NA0x00000000);
3460 |
3461 | }
3462 | /* Check the hopcount not exceed the HOP_COUNT_LIMIT */
3463 | hpi.hopcount = tvb_get_uint8(tvb, off + 1);
3464 | if (hpi.hopcount > HOP_COUNT_LIMIT32) {
3465 | expert_add_info_format(pinfo, hpi.pi, &ei_dhcpv6_error_hopcount, "Hopcount (%d) exceeds the maximum limit HOP_COUNT_LIMIT (%d)", hpi.hopcount, HOP_COUNT_LIMIT32);
3466 | }
3467 | /* Check hopcount is correctly incremented by 1 */
3468 | if (hpi.relay_message_previously_detected && hpi.hopcount != previous_hopcount - 1) {
3469 | expert_add_info_format(pinfo, previous_pi, &ei_dhcpv6_error_hopcount, "hopcount is not correctly incremented by 1 (expected : %d, actual : %d)", hpi.hopcount + 1, previous_hopcount);
3470 | }
3471 | hpi.relay_message_previously_detected = true1;
3472 | col_append_fstr(pinfo->cinfo, COL_INFO, "L: %s ", tvb_ip6_to_str(pinfo->pool, tvb, off + 2)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, off + 2));
3473 | off += 34;
3474 | } else {
3475 | /* Check the inner hopcount equals 0 */
3476 | if (hpi.hopcount) {
3477 | expert_add_info_format(pinfo, hpi.pi, &ei_dhcpv6_error_hopcount, "Hopcount of most inner message has to equal 0 instead of %d", hpi.hopcount);
3478 | }
3479 | if (tree) {
3480 | proto_tree_add_item(bp_tree, hf_dhcpv6_msgtype, tvb, off, 1, ENC_BIG_ENDIAN0x00000000);
3481 | proto_tree_add_item(bp_tree, hf_dhcpv6_xid, tvb, off + 1, 3, ENC_BIG_ENDIAN0x00000000);
3482 | }
3483 | col_append_fstr(pinfo->cinfo, COL_INFO, "XID: 0x%06x ", tvb_get_ntoh24(tvb, off + 1));
3484 | off += 4;
3485 | }
3486 |
3487 | at_end = false0;
3488 | while ((off < eoff) && !at_end)
3489 | off += dhcpv6_option(tvb, pinfo, bp_tree, off, eoff, &at_end, proto_dhcpv6, hpi, msgtype);
3490 | }
3491 |
3492 | static int
3493 | dissect_dhcpv6_stream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U___attribute__((unused)))
3494 | {
3495 | hopcount_info hpi;
3496 | initialize_hopount_info(&hpi);
3497 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv6");
3498 | col_clear(pinfo->cinfo, COL_INFO);
3499 | dissect_dhcpv6(tvb, pinfo, tree, 0, tvb_reported_length(tvb), hpi);
3500 | return tvb_captured_length(tvb);
3501 | }
3502 |
3503 | static unsigned
3504 | get_dhcpv6_bulk_leasequery_pdu_len(packet_info *pinfo _U___attribute__((unused)), tvbuff_t *tvb,
3505 | int offset, void *data _U___attribute__((unused)))
3506 | {
3507 | return (tvb_get_ntohs(tvb, offset)+2);
3508 | }
3509 |
3510 | static int
3511 | dissect_dhcpv6_bulk_leasequery_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
3512 | {
3513 | proto_item *ti;
3514 | proto_tree *bulk_tree, *option_tree;
3515 | int offset = 0, end;
3516 | uint16_t size, trans_id;
3517 | uint8_t msg_type;
3518 | bool_Bool at_end = false0;
3519 | hopcount_info hpi;
3520 | initialize_hopount_info(&hpi);
3521 |
3522 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv6 BulkLease");
3523 | col_clear(pinfo->cinfo, COL_INFO);
3524 |
3525 | ti = proto_tree_add_item(tree, proto_dhcpv6_bulk_leasequery, tvb, 0, -1, ENC_NA0x00000000 );
3526 | bulk_tree = proto_item_add_subtree(ti, ett_dhcpv6_bulk_leasequery);
3527 |
3528 | size = tvb_get_ntohs(tvb, offset);
3529 | proto_tree_add_item(bulk_tree, hf_dhcpv6_bulk_leasequery_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3530 | offset += 2;
3531 |
3532 | msg_type = tvb_get_uint8( tvb, offset );
3533 | ti = proto_tree_add_item(bulk_tree, hf_dhcpv6_bulk_leasequery_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3534 | if ((msg_type != LEASEQUERY14) &&
3535 | (msg_type != LEASEQUERY_REPLY15) &&
3536 | (msg_type != LEASEQUERY_DONE16) &&
3537 | (msg_type != LEASEQUERY_DATA17))
3538 | expert_add_info_format(pinfo, ti, &ei_dhcpv6_bulk_leasequery_bad_msg_type,
3539 | "Message Type %d not allowed by DHCPv6 Bulk Leasequery", msg_type);
3540 |
3541 | offset += 1;
3542 | proto_tree_add_item(bulk_tree, hf_dhcpv6_bulk_leasequery_reserved, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
3543 | offset += 1;
3544 |
3545 | trans_id = tvb_get_ntohs(tvb, offset);
3546 | proto_tree_add_item(bulk_tree, hf_dhcpv6_bulk_leasequery_trans_id, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
3547 | offset += 2;
3548 |
3549 | col_add_fstr(pinfo->cinfo, COL_INFO, "%s, Transaction ID: %5u",
3550 | val_to_str_ext_const(msg_type, &msgtype_vals_ext, "Unknown"), trans_id);
3551 |
3552 | option_tree = proto_tree_add_subtree(bulk_tree, tvb, offset, -1, ett_dhcpv6_bulk_leasequery_options, NULL((void*)0), "DHCPv6 Options");
3553 | end = size + 2;
3554 | while ((offset < end) && !at_end)
3555 | offset += dhcpv6_option(tvb, pinfo, option_tree, offset,
3556 | end, &at_end, proto_dhcpv6_bulk_leasequery, hpi, msg_type);
3557 |
3558 | return tvb_reported_length(tvb);
3559 | }
3560 |
3561 | static int
3562 | dissect_dhcpv6_bulk_leasequery(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3563 | {
3564 | tcp_dissect_pdus(tvb, pinfo, tree, dhcpv6_bulk_leasequery_desegment, 2,
3565 | get_dhcpv6_bulk_leasequery_pdu_len, dissect_dhcpv6_bulk_leasequery_pdu, data);
3566 | return tvb_reported_length(tvb);
3567 | }
3568 |
3569 | static int dissect_dhcpv6_s46_ipv6_prefix(tvbuff_t *tvb, int hf, int offset, int prefix_length, proto_tree *tree)
3570 | {
3571 |
3572 | int bytes_to_process;
3573 | ws_in6_addr prefix;
3574 |
3575 | bytes_to_process = (((prefix_length + 7) & 0xf8) >> 3);
3576 |
3577 | memset(prefix.bytes, 0, sizeof prefix.bytes);
3578 | if (bytes_to_process != 0) {
3579 | tvb_memcpy(tvb, prefix.bytes, offset, bytes_to_process);
3580 | }
3581 | proto_tree_add_ipv6(tree, hf, tvb, offset, bytes_to_process, &prefix);
3582 |
3583 | return bytes_to_process;
3584 | }
3585 |
3586 | void
3587 | proto_register_dhcpv6(void)
3588 | {
3589 | module_t *bulkquery_module;
3590 | module_t *dhcpv6_module;
3591 |
3592 | static hf_register_info hf[] = {
3593 |
3594 | /* DHCPv6 header */
3595 | { &hf_dhcpv6_msgtype,
3596 | { "Message type", "dhcpv6.msgtype", FT_UINT8, BASE_DEC | BASE_EXT_STRING0x00000200, &msgtype_vals_ext, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3597 | { &hf_dhcpv6_hopcount,
3598 | { "Hopcount", "dhcpv6.hopcount", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3599 | { &hf_dhcpv6_xid,
3600 | { "Transaction ID", "dhcpv6.xid", FT_UINT24, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3601 | { &hf_dhcpv6_linkaddr,
3602 | { "Link address", "dhcpv6.linkaddr", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3603 | { &hf_dhcpv6_peeraddr,
3604 | { "Peer address", "dhcpv6.peeraddr", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3605 | /* Generic option stuff */
3606 | { &hf_option_type_num,
3607 | { "Option", "dhcpv6.option.type", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &opttype_vals_ext, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3608 | { &hf_option_length,
3609 | { "Length", "dhcpv6.option.length", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3610 | { &hf_option_type_str,
3611 | { "Option", "dhcpv6.option.type_str", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3612 | { &hf_option_data,
3613 | { "Data", "dhcpv6.option.data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3614 |
3615 |
3616 | /* OPTION_CLIENT_FQDN */
3617 | { &hf_clientfqdn_bad_msgtype,
3618 | { "Illegal Message Type", "dhcpv6.clientfqdn.bad_msgtype", FT_UINT8, BASE_HEX | BASE_EXT_STRING0x00000200, &msgtype_vals_ext, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3619 | { &hf_clientfqdn_flags,
3620 | { "Flags", "dhcpv6.client_fqdn_flags", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3621 | /* Client's preferences */
3622 | { &hf_clientfqdn_client_s,
3623 | { "S bit", "dhcpv6.clientfqdn.client.s", FT_BOOLEAN, 8, TFS(&fqdn_s)((0 ? (const struct true_false_string*)0 : ((&fqdn_s)))), 0x1,
3624 | "Whether or not the client prefers to perform AAAA RR (FQDN-to-address) updates", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3625 | { &hf_clientfqdn_client_n,
3626 | { "N bit", "dhcpv6.clientfqdn.client.n", FT_BOOLEAN, 8, TFS(&fqdn_n)((0 ? (const struct true_false_string*)0 : ((&fqdn_n)))), 0x4,
3627 | "Whether or not the client prefers to perform PTR RR (address-to-FQDN) updates", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3628 | /* Server's decision to reject or accept the client's preferences */
3629 | { &hf_clientfqdn_server_s,
3630 | { "S bit", "dhcpv6.clientfqdn.server.s", FT_BOOLEAN, 8, TFS(&fqdn_s)((0 ? (const struct true_false_string*)0 : ((&fqdn_s)))), 0x1,
3631 | "Whether or not the server SHALL perform AAAA RR (FQDN-to-address) updates", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3632 | { &hf_clientfqdn_server_o,
3633 | { "O bit", "dhcpv6.clientfqdn.server.o", FT_BOOLEAN, 8, TFS(&fqdn_o)((0 ? (const struct true_false_string*)0 : ((&fqdn_o)))), 0x2,
3634 | "Whether or not the server has overridden the client's S-bit preference", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3635 | { &hf_clientfqdn_server_n,
3636 | { "N bit", "dhcpv6.clientfqdn.server.n", FT_BOOLEAN, 8, TFS(&fqdn_n)((0 ? (const struct true_false_string*)0 : ((&fqdn_n)))), 0x4,
3637 | "Whether or not the server SHALL perform PTR RR (address-to-FQDN) updates", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3638 |
3639 | /* Headers used in dhcpv6_domain(). */
3640 | { &hf_empty_domain_name,
3641 | { "Empty domain name - field length", "dhcpv6.domain_field_len", FT_UINT16, BASE_DEC, NULL((void*)0), 0,
3642 | "Indicates that the client requests the server to provide an FQDN name", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3643 | { &hf_dhcpv6_non_dns_encoded_name,
3644 | { "Non-DNS encoded name. Label length exceeds 63", "dhcpv6.bogus_label_length",
3645 | FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3646 | { &hf_dhcpv6_domain_field_len_exceeded,
3647 | { "Remaining length in the domain name field exceeded", "dhcpv6.domain_field_len_exceeded", FT_UINT8, BASE_DEC,
3648 | NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3649 | { &hf_dhcpv6_decoded_portion,
3650 | { "Portion successfully decoded", "dhcpv6.decoded_portion", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3651 | { &hf_dhcpv6_encoded_fqdn_len_gt_255,
3652 | { "DNS-encoded labels of FQDN exceed 255 octets", "dhcpv6.encoded_fqdn_gt_255", FT_UINT16, BASE_DEC, NULL((void*)0), 0,
3653 | "Encoded length is greater than 255 [RFC 1035 3.1.]", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3654 | { &hf_dhcpv6_root_only_domain_name,
3655 | { "Root only domain name", "dhcpv6.root_only_domain_name", FT_STRING, BASE_NONE, NULL((void*)0), 0,
3656 | "The root domain cannot be resolved", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3657 | { &hf_dhcpv6_tld,
3658 | { "Top Level Domain name", "dhcpv6.tld", FT_STRING, BASE_NONE, NULL((void*)0), 0,
3659 | "Likely to fail because most TLDs do not have an IP address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3660 | { &hf_dhcpv6_partial_name_preceded_by_fqdn,
3661 | { "Partial name preceded by FQDN", "dhcpv6.partial_name_preceded_by_fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0,
3662 | "Partial domain names must be the only name in the domain field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3663 |
3664 | { &hf_remoteid_enterprise,
3665 | { "Enterprise ID", "dhcpv6.remoteid.enterprise", FT_UINT32, BASE_ENTERPRISESBASE_CUSTOM, STRINGS_ENTERPRISES((const void *) (size_t) (enterprises_base_custom)), 0, "RemoteID Enterprise Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3666 | { &hf_duid_bytes,
3667 | { "DUID", "dhcpv6.duid.bytes", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3668 | { &hf_duid_type,
3669 | { "DUID Type", "dhcpv6.duid.type", FT_UINT16, BASE_DEC, VALS(duidtype_vals)((0 ? (const struct _value_string*)0 : ((duidtype_vals)))), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3670 | { &hf_duidllt_time,
3671 | { "DUID Time", "dhcpv6.duidllt.time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3672 | { &hf_duidllt_link_layer_addr,
3673 | { "Link-layer address", "dhcpv6.duidllt.link_layer_addr", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3674 | { &hf_duidllt_link_layer_addr_ether,
3675 | { "Link-layer address (Ethernet)", "dhcpv6.duidllt.link_layer_addr_ether", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3676 | { &hf_duidllt_hwtype,
3677 | { "Hardware type", "dhcpv6.duidllt.hwtype", FT_UINT16, BASE_DEC, VALS(arp_hrd_vals)((0 ? (const struct _value_string*)0 : ((arp_hrd_vals)))), 0, "DUID LLT Hardware Type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3678 | { &hf_duidll_hwtype,
3679 | { "Hardware type", "dhcpv6.duidll.hwtype", FT_UINT16, BASE_DEC, VALS(arp_hrd_vals)((0 ? (const struct _value_string*)0 : ((arp_hrd_vals)))), 0, "DUID LL Hardware Type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3680 | { &hf_duiden_enterprise,
3681 | { "Enterprise ID", "dhcpv6.duiden.enterprise", FT_UINT32, BASE_ENTERPRISESBASE_CUSTOM, STRINGS_ENTERPRISES((const void *) (size_t) (enterprises_base_custom)), 0, "DUID EN Enterprise Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3682 | { &hf_duiden_identifier,
3683 | { "Identifier", "dhcpv6.duiden.identifier", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3684 | { &hf_duidll_link_layer_addr,
3685 | { "Link-layer address", "dhcpv6.duidll.link_layer_addr", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3686 | { &hf_duidll_link_layer_addr_ether,
3687 | { "Link-layer address (Ethernet)", "dhcpv6.duidll.link_layer_addr_ether", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3688 | { &hf_duiduuid_bytes,
3689 | { "UUID", "dhcpv6.duiduuid.bytes", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3690 | { &hf_iaid,
3691 | { "IAID", "dhcpv6.iaid", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3692 | { &hf_iaid_t1,
3693 | { "T1", "dhcpv6.iaid.t1", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3694 | { &hf_iaid_t2,
3695 | { "T2", "dhcpv6.iaid.t2", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3696 | { &hf_iata,
3697 | { "IATA", "dhcpv6.iata", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3698 | { &hf_iaaddr_ip,
3699 | { "IPv6 address", "dhcpv6.iaaddr.ip", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3700 | { &hf_iaaddr_pref_lifetime,
3701 | { "Preferred lifetime", "dhcpv6.iaaddr.pref_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3702 | { &hf_iaaddr_valid_lifetime,
3703 | { "Valid lifetime", "dhcpv6.iaaddr.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3704 | { &hf_lladdr_linklayer_type,
3705 | { "Link-layer type", "dhcpv6.lladdr.linklayer.type", FT_UINT16, BASE_DEC, VALS(arp_hrd_vals)((0 ? (const struct _value_string*)0 : ((arp_hrd_vals)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3706 | { &hf_lladdr_linklayer_len,
3707 | { "Link-layer length", "dhcpv6.lladdr.linklayer.len", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3708 | { &hf_lladdr_linklayer_addr,
3709 | { "Link-layer address", "dhcpv6.lladdr.linklayer.addr", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3710 | { &hf_lladdr_linklayer_addr_ether,
3711 | { "Link-layer address (Ethernet)", "dhcpv6.lladdr.linklayer.addr_ether", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3712 | { &hf_lladdr_extra_addr,
3713 | { "Extra addresses", "dhcpv6.lladdr.extra_addr", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3714 | { &hf_lladdr_valid_lifetime,
3715 | { "Valid lifetime", "dhcpv6.lladdr.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3716 | { &hf_requested_option_code,
3717 | { "Requested Option code", "dhcpv6.requested_option_code", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &opttype_vals_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3718 | { &hf_option_preference,
3719 | { "Pref-value", "dhcpv6.option_preference", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3720 | { &hf_elapsed_time,
3721 | { "Elapsed time", "dhcpv6.elapsed_time", FT_UINT16, BASE_DEC|BASE_UNIT_STRING0x00001000, UNS(&units_milliseconds)((0 ? (const struct unit_name_string*)0 : ((&units_milliseconds )))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3722 | { &hf_auth_protocol,
3723 | { "Protocol", "dhcpv6.auth.protocol", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3724 | { &hf_auth_algorithm,
3725 | { "Algorithm", "dhcpv6.auth.algorithm", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3726 | { &hf_auth_rdm,
3727 | { "RDM", "dhcpv6.auth.rdm", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3728 | { &hf_auth_replay_detection,
3729 | { "Replay Detection", "dhcpv6.auth.replay_detection", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3730 | { &hf_auth_info,
3731 | { "Authentication Information", "dhcpv6.auth.info", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3732 | { &hf_auth_realm,
3733 | { "DHCP realm", "dhcpv6.auth.realm", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3734 | { &hf_auth_key_id,
3735 | {"Key ID", "dhcpv6.auth.key_id", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3736 | { &hf_auth_md5_data,
3737 | {"HMAC-MD5 data", "dhcpv6.auth.md5_data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3738 | { &hf_opt_unicast,
3739 | { "IPv6 address", "dhcpv6.unicast", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3740 | { &hf_opt_status_code,
3741 | { "Status Code", "dhcpv6.status_code", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &statuscode_vals_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3742 | { &hf_opt_status_msg,
3743 | { "Status Message", "dhcpv6.status_msg", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3744 | { &hf_vendorclass_enterprise,
3745 | { "Enterprise ID", "dhcpv6.vendorclass.enterprise", FT_UINT32, BASE_ENTERPRISESBASE_CUSTOM, STRINGS_ENTERPRISES((const void *) (size_t) (enterprises_base_custom)), 0, "Vendor Class Enterprise Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3746 | { &hf_vendorclass_data,
3747 | { "vendor-class-data", "dhcpv6.vendorclass.data", FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3748 | { &hf_vendoropts_enterprise,
3749 | { "Enterprise ID", "dhcpv6.vendoropts.enterprise", FT_UINT32, BASE_ENTERPRISESBASE_CUSTOM, STRINGS_ENTERPRISES((const void *) (size_t) (enterprises_base_custom)), 0, "Vendor opts Enterprise Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3750 | { &hf_vendoropts_enterprise_option_code,
3751 | { "Option code", "dhcpv6.vendoropts.enterprise.option_code", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3752 | { &hf_vendoropts_enterprise_option_length,
3753 | { "Option length", "dhcpv6.vendoropts.enterprise.option_length", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3754 | { &hf_vendoropts_enterprise_option_data,
3755 | { "Option data", "dhcpv6.vendoropts.enterprise.option_data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3756 | { &hf_interface_id,
3757 | { "Interface-ID", "dhcpv6.interface_id", FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3758 | { &hf_reconf_msg,
3759 | { "Reconfigure message type", "dhcpv6.reconf_msg", FT_UINT8, BASE_DEC | BASE_EXT_STRING0x00000200, &msgtype_vals_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3760 | { &hf_sip_server_domain_search_fqdn,
3761 | { "SIP Server Domain Search FQDN", "dhcpv6.sip_server_domain_search_fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3762 | { &hf_sip_server_a,
3763 | { "SIP server address", "dhcpv6.sip_server_a", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3764 | { &hf_dns_servers,
3765 | { "DNS server address", "dhcpv6.dns_server", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3766 | { &hf_dhcp4o6_servers,
3767 | { "DHCP4o6 server address", "dhcpv6.dhcp4o6_server", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3768 | { &hf_domain_search_list_entry,
3769 | { "List entry", "dhcpv6.search_list_entry", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3770 | { &hf_nis_servers,
3771 | { "NIS server address", "dhcpv6.nis_server", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3772 | { &hf_nisp_servers,
3773 | { "NISP server address", "dhcpv6.nisp_server", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3774 | { &hf_nis_fqdn,
3775 | { "NIS FQDN", "dhcpv6.nis_fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3776 | { &hf_nisp_fqdn,
3777 | { "NISP FQDN", "dhcpv6.nisp_fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3778 | { &hf_sntp_servers,
3779 | { "SNTP server address", "dhcpv6.sntp_server", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3780 | { &hf_opt_lifetime,
3781 | { "Lifetime", "dhcpv6.lifetime", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3782 | { &hf_bcmcs_servers_fqdn,
3783 | { "BCMCS server FQDN", "dhcpv6.bcmcs_server_fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3784 | { &hf_bcmcs_servers_a,
3785 | { "BCMCS server address", "dhcpv6.bcmcs_server_a", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3786 | { &hf_remoteid_enterprise_id,
3787 | { "Remote-ID", "dhcpv6.remoteid_enterprise_id", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3788 | { &hf_subscriber_id,
3789 | { "Subscriber-ID", "dhcpv6.subscriber_id", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3790 | { &hf_client_fqdn,
3791 | { "Client Domain Name", "dhcpv6.client_domain", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } },
3792 | { &hf_pana_agent,
3793 | { "PANA agents address", "dhcpv6.pana_agent", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3794 | { &hf_opt_timezone,
3795 | { "Time-zone", "dhcpv6.timezone", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3796 | { &hf_opt_tzdb,
3797 | { "TZ-database", "dhcpv6.tzdb", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3798 | { &hf_lq_query,
3799 | { "Query-type", "dhcpv6.lq_query", FT_UINT8, BASE_DEC, VALS(lq_query_vals)((0 ? (const struct _value_string*)0 : ((lq_query_vals)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3800 | { &hf_lq_query_link_address,
3801 | { "Link address", "dhcpv6.lq_query_link_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3802 | { &hf_clt_time,
3803 | { "Clt_time", "dhcpv6.clt_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3804 | { &hf_lq_relay_data_peer_addr,
3805 | { "Peer address", "dhcpv6.lq_relay_data_peer_addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3806 | { &hf_lq_relay_data_msg,
3807 | { "DHCPv6 relay message", "dhcpv6.lq_relay_data_msg", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3808 | { &hf_lq_client_link,
3809 | { "LQ client links address", "dhcpv6.lq_client_link", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3810 | { &hf_capwap_ac_v6,
3811 | { "CAPWAP Access Controllers address", "dhcpv6.capwap_ac_v6", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3812 | { &hf_aftr_name,
3813 | { "DS-Lite AFTR Name", "dhcpv6.aftr_name", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3814 | { &hf_bootfile_url,
3815 | { "Boot URL", "dhcpv6.bootfile.url", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3816 | { &hf_bootfile_param_len,
3817 | { "Boot Parameter Length", "dhcpv6.bootfile.param_len", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3818 | { &hf_bootfile_param_data,
3819 | { "Boot Parameter Data", "dhcpv6.bootfile.param_data", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3820 | { &hf_nii_type,
3821 | { "Type", "dhcpv6.nii.type", FT_UINT8, BASE_DEC, VALS(nii_type_vals)((0 ? (const struct _value_string*)0 : ((nii_type_vals)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3822 | { &hf_nii_major,
3823 | { "Major", "dhcpv6.nii.major", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3824 | { &hf_nii_minor,
3825 | { "Minor", "dhcpv6.nii.minor", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3826 | { &hf_client_arch_type,
3827 | { "Architecture Type", "dhcpv6.client_arch_type", FT_UINT16, BASE_HEX, VALS(client_arch_type_vals)((0 ? (const struct _value_string*)0 : ((client_arch_type_vals )))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3828 | { &hf_mos_address_code,
3829 | { "MoS Code", "dhcpv6.mos.addr.code", FT_UINT16, BASE_DEC, VALS(ieee802_21_service_vals)((0 ? (const struct _value_string*)0 : ((ieee802_21_service_vals )))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3830 | { &hf_mos_address_len,
3831 | { "MoS Length", "dhcpv6.mos.addr.len", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3832 | { &hf_mos_address_ipv6_addr,
3833 | { "MoS Address", "dhcpv6.mos.addr.addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3834 | { &hf_mos_address_ipv6_fqdn,
3835 | { "MoS FQDN", "dhcpv6.mos.addr.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3836 | { &hf_mip6_hnidf_fqdn,
3837 | { "Home Network ID FQDN", "dhcpv6.mip6.hnidf.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3838 | { &hf_mip6_hnp_pref_len,
3839 | { "Prefix Length", "dhcpv6.mip6.hnp.pref_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3840 | { &hf_mip6_hnp_pref_addr,
3841 | { "Prefix Address", "dhcpv6.mip6.hnp.pref_addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3842 | { &hf_mip6_haa_addr,
3843 | { "Address", "dhcpv6.mip6.haa.addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3844 | { &hf_mip6_haf_fqdn,
3845 | { "FQDN", "dhcpv6.mip6.haf.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3846 | { &hf_homenet_registered_domain,
3847 | { "Homenet Registered Domain", "dhcpv6.homenet.registered_domain", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3848 | { &hf_homenet_fwd_dist_mgr,
3849 | { "Homenet Forward Distribution Manager", "dhcpv6.homenet.fwd_dist_mgr", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3850 | { &hf_homenet_rev_dist_mgr,
3851 | { "Homenet Reverse Distribution Manager", "dhcpv6.homenet.rev_dist_mgr", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3852 | { &hf_homenet_transport,
3853 | { "Supported Transport", "dhcpv6.homenet.transport", FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3854 | { &hf_homenet_transport_reserved_flag,
3855 | { "Reserved", "dhcpv6.homenet.transport.reserved", FT_BOOLEAN, 16, NULL((void*)0), 0xfffe, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3856 | { &hf_homenet_transport_mtls_flag,
3857 | { "DNS over mutually authenticated TLS", "dhcpv6.homenet.transport.mtls", FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported )))), 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3858 | { &hf_iaprefix_pref_lifetime,
3859 | { "Preferred lifetime", "dhcpv6.iaprefix.pref_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3860 | { &hf_iaprefix_valid_lifetime,
3861 | { "Valid lifetime", "dhcpv6.iaprefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(infinity_val)((0 ? (const struct _value_string*)0 : ((infinity_val)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3862 | { &hf_iaprefix_pref_len,
3863 | { "Prefix length", "dhcpv6.iaprefix.pref_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3864 | { &hf_iaprefix_pref_addr,
3865 | { "Prefix address", "dhcpv6.iaprefix.pref_addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3866 | { &hf_pd_exclude_pref_len,
3867 | { "Prefix length", "dhcpv6.pd_exclude.pref_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3868 | { &hf_pd_exclude_subnet_id,
3869 | { "IPv6 subnet ID", "dhcpv6.pd_exclude.subnet_id", FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3870 | { &hf_option_userclass_length,
3871 | { "Length", "dhcpv6.userclass.length", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3872 | { &hf_option_userclass_opaque_data,
3873 | { "Suboption", "dhcpv6.userclass.opaque_data", FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3874 | { &hf_option_ntpserver_type,
3875 | { "Suboption", "dhcpv6.ntpserver.option.type", FT_UINT16, BASE_DEC, VALS(ntp_server_opttype_vals)((0 ? (const struct _value_string*)0 : ((ntp_server_opttype_vals )))), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3876 | { &hf_option_ntpserver_length,
3877 | { "Length", "dhcpv6.ntpserver.option.length", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3878 | { &hf_option_ntpserver_addr,
3879 | { "NTP Server Address", "dhcpv6.ntpserver.addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3880 | { &hf_option_ntpserver_mc_addr,
3881 | { "NTP Multicast Address", "dhcpv6.ntpserver.mc_addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
3882 | { &hf_option_captive_portal,
3883 | { "Captive Portal", "dhcpv6.captive_portal", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, "The contact URI for the captive portal that the user should connect to", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3884 | { &hf_option_s46_option_code,
3885 | { "S46 Option code", "dhcpv6.option_code", FT_UINT16, BASE_HEX, VALS(s46_opt_code_vals)((0 ? (const struct _value_string*)0 : ((s46_opt_code_vals))) ), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3886 | { &hf_option_failover_binding_status,
3887 | { "Failover Binding Status", "dhcpv6.failover.binding_status", FT_UINT8, BASE_DEC, VALS(failover_binding_status_vals)((0 ? (const struct _value_string*)0 : ((failover_binding_status_vals )))), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3888 | { &hf_option_failover_connect_flags,
3889 | { "Flags", "dhcpv6.failover.connect.flags", FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3890 | { &hf_option_failover_connect_reserved_flag,
3891 | { "Reserved", "dhcpv6.failover.connect.flags.reserved", FT_BOOLEAN, 16, NULL((void*)0), 0xfffe, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3892 | { &hf_option_failover_connect_f_flag,
3893 | { "Fixed PD Length (F)", "dhcpv6.failover.connect.flags.f", FT_BOOLEAN, 16, NULL((void*)0), 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3894 | { &hf_option_failover_dns_hostname,
3895 | { "DNS Hostname", "dhcpv6.failover.dns_hostname", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3896 | { &hf_option_failover_dns_zonename,
3897 | { "DNS Zone Name", "dhcpv6.failover.dns_zonename", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3898 | { &hf_option_failover_dns_flags,
3899 | { "Flags", "dhcpv6.failover.dns.flags", FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3900 | { &hf_option_failover_dns_reserved_flag,
3901 | { "Reserved", "dhcpv6.failover.dns.flags.reserved", FT_BOOLEAN, 16, NULL((void*)0), 0xfff0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3902 | { &hf_option_failover_dns_u_flag,
3903 | { "Using Requested FQDN (U)", "dhcpv6.failover.dns.flags.u", FT_BOOLEAN, 16, NULL((void*)0), 0x0008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3904 | { &hf_option_failover_dns_s_flag,
3905 | { "Synthesized Name (S)", "dhcpv6.failover.dns.flags.s", FT_BOOLEAN, 16, NULL((void*)0), 0x0004, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3906 | { &hf_option_failover_dns_r_flag,
3907 | { "Rev Uptodate (R)", "dhcpv6.failover.dns.flags.r", FT_BOOLEAN, 16, NULL((void*)0), 0x0002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3908 | { &hf_option_failover_dns_f_flag,
3909 | { "Fwd Uptodate (F)", "dhcpv6.failover.dns.flags.f", FT_BOOLEAN, 16, NULL((void*)0), 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3910 | { &hf_option_failover_expiration_time,
3911 | { "Expiration Time", "dhcpv6.failover.expiration_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3912 | { &hf_option_failover_max_unacked_bndupd,
3913 | { "Max number of unacked BNDUPD messages", "dhcpv6.failover.max_unacked_bndupd", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3914 | { &hf_option_failover_mclt,
3915 | { "Maximum Client Lead Time (MCLT)", "dhcpv6.failover.mclt", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3916 | { &hf_option_failover_partner_lifetime,
3917 | { "Partner Lifetime", "dhcpv6.failover.partner_lifetime", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3918 | { &hf_option_failover_partner_lifetime_sent,
3919 | { "Partner Lifetime Sent", "dhcpv6.failover.partner_lifetime_sent", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3920 | { &hf_option_failover_partner_downtime,
3921 | { "Partner Down Time", "dhcpv6.failover.partner_down_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3922 | { &hf_option_failover_partner_raw_clt_time,
3923 | { "Partner Raw Client Time", "dhcpv6.failover.partner_raw_clt_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3924 | { &hf_option_failover_major_version,
3925 | { "Protocol Major Version", "dhcpv6.failover.protocol.major_version", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3926 | { &hf_option_failover_minor_version,
3927 | { "Protocol Minor Version", "dhcpv6.failover.protocol.minor_version", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3928 | { &hf_option_failover_keepalive_time,
3929 | { "Keepalive Time", "dhcpv6.failover.keepalive_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3930 | { &hf_option_failover_reconfigure_time,
3931 | { "Reconfigure Time", "dhcpv6.failover.reconfigure_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3932 | { &hf_option_failover_reconfigure_key,
3933 | { "Reconfigure Key", "dhcpv6.failover.reconfigure_key", FT_BYTES, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3934 | { &hf_option_failover_relationship_name,
3935 | { "Relationship Name", "dhcpv6.failover.relationship_name", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3936 | { &hf_option_failover_server_flags,
3937 | { "Flags", "dhcpv6.failover.server.flags", FT_UINT8, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3938 | { &hf_option_failover_server_reserved_flag,
3939 | { "Reserved", "dhcpv6.failover.server.flags.reserved", FT_BOOLEAN, 8, NULL((void*)0), 0xf8, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3940 | { &hf_option_failover_server_a_flag,
3941 | { "Ack Startup (A)", "dhcpv6.failover.server.flags.a", FT_BOOLEAN, 8, NULL((void*)0), 0x04, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3942 | { &hf_option_failover_server_s_flag,
3943 | { "Startup (S)", "dhcpv6.failover.server.flags.s", FT_BOOLEAN, 8, NULL((void*)0), 0x02, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3944 | { &hf_option_failover_server_c_flag,
3945 | { "Communicated (C)", "dhcpv6.failover.server.flags.c", FT_BOOLEAN, 8, NULL((void*)0), 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3946 | { &hf_option_failover_server_state,
3947 | { "Server State", "dhcpv6.failover.server_state", FT_UINT8, BASE_DEC, VALS(failover_server_state_vals)((0 ? (const struct _value_string*)0 : ((failover_server_state_vals )))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3948 | { &hf_option_failover_start_time_of_state,
3949 | { "Start Time of State", "dhcpv6.failover.start_time_of_state", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3950 | { &hf_option_failover_state_expiration_time,
3951 | { "State Expiration Time", "dhcpv6.failover.state_expiration_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3952 | { &hf_option_relay_port,
3953 | { "Downstream Source Port", "dhcpv6.relay_port", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3954 | { &hf_option_ntpserver_fqdn,
3955 | { "NTP Server FQDN", "dhcpv6.ntpserver.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3956 | { &hf_option_vss_type,
3957 | { "VSS Type", "dhcpv6.vss.type", FT_UINT8, BASE_DEC, VALS(vss_type_options_vals)((0 ? (const struct _value_string*)0 : ((vss_type_options_vals )))), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3958 | { &hf_option_vss_info_nvt,
3959 | { "VSS NVT", "dhcpv6.vss.nvt", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3960 | { &hf_option_vss_info_vpn_id,
3961 | { "VSS VPN-ID", "dhcpv6.vss.vpn_id", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3962 | { &hf_packetcable_ccc_suboption,
3963 | { "Sub element", "dhcpv6.packetcable.ccc.suboption", FT_UINT16, BASE_DEC, VALS(pkt_ccc_opt_vals)((0 ? (const struct _value_string*)0 : ((pkt_ccc_opt_vals)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3964 | { &hf_packetcable_ccc_pri_dhcp,
3965 | { "Primary DHCP", "dhcpv6.packetcable.ccc.pri_dhcp", FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3966 | { &hf_packetcable_ccc_sec_dhcp,
3967 | { "Secondary DHCP", "dhcpv6.packetcable.ccc.sec_dhcp", FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3968 | { &hf_packetcable_cccV6_suboption,
3969 | { "Sub element", "dhcpv6.packetcable.cccV6.suboption", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &pkt_cccV6_opt_vals_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3970 | { &hf_modem_capabilities_encoding_type,
3971 | { "Type", "dhcpv6.docsis.cccV6.tlv5.suboption", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &modem_capabilities_encoding_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3972 | { &hf_eue_capabilities_encoding_type,
3973 | { "Type", "dhcpv6.packetcable.cccV6.tlv5.suboption", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &eue_capabilities_encoding_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3974 | { &hf_capabilities_encoding_length,
3975 | { "Length", "dhcpv6.cccV6.tlv5.suboption.length", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3976 | { &hf_capabilities_encoding_bytes,
3977 | { "Value", "dhcpv6.cccV6.tlv5.suboption.value", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3978 | { &hf_capabilities_encoding_number,
3979 | { "Value", "dhcpv6.cccV6.tlv5.suboption.value_number", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3980 | { &hf_packetcable_cccV6_pri_dss,
3981 | { "Primary SSID", "dhcpv6.packetcable.cccV6.pri_dss", FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3982 | { &hf_packetcable_cccV6_sec_dss,
3983 | { "Secondary SSID", "dhcpv6.packetcable.cccV6.sec_dss", FT_STRINGZ, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3984 | { &hf_packetcable_cccV6_prov_srv_type,
3985 | { "Type", "dhcpv6.packetcable.cccV6.prov_srv.type", FT_UINT8, BASE_DEC, VALS(pkt_cccV6_prov_srv_type_vals)((0 ? (const struct _value_string*)0 : ((pkt_cccV6_prov_srv_type_vals )))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3986 | { &hf_packetcable_cccV6_prov_srv_fqdn,
3987 | { "FQDN", "dhcpv6.packetcable.cccV6.prov_srv.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3988 | { &hf_packetcable_cccV6_prov_srv_ipv6,
3989 | { "IPv6 address", "dhcpv6.packetcable.cccV6.prov_srv.ipv6", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3990 | { &hf_packetcable_cccV6_as_krb_nominal_timeout,
3991 | { "Nominal Timeout", "dhcpv6.packetcable.cccV6.as_krb.nominal_timeout", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3992 | { &hf_packetcable_cccV6_as_krb_max_timeout,
3993 | { "Maximum Timeout", "dhcpv6.packetcable.cccV6.as_krb.max_timeout", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3994 | { &hf_packetcable_cccV6_as_krb_max_retry_count,
3995 | { "Maximum Retry Count", "dhcpv6.packetcable.cccV6.as_krb.max_retry_count", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3996 | { &hf_packetcable_cccV6_ap_krb_nominal_timeout,
3997 | { "Nominal Timeout", "dhcpv6.packetcable.cccV6.ap_krb.nominal_timeout", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
3998 | { &hf_packetcable_cccV6_ap_krb_max_timeout,
3999 | { "Maximum Timeout", "dhcpv6.packetcable.cccV6.ap_krb.max_timeout", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4000 | { &hf_packetcable_cccV6_ap_krb_max_retry_count,
4001 | { "Maximum Retry Count", "dhcpv6.packetcable.cccV6.ap_krb.max_retry_count", FT_UINT32, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4002 | { &hf_packetcable_cccV6_krb_realm,
4003 | { "KRB Realm", "dhcpv6.packetcable.cccV6.krb_realm", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4004 | { &hf_packetcable_cccV6_tgt_flag,
4005 | { "TGT Flags", "dhcpv6.packetcable.cccV6.tgt_flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4006 | { &hf_packetcable_cccV6_tgt_flag_fetch,
4007 | { "Fetch TGT", "dhcpv6.packetcable.cccV6.tgt_flag.fetch", FT_BOOLEAN, 8, NULL((void*)0), 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4008 | { &hf_packetcable_cccV6_prov_timer,
4009 | { "Provisioning timer", "dhcpv6.packetcable.cccV6.prov_timer", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4010 | { &hf_packetcable_cccV6_sec_tcm,
4011 | { "SEC TCM Flags", "dhcpv6.packetcable.cccV6.sec_tcm", FT_UINT16, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4012 | { &hf_packetcable_cccV6_sec_tcm_provisioning_server,
4013 | { "Provisioning Server", "dhcpv6.packetcable.cccV6.sec_tcm.provisioning_server", FT_BOOLEAN, 16, TFS(&tfs_on_off)((0 ? (const struct true_false_string*)0 : ((&tfs_on_off) ))), 0x0001, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4014 | { &hf_packetcable_cccV6_sec_tcm_call_manager_server,
4015 | { "Call Manager Servers", "dhcpv6.packetcable.cccV6.tgt_flag.call_manager_server", FT_BOOLEAN, 16, TFS(&tfs_on_off)((0 ? (const struct true_false_string*)0 : ((&tfs_on_off) ))), 0x0002, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4016 | { &hf_cablelabs_opts,
4017 | { "Suboption", "dhcpv6.cablelabs.opt", FT_UINT16, BASE_DEC | BASE_EXT_STRING0x00000200, &cl_vendor_subopt_values_ext, 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4018 | { &hf_cablelabs_ipv6_server,
4019 | { "IPv6 address", "dhcpv6.cablelabs.ipv6_server", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4020 | { &hf_cablelabs_docsis_version_number,
4021 | { "DOCSIS Version Number", "dhcpv6.cablelabs.docsis_version_number", FT_UINT16, BASE_CUSTOM, CF_FUNC(cablelabs_fmt_docsis_version)((const void *) (size_t) (cablelabs_fmt_docsis_version)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4022 | { &hf_cablelabs_dpoe_server_version_number,
4023 | { "DPoE Server Version Number", "dhcpv6.cablelabs.dpoe_server_version_number", FT_UINT16, BASE_CUSTOM, CF_FUNC(cablelabs_fmt_dpoe_server_version)((const void *) (size_t) (cablelabs_fmt_dpoe_server_version)), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4024 | { &hf_cablelabs_interface_id,
4025 | { "Interface-ID", "dhcpv6.cablelabs.interface_id", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4026 | { &hf_cablelabs_interface_id_link_address,
4027 | { "Link Address", "dhcpv6.cablelabs.interface_id_link_address", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4028 | { &hf_option_s46_rule_flags,
4029 | { "Flags", "dhcpv6.s46_rule.flags", FT_UINT8, BASE_HEX, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4030 | { &hf_option_s46_rule_reserved_flag,
4031 | { "Reserved", "dhcpv6.s46_rule.flags.reserved", FT_BOOLEAN, 8, NULL((void*)0), 0xfe, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4032 | { &hf_option_s46_rule_fmr_flag,
4033 | { "Forwarding Mapping Rule", "dhcpv6.s46_rule.flags.fmr", FT_BOOLEAN, 8, NULL((void*)0), 0x01, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4034 | { &hf_option_s46_rule_ea_len,
4035 | { "EA-bit length", "dhcpv6.s46_rule.ea_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4036 | { &hf_option_s46_rule_ipv4_pref_len,
4037 | { "IPv4 prefix length", "dhcpv6.s46_rule.ipv4_pref_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4038 | { &hf_option_s46_rule_ipv4_prefix,
4039 | { "IPv4 prefix", "dhcpv6.s46_rule.ipv4_prefix", FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4040 | { &hf_option_s46_rule_ipv6_pref_len,
4041 | { "IPv6 prefix length", "dhcpv6.s46_rule.ipv6_prefix_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4042 | { &hf_option_s46_rule_ipv6_prefix,
4043 | { "IPv6 prefix", "dhcpv6.s46_rule.ipv6_prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4044 | { &hf_option_s46_br_address,
4045 | { "BR address", "dhcpv6.s46_br.address", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4046 | { &hf_option_s46_dmr_pref_len,
4047 | { "IPv6 prefix length", "dhcpv6.s46_dmr.dmr_pref_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4048 | { &hf_option_s46_dmr_prefix,
4049 | { "IPv6 prefix", "dhcpv6.s46_dmr.dmr_prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4050 | { &hf_option_s46_v4v6bind_ipv4_address,
4051 | { "IPv4 Address", "dhcpv6.s46_v4v6bind.ipv4_address", FT_IPv4, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4052 | { &hf_option_s46_v4v6bind_ipv6_pref_len,
4053 | { "IPv6 prefix length", "dhcpv6.s46_v4v6bind.ipv6_pref_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4054 | { &hf_option_s46_v4v6bind_ipv6_prefix,
4055 | { "IPv6 prefix", "dhcpv6.s46_v4v6bind.ipv6_prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4056 | { &hf_option_s46_portparam_offset,
4057 | { "Offset", "dhcpv6.s46_portparam.offset", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4058 | { &hf_option_s46_portparam_psid_len,
4059 | { "PSID length", "dhcpv6.s46_portparam.psid_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4060 | { &hf_option_s46_portparam_psid,
4061 | { "PSID", "dhcpv6.s46_portparam.psid", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4062 | { &hf_opt_mudurl,
4063 | { "MUDURL", "dhcpv6.mudurl", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4064 | { &hf_client_link_layer_addr,
4065 | { "Link-layer address", "dhcpv6.client_link_layer_addr", FT_STRING, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4066 | { &hf_client_link_layer_addr_ether,
4067 | { "Link-layer address (Ethernet)", "dhcpv6.client_link_layer_addr_ether", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4068 | { &hf_client_link_layer_addr_hwtype,
4069 | { "Hardware type", "dhcpv6.client_link_layer_addr_hwtype", FT_UINT16, BASE_DEC, VALS(arp_hrd_vals)((0 ? (const struct _value_string*)0 : ((arp_hrd_vals)))), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4070 | { &hf_dnr_svcpriority,
4071 | {"DNR service priority", "dhcpv6.dnr.svcpriority", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4072 | { &hf_dnr_auth_domain_name_len,
4073 | {"DNR authentication domain name length", "dhcpv6.dnr.adn_len", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4074 | { &hf_dnr_auth_domain_name,
4075 | {"DNR authentication domain name", "dhcpv6.dnr.adn", FT_STRING, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4076 | { &hf_dnr_addrs_len,
4077 | {"DNR addresses list length", "dhcpv6.dnr.addrs.len", FT_UINT16, BASE_DEC, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4078 | { &hf_dnr_addrs,
4079 | {"DNR address", "dhcpv6.dnr.addrs", FT_IPv6, BASE_NONE, NULL((void*)0), 0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
4080 | };
4081 |
4082 | static int *ett[] = {
4083 | &ett_dhcpv6,
4084 | &ett_dhcpv6_option,
4085 | &ett_dhcpv6_option_vsoption,
4086 | &ett_dhcpv6_vendor_option,
4087 | &ett_dhcpv6_pkt_option,
4088 | &ett_dhcpv6_userclass_option,
4089 | &ett_dhcpv6_netserver_option,
4090 | &ett_dhcpv6_tlv5_type,
4091 | &ett_dhcpv6_sip_server_domain_search_list_option,
4092 | &ett_dhcpv6_dns_domain_search_list_option,
4093 | &ett_dhcpv6_nis_domain_name_option,
4094 | &ett_dhcpv6_nisp_domain_name_option,
4095 | &ett_dhcpv6_bcmcs_servers_domain_search_list_option,
4096 | &ett_dhcpv6_s46_rule_flags,
4097 | &ett_dhcpv6_failover_connect_flags,
4098 | &ett_dhcpv6_failover_dns_flags,
4099 | &ett_dhcpv6_failover_server_flags,
4100 | &ett_clientfqdn_flags,
4101 | &ett_clientfqdn_expert,
4102 | &ett_dhcpv6_homenet_transport_flags
4103 | };
4104 |
4105 | static ei_register_info ei[] = {
4106 | { &ei_dhcpv6_bogus_length, { "dhcpv6.bogus_length", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Bogus length", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4107 | { &ei_dhcpv6_malformed_option, { "dhcpv6.malformed_option", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Malformed option", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4108 | { &ei_dhcpv6_deprecated_option, { "dhcpv6.deprecated_option", PI_DEPRECATED0x0e000000, PI_WARN0x00600000, "Deprecated option", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4109 | { &ei_dhcpv6_obsoleted_option, { "dhcpv6.obsoleted_option", PI_DEPRECATED0x0e000000, PI_WARN0x00600000, "Obsoleted option", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4110 | { &ei_dhcpv6_no_suboption_len, { "dhcpv6.no_suboption_len", PI_PROTOCOL0x09000000, PI_WARN0x00600000,
4111 | "no room left in option for suboption length", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4112 | { &ei_dhcpv6_invalid_time_value, { "dhcpv6.invalid_time_value", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Invalid time value", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4113 | { &ei_dhcpv6_invalid_type, { "dhcpv6.invalid_type", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Invalid type", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4114 | { &ei_dhcpv6_error_hopcount, { "dhcpv6.error_hopcount", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Detected error on hop-count", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4115 | { &ei_dhcpv6_clientfqdn_bad_msgtype, { "dhcpv6.bad_msgtype", PI_PROTOCOL0x09000000, PI_ERROR0x00800000,
4116 | "This message type is not permitted to use OPTION_CLIENT_FQDN", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4117 | { &ei_dhcpv6_s_bit_should_be_zero, { "dhcpv6.s_bit_should_be_zero", PI_PROTOCOL0x09000000, PI_ERROR0x00800000,
4118 | "ERROR: When the N-bit is set, the S-bit must be reset", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4119 | { &ei_dhcpv6_dnr_adn_only_mode, { "dhcpv6.expert.dnr_adn_only_mode", PI_COMMENTS_GROUP0x0b000000, PI_CHAT0x00200000,
4120 | "This DNR option is in ADN-only mode", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4121 | /*
4122 | * FQDN-related errors in dhcpv6_domain() */
4123 | { &ei_dhcpv6_non_dns_encoded_name, { "dhcpv6.expert.name_not_dns_encoded", PI_PROTOCOL0x09000000, PI_ERROR0x00800000,
4124 | "ERROR: This name is not a DNS record encoded", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4125 | { &ei_dhcpv6_domain_field_len_exceeded, { "dhcpv6.expert.domain_field_length_exceeded", PI_MALFORMED0x07000000, PI_ERROR0x00800000,
4126 | "ERROR: FQDN exceeds length of the domain name field", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4127 | { &ei_dhcpv6_encoded_fqdn_len_gt_255, { "dhcpv6.expert.encoded_fqdn_gt_255", PI_MALFORMED0x07000000, PI_ERROR0x00800000,
4128 | "ERROR: FQDN's *encoded* length exceeds 255 octets [RFC 1035 3.1.]", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4129 | { &ei_dhcpv6_root_only_domain_name, { "dhcpv6.expert.root_only_domain_name", PI_PROTOCOL0x09000000, PI_ERROR0x00800000,
4130 | "ERROR: A root-only domain name cannot be resolved.", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4131 | { &ei_dhcpv6_tld_lookup, { "dhcpv6.expert.tld_lookup", PI_COMMENTS_GROUP0x0b000000, PI_WARN0x00600000,
4132 | "WARNING: TLDs are rarely resolvable", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4133 | { &ei_dhcpv6_partial_name_preceded_by_fqdn, { "dhcpv6.expert.partial_name_preceded_by_fqdn", PI_PROTOCOL0x09000000, PI_ERROR0x00800000,
4134 | "ERROR: Partial name is preceded by an FQDN", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4135 | };
4136 |
4137 | static hf_register_info bulk_leasequery_hf[] = {
4138 | { &hf_dhcpv6_bulk_leasequery_size,
4139 | { "Message size", "dhcpv6.bulk_leasequery.size", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4140 | { &hf_dhcpv6_bulk_leasequery_msgtype,
4141 | { "Message type", "dhcpv6.bulk_leasequery.msgtype", FT_UINT8, BASE_DEC | BASE_EXT_STRING0x00000200, &msgtype_vals_ext, 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4142 | { &hf_dhcpv6_bulk_leasequery_reserved,
4143 | { "Reserved", "dhcpv6.bulk_leasequery.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4144 | { &hf_dhcpv6_bulk_leasequery_trans_id,
4145 | { "Transaction ID", "dhcpv6.bulk_leasequery.trans_id", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
4146 | };
4147 |
4148 | static int *ett_bulk_leasequery[] = {
4149 | &ett_dhcpv6_bulk_leasequery,
4150 | &ett_dhcpv6_bulk_leasequery_options
4151 | };
4152 |
4153 | static ei_register_info ei_bulk_leasequery[] = {
4154 | { &ei_dhcpv6_bulk_leasequery_bad_query_type, { "dhcpv6.bulk_leasequery.bad_query_type", PI_MALFORMED0x07000000, PI_WARN0x00600000, "LQ-QUERY: Query types only supported by Bulk Leasequery", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4155 | { &ei_dhcpv6_bulk_leasequery_bad_msg_type, { "dhcpv6.bulk_leasequery.bad_msg_type", PI_MALFORMED0x07000000, PI_WARN0x00600000, "Message Type not allowed by DHCPv6 Bulk Leasequery", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE , BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE , -1, ((void*)0)}} }},
4156 | };
4157 |
4158 | expert_module_t *expert_dhcpv6;
4159 | expert_module_t *expert_dhcpv6_bulk_leasequery;
4160 |
4161 | proto_dhcpv6 = proto_register_protocol("DHCPv6", "DHCPv6", "dhcpv6");
4162 | proto_register_field_array(proto_dhcpv6, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
4163 | proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
4164 |
4165 | expert_dhcpv6 = expert_register_protocol(proto_dhcpv6);
4166 | expert_register_field_array(expert_dhcpv6, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
4167 |
4168 | proto_dhcpv6_bulk_leasequery = proto_register_protocol("DHCPv6 Bulk Leasequery", "DHCPv6 Bulk Leasequery", "dhcpv6.bulk_leasequery");
4169 | register_dissector("dhcpv6.bulk_leasequery", dissect_dhcpv6_bulk_leasequery,
4170 | proto_dhcpv6_bulk_leasequery);
4171 | proto_register_field_array(proto_dhcpv6_bulk_leasequery, bulk_leasequery_hf, array_length(bulk_leasequery_hf)(sizeof (bulk_leasequery_hf) / sizeof (bulk_leasequery_hf)[0] ));
4172 | proto_register_subtree_array(ett_bulk_leasequery, array_length(ett_bulk_leasequery)(sizeof (ett_bulk_leasequery) / sizeof (ett_bulk_leasequery)[ 0]));
4173 |
4174 | expert_dhcpv6_bulk_leasequery = expert_register_protocol(proto_dhcpv6_bulk_leasequery);
4175 | expert_register_field_array(expert_dhcpv6_bulk_leasequery, ei_bulk_leasequery, array_length(ei_bulk_leasequery)(sizeof (ei_bulk_leasequery) / sizeof (ei_bulk_leasequery)[0] ));
4176 |
4177 | /* Allow other dissectors to find this one by name. */
4178 | dhcpv6_handle = register_dissector("dhcpv6", dissect_dhcpv6_stream, proto_dhcpv6);
4179 |
4180 | dhcpv6_module = prefs_register_protocol(proto_dhcpv6, NULL((void*)0));
4181 | prefs_register_bool_preference(dhcpv6_module, "cablelabs_interface_id",
4182 | "Dissect Option 18 (Interface-Id) as CableLab option",
4183 | "Whether Option 18 is dissected as CableLab or RFC 3315",
4184 | &cablelabs_interface_id);
4185 |
4186 | bulkquery_module = prefs_register_protocol(proto_dhcpv6_bulk_leasequery, NULL((void*)0));
4187 | prefs_register_bool_preference(bulkquery_module, "desegment",
4188 | "Desegment all Bulk Leasequery messages spanning multiple TCP segments",
4189 | "Whether the Bulk Leasequery dissector should desegment all messages spanning multiple TCP segments",
4190 | &dhcpv6_bulk_leasequery_desegment);
4191 |
4192 | dhcpv6_enterprise_opts_dissector_table = register_dissector_table("dhcpv6.enterprise_opts", "DHCPv6 Enterprise OPTs", proto_dhcpv6, FT_UINT32, BASE_DEC);
4193 |
4194 | proto_dhcpv6_cablelabs = proto_register_protocol("DHCPv6 Cablelabs", "DHCPv6(cablelabs)", "dhcpv6_cablelabs");
4195 | dhcpv6_cablelabs_handle = register_dissector("dhcpv6_cablelabs", dissect_cablelabs_specific_opts, proto_dhcpv6_cablelabs);
4196 | dissector_add_uint("dhcpv6.enterprise_opts", VENDOR_CABLELABS4491, dhcpv6_cablelabs_handle);
4197 | }
4198 |
4199 | void
4200 | proto_reg_handoff_dhcpv6(void)
4201 | {
4202 | dissector_add_uint_range_with_preference("udp.port", UDP_PORT_DHCPV6_RANGE"546-547", dhcpv6_handle);
4203 |
4204 | dissector_add_uint_with_preference("tcp.port", TCP_PORT_DHCPV6_UPSTREAM547, find_dissector("dhcpv6.bulk_leasequery"));
4205 |
4206 | dhcpv4_handle = find_dissector_add_dependency("dhcp", proto_dhcpv6);
4207 | svc_params_handle = find_dissector("svc_params");
4208 | }
4209 |
4210 | /*
4211 | * Editor modelines
4212 | *
4213 | * Local Variables:
4214 | * c-basic-offset: 4
4215 | * tab-width: 8
4216 | * indent-tabs-mode: nil
4217 | * End:
4218 | *
4219 | * ex: set shiftwidth=4 tabstop=8 expandtab:
4220 | * :indentSize=4:tabSize=8:noTabs=true:
4221 | */