3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef __PACKET_IPV6_H__
11 #define __PACKET_IPV6_H__
14 #include <wsutil/inet_addr.h>
15 #include <epan/conversation.h>
17 #define IPv6_ADDR_SIZE 16
18 #define IPv6_HDR_SIZE 40
19 #define IPv6_FRAGMENT_HDR_SIZE 8
22 * Definition for internet protocol version 6.
26 uint32_t ip6h_vc_flow
; /* version, class, flow */
27 uint16_t ip6h_plen
; /* payload length */
28 uint8_t ip6h_nxt
; /* next header */
29 uint8_t ip6h_hlim
; /* hop limit */
30 ws_in6_addr ip6h_src
; /* source address */
31 ws_in6_addr ip6h_dst
; /* destination address */
39 unsigned char ip6e_nxt
;
40 unsigned char ip6e_len
;
45 uint8_t ip6r_nxt
; /* next header */
46 uint8_t ip6r_len
; /* length in units of 8 octets */
47 uint8_t ip6r_type
; /* routing type */
48 uint8_t ip6r_segleft
; /* segments left */
49 /* followed by routing type specific data */
52 /* Type 0 Routing header */
53 struct ws_ip6_rthdr0
{
54 uint8_t ip6r0_nxt
; /* next header */
55 uint8_t ip6r0_len
; /* length in units of 8 octets */
56 uint8_t ip6r0_type
; /* always zero */
57 uint8_t ip6r0_segleft
; /* segments left */
58 uint8_t ip6r0_reserved
; /* reserved field */
59 uint8_t ip6r0_slmap
[3]; /* strict/loose bit map */
60 /* followed by up to 127 addresses */
61 ws_in6_addr ip6r0_addr
[1];
66 uint8_t ip6f_nxt
; /* next header */
67 uint8_t ip6f_reserved
; /* reserved field */
68 uint16_t ip6f_offlg
; /* offset, reserved, and flag */
69 uint32_t ip6f_ident
; /* identification */
72 #define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
73 #define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
74 #define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
76 struct ipv6_analysis
{
78 /* Initial frame starting this conversation
80 uint32_t initial_frame
;
85 WS_DLL_PUBLIC
struct ipv6_analysis
*get_ipv6_conversation_data(conversation_t
*conv
,