Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-ipv6.h
blob55e85cf4be457b749fdf5f2a8b6673919af7863e
1 /** @file
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
8 */
10 #ifndef __PACKET_IPV6_H__
11 #define __PACKET_IPV6_H__
13 #include <inttypes.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.
23 * RFC 2460
25 struct ws_ip6_hdr {
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 */
35 * Extension Headers
38 struct ws_ip6_ext {
39 unsigned char ip6e_nxt;
40 unsigned char ip6e_len;
43 /* Routing header */
44 struct ws_ip6_rthdr {
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];
64 /* Fragment header */
65 struct ws_ip6_frag {
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;
82 uint32_t stream;
85 WS_DLL_PUBLIC struct ipv6_analysis *get_ipv6_conversation_data(conversation_t *conv,
86 packet_info *pinfo);
88 #endif