Bug Summary

File:builds/wireshark/wireshark/epan/dissectors/packet-icmpv6.c
Warning:line 2398, column 21
Value stored to 'opt_tvb' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

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-icmpv6.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-nonliteral -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/2026-03-12-100407-3641-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-icmpv6.c
1/* packet-icmpv6.c
2 * Routines for ICMPv6 packet disassembly
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <[email protected]>
6 * Copyright 1998 Gerald Combs
7 *
8 * MobileIPv6 support added by Tomislav Borosa <[email protected]>
9 * Copyright 2006, Nicolas DICHTEL - 6WIND - <[email protected]>
10 *
11 * HMIPv6 support added by Martti Kuparinen <[email protected]>
12 *
13 * FMIPv6 support added by Martin Andre <[email protected]>
14 *
15 * RPL support added by Colin O'Flynn & Owen Kirby.
16 *
17 * Enhance ICMPv6 dissector by Alexis La Goutte
18 *
19 * P2P-RPL support added by Cenk Gundogan <[email protected]>
20 *
21 * SPDX-License-Identifier: GPL-2.0-or-later
22 */
23
24#include "config.h"
25
26#include <math.h>
27
28#include <epan/packet.h>
29#include <epan/in_cksum.h>
30#include <epan/expert.h>
31#include <epan/conversation.h>
32#include <epan/sequence_analysis.h>
33#include <epan/tap.h>
34#include <epan/capture_dissectors.h>
35#include <epan/unit_strings.h>
36#include <epan/proto_data.h>
37#include <epan/strutil.h>
38#include <epan/tfs.h>
39#include <epan/iana-info.h>
40#include <wsutil/array.h>
41#include <wsutil/pow2.h>
42
43#include "packet-ber.h"
44#include "packet-dns.h"
45#include "packet-x509af.h"
46#include "packet-x509if.h"
47#include "packet-icmp.h" /* same transaction_t used for both v4 and v6 */
48#include "packet-ieee802154.h"
49#include "packet-6lowpan.h"
50#include "packet-ip.h"
51
52void proto_register_icmpv6(void);
53void proto_reg_handoff_icmpv6(void);
54
55/*
56 * The information used comes from:
57 * RFC 1885/2463/4443: Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification
58 * RFC 2461/4861: Neighbor Discovery for IP Version 6 (IPv6)
59 * RFC 2491: IPv6 over Non-Broadcast Multiple Access (NBMA) networks
60 * RFC 2710: Multicast Listener Discovery for IPv6
61 * RFC 2894: Router Renumbering for IPv6
62 * RFC 3122: Extensions to IPv6 Neighbor Discovery for Inverse Discovery Specification
63 * RFC 3775/6275: Mobility Support in IPv6
64 * RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) for IPv6
65 * RFC 3971: SEcure Neighbor Discovery (SEND)
66 * RFC 4065: Instructions for Seamoby and Experimental Mobility Protocol IANA Allocations
67 * RFC 4068/5268/5568: Fast Handovers for Mobile IPv6 (Mobile IPv6 Fast Handovers)
68 * RFC 4140/5380: Hierarchical Mobile IPv6 Mobility Management (HMIPv6)
69 * RFC 4191: Default Router Preferences and More-Specific Routes
70 * RFC 4286: Multicast Router Discovery
71 * RFC 4620: IPv6 Node Information Queries
72 * RFC 5006/6106: IPv6 Router Advertisement Options for DNS Configuration
73 * RFC 5075/5175: IPv6 Router Advertisement Flags Option
74 * RFC 5269: Distributing a Symmetric Fast Mobile IPv6 (FMIPv6) Handover Key Using SEcure Neighbor Discovery (SEND)
75 * RFC 5271: Mobile IPv6 Fast Handovers for 3G CDMA Networks
76 * RFC 6275: Mobility Support in IPv6
77 * RFC 6495: Subject Key Identifier (SKI) SEND Name Type fields
78 * RFC 6496: Secure Proxy ND Support for SEND
79 * RFC 6550: RPL: IPv6 Routing Protocol for Low power and Lossy Networks
80 * RFC 6554: An IPv6 Routing Header for Source Routes with RPL
81 * RFC 6743: ICMP Locator Update message for ILNPv6
82 * RFC 6775: Neighbor Discovery Optimization for Low Power and Lossy Networks (6LoWPAN)
83 * RFC 6997: Reactive Discovery of Point-to-Point Routes in Low-Power and Lossy Networks
84 * RFC 7112: Implications of Oversized IPv6 Header Chains
85 * RFC 7400: 6LoWPAN-GHC: Generic Header Compression for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)
86 * RFC 7731: MPL Control Message
87 * RFC 8335: PROBE: A Utility for Probing Interfaces
88 * RFC 8781: Discovering PREF64 in Router Advertisements
89 * RFC 8505: Registration Extensions for IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) Neighbor Discovery
90 * RFC 8801: Discovering Provisioning Domain Names and Data
91 * RFC 9009: Efficient Route Invalidation
92 * http://www.iana.org/assignments/icmpv6-parameters (last updated 2016-02-24)
93 */
94
95static int proto_icmpv6;
96static int hf_icmpv6_type;
97static int hf_icmpv6_code;
98static int hf_icmpv6_mcast_ra_ad_interval;
99static int hf_icmpv6_mcast_ra_reserved;
100static int hf_icmpv6_checksum;
101static int hf_icmpv6_checksum_status;
102static int hf_icmpv6_reserved;
103static int hf_icmpv6_data;
104static int hf_icmpv6_unknown_data;
105static int hf_icmpv6_mtu;
106static int hf_icmpv6_pointer;
107static int hf_icmpv6_echo_identifier;
108static int hf_icmpv6_echo_sequence_number;
109static int hf_icmpv6_nonce;
110static int hf_icmpv6_data_time;
111static int hf_icmpv6_data_time_relative;
112
113/* RFC 2461/4861 : Neighbor Discovery for IP version 6 (IPv6) */
114static int hf_icmpv6_nd_ra_cur_hop_limit;
115static int hf_icmpv6_nd_ra_flag;
116static int hf_icmpv6_nd_ra_flag_m;
117static int hf_icmpv6_nd_ra_flag_o;
118static int hf_icmpv6_nd_ra_flag_h;
119static int hf_icmpv6_nd_ra_flag_prf;
120static int hf_icmpv6_nd_ra_flag_p;
121static int hf_icmpv6_nd_ra_flag_s;
122static int hf_icmpv6_nd_ra_flag_rsv;
123static int hf_icmpv6_nd_ra_router_lifetime;
124static int hf_icmpv6_nd_ra_reachable_time;
125static int hf_icmpv6_nd_ra_retrans_timer;
126static int hf_icmpv6_nd_ns_target_address;
127static int hf_icmpv6_nd_na_flag;
128static int hf_icmpv6_nd_na_flag_r;
129static int hf_icmpv6_nd_na_flag_s;
130static int hf_icmpv6_nd_na_flag_o;
131static int hf_icmpv6_nd_na_flag_rsv;
132static int hf_icmpv6_nd_na_target_address;
133static int hf_icmpv6_nd_rd_target_address;
134static int hf_icmpv6_nd_rd_destination_address;
135
136/* ND Options */
137static int hf_icmpv6_opt;
138static int hf_icmpv6_opt_type;
139static int hf_icmpv6_opt_length;
140static int hf_icmpv6_opt_linkaddr_mac;
141static int hf_icmpv6_opt_src_linkaddr_mac;
142static int hf_icmpv6_opt_target_linkaddr_mac;
143static int hf_icmpv6_opt_linkaddr;
144static int hf_icmpv6_opt_src_linkaddr;
145static int hf_icmpv6_opt_target_linkaddr;
146static int hf_icmpv6_opt_linkaddr_eui64;
147static int hf_icmpv6_opt_src_linkaddr_eui64;
148static int hf_icmpv6_opt_target_linkaddr_eui64;
149static int hf_icmpv6_opt_prefix_len;
150static int hf_icmpv6_opt_prefix_flag;
151static int hf_icmpv6_opt_prefix_flag_l;
152static int hf_icmpv6_opt_prefix_flag_a;
153static int hf_icmpv6_opt_prefix_flag_r;
154static int hf_icmpv6_opt_prefix_flag_p;
155static int hf_icmpv6_opt_prefix_flag_reserved;
156static int hf_icmpv6_opt_prefix_valid_lifetime;
157static int hf_icmpv6_opt_prefix_preferred_lifetime;
158static int hf_icmpv6_opt_prefix;
159static int hf_icmpv6_opt_naack_option_code;
160static int hf_icmpv6_opt_naack_status;
161static int hf_icmpv6_opt_naack_supplied_ncoa;
162static int hf_icmpv6_opt_cga_pad_len;
163static int hf_icmpv6_opt_cga;
164static int hf_icmpv6_opt_cga_modifier;
165static int hf_icmpv6_opt_cga_subnet_prefix;
166static int hf_icmpv6_opt_cga_count;
167static int hf_icmpv6_opt_cga_subject_public_key_info;
168static int hf_icmpv6_opt_cga_ext_type;
169static int hf_icmpv6_opt_cga_ext_length;
170static int hf_icmpv6_opt_cga_ext_data;
171static int hf_icmpv6_opt_rsa_key_hash;
172static int hf_icmpv6_opt_digital_signature_padding;
173static int hf_icmpv6_opt_ps_key_hash;
174static int hf_icmpv6_opt_timestamp;
175static int hf_icmpv6_opt_nonce;
176static int hf_icmpv6_opt_certificate_padding;
177static int hf_icmpv6_opt_ipa_option_code;
178static int hf_icmpv6_opt_ipa_prefix_len;
179static int hf_icmpv6_opt_ipa_ipv6_address;
180static int hf_icmpv6_opt_nrpi_option_code;
181static int hf_icmpv6_opt_nrpi_prefix_len;
182static int hf_icmpv6_opt_nrpi_prefix;
183static int hf_icmpv6_opt_lla_option_code;
184static int hf_icmpv6_opt_lla_bytes;
185static int hf_icmpv6_opt_pvd_id_flags;
186static int hf_icmpv6_opt_pvd_id_flags_h;
187static int hf_icmpv6_opt_pvd_id_flags_l;
188static int hf_icmpv6_opt_pvd_id_flags_r;
189static int hf_icmpv6_opt_pvd_id_flags_reserved;
190static int hf_icmpv6_opt_pvd_id_delay;
191static int hf_icmpv6_opt_pvd_id_sequence_number;
192static int hf_icmpv6_opt_pvd_id_fqdn;
193static int hf_icmpv6_opt_map_dist;
194static int hf_icmpv6_opt_map_pref;
195static int hf_icmpv6_opt_map_flag;
196static int hf_icmpv6_opt_map_flag_r;
197static int hf_icmpv6_opt_map_flag_reserved;
198static int hf_icmpv6_opt_map_valid_lifetime;
199static int hf_icmpv6_opt_map_global_address;
200static int hf_icmpv6_opt_route_info_flag;
201static int hf_icmpv6_opt_route_info_flag_route_preference;
202static int hf_icmpv6_opt_route_info_flag_reserved;
203static int hf_icmpv6_opt_route_lifetime;
204static int hf_icmpv6_opt_name_type;
205static int hf_icmpv6_opt_name_x501;
206static int hf_icmpv6_opt_name_fqdn;
207static int hf_icmpv6_opt_cert_type;
208static int hf_icmpv6_x509if_Name;
209static int hf_icmpv6_x509af_Certificate;
210static int hf_icmpv6_opt_redirected_packet;
211static int hf_icmpv6_opt_mtu;
212static int hf_icmpv6_opt_nbma_shortcut_limit;
213static int hf_icmpv6_opt_advertisement_interval;
214static int hf_icmpv6_opt_home_agent_preference;
215static int hf_icmpv6_opt_home_agent_lifetime;
216static int hf_icmpv6_opt_ipv6_address;
217static int hf_icmpv6_opt_reserved;
218static int hf_icmpv6_opt_padding;
219static int hf_icmpv6_opt_rdnss_lifetime;
220static int hf_icmpv6_opt_rdnss;
221static int hf_icmpv6_opt_efo;
222static int hf_icmpv6_opt_efo_rsv;
223static int hf_icmpv6_opt_efo_pex;
224static int hf_icmpv6_opt_hkr_pad_length;
225static int hf_icmpv6_opt_hkr_at;
226static int hf_icmpv6_opt_hkr_reserved;
227static int hf_icmpv6_opt_hkr_encryption_public_key;
228static int hf_icmpv6_opt_hkr_padding;
229static int hf_icmpv6_opt_hkr_lifetime;
230static int hf_icmpv6_opt_hkr_encrypted_handover_key;
231static int hf_icmpv6_opt_hai_option_code;
232static int hf_icmpv6_opt_hai_length;
233static int hf_icmpv6_opt_hai_value;
234static int hf_icmpv6_opt_mn_option_code;
235static int hf_icmpv6_opt_mn_length;
236static int hf_icmpv6_opt_mn_value;
237static int hf_icmpv6_opt_dnssl_lifetime;
238static int hf_icmpv6_opt_dnssl;
239
240static int hf_icmpv6_opt_aro_status;
241static int hf_icmpv6_opt_earo_opaque;
242static int hf_icmpv6_opt_earo_flag;
243static int hf_icmpv6_opt_earo_flag_reserved;
244static int hf_icmpv6_opt_earo_flag_c;
245static int hf_icmpv6_opt_earo_flag_p;
246static int hf_icmpv6_opt_earo_flag_i;
247static int hf_icmpv6_opt_earo_flag_t;
248static int hf_icmpv6_opt_earo_flag_r;
249static int hf_icmpv6_opt_earo_tid;
250static int hf_icmpv6_opt_earo_rovr;
251static int hf_icmpv6_opt_earo_flag_f;
252static int hf_icmpv6_opt_earo_prefix_len;
253static int hf_icmpv6_opt_earo_reserved;
254static int hf_icmpv6_opt_aro_registration_lifetime;
255static int hf_icmpv6_opt_aro_eui64;
256static int hf_icmpv6_opt_6co_context_length;
257static int hf_icmpv6_opt_6co_flag;
258static int hf_icmpv6_opt_6co_flag_c;
259static int hf_icmpv6_opt_6co_flag_cid;
260static int hf_icmpv6_opt_6co_flag_reserved;
261static int hf_icmpv6_opt_6co_valid_lifetime;
262static int hf_icmpv6_opt_6co_context_prefix;
263static int hf_icmpv6_opt_abro_version_low;
264static int hf_icmpv6_opt_abro_version_high;
265static int hf_icmpv6_opt_abro_valid_lifetime;
266static int hf_icmpv6_opt_abro_6lbr_address;
267static int hf_icmpv6_opt_6cio_flag;
268static int hf_icmpv6_opt_6cio_flag_experimental;
269static int hf_icmpv6_opt_6cio_flag_x;
270static int hf_icmpv6_opt_6cio_flag_a;
271static int hf_icmpv6_opt_6cio_flag_d;
272static int hf_icmpv6_opt_6cio_flag_l;
273static int hf_icmpv6_opt_6cio_flag_b;
274static int hf_icmpv6_opt_6cio_flag_p;
275static int hf_icmpv6_opt_6cio_flag_e;
276static int hf_icmpv6_opt_6cio_flag_g;
277static int hf_icmpv6_opt_6cio_flag_f;
278static int hf_icmpv6_opt_6cio_flag_reserved;
279
280static int hf_icmpv6_opt_captive_portal;
281
282static int hf_icmpv6_opt_pref64_scaled_lifetime;
283static int hf_icmpv6_opt_pref64_plc;
284static int hf_icmpv6_opt_pref64_prefix;
285static int hf_icmpv6_opt_dnr_svcpriority;
286static int hf_icmpv6_opt_dnr_lifetime;
287static int hf_icmpv6_opt_dnr_auth_domain_name_len;
288static int hf_icmpv6_opt_dnr_auth_domain_name;
289static int hf_icmpv6_opt_dnr_addrs_len;
290static int hf_icmpv6_opt_dnr_addrs;
291static int hf_icmpv6_opt_dnr_addrs_ip;
292static int hf_icmpv6_opt_dnr_svc_params_len;
293static int hf_icmpv6_opt_dnr_padding;
294
295/* RFC 2710: Multicast Listener Discovery for IPv6 */
296static int hf_icmpv6_mld_mrd;
297static int hf_icmpv6_mld_multicast_address;
298
299/* RFC 2894: Router Renumbering for IPv6 */
300static int hf_icmpv6_rr_sequencenumber;
301static int hf_icmpv6_rr_segmentnumber;
302static int hf_icmpv6_rr_flag;
303static int hf_icmpv6_rr_flag_t;
304static int hf_icmpv6_rr_flag_r;
305static int hf_icmpv6_rr_flag_a;
306static int hf_icmpv6_rr_flag_s;
307static int hf_icmpv6_rr_flag_p;
308static int hf_icmpv6_rr_flag_rsv;
309static int hf_icmpv6_rr_maxdelay;
310static int hf_icmpv6_rr_pco_mp_part;
311static int hf_icmpv6_rr_pco_mp_opcode;
312static int hf_icmpv6_rr_pco_mp_oplength;
313static int hf_icmpv6_rr_pco_mp_ordinal;
314static int hf_icmpv6_rr_pco_mp_matchlen;
315static int hf_icmpv6_rr_pco_mp_minlen;
316static int hf_icmpv6_rr_pco_mp_maxlen;
317static int hf_icmpv6_rr_pco_mp_matchprefix;
318static int hf_icmpv6_rr_pco_up_part;
319static int hf_icmpv6_rr_pco_up_uselen;
320static int hf_icmpv6_rr_pco_up_keeplen;
321static int hf_icmpv6_rr_pco_up_flagmask;
322static int hf_icmpv6_rr_pco_up_flagmask_l;
323static int hf_icmpv6_rr_pco_up_flagmask_a;
324static int hf_icmpv6_rr_pco_up_flagmask_reserved;
325static int hf_icmpv6_rr_pco_up_raflags;
326static int hf_icmpv6_rr_pco_up_raflags_l;
327static int hf_icmpv6_rr_pco_up_raflags_a;
328static int hf_icmpv6_rr_pco_up_raflags_reserved;
329static int hf_icmpv6_rr_pco_up_validlifetime;
330static int hf_icmpv6_rr_pco_up_preferredlifetime;
331static int hf_icmpv6_rr_pco_up_flag;
332static int hf_icmpv6_rr_pco_up_flag_v;
333static int hf_icmpv6_rr_pco_up_flag_p;
334static int hf_icmpv6_rr_pco_up_flag_reserved;
335static int hf_icmpv6_rr_pco_up_useprefix;
336static int hf_icmpv6_rr_rm;
337static int hf_icmpv6_rr_rm_flag;
338static int hf_icmpv6_rr_rm_flag_b;
339static int hf_icmpv6_rr_rm_flag_f;
340static int hf_icmpv6_rr_rm_flag_reserved;
341static int hf_icmpv6_rr_rm_ordinal;
342static int hf_icmpv6_rr_rm_matchedlen;
343static int hf_icmpv6_rr_rm_interfaceindex;
344static int hf_icmpv6_rr_rm_matchedprefix;
345
346/* RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) for IPv6 */
347static int hf_icmpv6_mld_mrc;
348static int hf_icmpv6_mld_flag;
349static int hf_icmpv6_mld_flag_s;
350static int hf_icmpv6_mld_flag_qrv;
351static int hf_icmpv6_mld_flag_rsv;
352static int hf_icmpv6_mld_qqi;
353static int hf_icmpv6_mld_nb_sources;
354static int hf_icmpv6_mld_source_address;
355static int hf_icmpv6_mldr_nb_mcast_records;
356static int hf_icmpv6_mldr_mar;
357static int hf_icmpv6_mldr_mar_record_type;
358static int hf_icmpv6_mldr_mar_aux_data_len;
359static int hf_icmpv6_mldr_mar_nb_sources;
360static int hf_icmpv6_mldr_mar_multicast_address;
361static int hf_icmpv6_mldr_mar_source_address;
362static int hf_icmpv6_mldr_mar_auxiliary_data;
363
364/* RFC3775/6275: Mobility Support in IPv6 */
365static int hf_icmpv6_mip6_identifier;
366static int hf_icmpv6_mip6_home_agent_address;
367static int hf_icmpv6_mip6_flag;
368static int hf_icmpv6_mip6_flag_m;
369static int hf_icmpv6_mip6_flag_o;
370static int hf_icmpv6_mip6_flag_rsv;
371
372/* RFC3971: SEcure Neighbor Discovery (SEND) */
373static int hf_icmpv6_send_identifier;
374static int hf_icmpv6_send_all_components;
375static int hf_icmpv6_send_component;
376
377/* RFC 4068/5268/5568: Fast Handovers for Mobile IPv6 ( Mobile IPv6 Fast Handovers ) */
378static int hf_icmpv6_fmip6_subtype;
379static int hf_icmpv6_fmip6_hi_flag;
380static int hf_icmpv6_fmip6_hi_flag_s;
381static int hf_icmpv6_fmip6_hi_flag_u;
382static int hf_icmpv6_fmip6_hi_flag_reserved;
383static int hf_icmpv6_fmip6_identifier;
384
385/* RFC 4286: Multicast Router Discovery */
386static int hf_icmpv6_mcast_ra_query_interval;
387static int hf_icmpv6_mcast_ra_robustness_variable;
388
389/* RFC 4620: IPv6 Node Information Queries */
390static int hf_icmpv6_ni_qtype;
391static int hf_icmpv6_ni_flag;
392static int hf_icmpv6_ni_flag_g;
393static int hf_icmpv6_ni_flag_s;
394static int hf_icmpv6_ni_flag_l;
395static int hf_icmpv6_ni_flag_c;
396static int hf_icmpv6_ni_flag_a;
397static int hf_icmpv6_ni_flag_t;
398static int hf_icmpv6_ni_flag_rsv;
399static int hf_icmpv6_ni_nonce;
400static int hf_icmpv6_ni_query_subject_ipv6;
401static int hf_icmpv6_ni_query_subject_fqdn;
402static int hf_icmpv6_ni_query_subject_ipv4;
403static int hf_icmpv6_ni_reply_node_ttl;
404static int hf_icmpv6_ni_reply_node_name;
405static int hf_icmpv6_ni_reply_node_address;
406static int hf_icmpv6_ni_reply_ipv4_address;
407
408/* RFC 4884: Extended ICMP */
409static int hf_icmpv6_length;
410
411/* RPL: RFC 6550/6997/9009 : Routing and Discovery of P2P Routes in Low-Power and Lossy Networks. Efficient route invalidation. */
412static int hf_icmpv6_rpl_dis_flag;
413static int hf_icmpv6_rpl_dio_instance;
414static int hf_icmpv6_rpl_dio_version;
415static int hf_icmpv6_rpl_dio_rank;
416static int hf_icmpv6_rpl_dio_flag;
417static int hf_icmpv6_rpl_dio_flag_g;
418static int hf_icmpv6_rpl_dio_flag_0;
419static int hf_icmpv6_rpl_dio_flag_mop;
420static int hf_icmpv6_rpl_dio_flag_prf;
421static int hf_icmpv6_rpl_dio_dtsn;
422static int hf_icmpv6_rpl_dio_dagid;
423static int hf_icmpv6_rpl_dao_instance;
424static int hf_icmpv6_rpl_dao_flag;
425static int hf_icmpv6_rpl_dao_flag_k;
426static int hf_icmpv6_rpl_dao_flag_d;
427static int hf_icmpv6_rpl_dao_flag_rsv;
428static int hf_icmpv6_rpl_dao_sequence;
429static int hf_icmpv6_rpl_dao_dodagid;
430static int hf_icmpv6_rpl_daoack_instance;
431static int hf_icmpv6_rpl_daoack_flag;
432static int hf_icmpv6_rpl_daoack_flag_d;
433static int hf_icmpv6_rpl_daoack_flag_rsv;
434static int hf_icmpv6_rpl_daoack_sequence;
435static int hf_icmpv6_rpl_daoack_status;
436static int hf_icmpv6_rpl_daoack_dodagid;
437static int hf_icmpv6_rpl_dco_instance;
438static int hf_icmpv6_rpl_dco_flags;
439static int hf_icmpv6_rpl_dco_flag_k;
440static int hf_icmpv6_rpl_dco_flag_d;
441static int hf_icmpv6_rpl_dco_flag_rsv;
442static int hf_icmpv6_rpl_dco_status;
443static int hf_icmpv6_rpl_dco_sequence;
444static int hf_icmpv6_rpl_dco_dodagid;
445static int hf_icmpv6_rpl_dcoack_instance;
446static int hf_icmpv6_rpl_dcoack_flag;
447static int hf_icmpv6_rpl_dcoack_flag_d;
448static int hf_icmpv6_rpl_dcoack_flag_rsv;
449static int hf_icmpv6_rpl_dcoack_sequence;
450static int hf_icmpv6_rpl_dcoack_status;
451static int hf_icmpv6_rpl_dcoack_dodagid;
452static int hf_icmpv6_rpl_cc_instance;
453static int hf_icmpv6_rpl_cc_flag;
454static int hf_icmpv6_rpl_cc_flag_r;
455static int hf_icmpv6_rpl_cc_flag_rsv;
456static int hf_icmpv6_rpl_cc_nonce;
457static int hf_icmpv6_rpl_cc_dodagid;
458static int hf_icmpv6_rpl_cc_destination_counter;
459static int hf_icmpv6_rpl_secure_flag;
460static int hf_icmpv6_rpl_secure_flag_t;
461static int hf_icmpv6_rpl_secure_flag_rsv;
462static int hf_icmpv6_rpl_secure_algorithm;
463static int hf_icmpv6_rpl_secure_kim;
464static int hf_icmpv6_rpl_secure_lvl;
465static int hf_icmpv6_rpl_secure_rsv;
466static int hf_icmpv6_rpl_secure_counter;
467static int hf_icmpv6_rpl_secure_key_source;
468static int hf_icmpv6_rpl_secure_key_index;
469static int hf_icmpv6_rpl_opt;
470static int hf_icmpv6_rpl_opt_type;
471static int hf_icmpv6_rpl_opt_length;
472static int hf_icmpv6_rpl_opt_reserved;
473static int hf_icmpv6_rpl_opt_padn;
474static int hf_icmpv6_rpl_opt_metric_type;
475static int hf_icmpv6_rpl_opt_metric_flags;
476static int hf_icmpv6_rpl_opt_metric_reserved;
477static int hf_icmpv6_rpl_opt_metric_flag_p;
478static int hf_icmpv6_rpl_opt_metric_flag_c;
479static int hf_icmpv6_rpl_opt_metric_flag_o;
480static int hf_icmpv6_rpl_opt_metric_flag_r;
481static int hf_icmpv6_rpl_opt_metric_a;
482static int hf_icmpv6_rpl_opt_metric_prec;
483static int hf_icmpv6_rpl_opt_metric_len;
484static int hf_icmpv6_rpl_opt_metric_nsa_object;
485static int hf_icmpv6_rpl_opt_metric_nsa_object_reserved;
486static int hf_icmpv6_rpl_opt_metric_nsa_object_flags;
487static int hf_icmpv6_rpl_opt_metric_nsa_object_flag_a;
488static int hf_icmpv6_rpl_opt_metric_nsa_object_flag_o;
489static int hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object;
490static int hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_type;
491static int hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_length;
492static int hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_data;
493static int hf_icmpv6_rpl_opt_metric_ne_object;
494static int hf_icmpv6_rpl_opt_metric_ne_object_flags;
495static int hf_icmpv6_rpl_opt_metric_ne_object_flag_i;
496static int hf_icmpv6_rpl_opt_metric_ne_object_type;
497static int hf_icmpv6_rpl_opt_metric_ne_object_flag_e;
498static int hf_icmpv6_rpl_opt_metric_ne_object_energy;
499static int hf_icmpv6_rpl_opt_metric_hp_object;
500static int hf_icmpv6_rpl_opt_metric_hp_object_reserved;
501static int hf_icmpv6_rpl_opt_metric_hp_object_flags;
502static int hf_icmpv6_rpl_opt_metric_hp_object_hp;
503static int hf_icmpv6_rpl_opt_metric_lt_object_lt;
504static int hf_icmpv6_rpl_opt_metric_ll_object_ll;
505static int hf_icmpv6_rpl_opt_metric_lql_object;
506static int hf_icmpv6_rpl_opt_metric_lql_object_res;
507static int hf_icmpv6_rpl_opt_metric_lql_object_val;
508static int hf_icmpv6_rpl_opt_metric_lql_object_counter;
509static int hf_icmpv6_rpl_opt_metric_etx_object_etx;
510static int hf_icmpv6_rpl_opt_metric_lc_object;
511static int hf_icmpv6_rpl_opt_metric_lc_object_res;
512static int hf_icmpv6_rpl_opt_metric_lc_object_lc;
513static int hf_icmpv6_rpl_opt_metric_lc_object_counter;
514static int hf_icmpv6_rpl_opt_metric_lc_object_reserved;
515static int hf_icmpv6_rpl_opt_metric_lc_object_flag_i;
516static int hf_icmpv6_rpl_opt_route_prefix_length;
517static int hf_icmpv6_rpl_opt_route_flag;
518static int hf_icmpv6_rpl_opt_route_pref;
519static int hf_icmpv6_rpl_opt_route_reserved;
520static int hf_icmpv6_rpl_opt_route_lifetime;
521static int hf_icmpv6_rpl_opt_route_prefix;
522static int hf_icmpv6_rpl_opt_config_flag;
523static int hf_icmpv6_rpl_opt_config_reserved;
524static int hf_icmpv6_rpl_opt_config_auth;
525static int hf_icmpv6_rpl_opt_config_pcs;
526static int hf_icmpv6_rpl_opt_config_doublings;
527static int hf_icmpv6_rpl_opt_config_min_interval;
528static int hf_icmpv6_rpl_opt_config_redundancy;
529static int hf_icmpv6_rpl_opt_config_rank_incr;
530static int hf_icmpv6_rpl_opt_config_hop_rank_inc;
531static int hf_icmpv6_rpl_opt_config_ocp;
532static int hf_icmpv6_rpl_opt_config_rsv;
533static int hf_icmpv6_rpl_opt_config_def_lifetime;
534static int hf_icmpv6_rpl_opt_config_lifetime_unit;
535static int hf_icmpv6_rpl_opt_target_flag;
536static int hf_icmpv6_rpl_opt_target_prefix_length;
537static int hf_icmpv6_rpl_opt_target_prefix;
538static int hf_icmpv6_rpl_opt_transit_flag;
539static int hf_icmpv6_rpl_opt_transit_flag_e;
540static int hf_icmpv6_rpl_opt_transit_flag_i;
541static int hf_icmpv6_rpl_opt_transit_flag_rsv;
542static int hf_icmpv6_rpl_opt_transit_pathseq;
543static int hf_icmpv6_rpl_opt_transit_pathctl;
544static int hf_icmpv6_rpl_opt_transit_pathctl_pc1;
545static int hf_icmpv6_rpl_opt_transit_pathctl_pc2;
546static int hf_icmpv6_rpl_opt_transit_pathctl_pc3;
547static int hf_icmpv6_rpl_opt_transit_pathctl_pc4;
548static int hf_icmpv6_rpl_opt_transit_pathlifetime;
549static int hf_icmpv6_rpl_opt_transit_parent;
550static int hf_icmpv6_rpl_opt_solicited_instance;
551static int hf_icmpv6_rpl_opt_solicited_flag;
552static int hf_icmpv6_rpl_opt_solicited_flag_v;
553static int hf_icmpv6_rpl_opt_solicited_flag_i;
554static int hf_icmpv6_rpl_opt_solicited_flag_d;
555static int hf_icmpv6_rpl_opt_solicited_flag_rsv;
556static int hf_icmpv6_rpl_opt_solicited_dodagid;
557static int hf_icmpv6_rpl_opt_solicited_version;
558static int hf_icmpv6_rpl_opt_prefix;
559static int hf_icmpv6_rpl_opt_prefix_flag;
560static int hf_icmpv6_rpl_opt_prefix_flag_l;
561static int hf_icmpv6_rpl_opt_prefix_flag_a;
562static int hf_icmpv6_rpl_opt_prefix_flag_r;
563static int hf_icmpv6_rpl_opt_prefix_flag_rsv;
564static int hf_icmpv6_rpl_opt_prefix_vlifetime;
565static int hf_icmpv6_rpl_opt_prefix_plifetime;
566static int hf_icmpv6_rpl_opt_prefix_length;
567static int hf_icmpv6_rpl_opt_targetdesc;
568static int hf_icmpv6_rpl_opt_route_discovery_flag;
569static int hf_icmpv6_rpl_opt_route_discovery_reply;
570static int hf_icmpv6_rpl_opt_route_discovery_hop_by_hop;
571static int hf_icmpv6_rpl_opt_route_discovery_num_of_routes;
572static int hf_icmpv6_rpl_opt_route_discovery_compr;
573static int hf_icmpv6_rpl_opt_route_discovery_lifetime;
574static int hf_icmpv6_rpl_opt_route_discovery_nh;
575static int hf_icmpv6_rpl_opt_route_discovery_maxrank;
576static int hf_icmpv6_rpl_opt_route_discovery_target_addr;
577static int hf_icmpv6_rpl_opt_route_discovery_addr_vec;
578static int hf_icmpv6_rpl_opt_route_discovery_addr_vec_addr;
579static int hf_icmpv6_rpl_p2p_dro_instance;
580static int hf_icmpv6_rpl_p2p_dro_version;
581static int hf_icmpv6_rpl_p2p_dro_flag;
582static int hf_icmpv6_rpl_p2p_dro_flag_stop;
583static int hf_icmpv6_rpl_p2p_dro_flag_ack;
584static int hf_icmpv6_rpl_p2p_dro_flag_seq;
585static int hf_icmpv6_rpl_p2p_dro_flag_reserved;
586static int hf_icmpv6_rpl_p2p_dro_dagid;
587static int hf_icmpv6_rpl_p2p_droack_flag;
588static int hf_icmpv6_rpl_p2p_droack_flag_seq;
589static int hf_icmpv6_rpl_p2p_droack_flag_reserved;
590
591/* RFC6743 Locator Update (156) */
592static int hf_icmpv6_ilnp_nb_locs;
593static int hf_icmpv6_ilnp_locator;
594static int hf_icmpv6_ilnp_preference;
595static int hf_icmpv6_ilnp_lifetime;
596
597static int hf_icmpv6_da_code_prefix;
598static int hf_icmpv6_da_code_suffix;
599static int hf_icmpv6_dar_code_suffix;
600static int hf_icmpv6_dac_code_suffix;
601static int hf_icmpv6_da_status;
602static int hf_icmpv6_da_rsv;
603static int hf_icmpv6_da_lifetime;
604static int hf_icmpv6_da_rovr;
605static int hf_icmpv6_da_eui64;
606static int hf_icmpv6_da_raddr;
607
608static heur_dissector_list_t icmpv6_heur_subdissector_list;
609static int icmpv6_tap;
610
611/* RFC 7731 MPL (159) */
612static int hf_icmpv6_mpl_seed_info_min_sequence;
613static int hf_icmpv6_mpl_seed_info_bm_len;
614static int hf_icmpv6_mpl_seed_info_s;
615static int hf_icmpv6_mpl_seed_info_seed_id;
616static int hf_icmpv6_mpl_seed_info_sequence;
617
618/* Extended Echo - Probe (RFC8335)*/
619static int hf_icmpv6_ext_echo_seq_num;
620static int hf_icmpv6_ext_echo_req_reserved;
621static int hf_icmpv6_ext_echo_req_local;
622static int hf_icmpv6_ext_echo_rsp_state;
623static int hf_icmpv6_ext_echo_rsp_reserved;
624static int hf_icmpv6_ext_echo_rsp_active;
625static int hf_icmpv6_ext_echo_rsp_ipv4;
626static int hf_icmpv6_ext_echo_rsp_ipv6;
627
628/* Conversation related data */
629static int hf_icmpv6_resp_in;
630static int hf_icmpv6_resp_to;
631static int hf_icmpv6_no_resp;
632static int hf_icmpv6_resptime;
633
634typedef struct _icmpv6_conv_info_t {
635 wmem_tree_t *unmatched_pdus;
636 wmem_tree_t *matched_pdus;
637} icmpv6_conv_info_t;
638
639static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tree, uint32_t *key);
640static icmp_transaction_t *transaction_end(packet_info *pinfo, proto_tree *tree, uint32_t *key);
641
642static int ett_icmpv6;
643static int ett_icmpv6_opt;
644static int ett_icmpv6_mar;
645static int ett_icmpv6_flag_prefix;
646static int ett_icmpv6_flag_map;
647static int ett_icmpv6_flag_pvd_id;
648static int ett_icmpv6_flag_route_info;
649static int ett_icmpv6_flag_6lowpan;
650static int ett_icmpv6_flag_efo;
651static int ett_icmpv6_flag_earo;
652static int ett_icmpv6_rpl_opt;
653static int ett_icmpv6_rpl_metric_type;
654static int ett_icmpv6_rpl_metric_flags;
655static int ett_icmpv6_rpl_metric_nsa_object;
656static int ett_icmpv6_rpl_metric_nsa_object_tlv_type;
657static int ett_icmpv6_rpl_metric_ne_object;
658static int ett_icmpv6_rpl_metric_hp_object;
659static int ett_icmpv6_rpl_metric_lql_object;
660static int ett_icmpv6_rpl_metric_lc_object;
661static int ett_icmpv6_rpl_flag_routing;
662static int ett_icmpv6_rpl_flag_config;
663static int ett_icmpv6_rpl_flag_transit;
664static int ett_icmpv6_rpl_flag_solicited;
665static int ett_icmpv6_rpl_flag_prefix;
666static int ett_icmpv6_rpl_route_discovery_flag;
667static int ett_icmpv6_rpl_route_discovery_addr_vec;
668static int ett_icmpv6_rpl_transit_pathctl;
669static int ett_icmpv6_rpl_p2p_dro_flag;
670static int ett_icmpv6_rpl_p2p_droack_flag;
671static int ett_icmpv6_flag_ni;
672static int ett_icmpv6_flag_rr;
673static int ett_icmpv6_rr_mp;
674static int ett_icmpv6_rr_up;
675static int ett_icmpv6_rr_up_flag_mask;
676static int ett_icmpv6_rr_up_flag_ra;
677static int ett_icmpv6_rr_up_flag;
678static int ett_icmpv6_rr_rm;
679static int ett_icmpv6_rr_rm_flag;
680static int ett_icmpv6_flag_mld;
681static int ett_icmpv6_flag_ra;
682static int ett_icmpv6_flag_na;
683static int ett_icmpv6_flag_mip6;
684static int ett_icmpv6_flag_fmip6;
685static int ett_icmpv6_flag_secure;
686static int ett_icmpv6_flag_rpl_dio;
687static int ett_icmpv6_flag_rpl_dao;
688static int ett_icmpv6_flag_rpl_daoack;
689static int ett_icmpv6_flag_rpl_dco;
690static int ett_icmpv6_flag_rpl_dcoack;
691static int ett_icmpv6_flag_rpl_cc;
692static int ett_icmpv6_flag_6cio;
693static int ett_icmpv6_opt_name;
694static int ett_icmpv6_cga_param_name;
695static int ett_icmpv6_mpl_seed_info;
696static int ett_icmpv6_mpl_seed_info_bm;
697static int ett_icmpv6_opt_dnr_addrs;
698
699static expert_field ei_icmpv6_type_error;
700static expert_field ei_icmpv6_invalid_option_length;
701static expert_field ei_icmpv6_opt_dnr_adn_only_mode;
702static expert_field ei_icmpv6_undecoded_option;
703static expert_field ei_icmpv6_unknown_data;
704static expert_field ei_icmpv6_undecoded_rpl_option;
705static expert_field ei_icmpv6_undecoded_type;
706static expert_field ei_icmpv6_rr_pco_mp_matchlen;
707static expert_field ei_icmpv6_rr_pco_mp_matchedlen;
708static expert_field ei_icmpv6_checksum;
709static expert_field ei_icmpv6_resp_not_found;
710static expert_field ei_icmpv6_rpl_unknown_metric;
711static expert_field ei_icmpv6_rpl_p2p_hop_by_hop;
712static expert_field ei_icmpv6_rpl_p2p_num_of_routes;
713static expert_field ei_icmpv6_rpl_p2p_dro_rdo_zero;
714static expert_field ei_icmpv6_rpl_p2p_dro_zero;
715
716static dissector_handle_t icmpv6_handle;
717
718static dissector_handle_t ipv6_handle;
719static dissector_handle_t icmp_extension_handle;
720static dissector_handle_t svc_params_handle;
721
722/* Cached protocol identifier */
723static int proto_ieee802154;
724
725#define ICMP6_DST_UNREACH1 1
726#define ICMP6_PACKET_TOO_BIG2 2
727#define ICMP6_TIME_EXCEEDED3 3
728#define ICMP6_PARAM_PROB4 4
729#define ICMP6_ECHO_REQUEST128 128
730#define ICMP6_ECHO_REPLY129 129
731#define ICMP6_MEMBERSHIP_QUERY130 130
732#define ICMP6_MEMBERSHIP_REPORT131 131
733#define ICMP6_MEMBERSHIP_REDUCTION132 132
734#define ICMP6_ND_ROUTER_SOLICIT133 133
735#define ICMP6_ND_ROUTER_ADVERT134 134
736#define ICMP6_ND_NEIGHBOR_SOLICIT135 135
737#define ICMP6_ND_NEIGHBOR_ADVERT136 136
738#define ICMP6_ND_REDIRECT137 137
739#define ICMP6_ROUTER_RENUMBERING138 138
740#define ICMP6_NI_QUERY139 139
741#define ICMP6_NI_REPLY140 140
742#define ICMP6_IND_SOLICIT141 141
743#define ICMP6_IND_ADVERT142 142
744#define ICMP6_MLDV2_REPORT143 143
745#define ICMP6_MIP6_DHAAD_REQUEST144 144
746#define ICMP6_MIP6_DHAAD_REPLY145 145
747#define ICMP6_MIP6_MPS146 146
748#define ICMP6_MIP6_MPA147 147
749#define ICMP6_CERT_PATH_SOL148 148
750#define ICMP6_CERT_PATH_AD149 149
751#define ICMP6_EXPERIMENTAL_MOBILITY150 150
752#define ICMP6_MCAST_ROUTER_ADVERT151 151
753#define ICMP6_MCAST_ROUTER_SOLICIT152 152
754#define ICMP6_MCAST_ROUTER_TERM153 153
755#define ICMP6_FMIPV6_MESSAGES154 154
756#define ICMP6_RPL_CONTROL155 155
757#define ICMP6_ILNPV6156 156
758#define ICMP6_6LOWPANND_DAR157 157
759#define ICMP6_6LOWPANND_DAC158 158
760#define ICMP6_MPL_CONTROL159 159
761#define ICMP6_EXTECHO160 160
762#define ICMP6_EXTECHOREPLY161 161
763
764
765static const value_string icmpv6_type_val[] = {
766 { ICMP6_DST_UNREACH1, "Destination Unreachable" }, /* [RFC4443] */
767 { ICMP6_PACKET_TOO_BIG2, "Packet Too Big" }, /* [RFC4443] */
768 { ICMP6_TIME_EXCEEDED3, "Time Exceeded" }, /* [RFC4443] */
769 { ICMP6_PARAM_PROB4, "Parameter Problem" }, /* [RFC4443] */
770 { 100, "Private experimentation" }, /* [RFC4443] */
771 { 101, "Private experimentation" }, /* [RFC4443] */
772 { 127, "Reserved for expansion of ICMPv6 error messages" }, /* [RFC4443] */
773 { ICMP6_ECHO_REQUEST128, "Echo (ping) request" }, /* [RFC4443] */
774 { ICMP6_ECHO_REPLY129, "Echo (ping) reply" }, /* [RFC4443] */
775 { ICMP6_MEMBERSHIP_QUERY130, "Multicast Listener Query" }, /* [RFC2710] */
776 { ICMP6_MEMBERSHIP_REPORT131, "Multicast Listener Report" }, /* [RFC2710] */
777 { ICMP6_MEMBERSHIP_REDUCTION132, "Multicast Listener Done" }, /* [RFC2710] */
778 { ICMP6_ND_ROUTER_SOLICIT133, "Router Solicitation" }, /* [RFC4861] */
779 { ICMP6_ND_ROUTER_ADVERT134, "Router Advertisement" }, /* [RFC4861] */
780 { ICMP6_ND_NEIGHBOR_SOLICIT135, "Neighbor Solicitation" }, /* [RFC4861] */
781 { ICMP6_ND_NEIGHBOR_ADVERT136, "Neighbor Advertisement" }, /* [RFC4861] */
782 { ICMP6_ND_REDIRECT137, "Redirect" }, /* [RFC4861] */
783 { ICMP6_ROUTER_RENUMBERING138, "Router Renumbering" }, /* [RFC2894] */
784 { ICMP6_NI_QUERY139, "Node Information Query" }, /* [RFC4620] */
785 { ICMP6_NI_REPLY140, "Node Information Reply" }, /* [RFC4620] */
786 { ICMP6_IND_SOLICIT141, "Inverse Neighbor Discovery Solicitation" }, /* [RFC3122] */
787 { ICMP6_IND_ADVERT142, "Inverse Neighbor Discovery Advertisement" }, /* [RFC3122] */
788 { ICMP6_MLDV2_REPORT143, "Multicast Listener Report Message v2" }, /* [RFC3810] */
789 { ICMP6_MIP6_DHAAD_REQUEST144, "Home Agent Address Discovery Request" }, /* [RFC6275] */
790 { ICMP6_MIP6_DHAAD_REPLY145, "Home Agent Address Discovery Reply" }, /* [RFC6275] */
791 { ICMP6_MIP6_MPS146, "Mobile Prefix Solicitation" }, /* [RFC6275] */
792 { ICMP6_MIP6_MPA147, "Mobile Prefix Advertisement" }, /* [RFC6275] */
793 { ICMP6_CERT_PATH_SOL148, "Certification Path Solicitation" }, /* [RFC3971] */
794 { ICMP6_CERT_PATH_AD149, "Certification Path Advertisement" }, /* [RFC3971] */
795 { ICMP6_EXPERIMENTAL_MOBILITY150, "Experimental Mobility" }, /* [RFC4065] */
796 { ICMP6_MCAST_ROUTER_ADVERT151, "Multicast Router Advertisement" }, /* [RFC4286] */
797 { ICMP6_MCAST_ROUTER_SOLICIT152, "Multicast Router Solicitation" }, /* [RFC4286] */
798 { ICMP6_MCAST_ROUTER_TERM153, "Multicast Router Termination" }, /* [RFC4286] */
799 { ICMP6_FMIPV6_MESSAGES154, "FMIPv6" }, /* [RFC5568] */
800 { ICMP6_RPL_CONTROL155, "RPL Control" }, /* [RFC6550] */
801 { ICMP6_ILNPV6156, "Locator Update"}, /* [RFC6743] */
802 { ICMP6_6LOWPANND_DAR157, "Duplicate Address Request"}, /* [RFC6775] */
803 { ICMP6_6LOWPANND_DAC158, "Duplicate Address Confirmation"}, /* [RFC6775] */
804 { ICMP6_MPL_CONTROL159, "MPL Control Message"}, /* [RFC7731] */
805 { ICMP6_EXTECHO160, "Extended Echo request"}, /* [RFC8335] */
806 { ICMP6_EXTECHOREPLY161, "Extended Echo reply"}, /* [RFC8335] */
807 { 200, "Private experimentation" }, /* [RFC4443] */
808 { 201, "Private experimentation" }, /* [RFC4443] */
809 { 255, "Reserved for expansion of ICMPv6 informational messages" }, /* [RFC4443] */
810 { 0, NULL((void*)0) }
811};
812
813#define ICMP6_DST_UNREACH_NOROUTE0 0 /* no route to destination */
814#define ICMP6_DST_UNREACH_ADMIN1 1 /* administratively prohibited */
815#define ICMP6_DST_UNREACH_NOTNEIGHBOR2 2 /* not a neighbor(obsolete) */
816#define ICMP6_DST_UNREACH_BEYONDSCOPE2 2 /* beyond scope of source address */
817#define ICMP6_DST_UNREACH_ADDR3 3 /* address unreachable */
818#define ICMP6_DST_UNREACH_NOPORT4 4 /* port unreachable */
819#define ICMP6_DST_UNREACH_INGR_EGR5 5 /* source address failed ingress/egress policy */
820#define ICMP6_DST_UNREACH_REJECT6 6 /* reject route to destination */
821#define ICMP6_DST_UNREACH_ERROR7 7 /* error in Source Routing Header */
822#define ICMP6_DST_UNREACH_HEADERS_TOO_LONG8 8 /* headers too long */
823
824static const value_string icmpv6_unreach_code_val[] = {
825 { ICMP6_DST_UNREACH_NOROUTE0, "No route to destination" },
826 { ICMP6_DST_UNREACH_ADMIN1, "Administratively prohibited" },
827 { ICMP6_DST_UNREACH_BEYONDSCOPE2, "Beyond scope of source address" },
828 { ICMP6_DST_UNREACH_ADDR3, "Address unreachable" },
829 { ICMP6_DST_UNREACH_NOPORT4, "Port unreachable" },
830 { ICMP6_DST_UNREACH_INGR_EGR5, "Source address failed ingress/egress policy" },
831 { ICMP6_DST_UNREACH_REJECT6, "Reject route to destination" },
832 { ICMP6_DST_UNREACH_ERROR7, "Error in Source Routing Header" }, /* [RFC6550] [RFC6554] */
833 { ICMP6_DST_UNREACH_HEADERS_TOO_LONG8, "Headers too long" }, /* [RFC8883] */
834 { 0, NULL((void*)0) }
835};
836
837#define ICMP6_TIME_EXCEED_TRANSIT0 0 /* ttl==0 in transit */
838#define ICMP6_TIME_EXCEED_REASSEMBLY1 1 /* ttl==0 in reass */
839
840static const value_string icmpv6_timeex_code_val[] = {
841 { ICMP6_TIME_EXCEED_TRANSIT0, "Hop limit exceeded in transit" },
842 { ICMP6_TIME_EXCEED_REASSEMBLY1, "Fragment reassembly time exceeded" },
843 { 0, NULL((void*)0) }
844};
845
846#define ICMP6_PARAMPROB_HEADER0 0 /* erroneous header field */
847#define ICMP6_PARAMPROB_NEXTHEADER1 1 /* unrecognized next header */
848#define ICMP6_PARAMPROB_OPTION2 2 /* unrecognized option */
849#define ICMP6_PARAMPROB_FIRSTFRAG3 3 /* IPv6 First Fragment has incomplete IPv6 Header Chain [RFC 7112] */
850#define ICMP6_PARAMPROB_HEADERERROR4 4 /* SR Upper-layer Header Error [RFC8754] */
851#define ICMP6_PARAMPROB_NEXTHEADER_INTERMEDIATE5 5 /* Unrecognized Next Header type encountered by intermediate node [RFC8883] */
852#define ICMP6_PARAMPROB_HEADER_TOO_BIG6 6 /* Extension header too big [RFC8883] */
853#define ICMP6_PARAMPROB_HEADER_CHAIN_TOO_LONG7 7 /* Extension header chain too long [RFC8883] */
854#define ICMP6_PARAMPROB_TOO_MANY_EXTENTIONS8 8 /* Too many extension headers [RFC8883] */
855#define ICMP6_PARAMPROB_TOO_MANY_OPTIONS9 9 /* Too many options in extension header [RFC8883] */
856#define ICMP6_PARAMPROB_OPTION_TOO_BIG10 10 /* Option too big [RFC8883] */
857
858static const value_string icmpv6_paramprob_code_val[] = {
859 { ICMP6_PARAMPROB_HEADER0, "Erroneous header field encountered" },
860 { ICMP6_PARAMPROB_NEXTHEADER1, "Unrecognized Next Header type encountered" },
861 { ICMP6_PARAMPROB_OPTION2, "Unrecognized IPv6 option encountered" },
862 { ICMP6_PARAMPROB_FIRSTFRAG3, "IPv6 First Fragment has incomplete IPv6 Header Chain" },
863 { ICMP6_PARAMPROB_HEADERERROR4, "SR Upper-layer Header Error" },
864 { ICMP6_PARAMPROB_NEXTHEADER_INTERMEDIATE5, "Unrecognized Next Header type encountered by intermediate node" },
865 { ICMP6_PARAMPROB_HEADER_TOO_BIG6, "Extension header too big" },
866 { ICMP6_PARAMPROB_HEADER_CHAIN_TOO_LONG7, "Extension header chain too long" },
867 { ICMP6_PARAMPROB_TOO_MANY_EXTENTIONS8, "Too many extension headers" },
868 { ICMP6_PARAMPROB_TOO_MANY_OPTIONS9, "Too many options in extension header" },
869 { ICMP6_PARAMPROB_OPTION_TOO_BIG10, "Option too big" },
870 { 0, NULL((void*)0) }
871};
872
873
874/* RFC2894 - Router Renumbering for IPv6 */
875
876#define ICMP6_ROUTER_RENUMBERING_COMMAND0 0 /* rr command */
877#define ICMP6_ROUTER_RENUMBERING_RESULT1 1 /* rr result */
878#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET255 255 /* rr seq num reset */
879
880static const value_string icmpv6_rr_code_val[] = {
881 { ICMP6_ROUTER_RENUMBERING_COMMAND0, "Command" },
882 { ICMP6_ROUTER_RENUMBERING_RESULT1, "Result" },
883 { ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET255, "Sequence number reset" },
884 { 0, NULL((void*)0) }
885};
886
887#define RR_FLAG_T0x80 0x80
888#define RR_FLAG_R0x40 0x40
889#define RR_FLAG_A0x20 0x20
890#define RR_FLAG_S0x10 0x10
891#define RR_FLAG_P0x08 0x08
892#define RR_FLAG_RSV0x07 0x07
893
894static const value_string rr_pco_mp_opcode_val[] = {
895 { 1, "Add" },
896 { 2, "Change" },
897 { 3, "Set Global" },
898 { 0, NULL((void*)0) }
899};
900
901
902/* RFC3810 - Multicast Listener Discovery Version 2 (MLDv2) for IPv6 */
903
904#define MLDV2_PACKET_MINLEN28 28
905
906#define MLD_FLAG_S0x08 0x08
907#define MLD_FLAG_QRV0x07 0x07
908#define MLD_FLAG_RSV0xF0 0xF0
909
910static const value_string mldr_record_type_val[] = {
911 { 1, "Include" },
912 { 2, "Exclude" },
913 { 3, "Changed to include" },
914 { 4, "Changed to exclude" },
915 { 5, "Allow new sources" },
916 { 6, "Block old sources" },
917 { 0, NULL((void*)0) }
918};
919
920/* RFC 4068/5268/5568: Fast Handovers for Mobile IPv6 ( Mobile IPv6 Fast Handovers ) */
921
922#define FMIP6_SUBTYPE_RTSOLPR2 2
923#define FMIP6_SUBTYPE_PRRTADV3 3
924#define FMIP6_SUBTYPE_HI4 4
925#define FMIP6_SUBTYPE_HACK5 5
926
927static const value_string fmip6_subtype_val[] = {
928 { FMIP6_SUBTYPE_RTSOLPR2, "Router Solicitation for Proxy Advertisement" },
929 { FMIP6_SUBTYPE_PRRTADV3, "Proxy Router Advertisement" },
930 { FMIP6_SUBTYPE_HI4, "Handover Initiate" },
931 { FMIP6_SUBTYPE_HACK5, "Handover Acknowledge" },
932 { 0, NULL((void*)0) }
933};
934
935static const value_string fmip6_prrtadv_code_val[] = {
936 { 0, "MN should use AP-ID, AR-info tuple" },
937 { 1, "Network Initiated Handover trigger" },
938 { 2, "No new router information" },
939 { 3, "Limited new router information" },
940 { 4, "Unsolicited" },
941 { 0, NULL((void*)0) }
942};
943
944static const value_string fmip6_hi_code_val[] = {
945 { 0, "FBU sent from previous link" },
946 { 1, "FBU sent from new link" },
947 { 0, NULL((void*)0) }
948};
949
950static const value_string fmip6_hack_code_val[] = {
951 { 0, "Handover Accepted, NCoA valid" },
952 { 1, "Handover Accepted, NCoA not valid" },
953 { 2, "Handover Accepted, NCoA in use" },
954 { 3, "Handover Accepted, NCoA assigned" },
955 { 4, "Handover Accepted, NCoA not assigned" },
956 { 128, "Handover Not Accepted, reason unspecified" },
957 { 129, "Administratively prohibited" },
958 { 130, "Insufficient resources" },
959 { 0, NULL((void*)0) }
960};
961
962#define FMIP6_HI_FLAG_S0x80 0x80
963#define FMIP6_HI_FLAG_U0x40 0x40
964#define FMIP6_HI_FLAG_RSV0x3F 0x3F
965
966/* RFC 4620 - IPv6 Node Information Queries */
967
968#define ICMP6_NI_SUBJ_IPV60 0 /* Query Subject is an IPv6 address */
969#define ICMP6_NI_SUBJ_FQDN1 1 /* Query Subject is a Domain name */
970#define ICMP6_NI_SUBJ_IPV42 2 /* Query Subject is an IPv4 address */
971
972#define ICMP6_NI_SUCCESS0 0 /* node information successful reply */
973#define ICMP6_NI_REFUSED1 1 /* node information request is refused */
974#define ICMP6_NI_UNKNOWN2 2 /* unknown Qtype */
975
976#define NI_QTYPE_NOOP0 0 /* NOOP */
977#define NI_QTYPE_SUPTYPES1 1 /* Supported Qtypes (Obso) */
978#define NI_QTYPE_NODENAME2 2 /* Node Name */
979#define NI_QTYPE_NODEADDR3 3 /* Node Addresses */
980#define NI_QTYPE_IPV4ADDR4 4 /* IPv4 Addresses */
981
982static const value_string ni_query_code_val[] = {
983 { ICMP6_NI_SUBJ_IPV60, "Query subject = IPv6 addresses" },
984 { ICMP6_NI_SUBJ_FQDN1, "Query subject = DNS name or empty" },
985 { ICMP6_NI_SUBJ_IPV42, "Query subject = IPv4 addresses" },
986 { 0, NULL((void*)0) }
987};
988
989static const value_string ni_reply_code_val[] = {
990 { ICMP6_NI_SUCCESS0, "Successful" },
991 { ICMP6_NI_REFUSED1, "Refused" },
992 { ICMP6_NI_UNKNOWN2, "Unknown query type" },
993 { 0, NULL((void*)0) }
994};
995static const value_string ni_qtype_val[] = {
996 { NI_QTYPE_NOOP0, "NOOP" },
997 { NI_QTYPE_SUPTYPES1, "Supported query types (Obsolete)" },
998 { NI_QTYPE_NODENAME2, "Node Name" },
999 { NI_QTYPE_NODEADDR3, "Node addresses" },
1000 { NI_QTYPE_IPV4ADDR4, "IPv4 node addresses" },
1001 { 0, NULL((void*)0) }
1002};
1003
1004#define NI_FLAG_G0x0020 0x0020
1005#define NI_FLAG_S0x0010 0x0010
1006#define NI_FLAG_L0x0008 0x0008
1007#define NI_FLAG_C0x0004 0x0004
1008#define NI_FLAG_A0x0002 0x0002
1009#define NI_FLAG_T0x0001 0x0001
1010#define NI_FLAG_RSV0xFFC0 0xFFC0
1011
1012static const true_false_string tfs_ni_flag_a = {
1013 "All unicast address",
1014 "Unicast addresses on the queried interface"
1015};
1016
1017#define ND_OPT_SOURCE_LINKADDR1 1
1018#define ND_OPT_TARGET_LINKADDR2 2
1019#define ND_OPT_PREFIX_INFORMATION3 3
1020#define ND_OPT_REDIRECTED_HEADER4 4
1021#define ND_OPT_MTU5 5
1022#define ND_OPT_NBMA6 6
1023#define ND_OPT_ADVINTERVAL7 7
1024#define ND_OPT_HOMEAGENT_INFO8 8
1025#define ND_OPT_SOURCE_ADDRLIST9 9
1026#define ND_OPT_TARGET_ADDRLIST10 10
1027#define ND_OPT_CGA11 11
1028#define ND_OPT_RSA12 12
1029#define ND_OPT_TIMESTAMP13 13
1030#define ND_OPT_NONCE14 14
1031#define ND_OPT_TRUST_ANCHOR15 15
1032#define ND_OPT_CERTIFICATE16 16
1033#define ND_OPT_IP_ADDRESS_PREFIX17 17
1034#define ND_OPT_NEW_ROUTER_PREFIX_INFO18 18
1035#define ND_OPT_LINK_LAYER_ADDRESS19 19
1036#define ND_OPT_NEIGHBOR_ADV_ACK20 20
1037#define ND_OPT_PVD_ID21 21
1038#define ND_OPT_MAP23 23
1039#define ND_OPT_ROUTE_INFO24 24
1040#define ND_OPT_RECURSIVE_DNS_SERVER25 25
1041#define ND_OPT_FLAGS_EXTENSION26 26
1042#define ND_OPT_HANDOVER_KEY_REQUEST27 27
1043#define ND_OPT_HANDOVER_KEY_REPLY28 28
1044#define ND_OPT_HANDOVER_ASSIST_INFO29 29
1045#define ND_OPT_MOBILE_NODE_ID30 30
1046#define ND_OPT_DNS_SEARCH_LIST31 31
1047#define ND_OPT_PROXY_SIGNATURE32 32
1048#define ND_OPT_ADDR_REGISTRATION33 33
1049#define ND_OPT_6LOWPAN_CONTEXT34 34
1050#define ND_OPT_AUTH_BORDER_ROUTER35 35
1051#define ND_OPT_6CIO36 36
1052#define ND_OPT_CAPPORT37 37
1053#define ND_OPT_PREF6438 38
1054#define ND_OPT_CRYPTOID_PARAMETERS39 39
1055#define ND_OPT_NDP_SIGNATURE40 40
1056#define ND_OPT_RESOURCE_DIR_ADDRESS41 41
1057#define ND_OPT_CONSISTENT_UPTIME42 42
1058#define ND_OPT_ENCRYPTED_DNS144 144
1059
1060static const value_string option_vals[] = {
1061/* 1 */ { ND_OPT_SOURCE_LINKADDR1, "Source link-layer address" },
1062/* 2 */ { ND_OPT_TARGET_LINKADDR2, "Target link-layer address" },
1063/* 3 */ { ND_OPT_PREFIX_INFORMATION3, "Prefix information" },
1064/* 4 */ { ND_OPT_REDIRECTED_HEADER4, "Redirected header" },
1065/* 5 */ { ND_OPT_MTU5, "MTU" },
1066/* 6 */ { ND_OPT_NBMA6, "NBMA Shortcut Limit Option" }, /* [RFC2491] */
1067/* 7 */ { ND_OPT_ADVINTERVAL7, "Advertisement Interval" }, /* [RFC6275] */
1068/* 8 */ { ND_OPT_HOMEAGENT_INFO8, "Home Agent Information" }, /* [RFC6275] */
1069/* 9 */ { ND_OPT_SOURCE_ADDRLIST9, "Source Address List" }, /* [RFC3122] */
1070/* 10 */ { ND_OPT_TARGET_ADDRLIST10, "Target Address List" }, /* [RFC3122] */
1071/* 11 */ { ND_OPT_CGA11, "CGA" }, /* [RFC3971] */
1072/* 12 */ { ND_OPT_RSA12, "RSA Signature" }, /* [RFC3971] */
1073/* 13 */ { ND_OPT_TIMESTAMP13, "Timestamp" }, /* [RFC3971] */
1074/* 14 */ { ND_OPT_NONCE14, "Nonce" }, /* [RFC3971] */
1075/* 15 */ { ND_OPT_TRUST_ANCHOR15, "Trust Anchor" }, /* [RFC3971] */
1076/* 16 */ { ND_OPT_CERTIFICATE16, "Certificate" }, /* [RFC3971] */
1077/* 17 */ { ND_OPT_IP_ADDRESS_PREFIX17, "IP Address/Prefix Option" }, /* [RFC5568] */
1078/* 18 */ { ND_OPT_NEW_ROUTER_PREFIX_INFO18, "New Router Prefix Information" }, /* [RFC4068] OBSO */
1079/* 19 */ { ND_OPT_LINK_LAYER_ADDRESS19, "Link-layer Address" }, /* [RFC5568] */
1080/* 20 */ { ND_OPT_NEIGHBOR_ADV_ACK20, "Neighbor Advertisement Acknowledgment" }, /* [RFC5568] */
1081/* 21 */ { ND_OPT_PVD_ID21, "PvD ID" }, /* [RFC8801] */
1082/* 22 Unassigned */
1083/* 23 */ { ND_OPT_MAP23, "MAP" }, /* [RFC4140] */
1084/* 24 */ { ND_OPT_ROUTE_INFO24, "Route Information" }, /* [RFC4191] */
1085/* 25 */ { ND_OPT_RECURSIVE_DNS_SERVER25, "Recursive DNS Server" }, /* [RFC6106] */
1086/* 26 */ { ND_OPT_FLAGS_EXTENSION26, "RA Flags Extension" }, /* [RFC5175] */
1087/* 27 */ { ND_OPT_HANDOVER_KEY_REQUEST27, "Handover Key Request" }, /* [RFC5269] */
1088/* 28 */ { ND_OPT_HANDOVER_KEY_REPLY28, "Handover Key Reply" }, /* [RFC5269] */
1089/* 29 */ { ND_OPT_HANDOVER_ASSIST_INFO29, "Handover Assist Information" }, /* [RFC5271] */
1090/* 30 */ { ND_OPT_MOBILE_NODE_ID30, "Mobile Node Identifier Option" }, /* [RFC5271] */
1091/* 31 */ { ND_OPT_DNS_SEARCH_LIST31, "DNS Search List Option" }, /* [RFC6106] */
1092/* 32 */ { ND_OPT_PROXY_SIGNATURE32, "Proxy Signature (PS)" }, /* [RFC6496] */
1093/* 33 */ { ND_OPT_ADDR_REGISTRATION33, "Address Registration Option" }, /* [RFC6775] */
1094/* 34 */ { ND_OPT_6LOWPAN_CONTEXT34, "6LoWPAN Context Option" }, /* [RFC6775] */
1095/* 35 */ { ND_OPT_AUTH_BORDER_ROUTER35, "Authoritative Border Router" }, /* [RFC6775] */
1096/* 36 */ { ND_OPT_6CIO36, "6LoWPAN Capability Indication Option" }, /* [RFC7400] */
1097/* 37 */ { ND_OPT_CAPPORT37, "DHCP Captive-Portal" }, /* [RFC7710] */
1098/* 38 */ { ND_OPT_PREF6438, "PREF64 Option" }, /* [RFC8781] */
1099/* 39 */ { ND_OPT_CRYPTOID_PARAMETERS39, "Crypto-ID Parameters Option (CIPO)" }, /* [RFC8928] */
1100/* 40 */ { ND_OPT_NDP_SIGNATURE40, "NDP Signature Option (NDPSO)" }, /* [RFC8928] */
1101/* 41 */ { ND_OPT_RESOURCE_DIR_ADDRESS41, "Resource Directory Address Option" }, /* [RFC9176] */
1102/* 42 */ { ND_OPT_CONSISTENT_UPTIME42, "Consistent Uptime Option" }, /* [RFC-ietf-6lo-multicast-registration-19] */
1103/* 43-137 Unassigned */
1104 { 138, "CARD Request" }, /* [RFC4065] */
1105 { 139, "CARD Reply" }, /* [RFC4065] */
1106/* 140-143 Unassigned */
1107/* 144 */ { ND_OPT_ENCRYPTED_DNS144, "Encrypted DNS Option" }, /* [RFC9463] */
1108/* 145-252 Unassigned */
1109 { 253, "RFC3692-style Experiment 1" }, /* [RFC4727] */
1110 { 254, "RFC3692-style Experiment 2" }, /* [RFC4727] */
1111 { 0, NULL((void*)0) }
1112};
1113
1114#define ND_RA_FLAG_M0x80 0x80
1115#define ND_RA_FLAG_O0x40 0x40
1116#define ND_RA_FLAG_H0x20 0x20
1117#define ND_RA_FLAG_PRF0x18 0x18
1118#define ND_RA_FLAG_P0x04 0x04
1119#define ND_RA_FLAG_S0x02 0x02
1120#define ND_RA_FLAG_RSV0x01 0x01
1121
1122#define ND_NA_FLAG_R0x80000000 0x80000000
1123#define ND_NA_FLAG_S0x40000000 0x40000000
1124#define ND_NA_FLAG_O0x20000000 0x20000000
1125#define ND_NA_FLAG_RSV0x1FFFFFFF 0x1FFFFFFF
1126
1127static const value_string nd_flag_router_pref[] = {
1128 { 0, "Medium" },
1129 { 1, "High" },
1130 { 2, "Reserved" },
1131 { 3, "Low" },
1132 { 0, NULL((void*)0)}
1133};
1134
1135static const value_string nd_opt_ipa_option_code_val[] = {
1136 { 1, "Old Care-of Address" },
1137 { 2, "New Care-of Address" },
1138 { 3, "NAR's IP address" },
1139 { 4, "NAR's Prefix (sent in PrRtAdv)" },
1140 { 0, NULL((void*)0) }
1141};
1142
1143static const value_string nd_opt_lla_option_code_val[] = {
1144 { 0, "Wildcard" },
1145 { 1, "Link-layer Address of the New Access Point" },
1146 { 2, "Link-layer Address of the MN" },
1147 { 3, "Link-layer Address of the NAR" },
1148 { 4, "Link-layer Address of the source" },
1149 { 5, "The AP belongs to the current interface of the router" },
1150 { 6, "No prefix information available" },
1151 { 7, "No fast handovers support available" },
1152 { 0, NULL((void*)0) }
1153};
1154
1155static const value_string nd_opt_hai_option_code_val[] = {
1156 { 1, "Access Network Identifier (AN ID)" },
1157 { 2, "Sector ID" },
1158 { 0, NULL((void*)0) }
1159};
1160
1161static const value_string nd_opt_mn_option_code_val[] = {
1162 { 1, "NAI" },
1163 { 2, "IMSI" },
1164 { 0, NULL((void*)0) }
1165};
1166static const value_string nd_opt_naack_status_val[] = {
1167 { 1, "New CoA is invalid, perform address configuration" },
1168 { 2, "New CoA is invalid, use the supplied CoA" },
1169 { 3, "NCoA is invalid, use NAR's IP address as NCoA in FBU" },
1170 { 4, "PCoA supplied, do not send FBU" },
1171 { 128, "LLA is unrecognized" },
1172 { 0, NULL((void*)0) }
1173};
1174
1175static const value_string nd_opt_earo_status_val[] = {
1176 { 0, "Success" },
1177 { 1, "Duplicate Address" },
1178 { 2, "Neighbor Cache Full" },
1179 { 3, "Moved" },
1180 { 4, "Removed" },
1181 { 5, "Validation Requested" },
1182 { 6, "Duplicate Source Address" },
1183 { 7, "Invalid Source Address" },
1184 { 8, "Registered Address Topologically Incorrect" },
1185 { 9, "6LBR Registry Saturated" },
1186 { 10, "Validation Failed" },
1187 { 11, "Registration Refresh Request" },
1188 { 12, "Invalid Registration" },
1189 { 0, NULL((void*)0) }
1190};
1191
1192#define ND_OPT_EARO_FLAG_RESERVED0x80 0x80
1193#define ND_OPT_EARO_FLAG_C0x40 0x40
1194#define ND_OPT_EARO_FLAG_P0x30 0x30
1195#define ND_OPT_EARO_FLAG_I0x0C 0x0C
1196#define ND_OPT_EARO_FLAG_R0x02 0x02
1197#define ND_OPT_EARO_FLAG_T0x01 0x01
1198
1199static const value_string nd_opt_earo_p_val[] = {
1200 { 0, "Unicast Address" },
1201 { 1, "Multicast Address" },
1202 { 2, "Anycast Address" },
1203 { 3, "Unicast Prefix" },
1204 { 0, NULL((void*)0) }
1205};
1206
1207static const value_string nd_opt_earo_i_val[] = {
1208 { 0, "Default" },
1209 { 0, NULL((void*)0) }
1210};
1211
1212#define ND_OPT_6CO_FLAG_C0x10 0x10
1213#define ND_OPT_6CO_FLAG_CID0x0F 0x0F
1214#define ND_OPT_6CO_FLAG_RESERVED0xE0 0xE0
1215
1216static const value_string nd_opt_da_status_val[] = {
1217 { 0, "Success" },
1218 { 1, "Duplicate Address" },
1219 { 2, "Neighbor Cache Full" },
1220 { 0, NULL((void*)0) }
1221};
1222
1223#define ND_OPT_DA_DA0 0
1224#define ND_OPT_DA_EDA_641 1
1225#define ND_OPT_DA_EDA_1282 2
1226#define ND_OPT_DA_EDA_1923 3
1227#define ND_OPT_DA_EDA_2564 4
1228
1229static const value_string nd_opt_dar_code_suffix_val[] = {
1230 { ND_OPT_DA_DA0, "DAR message" },
1231 { ND_OPT_DA_EDA_641, "EDAR message with 64-bit ROVR field" },
1232 { ND_OPT_DA_EDA_1282, "EDAR message with 128-bit ROVR field" },
1233 { ND_OPT_DA_EDA_1923, "EDAR message with 192-bit ROVR field" },
1234 { ND_OPT_DA_EDA_2564, "EDAR message with 256-bit ROVR field" },
1235 { 0, NULL((void*)0) }
1236};
1237
1238static const value_string nd_opt_dac_code_suffix_val[] = {
1239 { ND_OPT_DA_DA0, "DAC message" },
1240 { ND_OPT_DA_EDA_641, "EDAC message with 64-bit ROVR field" },
1241 { ND_OPT_DA_EDA_1282, "EDAC message with 128-bit ROVR field" },
1242 { ND_OPT_DA_EDA_1923, "EDAC message with 192-bit ROVR field" },
1243 { ND_OPT_DA_EDA_2564, "EDAC message with 256-bit ROVR field" },
1244 { 0, NULL((void*)0) }
1245};
1246
1247static const value_string icmpv6_option_name_type_vals[] = {
1248 { 1, "DER Encoded X.501 Name" },
1249 { 2, "FQDN" },
1250 { 3, "SHA-1 Subject Key Identifier (SKI)" },
1251 { 4, "SHA-224 Subject Key Identifier (SKI)" },
1252 { 5, "SHA-256 Subject Key Identifier (SKI)" },
1253 { 6, "SHA-384 Subject Key Identifier (SKI)" },
1254 { 7, "SHA-512 Subject Key Identifier (SKI)" },
1255 { 253, "Reserved for Experimental Use" },
1256 { 254, "Reserved for Experimental Use" },
1257 { 255, "Reserved" },
1258 { 0, NULL((void*)0) }
1259};
1260
1261static const value_string icmpv6_option_cert_type_vals[] = {
1262 { 1, "X.509v3 Certificate" },
1263 { 0, NULL((void*)0) }
1264};
1265
1266/* RFC 4191: Default Router Preferences and More-Specific Routes */
1267
1268#define ND_RA_FLAG_RTPREF_MASK0x18 0x18 /* 00011000 */
1269#define ND_RA_FLAG_RESERV_MASK0xE7 0xE7 /* 11100111 */
1270
1271/* RFC 5175 : IPv6 Router Advertisement Flags Expansion Option */
1272#define FLAGS_EO_RSV0xFFFFFFFFFFFC 0xFFFFFFFFFFFC
1273#define FLAGS_EO_PEX0x000000000003 0x000000000003
1274
1275/* RFC 6275: Mobility Support in IPv6 */
1276#define FLAGS_MIP6_M0x8000 0x8000
1277#define FLAGS_MIP6_O0x4000 0x4000
1278#define FLAGS_MIP6_RSV0x3FFF 0x3FFF
1279
1280/* RPL: RFC 6550 : Routing over Low-Power and Lossy Networks. */
1281/* RPL ICMPv6 Codes */
1282#define ICMP6_RPL_DIS0x00 0x00 /* DODAG Information Solicitation */
1283#define ICMP6_RPL_DIO0x01 0x01 /* DODAG Information Object */
1284#define ICMP6_RPL_DAO0x02 0x02 /* Destination Advertisement Object */
1285#define ICMP6_RPL_DAOACK0x03 0x03 /* Destination Advertisement Object Ack */
1286#define ICMP6_RPL_DCO0x07 0x07 /* Destination Cleanup Object */
1287#define ICMP6_RPL_DCOACK0x08 0x08 /* Destination Cleanup Object Acknowledgement */
1288#define ICMP6_RPL_P2P_DRO0x04 0x04 /* P2P Discovery Reply Object */
1289#define ICMP6_RPL_P2P_DROACK0x05 0x05 /* P2P Discovery Reply Object Acknowledgement */
1290#define ICMP6_RPL_SDIS0x80 0x80 /* Secure DODAG Information Solicitation */
1291#define ICMP6_RPL_SDIO0x81 0x81 /* Secure DODAG Information Object */
1292#define ICMP6_RPL_SDAO0x82 0x82 /* Secure Destination Advertisement Object */
1293#define ICMP6_RPL_SDAOACK0x83 0x83 /* Secure Destination Advertisement Object Ack */
1294#define ICMP6_RPL_P2P_SDRO0x84 0x84 /* Secure P2P Discovery Reply Object */
1295#define ICMP6_RPL_P2P_SDROACK0x85 0x85 /* Secure P2P Discovery Reply Object Acknowledgement */
1296#define ICMP6_RPL_CC0x8A 0x8A /* Consistency Check */
1297
1298
1299/* RPL DIO Flags */
1300#define RPL_DIO_FLAG_G0x80 0x80
1301#define RPL_DIO_FLAG_00x40 0x40
1302#define RPL_DIO_FLAG_MOP0x38 0x38
1303#define RPL_DIO_FLAG_PRF0x07 0x07
1304
1305/* RPL DAO Flags */
1306#define RPL_DAO_FLAG_K0x80 0x80
1307#define RPL_DAO_FLAG_D0x40 0x40
1308#define RPL_DAO_FLAG_RESERVED0x3F 0x3F
1309
1310/* RPL DAO ACK Flags */
1311#define RPL_DAOACK_FLAG_D0x80 0x80
1312#define RPL_DAOACK_FLAG_RESERVED0x7F 0x7F
1313
1314/* RPL DCO Flags */
1315#define RPL_DCO_FLAG_K0x80 0x80
1316#define RPL_DCO_FLAG_D0x40 0x40
1317#define RPL_DCO_FLAG_RESERVED0x3F 0x3F
1318
1319/* RPL DCO ACK Flags */
1320#define RPL_DCOACK_FLAG_D0x80 0x80
1321#define RPL_DCOACK_FLAG_RESERVED0x7F 0x7F
1322
1323/* RPL CC Flags */
1324#define RPL_CC_FLAG_R0x80 0x80
1325#define RPL_CC_FLAG_RESERVED0x7F 0x7F
1326
1327/* RPL Secure */
1328#define ICMP6_RPL_SECURE0x80 0x80
1329
1330#define RPL_SECURE_FLAG_T0x80 0x80
1331#define RPL_SECURE_FLAG_RSV0x7F 0x7F
1332
1333#define RPL_SECURE_LVL0x07 0x07
1334#define RPL_SECURE_KIM0xC0 0xC0
1335#define RPL_SECURE_RSV0x38 0x38
1336
1337/* RPL P2P DRO Flags */
1338#define RPL_P2P_DRO_FLAG_S0x8000 0x8000
1339#define RPL_P2P_DRO_FLAG_A0x4000 0x4000
1340#define RPL_P2P_DRO_FLAG_SEQ0x3000 0x3000
1341#define RPL_P2P_DRO_FLAG_RSV0x0FFF 0x0FFF
1342
1343/* RPL P2P DROACK Flags */
1344#define RPL_P2P_DROACK_FLAG_SEQ0xc000 0xc000
1345#define RPL_P2P_DROACK_FLAG_RSV0x3FFF 0x3FFF
1346
1347/* RPL Option Bitfields */
1348#define RPL_OPT_PREFIX_FLAG_L0x80 0x80
1349#define RPL_OPT_PREFIX_FLAG_A0x40 0x40
1350#define RPL_OPT_PREFIX_FLAG_R0x20 0x20
1351#define RPL_OPT_PREFIX_FLAG_RSV0x1F 0x1F
1352#define RPL_OPT_ROUTE_PREFERENCE0x18 0x18
1353#define RPL_OPT_ROUTE_RESERVED0xE7 0xE7
1354#define RPL_OPT_CONFIG_FLAG_AUTH0x08 0x08
1355#define RPL_OPT_CONFIG_FLAG_PCS0x07 0x07
1356#define RPL_OPT_CONFIG_FLAG_RESERVED0xF0 0xF0
1357#define RPL_OPT_TRANSIT_FLAG_E0x80 0x80
1358#define RPL_OPT_TRANSIT_FLAG_I0x40 0x40
1359#define RPL_OPT_TRANSIT_FLAG_RSV0x3F 0x3F
1360#define RPL_OPT_TRANSIT_PATHCTL_PC10xC0 0xC0
1361#define RPL_OPT_TRANSIT_PATHCTL_PC20x30 0x30
1362#define RPL_OPT_TRANSIT_PATHCTL_PC30x0C 0x0C
1363#define RPL_OPT_TRANSIT_PATHCTL_PC40x03 0x03
1364#define RPL_OPT_SOLICITED_FLAG_V0x80 0x80
1365#define RPL_OPT_SOLICITED_FLAG_I0x40 0x40
1366#define RPL_OPT_SOLICITED_FLAG_D0x20 0x20
1367#define RPL_OPT_SOLICITED_FLAG_RSV0x1F 0x1F
1368#define RPL_OPT_ROUTE_DISCOVERY_R0x80 0x80
1369#define RPL_OPT_ROUTE_DISCOVERY_H0x40 0x40
1370#define RPL_OPT_ROUTE_DISCOVERY_N0x30 0x30
1371#define RPL_OPT_ROUTE_DISCOVERY_COMPR0x0F 0x0F
1372#define RPL_OPT_ROUTE_DISCOVERY_L0xC0 0xC0
1373#define RPL_OPT_ROUTE_DISCOVERY_MR_NH0x3F 0x3F
1374
1375/* RPL Metric Bitfields */
1376#define RPL_METRIC_RESERVED0xF800 0xF800
1377#define RPL_METRIC_FLAG_P0x0400 0x0400
1378#define RPL_METRIC_FLAG_C0x0200 0x0200
1379#define RPL_METRIC_FLAG_O0x0100 0x0100
1380#define RPL_METRIC_FLAG_R0x0080 0x0080
1381#define RPL_METRIC_A0x0070 0x0070
1382#define RPL_METRIC_PREC0x000F 0x000F
1383#define RPL_METRIC_NSA_OBJECT_RESERVED0xFF00 0xFF00
1384#define RPL_METRIC_NSA_OBJECT_FLAGS0x00FC 0x00FC
1385#define RPL_METRIC_NSA_OBJECT_FLAG_A0x0002 0x0002
1386#define RPL_METRIC_NSA_OBJECT_FLAG_O0x0001 0x0001
1387#define RPL_METRIC_NE_OBJECT_FLAGS0xF000 0xF000
1388#define RPL_METRIC_NE_OBJECT_FLAG_I0x0800 0x0800
1389#define RPL_METRIC_NE_OBJECT_TYPE0x0600 0x0600
1390#define RPL_METRIC_NE_OBJECT_FLAG_E0x0100 0x0100
1391#define RPL_METRIC_NE_OBJECT_ENERGY0x00FF 0x00FF
1392#define RPL_METRIC_HP_OBJECT_RESERVED0xF000 0xF000
1393#define RPL_METRIC_HP_OBJECT_FLAGS0x0F00 0x0F00
1394#define RPL_METRIC_HP_OBJECT_HP0x00FF 0x00FF
1395#define RPL_METRIC_LQL_OBJECT_RES0xFF 0xFF
1396#define RPL_METRIC_LQL_OBJECT_VAL0xE0 0xE0
1397#define RPL_METRIC_LQL_OBJECT_COUNTER0x1F 0x1F
1398#define RPL_METRIC_LC_OBJECT_RES0xFF 0xFF
1399#define RPL_METRIC_LC_OBJECT_LC0xFFC0 0xFFC0
1400#define RPL_METRIC_LC_OBJECT_COUNTER0x003F 0x003F
1401#define RPL_METRIC_LC_OBJECT_RESERVED0x003E 0x003E
1402#define RPL_METRIC_LC_OBJECT_FLAG_I0x0001 0x0001
1403
1404static const value_string rpl_dio_map_val[] = {
1405 { 0, "No Downward routes maintained by RPL" },
1406 { 1, "Non-Storing Mode of Operation" },
1407 { 2, "Storing Mode of Operation with no multicast support" },
1408 { 3, "Storing Mode of Operation with multicast support" },
1409 { 4, "P2P Route Discovery Mode of Operation" },
1410 { 0, NULL((void*)0) }
1411};
1412static const value_string rpl_code_val[] = {
1413 { ICMP6_RPL_DIS0x00, "DODAG Information Solicitation" },
1414 { ICMP6_RPL_DIO0x01, "DODAG Information Object" },
1415 { ICMP6_RPL_DAO0x02, "Destination Advertisement Object" },
1416 { ICMP6_RPL_DAOACK0x03, "Destination Advertisement Object Acknowledgment" },
1417 { ICMP6_RPL_DCO0x07, "Destination Cleanup Object" },
1418 { ICMP6_RPL_DCOACK0x08, "Destination Cleanup Object Acknowledgment" },
1419 { ICMP6_RPL_SDIS0x80, "Secure DODAG Information Solicitation" },
1420 { ICMP6_RPL_SDIO0x81, "Secure DODAG Information Object" },
1421 { ICMP6_RPL_SDAO0x82, "Secure Destination Advertisement Object" },
1422 { ICMP6_RPL_SDAOACK0x83, "Secure Destination Advertisement Object Acknowledgment" },
1423 { ICMP6_RPL_CC0x8A, "Consistency Check" },
1424 { ICMP6_RPL_P2P_DRO0x04, "P2P Discovery Reply Object" },
1425 { ICMP6_RPL_P2P_SDRO0x84, "P2P Secure Discovery Reply Object" },
1426 { ICMP6_RPL_P2P_DROACK0x05, "P2P Discovery Reply Object Acknowledgement" },
1427 { ICMP6_RPL_P2P_SDROACK0x85,"P2P Secure Discovery Reply Object Acknowledgement" },
1428 { 0, NULL((void*)0) }
1429};
1430
1431static const value_string rpl_secure_algorithm_vals[] = {
1432 { 0, "Encryption: CCM with AES-128 / Signature: RSA with SHA-256" },
1433 { 0, NULL((void*)0) }
1434};
1435
1436/* RPL Option Types */
1437/* Pending IANA Assignment */
1438#define RPL_OPT_PAD10 0 /* 1-byte padding */
1439#define RPL_OPT_PADN1 1 /* n-byte padding */
1440#define RPL_OPT_METRIC2 2 /* DAG metric container */
1441#define RPL_OPT_ROUTING3 3 /* Routing Information */
1442#define RPL_OPT_CONFIG4 4 /* DAG configuration */
1443#define RPL_OPT_TARGET5 5 /* RPL Target */
1444#define RPL_OPT_TRANSIT6 6 /* Transit */
1445#define RPL_OPT_SOLICITED7 7 /* Solicited Information */
1446#define RPL_OPT_PREFIX8 8 /* Destination prefix */
1447#define RPL_OPT_TARGETDESC9 9 /* RPL Target Descriptor */
1448#define RPL_OPT_ROUTE_DISCOVERY10 10 /* P2P Route Discovery */
1449
1450static const value_string rpl_option_vals[] = {
1451 { RPL_OPT_PAD10, "1-byte padding" },
1452 { RPL_OPT_PADN1, "n-byte padding" },
1453 { RPL_OPT_METRIC2, "DAG Metric container" },
1454 { RPL_OPT_ROUTING3, "Routing Information"},
1455 { RPL_OPT_CONFIG4, "DODAG configuration" },
1456 { RPL_OPT_TARGET5, "RPL Target" },
1457 { RPL_OPT_TRANSIT6, "Transit Information" },
1458 { RPL_OPT_SOLICITED7, "Solicited Information"},
1459 { RPL_OPT_PREFIX8, "Prefix Information"},
1460 { RPL_OPT_TARGETDESC9, "RPL Target Descriptor"},
1461 { RPL_OPT_ROUTE_DISCOVERY10, "P2P Route Discovery"},
1462 { 0, NULL((void*)0) }
1463};
1464
1465/* RPL Metric Types */
1466/* RFC 6551 */
1467#define RPL_METRIC_NSA1 1 /* Node State and Attribute */
1468#define RPL_METRIC_NE2 2 /* Node Energy */
1469#define RPL_METRIC_HP3 3 /* Hop Count */
1470#define RPL_METRIC_LT4 4 /* Link Throughput */
1471#define RPL_METRIC_LL5 5 /* Link Latency */
1472#define RPL_METRIC_LQL6 6 /* Link Quality Level */
1473#define RPL_METRIC_ETX7 7 /* Link ETX */
1474#define RPL_METRIC_LC8 8 /* Link Color */
1475
1476static const value_string rpl_metric_vals[] = {
1477 { RPL_METRIC_NSA1, "Node State and Attribute" },
1478 { RPL_METRIC_NE2, "Node Energy" },
1479 { RPL_METRIC_HP3, "Hop Count" },
1480 { RPL_METRIC_LT4, "Link Throughput" },
1481 { RPL_METRIC_LL5, "Link Latency" },
1482 { RPL_METRIC_LQL6, "Link Quality Level" },
1483 { RPL_METRIC_ETX7, "Link ETX" },
1484 { RPL_METRIC_LC8, "Link Color" },
1485 { 0, NULL((void*)0) }
1486};
1487
1488static const value_string rpl_ocp_vals[] = {
1489 { 0, "Objective Function Zero (OF0)" },
1490 { 1, "Minimum Rank with Hysteresis Objective Function (MRHOF)" },
1491 { 0, NULL((void*)0) }
1492};
1493
1494/* RFC 7400, 8505, 8928, 9685, 9926 */
1495#define ND_OPT_6CIO_FLAG_RESERVED0x00007FFFFFFF 0x00007FFFFFFF
1496#define ND_OPT_6CIO_FLAG_F0x000080000000 0x000080000000
1497#define ND_OPT_6CIO_FLAG_G0x000100000000 0x000100000000
1498#define ND_OPT_6CIO_FLAG_E0x000200000000 0x000200000000
1499#define ND_OPT_6CIO_FLAG_P0x000400000000 0x000400000000
1500#define ND_OPT_6CIO_FLAG_B0x000800000000 0x000800000000
1501#define ND_OPT_6CIO_FLAG_L0x001000000000 0x001000000000
1502#define ND_OPT_6CIO_FLAG_D0x002000000000 0x002000000000
1503#define ND_OPT_6CIO_FLAG_A0x004000000000 0x004000000000
1504#define ND_OPT_6CIO_FLAG_X0x008000000000 0x008000000000
1505#define ND_OPT_6CIO_FLAG_EXPERIMENTAL0xFF0000000000 0xFF0000000000
1506
1507/* RFC 7731 */
1508#define MPL_SEED_INFO_BM_LEN0xFC 0xFC
1509#define MPL_SEED_INFO_S0x03 0x03
1510static const value_string mpl_seed_id_lengths[] = {
1511 { 0, "0 bit, not included in MPL Seed Info" },
1512 { 1, "16 bits" },
1513 { 2, "64 bits" },
1514 { 3, "128 bits" },
1515 { 0, NULL((void*)0)}
1516};
1517static const uint8_t mpl_seed_id_code_to_length[] = { 0, 2, 8, 16 }; /* bytes */
1518
1519#define LIFETIME_INFINITY0xFFFFFFFF 0xFFFFFFFF
1520
1521static const value_string unique_infinity[] = {
1522 { LIFETIME_INFINITY0xFFFFFFFF, "Infinity" },
1523 { 0, NULL((void*)0)}
1524};
1525
1526static const value_string dnssl_infinity[] = {
1527 { 0, "DNSSL domain name MUST no longer be used" },
1528 { LIFETIME_INFINITY0xFFFFFFFF, "Infinity" },
1529 { 0, NULL((void*)0)}
1530};
1531
1532static const value_string rdnss_infinity[] = {
1533 { 0, "RDNSS address MUST no longer be used" },
1534 { LIFETIME_INFINITY0xFFFFFFFF, "Infinity" },
1535 { 0, NULL((void*)0)}
1536};
1537
1538static const value_string ext_echo_req_code_str[] = {
1539 { 0, "No error"},
1540 { 0, NULL((void*)0)}
1541};
1542
1543static const value_string ext_echo_reply_code_str[] = {
1544 { 0, "No error"},
1545 { 1, "Malformed Query"},
1546 { 2, "No Such Interface"},
1547 { 3, "No Such Table Entry"},
1548 { 4, "Multiple Interfaces Satisfy Query"},
1549 { 0, NULL((void*)0)}
1550 };
1551
1552static const value_string ext_echo_reply_state_str[] = {
1553 { 0, "Reserved"},
1554 { 1, "Incomplete"},
1555 { 2, "Reachable"},
1556 { 3, "Stale"},
1557 { 4, "Delay"},
1558 { 5, "Probe"},
1559 { 6, "Failed"},
1560 { 0, NULL((void*)0)}
1561 };
1562
1563
1564/* RFC 8781 */
1565#define ND_OPT_PREF64_SL0xFFF8 0xFFF8
1566#define ND_OPT_PREF64_PLC0x0007 0x0007
1567
1568static const value_string pref64_plc_str[] = {
1569 { 0, "96 bits prefix length"},
1570 { 1, "64 bits prefix length"},
1571 { 2, "56 bits prefix length"},
1572 { 3, "48 bits prefix length"},
1573 { 4, "40 bits prefix length"},
1574 { 5, "32 bits prefix length"},
1575 { 0, NULL((void*)0)}
1576 };
1577
1578/* whenever a ICMPv6 packet is seen by the tap listener */
1579/* Add a new frame into the graph */
1580static tap_packet_status
1581icmpv6_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U___attribute__((unused)), const void *dummy _U___attribute__((unused)), tap_flags_t flags _U___attribute__((unused)))
1582{
1583 seq_analysis_info_t *sainfo = (seq_analysis_info_t *) ptr;
1584 seq_analysis_item_t *sai = sequence_analysis_create_sai_with_addresses(pinfo, sainfo);
1585
1586 if (!sai)
1587 return TAP_PACKET_DONT_REDRAW;
1588
1589 sai->frame_number = pinfo->num;
1590
1591 sequence_analysis_use_color_filter(pinfo, sai);
1592
1593 sai->port_src=pinfo->srcport;
1594 sai->port_dst=pinfo->destport;
1595
1596 sequence_analysis_use_col_info_as_label_comment(pinfo, sai);
1597
1598 if (pinfo->ptype == PT_NONE) {
1599 icmp_info_t *p_icmp_info = (icmp_info_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_icmpv6, 0);
1600
1601 if (p_icmp_info != NULL((void*)0)) {
1602 sai->port_src = 0;
1603 sai->port_dst = p_icmp_info->type * 256 + p_icmp_info->code;
1604 }
1605 }
1606
1607 sai->line_style = 1;
1608 sai->conv_num = 0;
1609 sai->display = true1;
1610
1611 g_queue_push_tail(sainfo->items, sai);
1612
1613 return TAP_PACKET_REDRAW;
1614}
1615
1616
1617static int
1618dissect_contained_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1619{
1620 bool_Bool save_in_error_pkt;
1621 int offset;
1622
1623 /* Save the current value of the "we're inside an error packet"
1624 flag, and set that flag; subdissectors may treat packets
1625 that are the payload of error packets differently from
1626 "real" packets. */
1627 save_in_error_pkt = pinfo->flags.in_error_pkt;
1628 pinfo->flags.in_error_pkt = true1;
1629
1630 /* tiny sanity check */
1631 if ((tvb_get_uint8(tvb, 0) & 0xf0) == 0x60) {
1632 /* The contained packet is an IPv6 datagram; dissect it. */
1633 offset = call_dissector(ipv6_handle, tvb, pinfo, tree);
1634 } else {
1635 offset = call_data_dissector(tvb, pinfo, tree);
1636 }
1637
1638 /* Restore the "we're inside an error packet" flag. */
1639 pinfo->flags.in_error_pkt = save_in_error_pkt;
1640
1641 return offset;
1642}
1643
1644
1645/* ======================================================================= */
1646static conversation_t *_find_or_create_conversation(packet_info *pinfo)
1647{
1648 conversation_t *conv = NULL((void*)0);
1649
1650 /* Have we seen this conversation before? */
1651 conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
1652 conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0);
1653 if (conv == NULL((void*)0)) {
1654 /* No, this is a new conversation. */
1655 conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst,
1656 conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0);
1657 }
1658 return conv;
1659}
1660
1661/* ======================================================================= */
1662/*
1663 Note: We are tracking conversations via these keys:
1664
1665 0 1 2 3
1666 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1667 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1668 | |G| Checksum |
1669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1670 | Identifier | Sequence Number |
1671 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1672 | VLAN ID |
1673 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1674*/
1675static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tree, uint32_t *key)
1676{
1677 conversation_t *conversation;
1678 icmpv6_conv_info_t *icmpv6_info;
1679 icmp_transaction_t *icmpv6_trans;
1680 wmem_tree_key_t icmpv6_key[3];
1681 proto_item *it;
1682
1683 /* Handle the conversation tracking */
1684 conversation = _find_or_create_conversation(pinfo);
1685 icmpv6_info = (icmpv6_conv_info_t *)conversation_get_proto_data(conversation, proto_icmpv6);
1686 if (icmpv6_info == NULL((void*)0)) {
1687 icmpv6_info = wmem_new(wmem_file_scope(), icmpv6_conv_info_t)((icmpv6_conv_info_t*)wmem_alloc((wmem_file_scope()), sizeof(
icmpv6_conv_info_t)))
;
1688 icmpv6_info->unmatched_pdus = wmem_tree_new(wmem_file_scope());
1689 icmpv6_info->matched_pdus = wmem_tree_new(wmem_file_scope());
1690 conversation_add_proto_data(conversation, proto_icmpv6, icmpv6_info);
1691 }
1692
1693 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
1694 /*
1695 * This is a new request, create a new transaction structure and map it
1696 * to the unmatched table.
1697 */
1698 icmpv6_key[0].length = 3;
1699 icmpv6_key[0].key = key;
1700 icmpv6_key[1].length = 0;
1701 icmpv6_key[1].key = NULL((void*)0);
1702
1703 icmpv6_trans = wmem_new(wmem_file_scope(), icmp_transaction_t)((icmp_transaction_t*)wmem_alloc((wmem_file_scope()), sizeof(
icmp_transaction_t)))
;
1704 icmpv6_trans->rqst_frame = pinfo->num;
1705 icmpv6_trans->resp_frame = 0;
1706 icmpv6_trans->rqst_time = pinfo->abs_ts;
1707 nstime_set_zero(&icmpv6_trans->resp_time);
1708 wmem_tree_insert32_array(icmpv6_info->unmatched_pdus, icmpv6_key, (void *)icmpv6_trans);
1709 } else {
1710 /* Already visited this frame */
1711 uint32_t frame_num = pinfo->num;
1712
1713 icmpv6_key[0].length = 3;
1714 icmpv6_key[0].key = key;
1715 icmpv6_key[1].length = 1;
1716 icmpv6_key[1].key = &frame_num;
1717 icmpv6_key[2].length = 0;
1718 icmpv6_key[2].key = NULL((void*)0);
1719
1720 icmpv6_trans = (icmp_transaction_t *)wmem_tree_lookup32_array(icmpv6_info->matched_pdus, icmpv6_key);
1721 }
1722
1723 if (icmpv6_trans == NULL((void*)0)) {
1724 if (pinfo->dst.type == AT_IPv6 &&
1725 in6_addr_is_multicast((const ws_in6_addr *)pinfo->dst.data)) {
1726 /* XXX We should support multicast echo requests, but we don't currently */
1727 /* Note the multicast destination and skip transaction tracking */
1728 col_append_str(pinfo->cinfo, COL_INFO, " (multicast)");
1729 } else if (PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
1730 /* No response found - add field and expert info */
1731 it = proto_tree_add_item(tree, hf_icmpv6_no_resp, NULL((void*)0), 0, 0,
1732 ENC_NA0x00000000);
1733 proto_item_set_generated(it);
1734
1735 col_append_str(pinfo->cinfo, COL_INFO, " (no response found!)");
1736
1737 /* Expert info. TODO: add to _icmp_transaction_t type and sequence number
1738 so can report here (and in taps) */
1739 expert_add_info_format(pinfo, it, &ei_icmpv6_resp_not_found,
1740 "No response seen to ICMPv6 request in frame %u",
1741 pinfo->num);
1742 }
1743
1744 return NULL((void*)0);
1745 }
1746
1747 /* Print state tracking in the tree */
1748 if (icmpv6_trans->resp_frame) {
1749 if (tree) {
1750 it = proto_tree_add_uint(tree, hf_icmpv6_resp_in, NULL((void*)0), 0, 0,
1751 icmpv6_trans->resp_frame);
1752 proto_item_set_generated(it);
1753 }
1754 col_append_frame_number(pinfo, COL_INFO, " (reply in %d)", icmpv6_trans->resp_frame);
1755 }
1756
1757 return icmpv6_trans;
1758
1759} /* transaction_start() */
1760
1761/* ======================================================================= */
1762static icmp_transaction_t *transaction_end(packet_info *pinfo, proto_tree *tree, uint32_t *key)
1763{
1764 conversation_t *conversation;
1765 icmpv6_conv_info_t *icmpv6_info;
1766 icmp_transaction_t *icmpv6_trans;
1767 wmem_tree_key_t icmpv6_key[3];
1768 proto_item *it;
1769 nstime_t ns;
1770 double resp_time;
1771
1772 conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
1773 conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0);
1774 if (conversation == NULL((void*)0))
1775 return NULL((void*)0);
1776
1777 icmpv6_info = (icmpv6_conv_info_t *)conversation_get_proto_data(conversation, proto_icmpv6);
1778 if (icmpv6_info == NULL((void*)0))
1779 return NULL((void*)0);
1780
1781 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
1782 uint32_t frame_num;
1783
1784 icmpv6_key[0].length = 3;
1785 icmpv6_key[0].key = key;
1786 icmpv6_key[1].length = 0;
1787 icmpv6_key[1].key = NULL((void*)0);
1788
1789 icmpv6_trans = (icmp_transaction_t *)wmem_tree_lookup32_array(icmpv6_info->unmatched_pdus, icmpv6_key);
1790 if (icmpv6_trans == NULL((void*)0))
1791 return NULL((void*)0);
1792
1793 /* we have already seen this response, or an identical one */
1794 if (icmpv6_trans->resp_frame != 0)
1795 return NULL((void*)0);
1796
1797 icmpv6_trans->resp_frame = pinfo->num;
1798
1799 /*
1800 * we found a match. Add entries to the matched table for both
1801 * request and reply frames
1802 */
1803 icmpv6_key[0].length = 3;
1804 icmpv6_key[0].key = key;
1805 icmpv6_key[1].length = 1;
1806 icmpv6_key[1].key = &frame_num;
1807 icmpv6_key[2].length = 0;
1808 icmpv6_key[2].key = NULL((void*)0);
1809
1810 frame_num = icmpv6_trans->rqst_frame;
1811 wmem_tree_insert32_array(icmpv6_info->matched_pdus, icmpv6_key, (void *)icmpv6_trans);
1812
1813 frame_num = icmpv6_trans->resp_frame;
1814 wmem_tree_insert32_array(icmpv6_info->matched_pdus, icmpv6_key, (void *)icmpv6_trans);
1815 } else {
1816 /* Already visited this frame */
1817 uint32_t frame_num = pinfo->num;
1818
1819 icmpv6_key[0].length = 3;
1820 icmpv6_key[0].key = key;
1821 icmpv6_key[1].length = 1;
1822 icmpv6_key[1].key = &frame_num;
1823 icmpv6_key[2].length = 0;
1824 icmpv6_key[2].key = NULL((void*)0);
1825
1826 icmpv6_trans = (icmp_transaction_t *)wmem_tree_lookup32_array(icmpv6_info->matched_pdus, icmpv6_key);
1827 if (icmpv6_trans == NULL((void*)0))
1828 return NULL((void*)0);
1829 }
1830
1831 /* Print state tracking in the tree */
1832 if (tree) {
1833 it = proto_tree_add_uint(tree, hf_icmpv6_resp_to, NULL((void*)0), 0, 0,
1834 icmpv6_trans->rqst_frame);
1835 proto_item_set_generated(it);
1836 }
1837
1838 nstime_delta(&ns, &pinfo->abs_ts, &icmpv6_trans->rqst_time);
1839 icmpv6_trans->resp_time = ns;
1840 if (tree) {
1841 resp_time = nstime_to_msec(&ns);
1842 it = proto_tree_add_double_format_value(tree, hf_icmpv6_resptime, NULL((void*)0),
1843 0, 0, resp_time, "%.3f ms", resp_time);
1844 proto_item_set_generated(it);
1845 }
1846
1847 col_append_frame_number(pinfo, COL_INFO, " (request in %d)",
1848 icmpv6_trans->rqst_frame);
1849
1850 return icmpv6_trans;
1851
1852} /* transaction_end() */
1853
1854// This is recursive, but we'll run out of PDU before we'll run out of stack.
1855// NOLINTNEXTLINE(misc-no-recursion)
1856static unsigned dissect_icmpv6_nd_opt(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree, uint8_t icmpv6_type)
1857{
1858 proto_tree *icmp6opt_tree;
1859 proto_item *ti, *ti_opt, *ti_opt_len;
1860 uint8_t opt_type;
1861 unsigned opt_len;
1862 unsigned opt_offset;
1863 tvbuff_t *opt_tvb;
1864 unsigned used_bytes;
1865
1866 while (tvb_reported_length(tvb) > offset) {
1867 /* there are more options */
1868
1869 /* ICMPv6 Option */
1870 opt_len = tvb_get_uint8(tvb, offset + 1) * 8;
1871 ti = proto_tree_add_item(tree, hf_icmpv6_opt, tvb, offset, opt_len, ENC_NA0x00000000);
1872 icmp6opt_tree = proto_item_add_subtree(ti, ett_icmpv6_opt);
1873 opt_offset = offset;
1874
1875 /* Option type */
1876 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_type, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
1877 opt_type = tvb_get_uint8(tvb, opt_offset);
1878 opt_offset += 1;
1879
1880 /* Add option name to option root label */
1881 proto_item_append_text(ti, " (%s", val_to_str(pinfo->pool, opt_type, option_vals, "Unknown %d"));
1882
1883 /* Option length */
1884 ti_opt_len = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_length, tvb,opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
1885 opt_offset += 1;
1886
1887 /* Add length value in bytes */
1888 proto_item_append_text(ti_opt_len, " (%i bytes)", opt_len);
1889
1890 if(opt_len == 0){
1891 expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "Invalid option length (Zero)");
1892 return opt_offset;
1893 }
1894
1895 /* decode... */
1896 switch (opt_type) {
1897 case ND_OPT_SOURCE_LINKADDR1: /* Source Link-layer Address (1) */
1898 {
1899 const char *link_str;
1900 /* if the opt len is 8, the Link Addr is MAC Address */
1901 if(opt_len == 8){
1902 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr_mac, tvb, opt_offset, 6, ENC_NA0x00000000);
1903 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_src_linkaddr_mac, tvb, opt_offset, 6, ENC_NA0x00000000);
1904 proto_item_set_hidden(ti_opt);
1905
1906 link_str = tvb_ether_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_ETHER, opt_offset);
1907 col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", link_str);
1908 proto_item_append_text(ti, " : %s", link_str);
1909 /* if the opt len is 16 and the 6 last bytes is 0n the Link Addr is EUI64 Address */
1910 }else if(opt_len == 16 && tvb_get_ntohl(tvb, opt_offset + 8) == 0 && tvb_get_ntohs(tvb, opt_offset + 12) == 0){
1911 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr_eui64, tvb, opt_offset, 8, ENC_BIG_ENDIAN0x00000000);
1912 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_src_linkaddr_eui64, tvb, opt_offset, 8, ENC_BIG_ENDIAN0x00000000);
1913 proto_item_set_hidden(ti_opt);
1914 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr, tvb, opt_offset, 8, ENC_NA0x00000000);
1915 proto_item_set_hidden(ti_opt);
1916 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_src_linkaddr, tvb, opt_offset, 8, ENC_NA0x00000000);
1917 proto_item_set_hidden(ti_opt);
1918
1919 /* Padding: 6 bytes */
1920 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset + 8, 6, ENC_NA0x00000000);
1921
1922 link_str = tvb_address_to_str(pinfo->pool, tvb, AT_EUI64, opt_offset);
1923 col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", link_str);
1924 proto_item_append_text(ti, " : %s", link_str);
1925 }else{
1926 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr, tvb, opt_offset, opt_len-2, ENC_NA0x00000000);
1927 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_src_linkaddr, tvb, opt_offset, opt_len-2, ENC_NA0x00000000);
1928 proto_item_set_hidden(ti_opt);
1929 }
1930 opt_offset += opt_len;
1931
1932 break;
1933 }
1934 case ND_OPT_TARGET_LINKADDR2: /* Target Link-layer Address (2) */
1935 {
1936 const char *link_str;
1937 /* if the opt len is 8, the Link Addr is MAC Address */
1938 if(opt_len == 8){
1939 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr_mac, tvb, opt_offset, 6, ENC_NA0x00000000);
1940 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_target_linkaddr_mac, tvb, opt_offset, 6, ENC_NA0x00000000);
1941 proto_item_set_hidden(ti_opt);
1942
1943 link_str = tvb_ether_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_ETHER, opt_offset);
1944 col_append_fstr(pinfo->cinfo, COL_INFO, " is at %s", link_str);
1945 proto_item_append_text(ti, " : %s", link_str);
1946
1947 /* if the opt len is 16 and the 6 last bytes is 0n the Link Addr is EUI64 Address */
1948 }else if(opt_len == 16 && tvb_get_ntohl(tvb, opt_offset + 8) == 0 && tvb_get_ntohs(tvb, opt_offset + 12) == 0){
1949 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr_eui64, tvb, opt_offset, 8, ENC_BIG_ENDIAN0x00000000);
1950 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_target_linkaddr_eui64, tvb, opt_offset, 8, ENC_BIG_ENDIAN0x00000000);
1951 proto_item_set_hidden(ti_opt);
1952
1953 /* Padding: 6 bytes */
1954 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset + 8, 6, ENC_NA0x00000000);
1955
1956 link_str = tvb_address_to_str(pinfo->pool, tvb, AT_EUI64, opt_offset);
1957 col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", link_str);
1958 proto_item_append_text(ti, " : %s", link_str);
1959 }else{
1960 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_linkaddr, tvb, opt_offset, opt_len-2, ENC_NA0x00000000);
1961 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_target_linkaddr, tvb, opt_offset, opt_len-2, ENC_NA0x00000000);
1962 proto_item_set_hidden(ti_opt);
1963 }
1964 opt_offset += opt_len;
1965 break;
1966 }
1967 case ND_OPT_PREFIX_INFORMATION3: /* Prefix Information (3) */
1968 {
1969 static int * const prefix_flag[] = {
1970 &hf_icmpv6_opt_prefix_flag_l,
1971 &hf_icmpv6_opt_prefix_flag_a,
1972 &hf_icmpv6_opt_prefix_flag_r,
1973 &hf_icmpv6_opt_prefix_flag_p,
1974 &hf_icmpv6_opt_prefix_flag_reserved,
1975 NULL((void*)0)
1976 };
1977
1978 uint32_t lifetime;
1979 uint8_t prefix_len;
1980 /* RFC 4861 */
1981
1982 /* Prefix Length */
1983 proto_tree_add_item_ret_uint8(icmp6opt_tree, hf_icmpv6_opt_prefix_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &prefix_len);
1984 opt_offset += 1;
1985
1986 /* Flags */
1987 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_prefix_flag, ett_icmpv6_flag_prefix, prefix_flag, ENC_BIG_ENDIAN0x00000000);
1988 opt_offset += 1;
1989
1990 /* Prefix Valid Lifetime */
1991 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_prefix_valid_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
1992 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
1993 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
1994 }
1995 opt_offset += 4;
1996
1997 /* Prefix Preferred Lifetime */
1998 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_prefix_preferred_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
1999 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
2000 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
2001 }
2002 opt_offset += 4;
2003
2004 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 4, ENC_NA0x00000000);
2005 opt_offset += 4;
2006
2007 /* Prefix */
2008 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
2009 proto_item_append_text(ti, " : %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
2010 opt_offset += 16;
2011
2012 break;
2013 }
2014 case ND_OPT_REDIRECTED_HEADER4: /* Redirected Header (4) */
2015
2016 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 6, ENC_NA0x00000000);
2017 opt_offset += 6;
2018
2019 if (opt_len > 8) {
2020 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_redirected_packet, tvb, opt_offset, opt_len - 8, ENC_NA0x00000000);
2021 opt_tvb = tvb_new_subset_length(tvb, opt_offset, opt_len - 8);
2022 opt_offset += dissect_contained_icmpv6(opt_tvb, pinfo, icmp6opt_tree);
2023 }
2024 break;
2025 case ND_OPT_MTU5: /* MTU (5) */
2026
2027 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2028 opt_offset += 2;
2029
2030 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_mtu, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000);
2031 proto_item_append_text(ti, " : %d", tvb_get_ntohl(tvb, opt_offset));
2032 opt_offset += 4;
2033 break;
2034 case ND_OPT_NBMA6: /* NBMA Shortcut Limit Option (6) */
2035
2036 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_nbma_shortcut_limit, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2037 proto_item_append_text(ti, " : %d", tvb_get_uint8(tvb, opt_offset));
2038
2039 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 1, ENC_NA0x00000000);
2040 opt_offset += 1;
2041
2042 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 4, ENC_NA0x00000000);
2043 opt_offset += 4;
2044
2045 break;
2046 case ND_OPT_ADVINTERVAL7: /* Advertisement Interval Option (7) */
2047
2048 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2049 opt_offset += 2;
2050
2051 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_advertisement_interval, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000);
2052 proto_item_append_text(ti, " : %d", tvb_get_ntohl(tvb, opt_offset));
2053 opt_offset += 4;
2054
2055 break;
2056 case ND_OPT_HOMEAGENT_INFO8: /* Home Agent Information Option (8) */
2057 {
2058
2059 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2060 opt_offset += 2;
2061
2062 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_home_agent_preference, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2063 opt_offset += 2;
2064
2065 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_home_agent_lifetime, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2066 opt_offset += 2;
2067 break;
2068 }
2069 case ND_OPT_SOURCE_ADDRLIST9: /* Source Address List (9) */
2070 case ND_OPT_TARGET_ADDRLIST10: /* Target Address List (10)*/
2071 {
2072 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 6, ENC_NA0x00000000);
2073 opt_offset += 6;
2074
2075 while(opt_offset < (offset + opt_len) ) {
2076 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ipv6_address, tvb, opt_offset, 16, ENC_NA0x00000000);
2077 proto_item_append_text(ti, " %s", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset));
2078 opt_offset += 16;
2079 }
2080 break;
2081 }
2082 case ND_OPT_CGA11: /* CGA Option (11) */
2083 {
2084 proto_tree *cga_tree;
2085 proto_item *cga_item;
2086 uint16_t ext_data_len;
2087 uint8_t padd_length;
2088 unsigned par_len;
2089 asn1_ctx_t asn1_ctx;
2090
2091 /* Pad Length */
2092 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_cga_pad_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2093 padd_length = tvb_get_uint8(tvb, opt_offset);
2094 opt_offset += 1;
2095
2096 /* Reserved 8 bits */
2097
2098 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 1, ENC_NA0x00000000);
2099 opt_offset += 1;
2100
2101 /* CGA Parameters A variable-length field containing the CGA Parameters data
2102 * structure described in Section 4 of
2103 * "Cryptographically Generated Addresses (CGA)", RFC3972.
2104 */
2105 par_len = opt_len -4 -padd_length;
2106 cga_item = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_cga, tvb, opt_offset, par_len, ENC_NA0x00000000);
2107 par_len += opt_offset;
2108
2109 cga_tree = proto_item_add_subtree(cga_item, ett_icmpv6_cga_param_name);
2110 proto_tree_add_item(cga_tree, hf_icmpv6_opt_cga_modifier, tvb, opt_offset, 16, ENC_NA0x00000000);
2111 opt_offset += 16;
2112
2113 proto_tree_add_item(cga_tree, hf_icmpv6_opt_cga_subnet_prefix, tvb, opt_offset, 8, ENC_NA0x00000000);
2114 opt_offset += 8;
2115
2116 proto_tree_add_item(cga_tree, hf_icmpv6_opt_cga_count, tvb, opt_offset, 1, ENC_NA0x00000000);
2117 opt_offset += 1;
2118
2119 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true1, pinfo);
2120 opt_offset = dissect_x509af_SubjectPublicKeyInfo(false0, tvb, opt_offset, &asn1_ctx, cga_tree, hf_icmpv6_opt_cga_subject_public_key_info);
2121
2122 /* Process RFC 4581*/
2123 while (opt_offset < par_len) {
2124 proto_tree_add_item(cga_tree, hf_icmpv6_opt_cga_ext_type, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2125 opt_offset += 2;
2126
2127 ext_data_len = tvb_get_ntohs(tvb, opt_offset);
2128 proto_tree_add_item(cga_tree, hf_icmpv6_opt_cga_ext_length, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2129 opt_offset += 2;
2130
2131 proto_tree_add_item(cga_tree, hf_icmpv6_opt_cga_ext_data, tvb, opt_offset, ext_data_len, ENC_NA0x00000000);
2132 opt_offset += ext_data_len;
2133 }
2134
2135 /* Padding */
2136 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2137 opt_offset += padd_length;
2138 break;
2139 }
2140 case ND_OPT_RSA12: /* RSA Signature Option (12) */
2141 {
2142 int par_len;
2143 /*5.2. RSA Signature Option */
2144 /* Reserved, A 16-bit field reserved for future use. */
2145 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2146 opt_offset = opt_offset + 2;
2147
2148 /* Key Hash
2149 * A 128-bit field containing the most significant (leftmost) 128
2150 * bits of a SHA-1 [14] hash of the public key used for constructing
2151 * the signature.
2152 */
2153 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_rsa_key_hash, tvb, opt_offset, 16, ENC_NA0x00000000);
2154 opt_offset = opt_offset + 16;
2155
2156 /* Digital Signature */
2157 par_len = opt_len - 20;
2158 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_digital_signature_padding , tvb, opt_offset, par_len, ENC_NA0x00000000);
2159 opt_offset += par_len;
2160
2161 /* Padding */
2162 /* TODO: Calculate padding length and exclude from the signature */
2163 break;
2164 }
2165 case ND_OPT_TIMESTAMP13: /* Timestamp Option (13) */
2166 /* Reserved A 48-bit field reserved for future use. */
2167 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 6, ENC_NA0x00000000);
2168 opt_offset += 6;
2169
2170 /* Timestamp
2171 * A 64-bit unsigned integer field containing a timestamp. The value
2172 * indicates the number of seconds since January 1, 1970, 00:00 UTC,
2173 * by using a fixed point format. In this format, the integer number
2174 * of seconds is contained in the first 48 bits of the field, and the
2175 * remaining 16 bits indicate the number of 1/64K fractions of a
2176 * second.
2177 */
2178 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_timestamp, tvb, opt_offset, 8, ENC_TIME_RFC_39710x00000020|ENC_BIG_ENDIAN0x00000000);
2179 opt_offset += 8;
2180 break;
2181 case ND_OPT_NONCE14: /* Nonce option (14) */
2182
2183 /* 5.3.2. Nonce Option */
2184 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_nonce, tvb, opt_offset, opt_len - 2, ENC_NA0x00000000);
2185 opt_offset += opt_len -2;
2186 break;
2187 case ND_OPT_TRUST_ANCHOR15: /* Trust Anchor Option (15) */
2188 {
2189 proto_tree *name_tree;
2190 proto_item *name_item;
2191 uint8_t name_type;
2192 uint8_t padd_length;
2193 int par_len;
2194 asn1_ctx_t asn1_ctx;
2195
2196 /* Name Type */
2197 proto_tree_add_item_ret_uint8(icmp6opt_tree, hf_icmpv6_opt_name_type, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &name_type);
2198 opt_offset += 1;
2199
2200 /* Pad Length */
2201 proto_tree_add_item_ret_uint8(icmp6opt_tree, hf_icmpv6_opt_cga_pad_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &padd_length);
2202 opt_offset += 1;
2203
2204 par_len = opt_len - 4 - padd_length;
2205
2206 switch (name_type){
2207 case 1:
2208 /* DER Encoded X.501 Name */
2209 name_item = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_name_x501, tvb, opt_offset, par_len, ENC_NA0x00000000);
2210 name_tree = proto_item_add_subtree(name_item, ett_icmpv6_opt_name);
2211 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true1, pinfo);
2212 dissect_x509if_Name(false0, tvb, opt_offset, &asn1_ctx, name_tree, hf_icmpv6_x509if_Name);
2213 break;
2214 case 2:
2215 /* FQDN */
2216 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_name_fqdn, tvb, opt_offset, par_len, ENC_ASCII0x00000000);
2217 break;
2218 default:
2219 break;
2220 }
2221 opt_offset += par_len;
2222
2223 /* Padding */
2224 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2225 opt_offset += padd_length;
2226
2227 break;
2228 }
2229 case ND_OPT_CERTIFICATE16: /* Certificate Option (16) */
2230 {
2231 uint8_t cert_type;
2232 uint8_t padd_length;
2233 asn1_ctx_t asn1_ctx;
2234
2235 /* Cert Type */
2236 proto_tree_add_item_ret_uint8(icmp6opt_tree, hf_icmpv6_opt_cert_type, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &cert_type);
2237 opt_offset += 1;
2238
2239 /* Reserved */
2240 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 1, ENC_NA0x00000000);
2241 opt_offset += 1;
2242
2243 /* Certificate */
2244
2245 if(cert_type == 1){
2246 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true1, pinfo);
2247 opt_offset = dissect_x509af_Certificate(false0, tvb, opt_offset, &asn1_ctx, icmp6opt_tree, hf_icmpv6_x509af_Certificate);
2248 padd_length = opt_len - (opt_offset - offset);
2249 /* Padding */
2250 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2251 opt_offset += padd_length;
2252 }else{
2253 padd_length = opt_len - 4;
2254 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_certificate_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2255 opt_offset += padd_length;
2256 }
2257 break;
2258
2259 }
2260 case ND_OPT_IP_ADDRESS_PREFIX17: /* IP Address/Prefix Option (17) */
2261 {
2262 uint8_t prefix_len;
2263
2264 /* Option-code */
2265 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ipa_option_code, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2266 opt_offset += 1;
2267
2268 /* Prefix Len */
2269 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ipa_prefix_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2270 prefix_len = tvb_get_uint8(tvb, opt_offset);
2271 opt_offset += 1;
2272
2273 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 4, ENC_NA0x00000000);
2274 opt_offset += 4;
2275
2276 /* IPv6 Address */
2277 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ipa_ipv6_address, tvb, opt_offset, 16, ENC_NA0x00000000);
2278 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
2279 opt_offset += 16;
2280
2281 break;
2282 }
2283 case ND_OPT_NEW_ROUTER_PREFIX_INFO18: /* New Router Prefix Information Option (18) OBSO... */
2284 {
2285
2286 uint8_t prefix_len;
2287
2288 /* Option-code */
2289 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_nrpi_option_code, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2290 opt_offset += 1;
2291
2292 /* Prefix Len */
2293 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_nrpi_prefix_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2294 prefix_len = tvb_get_uint8(tvb, opt_offset);
2295 opt_offset += 1;
2296
2297 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 4, ENC_NA0x00000000);
2298 opt_offset += 4;
2299
2300 /* Prefix */
2301 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_nrpi_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
2302 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
2303 opt_offset += 16;
2304
2305 break;
2306 }
2307 case ND_OPT_LINK_LAYER_ADDRESS19: /* Link-layer Address Option (19) */
2308 {
2309 /* Option-Code */
2310 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_lla_option_code, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2311 opt_offset += 1;
2312
2313 /* Link Layer Address */
2314 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_lla_bytes, tvb, opt_offset, opt_len-3, ENC_NA0x00000000);
2315 opt_offset += opt_len - 3;
2316 break;
2317 }
2318
2319 case ND_OPT_NEIGHBOR_ADV_ACK20: /* Neighbor Advertisement Acknowledgment Option (20) */
2320 {
2321 uint8_t status;
2322
2323 /* Option-Code */
2324 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_naack_option_code, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2325 opt_offset += 1;
2326
2327 /* Status */
2328 proto_tree_add_item_ret_uint8(icmp6opt_tree, hf_icmpv6_opt_naack_status, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &status);
2329 opt_offset += 1;
2330
2331 if(status == 2){
2332 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_naack_supplied_ncoa, tvb, opt_offset, 16, ENC_NA0x00000000);
2333 opt_offset += 16;
2334 }else{
2335 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, opt_len - 4, ENC_NA0x00000000);
2336 opt_offset += opt_len - 4;
2337 }
2338 break;
2339 }
2340 case ND_OPT_PVD_ID21: /* PvD ID (21) */
2341 {
2342 int dns_len;
2343 const char *dns_name, *name_out;
2344 uint64_t flags;
2345
2346 static int * const pvd_id_flags[] = {
2347 &hf_icmpv6_opt_pvd_id_flags_h,
2348 &hf_icmpv6_opt_pvd_id_flags_l,
2349 &hf_icmpv6_opt_pvd_id_flags_r,
2350 &hf_icmpv6_opt_pvd_id_flags_reserved,
2351 NULL((void*)0)
2352 };
2353
2354 /* Flags */
2355 proto_tree_add_bitmask_with_flags_ret_uint64(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_pvd_id_flags,
2356 ett_icmpv6_flag_pvd_id, pvd_id_flags, ENC_BIG_ENDIAN0x00000000, BMT_NO_FALSE0x04 | BMT_NO_INT0x02, &flags);
2357
2358 /* Delay */
2359 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_pvd_id_delay, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2360 opt_offset += 2;
2361
2362 /* Sequence Number */
2363 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_pvd_id_sequence_number, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2364 opt_offset += 2;
2365
2366 /* PvD ID FQDN */
2367 used_bytes = get_dns_name(pinfo->pool, tvb, opt_offset, 0, opt_offset, &dns_name, &dns_len);
2368 name_out = format_text(pinfo->pool, dns_name, dns_len);
2369 proto_tree_add_string(icmp6opt_tree, hf_icmpv6_opt_pvd_id_fqdn, tvb, opt_offset, used_bytes, name_out);
2370 proto_item_append_text(ti, " : %s", name_out);
2371 opt_offset += used_bytes;
2372
2373 /* Padding */
2374 if (opt_offset & 0x07) {
2375 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, 8 - (opt_offset & 0x07), ENC_NA0x00000000);
2376 opt_offset += 8 - (opt_offset & 0x07);
2377 }
2378
2379 /*
2380 * When the R-flag is set, a full Router Advertisement message header as specified in [RFC4861].
2381 * The sender MUST set the Type field to 134 (the value for "Router Advertisement") and set the Code field to 0.
2382 * Receivers MUST ignore both of these fields. The Checksum field MUST be set to 0 by the sender;
2383 * non-zero checksums MUST be ignored by the receiver without causing the processing of the message to fail.
2384 * All other fields are to be set and parsed as specified in [RFC4861] or any updating documents.
2385 */
2386 if(flags & 0x200) {
2387 tvbuff_t *ra_tvb;
2388 ra_tvb = tvb_new_subset_length(tvb, opt_offset, 16);
2389 call_dissector(icmpv6_handle, ra_tvb, pinfo, icmp6opt_tree);
2390 opt_offset += 16;
2391 }
2392
2393 /* https://datatracker.ietf.org/doc/html/rfc8801#section-3.1-3.24
2394 * Zero or more RA options to be ignored by hosts that are not
2395 * PvD aware. */
2396 if (opt_offset < offset + opt_len) {
2397 // Don't dissect options in the main body.
2398 opt_tvb = tvb_new_subset_length(tvb, opt_offset, offset + opt_len - opt_offset);
Value stored to 'opt_tvb' is never read
2399 opt_offset += dissect_icmpv6_nd_opt(tvb, 0, pinfo, icmp6opt_tree, icmpv6_type);
2400 }
2401
2402 break;
2403 }
2404 case ND_OPT_MAP23: /* MAP Option (23) */
2405 {
2406 static int * const map_flags[] = {
2407 &hf_icmpv6_opt_map_flag_r,
2408 &hf_icmpv6_opt_map_flag_reserved,
2409 NULL((void*)0)
2410 };
2411
2412 uint32_t lifetime;
2413
2414 /* Dist */
2415 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_map_dist, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2416
2417 /* Pref */
2418 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_map_pref, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2419 opt_offset += 1;
2420
2421 /* Flags */
2422 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_map_flag, ett_icmpv6_flag_map, map_flags, ENC_BIG_ENDIAN0x00000000);
2423 opt_offset += 1;
2424
2425 /* Valid Lifetime */
2426 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_map_valid_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
2427 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
2428 opt_offset += 4;
2429
2430 /* Global Address */
2431 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_map_global_address, tvb, opt_offset, 16, ENC_NA0x00000000);
2432 opt_offset += 16;
2433 break;
2434 }
2435 case ND_OPT_ROUTE_INFO24: /* Route Information Option (24) */
2436 {
2437 /* RFC 4191 */
2438 uint8_t prefix_len;
2439 uint8_t route_preference;
2440 uint32_t lifetime;
2441 ws_in6_addr prefix;
2442 address prefix_addr;
2443 static int * const route_flags[] = {
2444 &hf_icmpv6_opt_route_info_flag_route_preference,
2445 &hf_icmpv6_opt_route_info_flag_reserved,
2446 NULL((void*)0)
2447 };
2448
2449 /* Prefix Len */
2450 proto_tree_add_item_ret_uint8(icmp6opt_tree, hf_icmpv6_opt_prefix_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &prefix_len);
2451 opt_offset += 1;
2452
2453 /* Flags */
2454 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_route_info_flag, ett_icmpv6_flag_route_info, route_flags, ENC_BIG_ENDIAN0x00000000);
2455
2456 route_preference = tvb_get_uint8(tvb, opt_offset);
2457 route_preference = (route_preference & ND_RA_FLAG_RTPREF_MASK0x18) >> 3;
2458 proto_item_append_text(ti, " : %s", val_to_str(pinfo->pool, route_preference, nd_flag_router_pref, "Unknown %d") );
2459 opt_offset += 1;
2460
2461 /* Route Lifetime */
2462 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_route_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
2463 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
2464 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
2465 }
2466 opt_offset += 4;
2467
2468 /* Prefix */
2469 switch(opt_len){
2470 case 8: /* Default Option Length without prefix */
2471 proto_item_append_text(ti, " ::/%d", prefix_len);
2472 break;
2473 case 16:
2474 memset(&prefix, 0, sizeof(prefix));
2475 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 8);
2476 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_prefix, tvb, opt_offset, 8, &prefix);
2477 set_address(&prefix_addr, AT_IPv6, 16, prefix.bytes);
2478 proto_item_append_text(ti, " %s/%d", address_to_str(pinfo->pool, &prefix_addr), prefix_len);
2479 opt_offset += 8;
2480 break;
2481 case 24:
2482 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
2483 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
2484 opt_offset += 16;
2485 break;
2486 default:
2487 expert_add_info(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length);
2488 break;
2489 }
2490 break;
2491
2492 }
2493
2494 case ND_OPT_RECURSIVE_DNS_SERVER25: /* Recursive DNS Server Option (25) */
2495 {
2496 uint32_t lifetime;
2497
2498 /* Reserved */
2499 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2500 opt_offset += 2;
2501
2502 /* RDNSS Lifetime */
2503 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_rdnss_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
2504 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
2505 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
2506 }
2507 opt_offset += 4;
2508
2509 while(opt_offset < (offset + opt_len) ) {
2510 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_rdnss, tvb, opt_offset, 16, ENC_NA0x00000000);
2511 proto_item_append_text(ti, " %s", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset));
2512 opt_offset += 16;
2513
2514 }
2515 break;
2516 }
2517 case ND_OPT_FLAGS_EXTENSION26: /* RA Flags Extension Option (26) */
2518 {
2519 static int * const extension_flags[] = {
2520 &hf_icmpv6_opt_efo_rsv,
2521 &hf_icmpv6_opt_efo_pex,
2522 NULL((void*)0)
2523 };
2524
2525 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_efo, ett_icmpv6_flag_efo, extension_flags, ENC_BIG_ENDIAN0x00000000);
2526 opt_offset += 6;
2527 break;
2528 }
2529 case ND_OPT_HANDOVER_KEY_REQUEST27: /* Handover Key Request Option (27) */
2530 {
2531 int par_len;
2532 unsigned padd_length;
2533
2534 /* Pad Length */
2535 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_pad_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2536 padd_length = tvb_get_uint8(tvb, opt_offset);
2537 opt_offset += 1;
2538
2539 /* AT */
2540 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_at, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2541
2542 /* Reserved */
2543 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_reserved, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2544 opt_offset += 1;
2545
2546 /* Handover Key Encryption Public Key */
2547 par_len = opt_len-4-padd_length;
2548 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_encryption_public_key, tvb, opt_offset, par_len, ENC_NA0x00000000);
2549 opt_offset += par_len;
2550
2551 /* Padding */
2552 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2553 opt_offset += 1;
2554 break;
2555 }
2556 case ND_OPT_HANDOVER_KEY_REPLY28: /* Handover Key Reply Option (28) */
2557 {
2558 int par_len;
2559 unsigned padd_length;
2560
2561 /* Pad Length */
2562 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_pad_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2563 padd_length = tvb_get_uint8(tvb, opt_offset);
2564 opt_offset += 1;
2565
2566 /* AT */
2567 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_at, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2568
2569 /* Reserved */
2570 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_reserved, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2571 opt_offset += 1;
2572
2573 /* Lifetime */
2574 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_lifetime, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2575 opt_offset += 2;
2576
2577 /* Encrypted Handover Key */
2578 par_len = opt_len-6-padd_length;
2579 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_encrypted_handover_key, tvb, opt_offset, par_len, ENC_NA0x00000000);
2580 opt_offset += par_len;
2581
2582 /* Padding */
2583 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hkr_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2584 opt_offset += 1;
2585 break;
2586 }
2587 case ND_OPT_HANDOVER_ASSIST_INFO29: /* Handover Assist Information Option (29) */
2588 {
2589 uint8_t hai_len;
2590 int padd_length;
2591 /* Option-Code */
2592 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hai_option_code, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2593 opt_offset += 1;
2594
2595 /* HAI Length */
2596 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hai_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2597 hai_len = tvb_get_uint8(tvb, opt_offset);
2598 opt_offset += 1;
2599
2600 /* HAI Value */
2601 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_hai_value, tvb, opt_offset, hai_len, ENC_NA0x00000000);
2602 opt_offset += hai_len;
2603
2604 /* Padding... */
2605 padd_length = opt_len - opt_offset;
2606 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2607 opt_offset += padd_length;
2608
2609 break;
2610 }
2611 case ND_OPT_MOBILE_NODE_ID30: /* Mobile Node Identifier Option (30) */
2612 {
2613 uint8_t mn_len;
2614 int padd_length;
2615 /* Option-Code */
2616 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_mn_option_code, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2617 opt_offset += 1;
2618
2619 /* MN Length */
2620 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_mn_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2621 mn_len = tvb_get_uint8(tvb, opt_offset);
2622 opt_offset += 1;
2623
2624 /* MN Value */
2625 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_mn_value, tvb, opt_offset, mn_len, ENC_NA0x00000000);
2626 opt_offset += mn_len;
2627
2628 /* Padding... */
2629 padd_length = opt_len - opt_offset;
2630 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2631 opt_offset += padd_length;
2632
2633 break;
2634 }
2635 case ND_OPT_DNS_SEARCH_LIST31: /* DNS Search List Option (31) */
2636 {
2637 uint32_t lifetime;
2638 int dnssl_len;
2639 const char *dnssl_name, *name_out;
2640
2641 /* Reserved */
2642 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2643 opt_offset += 2;
2644
2645 /* DNSSL Lifetime */
2646 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_dnssl_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
2647 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
2648 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
2649 }
2650 opt_offset += 4;
2651 while(opt_offset < (offset + opt_len) ) {
2652
2653 if(tvb_get_uint8(tvb, opt_offset) == 0){
2654 /* Padding... */
2655 int padd_length = (offset + opt_len) - opt_offset;
2656 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset, padd_length, ENC_NA0x00000000);
2657 opt_offset += padd_length;
2658 break;
2659 }
2660 used_bytes = get_dns_name(pinfo->pool, tvb, opt_offset, 0, opt_offset, &dnssl_name, &dnssl_len);
2661 name_out = format_text(pinfo->pool, dnssl_name, dnssl_len);
2662 proto_tree_add_string(icmp6opt_tree, hf_icmpv6_opt_dnssl, tvb, opt_offset, used_bytes, name_out);
2663 proto_item_append_text(ti, " %s", name_out);
2664 opt_offset += used_bytes;
2665
2666 }
2667 break;
2668 }
2669 case ND_OPT_PROXY_SIGNATURE32: /* Proxy Signature Option (32) */
2670 {
2671 int par_len;
2672
2673 /* Reserved */
2674 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2675 opt_offset += 2;
2676
2677 /* Key Hash
2678 * A 128-bit field containing the most significant (leftmost) 128
2679 * bits of a SHA-1 [14] hash of the public key used for constructing
2680 * the signature.
2681 */
2682 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ps_key_hash, tvb, opt_offset, 16, ENC_NA0x00000000);
2683 opt_offset += 16;
2684
2685 /* Digital Signature */
2686 par_len = opt_len - 20;
2687 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_digital_signature_padding , tvb, opt_offset, par_len, ENC_NA0x00000000);
2688 opt_offset += par_len;
2689 /* Padding */
2690 /* TODO: Calculate padding length and exclude from the signature */
2691 break;
2692 }
2693 case ND_OPT_ADDR_REGISTRATION33:
2694 {
2695 /* 6lowpan-ND */
2696 uint8_t status_field;
2697
2698 static int * const earo_prefix_flags[] = {
2699 &hf_icmpv6_opt_earo_flag_f,
2700 NULL((void*)0)
2701 };
2702
2703 static int * const earo_flags[] = {
2704 &hf_icmpv6_opt_earo_flag_reserved,
2705 &hf_icmpv6_opt_earo_flag_c,
2706 &hf_icmpv6_opt_earo_flag_p,
2707 &hf_icmpv6_opt_earo_flag_i,
2708 &hf_icmpv6_opt_earo_flag_r,
2709 &hf_icmpv6_opt_earo_flag_t,
2710 NULL((void*)0)
2711 };
2712
2713 /* T-Flag determines EARO instead of ARO */
2714 bool_Bool is_earo = tvb_get_uint8(tvb, opt_offset + 2) & ND_OPT_EARO_FLAG_T0x01;
2715
2716 /* Status/Prefix length
2717 * Re-use of field (RFC 9926/9927)
2718 *
2719 * With EARO messages, the 8-bit status field is re-used for
2720 *
2721 * NS: 1 bit F-Flag; 7 bits Prefix length
2722 * NA: 2 bits reserved, 6 bits Status
2723 */
2724 status_field = tvb_get_uint8(tvb, opt_offset);
2725
2726 if(is_earo && icmpv6_type == ICMP6_ND_NEIGHBOR_SOLICIT135) {
2727
2728 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_earo_flag, ett_icmpv6_flag_earo, earo_prefix_flags, ENC_BIG_ENDIAN0x00000000);
2729
2730 /* No status_field, we don't need to store or correct its value */
2731 proto_tree_add_uint(icmp6opt_tree, hf_icmpv6_opt_earo_prefix_len, tvb, opt_offset, 1, (uint32_t)(status_field & 0x7F));
2732
2733 } else if(is_earo && icmpv6_type == ICMP6_ND_NEIGHBOR_ADVERT136) {
2734
2735 /* Reserved: 2 MSB of status_field */
2736 proto_tree_add_uint(icmp6opt_tree, hf_icmpv6_opt_earo_reserved, tvb, opt_offset, 1, (uint32_t)((status_field & 0xC0) >> 6));
2737
2738 /* Set status_field to the actual status (6 LSB) */
2739 status_field &= 0x3F;
2740 proto_tree_add_uint(icmp6opt_tree, hf_icmpv6_opt_aro_status, tvb, opt_offset, 1, (uint32_t)status_field);
2741
2742 } else {
2743
2744 /* "Regular" ARO status */
2745 proto_tree_add_uint(icmp6opt_tree, hf_icmpv6_opt_aro_status, tvb, opt_offset, 1, (uint32_t)status_field);
2746
2747 }
2748 opt_offset += 1;
2749
2750 /* EARO Opaque */
2751 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_earo_opaque, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2752 opt_offset += 1;
2753
2754 /* EARO Flags */
2755 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_earo_flag, ett_icmpv6_flag_earo, earo_flags, ENC_BIG_ENDIAN0x00000000);
2756 opt_offset += 1;
2757
2758 /* EARO Transaction ID */
2759 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_earo_tid, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2760 opt_offset += 1;
2761
2762 /* Lifetime */
2763 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_aro_registration_lifetime, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2764 opt_offset += 2;
2765
2766 /* RFC 6775 defines the field for the EUI-64 interface ID.
2767 * With RFC 8505 which introduced 'Extended Address Registration Option' (EARO),
2768 * the field is used for 'Registration Ownership Verifier' (ROVR).
2769 *
2770 * RFC 8505 Sect. 4.1:
2771 * The ROVR size MUST be 64 bits when backward compatibility is needed;
2772 * otherwise, the size MAY be 128, 192, or 256 bits
2773 *
2774 * In genaral, the T-flag indicates the presence of the TID and therefore
2775 * distinguishes between ARO (T=0) and EARO (T=1).
2776 */
2777 if(is_earo) {
2778
2779 /* Check length, dissect arbitrary data and add expert item if length violates rules above.
2780 *
2781 * We already dissected 8 octets in the option.
2782 * opt_len-8 is the remaining data in this option.
2783 *
2784 * ToDo: Add proper dissection of ROVR data (RFC 8505) or Crypto-ID (RFC 8928).
2785 */
2786 unsigned int opt_remaining = opt_len-8;
2787
2788 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_earo_rovr, tvb, opt_offset, opt_remaining, ENC_NA0x00000000);
2789 if(opt_remaining != 8 && opt_remaining != 16 && opt_remaining != 24 && opt_remaining != 32)
2790 expert_add_info_format(pinfo, ti, &ei_icmpv6_invalid_option_length, "Invalid ROVR length (%i)", opt_remaining);
2791
2792 opt_offset += opt_remaining;
2793 } else {
2794 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_aro_eui64, tvb, opt_offset, 8, ENC_BIG_ENDIAN0x00000000);
2795 proto_item_append_text(ti, " : Register %s %s", tvb_address_to_str(pinfo->pool, tvb, AT_EUI64, opt_offset), val_to_str(pinfo->pool, status_field, nd_opt_earo_status_val, "Unknown %d"));
2796 opt_offset += 8;
2797 }
2798
2799 }
2800 break;
2801 case ND_OPT_6LOWPAN_CONTEXT34: /* 6LoWPAN Context (TBD2 Pending IANA...) */
2802 {
2803 ieee802154_hints_t *hints;
2804 /* 6lowpan-ND */
2805 uint8_t context_id;
2806 uint8_t context_len;
2807 ws_in6_addr context_prefix;
2808 address context_prefix_addr;
2809 static int * const _6lowpan_context_flags[] = {
2810 &hf_icmpv6_opt_6co_flag_c,
2811 &hf_icmpv6_opt_6co_flag_cid,
2812 &hf_icmpv6_opt_6co_flag_reserved,
2813 NULL((void*)0)
2814 };
2815
2816 /* Context Length */
2817 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_6co_context_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
2818 context_len = tvb_get_uint8(tvb, opt_offset);
2819 opt_offset += 1;
2820
2821 /* Flags & CID */
2822 context_id = tvb_get_uint8(tvb, opt_offset) & ND_OPT_6CO_FLAG_CID0x0F;
2823 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_6co_flag, ett_icmpv6_flag_6lowpan, _6lowpan_context_flags, ENC_BIG_ENDIAN0x00000000);
2824 opt_offset += 1;
2825
2826 /* Reserved */
2827 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_reserved, tvb, opt_offset, 2, ENC_NA0x00000000);
2828 opt_offset += 2;
2829
2830 /* Lifetime */
2831 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_6co_valid_lifetime, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2832 opt_offset += 2;
2833
2834 /* Context */
2835 memset(&context_prefix.bytes, 0, sizeof(context_prefix));
2836 switch(opt_len){
2837 case 8: /* Default Option Length without context prefix */
2838 proto_item_append_text(ti, " ::/%d", context_len);
2839 break;
2840 case 16:
2841 tvb_memcpy(tvb, (uint8_t *)&context_prefix.bytes, opt_offset, 8);
2842 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_6co_context_prefix, tvb, opt_offset, 8, &context_prefix);
2843 set_address(&context_prefix_addr, AT_IPv6, 16, context_prefix.bytes);
2844 proto_item_append_text(ti, " %s/%d", address_to_str(pinfo->pool, &context_prefix_addr), context_len);
2845 opt_offset += 8;
2846 break;
2847 case 24:
2848 tvb_memcpy(tvb, (uint8_t *)&context_prefix.bytes, opt_offset, 16);
2849 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_6co_context_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
2850 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), context_len);
2851 opt_offset += 16;
2852 break;
2853 default:
2854 expert_add_info(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length);
2855 break;
2856 }
2857 /* Update the 6LoWPAN dissectors with new context information. */
2858 hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ieee802154, 0);
2859 if ((opt_len <= 24) && hints) {
2860 lowpan_context_insert(context_id, hints->src_pan, context_len, &context_prefix, pinfo->num);
2861 }
2862 }
2863 break;
2864 case ND_OPT_AUTH_BORDER_ROUTER35: /* Authoritative Border Router (33) */
2865 {
2866 uint32_t version_low, version_high, valid_lifetime;
2867
2868 /* Version low*/
2869 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_abro_version_low, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &version_low);
2870 opt_offset += 2;
2871
2872 /* Version high */
2873 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_abro_version_high, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &version_high);
2874 opt_offset += 2;
2875
2876 /* Valid lifetime */
2877 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_abro_valid_lifetime, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &valid_lifetime);
2878 opt_offset += 2;
2879
2880 /* 6LBR Address */
2881 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_abro_6lbr_address, tvb, opt_offset, 16, ENC_NA0x00000000);
2882 proto_item_append_text(ti, " : Version %d.%d, Valid Lifetime : %d, 6LBR : %s", version_high, version_low, valid_lifetime, tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset));
2883 opt_offset += 16;
2884
2885 }
2886 break;
2887 case ND_OPT_6CIO36: /* 6LoWPAN Capability Indication Option (35) */
2888 {
2889
2890 static int * const opt_6cio_flags[] = {
2891 &hf_icmpv6_opt_6cio_flag_reserved,
2892 &hf_icmpv6_opt_6cio_flag_f,
2893 &hf_icmpv6_opt_6cio_flag_g,
2894 &hf_icmpv6_opt_6cio_flag_e,
2895 &hf_icmpv6_opt_6cio_flag_p,
2896 &hf_icmpv6_opt_6cio_flag_b,
2897 &hf_icmpv6_opt_6cio_flag_l,
2898 &hf_icmpv6_opt_6cio_flag_d,
2899 &hf_icmpv6_opt_6cio_flag_a,
2900 &hf_icmpv6_opt_6cio_flag_x,
2901 &hf_icmpv6_opt_6cio_flag_experimental,
2902 NULL((void*)0)
2903 };
2904
2905 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_opt_6cio_flag,
2906 ett_icmpv6_flag_6cio, opt_6cio_flags, ENC_BIG_ENDIAN0x00000000);
2907 opt_offset += 6;
2908
2909
2910 }
2911 break;
2912 case ND_OPT_CAPPORT37: /* DHCP Captive-Portal Option (37) */
2913 {
2914 proto_item *ti_cp;
2915
2916 ti_cp = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_captive_portal, tvb, opt_offset, opt_len-2, ENC_ASCII0x00000000);
2917 proto_item_set_url(ti_cp);
2918 opt_offset += opt_len - 2;
2919
2920 }
2921 break;
2922 case ND_OPT_PREF6438: /* PREF64 Option (38) */
2923 {
2924 ws_in6_addr prefix;
2925 uint32_t plc;
2926
2927 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_pref64_scaled_lifetime, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2928 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_pref64_plc, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &plc);
2929 opt_offset += 2;
2930
2931 /* Prefix */
2932 memset(&prefix.bytes, 0, sizeof(prefix));
2933 switch(plc){
2934 case 0: /* 96 bits prefix length */
2935 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 12);
2936 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_pref64_prefix, tvb, opt_offset, 12, &prefix);
2937 break;
2938 case 1: /* 64 bits prefix length */
2939 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 8);
2940 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_pref64_prefix, tvb, opt_offset, 8, &prefix);
2941 break;
2942 case 2: /* 56 bits prefix length */
2943 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 7);
2944 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_pref64_prefix, tvb, opt_offset, 7, &prefix);
2945 break;
2946 case 3: /* 48 bits prefix length */
2947 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 6);
2948 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_pref64_prefix, tvb, opt_offset, 6, &prefix);
2949 break;
2950 case 4: /* 40 bits prefix length */
2951 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 5);
2952 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_pref64_prefix, tvb, opt_offset, 5, &prefix);
2953 break;
2954 case 5: /* 32 bits prefix length */
2955 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 4);
2956 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_opt_pref64_prefix, tvb, opt_offset, 4, &prefix);
2957 break;
2958 default:
2959 expert_add_info(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length);
2960 break;
2961 }
2962 opt_offset += 12;
2963 }
2964 break;
2965 case ND_OPT_ENCRYPTED_DNS144: /* Encrypted DNS Option (144) */
2966 {
2967 unsigned opt_start = opt_offset;
2968 unsigned opt_end = opt_offset + opt_len - 2;
2969 uint32_t lifetime;
2970 uint32_t adn_len = 0;
2971 int adn_parsed_len;
2972 const char *adn;
2973 uint32_t addrs_len = 0;
2974 uint32_t svc_params_len = 0;
2975 uint32_t i;
2976 tvbuff_t *next_tvb;
2977 proto_tree *dnr_addrs_tree;
2978 int padding_len;
2979
2980 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_dnr_svcpriority, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
2981 opt_offset += 2;
2982
2983 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_dnr_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
2984 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
2985 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
2986 }
2987 opt_offset += 4;
2988
2989 if (opt_offset + 2 > opt_end) {
2990 expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "DNR: truncated option (no ADN length)");
2991 break;
2992 }
2993
2994 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_dnr_auth_domain_name_len, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &adn_len);
2995 opt_offset += 2;
2996
2997 if (opt_offset + adn_len > opt_end) {
2998 expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "DNR: truncated option (ADN too long)");
2999 break;
3000 }
3001
3002 get_dns_name(pinfo->pool, tvb, opt_offset, adn_len, opt_offset, &adn, &adn_parsed_len);
3003 proto_tree_add_string(icmp6opt_tree, hf_icmpv6_opt_dnr_auth_domain_name, tvb, opt_offset, adn_len, format_text(pinfo->pool, adn, adn_parsed_len));
3004 opt_offset += adn_len;
3005
3006 // If a DNR option ends after the authentication-domain-name (ADN), it is in ADN-only mode (see RFC 9463, Section 3.1.6).
3007 // However, since ND options must be a multiple of 8 bytes, there could be padding. Technically in order for the DNR
3008 // option to be valid and not in ADN-only mode, there must be at least 20 bytes after the ADN (2 bytes addrs_len + 16
3009 // bytes IPv6 address + 2 bytes svc_params_len), but just assume here that ADN-only mode will reach to the next 8 byte
3010 // boundary.
3011 if ((opt_end - opt_offset) < 8) {
3012 proto_tree_add_expert(icmp6opt_tree, pinfo, &ei_icmpv6_opt_dnr_adn_only_mode, tvb, opt_start - 2, opt_len);
3013
3014 padding_len = opt_end - opt_offset;
3015 if (padding_len > 0) {
3016 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_dnr_padding, tvb, opt_offset, padding_len, ENC_NA0x00000000);
3017 }
3018
3019 opt_offset += padding_len;
3020
3021 break;
3022 }
3023
3024 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_dnr_addrs_len, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &addrs_len);
3025 opt_offset += 2;
3026
3027 if ((unsigned)opt_offset + addrs_len > (unsigned)opt_end) {
3028 expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "DNR: truncated option (addrs_len too long)");
3029 break;
3030 }
3031
3032 if (addrs_len == 0 || addrs_len % 16 != 0) {
3033 expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "DNR: invalid addrs_len %d (not divisible by 16)", addrs_len);
3034 break;
3035 }
3036
3037 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_dnr_addrs, tvb, opt_offset, addrs_len, ENC_NA0x00000000);
3038 dnr_addrs_tree = proto_item_add_subtree(ti_opt, ett_icmpv6_opt_dnr_addrs);
3039
3040 proto_item_append_text(ti_opt, ":");
3041
3042 for (i = 0; i < addrs_len; i += 16) {
3043 proto_tree_add_item(dnr_addrs_tree, hf_icmpv6_opt_dnr_addrs_ip, tvb, opt_offset + i, 16, ENC_NA0x00000000);
3044 proto_item_append_text(ti_opt, "%c%s", (i == 0 ? ' ' : ','), tvb_ip6_to_str(pinfo->pool, tvb, opt_offset + i)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset +
i)
);
3045 }
3046
3047 opt_offset += addrs_len;
3048
3049 // Handle the service parameters.
3050 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_opt_dnr_svc_params_len, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000, &svc_params_len);
3051 opt_offset += 2;
3052
3053 if ((unsigned)opt_offset + svc_params_len > (unsigned)opt_end) {
3054 expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "DNR: truncated option (svc_params_len too long)");
3055 break;
3056 }
3057
3058 next_tvb = tvb_new_subset_length(tvb, opt_offset, svc_params_len);
3059 opt_offset += call_dissector(svc_params_handle, next_tvb, pinfo, icmp6opt_tree);
3060
3061 padding_len = opt_end - opt_offset;
3062 if (padding_len > 0) {
3063 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_dnr_padding, tvb, opt_offset, padding_len, ENC_NA0x00000000);
3064
3065 opt_offset += padding_len;
3066 }
3067 }
3068 break;
3069 default :
3070 expert_add_info_format(pinfo, ti, &ei_icmpv6_undecoded_option,
3071 "Dissector for ICMPv6 Option (%d)"
3072 " code not implemented, Contact Wireshark developers"
3073 " if you want this supported", opt_type);
3074 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_data, tvb, opt_offset, opt_len-2, ENC_NA0x00000000);
3075 opt_offset += opt_len - 2;
3076 break;
3077
3078 } /* switch (opt_type) */
3079
3080 offset += opt_len;
3081
3082 if(offset > opt_offset){
3083 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_unknown_data, tvb, opt_offset, offset - opt_offset, ENC_NA0x00000000);
3084 expert_add_info(pinfo, ti_opt, &ei_icmpv6_unknown_data);
3085 }
3086 /* Close the ) to option root label */
3087 proto_item_append_text(ti, ")");
3088 }
3089 return offset;
3090}
3091
3092
3093/* RPL: RFC 6550/6997 : Routing and Discovery of P2P Routes in Low-Power and Lossy Networks. */
3094static int
3095dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint8_t icmp6_code)
3096{
3097 proto_tree *icmp6opt_tree, *flag_tree;
3098 proto_item *ti, *ti_opt, *ti_opt_len, *ti_opt_reply, *ti_opt_hop_by_hop, *ti_opt_num_of_routes,
3099 *ti_opt_lifetime, *ti_opt_mr_nh = NULL((void*)0);
3100 uint8_t opt_type;
3101 int opt_len;
3102 int opt_offset;
3103
3104 while ((int)tvb_reported_length(tvb) > offset) {
3105 /* there are more options */
3106
3107 /* ICMPv6 RPL Option */
3108 ti = proto_tree_add_item(tree, hf_icmpv6_rpl_opt, tvb, offset, 1, ENC_NA0x00000000);
3109 icmp6opt_tree = proto_item_add_subtree(ti, ett_icmpv6_rpl_opt);
3110 opt_offset = offset;
3111
3112 /* Option type */
3113 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_type, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3114 opt_type = tvb_get_uint8(tvb, opt_offset);
3115 opt_offset += 1;
3116
3117 /* Add option name to option root label */
3118 proto_item_append_text(ti, " (%s", val_to_str(pinfo->pool, opt_type, rpl_option_vals, "Unknown %d"));
3119
3120 /* The Pad1 option is a special case, and contains no data. */
3121 if (opt_type == RPL_OPT_PAD10) {
3122 offset += 1;
3123 proto_item_append_text(ti, ")");
3124 continue;
3125 }
3126
3127 /* Option length */
3128 ti_opt_len = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3129 opt_len = tvb_get_uint8(tvb, opt_offset);
3130 proto_item_set_len(ti, opt_len + 2);
3131 opt_offset += 1;
3132
3133 /* decode... */
3134 switch (opt_type) {
3135 case RPL_OPT_PADN1:
3136 /* n-byte padding */
3137 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_padn, tvb, opt_offset, opt_len, ENC_NA0x00000000);
3138 proto_item_append_text(ti_opt, " (Length : %i bytes)", opt_len);
3139 opt_offset += opt_len;
3140 break;
3141 case RPL_OPT_METRIC2: {
3142 /* DAG metric container */
3143 /* See RFC 6551 for formatting. */
3144
3145 proto_tree *metric_constraint_tree;
3146 proto_item *ti_metric_constraint;
3147 uint8_t metric_constraint_type;
3148 /* N.B. keeping this as a signed value to detect potential underflow. */
3149 int metric_len;
3150
3151 while (opt_offset < offset + opt_len) {
3152 static int * const rpl_metric_flags[] = {
3153 &hf_icmpv6_rpl_opt_metric_reserved,
3154 &hf_icmpv6_rpl_opt_metric_flag_p,
3155 &hf_icmpv6_rpl_opt_metric_flag_c,
3156 &hf_icmpv6_rpl_opt_metric_flag_o,
3157 &hf_icmpv6_rpl_opt_metric_flag_r,
3158 &hf_icmpv6_rpl_opt_metric_a,
3159 &hf_icmpv6_rpl_opt_metric_prec,
3160 NULL((void*)0)
3161 };
3162 uint16_t metric_constraint_flags;
3163
3164 /* Metric/Constraint type */
3165 metric_constraint_type = tvb_get_uint8(tvb, opt_offset);
3166 ti_metric_constraint = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_metric_type, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3167 metric_constraint_tree = proto_item_add_subtree(ti_metric_constraint, ett_icmpv6_rpl_metric_type);
3168 opt_offset += 1;
3169
3170 /* Flags */
3171 proto_tree_add_bitmask(metric_constraint_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_metric_flags, ett_icmpv6_rpl_metric_flags, rpl_metric_flags, ENC_BIG_ENDIAN0x00000000);
3172 metric_constraint_flags = tvb_get_uint16(tvb, opt_offset, ENC_BIG_ENDIAN0x00000000);
3173 opt_offset += 2;
3174
3175 /* Metric length */
3176 metric_len = tvb_get_uint8(tvb, opt_offset);
3177 proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_len, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3178 proto_item_set_len(ti_metric_constraint, metric_len + 4);
3179 opt_offset += 1;
3180
3181 /* Metric/Constraint Type */
3182 switch(metric_constraint_type) {
3183 case RPL_METRIC_NSA1: /* Node State and Attribute Object */
3184 {
3185 static int * const metric_nsa_flags[] = {
3186 &hf_icmpv6_rpl_opt_metric_nsa_object_reserved,
3187 &hf_icmpv6_rpl_opt_metric_nsa_object_flags,
3188 &hf_icmpv6_rpl_opt_metric_nsa_object_flag_a,
3189 &hf_icmpv6_rpl_opt_metric_nsa_object_flag_o,
3190 NULL((void*)0)
3191 };
3192
3193 proto_item *ti_metric_nsa_object = proto_tree_add_bitmask(metric_constraint_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_metric_nsa_object,
3194 ett_icmpv6_rpl_metric_nsa_object, metric_nsa_flags, ENC_BIG_ENDIAN0x00000000);
3195 proto_item_set_len(ti_metric_nsa_object, 2);
3196 opt_offset += 2;
3197 metric_len -= 2;
3198
3199
3200 while(metric_len > 0){
3201 /* TLV */
3202 tvb_get_uint8(tvb, opt_offset);
3203 proto_item *ti_metric_nsa_tlv = proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3204 proto_tree * metric_nsa_tlv_tree = proto_item_add_subtree(ti_metric_nsa_tlv, ett_icmpv6_rpl_metric_nsa_object_tlv_type);
3205
3206 /* TLV type */
3207 proto_tree_add_item(metric_nsa_tlv_tree, hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_type, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3208 opt_offset += 1;
3209 metric_len -= 1;
3210
3211 /* TLV length */
3212 int nsa_tlv_len = tvb_get_uint8(tvb, opt_offset);
3213 proto_tree_add_item(metric_nsa_tlv_tree, hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3214 proto_item_set_len(ti_metric_nsa_tlv, nsa_tlv_len + 2);
3215 opt_offset += 1;
3216 metric_len -= 1;
3217
3218 /* TLV data */
3219 proto_tree_add_item(metric_nsa_tlv_tree, hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_data, tvb, opt_offset, nsa_tlv_len, ENC_NA0x00000000);
3220 opt_offset += nsa_tlv_len;
3221 metric_len -= nsa_tlv_len;
3222 }
3223 break;
3224 }
3225 case RPL_METRIC_NE2: /* Node Energy */
3226 {
3227 static int * const metric_ne_flags[] = {
3228 &hf_icmpv6_rpl_opt_metric_ne_object_flags,
3229 &hf_icmpv6_rpl_opt_metric_ne_object_flag_i,
3230 &hf_icmpv6_rpl_opt_metric_ne_object_type,
3231 &hf_icmpv6_rpl_opt_metric_ne_object_flag_e,
3232 &hf_icmpv6_rpl_opt_metric_ne_object_energy,
3233 NULL((void*)0)
3234 };
3235
3236 for (; metric_len > 0; metric_len -= 2) {
3237 proto_tree_add_bitmask(metric_constraint_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_metric_ne_object,
3238 ett_icmpv6_rpl_metric_ne_object, metric_ne_flags, ENC_BIG_ENDIAN0x00000000);
3239 opt_offset += 2;
3240 }
3241 break;
3242 }
3243 case RPL_METRIC_HP3: /* Hop Count Object */
3244 {
3245 static int * const metric_hp_flags[] = {
3246 &hf_icmpv6_rpl_opt_metric_hp_object_reserved,
3247 &hf_icmpv6_rpl_opt_metric_hp_object_flags,
3248 &hf_icmpv6_rpl_opt_metric_hp_object_hp,
3249 NULL((void*)0)
3250 };
3251 proto_tree_add_bitmask(metric_constraint_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_metric_hp_object,
3252 ett_icmpv6_rpl_metric_hp_object, metric_hp_flags, ENC_BIG_ENDIAN0x00000000);
3253 opt_offset += 2;
3254 break;
3255 }
3256 case RPL_METRIC_LT4: /* Link Throughput Object */
3257 for (; metric_len > 0; metric_len -= 4) {
3258 proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_lt_object_lt, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000);
3259 opt_offset += 4;
3260 }
3261 break;
3262 case RPL_METRIC_LL5: /* Link Latency Object */
3263 for (; metric_len > 0; metric_len -= 4) {
3264 proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_ll_object_ll, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000);
3265 opt_offset += 4;
3266 }
3267 break;
3268 case RPL_METRIC_LQL6: /* Link Quality Level Object */
3269 {
3270 static int * const metric_lql_flags[] = {
3271 &hf_icmpv6_rpl_opt_metric_lql_object_val,
3272 &hf_icmpv6_rpl_opt_metric_lql_object_counter,
3273 NULL((void*)0)
3274 };
3275
3276 proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_lql_object_res, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3277 opt_offset += 1;
3278 metric_len -= 1;
3279 for (; metric_len > 0; metric_len -= 1) {
3280 proto_tree_add_bitmask(metric_constraint_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_metric_lql_object,
3281 ett_icmpv6_rpl_metric_lql_object, metric_lql_flags, ENC_BIG_ENDIAN0x00000000);
3282 opt_offset += 1;
3283 }
3284 break;
3285 }
3286 case RPL_METRIC_ETX7: /* ETX Object */
3287 for (; metric_len > 0; metric_len -= 2) {
3288 proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_etx_object_etx, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3289 opt_offset += 2;
3290 }
3291 break;
3292 case RPL_METRIC_LC8: /* Link Color Object */
3293 proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_lc_object_res, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3294 opt_offset += 1;
3295 metric_len -= 1;
3296 for (; metric_len > 0; metric_len -= 2) {
3297 ti_opt = proto_tree_add_item(metric_constraint_tree, hf_icmpv6_rpl_opt_metric_lc_object, tvb, opt_offset, 2, ENC_NA0x00000000);
3298 flag_tree = proto_item_add_subtree(ti_opt, ett_icmpv6_rpl_metric_lc_object);
3299 proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_metric_lc_object_lc, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3300 if (metric_constraint_flags & RPL_METRIC_FLAG_C0x0200) {
3301 proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_metric_lc_object_reserved, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3302 proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_metric_lc_object_flag_i, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3303 } else if (metric_constraint_flags & RPL_METRIC_FLAG_R0x0080) {
3304 proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_metric_lc_object_counter, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3305 } else {
3306 expert_add_info(pinfo, ti_opt, &ei_icmpv6_rpl_unknown_metric);
3307 }
3308 opt_offset += 2;
3309 }
3310 break;
3311 default:
3312 expert_add_info(pinfo, ti_opt_len, &ei_icmpv6_rpl_unknown_metric);
3313 break;
3314 }
3315 }
3316 break;
3317 }
3318 case RPL_OPT_ROUTING3: {
3319 uint8_t prefix_len;
3320 ws_in6_addr prefix;
3321 address prefix_addr;
3322 uint32_t lifetime;
3323
3324 static int * const rpl_flags[] = {
3325 &hf_icmpv6_rpl_opt_route_pref,
3326 &hf_icmpv6_rpl_opt_route_reserved,
3327 NULL((void*)0)
3328 };
3329
3330 /* Prefix length */
3331 prefix_len = tvb_get_uint8(tvb, opt_offset);
3332 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_prefix_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3333 opt_offset +=1;
3334
3335 /* Flags */
3336 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_route_flag,
3337 ett_icmpv6_rpl_flag_routing, rpl_flags, ENC_BIG_ENDIAN0x00000000);
3338 opt_offset +=1;
3339
3340 /* Prefix lifetime. */
3341 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_rpl_opt_route_lifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
3342 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
3343 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
3344 }
3345 opt_offset += 4;
3346
3347 switch(opt_len){
3348 case 6: /* Default Option Length without prefix */
3349 proto_item_append_text(ti, " ::/%d", prefix_len);
3350 break;
3351 case 14:
3352 memset(&prefix, 0, sizeof(prefix));
3353 tvb_memcpy(tvb, (uint8_t *)&prefix.bytes, opt_offset, 8);
3354 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_rpl_opt_route_prefix, tvb, opt_offset, 8, &prefix);
3355 set_address(&prefix_addr, AT_IPv6, 16, prefix.bytes);
3356 proto_item_append_text(ti, " %s/%d", address_to_str(pinfo->pool, &prefix_addr), prefix_len);
3357 opt_offset += 8;
3358 break;
3359 case 22:
3360 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
3361 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
3362 opt_offset += 16;
3363 break;
3364 default:
3365 expert_add_info(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length);
3366 break;
3367 }
3368 break;
3369 }
3370 case RPL_OPT_CONFIG4: {
3371 static int * const rpl_config_flags[] = {
3372 &hf_icmpv6_rpl_opt_config_reserved,
3373 &hf_icmpv6_rpl_opt_config_auth,
3374 &hf_icmpv6_rpl_opt_config_pcs,
3375 NULL((void*)0)
3376 };
3377 proto_item *pi;
3378
3379 /* Flags */
3380 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_config_flag,
3381 ett_icmpv6_rpl_flag_config, rpl_config_flags, ENC_BIG_ENDIAN0x00000000);
3382 opt_offset += 1;
3383
3384 /* DIOIntervalDoublings */
3385 pi = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_doublings, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3386 proto_item_append_text(pi, " (Imax=%.0fms)", pow(2, tvb_get_uint8(tvb, opt_offset + 1) + tvb_get_uint8(tvb, opt_offset)));
3387 opt_offset += 1;
3388
3389 /* DIOIntervalMin */
3390 pi = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_min_interval, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3391 proto_item_append_text(pi, " (Imin=%.0fms)", pow(2, tvb_get_uint8(tvb, opt_offset)));
3392 opt_offset += 1;
3393
3394 /* DIORedundancyConstant */
3395 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_redundancy, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3396 opt_offset += 1;
3397
3398 /* MaxRankIncrease */
3399 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_rank_incr, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3400 opt_offset += 2;
3401
3402 /* MinHopRankInc */
3403 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_hop_rank_inc, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3404 opt_offset += 2;
3405
3406 /* OCP */
3407 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_ocp, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3408 opt_offset += 2;
3409
3410 /* Reserved */
3411 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_rsv, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3412 opt_offset += 1;
3413
3414 /* Default Lifetime */
3415 pi = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_def_lifetime, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3416 proto_item_append_text(pi, " (%us)", tvb_get_uint8(tvb, opt_offset) * tvb_get_ntohs(tvb, opt_offset + 1));
3417 opt_offset += 1;
3418
3419 /* Lifetime Unit */
3420 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_config_lifetime_unit, tvb, opt_offset, 2, ENC_BIG_ENDIAN0x00000000);
3421 opt_offset += 2;
3422 break;
3423 }
3424 case RPL_OPT_TARGET5: {
3425 uint8_t prefix_len;
3426 ws_in6_addr target_prefix;
3427 address target_prefix_addr;
3428
3429 /* Flag */
3430 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_target_flag, tvb, opt_offset, 1, ENC_NA0x00000000);
3431 opt_offset += 1;
3432
3433 /* Prefix length */
3434 prefix_len = tvb_get_uint8(tvb, opt_offset);
3435 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_target_prefix_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3436 opt_offset += 1;
3437
3438 /* Target Prefix */
3439
3440 switch(opt_len){
3441 case 2: /* Default Option Length without prefix */
3442 proto_item_append_text(ti, " ::/%d", prefix_len);
3443 break;
3444 case 10:
3445 memset(&target_prefix, 0, sizeof(target_prefix));
3446 tvb_memcpy(tvb, (uint8_t *)&target_prefix.bytes, opt_offset, 8);
3447 proto_tree_add_ipv6(icmp6opt_tree, hf_icmpv6_rpl_opt_target_prefix, tvb, opt_offset, 8, &target_prefix);
3448 set_address(&target_prefix_addr, AT_IPv6, 16, target_prefix.bytes);
3449 proto_item_append_text(ti, " %s/%d", address_to_str(pinfo->pool, &target_prefix_addr), prefix_len);
3450 opt_offset += 8;
3451 break;
3452 case 18:
3453 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_target_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
3454 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
3455 opt_offset += 16;
3456 break;
3457 default:
3458 expert_add_info(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length);
3459 break;
3460 }
3461 break;
3462 }
3463 case RPL_OPT_TRANSIT6: {
3464 static int * const rpl_transit_flags[] = {
3465 &hf_icmpv6_rpl_opt_transit_flag_e,
3466 &hf_icmpv6_rpl_opt_transit_flag_i,
3467 &hf_icmpv6_rpl_opt_transit_flag_rsv,
3468 NULL((void*)0)
3469 };
3470 static int * const rpl_transit_pathctl[] = {
3471 &hf_icmpv6_rpl_opt_transit_pathctl_pc1,
3472 &hf_icmpv6_rpl_opt_transit_pathctl_pc2,
3473 &hf_icmpv6_rpl_opt_transit_pathctl_pc3,
3474 &hf_icmpv6_rpl_opt_transit_pathctl_pc4,
3475 NULL((void*)0),
3476 };
3477
3478 /* Flags */
3479 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_transit_flag,
3480 ett_icmpv6_rpl_flag_transit, rpl_transit_flags, ENC_BIG_ENDIAN0x00000000);
3481 opt_offset += 1;
3482
3483 /* Path Control */
3484 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_transit_pathctl,
3485 ett_icmpv6_rpl_transit_pathctl, rpl_transit_pathctl, ENC_BIG_ENDIAN0x00000000);
3486 opt_offset += 1;
3487
3488 /* Path Sequence */
3489 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_transit_pathseq, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3490 opt_offset += 1;
3491
3492 /* Path Lifetime */
3493 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_transit_pathlifetime, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3494 opt_offset += 1;
3495
3496 /* Option contains parent */
3497 if(opt_len > 4)
3498 {
3499 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_transit_parent, tvb, opt_offset, 16, ENC_NA0x00000000);
3500 proto_item_append_text(ti, " %s", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset));
3501 opt_offset += 16;
3502 }
3503
3504 break;
3505 }
3506 case RPL_OPT_SOLICITED7: {
3507 static int * const rpl_solicited_flags[] = {
3508 &hf_icmpv6_rpl_opt_solicited_flag_v,
3509 &hf_icmpv6_rpl_opt_solicited_flag_i,
3510 &hf_icmpv6_rpl_opt_solicited_flag_d,
3511 &hf_icmpv6_rpl_opt_solicited_flag_rsv,
3512 NULL((void*)0)
3513 };
3514
3515 /*Instance ID */
3516 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_solicited_instance, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3517 opt_offset += 1;
3518
3519 /* Flags */
3520 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_solicited_flag,
3521 ett_icmpv6_rpl_flag_solicited, rpl_solicited_flags, ENC_BIG_ENDIAN0x00000000);
3522 opt_offset += 1;
3523
3524 /* DODAG ID */
3525 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_solicited_dodagid, tvb, opt_offset, 16, ENC_NA0x00000000);
3526 opt_offset += 16;
3527
3528 /* Version Number */
3529 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_solicited_version, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3530 opt_offset += 1;
3531
3532 break;
3533 }
3534 case RPL_OPT_PREFIX8: {
3535 /* Destination prefix option. */
3536 uint32_t lifetime;
3537 uint32_t prefix_len;
3538 static int * const rpl_prefix_flags[] = {
3539 &hf_icmpv6_rpl_opt_prefix_flag_l,
3540 &hf_icmpv6_rpl_opt_prefix_flag_a,
3541 &hf_icmpv6_rpl_opt_prefix_flag_r,
3542 &hf_icmpv6_rpl_opt_prefix_flag_rsv,
3543 NULL((void*)0)
3544 };
3545
3546 /* Prefix length */
3547 proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_rpl_opt_prefix_length, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000, &prefix_len);
3548 opt_offset +=1;
3549
3550 /* Flags */
3551 proto_tree_add_bitmask(icmp6opt_tree, tvb, opt_offset, hf_icmpv6_rpl_opt_prefix_flag,
3552 ett_icmpv6_rpl_flag_prefix, rpl_prefix_flags, ENC_BIG_ENDIAN0x00000000);
3553 opt_offset += 1;
3554
3555 /* Valid Lifetime */
3556 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_rpl_opt_prefix_vlifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
3557 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
3558 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
3559 }
3560 opt_offset += 4;
3561
3562 /* Preferred Lifetime */
3563 ti_opt = proto_tree_add_item_ret_uint(icmp6opt_tree, hf_icmpv6_rpl_opt_prefix_plifetime, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
3564 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
3565 proto_item_append_text(ti_opt, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
3566 }
3567 opt_offset += 4;
3568
3569 /* 4 reserved bytes. */
3570 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_reserved, tvb, opt_offset, 4, ENC_NA0x00000000);
3571 opt_offset += 4;
3572
3573 /* Prefix */
3574 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_prefix, tvb, opt_offset, 16, ENC_NA0x00000000);
3575 proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, opt_offset), prefix_len);
3576 opt_offset += 16;
3577
3578 break;
3579 }
3580
3581 case RPL_OPT_TARGETDESC9: {
3582
3583 /* Descriptor */
3584 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_targetdesc, tvb, opt_offset, 4, ENC_BIG_ENDIAN0x00000000);
3585 opt_offset += 4;
3586 break;
3587 }
3588
3589 case RPL_OPT_ROUTE_DISCOVERY10: {
3590 int num_of_addr = 0;
3591 uint8_t flags = 0, compr = 0, addr_len = 0, lt_mr_nh = 0;
3592 uint8_t addr[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
3593
3594 /* Flags */
3595 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_discovery_flag, tvb, opt_offset, 1, ENC_NA0x00000000);
3596 flag_tree = proto_item_add_subtree(ti_opt, ett_icmpv6_rpl_route_discovery_flag);
3597
3598 flags = tvb_get_uint8(tvb, opt_offset);
3599 compr = flags & RPL_OPT_ROUTE_DISCOVERY_COMPR0x0F;
3600
3601 /* Reply */
3602 ti_opt_reply = proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_route_discovery_reply, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3603
3604 /* Hop-by-Hop */
3605 ti_opt_hop_by_hop = proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_route_discovery_hop_by_hop, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3606
3607 /* Num of Source Routes */
3608 ti_opt_num_of_routes = proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_route_discovery_num_of_routes, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3609
3610 /* Compr */
3611 proto_tree_add_item(flag_tree, hf_icmpv6_rpl_opt_route_discovery_compr, tvb, opt_offset, 1, ENC_BIG_ENDIAN0x00000000);
3612 opt_offset +=1;
3613
3614 /* Lifetime / MaxRank / NH */
3615 lt_mr_nh = tvb_get_uint8(tvb, opt_offset);
3616 ti_opt_lifetime = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_discovery_lifetime, tvb, opt_offset, 1, ENC_NA0x00000000);
3617
3618 if ((icmp6_code == ICMP6_RPL_P2P_DRO0x04) || (icmp6_code == ICMP6_RPL_P2P_SDRO0x84)) {
3619 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_discovery_nh, tvb, opt_offset, 1, ENC_NA0x00000000);
3620 } else {
3621 ti_opt_mr_nh = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_discovery_maxrank, tvb, opt_offset, 1, ENC_NA0x00000000);
3622 }
3623
3624 opt_offset +=1;
3625
3626 /* add expert and auxiliary info */
3627 switch (icmp6_code) {
3628 case ICMP6_RPL_P2P_SDRO0x84:
3629 case ICMP6_RPL_P2P_DRO0x04:
3630
3631 if (flags & RPL_OPT_ROUTE_DISCOVERY_R0x80) {
3632 expert_add_info(pinfo, ti_opt_reply, &ei_icmpv6_rpl_p2p_dro_rdo_zero);
3633 }
3634
3635 if (flags & RPL_OPT_ROUTE_DISCOVERY_N0x30) {
3636 expert_add_info(pinfo, ti_opt_num_of_routes, &ei_icmpv6_rpl_p2p_dro_rdo_zero);
3637 }
3638
3639 if (lt_mr_nh & RPL_OPT_ROUTE_DISCOVERY_L0xC0) {
3640 expert_add_info(pinfo, ti_opt_lifetime, &ei_icmpv6_rpl_p2p_dro_rdo_zero);
3641 }
3642
3643 break;
3644 default:
3645
3646 if (flags & RPL_OPT_ROUTE_DISCOVERY_H0x40) {
3647 if (!(flags & RPL_OPT_ROUTE_DISCOVERY_R0x80)) {
3648 expert_add_info(pinfo, ti_opt_hop_by_hop, &ei_icmpv6_rpl_p2p_hop_by_hop);
3649 }
3650
3651 if (flags & RPL_OPT_ROUTE_DISCOVERY_N0x30) {
3652 expert_add_info(pinfo, ti_opt_num_of_routes, &ei_icmpv6_rpl_p2p_num_of_routes);
3653 }
3654 }
3655
3656 proto_item_append_text(ti_opt_lifetime, " (%u sec)", pow4(uint32_t, (lt_mr_nh & RPL_OPT_ROUTE_DISCOVERY_L) >> 6)(((uint32_t)1U) << (2*((lt_mr_nh & 0xC0) >> 6
)))
);
3657
3658 if (!(lt_mr_nh & RPL_OPT_ROUTE_DISCOVERY_MR_NH0x3F)) {
3659 proto_item_append_text(ti_opt_mr_nh, " (Infinity)");
3660 }
3661
3662 break;
3663 }
3664
3665 /* TargetAddr */
3666 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_discovery_target_addr, tvb, opt_offset, 16, ENC_NA0x00000000);
3667 opt_offset +=16;
3668
3669 addr_len = (16 - compr);
3670 num_of_addr = (opt_len - 18) / addr_len;
3671
3672 /* Address Vector */
3673 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_discovery_addr_vec, tvb, opt_offset, (opt_len - 18), ENC_NA0x00000000);
3674 flag_tree = proto_item_add_subtree(ti_opt, ett_icmpv6_rpl_route_discovery_addr_vec);
3675
3676 proto_item_append_text(flag_tree, " (%d Address%s)", num_of_addr, num_of_addr != 1 ? "es" : "");
3677
3678 while (num_of_addr--) {
3679 memset(addr, 0, sizeof(addr));
3680 tvb_memcpy(tvb, addr + compr, opt_offset, addr_len);
3681 proto_tree_add_ipv6(flag_tree, hf_icmpv6_rpl_opt_route_discovery_addr_vec_addr, tvb, opt_offset, addr_len, (ws_in6_addr *)addr);
3682 opt_offset += addr_len;
3683 }
3684
3685 break;
3686 }
3687 default :
3688 expert_add_info_format(pinfo, ti, &ei_icmpv6_undecoded_rpl_option,
3689 "Dissector for ICMPv6 RPL Option"
3690 " (%d) code not implemented, Contact"
3691 " Wireshark developers if you want this supported", opt_type);
3692 proto_tree_add_item(icmp6opt_tree, hf_icmpv6_data, tvb, opt_offset, opt_len, ENC_NA0x00000000);
3693 opt_offset += opt_len;
3694 break;
3695 } /* switch (opt_type) */
3696
3697 offset += opt_len + 2;
3698
3699 if(offset > opt_offset){
3700 ti_opt = proto_tree_add_item(icmp6opt_tree, hf_icmpv6_unknown_data, tvb, opt_offset, offset - opt_offset, ENC_NA0x00000000);
3701 expert_add_info(pinfo, ti_opt, &ei_icmpv6_unknown_data);
3702 }
3703
3704 /* Close the ) to option root label */
3705 proto_item_append_text(ti, ")");
3706 } /* while */
3707 return offset;
3708}
3709
3710static int
3711dissect_rpl_control(tvbuff_t *tvb, int rpl_offset, packet_info *pinfo _U___attribute__((unused)), proto_tree *icmp6_tree, uint8_t icmp6_type _U___attribute__((unused)), uint8_t icmp6_code)
3712{
3713 proto_item *ti;
3714
3715 /* Secure RPL ? (ICMP Code start to 0x8x) */
3716 if(icmp6_code & ICMP6_RPL_SECURE0x80)
3717 {
3718 uint8_t kim, lvl;
3719 static int * const rpl_secure_flags[] = {
3720 &hf_icmpv6_rpl_secure_flag_t,
3721 &hf_icmpv6_rpl_secure_flag_rsv,
3722 NULL((void*)0)
3723 };
3724 static int * const rpl_secure_flags2[] = {
3725 &hf_icmpv6_rpl_secure_kim,
3726 &hf_icmpv6_rpl_secure_lvl,
3727 &hf_icmpv6_rpl_secure_rsv,
3728 NULL((void*)0)
3729 };
3730
3731 /* Flags */
3732 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_secure_flag,
3733 ett_icmpv6_flag_secure, rpl_secure_flags, ENC_BIG_ENDIAN0x00000000);
3734 rpl_offset += 1;
3735
3736 /* Algorithm */
3737 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_algorithm, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3738 rpl_offset += 1;
3739
3740 /* KIM & LVL */
3741 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_secure_flag,
3742 ett_icmpv6_flag_secure, rpl_secure_flags2, ENC_BIG_ENDIAN0x00000000);
3743 kim = tvb_get_uint8(tvb, rpl_offset) & RPL_SECURE_KIM0xC0 >> 6;
3744 lvl = tvb_get_uint8(tvb, rpl_offset) & RPL_SECURE_LVL0x07;
3745 rpl_offset += 1;
3746
3747 /* Flags */
3748 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_flag, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3749 rpl_offset += 1;
3750
3751 /* Counter */
3752 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_counter, tvb, rpl_offset, 4, ENC_BIG_ENDIAN0x00000000);
3753 rpl_offset += 4;
3754
3755 /* Key Identifier */
3756 switch(kim){
3757 case 0:
3758 {
3759 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_key_index, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3760 rpl_offset += 1;
3761 break;
3762 }
3763 case 1:
3764 {
3765 /* No Key Identifier */
3766 break;
3767 }
3768 case 2:
3769 {
3770 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_key_source, tvb, rpl_offset, 8, ENC_NA0x00000000);
3771 rpl_offset += 8;
3772 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_key_index, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3773 rpl_offset += 1;
3774 break;
3775 }
3776 case 3:
3777 {
3778 if(lvl == 1 || lvl == 3)
3779 {
3780 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_key_source, tvb, rpl_offset, 8, ENC_NA0x00000000);
3781 rpl_offset += 8;
3782 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_secure_key_index, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3783 rpl_offset += 1;
3784 }
3785 break;
3786 }
3787
3788 }
3789
3790 }
3791 switch(icmp6_code){
3792 case ICMP6_RPL_DIS0x00: /* DODAG Information Solicitation (0) */
3793 case ICMP6_RPL_SDIS0x80: /* Secure DODAG Information Solicitation (128) */
3794 {
3795 /* Flags */
3796 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dis_flag, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3797 rpl_offset += 1;
3798
3799 /* Reserved */
3800 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, rpl_offset, 1, ENC_NA0x00000000);
3801 rpl_offset += 1;
3802
3803 /* RPL Options */
3804 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
3805 break;
3806 }
3807 case ICMP6_RPL_DIO0x01: /* DODAG Information Object (1) */
3808 case ICMP6_RPL_SDIO0x81: /* Secure DODAG Information Object (129) */
3809 {
3810 static int * const rpl_dio_flags[] = {
3811 &hf_icmpv6_rpl_dio_flag_g,
3812 &hf_icmpv6_rpl_dio_flag_0,
3813 &hf_icmpv6_rpl_dio_flag_mop,
3814 &hf_icmpv6_rpl_dio_flag_prf,
3815 NULL((void*)0)
3816 };
3817
3818 /* RPLInstanceID */
3819 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dio_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3820 rpl_offset += 1;
3821
3822 /* Version Number */
3823 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dio_version, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3824 rpl_offset += 1;
3825
3826 /* Rank */
3827 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dio_rank, tvb, rpl_offset, 2, ENC_BIG_ENDIAN0x00000000);
3828 rpl_offset += 2;
3829
3830 /* Flags */
3831 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_dio_flag,
3832 ett_icmpv6_flag_rpl_dio, rpl_dio_flags, ENC_BIG_ENDIAN0x00000000);
3833 rpl_offset += 1;
3834
3835 /* Destination Advertisement Trigger Sequence Number (DTSN) */
3836 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dio_dtsn, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3837 rpl_offset += 1;
3838
3839 /* Flags */
3840 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dio_flag, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3841 rpl_offset += 1;
3842
3843 /* Reserved */
3844 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, rpl_offset, 1, ENC_NA0x00000000);
3845 rpl_offset += 1;
3846
3847 /* DODAGID */
3848 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dio_dagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
3849 rpl_offset += 16;
3850
3851 /* RPL Options */
3852 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
3853 break;
3854 }
3855 case ICMP6_RPL_DAO0x02: /* Destination Advertisement Object (2) */
3856 case ICMP6_RPL_SDAO0x82: /* Secure Destination Advertisement Object (130) */
3857 {
3858 uint8_t flags;
3859 static int * const rpl_dao_flags[] = {
3860 &hf_icmpv6_rpl_dao_flag_k,
3861 &hf_icmpv6_rpl_dao_flag_d,
3862 &hf_icmpv6_rpl_dao_flag_rsv,
3863 NULL((void*)0)
3864 };
3865
3866 /* DAO Instance */
3867 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dao_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3868 rpl_offset += 1;
3869
3870 /* Flags */
3871 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_dao_flag,
3872 ett_icmpv6_flag_rpl_dao, rpl_dao_flags, ENC_BIG_ENDIAN0x00000000);
3873 flags = tvb_get_uint8(tvb, rpl_offset);
3874 rpl_offset += 1;
3875
3876 /* Reserved */
3877 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, rpl_offset, 1, ENC_NA0x00000000);
3878 rpl_offset += 1;
3879
3880 /* Sequence */
3881 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dao_sequence, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3882 rpl_offset += 1;
3883
3884 /* DODAGID */
3885 if(flags & RPL_DAO_FLAG_D0x40)
3886 {
3887 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dao_dodagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
3888 rpl_offset += 16;
3889 }
3890 /* Options */
3891 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
3892 break;
3893 }
3894 case ICMP6_RPL_DAOACK0x03: /* Destination Advertisement Object Acknowledgment (3) */
3895 case ICMP6_RPL_SDAOACK0x83: /* Secure Destination Advertisement Object Acknowledgment (131) */
3896 {
3897 uint8_t flags;
3898 static int * const rpl_daoack_flags[] = {
3899 &hf_icmpv6_rpl_daoack_flag_d,
3900 &hf_icmpv6_rpl_daoack_flag_rsv,
3901 NULL((void*)0)
3902 };
3903
3904 /* DAO Instance */
3905 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_daoack_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3906 rpl_offset += 1;
3907
3908 /* Flags */
3909 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_daoack_flag,
3910 ett_icmpv6_flag_rpl_daoack, rpl_daoack_flags, ENC_BIG_ENDIAN0x00000000);
3911 flags = tvb_get_uint8(tvb, rpl_offset);
3912 rpl_offset += 1;
3913
3914 /* DAO Sequence */
3915 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_daoack_sequence, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3916 rpl_offset += 1;
3917
3918 /* Status */
3919 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_daoack_status, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3920 rpl_offset += 1;
3921
3922 /* DODAGID */
3923 if(flags & RPL_DAOACK_FLAG_D0x80)
3924 {
3925 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_daoack_dodagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
3926 rpl_offset += 16;
3927 }
3928
3929 /* Options */
3930 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
3931 break;
3932 }
3933 case ICMP6_RPL_DCO0x07: /* Destination Cleanup Object (7) */
3934
3935 {
3936 uint8_t flags;
3937 static int * const rpl_dco_flags[] = {
3938 &hf_icmpv6_rpl_dco_flag_k,
3939 &hf_icmpv6_rpl_dco_flag_d,
3940 &hf_icmpv6_rpl_dco_flag_rsv,
3941 NULL((void*)0)
3942 };
3943
3944 /* DCO Instance */
3945 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dco_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3946 rpl_offset += 1;
3947
3948 /* Flags */
3949 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_dco_flags,
3950 ett_icmpv6_flag_rpl_dco, rpl_dco_flags, ENC_BIG_ENDIAN0x00000000);
3951 flags = tvb_get_uint8(tvb, rpl_offset);
3952 rpl_offset += 1;
3953
3954 /* RPL status */
3955 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dco_status, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3956 rpl_offset += 1;
3957
3958 /* Sequence */
3959 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dco_sequence, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3960 rpl_offset += 1;
3961
3962 /* DODAGID */
3963 if(flags & RPL_DCO_FLAG_D0x40)
3964 {
3965 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dco_dodagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
3966 rpl_offset += 16;
3967 }
3968 /* Options */
3969 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
3970 break;
3971 }
3972 case ICMP6_RPL_DCOACK0x08: /* Destination Advertisement Object Acknowledgment (8) */
3973
3974 {
3975 uint8_t flags;
3976 static int * const rpl_dcoack_flags[] = {
3977 &hf_icmpv6_rpl_dcoack_flag_d,
3978 &hf_icmpv6_rpl_dcoack_flag_rsv,
3979 NULL((void*)0)
3980 };
3981
3982 /* DCO Instance */
3983 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dcoack_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3984 rpl_offset += 1;
3985
3986 /* Flags */
3987 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_dcoack_flag,
3988 ett_icmpv6_flag_rpl_dcoack, rpl_dcoack_flags, ENC_BIG_ENDIAN0x00000000);
3989 flags = tvb_get_uint8(tvb, rpl_offset);
3990 rpl_offset += 1;
3991
3992 /* DCO Sequence */
3993 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dcoack_sequence, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3994 rpl_offset += 1;
3995
3996 /* Status */
3997 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dcoack_status, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
3998 rpl_offset += 1;
3999
4000 /* DODAGID */
4001 if(flags & RPL_DCOACK_FLAG_D0x80)
4002 {
4003 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_dcoack_dodagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
4004 rpl_offset += 16;
4005 }
4006
4007 /* Options */
4008 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
4009 break;
4010 }
4011 case ICMP6_RPL_CC0x8A:
4012 {
4013 static int * const rpl_cc_flags[] = {
4014 &hf_icmpv6_rpl_cc_flag_r,
4015 &hf_icmpv6_rpl_cc_flag_rsv,
4016 NULL((void*)0)
4017 };
4018
4019 /* CC Instance */
4020 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_cc_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
4021 rpl_offset += 1;
4022
4023 /* Flags */
4024 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_cc_flag,
4025 ett_icmpv6_flag_rpl_cc, rpl_cc_flags, ENC_BIG_ENDIAN0x00000000);
4026 rpl_offset += 1;
4027
4028 /* CC Nonce */
4029 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_cc_nonce, tvb, rpl_offset, 2, ENC_BIG_ENDIAN0x00000000);
4030 rpl_offset += 2;
4031
4032 /* DODAGID */
4033 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_cc_dodagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
4034 rpl_offset += 16;
4035
4036 /* Destination Counter */
4037 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_cc_destination_counter, tvb, rpl_offset, 4, ENC_BIG_ENDIAN0x00000000);
4038 rpl_offset += 4;
4039
4040 /* Options */
4041 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
4042 break;
4043 }
4044 case ICMP6_RPL_P2P_DRO0x04: /* P2P Discovery Reply Object (0x4) */
4045 case ICMP6_RPL_P2P_SDRO0x84: /* Secure P2P Discovery Reply Object (0x84) */
4046 {
4047 static int * const rpl_p2p_dro_flags[] = {
4048 &hf_icmpv6_rpl_p2p_dro_flag_stop,
4049 &hf_icmpv6_rpl_p2p_dro_flag_ack,
4050 &hf_icmpv6_rpl_p2p_dro_flag_seq,
4051 &hf_icmpv6_rpl_p2p_dro_flag_reserved,
4052 NULL((void*)0)
4053 };
4054
4055 /* RPLInstanceID */
4056 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_p2p_dro_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
4057 rpl_offset += 1;
4058
4059 /* Version Number */
4060 ti = proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_p2p_dro_version, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
4061 if (tvb_get_uint8(tvb, rpl_offset)) {
4062 expert_add_info(pinfo, ti, &ei_icmpv6_rpl_p2p_dro_zero);
4063 }
4064 rpl_offset += 1;
4065
4066 /* Flags */
4067 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_p2p_dro_flag,
4068 ett_icmpv6_rpl_p2p_dro_flag, rpl_p2p_dro_flags, ENC_BIG_ENDIAN0x00000000);
4069 rpl_offset += 2;
4070
4071 /* DODAGID */
4072 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_p2p_dro_dagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
4073 rpl_offset += 16;
4074
4075 /* RPL Options */
4076 rpl_offset = dissect_icmpv6_rpl_opt(tvb, rpl_offset, pinfo, icmp6_tree, icmp6_code);
4077 break;
4078 }
4079 case ICMP6_RPL_P2P_DROACK0x05: /* P2P Discovery Reply Object Acknowledgement (0x5) */
4080 case ICMP6_RPL_P2P_SDROACK0x85: /* Secure P2P Discovery Reply Object Acknowledgement (0x85) */
4081 {
4082 static int * const rpl_p2p_droack_flags[] = {
4083 &hf_icmpv6_rpl_p2p_droack_flag_seq,
4084 &hf_icmpv6_rpl_p2p_droack_flag_reserved,
4085 NULL((void*)0)
4086 };
4087
4088 /* RPLInstanceID */
4089 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_p2p_dro_instance, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
4090 rpl_offset += 1;
4091
4092 /* Version Number */
4093 ti = proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_p2p_dro_version, tvb, rpl_offset, 1, ENC_BIG_ENDIAN0x00000000);
4094 if (tvb_get_uint8(tvb, rpl_offset)) {
4095 expert_add_info(pinfo, ti, &ei_icmpv6_rpl_p2p_dro_zero);
4096 }
4097 rpl_offset += 1;
4098
4099 /* Flags */
4100 proto_tree_add_bitmask(icmp6_tree, tvb, rpl_offset, hf_icmpv6_rpl_p2p_droack_flag,
4101 ett_icmpv6_rpl_p2p_droack_flag, rpl_p2p_droack_flags, ENC_BIG_ENDIAN0x00000000);
4102 rpl_offset += 2;
4103
4104 /* DODAGID */
4105 proto_tree_add_item(icmp6_tree, hf_icmpv6_rpl_p2p_dro_dagid, tvb, rpl_offset, 16, ENC_NA0x00000000);
4106 rpl_offset += 16;
4107 break;
4108 }
4109
4110 }
4111 return rpl_offset;
4112}
4113/* RFC 4620 - IPv6 Node Information Queries */
4114
4115static int
4116dissect_nodeinfo(tvbuff_t *tvb, int ni_offset, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, uint8_t icmp6_type, uint8_t icmp6_code)
4117{
4118 uint16_t qtype;
4119 unsigned used_bytes;
4120 static int * const ni_flags[] = {
4121 &hf_icmpv6_ni_flag_g,
4122 &hf_icmpv6_ni_flag_s,
4123 &hf_icmpv6_ni_flag_l,
4124 &hf_icmpv6_ni_flag_c,
4125 &hf_icmpv6_ni_flag_a,
4126 &hf_icmpv6_ni_flag_t,
4127 &hf_icmpv6_ni_flag_rsv,
4128 NULL((void*)0)
4129 };
4130
4131 /* Qtype */
4132 proto_tree_add_item_ret_uint16(tree, hf_icmpv6_ni_qtype, tvb, ni_offset, 2, ENC_BIG_ENDIAN0x00000000, &qtype);
4133 ni_offset += 2;
4134
4135 /* Flags */
4136 proto_tree_add_bitmask(tree, tvb, ni_offset, hf_icmpv6_ni_flag,
4137 ett_icmpv6_flag_ni, ni_flags, ENC_BIG_ENDIAN0x00000000);
4138 ni_offset += 2;
4139
4140 /* Nonce */
4141 proto_tree_add_item(tree, hf_icmpv6_ni_nonce, tvb, ni_offset, 8, ENC_BIG_ENDIAN0x00000000);
4142 ni_offset += 8;
4143
4144 /* Data ? */
4145 if(tvb_reported_length_remaining(tvb, ni_offset) == 0){
4146 return ni_offset;
4147 }
4148
4149 if(icmp6_type == ICMP6_NI_QUERY139){
4150 switch(icmp6_code){
4151 case ICMP6_NI_SUBJ_IPV60: {
4152 proto_tree_add_item(tree, hf_icmpv6_ni_query_subject_ipv6, tvb, ni_offset, 16, ENC_NA0x00000000);
4153 ni_offset += 16;
4154 break;
4155 }
4156 case ICMP6_NI_SUBJ_FQDN1: {
4157 int fqdn_len;
4158 const char *fqdn_name;
4159 used_bytes = get_dns_name(pinfo->pool, tvb, ni_offset, 0, ni_offset, &fqdn_name, &fqdn_len);
4160 proto_tree_add_string(tree, hf_icmpv6_ni_query_subject_fqdn, tvb, ni_offset, used_bytes,
4161 format_text(pinfo->pool, fqdn_name, fqdn_len));
4162 ni_offset += used_bytes;
4163 break;
4164 }
4165 case ICMP6_NI_SUBJ_IPV42: {
4166 proto_tree_add_item(tree, hf_icmpv6_ni_query_subject_ipv4, tvb, ni_offset, 4, ENC_BIG_ENDIAN0x00000000);
4167 ni_offset += 4;
4168 break;
4169 }
4170 }
4171 } else { /* It is ICMP6_NI_REPLY */
4172 switch(qtype){
4173 case NI_QTYPE_NOOP0:
4174 break;
4175 case NI_QTYPE_NODENAME2: {
4176 int node_name_len;
4177 const char *node_name;
4178 /* TTL */
4179 proto_tree_add_item(tree, hf_icmpv6_ni_reply_node_ttl, tvb, ni_offset, 4, ENC_BIG_ENDIAN0x00000000);
4180 ni_offset += 4;
4181 /* Data ? */
4182 if(tvb_reported_length_remaining(tvb, ni_offset) == 0){
4183 return ni_offset;
4184 }
4185 while(ni_offset < (int)tvb_reported_length(tvb) ) {
4186
4187 if(tvb_get_uint8(tvb, ni_offset) == 0){ /* if Zero there is padding, skip the loop */
4188 break;
4189 }
4190 /* Node Name */
4191 used_bytes = get_dns_name(pinfo->pool, tvb, ni_offset, 0, ni_offset, &node_name, &node_name_len);
4192 proto_tree_add_string(tree, hf_icmpv6_ni_reply_node_name, tvb, ni_offset, used_bytes,
4193 format_text(pinfo->pool, node_name, node_name_len));
4194 ni_offset += used_bytes;
4195 }
4196 break;
4197 }
4198 case NI_QTYPE_NODEADDR3: {
4199 while(ni_offset < (int)tvb_reported_length(tvb) ) {
4200 /* TTL */
4201 proto_tree_add_item(tree, hf_icmpv6_ni_reply_node_ttl, tvb, ni_offset, 4, ENC_BIG_ENDIAN0x00000000);
4202 ni_offset += 4;
4203 /* Node Addresses */
4204 proto_tree_add_item(tree, hf_icmpv6_ni_reply_node_address, tvb, ni_offset, 16, ENC_NA0x00000000);
4205 ni_offset += 16;
4206 }
4207 break;
4208 }
4209 case NI_QTYPE_IPV4ADDR4: {
4210 while(ni_offset < (int)tvb_reported_length(tvb) ) {
4211 /* TTL */
4212 proto_tree_add_item(tree, hf_icmpv6_ni_reply_node_ttl, tvb, ni_offset, 4, ENC_BIG_ENDIAN0x00000000);
4213 ni_offset += 4;
4214 /* IPv4 Address */
4215 proto_tree_add_item(tree, hf_icmpv6_ni_reply_ipv4_address, tvb, ni_offset, 4, ENC_BIG_ENDIAN0x00000000);
4216 ni_offset += 4;
4217 }
4218 break;
4219 }
4220 }
4221 }
4222 return ni_offset;
4223}
4224/* RFC 2894 - Router Renumbering for IPv6 */
4225
4226static int
4227dissect_rrenum(tvbuff_t *tvb, int rr_offset, packet_info *pinfo, proto_tree *tree, uint8_t icmp6_type _U___attribute__((unused)), uint8_t icmp6_code)
4228{
4229 proto_tree *mp_tree, *up_tree, *rm_tree;
4230 proto_item *ti, *ti_mp, *ti_up, *ti_rm;
4231 static int * const rr_flags[] = {
4232 &hf_icmpv6_rr_flag_t,
4233 &hf_icmpv6_rr_flag_r,
4234 &hf_icmpv6_rr_flag_a,
4235 &hf_icmpv6_rr_flag_s,
4236 &hf_icmpv6_rr_flag_p,
4237 &hf_icmpv6_rr_flag_rsv,
4238 NULL((void*)0)
4239 };
4240
4241 /* Sequence Number */
4242 proto_tree_add_item(tree, hf_icmpv6_rr_sequencenumber, tvb, rr_offset, 4, ENC_BIG_ENDIAN0x00000000);
4243 rr_offset += 4;
4244
4245 /* Segment Number */
4246 proto_tree_add_item(tree, hf_icmpv6_rr_segmentnumber, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000);
4247 rr_offset += 1;
4248
4249 /* Flags */
4250 proto_tree_add_bitmask(tree, tvb, rr_offset, hf_icmpv6_rr_flag,
4251 ett_icmpv6_flag_rr, rr_flags, ENC_BIG_ENDIAN0x00000000);
4252 rr_offset += 1;
4253
4254 /* Max Delay */
4255 proto_tree_add_item(tree, hf_icmpv6_rr_maxdelay, tvb, rr_offset, 2, ENC_BIG_ENDIAN0x00000000);
4256 rr_offset += 2;
4257
4258 /* Reserved */
4259 proto_tree_add_item(tree, hf_icmpv6_reserved, tvb, rr_offset, 4, ENC_NA0x00000000);
4260 rr_offset += 4;
4261
4262 /* Data ? */
4263 if(tvb_reported_length_remaining(tvb, rr_offset) == 0){
4264 return rr_offset;
4265 }
4266
4267 if(icmp6_code == ICMP6_ROUTER_RENUMBERING_COMMAND0){
4268 /* Match-Prefix Part */
4269 uint8_t opcode, matchlen, minlen, maxlen;
4270
4271 ti_mp = proto_tree_add_item(tree, hf_icmpv6_rr_pco_mp_part, tvb, rr_offset, 24, ENC_NA0x00000000);
4272 mp_tree = proto_item_add_subtree(ti_mp, ett_icmpv6_rr_mp);
4273
4274 /* OpCode */
4275 proto_tree_add_item_ret_uint8(mp_tree, hf_icmpv6_rr_pco_mp_opcode, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000, &opcode);
4276 rr_offset += 1;
4277
4278 /* OpLength */
4279 proto_tree_add_item(mp_tree, hf_icmpv6_rr_pco_mp_oplength, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000);
4280 rr_offset += 1;
4281
4282 /* Ordinal */
4283 proto_tree_add_item(mp_tree, hf_icmpv6_rr_pco_mp_ordinal, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000);
4284 rr_offset += 1;
4285
4286 /* MatchLen */
4287 ti = proto_tree_add_item_ret_uint8(mp_tree, hf_icmpv6_rr_pco_mp_matchlen, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000, &matchlen);
4288 if (matchlen > 128) {
4289 expert_add_info(pinfo, ti, &ei_icmpv6_rr_pco_mp_matchlen);
4290 }
4291 rr_offset += 1;
4292
4293 /* MinLen */
4294 proto_tree_add_item_ret_uint8(mp_tree, hf_icmpv6_rr_pco_mp_minlen, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000, &minlen);
4295 rr_offset += 1;
4296
4297 /* MaxLen */
4298 proto_tree_add_item_ret_uint8(mp_tree, hf_icmpv6_rr_pco_mp_maxlen, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000, &maxlen);
4299 rr_offset += 1;
4300
4301 /* Reserved */
4302 proto_tree_add_item(mp_tree, hf_icmpv6_reserved, tvb, rr_offset, 2, ENC_NA0x00000000);
4303 rr_offset += 2;
4304
4305 /* Match Prefix */
4306 proto_tree_add_item(mp_tree, hf_icmpv6_rr_pco_mp_matchprefix, tvb, rr_offset, 16, ENC_NA0x00000000);
4307
4308 /* Add Info (Prefix, Length...) to Match Prefix Part label */
4309 proto_item_append_text(ti_mp, ": %s %s/%u (%u-%u)", val_to_str(pinfo->pool, opcode, rr_pco_mp_opcode_val, "Unknown %d"), tvb_ip6_to_str(pinfo->pool, tvb, rr_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, rr_offset), matchlen, minlen, maxlen);
4310 rr_offset += 16;
4311
4312 while ((int)tvb_reported_length(tvb) > rr_offset) {
4313 /* Use-Prefix Part */
4314 uint8_t uselen, keeplen;
4315 uint32_t lifetime;
4316 static int * const mask_flags[] = {
4317 &hf_icmpv6_rr_pco_up_flagmask_l,
4318 &hf_icmpv6_rr_pco_up_flagmask_a,
4319 &hf_icmpv6_rr_pco_up_flagmask_reserved,
4320 NULL((void*)0)
4321 };
4322 static int * const ra_flags[] = {
4323 &hf_icmpv6_rr_pco_up_raflags_l,
4324 &hf_icmpv6_rr_pco_up_raflags_a,
4325 &hf_icmpv6_rr_pco_up_raflags_reserved,
4326 NULL((void*)0)
4327 };
4328 static int * const up_flags[] = {
4329 &hf_icmpv6_rr_pco_up_flag_v,
4330 &hf_icmpv6_rr_pco_up_flag_p,
4331 &hf_icmpv6_rr_pco_up_flag_reserved,
4332 NULL((void*)0)
4333 };
4334
4335 ti_up = proto_tree_add_item(tree, hf_icmpv6_rr_pco_up_part, tvb, rr_offset, 32, ENC_NA0x00000000);
4336 up_tree = proto_item_add_subtree(ti_up, ett_icmpv6_rr_up);
4337
4338 /* UseLen */
4339 proto_tree_add_item(up_tree, hf_icmpv6_rr_pco_up_uselen, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000);
4340 uselen = tvb_get_uint8(tvb, rr_offset);
4341 rr_offset += 1;
4342
4343 /* KeepLen */
4344 proto_tree_add_item_ret_uint8(up_tree, hf_icmpv6_rr_pco_up_keeplen, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000, &keeplen);
4345 rr_offset += 1;
4346
4347 /* FlagMask */
4348 proto_tree_add_bitmask(up_tree, tvb, rr_offset, hf_icmpv6_rr_pco_up_flagmask, ett_icmpv6_rr_up_flag_mask, mask_flags, ENC_BIG_ENDIAN0x00000000);
4349 rr_offset += 1;
4350
4351 /* RaFlags */
4352 proto_tree_add_bitmask(up_tree, tvb, rr_offset, hf_icmpv6_rr_pco_up_raflags, ett_icmpv6_rr_up_flag_ra, ra_flags, ENC_BIG_ENDIAN0x00000000);
4353 rr_offset += 1;
4354
4355 /* Valid Lifetime */
4356 ti = proto_tree_add_item_ret_uint(up_tree, hf_icmpv6_rr_pco_up_validlifetime, tvb, rr_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
4357 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
4358 proto_item_append_text(ti, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
4359 }
4360 rr_offset += 4;
4361
4362 /* Preferred Lifetime */
4363 ti = proto_tree_add_item_ret_uint(up_tree, hf_icmpv6_rr_pco_up_preferredlifetime, tvb, rr_offset, 4, ENC_BIG_ENDIAN0x00000000, &lifetime);
4364 if (lifetime != LIFETIME_INFINITY0xFFFFFFFF) {
4365 proto_item_append_text(ti, " (%s)", unsigned_time_secs_to_str(pinfo->pool, lifetime));
4366 }
4367 rr_offset += 4;
4368
4369 /* Flags */
4370 proto_tree_add_bitmask(up_tree, tvb, rr_offset, hf_icmpv6_rr_pco_up_flag, ett_icmpv6_rr_up_flag, up_flags, ENC_BIG_ENDIAN0x00000000);
4371 rr_offset += 4;
4372
4373 /* UsePrefix */
4374 proto_tree_add_item(up_tree, hf_icmpv6_rr_pco_up_useprefix, tvb, rr_offset, 16, ENC_NA0x00000000);
4375
4376 /* Add Info (Prefix, Length...) to Use Prefix Part label */
4377 proto_item_append_text(ti_up, ": %s/%u (keep %u)", tvb_ip6_to_str(pinfo->pool, tvb, rr_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, rr_offset), uselen, keeplen);
4378 rr_offset += 16;
4379 }
4380
4381 }else if(icmp6_code == ICMP6_ROUTER_RENUMBERING_RESULT1){
4382 while ((int)tvb_reported_length(tvb) > rr_offset) {
4383 uint8_t matchlen;
4384 uint32_t interfaceindex;
4385 static int * const rm_flags[] = {
4386 &hf_icmpv6_rr_rm_flag_reserved,
4387 &hf_icmpv6_rr_rm_flag_b,
4388 &hf_icmpv6_rr_rm_flag_f,
4389 NULL((void*)0)
4390 };
4391 /* Result Message */
4392
4393 ti_rm = proto_tree_add_item(tree, hf_icmpv6_rr_rm, tvb, rr_offset, 24, ENC_NA0x00000000);
4394 rm_tree = proto_item_add_subtree(ti_rm, ett_icmpv6_rr_rm);
4395
4396 /* Flags */
4397 proto_tree_add_bitmask(rm_tree, tvb, rr_offset, hf_icmpv6_rr_rm_flag, ett_icmpv6_rr_rm_flag, rm_flags, ENC_BIG_ENDIAN0x00000000);
4398 rr_offset +=2;
4399
4400 /* Ordinal */
4401 proto_tree_add_item(rm_tree, hf_icmpv6_rr_rm_ordinal, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000);
4402 rr_offset +=1;
4403
4404 /* MatchLen */
4405 ti = proto_tree_add_item_ret_uint8(rm_tree, hf_icmpv6_rr_rm_matchedlen, tvb, rr_offset, 1, ENC_BIG_ENDIAN0x00000000, &matchlen);
4406 if (matchlen > 128) {
4407 expert_add_info(pinfo, ti, &ei_icmpv6_rr_pco_mp_matchedlen);
4408 }
4409 rr_offset +=1;
4410
4411 /* InterfaceIndex */
4412 proto_tree_add_item_ret_uint(rm_tree, hf_icmpv6_rr_rm_interfaceindex, tvb, rr_offset, 4, ENC_BIG_ENDIAN0x00000000, &interfaceindex);
4413 rr_offset +=4;
4414
4415 /* MatchedPrefix */
4416 proto_tree_add_item(rm_tree, hf_icmpv6_rr_rm_matchedprefix, tvb, rr_offset, 16, ENC_NA0x00000000);
4417
4418 /* Add Info (Prefix, Length...) to Use Resultant Message label */
4419 proto_item_append_text(ti_rm, ": %s/%u (interface %u)", tvb_ip6_to_str(pinfo->pool, tvb, rr_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, rr_offset), matchlen, interfaceindex);
4420 rr_offset +=16;
4421 }
4422 }
4423 return rr_offset;
4424}
4425
4426
4427static int
4428dissect_mldrv2( tvbuff_t *tvb, uint32_t offset, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree )
4429{
4430 proto_tree *mar_tree;
4431 proto_item *ti_mar;
4432 int mldr_offset = offset;
4433
4434 /* Reserved */
4435 proto_tree_add_item(tree, hf_icmpv6_reserved, tvb, mldr_offset, 2, ENC_NA0x00000000 );
4436 mldr_offset += 2;
4437
4438 /* Nr of Mcast Address Records (M) */
4439 proto_tree_add_item(tree, hf_icmpv6_mldr_nb_mcast_records, tvb, mldr_offset, 2, ENC_BIG_ENDIAN0x00000000 );
4440 mldr_offset += 2;
4441
4442 /* Multicast Address Record */
4443 while(mldr_offset < (int)tvb_reported_length(tvb) ) {
4444 uint8_t aux_data_len, record_type;
4445 uint16_t i, nb_sources;
4446
4447 ti_mar = proto_tree_add_item(tree, hf_icmpv6_mldr_mar, tvb, mldr_offset, -1, ENC_NA0x00000000);
4448 mar_tree = proto_item_add_subtree(ti_mar, ett_icmpv6_mar);
4449
4450 /* Record Type */
4451 proto_tree_add_item_ret_uint8(mar_tree, hf_icmpv6_mldr_mar_record_type, tvb, mldr_offset, 1, ENC_BIG_ENDIAN0x00000000, &record_type);
4452 mldr_offset += 1;
4453
4454 /* Aux Data Len */
4455 proto_tree_add_item_ret_uint8(mar_tree, hf_icmpv6_mldr_mar_aux_data_len, tvb, mldr_offset, 1, ENC_BIG_ENDIAN0x00000000, &aux_data_len);
4456 mldr_offset += 1;
4457
4458 /* Number of Sources (N) */
4459 proto_tree_add_item_ret_uint16(mar_tree, hf_icmpv6_mldr_mar_nb_sources, tvb, mldr_offset, 2, ENC_BIG_ENDIAN0x00000000, &nb_sources);
4460 mldr_offset += 2;
4461
4462 /* Multicast Address */
4463 proto_tree_add_item(mar_tree, hf_icmpv6_mldr_mar_multicast_address, tvb, mldr_offset, 16, ENC_NA0x00000000);
4464 proto_item_append_text(ti_mar, " %s: %s", val_to_str(pinfo->pool, record_type, mldr_record_type_val,"Unknown Record Type (%d)"), tvb_ip6_to_str(pinfo->pool, tvb, mldr_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, mldr_offset));
4465 mldr_offset += 16;
4466
4467 /* Source Address */
4468 for (i=0; i < nb_sources; i++){
4469 proto_tree_add_item(mar_tree, hf_icmpv6_mldr_mar_source_address, tvb, mldr_offset, 16, ENC_NA0x00000000);
4470 mldr_offset += 16;
4471 }
4472
4473 /* Auxiliary Data ? */
4474 if(aux_data_len)
4475 {
4476 proto_tree_add_item(mar_tree, hf_icmpv6_mldr_mar_auxiliary_data, tvb, mldr_offset, aux_data_len * 4, ENC_NA0x00000000);
4477 mldr_offset += aux_data_len * 4;
4478 }
4479
4480 /* Multicast Address Record Length */
4481 proto_item_set_len(ti_mar, 4 + 16 + (16 * nb_sources) + (aux_data_len * 4));
4482
4483 }
4484 return mldr_offset;
4485}
4486
4487static int
4488dissect_mpl_control(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint8_t type _U___attribute__((unused)), uint8_t code)
4489{
4490 proto_tree *seed_info_tree, *bm_tree;
4491 proto_item *ti;
4492 const int length_of_fixed_part = 2;
4493 int body_offset = offset;
4494 uint8_t min_seqno, bm_len, s;
4495 int remaining, id_len = 0;
4496 uint16_t seed_info_index = 0;
4497 char *seed_id = NULL((void*)0);
4498 int i, j;
4499 uint8_t b;
4500
4501 if (code != 0) {
4502 /* code must be 0 */
4503 ti = proto_tree_add_item(tree, hf_icmpv6_unknown_data, tvb, body_offset, 1, ENC_NA0x00000000);
4504 expert_add_info_format(pinfo, ti, &ei_icmpv6_unknown_data, "Code must be 0");
4505 return body_offset;
4506 }
4507
4508 remaining = tvb_captured_length_remaining(tvb, body_offset);
4509 while (remaining >= length_of_fixed_part) {
4510 seed_info_index++;
4511
4512 seed_info_tree = proto_tree_add_subtree_format(tree, tvb, body_offset, length_of_fixed_part, ett_icmpv6_mpl_seed_info, NULL((void*)0),
4513 "MPL Seed Info: [%u]", seed_info_index);
4514
4515 min_seqno = tvb_get_uint8(tvb, body_offset);
4516 proto_tree_add_item(seed_info_tree, hf_icmpv6_mpl_seed_info_min_sequence, tvb, body_offset, 1, ENC_BIG_ENDIAN0x00000000);
4517 body_offset++;
4518
4519 bm_len = tvb_get_uint8(tvb, body_offset) >> 2;
4520 s = tvb_get_uint8(tvb, body_offset) & 0x03;
4521 proto_tree_add_item(seed_info_tree, hf_icmpv6_mpl_seed_info_bm_len, tvb, body_offset, 1, ENC_BIG_ENDIAN0x00000000);
4522 proto_tree_add_item(seed_info_tree, hf_icmpv6_mpl_seed_info_s, tvb, body_offset, 1, ENC_BIG_ENDIAN0x00000000);
4523 body_offset++;
4524
4525 id_len = mpl_seed_id_code_to_length[s];
4526 if ((remaining - length_of_fixed_part) < id_len) {
4527 /* Invalid length; remaining data is too short for Seed ID */
4528 ti = proto_tree_add_item(seed_info_tree, hf_icmpv6_unknown_data, tvb, body_offset,
4529 remaining - length_of_fixed_part, ENC_NA0x00000000);
4530 expert_add_info_format(pinfo, ti, &ei_icmpv6_unknown_data,
4531 "Remaining data, %u bytes, is too short for Seed ID of %u bytes",
4532 remaining - length_of_fixed_part, id_len);
4533 return remaining - length_of_fixed_part;
4534 }
4535 switch (s) {
4536 case 0:
4537 seed_id = address_to_str(pinfo->pool, &pinfo->src);
4538 break;
4539 case 1:
4540 seed_id = wmem_strdup_printf(pinfo->pool, "%04x", tvb_get_ntohs(tvb, body_offset));
4541 break;
4542 case 2:
4543 seed_id = tvb_eui64_to_str(pinfo->pool, tvb, body_offset)tvb_address_to_str(pinfo->pool, tvb, AT_EUI64, body_offset
)
;
4544 break;
4545 case 3:
4546 seed_id = tvb_ip6_to_str(pinfo->pool, tvb, body_offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, body_offset);
4547 break;
4548 default:
4549 /* not reached */
4550 break;
4551 }
4552 proto_tree_add_string(seed_info_tree, hf_icmpv6_mpl_seed_info_seed_id, tvb, body_offset, id_len, seed_id);
4553 body_offset += id_len;
4554
4555 if((remaining - length_of_fixed_part - id_len) < bm_len) {
4556 /* Invalid length; remaining data is too short for Buffered Messages */
4557 ti = proto_tree_add_item(seed_info_tree, hf_icmpv6_unknown_data, tvb, body_offset,
4558 remaining - length_of_fixed_part - id_len, ENC_NA0x00000000);
4559 expert_add_info_format(pinfo, ti, &ei_icmpv6_unknown_data,
4560 "Remaining data, %u bytes, is too short for Buffered Messages of %u bytes",
4561 remaining - length_of_fixed_part - id_len, bm_len);
4562 return body_offset - length_of_fixed_part - id_len;
4563 }
4564
4565 if (bm_len > 0) {
4566 bm_tree = proto_tree_add_subtree_format(seed_info_tree, tvb, body_offset, bm_len, ett_icmpv6_mpl_seed_info_bm, NULL((void*)0),
4567 "Buffered Messages");
4568 for (i = 0; i < bm_len; i++) {
4569 b = tvb_get_uint8(tvb, body_offset + i);
4570 for (j = 0; j < 8; j++) {
4571 if (b & (0x80 >> j)) {
4572 /* From RFC 1982: s' = (s + n) modulo (2 ^ SERIAL_BITS), where SERIAL_BITS is 8 */
4573 proto_tree_add_uint(bm_tree, hf_icmpv6_mpl_seed_info_sequence, tvb, body_offset + i, 1, (min_seqno + 8 * i + j) % 0x100);
4574 }
4575 }
4576 }
4577 }
4578 body_offset += bm_len;
4579
4580 remaining = tvb_captured_length_remaining(tvb, body_offset);
4581 }
4582
4583 if (remaining != 0) {
4584 /* Invalid length; there is remaining data after dissecting MPL Control Message */
4585 ti = proto_tree_add_item(tree, hf_icmpv6_unknown_data, tvb, body_offset, body_offset - offset, ENC_NA0x00000000);
4586 expert_add_info_format(pinfo, ti, &ei_icmpv6_unknown_data,
4587 "%u bytes data is left after dissecting MPL Control Message", remaining);
4588 }
4589
4590 return body_offset;
4591}
4592
4593static bool_Bool
4594capture_icmpv6(const unsigned char *pd _U___attribute__((unused)), int offset _U___attribute__((unused)), int len _U___attribute__((unused)), capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U___attribute__((unused)))
4595{
4596 capture_dissector_increment_count(cpinfo, proto_icmpv6);
4597 return true1;
4598}
4599
4600static int
4601dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
4602{
4603 proto_tree *icmp6_tree = NULL((void*)0);
4604 proto_item *ti = NULL((void*)0), *checksum_item = NULL((void*)0), *code_item = NULL((void*)0);
4605 const char *code_name = NULL((void*)0);
4606 unsigned length = 0, reported_length;
4607 vec_t cksum_vec[4];
4608 uint32_t phdr[2];
4609 uint16_t cksum;
4610 unsigned offset;
4611 tvbuff_t *next_tvb;
4612 uint8_t icmp6_type, icmp6_code, icmp6_code_prefix, icmp6_code_suffix;
4613 icmp_transaction_t *trans = NULL((void*)0);
4614 ws_ip6 *iph = WS_IP6_PTR(data)((ws_ip6 *)(((data) && *(uint8_t *)(data) == 6) ? (data
) : ((void*)0)))
;
4615
4616 col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMPv6");
4617 col_clear(pinfo->cinfo, COL_INFO);
4618
4619 offset = 0;
4620
4621 if (tree) {
4622 ti = proto_tree_add_item(tree, proto_icmpv6, tvb, offset, -1, ENC_NA0x00000000);
4623 icmp6_tree = proto_item_add_subtree(ti, ett_icmpv6);
4624
4625 /* Type */
4626 ti = proto_tree_add_item(icmp6_tree, hf_icmpv6_type, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4627 }
4628 icmp6_type = tvb_get_uint8(tvb, offset);
4629 if (!(icmp6_type & 0x80)) {
4630 expert_add_info(pinfo, ti, &ei_icmpv6_type_error);
4631 }
4632 offset += 1;
4633
4634 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(pinfo->pool, icmp6_type, icmpv6_type_val, "Unknown (%d)"));
4635
4636 switch (icmp6_type) {
4637 case ICMP6_MCAST_ROUTER_ADVERT151:
4638 // Code field is reused for Advertisement Interval
4639 proto_tree_add_item(icmp6_tree, hf_icmpv6_mcast_ra_ad_interval, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4640 break;
4641 case ICMP6_MCAST_ROUTER_SOLICIT152:
4642 case ICMP6_MCAST_ROUTER_TERM153:
4643 // Code field is reserved
4644 proto_tree_add_item(icmp6_tree, hf_icmpv6_mcast_ra_reserved, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4645 break;
4646 default:
4647 code_item = proto_tree_add_item(icmp6_tree, hf_icmpv6_code, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4648 }
4649
4650 icmp6_code = tvb_get_uint8(tvb, offset);
4651
4652 /* Split ICMPv6 code into two 4-bit fields for ICMPv6 types which need it */
4653 icmp6_code_prefix = (icmp6_code & 0xF0) >> 4;
4654 icmp6_code_suffix = (icmp6_code & 0x0F);
4655
4656 if(icmp6_type == ICMP6_6LOWPANND_DAR157) {
4657 proto_tree_add_uint(icmp6_tree, hf_icmpv6_da_code_prefix, tvb, offset, 1, icmp6_code_prefix);
4658 proto_tree_add_uint(icmp6_tree, hf_icmpv6_dar_code_suffix, tvb, offset, 1, icmp6_code_suffix);
4659 proto_item *pi_csfx = proto_tree_add_uint(icmp6_tree, hf_icmpv6_da_code_suffix, tvb, offset, 1, icmp6_code_suffix);
4660 proto_item_set_hidden(pi_csfx);
4661 }
4662 else if(icmp6_type == ICMP6_6LOWPANND_DAC158) {
4663 proto_tree_add_uint(icmp6_tree, hf_icmpv6_da_code_prefix, tvb, offset, 1, icmp6_code_prefix);
4664 proto_tree_add_uint(icmp6_tree, hf_icmpv6_dac_code_suffix, tvb, offset, 1, icmp6_code_suffix);
4665 proto_item *pi_csfx = proto_tree_add_uint(icmp6_tree, hf_icmpv6_da_code_suffix, tvb, offset, 1, icmp6_code_suffix);
4666 proto_item_set_hidden(pi_csfx);
4667 }
4668 offset += 1;
4669
4670 switch (icmp6_type) {
4671 case ICMP6_DST_UNREACH1:
4672 code_name = val_to_str_const(icmp6_code, icmpv6_unreach_code_val, "Unknown");
4673 break;
4674 case ICMP6_TIME_EXCEEDED3:
4675 code_name = val_to_str(pinfo->pool, icmp6_code, icmpv6_timeex_code_val, "Unknown (%d)");
4676 break;
4677 case ICMP6_PARAM_PROB4:
4678 code_name = val_to_str(pinfo->pool, icmp6_code, icmpv6_paramprob_code_val, "Unknown (%d)");
4679 break;
4680 case ICMP6_ROUTER_RENUMBERING138:
4681 code_name = val_to_str(pinfo->pool, icmp6_code, icmpv6_rr_code_val, "Unknown (%d)");
4682 break;
4683 case ICMP6_NI_QUERY139:
4684 code_name = val_to_str(pinfo->pool, icmp6_code, ni_query_code_val, "Unknown (%d)");
4685 break;
4686 case ICMP6_NI_REPLY140:
4687 code_name = val_to_str(pinfo->pool, icmp6_code, ni_reply_code_val, "Unknown (%d)");
4688 break;
4689 case ICMP6_RPL_CONTROL155:
4690 code_name = val_to_str(pinfo->pool, icmp6_code, rpl_code_val, "Unknown (%d)");
4691 break;
4692 case ICMP6_EXTECHO160:
4693 code_name = val_to_str(pinfo->pool, icmp6_code, ext_echo_req_code_str, "Unknown (%d)");
4694 break;
4695 case ICMP6_EXTECHOREPLY161:
4696 code_name = val_to_str(pinfo->pool, icmp6_code, ext_echo_reply_code_str, "Unknown (%d)");
4697 break;
4698 }
4699
4700 if (code_item && code_name) {
4701 proto_item_append_text(code_item, " (%s)", code_name);
4702 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", code_name);
4703 }
4704
4705 /* RFC 4380
4706 * 2.7. Teredo UDP Port
4707 * 5.2.9. Direct IPv6 Connectivity Test */
4708 if (pinfo->destport == 3544 && icmp6_type == ICMP6_ECHO_REQUEST128) {
4709 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Teredo");
4710 col_set_str(pinfo->cinfo, COL_INFO, "Direct IPv6 Connectivity Test");
4711 }
4712
4713 cksum = tvb_get_ntohs(tvb, offset);
4714 length = tvb_captured_length(tvb);
4715 reported_length = tvb_reported_length(tvb);
4716 if (!pinfo->fragmented && length >= reported_length && !pinfo->flags.in_error_pkt) {
4717 /* The packet isn't part of a fragmented datagram, isn't truncated,
4718 * and we aren't in an ICMP error packet, so we can checksum it.
4719 */
4720
4721 /* Set up the fields of the pseudo-header. */
4722 SET_CKSUM_VEC_PTR(cksum_vec[0], (const uint8_t *)pinfo->src.data, pinfo->src.len)do { cksum_vec[0].ptr = ((const uint8_t *)pinfo->src.data)
; cksum_vec[0].len = (pinfo->src.len); } while (0)
;
4723 SET_CKSUM_VEC_PTR(cksum_vec[1], (const uint8_t *)pinfo->dst.data, pinfo->dst.len)do { cksum_vec[1].ptr = ((const uint8_t *)pinfo->dst.data)
; cksum_vec[1].len = (pinfo->dst.len); } while (0)
;
4724 phdr[0] = g_htonl(reported_length)(((((guint32) ( (((guint32) (reported_length) & (guint32)
0x000000ffU) << 24) | (((guint32) (reported_length) &
(guint32) 0x0000ff00U) << 8) | (((guint32) (reported_length
) & (guint32) 0x00ff0000U) >> 8) | (((guint32) (reported_length
) & (guint32) 0xff000000U) >> 24))))))
;
4725 phdr[1] = g_htonl(IP_PROTO_IPV6_ICMP)(((((guint32) ( (((guint32) (58) & (guint32) 0x000000ffU)
<< 24) | (((guint32) (58) & (guint32) 0x0000ff00U)
<< 8) | (((guint32) (58) & (guint32) 0x00ff0000U) >>
8) | (((guint32) (58) & (guint32) 0xff000000U) >> 24
))))))
;
4726 SET_CKSUM_VEC_PTR(cksum_vec[2], (const uint8_t *)&phdr, 8)do { cksum_vec[2].ptr = ((const uint8_t *)&phdr); cksum_vec
[2].len = (8); } while (0)
;
4727 SET_CKSUM_VEC_TVB(cksum_vec[3], tvb, 0, reported_length)do { cksum_vec[3].len = (reported_length); cksum_vec[3].ptr =
tvb_get_ptr((tvb), (0), cksum_vec[3].len); } while (0)
;
4728
4729 proto_tree_add_checksum(icmp6_tree, tvb, 2, hf_icmpv6_checksum, hf_icmpv6_checksum_status, &ei_icmpv6_checksum, pinfo, in_cksum(cksum_vec, 4),
4730 ENC_BIG_ENDIAN0x00000000, PROTO_CHECKSUM_VERIFY0x01|PROTO_CHECKSUM_IN_CKSUM0x04);
4731 } else {
4732 checksum_item = proto_tree_add_checksum(icmp6_tree, tvb, 2, hf_icmpv6_checksum, hf_icmpv6_checksum_status, &ei_icmpv6_checksum, pinfo, 0,
4733 ENC_BIG_ENDIAN0x00000000, PROTO_CHECKSUM_NO_FLAGS0x00);
4734 proto_item_append_text(checksum_item, " [%s]",
4735 pinfo->flags.in_error_pkt ? "in ICMP error packet" : "fragmented datagram");
4736 }
4737 offset += 2;
4738
4739 if (icmp6_type == ICMP6_ECHO_REQUEST128 || icmp6_type == ICMP6_ECHO_REPLY129) {
4740 uint16_t identifier, sequence;
4741
4742 /* Identifier */
4743 proto_tree_add_item_ret_uint16(icmp6_tree, hf_icmpv6_echo_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &identifier);
4744 offset += 2;
4745
4746 /* Sequence Number */
4747 if (tree)
4748 proto_tree_add_item(icmp6_tree, hf_icmpv6_echo_sequence_number, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4749 sequence = tvb_get_ntohs(tvb, offset);
4750 offset += 2;
4751
4752 col_append_fstr(pinfo->cinfo, COL_INFO, " id=0x%04x, seq=%u",
4753 identifier, sequence);
4754 if (iph != NULL((void*)0)) {
4755 col_append_fstr(pinfo->cinfo, COL_INFO, ", hop limit=%u",
4756 iph->ip6_hop);
4757 }
4758
4759 if (pinfo->destport == 3544 && icmp6_type == ICMP6_ECHO_REQUEST128) {
4760 /* RFC 4380
4761 * 2.7. Teredo UDP Port
4762 * 5.2.9. Direct IPv6 Connectivity Test
4763 *
4764 * TODO: Clarify the nonce: The RFC states, "(It is recommended to
4765 * use a random number [the nonce] at least 64 bits long.)"
4766 *
4767 * Shouldn't the nonce be at least 8 then? Why not just use (-1),
4768 * as it could really be any length, couldn't it?
4769 */
4770 proto_tree_add_item(icmp6_tree, hf_icmpv6_nonce, tvb, offset, 4, ENC_NA0x00000000);
4771 offset += 4;
4772 } else {
4773 if (!pinfo->flags.in_error_pkt) {
4774 uint32_t conv_key[3];
4775
4776 conv_key[1] = (uint32_t)((identifier << 16) | sequence);
4777 conv_key[2] = prefs.strict_conversation_tracking_heuristics ? pinfo->vlan_id : 0;
4778
4779 if (icmp6_type == ICMP6_ECHO_REQUEST128) {
4780 conv_key[0] = (uint32_t)cksum;
4781 if (conv_key[0] == 0xffff)
4782 conv_key[0] = 0;
4783 if (pinfo->flags.in_gre_pkt && prefs.strict_conversation_tracking_heuristics)
4784 conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
4785 trans = transaction_start(pinfo, icmp6_tree, conv_key);
4786 } else { /* ICMP6_ECHO_REPLY */
4787 uint16_t tmp[2];
4788
4789 tmp[0] = ~cksum;
4790 tmp[1] = ~0x0100; /* The difference between echo request & reply */
4791 SET_CKSUM_VEC_PTR(cksum_vec[0], (uint8_t *)tmp, sizeof(tmp))do { cksum_vec[0].ptr = ((uint8_t *)tmp); cksum_vec[0].len = (
sizeof(tmp)); } while (0)
;
4792 conv_key[0] = in_cksum(cksum_vec, 1);
4793 if (pinfo->flags.in_gre_pkt && prefs.strict_conversation_tracking_heuristics)
4794 conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
4795 trans = transaction_end(pinfo, icmp6_tree, conv_key);
4796 }
4797 }
4798
4799 /* Interpret the first 8 or 16 bytes of the Echo data as a timestamp
4800 * But only if it does look like it's a timestamp.
4801 */
4802
4803 nstime_t ts, time_relative;
4804 int len = get_best_guess_timestamp(tvb, offset, &pinfo->abs_ts, &ts);
4805 if (len) {
4806 proto_tree_add_time(icmp6_tree, hf_icmpv6_data_time, tvb, offset, len, &ts);
4807 nstime_delta(&time_relative, &pinfo->abs_ts, &ts);
4808 ti = proto_tree_add_time(icmp6_tree, hf_icmpv6_data_time_relative, tvb, offset, len, &time_relative);
4809 proto_item_set_generated(ti);
4810 offset += len;
4811 }
4812 heur_dtbl_entry_t *hdtbl_entry;
4813 next_tvb = tvb_new_subset_remaining(tvb, offset);
4814 bool_Bool result = dissector_try_heuristic(icmpv6_heur_subdissector_list, next_tvb, pinfo, tree, &hdtbl_entry, NULL((void*)0));
4815 if (!result) {
4816 offset += call_data_dissector(next_tvb, pinfo, icmp6_tree);
4817 }
4818 else {
4819 offset += tvb_reported_length(next_tvb);
4820 }
4821 }
4822 }
4823
4824 if (1) { /* There are expert infos buried in here so always execute */
4825 /* decode... */
4826 /* FIXME: The following messages MUST have a TTL^WHop-Limit of 255:
4827 133-137, 141-142, 148-149. Detect this and add expert items. */
4828 switch (icmp6_type) {
4829 case ICMP6_DST_UNREACH1: /* Destination Unreachable (1) */
4830 case ICMP6_TIME_EXCEEDED3: /* Time Exceeded (3) */
4831 {
4832 char orig_datagram_length = tvb_get_uint8(tvb, offset);
4833 if (orig_datagram_length) {
4834 /* RFC 4884 Original datagram length */
4835 proto_tree_add_item(icmp6_tree, hf_icmpv6_length, tvb, offset, 1, ENC_NA0x00000000);
4836 offset += 1;
4837 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 3, ENC_NA0x00000000);
4838 offset += 3;
4839 } else {
4840 /* Reserved */
4841 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 4, ENC_NA0x00000000);
4842 offset += 4;
4843 }
4844
4845 next_tvb = tvb_new_subset_remaining(tvb, offset);
4846 int contained_len = dissect_contained_icmpv6(next_tvb, pinfo, icmp6_tree);
4847 if (orig_datagram_length) {
4848 offset += 8 * orig_datagram_length;
4849 tvbuff_t * extension_tvb = tvb_new_subset_remaining(tvb, offset);
4850 offset += call_dissector(icmp_extension_handle, extension_tvb, pinfo, icmp6_tree);
4851 } else {
4852 offset += contained_len;
4853 }
4854 break;
4855 }
4856 case ICMP6_PACKET_TOO_BIG2: /* Packet Too Big (2) */
4857 /* MTU */
4858 proto_tree_add_item(icmp6_tree, hf_icmpv6_mtu, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4859 offset += 4;
4860
4861 next_tvb = tvb_new_subset_remaining(tvb, offset);
4862 offset += dissect_contained_icmpv6(next_tvb, pinfo, icmp6_tree);
4863 break;
4864 case ICMP6_PARAM_PROB4: /* Parameter Problem (4) */
4865 /* MTU */
4866 proto_tree_add_item(icmp6_tree, hf_icmpv6_pointer, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4867 offset += 4;
4868
4869 next_tvb = tvb_new_subset_remaining(tvb, offset);
4870 offset += dissect_contained_icmpv6(next_tvb, pinfo, icmp6_tree);
4871 break;
4872 case ICMP6_ECHO_REQUEST128: /* Echo Request (128) */
4873 case ICMP6_ECHO_REPLY129: /* Echo Reply (129) */
4874 /* Already handled above */
4875 break;
4876 case ICMP6_MEMBERSHIP_QUERY130: /* Multicast Listener Query (130) */
4877 case ICMP6_MEMBERSHIP_REPORT131: /* Multicast Listener Report (131) */
4878 case ICMP6_MEMBERSHIP_REDUCTION132: /* Multicast Listener Done (132) */
4879 {
4880 /* It is MLDv2 packet ? (the min length for a MLDv2 packet is 28) */
4881 if ((icmp6_type == ICMP6_MEMBERSHIP_QUERY130) && (length >= MLDV2_PACKET_MINLEN28)) {
4882 uint32_t mrc;
4883 uint16_t qqi, i, nb_sources;
4884 static int * const mld_flags[] = {
4885 &hf_icmpv6_mld_flag_s,
4886 &hf_icmpv6_mld_flag_qrv,
4887 &hf_icmpv6_mld_flag_rsv,
4888 NULL((void*)0)
4889 };
4890
4891 /* Maximum Response Code */
4892 mrc = tvb_get_ntohs(tvb, offset);
4893 if (mrc >= 32768){
4894 mrc = ((mrc & 0x0fff) | 0x1000) << (((mrc & 0x7000) >> 12) + 3);
4895 }
4896 proto_tree_add_uint(icmp6_tree, hf_icmpv6_mld_mrc, tvb, offset, 2, mrc);
4897 offset += 2;
4898
4899 /* Reserved */
4900 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
4901 offset += 2;
4902
4903 /* Multicast Address */
4904 proto_tree_add_item(icmp6_tree, hf_icmpv6_mld_multicast_address, tvb, offset, 16, ENC_NA0x00000000);
4905 offset += 16;
4906
4907 /* Flag */
4908 proto_tree_add_bitmask(icmp6_tree, tvb, offset, hf_icmpv6_mld_flag, ett_icmpv6_flag_mld, mld_flags, ENC_BIG_ENDIAN0x00000000);
4909 offset += 1;
4910
4911 /* QQI */
4912 qqi = tvb_get_uint8(tvb, offset);
4913 if (qqi >= 128){
4914 qqi = ((qqi & 0x0f) | 0x10) << (((qqi & 0x70) >> 4) + 3);
4915 }
4916 proto_tree_add_uint(icmp6_tree, hf_icmpv6_mld_qqi, tvb, offset, 1, qqi);
4917 offset += 1;
4918
4919 /* Number of Sources */
4920 proto_tree_add_item_ret_uint16(icmp6_tree, hf_icmpv6_mld_nb_sources, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000, &nb_sources);
4921 offset += 2;
4922
4923 /* Source Address */
4924 for (i=0; i < nb_sources; i++){
4925 proto_tree_add_item(icmp6_tree, hf_icmpv6_mld_source_address, tvb, offset, 16, ENC_NA0x00000000);
4926 offset += 16;
4927 }
4928
4929 }else{ /* It is a MLDv1 Packet */
4930
4931 proto_tree_add_item(icmp6_tree, hf_icmpv6_mld_mrd, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4932 offset += 2;
4933
4934 /* Reserved */
4935 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
4936 offset += 2;
4937
4938 /* Multicast Address */
4939 proto_tree_add_item(icmp6_tree, hf_icmpv6_mld_multicast_address, tvb, offset, 16, ENC_NA0x00000000);
4940 offset += 16;
4941 }
4942 break;
4943 }
4944 case ICMP6_ND_ROUTER_SOLICIT133: /* Router Solicitation (133) */
4945 {
4946 /* Reserved */
4947 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 4, ENC_NA0x00000000);
4948 offset += 4;
4949
4950 /* Show options */
4951 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
4952 break;
4953 }
4954 case ICMP6_ND_ROUTER_ADVERT134: /* Router Advertisement (134) */
4955 {
4956 static int * const nd_ra_flags[] = {
4957 &hf_icmpv6_nd_ra_flag_m,
4958 &hf_icmpv6_nd_ra_flag_o,
4959 &hf_icmpv6_nd_ra_flag_h,
4960 &hf_icmpv6_nd_ra_flag_prf,
4961 &hf_icmpv6_nd_ra_flag_p,
4962 &hf_icmpv6_nd_ra_flag_s,
4963 &hf_icmpv6_nd_ra_flag_rsv,
4964 NULL((void*)0)
4965 };
4966
4967 /* Current hop limit */
4968 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_ra_cur_hop_limit, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
4969 offset += 1;
4970
4971 /* Flags */
4972 proto_tree_add_bitmask(icmp6_tree, tvb, offset, hf_icmpv6_nd_ra_flag, ett_icmpv6_flag_ra, nd_ra_flags, ENC_BIG_ENDIAN0x00000000);
4973 offset += 1;
4974
4975 /* Router lifetime */
4976 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_ra_router_lifetime, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
4977 offset += 2;
4978
4979 /* Reachable time */
4980 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_ra_reachable_time, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4981 offset += 4;
4982
4983 /* Retrans timer */
4984 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_ra_retrans_timer, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
4985 offset += 4;
4986
4987 /* Show options */
4988 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
4989 break;
4990 }
4991 case ICMP6_ND_NEIGHBOR_SOLICIT135: /* Neighbor Solicitation (135) */
4992 {
4993 /* Reserved */
4994 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 4, ENC_NA0x00000000);
4995 offset += 4;
4996
4997 /* Target Address */
4998 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_ns_target_address, tvb, offset, 16, ENC_NA0x00000000);
4999 col_append_fstr(pinfo->cinfo, COL_INFO, " for %s", tvb_ip6_to_str(pinfo->pool, tvb, offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset));
5000
5001 offset += 16;
5002
5003 /* Show options */
5004 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5005 break;
5006 }
5007 case ICMP6_ND_NEIGHBOR_ADVERT136: /* Neighbor Advertisement (136) */
5008 {
5009 uint32_t na_flags;
5010 wmem_strbuf_t *flags_strbuf = wmem_strbuf_create(pinfo->pool)wmem_strbuf_new(pinfo->pool, "");
5011 static int * const nd_na_flags[] = {
5012 &hf_icmpv6_nd_na_flag_r,
5013 &hf_icmpv6_nd_na_flag_s,
5014 &hf_icmpv6_nd_na_flag_o,
5015 &hf_icmpv6_nd_na_flag_rsv,
5016 NULL((void*)0)
5017 };
5018
5019 /* Flags */
5020 proto_tree_add_bitmask(icmp6_tree, tvb, offset, hf_icmpv6_nd_na_flag, ett_icmpv6_flag_na, nd_na_flags, ENC_BIG_ENDIAN0x00000000);
5021 na_flags = tvb_get_ntohl(tvb, offset);
5022 offset += 4;
5023
5024 /* Target Address */
5025 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_na_target_address, tvb, offset, 16, ENC_NA0x00000000);
5026
5027
5028 if (na_flags & ND_NA_FLAG_R0x80000000) {
5029 wmem_strbuf_append(flags_strbuf, "rtr, ");
5030 }
5031 if (na_flags & ND_NA_FLAG_S0x40000000) {
5032 wmem_strbuf_append(flags_strbuf, "sol, ");
5033 }
5034 if (na_flags & ND_NA_FLAG_O0x20000000) {
5035 wmem_strbuf_append(flags_strbuf, "ovr, ");
5036 }
5037 if (wmem_strbuf_get_len(flags_strbuf) > 2) {
5038 wmem_strbuf_truncate(flags_strbuf, wmem_strbuf_get_len(flags_strbuf) - 2);
5039 } else {
5040 wmem_strbuf_truncate(flags_strbuf, 0);
5041 wmem_strbuf_append(flags_strbuf, "none");
5042 }
5043
5044 col_append_fstr(pinfo->cinfo, COL_INFO, " %s (%s)", tvb_ip6_to_str(pinfo->pool, tvb, offset)tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset), wmem_strbuf_get_str(flags_strbuf));
5045 offset += 16;
5046
5047 /* Show options */
5048 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5049 break;
5050 }
5051 case ICMP6_ND_REDIRECT137: /* Redirect Message (137) */
5052 {
5053 /* Reserved */
5054 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 4, ENC_NA0x00000000);
5055 offset += 4;
5056
5057 /* Target Address */
5058 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_rd_target_address, tvb, offset, 16, ENC_NA0x00000000);
5059 offset += 16;
5060
5061 /* Destination Address */
5062 proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_rd_destination_address, tvb, offset, 16, ENC_NA0x00000000);
5063 offset += 16;
5064
5065 /* Show options */
5066 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5067 break;
5068 }
5069 case ICMP6_ROUTER_RENUMBERING138: /* Router Renumbering (138) */
5070 {
5071 offset = dissect_rrenum(tvb, offset, pinfo, icmp6_tree, icmp6_type, icmp6_code);
5072 break;
5073 }
5074 case ICMP6_NI_QUERY139: /* ICMP Node Information Query (139) */
5075 case ICMP6_NI_REPLY140: /* ICMP Node Information Response (140) */
5076 {
5077 offset = dissect_nodeinfo(tvb, offset, pinfo, icmp6_tree, icmp6_type, icmp6_code);
5078 break;
5079 }
5080 case ICMP6_IND_SOLICIT141: /* Inverse Neighbor Discovery Solicitation Message (141) */
5081 case ICMP6_IND_ADVERT142: /* Inverse Neighbor Discovery Advertisement Message (142) */
5082 {
5083 /* Reserved */
5084 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 4, ENC_NA0x00000000);
5085 offset += 4;
5086
5087 /* Show options */
5088 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5089 break;
5090 }
5091 case ICMP6_MLDV2_REPORT143: /* Version 2 Multicast Listener Report (143) */
5092 {
5093 offset = dissect_mldrv2( tvb, offset, pinfo, icmp6_tree );
5094 break;
5095 }
5096 case ICMP6_MIP6_DHAAD_REQUEST144: /* Home Agent Address Discovery Request Message (144) */
5097 {
5098 /* Identifier */
5099 proto_tree_add_item(icmp6_tree, hf_icmpv6_mip6_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5100 offset += 2;
5101
5102 /* Reserved */
5103 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
5104 offset += 2;
5105
5106 break;
5107 }
5108 case ICMP6_MIP6_DHAAD_REPLY145: /* Home Agent Address Discovery Reply Message (145) */
5109 {
5110 /* Identifier */
5111 proto_tree_add_item(icmp6_tree, hf_icmpv6_mip6_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5112 offset += 2;
5113
5114 /* Reserved */
5115 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
5116 offset += 2;
5117
5118 /* Show all Home Agent Addresses */
5119 while(length > offset)
5120 {
5121 proto_tree_add_item(icmp6_tree, hf_icmpv6_mip6_home_agent_address, tvb, offset, 16, ENC_NA0x00000000);
5122 offset += 16;
5123 }
5124 break;
5125 }
5126 case ICMP6_MIP6_MPS146: /* Mobile Prefix Solicitation (146) */
5127 {
5128 /* Identifier */
5129 proto_tree_add_item(icmp6_tree, hf_icmpv6_mip6_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5130 offset += 2;
5131
5132 /* Reserved */
5133 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
5134 offset += 2;
5135 break;
5136 }
5137 case ICMP6_MIP6_MPA147: /* Mobile Prefix Advertisement (147) */
5138 {
5139 static int * const mip6_flags[] = {
5140 &hf_icmpv6_mip6_flag_m,
5141 &hf_icmpv6_mip6_flag_o,
5142 &hf_icmpv6_mip6_flag_rsv,
5143 NULL((void*)0)
5144 };
5145
5146 /* Identifier */
5147 proto_tree_add_item(icmp6_tree, hf_icmpv6_mip6_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5148 offset += 2;
5149
5150 /* Flags */
5151 proto_tree_add_bitmask(icmp6_tree, tvb, offset, hf_icmpv6_mip6_flag, ett_icmpv6_flag_mip6, mip6_flags, ENC_BIG_ENDIAN0x00000000);
5152 offset += 2;
5153
5154 /* Show options */
5155 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5156 break;
5157 }
5158 case ICMP6_CERT_PATH_SOL148: /* Certification Path Solicitation Message (148) */
5159 {
5160
5161 /* Identifier */
5162 proto_tree_add_item(icmp6_tree, hf_icmpv6_send_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5163 offset += 2;
5164
5165 /* Component */
5166 proto_tree_add_item(icmp6_tree, hf_icmpv6_send_component, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5167 offset += 2;
5168
5169 /* Show options */
5170 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5171 break;
5172 }
5173 case ICMP6_CERT_PATH_AD149: /* Certification Path Advertisement Message (149) */
5174 {
5175
5176 /* Identifier */
5177 proto_tree_add_item(icmp6_tree, hf_icmpv6_send_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5178 offset += 2;
5179
5180 /* All Components */
5181 proto_tree_add_item(icmp6_tree, hf_icmpv6_send_all_components, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5182 offset += 2;
5183
5184 /* Component */
5185 proto_tree_add_item(icmp6_tree, hf_icmpv6_send_component, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5186 offset += 2;
5187
5188 /* Reserved */
5189 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
5190 offset += 2;
5191
5192 /* Show options */
5193 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5194 break;
5195 }
5196 case ICMP6_EXPERIMENTAL_MOBILITY150: /* ICMP messages utilized by experimental mobility protocols (150) */
5197 case ICMP6_FMIPV6_MESSAGES154: /* FMIPv6 Messages (154)*/
5198 {
5199 uint8_t subtype;
5200
5201 /* Subtype */
5202 proto_tree_add_item_ret_uint8(icmp6_tree, hf_icmpv6_fmip6_subtype, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &subtype);
5203 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str(pinfo->pool, subtype, fmip6_subtype_val, "Unknown (%d)"));
5204 offset += 1;
5205
5206 switch(subtype){
5207 case FMIP6_SUBTYPE_RTSOLPR2:
5208 {
5209 /* Reserved */
5210 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 1, ENC_NA0x00000000);
5211 }
5212 break;
5213 case FMIP6_SUBTYPE_PRRTADV3:
5214 {
5215 proto_item_append_text(code_item, " (%s)", val_to_str(pinfo->pool, icmp6_code, fmip6_prrtadv_code_val, "Unknown %d") );
5216 /* Reserved */
5217 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 1, ENC_NA0x00000000);
5218 }
5219 break;
5220 case FMIP6_SUBTYPE_HI4:
5221 {
5222 static int * const fmip6_hi_flags[] = {
5223 &hf_icmpv6_fmip6_hi_flag_s,
5224 &hf_icmpv6_fmip6_hi_flag_u,
5225 &hf_icmpv6_fmip6_hi_flag_reserved,
5226 NULL((void*)0)
5227 };
5228
5229 proto_item_append_text(code_item, " (%s)", val_to_str(pinfo->pool, icmp6_code, fmip6_hi_code_val, "Unknown %d") );
5230 /* Flags */
5231 proto_tree_add_bitmask(icmp6_tree, tvb, offset, hf_icmpv6_fmip6_hi_flag, ett_icmpv6_flag_fmip6, fmip6_hi_flags, ENC_BIG_ENDIAN0x00000000);
5232 }
5233 break;
5234 case FMIP6_SUBTYPE_HACK5:
5235 {
5236 proto_item_append_text(code_item, " (%s)", val_to_str(pinfo->pool, icmp6_code, fmip6_hack_code_val, "Unknown %d") );
5237 /* Reserved */
5238 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 1, ENC_NA0x00000000);
5239 }
5240 break;
5241 }
5242 offset +=1;
5243
5244 /* Identifier */
5245 proto_tree_add_item(icmp6_tree, hf_icmpv6_fmip6_identifier, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5246 offset += 2;
5247
5248 /* Show options */
5249 offset = dissect_icmpv6_nd_opt(tvb, offset, pinfo, icmp6_tree, icmp6_type);
5250 break;
5251 }
5252 case ICMP6_MCAST_ROUTER_ADVERT151: /* Multicast Router Advertisement (151) */
5253 {
5254 /* Query Interval */
5255 proto_tree_add_item(icmp6_tree, hf_icmpv6_mcast_ra_query_interval, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5256 offset += 2;
5257
5258 /* Robustness Variable */
5259 proto_tree_add_item(icmp6_tree, hf_icmpv6_mcast_ra_robustness_variable, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5260 offset += 2;
5261 }
5262 case ICMP6_MCAST_ROUTER_SOLICIT152: /* Multicast Router Solicitation (152) */
5263 case ICMP6_MCAST_ROUTER_TERM153: /* Multicast Router Termination (153) */
5264 {
5265 /* No Action... */
5266 break;
5267 }
5268 case ICMP6_RPL_CONTROL155: /* RPL Control (155) */
5269 {
5270 /* RPL: RFC 6550 : Routing over Low-Power and Lossy Networks. */
5271 offset = dissect_rpl_control(tvb, offset, pinfo, icmp6_tree, icmp6_type, icmp6_code);
5272 break;
5273 }
5274 case ICMP6_ILNPV6156: /* Locator Update (156) */
5275 {
5276 uint8_t nb_locs, i;
5277 /* Number of locs */
5278 proto_tree_add_item_ret_uint8(icmp6_tree, hf_icmpv6_ilnp_nb_locs, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &nb_locs);
5279 offset += 1;
5280
5281 /* Reserved */
5282 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 1, ENC_NA0x00000000);
5283 offset += 1;
5284
5285 /* Reserved */
5286 proto_tree_add_item(icmp6_tree, hf_icmpv6_reserved, tvb, offset, 2, ENC_NA0x00000000);
5287 offset += 2;
5288
5289 /* Locator / Preference / Lifetime */
5290 for (i=0; i < nb_locs; i++){
5291 proto_tree_add_item(icmp6_tree, hf_icmpv6_ilnp_locator, tvb, offset, 8, ENC_BIG_ENDIAN0x00000000);
5292 offset += 8;
5293
5294 proto_tree_add_item(icmp6_tree, hf_icmpv6_ilnp_preference, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5295 offset += 2;
5296
5297 proto_tree_add_item(icmp6_tree, hf_icmpv6_ilnp_lifetime, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5298 offset += 2;
5299
5300 }
5301 break;
5302 }
5303 case ICMP6_6LOWPANND_DAR157:
5304 case ICMP6_6LOWPANND_DAC158:
5305 {
5306 /* Status */
5307 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_status, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5308 offset += 1;
5309
5310 /* Reserved */
5311 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_rsv, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
5312 offset += 1;
5313
5314 /* Lifetime */
5315 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_lifetime, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
5316 offset += 2;
5317
5318 switch (icmp6_code_suffix) {
5319
5320 case ND_OPT_DA_EDA_641:
5321 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_rovr, tvb, offset, 8, ENC_NA0x00000000);
5322 offset += 8;
5323 break;
5324
5325 case ND_OPT_DA_EDA_1282:
5326 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_rovr, tvb, offset, 16, ENC_NA0x00000000);
5327 offset += 16;
5328 break;
5329
5330 case ND_OPT_DA_EDA_1923:
5331 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_rovr, tvb, offset, 24, ENC_NA0x00000000);
5332 offset += 24;
5333 break;
5334
5335 case ND_OPT_DA_EDA_2564:
5336 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_rovr, tvb, offset, 32, ENC_NA0x00000000);
5337 offset += 32;
5338 break;
5339
5340 default:
5341 /* EUI-64 */
5342 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_eui64, tvb, offset, 8, ENC_BIG_ENDIAN0x00000000);
5343 offset += 8;
5344 break;
5345 }
5346
5347 /* Address */
5348 proto_tree_add_item(icmp6_tree, hf_icmpv6_da_raddr, tvb, offset, 16, ENC_NA0x00000000);
5349 offset += 16;
5350 break;
5351 }
5352 case ICMP6_MPL_CONTROL159: /* MPL Control (159) */
5353 {
5354 /* RFC 7731: Multicast Protocol for Low-Power and Lossy Networks (MPL) */
5355 offset = dissect_mpl_control(tvb, offset, pinfo, icmp6_tree, icmp6_type, icmp6_code);
5356 break;
5357 }
5358
5359 case ICMP6_EXTECHO160: /* Extended Echo - Probe - (RFC8335) */
5360 {
5361 proto_tree_add_item(icmp6_tree, hf_icmpv6_echo_identifier, tvb, offset, 2,
5362 ENC_BIG_ENDIAN0x00000000);
5363 offset += 2;
5364 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_seq_num, tvb, offset, 1,
5365 ENC_BIG_ENDIAN0x00000000);
5366 offset += 1;
5367 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_req_reserved, tvb, offset, 1,
5368 ENC_BIG_ENDIAN0x00000000);
5369 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_req_local, tvb, offset, 1,
5370 ENC_BIG_ENDIAN0x00000000);
5371 offset += 1;
5372
5373 tvbuff_t * extension_tvb = tvb_new_subset_remaining(tvb, offset);
5374 offset += call_dissector(icmp_extension_handle, extension_tvb, pinfo, icmp6_tree);
5375 break;
5376 }
5377
5378 case ICMP6_EXTECHOREPLY161:
5379 {
5380 proto_tree_add_item(icmp6_tree, hf_icmpv6_echo_identifier, tvb, offset, 2,
5381 ENC_BIG_ENDIAN0x00000000);
5382 offset += 2;
5383 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_seq_num, tvb, offset, 1,
5384 ENC_BIG_ENDIAN0x00000000);
5385 offset += 1;
5386 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_rsp_state, tvb, offset, 1,
5387 ENC_BIG_ENDIAN0x00000000);
5388 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_rsp_reserved, tvb, offset, 1,
5389 ENC_BIG_ENDIAN0x00000000);
5390 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_rsp_active, tvb, offset, 1,
5391 ENC_BIG_ENDIAN0x00000000);
5392 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_rsp_ipv4, tvb, offset, 1,
5393 ENC_BIG_ENDIAN0x00000000);
5394 proto_tree_add_item(icmp6_tree, hf_icmpv6_ext_echo_rsp_ipv6, tvb, offset, 1,
5395 ENC_BIG_ENDIAN0x00000000);
5396 offset += 1;
5397 break;
5398 }
5399
5400 default:
5401 expert_add_info_format(pinfo, ti, &ei_icmpv6_undecoded_type,
5402 "Dissector for ICMPv6 Type (%d)"
5403 " code not implemented, Contact Wireshark"
5404 " developers if you want this supported", icmp6_type);
5405 proto_tree_add_item(icmp6_tree, hf_icmpv6_data, tvb, offset, -1, ENC_NA0x00000000);
5406 break;
5407 } /* switch (icmp6_type) */
5408 } /* if (1) */
5409
5410 if (!PINFO_FD_VISITED(pinfo)((pinfo)->fd->visited)) {
5411 icmp_info_t *p_icmp_info = wmem_new(wmem_file_scope(), icmp_info_t)((icmp_info_t*)wmem_alloc((wmem_file_scope()), sizeof(icmp_info_t
)))
;
5412 p_icmp_info->type = icmp6_type;
5413 p_icmp_info->code = icmp6_code;
5414 p_add_proto_data(wmem_file_scope(), pinfo, proto_icmpv6, 0, p_icmp_info);
5415 }
5416
5417 if (trans)
5418 tap_queue_packet(icmpv6_tap, pinfo, trans);
5419
5420 return offset;
5421}
5422
5423void
5424proto_register_icmpv6(void)
5425{
5426 static hf_register_info hf[] = {
5427 { &hf_icmpv6_type,
5428 { "Type", "icmpv6.type", FT_UINT8, BASE_DEC, VALS(icmpv6_type_val)((0 ? (const struct _value_string*)0 : ((icmpv6_type_val)))), 0x0,
5429 "Indicates the type of the message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5430 { &hf_icmpv6_code,
5431 { "Code", "icmpv6.code", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5432 "Depends on the message type. It is used to create an additional level of message granularity", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5433 { &hf_icmpv6_mcast_ra_ad_interval,
5434 { "Ad. Interval", "icmpv6.mcast_ra.adv_int", FT_UINT8, BASE_DEC|BASE_UNIT_STRING0x00001000, UNS(&units_seconds)((0 ? (const struct unit_name_string*)0 : ((&units_seconds
))))
, 0x0,
5435 "Advertisement Interval of MRD Advertisement Packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5436 { &hf_icmpv6_mcast_ra_reserved,
5437 { "Reserved", "icmpv6.mcast_ra.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5438 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5439 { &hf_icmpv6_checksum,
5440 { "Checksum", "icmpv6.checksum", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
5441 "Used to detect data corruption in the ICMPv6 message and parts of the IPv6 header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5442 { &hf_icmpv6_checksum_status,
5443 { "Checksum Status", "icmpv6.checksum.status", FT_UINT8, BASE_NONE, VALS(proto_checksum_vals)((0 ? (const struct _value_string*)0 : ((proto_checksum_vals)
)))
, 0x0,
5444 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5445 { &hf_icmpv6_reserved,
5446 { "Reserved", "icmpv6.reserved", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5447 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5448 { &hf_icmpv6_data,
5449 { "Data", "icmpv6.data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5450 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5451 { &hf_icmpv6_unknown_data,
5452 { "Unknown Data", "icmpv6.unknown_data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5453 "Not interpreted Data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5454 { &hf_icmpv6_mtu,
5455 { "MTU", "icmpv6.mtu", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5456 "The Maximum Transmission Unit of the next-hop link", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5457 { &hf_icmpv6_pointer,
5458 { "Pointer", "icmpv6.pointer", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5459 "Identifies the octet offset within the invoking packet where the error was detected", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5460 { &hf_icmpv6_echo_identifier,
5461 { "Identifier", "icmpv6.echo.identifier", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
5462 "An identifier to aid in matching with Request and Reply", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5463 { &hf_icmpv6_echo_sequence_number,
5464 { "Sequence", "icmpv6.echo.sequence_number", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5465 "A sequence number to aid in matching Echo Replies to this Echo Request", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5466 { &hf_icmpv6_nonce,
5467 { "Nonce", "icmpv6.nonce", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5468 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5469 { &hf_icmpv6_data_time,
5470 { "Timestamp from Echo data", "icmpv6.data_time",
5471 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL((void*)0), 0x0,
5472 "The timestamp in the first 8 or 16 bytes of the Echo data",
5473 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5474 { &hf_icmpv6_data_time_relative,
5475 { "Timestamp from Echo data (relative)", "icmpv6.data_time_relative",
5476 FT_RELATIVE_TIME, BASE_NONE, NULL((void*)0), 0x0,
5477 "The timestamp of the packet, relative to the timestamp in the first 8 or 16 bytes of the Echo data",
5478 HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5479 /* RFC 2461/4861 : Neighbor Discovery for IP version 6 (IPv6) */
5480 { &hf_icmpv6_nd_ra_cur_hop_limit,
5481 { "Cur hop limit", "icmpv6.nd.ra.cur_hop_limit", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5482 "The default value that should be placed in the Hop Count field of the IP header for outgoing IP packets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5483 { &hf_icmpv6_nd_ra_flag,
5484 { "Flags", "icmpv6.nd.ra.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
5485 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5486 { &hf_icmpv6_nd_ra_flag_m,
5487 { "Managed address configuration", "icmpv6.nd.ra.flag.m", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_RA_FLAG_M0x80,
5488 "When set, it indicates that addresses are available via DHCPv6", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5489 { &hf_icmpv6_nd_ra_flag_o,
5490 { "Other configuration", "icmpv6.nd.ra.flag.o", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_RA_FLAG_O0x40,
5491 "When set, it indicates that other configuration information is available via DHCPv6", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5492 { &hf_icmpv6_nd_ra_flag_h,
5493 { "Home Agent", "icmpv6.nd.ra.flag.h", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_RA_FLAG_H0x20,
5494 "When set, it indicate that the router sending this Router Advertisement is also functioning as a Mobile IPv6 home agent on this link", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5495 { &hf_icmpv6_nd_ra_flag_prf,
5496 { "Prf (Default Router Preference)", "icmpv6.nd.ra.flag.prf", FT_UINT8, BASE_DEC, VALS(nd_flag_router_pref)((0 ? (const struct _value_string*)0 : ((nd_flag_router_pref)
)))
, ND_RA_FLAG_PRF0x18,
5497 "Indicates whether to prefer this router over other default routers", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5498 { &hf_icmpv6_nd_ra_flag_p,
5499 { "ND Proxy", "icmpv6.nd.ra.flag.p", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_RA_FLAG_P0x04,
5500 "Neighbor Discovery Proxy (Experimental - RFC4389)" , HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5501 { &hf_icmpv6_nd_ra_flag_s,
5502 { "SNAC Router", "icmpv6.nd.ra.flag.s", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_RA_FLAG_S0x02,
5503 "Indicates whether the router operates as Stub Network Auto-Configuring (SNAC) router" , HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5504 { &hf_icmpv6_nd_ra_flag_rsv,
5505 { "Reserved", "icmpv6.nd.ra.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), ND_RA_FLAG_RSV0x01,
5506 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5507 { &hf_icmpv6_nd_ra_router_lifetime,
5508 { "Router lifetime (s)", "icmpv6.nd.ra.router_lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5509 "The lifetime associated with the default router", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5510 { &hf_icmpv6_nd_ra_reachable_time,
5511 { "Reachable time (ms)", "icmpv6.nd.ra.reachable_time", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5512 "The time that a node assumes a neighbor is reachable after having received a reachability confirmation", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5513 { &hf_icmpv6_nd_ra_retrans_timer,
5514 { "Retrans timer (ms)", "icmpv6.nd.ra.retrans_timer", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5515 "The time between retransmitted Neighbor Solicitation messages", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5516 { &hf_icmpv6_nd_ns_target_address,
5517 { "Target Address", "icmpv6.nd.ns.target_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5518 "The IP address of the target of the solicitation", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5519 { &hf_icmpv6_nd_na_flag,
5520 { "Flags", "icmpv6.nd.na.flag", FT_UINT32, BASE_HEX, NULL((void*)0), 0x0,
5521 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5522 { &hf_icmpv6_nd_na_flag_r,
5523 { "Router", "icmpv6.nd.na.flag.r", FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_NA_FLAG_R0x80000000,
5524 "When set, it indicates that the sender is a router", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5525 { &hf_icmpv6_nd_na_flag_s,
5526 { "Solicited", "icmpv6.nd.na.flag.s", FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_NA_FLAG_S0x40000000,
5527 "When set, it indicates that the advertisement was sent in response to a Neighbor Solicitation from the Destination address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5528 { &hf_icmpv6_nd_na_flag_o,
5529 { "Override", "icmpv6.nd.na.flag.o", FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_NA_FLAG_O0x20000000,
5530 "When set, it indicates that the advertisement should override an existing cache entry and update the cached link-layer address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5531 { &hf_icmpv6_nd_na_flag_rsv,
5532 { "Reserved", "icmpv6.nd.na.flag.rsv", FT_UINT32, BASE_DEC, NULL((void*)0), ND_NA_FLAG_RSV0x1FFFFFFF,
5533 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5534 { &hf_icmpv6_nd_na_target_address,
5535 { "Target Address", "icmpv6.nd.na.target_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5536 "the Target Address field in the Neighbor Solicitation message that prompted this advertisement", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5537 { &hf_icmpv6_nd_rd_target_address,
5538 { "Target Address", "icmpv6.nd.rd.target_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5539 "An IP address that is a better first hop to use for the ICMP Destination Address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5540 { &hf_icmpv6_nd_rd_destination_address,
5541 { "Destination Address", "icmpv6.rd.na.destination_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5542 "The IP address of the destination that is redirected to the target", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5543 { &hf_icmpv6_opt,
5544 { "ICMPv6 Option", "icmpv6.opt", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5545 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5546 { &hf_icmpv6_opt_type,
5547 { "Type", "icmpv6.opt.type", FT_UINT8, BASE_DEC, VALS(option_vals)((0 ? (const struct _value_string*)0 : ((option_vals)))), 0x0,
5548 "Options type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5549 { &hf_icmpv6_opt_length,
5550 { "Length", "icmpv6.opt.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5551 "The length (in units of 8 bytes) of the option (including the Type and Length fields)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5552 { &hf_icmpv6_opt_reserved,
5553 { "Reserved", "icmpv6.opt.reserved", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5554 "Reserved (Must be 0)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5555 { &hf_icmpv6_opt_padding,
5556 { "Padding", "icmpv6.opt.padding", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5557 "Padding (Must be 0)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5558 { &hf_icmpv6_opt_linkaddr,
5559 { "Link-layer address", "icmpv6.opt.linkaddr", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5560 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5561 { &hf_icmpv6_opt_src_linkaddr,
5562 { "Source Link-layer address", "icmpv6.opt.src_linkaddr", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5563 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5564 { &hf_icmpv6_opt_target_linkaddr,
5565 { "Target Link-layer address", "icmpv6.opt.target_linkaddr", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5566 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5567 { &hf_icmpv6_opt_linkaddr_mac,
5568 { "Link-layer address", "icmpv6.opt.linkaddr", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0,
5569 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5570 { &hf_icmpv6_opt_src_linkaddr_mac,
5571 { "Source Link-layer address", "icmpv6.opt.src_linkaddr", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0,
5572 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5573 { &hf_icmpv6_opt_target_linkaddr_mac,
5574 { "Target Link-layer address", "icmpv6.opt.target_linkaddr", FT_ETHER, BASE_NONE, NULL((void*)0), 0x0,
5575 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5576 { &hf_icmpv6_opt_linkaddr_eui64,
5577 { "Link-layer address", "icmpv6.opt.linkaddr_eui64", FT_EUI64, BASE_NONE, NULL((void*)0), 0x0,
5578 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5579 { &hf_icmpv6_opt_src_linkaddr_eui64,
5580 { "Source Link-layer address", "icmpv6.opt.src_linkaddr_eui64", FT_EUI64, BASE_NONE, NULL((void*)0), 0x0,
5581 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5582 { &hf_icmpv6_opt_target_linkaddr_eui64,
5583 { "Target Link-layer address", "icmpv6.opt.target_linkaddr_eui64", FT_EUI64, BASE_NONE, NULL((void*)0), 0x0,
5584 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5585 { &hf_icmpv6_opt_prefix_len,
5586 { "Prefix Length", "icmpv6.opt.prefix.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5587 "The number of leading bits in the Prefix that are valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5588 { &hf_icmpv6_opt_prefix_flag,
5589 { "Flag", "icmpv6.opt.prefix.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
5590 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5591 { &hf_icmpv6_opt_prefix_flag_l,
5592 { "On-link Flag (L)", "icmpv6.opt.prefix.flag.l", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80,
5593 "When set, indicates that this prefix can be used for on-link determination, and traffic to those destinations is sent directly (not via routers)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5594 { &hf_icmpv6_opt_prefix_flag_a,
5595 { "Autonomous Address Configuration Flag (A)", "icmpv6.opt.prefix.flag.a", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x40,
5596 "When set, indicates that this prefix can be used for stateless address configuration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5597 { &hf_icmpv6_opt_prefix_flag_r,
5598 { "Router Address Flag (R)", "icmpv6.opt.prefix.flag.r", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x20,
5599 "When set, indicates that the Prefix field contains a complete IP address assigned to the sending router", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5600 { &hf_icmpv6_opt_prefix_flag_p,
5601 { "DHCPv6-PD Preferred Flag (P)", "icmpv6.opt.prefix.flag.p", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x10,
5602 "When set, indicates that the network prefers that clients use Prefix Delegation (PD) instead of acquiring individual addresses via SLAAC or DHCPv6 address assignment.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5603 { &hf_icmpv6_opt_prefix_flag_reserved,
5604 { "Reserved", "icmpv6.opt.prefix.flag.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0xf,
5605 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5606 { &hf_icmpv6_opt_prefix_valid_lifetime,
5607 { "Valid Lifetime", "icmpv6.opt.prefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x00,
5608 "The length of time in seconds that the prefix is valid for the purpose of on-link determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5609 { &hf_icmpv6_opt_prefix_preferred_lifetime,
5610 { "Preferred Lifetime", "icmpv6.opt.prefix.preferred_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x00,
5611 "The length of time in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5612 { &hf_icmpv6_opt_prefix,
5613 { "Prefix", "icmpv6.opt.prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5614 "An IP address or a prefix of an IP address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5615 { &hf_icmpv6_opt_cga_pad_len,
5616 { "Pad Length", "icmpv6.opt.cga.pad_length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5617 "Pad Length (in bytes)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5618 { &hf_icmpv6_opt_cga,
5619 { "CGA", "icmpv6.opt.cga", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5620 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5621 { &hf_icmpv6_opt_cga_modifier,
5622 { "Modifier", "icmpv6.opt.cga.modifier", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5623 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5624 { &hf_icmpv6_opt_cga_subnet_prefix,
5625 { "Subnet Prefix", "icmpv6.opt.cga.subnet_prefix", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5626 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5627 { &hf_icmpv6_opt_cga_count,
5628 { "Count", "icmpv6.opt.cga.count", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5629 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5630 { &hf_icmpv6_opt_cga_subject_public_key_info,
5631 { "Subject Public Key Info", "icmpv6.opt.cga.subject_public_key_info", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5632 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5633 { &hf_icmpv6_opt_cga_ext_type,
5634 { "Ext Type", "icmpv6.opt.cga.ext_type", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5635 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5636 { &hf_icmpv6_opt_cga_ext_length,
5637 { "Ext Length", "icmpv6.opt.cga.ext_length", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5638 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5639 { &hf_icmpv6_opt_cga_ext_data,
5640 { "Ext Data", "icmpv6.opt.cga.ext_data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5641 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5642 { &hf_icmpv6_opt_rsa_key_hash,
5643 { "Key Hash", "icmpv6.opt.rsa.key_hash", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5644 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5645 { &hf_icmpv6_opt_digital_signature_padding,
5646 { "Digital Signature and Padding", "icmpv6.opt.digital_signature_padding", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5647 "TO DO FIX ME !!", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5648 { &hf_icmpv6_opt_ps_key_hash,
5649 { "Key Hash", "icmpv6.opt.ps.key_hash", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5650 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5651 { &hf_icmpv6_opt_timestamp,
5652 { "Timestamp", "icmpv6.opt.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL((void*)0), 0x0,
5653 "The value indicates the number of seconds since January 1, 1970, 00:00 UTC", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5654 { &hf_icmpv6_opt_nonce,
5655 { "Nonce", "icmpv6.opt.nonce", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5656 "A field containing a random number selected by the sender of the solicitation message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5657 { &hf_icmpv6_opt_certificate_padding,
5658 { "Certificate and Padding", "icmpv6.opt.certificate_padding", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5659 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5660 { &hf_icmpv6_opt_ipa_option_code,
5661 { "Option-code", "icmpv6.opt.ipa.option_code", FT_UINT8, BASE_DEC, VALS(nd_opt_ipa_option_code_val)((0 ? (const struct _value_string*)0 : ((nd_opt_ipa_option_code_val
))))
, 0x00,
5662 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5663 { &hf_icmpv6_opt_ipa_prefix_len,
5664 { "Prefix Length", "icmpv6.opt.ipa.prefix_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5665 "That indicates the length of the IPv6 Address Prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5666 { &hf_icmpv6_opt_ipa_ipv6_address,
5667 { "IPv6 Address", "icmpv6.opt.ipa.ipv6_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5668 "The IP address/prefix defined by the Option-Code field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5669 { &hf_icmpv6_opt_nrpi_option_code,
5670 { "Option-code", "icmpv6.opt.nrpi.option_code", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5671 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5672 { &hf_icmpv6_opt_nrpi_prefix_len,
5673 { "Prefix Length", "icmpv6.opt.nrpi.prefix_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5674 "The number of leading bits in the Prefix that are valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5675 { &hf_icmpv6_opt_nrpi_prefix,
5676 { "Prefix", "icmpv6.opt.nrpi.prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5677 "An IP address or a prefix of an IP address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5678 { &hf_icmpv6_opt_lla_option_code,
5679 { "Option-code", "icmpv6.opt.lla.option_code", FT_UINT8, BASE_DEC, VALS(nd_opt_lla_option_code_val)((0 ? (const struct _value_string*)0 : ((nd_opt_lla_option_code_val
))))
, 0x00,
5680 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5681 { &hf_icmpv6_opt_lla_bytes,
5682 { "Link-Layer Address", "icmpv6.opt.lla.bytes", FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
5683 "(in Bytes Format)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5684 { &hf_icmpv6_opt_naack_option_code,
5685 { "Option-Code", "icmpv6.opt.naack.option_code", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5686 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5687 { &hf_icmpv6_opt_naack_status,
5688 { "Status", "icmpv6.opt.naack.status", FT_UINT8, BASE_DEC, VALS(nd_opt_naack_status_val)((0 ? (const struct _value_string*)0 : ((nd_opt_naack_status_val
))))
, 0x00,
5689 "Indicating the disposition of the Unsolicited Neighbor Advertisement message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5690 { &hf_icmpv6_opt_naack_supplied_ncoa,
5691 { "Supplied NCoA", "icmpv6.opt.naack.supplied_ncoa", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5692 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5693
5694 { &hf_icmpv6_opt_pvd_id_flags,
5695 { "Flags", "icmpv6.opt.pvd_id.flags", FT_UINT16, BASE_HEX, NULL((void*)0), 0xFFF0,
5696 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5697 { &hf_icmpv6_opt_pvd_id_flags_h,
5698 { "H-Flag", "icmpv6.opt.pvd_id.flags.h", FT_BOOLEAN, 16, NULL((void*)0), 0x8000,
5699 "'HTTP' flag stating whether some PvD Additional Information is made available through HTTP over TLS", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5700 { &hf_icmpv6_opt_pvd_id_flags_l,
5701 { "L-Flag", "icmpv6.opt.pvd_id.flags.l", FT_BOOLEAN, 16, NULL((void*)0), 0x4000,
5702 "'Legacy' flag stating whether the PvD is associated with IPv4 information assigned using DHCPv4", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5703 { &hf_icmpv6_opt_pvd_id_flags_r,
5704 { "R-Flag", "icmpv6.opt.pvd_id.flags.r", FT_BOOLEAN, 16, NULL((void*)0), 0x2000,
5705 "'Router Advertisement' flag stating whether the PvD Option header is followed (right after padding to the next 64-bit boundary) by a Router Advertisement message header", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5706 { &hf_icmpv6_opt_pvd_id_flags_reserved,
5707 { "Reserved", "icmpv6.opt.pvd_id.flags.reserved", FT_UINT16, BASE_HEX, NULL((void*)0), 0x1FF0,
5708 "Must be 0", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5709 { &hf_icmpv6_opt_pvd_id_delay,
5710 { "Delay", "icmpv6.opt.pvd_id.delay", FT_UINT16, BASE_DEC, NULL((void*)0), 0x000F,
5711 "Unsigned integer used to delay HTTP GET queries from hosts by a randomized backoff", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5712 { &hf_icmpv6_opt_pvd_id_sequence_number,
5713 { "Sequence Number", "icmpv6.opt.pvd_id.sequence_number", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5714 "Sequence number for the PvD Additional Information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5715 { &hf_icmpv6_opt_pvd_id_fqdn,
5716 { "PvD ID FQDN", "icmpv6.opt.pvd_id.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0,
5717 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5718
5719
5720 { &hf_icmpv6_opt_map_dist,
5721 { "Distance", "icmpv6.opt.map.distance", FT_UINT8, BASE_DEC, NULL((void*)0), 0xF0,
5722 "Identifying the distance between MAP and the receiver of the advertisement (in the number of hops)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5723 { &hf_icmpv6_opt_map_pref,
5724 { "Preference", "icmpv6.opt.map.preference", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0F,
5725 "Used as an indicator of operator preference (Highest is better)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5726 { &hf_icmpv6_opt_map_flag,
5727 { "Flag", "icmpv6.opt.map.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
5728 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5729 { &hf_icmpv6_opt_map_flag_r,
5730 { "RCoA Flag", "icmpv6.opt.map.flag.r", FT_BOOLEAN, 8, NULL((void*)0), 0x80,
5731 "It indicates that the mobile node is allocated the RCoA by the MAP", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5732 { &hf_icmpv6_opt_map_flag_reserved,
5733 { "Reserved", "icmpv6.opt.map.flag.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x7F,
5734 "Must be 0", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5735 { &hf_icmpv6_opt_map_valid_lifetime,
5736 { "Valid Lifetime", "icmpv6.opt.map.valid_lifetime", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5737 "This value indicates the validity of the MAP's address and the RCoA.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5738 { &hf_icmpv6_opt_map_global_address,
5739 { "Global Address", "icmpv6.opt.map.global_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5740 "One of the MAP's global addresses", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5741 { &hf_icmpv6_opt_route_info_flag,
5742 { "Flag", "icmpv6.opt.route_info.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
5743 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5744 { &hf_icmpv6_opt_route_info_flag_route_preference,
5745 { "Route Preference", "icmpv6.opt.route_info.flag.route_preference", FT_UINT8, BASE_DEC, VALS(nd_flag_router_pref)((0 ? (const struct _value_string*)0 : ((nd_flag_router_pref)
)))
, ND_RA_FLAG_RTPREF_MASK0x18,
5746 "The Route Preference indicates whether to prefer the router associated with this prefix over others", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5747 { &hf_icmpv6_opt_route_info_flag_reserved,
5748 { "Reserved", "icmpv6.opt.route_info.flag.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), ND_RA_FLAG_RESERV_MASK0xE7,
5749 "Must be 0", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5750 { &hf_icmpv6_opt_route_lifetime,
5751 { "Route Lifetime", "icmpv6.opt.route_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x00,
5752 "The length of time in seconds that the prefix is valid for the purpose of route determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5753 { &hf_icmpv6_opt_name_type,
5754 { "Name Type", "icmpv6.opt.name_type", FT_UINT8, BASE_DEC, VALS(icmpv6_option_name_type_vals)((0 ? (const struct _value_string*)0 : ((icmpv6_option_name_type_vals
))))
, 0x0,
5755 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5756 { &hf_icmpv6_opt_name_x501,
5757 { "DER Encoded X.501 Name", "icmpv6.opt.name_x501", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5758 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5759 { &hf_icmpv6_opt_name_fqdn,
5760 { "FQDN", "icmpv6.opt.name_type.fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0,
5761 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5762 { &hf_icmpv6_opt_cert_type,
5763 { "Cert Type", "icmpv6.opt.cert_type", FT_UINT8, BASE_DEC, VALS(icmpv6_option_cert_type_vals)((0 ? (const struct _value_string*)0 : ((icmpv6_option_cert_type_vals
))))
, 0x0,
5764 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5765 /* RFC3971: SEcure Neighbor Discovery (SEND) */
5766 { &hf_icmpv6_send_identifier,
5767 { "Identifier", "icmpv6.send.identifier", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5768 "An identifier to aid in matching with Request and Reply", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5769 { &hf_icmpv6_send_all_components,
5770 { "All Components", "icmpv6.send.all_components", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5771 "Inform the receiver of the number of certificates in the entire path", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5772 { &hf_icmpv6_send_component,
5773 { "Component", "icmpv6.send.component", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5774 "If the field is set to 65,535 if the sender seeks to retrieve all certificates", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5775
5776 { &hf_icmpv6_x509if_Name,
5777 { "Name", "icmpv6.x509_Name", FT_UINT32, BASE_DEC, VALS(x509if_Name_vals)((0 ? (const struct _value_string*)0 : ((x509if_Name_vals)))), 0x0,
5778 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5779 { &hf_icmpv6_x509af_Certificate,
5780 { "Certificate", "icmpv6.x509_Certificate", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5781 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5782 { &hf_icmpv6_opt_redirected_packet,
5783 { "Redirected Packet", "icmpv6.opt.redirected_packet", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
5784 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5785 { &hf_icmpv6_opt_mtu,
5786 { "MTU", "icmpv6.opt.mtu", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5787 "The recommended MTU for the link", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5788 { &hf_icmpv6_opt_nbma_shortcut_limit,
5789 { "Shortcut Limit", "icmpv6.opt.nbma.shortcut_limit", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5790 "Hop limit for shortcut attempt", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5791 { &hf_icmpv6_opt_advertisement_interval,
5792 { "Advertisement Interval", "icmpv6.opt.advertisement_interval", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
5793 "The maximum time (in milliseconds) between successive unsolicited Router Advertisement messages sent by this router on this network interface", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5794 { &hf_icmpv6_opt_home_agent_preference,
5795 { "Home Agent Preference", "icmpv6.opt.home_agent_preference", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5796 "The preference for the home agent sending this Router Advertisement", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5797 { &hf_icmpv6_opt_home_agent_lifetime,
5798 { "Home Agent Preference", "icmpv6.opt.home_agent_lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5799 "The lifetime associated with the home agent in units of seconds.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5800 { &hf_icmpv6_opt_ipv6_address,
5801 { "IPv6 Address", "icmpv6.opt.ipv6_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5802 "IPv6 addresses of the interface", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5803 { &hf_icmpv6_opt_rdnss_lifetime,
5804 { "Lifetime", "icmpv6.opt.rdnss.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(rdnss_infinity)((0 ? (const struct _value_string*)0 : ((rdnss_infinity)))), 0x0,
5805 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5806 { &hf_icmpv6_opt_rdnss,
5807 { "Recursive DNS Servers", "icmpv6.opt.rdnss", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
5808 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5809 { &hf_icmpv6_opt_efo,
5810 { "Flags Expansion Option", "icmpv6.opt.efo", FT_UINT48, BASE_HEX, NULL((void*)0), 0x0,
5811 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5812 { &hf_icmpv6_opt_efo_rsv,
5813 { "Reserved", "icmpv6.opt.efo.rsv", FT_UINT48, BASE_HEX, NULL((void*)0), FLAGS_EO_RSV0xFFFFFFFFFFFC,
5814 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5815 { &hf_icmpv6_opt_efo_pex,
5816 { "Private Experimentation", "icmpv6.opt.efo.pex", FT_UINT48, BASE_HEX, NULL((void*)0), FLAGS_EO_PEX0x000000000003,
5817 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5818 { &hf_icmpv6_opt_hkr_pad_length,
5819 { "Pad Length", "icmpv6.opt.hkr.pad_length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5820 "The number of padding octets beyond the end of the Handover Key", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5821 { &hf_icmpv6_opt_hkr_at,
5822 { "AT", "icmpv6.opt.hkr.at", FT_UINT8, BASE_DEC, NULL((void*)0), 0xF0,
5823 "The algorithm type field describing the algorithm used by FMIPv6 to calculate the authenticator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5824 { &hf_icmpv6_opt_hkr_reserved,
5825 { "Reserved", "icmpv6.opt.hkr.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0F,
5826 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5827 { &hf_icmpv6_opt_hkr_encryption_public_key,
5828 { "Handover Key Encryption Public Key", "icmpv6.opt.hkr.encryption_public_key", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5829 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5830 { &hf_icmpv6_opt_hkr_padding,
5831 { "Padding", "icmpv6.opt.hkr.padding", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5832 "A variable-length field making the option length a multiple of 8", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5833 { &hf_icmpv6_opt_hkr_lifetime,
5834 { "Padding", "icmpv6.opt.hkr.lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
5835 "Lifetime of the handover key (in seconds)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5836 { &hf_icmpv6_opt_hkr_encrypted_handover_key,
5837 { "Encrypted Handover Key", "icmpv6.opt.hkr.encrypted_handover_key", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5838 "The shared handover key, encrypted with the MN's handover key encryption public key", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5839 { &hf_icmpv6_opt_hai_option_code,
5840 { "Option-Code", "icmpv6.opt.hai.option_code", FT_UINT8, BASE_DEC, VALS(nd_opt_hai_option_code_val)((0 ? (const struct _value_string*)0 : ((nd_opt_hai_option_code_val
))))
, 0x0,
5841 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5842 { &hf_icmpv6_opt_hai_length,
5843 { "HAI-Length", "icmpv6.opt.hai.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5844 "The size of the HAI-Value field in octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5845 { &hf_icmpv6_opt_hai_value,
5846 { "HAI-Value", "icmpv6.opt.hai.value", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5847 "The value specified by the Option-Code", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5848 { &hf_icmpv6_opt_mn_option_code,
5849 { "Option-Code", "icmpv6.opt.mn.option_code", FT_UINT8, BASE_DEC, VALS(nd_opt_mn_option_code_val)((0 ? (const struct _value_string*)0 : ((nd_opt_mn_option_code_val
))))
, 0x0,
5850 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5851 { &hf_icmpv6_opt_mn_length,
5852 { "MN-Length", "icmpv6.opt.mn.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
5853 "The size of the MN-Value field in octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5854 { &hf_icmpv6_opt_mn_value,
5855 { "MN-Value", "icmpv6.opt.mn.value", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
5856 "The value specified by the Option-Code", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5857 { &hf_icmpv6_opt_dnssl_lifetime,
5858 { "Lifetime", "icmpv6.opt.dnssl.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(dnssl_infinity)((0 ? (const struct _value_string*)0 : ((dnssl_infinity)))), 0x0,
5859 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5860 { &hf_icmpv6_opt_dnssl,
5861 { "Domain Names", "icmpv6.opt.dnssl", FT_STRING, BASE_NONE, NULL((void*)0), 0x0,
5862 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5863 { &hf_icmpv6_opt_aro_status,
5864 { "Status", "icmpv6.opt.aro.status", FT_UINT8, BASE_DEC, VALS(nd_opt_earo_status_val)((0 ? (const struct _value_string*)0 : ((nd_opt_earo_status_val
))))
, 0x00,
5865 "Indicates the status of a registration in the NA response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5866 { &hf_icmpv6_opt_earo_reserved,
5867 { "Reserved", "icmpv6.opt.earo.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5868 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5869 { &hf_icmpv6_opt_earo_opaque,
5870 { "Opaque", "icmpv6.opt.earo.opaque", FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
5871 "An opaque field whose content is dictated by flag I", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5872 { &hf_icmpv6_opt_earo_flag,
5873 { "Flags", "icmpv6.opt.earo.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
5874 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5875 { &hf_icmpv6_opt_earo_flag_reserved,
5876 { "Reserved", "icmpv6.opt.earo.flag.reserved", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_EARO_FLAG_RESERVED0x80,
5877 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5878 { &hf_icmpv6_opt_earo_flag_c,
5879 { "C", "icmpv6.opt.earo.flag.c", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_EARO_FLAG_C0x40,
5880 "Indicates that the ROVR field contains a Crypto-ID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5881 { &hf_icmpv6_opt_earo_flag_p,
5882 { "P", "icmpv6.opt.earo.flag.p", FT_UINT8, BASE_DEC, VALS(nd_opt_earo_p_val)((0 ? (const struct _value_string*)0 : ((nd_opt_earo_p_val)))
)
, ND_OPT_EARO_FLAG_P0x30,
5883 "Registered Address Type Indicator (RATInd)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5884 { &hf_icmpv6_opt_earo_flag_i,
5885 { "I", "icmpv6.opt.earo.flag.i", FT_UINT8, BASE_DEC, VALS(nd_opt_earo_i_val)((0 ? (const struct _value_string*)0 : ((nd_opt_earo_i_val)))
)
, ND_OPT_EARO_FLAG_I0x0C,
5886 "Indicates the contents of the Opaque field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5887 { &hf_icmpv6_opt_earo_flag_r,
5888 { "R", "icmpv6.opt.earo.flag.r", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_EARO_FLAG_R0x02,
5889 "Request reachability services for the Registered Address from a Routing Registrar", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5890 { &hf_icmpv6_opt_earo_flag_t,
5891 { "T", "icmpv6.opt.earo.flag.t", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_EARO_FLAG_T0x01,
5892 "When 0, the Transaction ID field must be ignored", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5893 { &hf_icmpv6_opt_earo_flag_f,
5894 { "F", "icmpv6.opt.earo.flag.f", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80,
5895 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5896 { &hf_icmpv6_opt_earo_prefix_len,
5897 { "Prefix Length", "icmpv6.opt.earo.prefix_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5898 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5899 { &hf_icmpv6_opt_earo_tid,
5900 { "TID (Transaction ID)", "icmpv6.opt.earo.tid", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5901 "Unsigned integer maintained by the node and incremented with each registration.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5902 { &hf_icmpv6_opt_earo_rovr,
5903 { "ROVR", "icmpv6.opt.earo.rovr", FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
5904 "Registration Ownership Verifier (ROVR)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5905 { &hf_icmpv6_opt_aro_registration_lifetime,
5906 { "Registration Lifetime", "icmpv6.opt.aro.registration_lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
5907 "The amount of time (in a unit of 60 seconds) that the router should retain the Neighbor Cache entry", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5908 { &hf_icmpv6_opt_aro_eui64,
5909 { "EUI-64", "icmpv6.opt.aro.eui64", FT_EUI64, BASE_NONE, NULL((void*)0), 0x00,
5910 "This field is used to uniquely identify the interface of the registered address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5911 { &hf_icmpv6_opt_6co_context_length,
5912 { "Context Length", "icmpv6.opt.6co.context_length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
5913 "The number of leading bits in the Context Prefix field that are valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5914 { &hf_icmpv6_opt_6co_flag,
5915 { "Flag", "icmpv6.opt.6co.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
5916 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5917 { &hf_icmpv6_opt_6co_flag_c,
5918 { "Compression Flag", "icmpv6.opt.6co.flag.c", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_6CO_FLAG_C0x10,
5919 "This flag indicates if the context is valid for use in compression", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5920 { &hf_icmpv6_opt_6co_flag_cid,
5921 { "CID", "icmpv6.opt.6co.flag.cid", FT_UINT8, BASE_DEC, NULL((void*)0), ND_OPT_6CO_FLAG_CID0x0F,
5922 "Context Identifier for this prefix information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5923 { &hf_icmpv6_opt_6co_flag_reserved,
5924 { "Reserved", "icmpv6.opt.6co.flag.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), ND_OPT_6CO_FLAG_RESERVED0xE0,
5925 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5926 { &hf_icmpv6_opt_6co_valid_lifetime,
5927 { "Lifetime", "icmpv6.opt.6co.valid_lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
5928 "The length of time in a unit of 60 seconds that the context is valid for the purpose of header compression or decompression", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5929 { &hf_icmpv6_opt_6co_context_prefix,
5930 { "Context Prefix", "icmpv6.opt.6co.context_prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5931 "The IPv6 prefix or address corresponding to the Context ID (CID) field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5932 { &hf_icmpv6_opt_abro_version_low,
5933 { "Version Low", "icmpv6.opt.abro.version_low", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
5934 "The version number low (the least significant 16 bits) corresponding to this set of information contained in the RA message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5935 { &hf_icmpv6_opt_abro_version_high,
5936 { "Version", "icmpv6.opt.abro.version_high", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
5937 "The version number high (most significant 16 bits) corresponding to this set of information contained in the RA message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5938 { &hf_icmpv6_opt_abro_valid_lifetime,
5939 { "Valid Lifetime", "icmpv6.opt.abro.valid_lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
5940 "The length of time in a unit of 60 seconds (relative to the time the packet is received) that this set of border router information is valid.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5941 { &hf_icmpv6_opt_abro_6lbr_address,
5942 { "6LBR Address", "icmpv6.opt.abro.6lbr_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5943 "IPv6 address of the 6LBR that is the origin of the included version number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5944 { &hf_icmpv6_opt_6cio_flag,
5945 { "Capability Bits", "icmpv6.opt.6cio.flag", FT_UINT48, BASE_HEX, NULL((void*)0), 0x00,
5946 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5947 { &hf_icmpv6_opt_6cio_flag_reserved,
5948 { "Reserved", "icmpv6.opt.6cio.flag.reserved", FT_BOOLEAN, 48, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_6CIO_FLAG_RESERVED0x00007FFFFFFF,
5949 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5950 { &hf_icmpv6_opt_6cio_flag_f,
5951 { "Prefix registration (F bit)", "icmpv6.opt.6cio.flag.f", FT_BOOLEAN, 48, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, ND_OPT_6CIO_FLAG_F0x000080000000,
5952 "Registration for prefixes supported (RFC9926)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5953 { &hf_icmpv6_opt_6cio_flag_g,
5954 { "GHC (G bit)", "icmpv6.opt.6cio.flag.g", FT_BOOLEAN, 48, TFS(&tfs_capable_not_capable)((0 ? (const struct true_false_string*)0 : ((&tfs_capable_not_capable
))))
, ND_OPT_6CIO_FLAG_G0x000100000000,
5955 "GHC capable (RFC7400)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5956 { &hf_icmpv6_opt_6cio_flag_e,
5957 { "EARO (E bit)", "icmpv6.opt.6cio.flag.e", FT_BOOLEAN, 48, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, ND_OPT_6CIO_FLAG_E0x000200000000,
5958 "EARO support (RFC8505)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5959 { &hf_icmpv6_opt_6cio_flag_p,
5960 { "Routing Registrar (P bit)", "icmpv6.opt.6cio.flag.p", FT_BOOLEAN, 48, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_6CIO_FLAG_P0x000400000000,
5961 "Routing Registrar (RFC8505)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5962 { &hf_icmpv6_opt_6cio_flag_b,
5963 { "6LBR (B bit)", "icmpv6.opt.6cio.flag.b", FT_BOOLEAN, 48, TFS(&tfs_capable_not_capable)((0 ? (const struct true_false_string*)0 : ((&tfs_capable_not_capable
))))
, ND_OPT_6CIO_FLAG_B0x000800000000,
5964 "6LBR capable (RFC8505)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5965 { &hf_icmpv6_opt_6cio_flag_l,
5966 { "6LR (L bit)", "icmpv6.opt.6cio.flag.l", FT_BOOLEAN, 48, TFS(&tfs_capable_not_capable)((0 ? (const struct true_false_string*)0 : ((&tfs_capable_not_capable
))))
, ND_OPT_6CIO_FLAG_L0x001000000000,
5967 "6LR capable (RFC8505)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5968 { &hf_icmpv6_opt_6cio_flag_d,
5969 { "EDA (D bit)", "icmpv6.opt.6cio.flag.d", FT_BOOLEAN, 48, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, ND_OPT_6CIO_FLAG_D0x002000000000,
5970 "EDA Support (RFC8505)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5971 { &hf_icmpv6_opt_6cio_flag_a,
5972 { "AP-ND (A bit)", "icmpv6.opt.6cio.flag.a", FT_BOOLEAN, 48, TFS(&tfs_enabled_disabled)((0 ? (const struct true_false_string*)0 : ((&tfs_enabled_disabled
))))
, ND_OPT_6CIO_FLAG_A0x004000000000,
5973 "AP-ND Enabled (RFC8928)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5974 { &hf_icmpv6_opt_6cio_flag_x,
5975 { "Address registration (X bit)", "icmpv6.opt.6cio.flag.x", FT_BOOLEAN, 48, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported
))))
, ND_OPT_6CIO_FLAG_X0x008000000000,
5976 "Registration for Unicast, Multicast, and Anycast Addresses Supported (RFC9685)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5977 { &hf_icmpv6_opt_6cio_flag_experimental,
5978 { "Reserved", "icmpv6.opt.6cio.flag.experimental", FT_BOOLEAN, 48, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, ND_OPT_6CIO_FLAG_EXPERIMENTAL0xFF0000000000,
5979 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5980
5981 { &hf_icmpv6_opt_captive_portal,
5982 { "Captive Portal", "icmpv6.opt.captive_portal", FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
5983 "The contact URI for the captive portal that the user should connect to", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5984
5985 { &hf_icmpv6_opt_pref64_scaled_lifetime,
5986 { "Scaled Lifetime", "icmpv6.opt.pref64.scaled_lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), ND_OPT_PREF64_SL0xFFF8,
5987 "The maximum time in units of 8 seconds over which this NAT64 prefix MAY be used", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5988 { &hf_icmpv6_opt_pref64_plc,
5989 { "PLC (Prefix Length Code)", "icmpv6.opt.pref64.plc", FT_UINT16, BASE_HEX, VALS(pref64_plc_str)((0 ? (const struct _value_string*)0 : ((pref64_plc_str)))), ND_OPT_PREF64_PLC0x0007,
5990 "This field encodes the NAT64 Prefix Length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5991 { &hf_icmpv6_opt_pref64_prefix,
5992 { "Prefix", "icmpv6.opt.pref64.prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
5993 "NAT64 Prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5994 { &hf_icmpv6_opt_dnr_svcpriority,
5995 { "Service priority", "icmpv6.opt.dnr.svcpriority", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
5996 "DNR service priority", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
5997 { &hf_icmpv6_opt_dnr_lifetime,
5998 { "Lifetime", "icmpv6.opt.dnr.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x00,
5999 "DNR lifetime in seconds", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6000 { &hf_icmpv6_opt_dnr_auth_domain_name_len,
6001 { "Authentication domain name length", "icmpv6.opt.dnr.adn_len", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
6002 "DNR authentication domain name length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6003 { &hf_icmpv6_opt_dnr_auth_domain_name,
6004 { "Authentication domain name", "icmpv6.opt.dnr.adn", FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
6005 "DNR authentication domain name", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6006 { &hf_icmpv6_opt_dnr_addrs_len,
6007 { "Addresses length", "icmpv6.opt.dnr.addrs_len", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
6008 "DNR addresses length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6009 { &hf_icmpv6_opt_dnr_addrs,
6010 { "Addresses", "icmpv6.opt.dnr.addrs", FT_NONE, BASE_NONE, NULL((void*)0), 0x00,
6011 "DNR address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6012 { &hf_icmpv6_opt_dnr_addrs_ip,
6013 { "Address", "icmpv6.opt.dnr.addrs.ip", FT_IPv6, BASE_NONE, NULL((void*)0), 0x00,
6014 "DNR address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6015 { &hf_icmpv6_opt_dnr_svc_params_len,
6016 { "SVC params length", "icmpv6.opt.dnr.svc_params_len", FT_UINT16, BASE_DEC, NULL((void*)0), 0x00,
6017 "DNR SVC params length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6018 { &hf_icmpv6_opt_dnr_padding,
6019 { "Padding", "icmpv6.opt.dnr.padding", FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
6020 "DNR padding", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6021
6022 /* RFC2710: Multicast Listener Discovery for IPv6 */
6023 { &hf_icmpv6_mld_mrd,
6024 { "Maximum Response Delay [ms]", "icmpv6.mld.maximum_response_delay", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6025 "Specifies the maximum allowed delay before sending a responding Report, in units of milliseconds", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6026 { &hf_icmpv6_mld_multicast_address,
6027 { "Multicast Address", "icmpv6.mld.multicast_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6028 "Specific IPv6 multicast address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6029 /* RFC 2894: Router Renumbering for IPv6 */
6030 { &hf_icmpv6_rr_sequencenumber,
6031 { "Sequence Number", "icmpv6.rr.sequence_number", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6032 "The sequence number MUST be non-decreasing between Sequence Number Resets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6033 { &hf_icmpv6_rr_segmentnumber,
6034 { "Segment Number", "icmpv6.rr.segment_number", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6035 "Enumerates different valid RR messages having the same Sequence Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6036 { &hf_icmpv6_rr_flag,
6037 { "Flags", "icmpv6.rr.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6038 "Five are defined and three bits are reserved", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6039 { &hf_icmpv6_rr_flag_t,
6040 { "Test Command", "icmpv6.rr.flag.t", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RR_FLAG_T0x80,
6041 "Indicates a Test message: processing is to be simulated and no configuration changes are to be made", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6042 { &hf_icmpv6_rr_flag_r,
6043 { "Result requested", "icmpv6.rr.flag.r", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RR_FLAG_R0x40,
6044 "Indicates that the router send a Result message upon completion of processing the Command message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6045 { &hf_icmpv6_rr_flag_a,
6046 { "All Interfaces", "icmpv6.rr.flag.a", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RR_FLAG_A0x20,
6047 "Indicates that the Command be applied to all interfaces regardless of administrative shutdown status", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6048 { &hf_icmpv6_rr_flag_s,
6049 { "Site-specific", "icmpv6.rr.flag.s", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RR_FLAG_S0x10,
6050 "Indicates that the Command be applied only to interfaces which belong to the same site as the interface to which the Command is addressed", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6051 { &hf_icmpv6_rr_flag_p,
6052 { "Processed previously", "icmpv6.rr.flag.p", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RR_FLAG_P0x08,
6053 "Indicates that the Command message was previously processed (and is not a Test) and the responding router is not processing it again", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6054 { &hf_icmpv6_rr_flag_rsv,
6055 { "Reserved", "icmpv6.rr.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RR_FLAG_RSV0x07,
6056 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6057 { &hf_icmpv6_rr_maxdelay,
6058 { "Max Delay", "icmpv6.rr.maxdelay", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6059 "Specifying the maximum time (in milliseconds) by which a router MUST delay sending any reply to this Command", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6060
6061 { &hf_icmpv6_rr_pco_mp_part,
6062 { "Match-Prefix Part", "icmpv6.rr.pco.mp", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6063 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6064 { &hf_icmpv6_rr_pco_mp_opcode,
6065 { "OpCode", "icmpv6.rr.pco.mp.opcode", FT_UINT8, BASE_DEC, VALS(rr_pco_mp_opcode_val)((0 ? (const struct _value_string*)0 : ((rr_pco_mp_opcode_val
))))
, 0x0,
6066 "Specifying the operation to be performed when the associated MatchPrefix matches an interface's prefix or address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6067 { &hf_icmpv6_rr_pco_mp_oplength,
6068 { "OpLength", "icmpv6.rr.pco.mp.oplength", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6069 "The total length of this Prefix Control Operation (in units of 8 octets)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6070 { &hf_icmpv6_rr_pco_mp_ordinal,
6071 { "Ordinal", "icmpv6.rr.pco.mp.ordinal", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6072 "The value is otherwise unconstrained", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6073 { &hf_icmpv6_rr_pco_mp_matchlen,
6074 { "MatchLen", "icmpv6.rr.pco.mp.matchlen", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6075 "Between 0 and 128 inclusive specifying the number of initial bits of MatchPrefix which are significant in matching", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6076 { &hf_icmpv6_rr_pco_mp_minlen,
6077 { "MinLen", "icmpv6.rr.pco.mp.minlen", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6078 "Specifying the minimum length which any configured prefix must have in order to be eligible for testing against the MatchPrefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6079 { &hf_icmpv6_rr_pco_mp_maxlen,
6080 { "MaxLen", "icmpv6.rr.pco.mp.maxlen", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6081 "Specifying the maximum length which any configured prefix must have in order to be eligible for testing against the MatchPrefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6082 { &hf_icmpv6_rr_pco_mp_matchprefix,
6083 { "MatchPrefix", "icmpv6.rr.pco.mp.matchprefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6084 "The 128-bit prefix to be compared with each interface's prefix or address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6085 { &hf_icmpv6_rr_pco_up_part,
6086 { "Use-Prefix Part", "icmpv6.rr.pco.up", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6087 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6088 { &hf_icmpv6_rr_pco_up_uselen,
6089 { "UseLen", "icmpv6.rr.pco.up.uselen", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6090 "specifying the number of initial bits of UsePrefix to use in creating a new prefix for an interface", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6091 { &hf_icmpv6_rr_pco_up_keeplen,
6092 { "KeepLen", "icmpv6.rr.pco.up.keeplen", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6093 "Specifying the number of bits of the prefix or address which matched the associated Match-Prefix which should be retained in the new prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6094 { &hf_icmpv6_rr_pco_up_flagmask,
6095 { "FlagMask", "icmpv6.rr.pco.up.flagmask", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6096 "A 1 bit in any position means that the corresponding flag bit in a Router Advertisement (RA) Prefix Information Option for the New Prefix should be set from the RAFlags field in this Use-Prefix Part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6097
6098 { &hf_icmpv6_rr_pco_up_flagmask_l,
6099 { "On-link flag(L)", "icmpv6.rr.pco.up.flagmask.l", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80,
6100 "When set, indicates the On-link (L) flag bit in a Router Advertisement (RA) Prefix Information Option for the New Prefix should be set from the RAFlags field in this Use-Prefix Part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6101 { &hf_icmpv6_rr_pco_up_flagmask_a,
6102 { "Autonomous address-configuration flag(A)", "icmpv6.rr.pco.up.flagmask.a", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x40,
6103 "When set, indicates the Autonomous address-configuration (A) flag bit in a Router Advertisement (RA) Prefix Information Option for the New Prefix should be set from the RAFlags field in this Use-Prefix Part", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6104 { &hf_icmpv6_rr_pco_up_flagmask_reserved,
6105 { "Reserved", "icmpv6.rr.pco.up.flagmask.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x3f,
6106 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6107 { &hf_icmpv6_rr_pco_up_raflags,
6108 { "RAFlags", "icmpv6.rr.pco.up.raflags", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6109 "Under control of the FlagMask field, may be used to initialize the flags in Router Advertisement Prefix Information Options which advertise the New Prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6110 { &hf_icmpv6_rr_pco_up_raflags_l,
6111 { "On-link flag(L)", "icmpv6.rr.pco.up.flagmask.l", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80,
6112 "When set, indicates that this prefix can be used for on-link determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6113 { &hf_icmpv6_rr_pco_up_raflags_a,
6114 { "Autonomous address-configuration flag(A)", "icmpv6.rr.pco.up.flagmask.a", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x40,
6115 "When set indicates that this prefix can be used for stateless address configuration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6116 { &hf_icmpv6_rr_pco_up_raflags_reserved,
6117 { "Reserved", "icmpv6.rr.pco.up.flagmask.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), 0x3f,
6118 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6119 { &hf_icmpv6_rr_pco_up_validlifetime,
6120 { "Valid Lifetime", "icmpv6.rr.pco.up.validlifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x0,
6121 "The number of seconds for which the New Prefix will be valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6122 { &hf_icmpv6_rr_pco_up_preferredlifetime,
6123 { "Preferred Lifetime", "icmpv6.rr.pco.up.preferredlifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x0,
6124 "The number of seconds for which the New Prefix will be preferred", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6125 { &hf_icmpv6_rr_pco_up_flag,
6126 { "Flags", "icmpv6.rr.pco.up.flag", FT_UINT32, BASE_HEX, NULL((void*)0), 0x0,
6127 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6128 { &hf_icmpv6_rr_pco_up_flag_v,
6129 { "Decrement valid lifetime", "icmpv6.rr.pco.up.flag.v", FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x80000000,
6130 "When set, indicating that the valid lifetime of the New Prefix MUST be effectively decremented in real time", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6131 { &hf_icmpv6_rr_pco_up_flag_p,
6132 { "Decrement preferred lifetime", "icmpv6.rr.pco.up.flag.p", FT_BOOLEAN, 32, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x40000000,
6133 "When set, indicating that the preferred lifetime of the New Prefix MUST be effectively decremented in real time", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6134 { &hf_icmpv6_rr_pco_up_flag_reserved,
6135 { "Reserved", "icmpv6.rr.pco.up.flag.reserved", FT_UINT32, BASE_DEC, NULL((void*)0), 0x3FFFFFFF,
6136 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6137 { &hf_icmpv6_rr_pco_up_useprefix,
6138 { "UsePrefix", "icmpv6.rr.pco.up.useprefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6139 "The 128-bit Use-prefix which either becomes or is used in forming (if KeepLen is nonzero) the New Prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6140 { &hf_icmpv6_rr_rm,
6141 { "Result Message", "icmpv6.rr.rm", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6142 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6143 { &hf_icmpv6_rr_rm_flag,
6144 { "Flags", "icmpv6.rr.rm.flag", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6145 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6146 { &hf_icmpv6_rr_rm_flag_b,
6147 { "Bounds", "icmpv6.rr.rm.flag.b", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0002,
6148 "When set, indicates that one or more fields in the associated PCO were out of bounds", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6149 { &hf_icmpv6_rr_rm_flag_f,
6150 { "Forbidden", "icmpv6.rr.rm.flag.f", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x0001,
6151 "When set, indicates that one or more Use-Prefix parts from the associated PCO were not honored by the router because of attempted formation of a forbidden prefix format, such as a multicast or loopback address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6152 { &hf_icmpv6_rr_rm_flag_reserved,
6153 { "Reserved", "icmpv6.rr.rm.flag.reserved", FT_UINT16, BASE_DEC, NULL((void*)0), 0xFFFC,
6154 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6155 { &hf_icmpv6_rr_rm_ordinal,
6156 { "Ordinal", "icmpv6.rr.rm.ordinal", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6157 "The value is otherwise unconstrained", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6158 { &hf_icmpv6_rr_rm_matchedlen,
6159 { "MatchedLen", "icmpv6.rr.rm.matchedlen", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6160 "The length of the Matched Prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6161 { &hf_icmpv6_rr_rm_interfaceindex,
6162 { "InterfaceIndex", "icmpv6.rr.rm.interfaceindex", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6163 "The router's numeric designation of the interface on which the MatchedPrefix was configured", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6164 { &hf_icmpv6_rr_rm_matchedprefix,
6165 { "MatchedPrefix", "icmpv6.rr.rm.matchedprefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6166 "The 128 Bits MatchedPrefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6167
6168 /* RFC3775/6275: Mobility Support in IPv6 */
6169 { &hf_icmpv6_mip6_identifier,
6170 { "Identifier", "icmpv6.mip6.identifier", FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x0,
6171 "An identifier to aid in matching with Request and Reply", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6172 { &hf_icmpv6_mip6_home_agent_address,
6173 { "Home Agent Address", "icmpv6.mip6.home_agent_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6174 "A list of addresses of home agents on the home link for the mobile node", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6175 { &hf_icmpv6_mip6_flag,
6176 { "Flags", "icmpv6.mip6.flag", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6177 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6178 { &hf_icmpv6_mip6_flag_m,
6179 { "Managed address configuration", "icmpv6.mip6.flag.m", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, FLAGS_MIP6_M0x8000,
6180 "When set, it indicates that addresses are available via DHCPv6", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6181 { &hf_icmpv6_mip6_flag_o,
6182 { "Other configuration", "icmpv6.mip6.flag.o", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, FLAGS_MIP6_O0x4000,
6183 "When set, it indicates that other configuration information is available via DHCPv6", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6184 { &hf_icmpv6_mip6_flag_rsv,
6185 { "Reserved", "icmpv6.mip6.flag.rsv", FT_UINT16, BASE_DEC, NULL((void*)0), FLAGS_MIP6_RSV0x3FFF,
6186 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6187
6188 /* RFC3810: Multicast Listener Discovery Version 2 (MLDv2) for IPv6 */
6189 { &hf_icmpv6_mld_mrc,
6190 { "Maximum Response Code", "icmpv6.mld.maximum_response_code", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6191 "Specifies the maximum allowed delay before sending a responding Report", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6192 { &hf_icmpv6_mld_flag,
6193 { "Flags", "icmpv6.mld.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6194 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6195 { &hf_icmpv6_mld_flag_s,
6196 { "Suppress Router-Side Processing", "icmpv6.mld.flag.s", FT_BOOLEAN, 8, NULL((void*)0), MLD_FLAG_S0x08,
6197 "Indicates to any receiving multicast routers that they have to suppress the normal timer updates they perform upon hearing a Query", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6198 { &hf_icmpv6_mld_flag_qrv,
6199 { "QRV (Querier's Robustness Variable)", "icmpv6.mld.flag.qrv", FT_UINT8, BASE_DEC, NULL((void*)0), MLD_FLAG_QRV0x07,
6200 "Contains the RV (Robustness Variable) value used by the Querier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6201 { &hf_icmpv6_mld_flag_rsv,
6202 { "Reserved", "icmpv6.mld.flag.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), MLD_FLAG_RSV0xF0,
6203 "Must Be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6204 { &hf_icmpv6_mld_qqi,
6205 { "QQIC (Querier's Query Interval Code)", "icmpv6.mld.qqi", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6206 "Specifies the QI (Query Interval) used by the Querier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6207 { &hf_icmpv6_mld_nb_sources,
6208 { "Number of Sources", "icmpv6.mld.nb_sources", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6209 "Specifies how many source addresses are present in the Query", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6210 { &hf_icmpv6_mld_source_address,
6211 { "Source Address", "icmpv6.mld.source_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6212 "The Source Address fields are a vector of unicast addresses", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6213 { &hf_icmpv6_mldr_nb_mcast_records,
6214 { "Number of Multicast Address Records", "icmpv6.mldr.nb_mcast_records", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6215 "Specifies how many Multicast Address Records are present in this Report", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6216 { &hf_icmpv6_mldr_mar,
6217 { "Multicast Address Record", "icmpv6.mldr.mar", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6218 "Each Multicast Address Record is a block of fields that contain information on the sender listening to a single multicast address on the interface from which the Report is sent", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6219 { &hf_icmpv6_mldr_mar_record_type,
6220 { "Record Type", "icmpv6.mldr.mar.record_type", FT_UINT8, BASE_DEC, VALS(mldr_record_type_val)((0 ? (const struct _value_string*)0 : ((mldr_record_type_val
))))
, 0x0,
6221 "It specifies the type of the Multicast Address Record", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6222 { &hf_icmpv6_mldr_mar_aux_data_len,
6223 { "Aux Data Len", "icmpv6.mldr.mar.aux_data_len", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6224 "The Aux Data Len field contains the length (in units of 32-bit words) of the Auxiliary Data Field in this Multicast Address Record", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6225 { &hf_icmpv6_mldr_mar_nb_sources,
6226 { "Number of Sources", "icmpv6.mldr.mar.nb_sources", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6227 "The Number of Sources field specifies how many source addresses are present in this Multicast Address Record", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6228 { &hf_icmpv6_mldr_mar_multicast_address,
6229 { "Multicast Address", "icmpv6.mldr.mar.multicast_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6230 "The Multicast Address field contains the multicast address to which this Multicast Address Record pertains", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6231 { &hf_icmpv6_mldr_mar_source_address,
6232 { "Source Address", "icmpv6.mldr.mar.source_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6233 "The Source Address fields are a vector of unicast addresses", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6234 { &hf_icmpv6_mldr_mar_auxiliary_data,
6235 { "Auxiliary Data", "icmpv6.mldr.mar.auxiliary_data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
6236 "Contains additional information that pertain to this Multicast Address Record", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6237 /* RFC 4068/5268/5568: Fast Handovers for Mobile IPv6 ( Mobile IPv6 Fast Handovers ) */
6238 { &hf_icmpv6_fmip6_subtype,
6239 { "Subtype", "icmpv6.fmip6.subtype", FT_UINT8, BASE_DEC, VALS(fmip6_subtype_val)((0 ? (const struct _value_string*)0 : ((fmip6_subtype_val)))
)
, 0x0,
6240 "Designates the Subtype of information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6241 { &hf_icmpv6_fmip6_hi_flag,
6242 { "Flag", "icmpv6.fmip6.hi.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
6243 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6244 { &hf_icmpv6_fmip6_hi_flag_s,
6245 { "Assigned address configuration", "icmpv6.fmip6.hi.flag.s", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, FMIP6_HI_FLAG_S0x80,
6246 "When set, this message requests a new CoA to be returned by the destination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6247 { &hf_icmpv6_fmip6_hi_flag_u,
6248 { "Buffer", "icmpv6.fmip6.hi.flag.a", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, FMIP6_HI_FLAG_U0x40,
6249 "When set, the destination SHOULD buffer any packets toward the node indicated in the options of this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6250 { &hf_icmpv6_fmip6_hi_flag_reserved,
6251 { "Reserved", "icmpv6.fmip6.hi.flag.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), FMIP6_HI_FLAG_RSV0x3F,
6252 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6253 { &hf_icmpv6_fmip6_identifier,
6254 { "Identifier", "icmpv6.fmip6.identifier", FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x0,
6255 "An identifier to aid in matching with Request and Reply", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6256
6257 /* RFC 4286: Multicast Router Discovery */
6258 { &hf_icmpv6_mcast_ra_query_interval,
6259 { "Query Interval", "icmpv6.mcast_ra.query_interval", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6260 "The Query Interval value (in seconds) in use by MLD on the interface.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6261 { &hf_icmpv6_mcast_ra_robustness_variable,
6262 { "Robustness Variable", "icmpv6.mcast_ra.robustness_variable", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6263 "The Robustness Variable in use by MLD on the advertising interface", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6264
6265 /* RFC 4620: IPv6 Node Information Queries */
6266 { &hf_icmpv6_ni_qtype,
6267 { "Qtype", "icmpv6.ni.qtype", FT_UINT16, BASE_DEC, VALS(ni_qtype_val)((0 ? (const struct _value_string*)0 : ((ni_qtype_val)))), 0x0,
6268 "Designates the type of information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6269 { &hf_icmpv6_ni_flag,
6270 { "Flags", "icmpv6.ni.flag", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6271 "Qtype-specific flags that may be defined for certain Query types and their Replies", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6272 { &hf_icmpv6_ni_flag_g,
6273 { "Global-scope addresses", "icmpv6.ni.flag.g", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, NI_FLAG_G0x0020,
6274 "Global-scope addresses are requested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6275 { &hf_icmpv6_ni_flag_s,
6276 { "Site-local addresses", "icmpv6.ni.flag.s", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, NI_FLAG_S0x0010,
6277 "Site-local addresses are requested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6278 { &hf_icmpv6_ni_flag_l,
6279 { "Link-local addresses", "icmpv6.ni.flag.l", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, NI_FLAG_L0x0008,
6280 "Link-local addresses are requested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6281 { &hf_icmpv6_ni_flag_c,
6282 { "Compression", "icmpv6.ni.flag.c", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, NI_FLAG_C0x0004,
6283 "IPv4-compatible (now deprecated) and IPv4-mapped addresses are requested", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6284 { &hf_icmpv6_ni_flag_a,
6285 { "Unicast Addresses", "icmpv6.ni.flag.a", FT_BOOLEAN, 16, TFS(&tfs_ni_flag_a)((0 ? (const struct true_false_string*)0 : ((&tfs_ni_flag_a
))))
, NI_FLAG_A0x0002,
6286 "Responder's unicast addresses", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6287 { &hf_icmpv6_ni_flag_t,
6288 { "Truncated", "icmpv6.ni.flag.t", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, NI_FLAG_T0x0001,
6289 "Defined in a Reply only, indicates that the set of addresses is incomplete for space reasons", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6290 { &hf_icmpv6_ni_flag_rsv,
6291 { "Reserved", "icmpv6.ni.flag.rsv", FT_UINT16, BASE_HEX, NULL((void*)0), NI_FLAG_RSV0xFFC0,
6292 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6293 { &hf_icmpv6_ni_nonce,
6294 { "Nonce", "icmpv6.ni.nonce", FT_UINT64, BASE_HEX, NULL((void*)0), 0x0,
6295 "An opaque 64-bit field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6296 { &hf_icmpv6_ni_query_subject_ipv6,
6297 { "IPv6 subject address", "icmpv6.ni.query.subject_ipv6", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6298 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6299 { &hf_icmpv6_ni_query_subject_fqdn,
6300 { "FQDN subject", "icmpv6.ni.query.subject_fqdn", FT_STRING, BASE_NONE, NULL((void*)0), 0x0,
6301 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6302 { &hf_icmpv6_ni_query_subject_ipv4,
6303 { "IPv4 subject address", "icmpv6.ni.query.subject_ipv4", FT_IPv4, BASE_NONE, NULL((void*)0), 0x0,
6304 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6305 { &hf_icmpv6_ni_reply_node_ttl,
6306 { "TTL", "icmpv6.ni.reply.node_ttl", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6307 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6308 { &hf_icmpv6_ni_reply_node_name,
6309 { "Name Node", "icmpv6.ni.reply.node_name", FT_STRING, BASE_NONE, NULL((void*)0), 0x0,
6310 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6311 { &hf_icmpv6_ni_reply_node_address,
6312 { "IPv6 Node address", "icmpv6.ni.reply.node_address", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6313 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6314 { &hf_icmpv6_ni_reply_ipv4_address,
6315 { "IPv4 Node address", "icmpv6.ni.reply.ipv4_address", FT_IPv4, BASE_NONE, NULL((void*)0), 0x0,
6316 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6317
6318 /* RFC 4884: Extended ICMP */
6319 { &hf_icmpv6_length,
6320 { "Length of original datagram", "icmpv6.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6321 "The length of the original datagram", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6322
6323 /* RPL: RFC 6550 : Routing over Low-Power and Lossy Networks. */
6324 { &hf_icmpv6_rpl_dis_flag,
6325 { "Flags", "icmpv6.rpl.dis.flags", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6326 "8-bit unused field reserved for flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6327 { &hf_icmpv6_rpl_dio_instance,
6328 { "RPLInstanceID", "icmpv6.rpl.dio.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6329 "Set by the DODAG root that indicates which RPL Instance the DODAG is part of", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6330 { &hf_icmpv6_rpl_dio_version,
6331 { "Version", "icmpv6.rpl.dio.version", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6332 "Set by the DODAG root to the DODAGVersionNumber", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6333 { &hf_icmpv6_rpl_dio_rank,
6334 { "Rank", "icmpv6.rpl.dio.rank", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6335 "Indicating the DODAG rank of the node sending the DIO message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6336 { &hf_icmpv6_rpl_dio_flag,
6337 { "Flags", "icmpv6.rpl.dio.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6338 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6339 { &hf_icmpv6_rpl_dio_flag_g,
6340 { "Grounded (G)", "icmpv6.rpl.dio.flag.g", FT_BOOLEAN, 8, NULL((void*)0), RPL_DIO_FLAG_G0x80,
6341 "Indicates whether the DODAG advertised can satisfy the application-defined goal", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6342 { &hf_icmpv6_rpl_dio_flag_0,
6343 { "Zero", "icmpv6.rpl.dio.flag.0", FT_BOOLEAN, 8, NULL((void*)0), RPL_DIO_FLAG_00x40,
6344 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6345 { &hf_icmpv6_rpl_dio_flag_mop,
6346 { "Mode of Operation (MOP)", "icmpv6.rpl.dio.flag.mop", FT_UINT8, BASE_HEX, VALS(rpl_dio_map_val)((0 ? (const struct _value_string*)0 : ((rpl_dio_map_val)))), RPL_DIO_FLAG_MOP0x38,
6347 "Identifies the mode of operation of the RPL Instance as administratively provisioned at and distributed by the DODAG Root", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6348 { &hf_icmpv6_rpl_dio_flag_prf,
6349 { "DODAG Preference", "icmpv6.rpl.dio.flag.preference", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_DIO_FLAG_PRF0x07,
6350 "Defines how preferable the root of this DODAG is compared to other DODAG roots within the instance", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6351 { &hf_icmpv6_rpl_dio_dtsn,
6352 { "Destination Advertisement Trigger Sequence Number (DTSN)", "icmpv6.rpl.dio.dtsn", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6353 "The DTSN is used as part of the procedure to maintain downward routes.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6354 { &hf_icmpv6_rpl_dio_dagid,
6355 { "DODAGID", "icmpv6.rpl.dio.dagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6356 "IPv6 address set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6357 { &hf_icmpv6_rpl_dao_instance,
6358 { "RPLInstanceID", "icmpv6.rpl.dao.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6359 "Indicating the topology instance associated with the DODAG as learned from the DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6360 { &hf_icmpv6_rpl_dao_flag,
6361 { "Flags", "icmpv6.rpl.dao.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6362 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6363 { &hf_icmpv6_rpl_dao_flag_k,
6364 { "DAO-ACK Request (K)", "icmpv6.rpl.dao.flag.k", FT_BOOLEAN, 8, NULL((void*)0), RPL_DAO_FLAG_K0x80,
6365 "Indicates that the recipient is expected to send a DAO-ACK back", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6366 { &hf_icmpv6_rpl_dao_flag_d,
6367 { "DODAGID Present (D)", "icmpv6.rpl.dao.flag.d", FT_BOOLEAN, 8, NULL((void*)0), RPL_DAO_FLAG_D0x40,
6368 "Indicates that the DODAGID field is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6369 { &hf_icmpv6_rpl_dao_flag_rsv,
6370 { "Reserved", "icmpv6.rpl.dao.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_DAO_FLAG_RESERVED0x3F,
6371 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6372 { &hf_icmpv6_rpl_dao_sequence,
6373 { "DAO Sequence", "icmpv6.rpl.dao.sequence", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6374 "Incremented at each unique DAO message from a node and echoed in the DAO-ACK message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6375 { &hf_icmpv6_rpl_dao_dodagid,
6376 { "DODAGID", "icmpv6.rpl.dao.dodagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6377 "IPv6 address set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6378 { &hf_icmpv6_rpl_daoack_instance,
6379 { "RPLInstanceID", "icmpv6.rpl.daoack.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6380 "Indicating the topology instance associated with the DODAG, as learned from the DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6381 { &hf_icmpv6_rpl_daoack_flag,
6382 { "Flag", "icmpv6.rpl.daoack.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6383 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6384 { &hf_icmpv6_rpl_daoack_flag_d,
6385 { "DODAGID Present (D)", "icmpv6.rpl.daoack.flag.d", FT_BOOLEAN, 8, NULL((void*)0), RPL_DAOACK_FLAG_D0x80,
6386 "Indicates that the DODAGID field is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6387 { &hf_icmpv6_rpl_daoack_flag_rsv,
6388 { "Reserved", "icmpv6.rpl.daoack.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_DAOACK_FLAG_RESERVED0x7F,
6389 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6390 { &hf_icmpv6_rpl_daoack_sequence,
6391 { "DAO-ACK Sequence", "icmpv6.rpl.daoack.sequence", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6392 "Incremented at each DAO message from a node, and echoed in the DAO-ACK by the recipient", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6393 { &hf_icmpv6_rpl_daoack_status,
6394 { "Status", "icmpv6.rpl.daoack.status", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6395 "Indicates the completion", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6396 { &hf_icmpv6_rpl_daoack_dodagid,
6397 { "DODAGID", "icmpv6.rpl.daoack.dodagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6398 "IPv6 address integer set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6399 { &hf_icmpv6_rpl_dco_instance,
6400 { "RPLInstanceID", "icmpv6.rpl.dco.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6401 "Indicating the topology instance associated with the DODAG as learned from the DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6402 { &hf_icmpv6_rpl_dco_flags,
6403 { "Flags", "icmpv6.rpl.dco.flags", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6404 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6405 { &hf_icmpv6_rpl_dco_flag_k,
6406 { "DCO-ACK Request (K)", "icmpv6.rpl.dco.flag.k", FT_BOOLEAN, 8, NULL((void*)0), RPL_DCO_FLAG_K0x80,
6407 "Indicates that the recipient is expected to send a DCO-ACK back", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6408 { &hf_icmpv6_rpl_dco_flag_d,
6409 { "DODAGID Present (D)", "icmpv6.rpl.dco.flag.d", FT_BOOLEAN, 8, NULL((void*)0), RPL_DCO_FLAG_D0x40,
6410 "Indicates that the DODAGID field is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6411 { &hf_icmpv6_rpl_dco_flag_rsv,
6412 { "Reserved", "icmpv6.rpl.dco.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_DCO_FLAG_RESERVED0x3F,
6413 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6414 {&hf_icmpv6_rpl_dco_status,
6415 {"RPL Status", "icmpv6.rpl.dco.status", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6416 "Set by the root common parent that generates the DCO, propagated unchanged", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6417 { &hf_icmpv6_rpl_dco_sequence,
6418 { "DCO Sequence", "icmpv6.rpl.dco.sequence", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6419 "Incremented at each unique DCO message from a node and echoed in the DCO-ACK message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6420 { &hf_icmpv6_rpl_dco_dodagid,
6421 { "DODAGID", "icmpv6.rpl.dco.dodagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6422 "IPv6 address set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6423 { &hf_icmpv6_rpl_dcoack_instance,
6424 { "RPLInstanceID", "icmpv6.rpl.dcoack.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6425 "Indicating the topology instance associated with the DODAG, as learned from the DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6426 { &hf_icmpv6_rpl_dcoack_flag,
6427 { "Flag", "icmpv6.rpl.dcoack.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6428 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6429 { &hf_icmpv6_rpl_dcoack_flag_d,
6430 { "DODAGID Present (D)", "icmpv6.rpl.dcoack.flag.d", FT_BOOLEAN, 8, NULL((void*)0), RPL_DCOACK_FLAG_D0x80,
6431 "Indicates that the DODAGID field is present", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6432 { &hf_icmpv6_rpl_dcoack_flag_rsv,
6433 { "Reserved", "icmpv6.rpl.dcoack.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_DCOACK_FLAG_RESERVED0x7F,
6434 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6435 { &hf_icmpv6_rpl_dcoack_sequence,
6436 { "DCO-ACK Sequence", "icmpv6.rpl.dcoack.sequence", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6437 "Incremented at each DCO message from a node, and echoed in the DCO-ACK by the recipient", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6438 { &hf_icmpv6_rpl_dcoack_status,
6439 { "Status", "icmpv6.rpl.dcoack.status", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6440 "Indicates the completion", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6441 { &hf_icmpv6_rpl_dcoack_dodagid,
6442 { "DODAGID", "icmpv6.rpl.dcoack.dodagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6443 "IPv6 address integer set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6444 { &hf_icmpv6_rpl_cc_instance,
6445 { "RPLInstanceID", "icmpv6.rpl.cc.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6446 "Indicating the topology instance associated with the DODAG, as learned from the DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6447 { &hf_icmpv6_rpl_cc_flag,
6448 { "Flag", "icmpv6.rpl.cc.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6449 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6450 { &hf_icmpv6_rpl_cc_flag_r,
6451 { "Response (R)", "icmpv6.rpl.cc.flag.r", FT_BOOLEAN, 8, NULL((void*)0), RPL_CC_FLAG_R0x80,
6452 "Indicates whether the CC message is a response", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6453 { &hf_icmpv6_rpl_cc_flag_rsv,
6454 { "Reserved", "icmpv6.rpl.cc.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_CC_FLAG_RESERVED0x7F,
6455 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6456 { &hf_icmpv6_rpl_cc_nonce,
6457 { "CC Nonce", "icmpv6.rpl.cc.nonce", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6458 "The corresponding CC response includes the same CC nonce value as the request, as learned from the DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6459 { &hf_icmpv6_rpl_cc_dodagid,
6460 { "DODAGID", "icmpv6.rpl.cc.dodagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6461 "IPv6 address integer set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6462 { &hf_icmpv6_rpl_cc_destination_counter,
6463 { "Destination Counter", "icmpv6.rpl.cc.destination_counter", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6464 "Indicating the sender's estimate of the destination's current security Counter value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6465 { &hf_icmpv6_rpl_secure_flag,
6466 { "Flags", "icmpv6.rpl.secure.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6467 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6468 { &hf_icmpv6_rpl_secure_flag_t,
6469 { "Counter is Time (T)", "icmpv6.rpl.secure.flag.t", FT_BOOLEAN, 8, NULL((void*)0), RPL_SECURE_FLAG_T0x80,
6470 "If it is set then the Counter field is a timestamp", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6471 { &hf_icmpv6_rpl_secure_flag_rsv,
6472 { "Reserved", "icmpv6.rpl.secure.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_SECURE_FLAG_RSV0x7F,
6473 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6474 { &hf_icmpv6_rpl_secure_algorithm,
6475 { "Algorithm", "icmpv6.rpl.secure.algorithm", FT_UINT8, BASE_DEC, VALS(rpl_secure_algorithm_vals)((0 ? (const struct _value_string*)0 : ((rpl_secure_algorithm_vals
))))
, 0x0,
6476 "The Security Algorithm field specifies the encryption, MAC, and signature scheme the network uses", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6477 { &hf_icmpv6_rpl_secure_kim,
6478 { "Key Identifier Mode (KIM)", "icmpv6.rpl.secure.kim", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_SECURE_KIM0xC0,
6479 "That indicates whether the key used for packet protection is determined implicitly or explicitly and indicates the particular representation of the Key Identifier field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6480 { &hf_icmpv6_rpl_secure_lvl,
6481 { "Security Level (LVL)", "icmpv6.rpl.secure.lvl", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_SECURE_LVL0x07,
6482 "Indicates the provided packet protection", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6483 { &hf_icmpv6_rpl_secure_rsv,
6484 { "Reserved", "icmpv6.rpl.secure.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_SECURE_RSV0x38,
6485 "Must be zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6486 { &hf_icmpv6_rpl_secure_counter,
6487 { "Counter", "icmpv6.rpl.secure.counter", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6488 "Indicates the non-repeating 4-octet value used to construct the cryptographic mechanism that implements packet protection and allows for the provision of semantic security", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6489 { &hf_icmpv6_rpl_secure_key_source,
6490 { "Key Source", "icmpv6.rpl.secure.key.source", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
6491 "Indicates the logical identifier of the originator of a group key", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6492 { &hf_icmpv6_rpl_secure_key_index,
6493 { "Key Source", "icmpv6.rpl.secure.key.index", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6494 "Allows unique identification of different keys with the same originator", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6495 { &hf_icmpv6_rpl_opt,
6496 { "ICMPv6 RPL Option", "icmpv6.opt", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6497 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6498 { &hf_icmpv6_rpl_opt_type,
6499 { "Type", "icmpv6.rpl.opt.type", FT_UINT8, BASE_DEC, VALS(rpl_option_vals)((0 ? (const struct _value_string*)0 : ((rpl_option_vals)))), 0x0,
6500 "Options type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6501 { &hf_icmpv6_rpl_opt_length,
6502 { "Length", "icmpv6.rpl.opt.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6503 "The length of the option in octets excluding the Type and Length fields", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6504 { &hf_icmpv6_rpl_opt_reserved,
6505 { "Reserved", "icmpv6.rpl.opt.reserved", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6506 "Reserved (Must be 0)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6507 { &hf_icmpv6_rpl_opt_padn,
6508 { "Paddn", "icmpv6.rpl.opt.padn", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6509 "Padding (Must be 0)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6510 { &hf_icmpv6_rpl_opt_metric_type,
6511 { "Routing Metric/Constraint Type", "icmpv6.rpl.opt.metric.type", FT_UINT8, BASE_DEC, VALS(rpl_metric_vals)((0 ? (const struct _value_string*)0 : ((rpl_metric_vals)))), 0x0,
6512 "The Routing Metric/Constraint Type field uniquely identifies each Routing Metric/Constraint object. RFC 6551", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6513 { &hf_icmpv6_rpl_opt_metric_flags,
6514 { "Flags","icmpv6.rpl.opt.metric.flags", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6515 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6516 { &hf_icmpv6_rpl_opt_metric_reserved,
6517 { "Reserved Flags","icmpv6.rpl.opt.metric.reserved", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_RESERVED0xF800,
6518 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6519 { &hf_icmpv6_rpl_opt_metric_flag_p,
6520 { "Flag P","icmpv6.rpl.opt.metric.flag.p", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_FLAG_P0x0400,
6521 "Only used for recorded metrics. When cleared, all nodes along the path successfully recorded the corresponding metric. When set, this indicates that one or several nodes along the path could not record the metric", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6522 { &hf_icmpv6_rpl_opt_metric_flag_c,
6523 { "Flag C","icmpv6.rpl.opt.metric.flag.c", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_FLAG_C0x0200,
6524 "When set, this indicates that the object refers to a routing constraint. When cleared, the object refers to a routing metric.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6525 { &hf_icmpv6_rpl_opt_metric_flag_o,
6526 { "Flag O","icmpv6.rpl.opt.metric.flag.o", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_FLAG_O0x0100,
6527 "Used exclusively for routing constraints. When set, this indicates that the constraint is optional. When cleared, the constraint is mandatory.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6528 { &hf_icmpv6_rpl_opt_metric_flag_r,
6529 { "Flag R","icmpv6.rpl.opt.metric.flag.r", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_FLAG_R0x0080,
6530 "Only relevant for a routing metric. When set, this indicates that the routing metric is recorded along the path. When cleared, the routing metric is aggregated", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6531 { &hf_icmpv6_rpl_opt_metric_a,
6532 { "A Field","icmpv6.rpl.opt.metric.flag.a", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_A0x0070,
6533 "Only relevant for metrics, it indicates whether the aggregated routing metric is additive, is multiplicative, reports a maximum, or reports a minimum", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6534 { &hf_icmpv6_rpl_opt_metric_prec,
6535 { "Precedence field","icmpv6.rpl.opt.metric.prec", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_PREC0x000F,
6536 "It indicates the precedence of this Routing Metric/Constraint object relative to other objects in the container", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6537 { &hf_icmpv6_rpl_opt_metric_len,
6538 { "Metric Length", "icmpv6.rpl.opt.metric.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6539 "The length of the object body, expressed in bytes.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6540 { &hf_icmpv6_rpl_opt_metric_nsa_object,
6541 { "Node State and Attribute Object","icmpv6.rpl.opt.metric.nsa.object", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6542 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6543 { &hf_icmpv6_rpl_opt_metric_nsa_object_reserved,
6544 { "Reserved field","icmpv6.rpl.opt.metric.nsa.object.reserved", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_NSA_OBJECT_RESERVED0xFF00,
6545 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6546 { &hf_icmpv6_rpl_opt_metric_nsa_object_flags,
6547 { "Flags","icmpv6.rpl.opt.metric.nsa.object.flags", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_NSA_OBJECT_FLAGS0x00FC,
6548 "Unspecified flags (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6549 { &hf_icmpv6_rpl_opt_metric_nsa_object_flag_a,
6550 { "Flag A", "icmpv6.rpl.opt.metric.nsa.object.flag.a", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_NSA_OBJECT_FLAG_A0x0002,
6551 "When set, this indicates that the node can act as a traffic aggregator.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6552 { &hf_icmpv6_rpl_opt_metric_nsa_object_flag_o,
6553 { "Flag O", "icmpv6.rpl.opt.metric.nsa.object.flag.o", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_NSA_OBJECT_FLAG_O0x0001,
6554 "When set, this indicates that the node is overloaded and may not be able to process traffic.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6555 { &hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object,
6556 { "Node State and Attribute Optional TLV", "icmpv6.rpl.opt.metric.nsa.object.opttlv.object", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6557 "Optional TLV.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6558 { &hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_type,
6559 { "Node State and Attribute Optional TLV Type", "icmpv6.rpl.opt.metric.nsa.object.opttlv.object.type", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6560 "Optional TLV type.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6561 { &hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_length,
6562 { "Node State and Attribute Optional TLV Length", "icmpv6.rpl.opt.metric.nsa.object.opttlv.object.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6563 "The length of the option in octets excluding the Type and Length fields", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6564 { &hf_icmpv6_rpl_opt_metric_nsa_object_opttlv_object_data,
6565 { "Raw Data", "icmpv6.rpl.opt.metric.nsa.object.opttlv.object.data", FT_BYTES, BASE_NONE, NULL((void*)0), 0x0,
6566 "The raw data in the TLV", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6567 { &hf_icmpv6_rpl_opt_metric_ne_object,
6568 { "Node Energy Object","icmpv6.rpl.opt.metric.ne.object", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6569 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6570 { &hf_icmpv6_rpl_opt_metric_ne_object_flags,
6571 { "Flags field","icmpv6.rpl.opt.metric.ne.object.flags", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_NE_OBJECT_FLAGS0xF000,
6572 "Unspecified flags (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6573 { &hf_icmpv6_rpl_opt_metric_ne_object_flag_i,
6574 { "Flag I","icmpv6.rpl.opt.metric.ne.object.flag.i", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_NE_OBJECT_FLAG_I0x0800,
6575 "Only relevant when the node type is used as a constraint. When set, this indicates that nodes of the type specified in the node type field MUST be included", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6576 { &hf_icmpv6_rpl_opt_metric_ne_object_type,
6577 { "Type", "icmpv6.rpl.opt.metric.ne.object.type", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_NE_OBJECT_TYPE0x0600,
6578 "T=0 designates a mains-powered node, T=1 a battery-powered node, and T=2 a node powered by an energy scavenger.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6579 { &hf_icmpv6_rpl_opt_metric_ne_object_flag_e,
6580 { "Flag E", "icmpv6.rpl.opt.metric.ne.object.flag.e", FT_BOOLEAN, 16, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_METRIC_NE_OBJECT_FLAG_E0x0100,
6581 "When the 'E' bit is set for a metric, the estimated percentage of remaining energy on the node is indicated in the Energy 8-bit field. When cleared, the estimated percentage of remaining energy is not provided. When the 'E' bit is set for a constraint, the E_E field defines a threshold for the inclusion/exclusion: if an inclusion, nodes with values higher than the threshold are to be included; if an exclusion, nodes with values lower than the threshold are to be excluded.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6582 { &hf_icmpv6_rpl_opt_metric_ne_object_energy,
6583 { "Energy", "icmpv6.rpl.opt.metric.ne.object.energy", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_NE_OBJECT_ENERGY0x00FF,
6584 "8-bit unsigned integer field indicating an estimated percentage of remaining energy. The Energy field is only relevant when the 'E' flag is set, and it MUST be set to 0 when the 'E' flag is cleared.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6585 { &hf_icmpv6_rpl_opt_metric_hp_object,
6586 { "Hop Count Object","icmpv6.rpl.opt.metric.hp.object", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6587 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6588 { &hf_icmpv6_rpl_opt_metric_hp_object_reserved,
6589 { "Reserved field","icmpv6.rpl.opt.metric.hp.object.reserved", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_HP_OBJECT_RESERVED0xF000,
6590 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6591 { &hf_icmpv6_rpl_opt_metric_hp_object_flags,
6592 { "Flags","icmpv6.rpl.opt.metric.hp.object.flags", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_HP_OBJECT_FLAGS0x0F00,
6593 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6594 { &hf_icmpv6_rpl_opt_metric_hp_object_hp,
6595 { "Hop Count", "icmpv6.rpl.opt.metric.hp.object.hp", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_METRIC_HP_OBJECT_HP0x00FF,
6596 "When used as a constraint, the DAG root indicates the maximum number of hops that a path may traverse. When used as a metric, each visited node simply increments the Hop Count field.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6597 { &hf_icmpv6_rpl_opt_metric_lt_object_lt,
6598 { "Link Throughput", "icmpv6.rpl.opt.metric.lt.object.lt", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6599 "The Throughput metric is the effective bit rate of a link.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6600 { &hf_icmpv6_rpl_opt_metric_ll_object_ll,
6601 { "Link Latency", "icmpv6.rpl.opt.metric.ll.object.ll", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6602 "The Latency is encoded in 32 bits in unsigned integer format, expressed in microseconds.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6603 { &hf_icmpv6_rpl_opt_metric_lql_object,
6604 { "Link Quality Level Object","icmpv6.rpl.opt.metric.lql.object", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6605 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6606 { &hf_icmpv6_rpl_opt_metric_lql_object_res,
6607 { "Reserved field","icmpv6.rpl.opt.metric.lql.object.res", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_METRIC_LQL_OBJECT_RES0xFF,
6608 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6609 { &hf_icmpv6_rpl_opt_metric_lql_object_val,
6610 { "Val(ue)","icmpv6.rpl.opt.metric.lql.object.val", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_METRIC_LQL_OBJECT_VAL0xE0,
6611 "LQL value from 0 to 7 where 0 means undetermined and 1 indicates the highest link quality.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6612 { &hf_icmpv6_rpl_opt_metric_lql_object_counter,
6613 { "Counter", "icmpv6.rpl.opt.metric.lql.object.counter", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_METRIC_LQL_OBJECT_COUNTER0x1F,
6614 "The Counter represents the number of links with that value.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6615 { &hf_icmpv6_rpl_opt_metric_etx_object_etx,
6616 { "ETX", "icmpv6.rpl.opt.metric.etx.object.etx", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6617 "The ETX metric is the number of transmissions a node expects to make to a destination in order to successfully deliver a packet.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6618 { &hf_icmpv6_rpl_opt_metric_lc_object,
6619 { "Link Color Object","icmpv6.rpl.opt.metric.lc.object", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6620 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6621 { &hf_icmpv6_rpl_opt_metric_lc_object_res,
6622 { "Reserved field","icmpv6.rpl.opt.metric.lc.object.res", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_METRIC_LC_OBJECT_RES0xFF,
6623 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6624 { &hf_icmpv6_rpl_opt_metric_lc_object_lc,
6625 { "Link Color","icmpv6.rpl.opt.metric.lc.object.lc", FT_UINT16, BASE_HEX, NULL((void*)0), RPL_METRIC_LC_OBJECT_LC0xFFC0,
6626 "The Link Color (LC) object is an administrative 10-bit link constraint used to avoid or attract specific links for specific traffic types.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6627 { &hf_icmpv6_rpl_opt_metric_lc_object_counter,
6628 { "Counter", "icmpv6.rpl.opt.metric.lc.object.counter", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_METRIC_LC_OBJECT_COUNTER0x003F,
6629 "The Counter is used to compress the information where the number of links for each Link Color is reported.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6630 { &hf_icmpv6_rpl_opt_metric_lc_object_reserved,
6631 { "Reserved", "icmpv6.rpl.opt.metric.lc.object.reserved", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_METRIC_LC_OBJECT_RESERVED0x003E,
6632 "Reserved (Must be Zero).", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6633 { &hf_icmpv6_rpl_opt_metric_lc_object_flag_i,
6634 { "Flag I", "icmpv6.rpl.opt.metric.lc.object.flag.i", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_METRIC_LC_OBJECT_FLAG_I0x0001,
6635 "The 'I' bit is only relevant when the Link Color is used as a constraint. When set, this indicates that links with the specified color must be included.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6636 { &hf_icmpv6_rpl_opt_route_prefix_length,
6637 { "Prefix Length", "icmpv6.rpl.opt.route.prefix_length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6638 "The number of leading bits in the Prefix that are valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6639 { &hf_icmpv6_rpl_opt_route_flag,
6640 { "Flag","icmpv6.rpl.opt.route.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6641 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6642 { &hf_icmpv6_rpl_opt_route_pref,
6643 { "Preference","icmpv6.rpl.opt.route.pref", FT_UINT8, BASE_DEC, VALS(nd_flag_router_pref)((0 ? (const struct _value_string*)0 : ((nd_flag_router_pref)
)))
, RPL_OPT_ROUTE_PREFERENCE0x18,
6644 "The Route Preference indicates whether to prefer the router associated with this prefix over others, when multiple identical prefixes (for different routers) have been received", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6645 { &hf_icmpv6_rpl_opt_route_reserved,
6646 { "Reserved","icmpv6.rpl.opt.route.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_ROUTE_RESERVED0xE7,
6647 "Reserved (Must be Zero)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6648 { &hf_icmpv6_rpl_opt_route_lifetime,
6649 { "Route Lifetime", "icmpv6.rpl.opt.route.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x0,
6650 "The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for route determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6651 { &hf_icmpv6_rpl_opt_route_prefix,
6652 { "Prefix", "icmpv6.rpl.opt.route.prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6653 "Variable-length field containing an IP address or a prefix of an IPv6 address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6654 { &hf_icmpv6_rpl_opt_config_flag,
6655 { "Flag","icmpv6.rpl.opt.config.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6656 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6657 { &hf_icmpv6_rpl_opt_config_reserved,
6658 { "Reserved","icmpv6.rpl.opt.config.reserved", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_CONFIG_FLAG_RESERVED0xF0,
6659 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6660 { &hf_icmpv6_rpl_opt_config_auth,
6661 { "Authentication Enabled","icmpv6.rpl.opt.config.auth", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_OPT_CONFIG_FLAG_AUTH0x08,
6662 "One bit flag describing the security mode of the network", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6663 { &hf_icmpv6_rpl_opt_config_pcs,
6664 { "Path Control Size", "icmpv6.rpl.opt.config.pcs", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_CONFIG_FLAG_PCS0x07,
6665 "Used to configure the number of bits that may be allocated to the Path Control field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6666 { &hf_icmpv6_rpl_opt_config_doublings,
6667 { "DIOIntervalDoublings","icmpv6.rpl.opt.config.interval_double", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6668 "Used to configure Imax of the DIO trickle timer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6669 { &hf_icmpv6_rpl_opt_config_min_interval,
6670 { "DIOIntervalMin", "icmpv6.rpl.opt.config.interval_min", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6671 "Used to configure Imin of the DIO trickle timer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6672 { &hf_icmpv6_rpl_opt_config_redundancy,
6673 { "DIORedundancyConstant", "icmpv6.rpl.opt.config.redundancy", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6674 "Used to configure k of the DIO trickle timer", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6675 { &hf_icmpv6_rpl_opt_config_rank_incr,
6676 { "MaxRankInc", "icmpv6.rpl.opt.config.max_rank_inc", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6677 "Used to configure DAGMaxRankIncrease", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6678 { &hf_icmpv6_rpl_opt_config_hop_rank_inc,
6679 { "MinHopRankInc", "icmpv6.rpl.opt.config.min_hop_rank_inc", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6680 "Used to configure MinHopRankIncrease", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6681 { &hf_icmpv6_rpl_opt_config_ocp,
6682 { "OCP (Objective Code Point)","icmpv6.rpl.opt.config.ocp", FT_UINT16, BASE_DEC, VALS(rpl_ocp_vals)((0 ? (const struct _value_string*)0 : ((rpl_ocp_vals)))), 0x0,
6683 "The OCP field identifies the OF and is managed by the IANA", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6684 { &hf_icmpv6_rpl_opt_config_rsv,
6685 { "Reserved", "icmpv6.rpl.opt.config.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6686 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6687 { &hf_icmpv6_rpl_opt_config_def_lifetime,
6688 { "Default Lifetime", "icmpv6.rpl.opt.config.def_lifetime", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6689 "This is the lifetime that is used as default for all RPL routes", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6690 { &hf_icmpv6_rpl_opt_config_lifetime_unit,
6691 { "Lifetime Unit", "icmpv6.rpl.opt.config.lifetime_unit", FT_UINT16, BASE_DEC|BASE_UNIT_STRING0x00001000, UNS(&units_seconds)((0 ? (const struct unit_name_string*)0 : ((&units_seconds
))))
, 0x0,
6692 "Provides the unit in seconds that is used to express route lifetimes in RPL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6693 { &hf_icmpv6_rpl_opt_target_flag,
6694 { "Reserved", "icmpv6.rpl.opt.target.flag", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6695 "Unused field reserved for flags", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6696 { &hf_icmpv6_rpl_opt_target_prefix_length,
6697 { "Target Length", "icmpv6.rpl.opt.target.prefix_length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6698 "Number of valid leading bits in the IPv6 Prefix", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6699 { &hf_icmpv6_rpl_opt_target_prefix,
6700 { "Target", "icmpv6.rpl.opt.target.prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6701 "Identifying an IPv6 destination address, prefix, or multicast group", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6702 { &hf_icmpv6_rpl_opt_transit_flag,
6703 { "Flags", "icmpv6.rpl.opt.transit.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6704 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6705 { &hf_icmpv6_rpl_opt_transit_flag_e,
6706 { "External", "icmpv6.rpl.opt.transit.flag.e", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_OPT_TRANSIT_FLAG_E0x80,
6707 "Indicate that the parent router redistributes external targets into the RPL network", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6708 { &hf_icmpv6_rpl_opt_transit_flag_i,
6709 { "InvalidatePreviousRoute", "icmpv6.rpl.opt.transit.flag.i", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_OPT_TRANSIT_FLAG_I0x40,
6710 "Indicate to the common ancestor that it wishes to invalidate any previous route between the two paths", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6711 { &hf_icmpv6_rpl_opt_transit_flag_rsv,
6712 { "Reserved", "icmpv6.rpl.opt.transit.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_TRANSIT_FLAG_RSV0x3F,
6713 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6714 { &hf_icmpv6_rpl_opt_transit_pathctl,
6715 { "Path Control", "icmpv6.rpl.opt.transit.pathctl", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6716 "Limits the number of DAO-Parents to which a DAO message advertising connectivity", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6717 { &hf_icmpv6_rpl_opt_transit_pathctl_pc1,
6718 { "PC1", "icmpv6.rpl.opt.transit.pathctl.pc1", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_OPT_TRANSIT_PATHCTL_PC10xC0,
6719 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6720 { &hf_icmpv6_rpl_opt_transit_pathctl_pc2,
6721 { "PC2", "icmpv6.rpl.opt.transit.pathctl.pc2", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_OPT_TRANSIT_PATHCTL_PC20x30,
6722 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6723 { &hf_icmpv6_rpl_opt_transit_pathctl_pc3,
6724 { "PC3", "icmpv6.rpl.opt.transit.pathctl.pc3", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_OPT_TRANSIT_PATHCTL_PC30x0C,
6725 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6726 { &hf_icmpv6_rpl_opt_transit_pathctl_pc4,
6727 { "PC4", "icmpv6.rpl.opt.transit.pathctl.pc4", FT_UINT8, BASE_HEX, NULL((void*)0), RPL_OPT_TRANSIT_PATHCTL_PC40x03,
6728 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6729 { &hf_icmpv6_rpl_opt_transit_pathseq,
6730 { "Path Sequence", "icmpv6.rpl.opt.transit.pathseq", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6731 "Increments the Path Sequence each time it issues a RPL Target option with updated information", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6732 { &hf_icmpv6_rpl_opt_transit_pathlifetime,
6733 { "Path Lifetime", "icmpv6.rpl.opt.transit.pathlifetime", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6734 "The length of time in Lifetime Units that the prefix is valid for route determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6735 { &hf_icmpv6_rpl_opt_transit_parent,
6736 { "Parent Address", "icmpv6.rpl.opt.transit.parent", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6737 "IPv6 Address of the DODAG Parent of the node originally issuing the Transit Information Option", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6738 { &hf_icmpv6_rpl_opt_solicited_instance,
6739 { "Instance", "icmpv6.rpl.opt.solicited.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6740 "Containing the RPLInstanceID that is being solicited when valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6741 { &hf_icmpv6_rpl_opt_solicited_flag,
6742 { "Flag", "icmpv6.rpl.opt.solicited.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6743 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6744 { &hf_icmpv6_rpl_opt_solicited_flag_v,
6745 { "Version predicate", "icmpv6.rpl.opt.solicited.flag.v", FT_BOOLEAN, 8, NULL((void*)0), RPL_OPT_SOLICITED_FLAG_V0x80,
6746 "The Version predicate is true if the receiver's DODAGVersionNumber matches the requested Version Number", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6747 { &hf_icmpv6_rpl_opt_solicited_flag_i,
6748 { "InstanceID predicate","icmpv6.rpl.opt.solicited.flag.i", FT_BOOLEAN, 8, NULL((void*)0), RPL_OPT_SOLICITED_FLAG_I0x40,
6749 "The InstanceID predicate is true when the RPL node's current RPLInstanceID matches the requested RPLInstanceID", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6750 { &hf_icmpv6_rpl_opt_solicited_flag_d,
6751 { "DODAGID predicate", "icmpv6.rpl.opt.solicited.flag.d", FT_BOOLEAN, 8, NULL((void*)0), RPL_OPT_SOLICITED_FLAG_D0x20,
6752 "The DODAGID predicate is true if the RPL node's parent set has the same DODAGID as the DODAGID field", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6753 { &hf_icmpv6_rpl_opt_solicited_flag_rsv,
6754 { "Reserved", "icmpv6.rpl.opt.solicited.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_SOLICITED_FLAG_RSV0x1F,
6755 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6756 { &hf_icmpv6_rpl_opt_solicited_dodagid,
6757 { "DODAGID", "icmpv6.rpl.opt.solicited.dodagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6758 "the DODAGID that is being solicited when valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6759 { &hf_icmpv6_rpl_opt_solicited_version,
6760 { "Version", "icmpv6.rpl.opt.solicited.version", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6761 "the value of DODAGVersionNumber that is being solicited when valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6762
6763 { &hf_icmpv6_rpl_opt_prefix_length,
6764 { "Prefix Length", "icmpv6.rpl.opt.prefix.length", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6765 "The number of leading bits in the Prefix that are valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6766 { &hf_icmpv6_rpl_opt_prefix_flag,
6767 { "Flag", "icmpv6.rpl.opt.prefix.flag", FT_UINT8, BASE_HEX, NULL((void*)0), 0x0,
6768 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6769 { &hf_icmpv6_rpl_opt_prefix_flag_l,
6770 { "On Link", "icmpv6.rpl.opt.prefix.flag.l", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_OPT_PREFIX_FLAG_L0x80,
6771 "When set, indicates that this prefix can be used for on-link determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6772 { &hf_icmpv6_rpl_opt_prefix_flag_a,
6773 { "Auto Address Config","icmpv6.rpl.opt.config.flag.a", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_OPT_PREFIX_FLAG_A0x40,
6774 "When set indicates that this prefix can be used for stateless address configuration", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6775 { &hf_icmpv6_rpl_opt_prefix_flag_r,
6776 { "Router Address", "icmpv6.rpl.opt.config.flag.r", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, RPL_OPT_PREFIX_FLAG_R0x20,
6777 "When set, indicates that the Prefix field contains a complete IPv6 address assigned to the sending router that can be used as parent in a target option", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6778 { &hf_icmpv6_rpl_opt_prefix_flag_rsv,
6779 { "Reserved", "icmpv6.rpl.opt.config.flag.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_PREFIX_FLAG_RSV0x1F,
6780 "Must Be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6781 { &hf_icmpv6_rpl_opt_prefix_vlifetime,
6782 { "Valid Lifetime", "icmpv6.rpl.opt.prefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x0,
6783 "The length of time in seconds that the prefix is valid for the purpose of on-link determination", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6784 { &hf_icmpv6_rpl_opt_prefix_plifetime,
6785 { "Preferred Lifetime", "icmpv6.rpl.opt.prefix.preferred_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS0x00008000, VALS(unique_infinity)((0 ? (const struct _value_string*)0 : ((unique_infinity)))), 0x0,
6786 "The length of time in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6787 { &hf_icmpv6_rpl_opt_prefix,
6788 { "Destination Prefix", "icmpv6.rpl.opt.prefix", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6789 "An IPv6 address or a prefix of an IPv6 address", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6790 { &hf_icmpv6_rpl_opt_targetdesc,
6791 { "Descriptor", "icmpv6.rpl.opt.targetdesc.descriptor", FT_UINT32, BASE_HEX, NULL((void*)0), 0x0,
6792 "Opaque Data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6793
6794 { &hf_icmpv6_rpl_opt_route_discovery_flag,
6795 { "Flags", "icmpv6.rpl.opt.routediscovery.flag", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6796 "NULL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6797 { &hf_icmpv6_rpl_opt_route_discovery_reply,
6798 { "Reply", "icmpv6.rpl.opt.routediscovery.flag.reply", FT_BOOLEAN, 8, TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, RPL_OPT_ROUTE_DISCOVERY_R0x80,
6799 "The Origin sets this flag to one to allow the Target(s) to send P2P-DRO messages back to the Origin", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6800 { &hf_icmpv6_rpl_opt_route_discovery_hop_by_hop,
6801 { "Hop-by-Hop", "icmpv6.rpl.opt.routediscovery.flag.hopbyhop", FT_BOOLEAN, 8, TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, RPL_OPT_ROUTE_DISCOVERY_H0x40,
6802 "The Origin sets this flag to one if it desires Hop-by-hop Routes and to zero if it desires Source Routes.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6803 { &hf_icmpv6_rpl_opt_route_discovery_num_of_routes,
6804 { "Number of Routes", "icmpv6.rpl.opt.routediscovery.flag.numofroutes", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_ROUTE_DISCOVERY_N0x30,
6805 "This value plus one indicates the number of Source Routes that each Target should convey to the Origin", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6806 { &hf_icmpv6_rpl_opt_route_discovery_compr,
6807 { "Compr", "icmpv6.rpl.opt.routediscovery.flag.compr", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_ROUTE_DISCOVERY_COMPR0x0F,
6808 "Number of prefix octets that are elided from the Target field and Address vector", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6809 { &hf_icmpv6_rpl_opt_route_discovery_lifetime,
6810 { "Lifetime", "icmpv6.rpl.opt.routediscovery.lifetime", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_ROUTE_DISCOVERY_L0xC0,
6811 "Lifetime of the temporary DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6812 { &hf_icmpv6_rpl_opt_route_discovery_maxrank,
6813 { "MaxRank", "icmpv6.rpl.opt.routediscovery.maxrank", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_ROUTE_DISCOVERY_MR_NH0x3F,
6814 "Upper limit of the integer portion of the rank when used inside a DIO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6815 { &hf_icmpv6_rpl_opt_route_discovery_nh,
6816 { "NH", "icmpv6.rpl.opt.routediscovery.nh", FT_UINT8, BASE_DEC, NULL((void*)0), RPL_OPT_ROUTE_DISCOVERY_MR_NH0x3F,
6817 "Index of the next-hop (NH) address inside the Address vector", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6818 { &hf_icmpv6_rpl_opt_route_discovery_target_addr,
6819 { "Target Address", "icmpv6.rpl.opt.routediscovery.targetaddr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6820 "An IPv6 address of the Target after eliding Compr number of prefix octets", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6821 { &hf_icmpv6_rpl_opt_route_discovery_addr_vec,
6822 { "Address Vector", "icmpv6.rpl.opt.routediscovery.addr_vec", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6823 "NULL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6824 { &hf_icmpv6_rpl_opt_route_discovery_addr_vec_addr,
6825 { "Address", "icmpv6.rpl.opt.routediscovery.addrvec.addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6826 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6827 { &hf_icmpv6_rpl_p2p_dro_instance,
6828 { "RPLInstanceID", "icmpv6.rpl.p2p.dro.instance", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6829 "Set by the DODAG root that indicates which RPL Instance the DODAG is part of", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6830 { &hf_icmpv6_rpl_p2p_dro_version,
6831 { "Version", "icmpv6.rpl.p2p.dro.version", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6832 "Set by the DODAG root to the DODAGVersionNumber", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6833 { &hf_icmpv6_rpl_p2p_dro_flag,
6834 { "Flags", "icmpv6.rpl.p2p.dro.flag", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6835 "NULL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6836 { &hf_icmpv6_rpl_p2p_dro_flag_stop,
6837 { "Stop", "icmpv6.rpl.p2p.dro.flag.stop", FT_BOOLEAN, 16, TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, RPL_P2P_DRO_FLAG_S0x8000,
6838 "Indicates that the P2P-RPL route discovery is over", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6839 { &hf_icmpv6_rpl_p2p_dro_flag_ack,
6840 { "Ack", "icmpv6.rpl.p2p.dro.flag.ack", FT_BOOLEAN, 16, TFS(&tfs_yes_no)((0 ? (const struct true_false_string*)0 : ((&tfs_yes_no)
)))
, RPL_P2P_DRO_FLAG_A0x4000,
6841 "Indicates that the Origin MUST unicast a P2P-DRO-ACK message to the Target", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6842 { &hf_icmpv6_rpl_p2p_dro_flag_seq,
6843 { "Seq", "icmpv6.rpl.p2p.dro.flag.seq", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_P2P_DRO_FLAG_SEQ0x3000,
6844 "Indicates the sequence number for the P2P-DRO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6845 { &hf_icmpv6_rpl_p2p_dro_flag_reserved,
6846 { "Reserved", "icmpv6.rpl.p2p.dro.flag.reserved", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_P2P_DRO_FLAG_RSV0x0FFF,
6847 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6848 { &hf_icmpv6_rpl_p2p_dro_dagid,
6849 { "DODAGID", "icmpv6.rpl.p2p.dro.dagid", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6850 "IPv6 address set by a DODAG root which uniquely identifies a DODAG", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6851 { &hf_icmpv6_rpl_p2p_droack_flag,
6852 { "Flags", "icmpv6.rpl.p2p.droack.flag", FT_UINT16, BASE_HEX, NULL((void*)0), 0x0,
6853 "NULL", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6854 { &hf_icmpv6_rpl_p2p_droack_flag_seq,
6855 { "Seq", "icmpv6.rpl.p2p.droack.flag.seq", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_P2P_DROACK_FLAG_SEQ0xc000,
6856 "Indicates the sequence number for the P2P-DRO", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6857 { &hf_icmpv6_rpl_p2p_droack_flag_reserved,
6858 { "Reserved", "icmpv6.rpl.p2p.droack.flag.reserved", FT_UINT16, BASE_DEC, NULL((void*)0), RPL_P2P_DROACK_FLAG_RSV0x3FFF,
6859 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6860
6861 /* RFC6743 Locator Update (156) */
6862
6863 { &hf_icmpv6_ilnp_nb_locs,
6864 { "Num of Locs", "icmpv6.ilnp.nb_locs", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6865 "The number of 64-bit Locator values that are advertised in this message", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6866 { &hf_icmpv6_ilnp_locator,
6867 { "Locator", "icmpv6.ilnp.nb_locator", FT_UINT64, BASE_HEX, NULL((void*)0), 0x0,
6868 "The 64-bit Locator values currently valid for the sending ILNPv6 node", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6869 { &hf_icmpv6_ilnp_preference,
6870 { "Preference", "icmpv6.ilnp.nb_preference", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6871 "The preferability of each Locator relative to other valid Locator values", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6872 { &hf_icmpv6_ilnp_lifetime,
6873 { "Lifetime", "icmpv6.ilnp.nb_lifetime", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
6874 "The maximum number of seconds that this particular Locator may be considered valid", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6875
6876 /* 6lowpan-nd: Neighbour Discovery for 6LoWPAN Networks */
6877 { &hf_icmpv6_da_code_prefix,
6878 { "Code Prefix", "icmpv6.6lowpannd.da.code.prefix", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6879 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6880 { &hf_icmpv6_da_code_suffix,
6881 { "Code Suffix", "icmpv6.6lowpannd.da.code.suffix", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6882 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6883 { &hf_icmpv6_dar_code_suffix,
6884 { "Code Suffix", "icmpv6.6lowpannd.dar.code.suffix", FT_UINT8, BASE_DEC, VALS(nd_opt_dar_code_suffix_val)((0 ? (const struct _value_string*)0 : ((nd_opt_dar_code_suffix_val
))))
, 0x0,
6885 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6886 { &hf_icmpv6_dac_code_suffix,
6887 { "Code Suffix", "icmpv6.6lowpannd.dac.code.suffix", FT_UINT8, BASE_DEC, VALS(nd_opt_dac_code_suffix_val)((0 ? (const struct _value_string*)0 : ((nd_opt_dac_code_suffix_val
))))
, 0x0,
6888 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6889 { &hf_icmpv6_da_status,
6890 { "Status", "icmpv6.6lowpannd.da.status", FT_UINT8, BASE_DEC, VALS(nd_opt_da_status_val)((0 ? (const struct _value_string*)0 : ((nd_opt_da_status_val
))))
, 0x0,
6891 "Indicates the status of a registration in the DAC", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6892 { &hf_icmpv6_da_rsv,
6893 { "Reserved", "icmpv6.6lowpannd.da.rsv", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6894 "Must be Zero", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6895 { &hf_icmpv6_da_lifetime,
6896 { "Lifetime", "icmpv6.6lowpannd.da.lifetime", FT_UINT16, BASE_DEC, NULL((void*)0), 0x0,
6897 "The amount of time in a unit of 60 seconds that the router should retain the Neighbor Cache entry for the sender of the NS that includes this option", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6898 { &hf_icmpv6_da_eui64,
6899 { "EUI-64", "icmpv6.6lowpannd.da.eui64", FT_EUI64, BASE_NONE, NULL((void*)0), 0x0,
6900 "This field is used to uniquely identify the interface of the registered address by including the EUI-64 identifier", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6901 { &hf_icmpv6_da_rovr,
6902 { "ROVR", "icmpv6.6lowpannd.da.rovr", FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
6903 "Registration Ownership Verifier (ROVR)", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6904 { &hf_icmpv6_da_raddr,
6905 { "Registered Address", "icmpv6.6lowpannd.da.reg_addr", FT_IPv6, BASE_NONE, NULL((void*)0), 0x0,
6906 "Carries the host address, which was contained in the IPv6 Source field in the NS that contained the ARO option sent by the host", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6907
6908 /* Extended Echo - Probe - RFC8335 */
6909 { &hf_icmpv6_ext_echo_seq_num,
6910 { "Sequence number", "icmpv6.ext.echo.seq", FT_UINT8, BASE_DEC_HEX, NULL((void*)0), 0x0,
6911 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6912 { &hf_icmpv6_ext_echo_req_reserved,
6913 { "Reserved", "icmpv6.ext.echo.req.res", FT_UINT8, BASE_HEX, NULL((void*)0), 0xFE,
6914 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6915 { &hf_icmpv6_ext_echo_req_local,
6916 { "Local bit", "icmpv6.ext.echo.req.local", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x01,
6917 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6918 { &hf_icmpv6_ext_echo_rsp_state,
6919 { "State", "icmpv6.ext.echo.rsp.state", FT_UINT8, BASE_DEC, VALS(ext_echo_reply_state_str)((0 ? (const struct _value_string*)0 : ((ext_echo_reply_state_str
))))
, 0xE0,
6920 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6921 { &hf_icmpv6_ext_echo_rsp_reserved,
6922 { "Reserved", "icmpv6.ext.echo.rsp.res", FT_UINT8, BASE_HEX, NULL((void*)0), 0x18,
6923 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6924 { &hf_icmpv6_ext_echo_rsp_active,
6925 { "Active bit", "icmpv6.ext.echo.rsp.active", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x04,
6926 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6927 { &hf_icmpv6_ext_echo_rsp_ipv4,
6928 { "IPv4 bit", "icmpv6.ext.echo.rsp.ipv4", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x02,
6929 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6930 { &hf_icmpv6_ext_echo_rsp_ipv6,
6931 { "IPv6 bit", "icmpv6.ext.echo.rsp.ipv6", FT_BOOLEAN, 8, TFS(&tfs_set_notset)((0 ? (const struct true_false_string*)0 : ((&tfs_set_notset
))))
, 0x01,
6932 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6933
6934 /* Conversation-related [generated] header fields */
6935 { &hf_icmpv6_resp_in,
6936 { "Response In", "icmpv6.resp_in", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0,
6937 "The response to this request is in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6938 {&hf_icmpv6_no_resp,
6939 {"No response seen", "icmpv6.no_resp", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
6940 "No corresponding response frame was seen", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}},
6941 { &hf_icmpv6_resp_to,
6942 { "Response To", "icmpv6.resp_to", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
6943 "This is the response to the request in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6944 { &hf_icmpv6_resptime,
6945 { "Response Time", "icmpv6.resptime", FT_DOUBLE, BASE_NONE, NULL((void*)0), 0x0,
6946 "The time between the request and the response, in ms.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6947
6948 /* RFC 7731: Multicast Protocol for Low-Power and Lossy Networks (MPL) */
6949 { &hf_icmpv6_mpl_seed_info_min_sequence,
6950 { "MinSequence", "icmpv6.mpl.seed_info.min_sequence", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6951 "The lower-bound sequence number for the MPL Seed.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6952 { &hf_icmpv6_mpl_seed_info_bm_len,
6953 { "Buffered Messages Length", "icmpv6.mpl.seed_info.bm_len", FT_UINT8, BASE_DEC, NULL((void*)0), MPL_SEED_INFO_BM_LEN0xFC,
6954 "The size of buffered-mpl-messages in octets.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6955 { &hf_icmpv6_mpl_seed_info_s,
6956 { "Seed ID Length", "icmpv6.mpl.seed_info.s", FT_UINT8, BASE_DEC, VALS(mpl_seed_id_lengths)((0 ? (const struct _value_string*)0 : ((mpl_seed_id_lengths)
)))
, MPL_SEED_INFO_S0x03,
6957 "The length of the seed-id.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6958 { &hf_icmpv6_mpl_seed_info_seed_id,
6959 { "Seed ID", "icmpv6.mpl.seed_info.seed_id", FT_STRING, BASE_NONE, NULL((void*)0), 0x0,
6960 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }},
6961 { &hf_icmpv6_mpl_seed_info_sequence,
6962 { "Sequence", "icmpv6.mpl.seed_info.sequence", FT_UINT8, BASE_DEC, NULL((void*)0), 0x0,
6963 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}
6964
6965 };
6966
6967 static int *ett[] = {
6968 &ett_icmpv6,
6969 &ett_icmpv6_opt,
6970 &ett_icmpv6_mar,
6971 &ett_icmpv6_flag_prefix,
6972 &ett_icmpv6_flag_map,
6973 &ett_icmpv6_flag_pvd_id,
6974 &ett_icmpv6_flag_route_info,
6975 &ett_icmpv6_flag_earo,
6976 &ett_icmpv6_flag_6lowpan,
6977 &ett_icmpv6_flag_efo,
6978 &ett_icmpv6_rpl_opt,
6979 &ett_icmpv6_rpl_metric_type,
6980 &ett_icmpv6_rpl_metric_flags,
6981 &ett_icmpv6_rpl_metric_nsa_object,
6982 &ett_icmpv6_rpl_metric_nsa_object_tlv_type,
6983 &ett_icmpv6_rpl_metric_ne_object,
6984 &ett_icmpv6_rpl_metric_hp_object,
6985 &ett_icmpv6_rpl_metric_lql_object,
6986 &ett_icmpv6_rpl_metric_lc_object,
6987 &ett_icmpv6_rpl_flag_routing,
6988 &ett_icmpv6_rpl_flag_config,
6989 &ett_icmpv6_rpl_flag_transit,
6990 &ett_icmpv6_rpl_flag_solicited,
6991 &ett_icmpv6_rpl_flag_prefix,
6992 &ett_icmpv6_rpl_route_discovery_flag,
6993 &ett_icmpv6_rpl_route_discovery_addr_vec,
6994 &ett_icmpv6_rpl_transit_pathctl,
6995 &ett_icmpv6_rpl_p2p_dro_flag,
6996 &ett_icmpv6_rpl_p2p_droack_flag,
6997 &ett_icmpv6_flag_ni,
6998 &ett_icmpv6_flag_rr,
6999 &ett_icmpv6_rr_mp,
7000 &ett_icmpv6_rr_up,
7001 &ett_icmpv6_rr_up_flag_mask,
7002 &ett_icmpv6_rr_up_flag_ra,
7003 &ett_icmpv6_rr_up_flag,
7004 &ett_icmpv6_rr_rm,
7005 &ett_icmpv6_rr_rm_flag,
7006 &ett_icmpv6_flag_mld,
7007 &ett_icmpv6_flag_ra,
7008 &ett_icmpv6_flag_na,
7009 &ett_icmpv6_flag_mip6,
7010 &ett_icmpv6_flag_fmip6,
7011 &ett_icmpv6_flag_secure,
7012 &ett_icmpv6_flag_rpl_dio,
7013 &ett_icmpv6_flag_rpl_dao,
7014 &ett_icmpv6_flag_rpl_daoack,
7015 &ett_icmpv6_flag_rpl_dco,
7016 &ett_icmpv6_flag_rpl_dcoack,
7017 &ett_icmpv6_flag_rpl_cc,
7018 &ett_icmpv6_flag_6cio,
7019 &ett_icmpv6_opt_name,
7020 &ett_icmpv6_cga_param_name,
7021 &ett_icmpv6_mpl_seed_info,
7022 &ett_icmpv6_mpl_seed_info_bm,
7023 &ett_icmpv6_opt_dnr_addrs
7024 };
7025
7026 static ei_register_info ei[] = {
7027 { &ei_icmpv6_type_error, { "icmpv6.type.error", PI_RESPONSE_CODE0x03000000, PI_NOTE0x00400000, "Type indicates an error", 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)}}
}},
7028 { &ei_icmpv6_invalid_option_length, { "icmpv6.invalid_option_length", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Invalid Option 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)}}
}},
7029 { &ei_icmpv6_opt_dnr_adn_only_mode, { "icmpv6.opt.dnr.adn_only_mode", PI_COMMENTS_GROUP0x0b000000, PI_CHAT0x00200000, "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)}}
}},
7030 { &ei_icmpv6_undecoded_option, { "icmpv6.undecoded.option", PI_UNDECODED0x05000000, PI_NOTE0x00400000, "Undecoded 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)}}
}},
7031 { &ei_icmpv6_unknown_data, { "icmpv6.unknown_data.expert", PI_MALFORMED0x07000000, PI_ERROR0x00800000, "Unknown Data (not interpreted)", 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)}}
}},
7032 { &ei_icmpv6_undecoded_rpl_option, { "icmpv6.undecoded.rpl_option", PI_UNDECODED0x05000000, PI_NOTE0x00400000, "Undecoded RPL 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)}}
}},
7033 { &ei_icmpv6_undecoded_type, { "icmpv6.undecoded.type", PI_UNDECODED0x05000000, PI_NOTE0x00400000, "Undecoded 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)}}
}},
7034 { &ei_icmpv6_rr_pco_mp_matchlen, { "icmpv6.rr.pco.mp.matchlen.gt128", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "MatchLen is greater than 128", 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)}}
}},
7035 { &ei_icmpv6_rr_pco_mp_matchedlen, { "icmpv6.rr.pco.mp.matchedlen.gt128", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "MatchedLen is greater than 128", 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)}}
}},
7036 { &ei_icmpv6_checksum, { "icmpv6.checksum_bad.expert", PI_CHECKSUM0x01000000, PI_WARN0x00600000, "Bad checksum", 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)}}
}},
7037 { &ei_icmpv6_resp_not_found, { "icmpv6.resp_not_found", PI_SEQUENCE0x02000000, PI_WARN0x00600000, "Response not found", 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)}}
}},
7038 { &ei_icmpv6_rpl_unknown_metric, { "icmpv6.rpl.unknown.metric", PI_UNDECODED0x05000000, PI_NOTE0x00400000, "Unknown RPL metric/constraint 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)}}
}},
7039 { &ei_icmpv6_rpl_p2p_hop_by_hop, { "icmpv6.rpl.p2p.hop_by_hop", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Reply MUST be set to one in order to establish a Hop-by-Hop Route", 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)}}
}},
7040 { &ei_icmpv6_rpl_p2p_num_of_routes, { "icmpv6.rpl.p2p.num_of_routes", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "This field MUST be set to zero when Hop-by-Hop Routes are being discovered", 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)}}
}},
7041 { &ei_icmpv6_rpl_p2p_dro_rdo_zero, { "icmpv6.rpl.p2p.dro.rdo.zero", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "This field MUST be set to zero when the P2P-RDO is included in a P2P-DRO", 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)}}
}},
7042 { &ei_icmpv6_rpl_p2p_dro_zero, { "icmpv6.rpl.p2p.dro.zero", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "This field MUST be set to zero", 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)}}
}},
7043 };
7044
7045 expert_module_t* expert_icmpv6;
7046
7047 proto_icmpv6 = proto_register_protocol("Internet Control Message Protocol v6",
7048 "ICMPv6", "icmpv6");
7049 proto_register_field_array(proto_icmpv6, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
7050 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
7051 expert_icmpv6 = expert_register_protocol(proto_icmpv6);
7052 expert_register_field_array(expert_icmpv6, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
7053
7054 register_seq_analysis("icmpv6", "ICMPv6 Flows", proto_icmpv6, NULL((void*)0), TL_REQUIRES_COLUMNS0x00000002, icmpv6_seq_analysis_packet);
7055 icmpv6_handle = register_dissector("icmpv6", dissect_icmpv6, proto_icmpv6);
7056 icmpv6_heur_subdissector_list = register_heur_dissector_list_with_description("icmpv6", "ICMPv6 Echo payload", proto_icmpv6);
7057 icmpv6_tap = register_tap("icmpv6");
7058}
7059
7060void
7061proto_reg_handoff_icmpv6(void)
7062{
7063 capture_dissector_handle_t icmpv6_cap_handle;
7064
7065 dissector_add_uint("ip.proto", IP_PROTO_IPV6_ICMP58, icmpv6_handle);
7066 icmpv6_cap_handle = create_capture_dissector_handle(capture_icmpv6, proto_icmpv6);
7067 capture_dissector_add_uint("ip.proto", IP_PROTO_IPV6_ICMP58, icmpv6_cap_handle);
7068
7069 /*
7070 * Get a handle for the IPv6 dissector.
7071 */
7072 ipv6_handle = find_dissector_add_dependency("ipv6", proto_icmpv6);
7073 icmp_extension_handle = find_dissector("icmp_extension");
7074 svc_params_handle = find_dissector("svc_params");
7075
7076 proto_ieee802154 = proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN"wpan");
7077}
7078
7079/*
7080 * Editor modelines - https://www.wireshark.org/tools/modelines.html
7081 *
7082 * Local variables:
7083 * c-basic-offset: 4
7084 * tab-width: 8
7085 * indent-tabs-mode: nil
7086 * End:
7087 *
7088 * vi: set shiftwidth=4 tabstop=8 expandtab:
7089 * :indentSize=4:tabSize=8:noTabs=true:
7090 */