Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-sctp.h
1/* packet-sctp.h
2 *
3 * Definition of SCTP specific structures used by tap listeners.
4 *
5 * Copyright 2004 Michael Tuexen <tuexen [AT] fh-muenster.de>
6 *
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <[email protected]>
9 * Copyright 1998 Gerald Combs
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14#ifndef __PACKET_SCTP_H__
15#define __PACKET_SCTP_H__
16
17#include "ws_symbol_export.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif /* __cplusplus */
22
23#define MAXIMUM_NUMBER_OF_TVBS 2048
24
25struct _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];
42};
43
44typedef 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;
52
53typedef struct _sctp_frag_be {
54 sctp_fragment* fragment;
55 struct _sctp_frag_be *next;
57
58typedef 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;
66
67typedef 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;
75
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
102
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))
110
111
112/*
113 * SCTP payload protocol IDs.
114 * From http://www.iana.org/assignments/sctp-parameters
115 * as of 2014/02/28
116 *
117 * Please do not put non-IANA-registered PPIDs here. Put them in the dissector
118 * using them instead (and consider registering them!).
119 */
120#define NOT_SPECIFIED_PROTOCOL_ID 0
121#define IUA_PAYLOAD_PROTOCOL_ID 1
122#define M2UA_PAYLOAD_PROTOCOL_ID 2
123#define M3UA_PAYLOAD_PROTOCOL_ID 3
124#define SUA_PAYLOAD_PROTOCOL_ID 4
125#define M2PA_PAYLOAD_PROTOCOL_ID 5
126#define V5UA_PAYLOAD_PROTOCOL_ID 6
127#define H248_PAYLOAD_PROTOCOL_ID 7
128#define BICC_PAYLOAD_PROTOCOL_ID 8
129#define TALI_PAYLOAD_PROTOCOL_ID 9
130#define DUA_PAYLOAD_PROTOCOL_ID 10
131#define ASAP_PAYLOAD_PROTOCOL_ID 11
132#define ENRP_PAYLOAD_PROTOCOL_ID 12
133#define H323_PAYLOAD_PROTOCOL_ID 13
134#define QIPC_PAYLOAD_PROTOCOL_ID 14
135#define SIMCO_PAYLOAD_PROTOCOL_ID 15
136#define DDP_SEG_CHUNK_PROTOCOL_ID 16
137#define DDP_STREAM_SES_CTRL_PROTOCOL_ID 17
138#define S1AP_PAYLOAD_PROTOCOL_ID 18
139#define RUA_PAYLOAD_PROTOCOL_ID 19
140#define HNBAP_PAYLOAD_PROTOCOL_ID 20
141#define FORCES_HP_PAYLOAD_PROTOCOL_ID 21
142#define FORCES_MP_PAYLOAD_PROTOCOL_ID 22
143#define FORCES_LP_PAYLOAD_PROTOCOL_ID 23
144#define SBC_AP_PAYLOAD_PROTOCOL_ID 24
145#define NBAP_PAYLOAD_PROTOCOL_ID 25
146/* Unassigned 26 */
147#define X2AP_PAYLOAD_PROTOCOL_ID 27
148#define IRCP_PAYLOAD_PROTOCOL_ID 28
149#define LCS_AP_PAYLOAD_PROTOCOL_ID 29
150#define MPICH2_PAYLOAD_PROTOCOL_ID 30
151#define SABP_PAYLOAD_PROTOCOL_ID 31
152#define FGP_PAYLOAD_PROTOCOL_ID 32
153#define PPP_PAYLOAD_PROTOCOL_ID 33
154#define CALCAPP_PAYLOAD_PROTOCOL_ID 34
155#define SSP_PAYLOAD_PROTOCOL_ID 35
156#define NPMP_CTRL_PAYLOAD_PROTOCOL_ID 36
157#define NPMP_DATA_PAYLOAD_PROTOCOL_ID 37
158#define ECHO_PAYLOAD_PROTOCOL_ID 38
159#define DISCARD_PAYLOAD_PROTOCOL_ID 39
160#define DAYTIME_PAYLOAD_PROTOCOL_ID 40
161#define CHARGEN_PAYLOAD_PROTOCOL_ID 41
162#define PROTO_3GPP_RNA_PROTOCOL_ID 42
163#define PROTO_3GPP_M2AP_PROTOCOL_ID 43
164#define PROTO_3GPP_M3AP_PROTOCOL_ID 44
165#define SSH_PAYLOAD_PROTOCOL_ID 45
166#define DIAMETER_PROTOCOL_ID 46
167#define DIAMETER_DTLS_PROTOCOL_ID 47
168#define R14P_BER_PROTOCOL_ID 48
169#define GDT_PROTOCOL_ID 49
170#define WEBRTC_DCEP_PROTOCOL_ID 50
171#define WEBRTC_STRING_PAYLOAD_PROTOCOL_ID 51
172#define WEBRTC_BINARY_PARTIAL_PAYLOAD_PROTOCOL_ID 52
173#define WEBRTC_BINARY_PAYLOAD_PROTOCOL_ID 53
174#define WEBRTC_STRING_PARTIAL_PAYLOAD_PROTOCOL_ID 54
175#define PROTO_3GPP_PUA_PAYLOAD_PROTOCOL_ID 55
176#define WEBRTC_STRING_EMPTY_PAYLOAD_PROTOCOL_ID 56
177#define WEBRTC_BINARY_EMPTY_PAYLOAD_PROTOCOL_ID 57
178#define XWAP_PROTOCOL_ID 58
179#define XW_CONTROL_PLANE_PROTOCOL_ID 59
180#define NGAP_PROTOCOL_ID 60
181#define XNAP_PROTOCOL_ID 61
182#define F1AP_PROTOCOL_ID 62
183#define HTTP_SCTP_PROTOCOL_ID 63
184#define E1AP_PROTOCOL_ID 64
185#define ELE2_PROTOCOL_ID 65
186#define NGAP_OVER_DTLS_PROTOCOL_ID 66
187#define XNAP_OVER_DTLS_PROTOCOL_ID 67
188#define F1AP_OVER_DTLS_PROTOCOL_ID 68
189#define E1AP_OVER_DTLS_PROTOCOL_ID 69
190#define E2_CP_PROTOCOL_ID 70
191#define E2_UP_PROTOCOL_ID 71
192#define E2_DU_PROTOCOL_ID 72
193#define W1AP_PROTOCOL_ID 73
194
195WS_DLL_PUBLIC value_string_ext sctpppid_val_ext;
196
197#ifdef __cplusplus
198}
199#endif /* __cplusplus */
200
201#endif
202
203/*
204 * Editor modelines - https://www.wireshark.org/tools/modelines.html
205 *
206 * Local Variables:
207 * c-basic-offset: 2
208 * tab-width: 8
209 * indent-tabs-mode: nil
210 * End:
211 *
212 * vi: set shiftwidth=2 tabstop=8 expandtab:
213 * :indentSize=2:tabSize=8:noTabs=true:
214 */
Definition address.h:58
Definition packet-sctp.h:58
Definition packet-sctp.h:53
Definition packet-sctp.h:67
Definition packet-sctp.h:44
Definition packet-sctp.h:25
Extended metadata for a value_string array.
Definition value_string.h:325
Definition tvbuff-int.h:35