Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-sctp.h
blob0ae07b1fa8952f9c6b678763a2c0de552563a347
1 /* packet-sctp.h
3 * Definition of SCTP specific structures used by tap listeners.
5 * Copyright 2004 Michael Tuexen <tuexen [AT] fh-muenster.de>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
14 #ifndef __PACKET_SCTP_H__
15 #define __PACKET_SCTP_H__
17 #include "ws_symbol_export.h"
19 #ifdef __cplusplus
20 extern "C" {
21 #endif /* __cplusplus */
23 #define MAXIMUM_NUMBER_OF_TVBS 2048
25 struct _sctp_info {
26 bool incomplete;
27 bool adler32_calculated;
28 bool adler32_correct;
29 bool crc32c_calculated;
30 bool crc32c_correct;
31 bool checksum_zero;
32 bool vtag_reflected;
33 uint16_t sport;
34 uint16_t dport;
35 address ip_src;
36 address ip_dst;
37 uint32_t verification_tag;
38 uint16_t assoc_index;
39 uint16_t direction;
40 uint32_t number_of_tvbs;
41 tvbuff_t *tvb[MAXIMUM_NUMBER_OF_TVBS];
44 typedef struct _sctp_fragment {
45 uint32_t frame_num;
46 uint32_t tsn;
47 uint32_t len;
48 uint32_t ppi;
49 unsigned char *data;
50 struct _sctp_fragment *next;
51 } sctp_fragment;
53 typedef struct _sctp_frag_be {
54 sctp_fragment* fragment;
55 struct _sctp_frag_be *next;
56 } sctp_frag_be;
58 typedef struct _sctp_complete_msg {
59 uint32_t begin;
60 uint32_t end;
61 sctp_fragment* reassembled_in;
62 uint32_t len;
63 unsigned char *data;
64 struct _sctp_complete_msg *next;
65 } sctp_complete_msg;
67 typedef struct _sctp_frag_msg {
68 sctp_frag_be* begins;
69 sctp_frag_be* ends;
70 sctp_fragment* fragments;
71 sctp_complete_msg* messages;
72 uint32_t ppi;
73 struct _sctp_frag_msg* next;
74 } sctp_frag_msg;
76 #define SCTP_DATA_CHUNK_ID 0
77 #define SCTP_INIT_CHUNK_ID 1
78 #define SCTP_INIT_ACK_CHUNK_ID 2
79 #define SCTP_SACK_CHUNK_ID 3
80 #define SCTP_HEARTBEAT_CHUNK_ID 4
81 #define SCTP_HEARTBEAT_ACK_CHUNK_ID 5
82 #define SCTP_ABORT_CHUNK_ID 6
83 #define SCTP_SHUTDOWN_CHUNK_ID 7
84 #define SCTP_SHUTDOWN_ACK_CHUNK_ID 8
85 #define SCTP_ERROR_CHUNK_ID 9
86 #define SCTP_COOKIE_ECHO_CHUNK_ID 10
87 #define SCTP_COOKIE_ACK_CHUNK_ID 11
88 #define SCTP_ECNE_CHUNK_ID 12
89 #define SCTP_CWR_CHUNK_ID 13
90 #define SCTP_SHUTDOWN_COMPLETE_CHUNK_ID 14
91 #define SCTP_AUTH_CHUNK_ID 15
92 #define SCTP_NR_SACK_CHUNK_ID 16
93 #define SCTP_I_DATA_CHUNK_ID 0x40
94 #define SCTP_ASCONF_ACK_CHUNK_ID 0x80
95 #define SCTP_PKTDROP_CHUNK_ID 0x81
96 #define SCTP_RE_CONFIG_CHUNK_ID 0x82
97 #define SCTP_PAD_CHUNK_ID 0x84
98 #define SCTP_FORWARD_TSN_CHUNK_ID 0xC0
99 #define SCTP_ASCONF_CHUNK_ID 0xC1
100 #define SCTP_I_FORWARD_TSN_CHUNK_ID 0xC2
101 #define SCTP_IETF_EXT 0xFF
103 #define IS_SCTP_CHUNK_TYPE(t) \
104 (((t) <= SCTP_NR_SACK_CHUNK_ID) || \
105 ((t) == SCTP_I_DATA_CHUNK_ID) || \
106 ((t) == SCTP_FORWARD_TSN_CHUNK_ID) || \
107 ((t) == SCTP_ASCONF_CHUNK_ID) || \
108 ((t) == SCTP_ASCONF_ACK_CHUNK_ID) || \
109 ((t) == SCTP_PKTDROP_CHUNK_ID))
111 WS_DLL_PUBLIC const value_string chunk_type_values[];
113 #ifdef __cplusplus
115 #endif /* __cplusplus */
117 #endif
120 * Editor modelines - https://www.wireshark.org/tools/modelines.html
122 * Local Variables:
123 * c-basic-offset: 2
124 * tab-width: 8
125 * indent-tabs-mode: nil
126 * End:
128 * vi: set shiftwidth=2 tabstop=8 expandtab:
129 * :indentSize=2:tabSize=8:noTabs=true: