Wireshark 4.7.3
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;
51} sctp_fragment;
52
53typedef struct _sctp_frag_be {
54 sctp_fragment* fragment;
55 struct _sctp_frag_be *next;
56} sctp_frag_be;
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;
65} sctp_complete_msg;
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;
74} sctp_frag_msg;
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_DTLS_CHUNK_ID 0x41
95#define SCTP_ASCONF_ACK_CHUNK_ID 0x80
96#define SCTP_PKTDROP_CHUNK_ID 0x81
97#define SCTP_RE_CONFIG_CHUNK_ID 0x82
98#define SCTP_PAD_CHUNK_ID 0x84
99#define SCTP_FORWARD_TSN_CHUNK_ID 0xC0
100#define SCTP_ASCONF_CHUNK_ID 0xC1
101#define SCTP_I_FORWARD_TSN_CHUNK_ID 0xC2
102#define SCTP_IETF_EXT 0xFF
103
104#define IS_SCTP_CHUNK_TYPE(t) \
105 (((t) <= SCTP_NR_SACK_CHUNK_ID) || \
106 ((t) == SCTP_I_DATA_CHUNK_ID) || \
107 ((t) == SCTP_FORWARD_TSN_CHUNK_ID) || \
108 ((t) == SCTP_ASCONF_CHUNK_ID) || \
109 ((t) == SCTP_ASCONF_ACK_CHUNK_ID) || \
110 ((t) == SCTP_PKTDROP_CHUNK_ID))
111
112
113/*
114 * SCTP payload protocol IDs.
115 * From http://www.iana.org/assignments/sctp-parameters
116 * as of 2014/02/28
117 *
118 * Please do not put non-IANA-registered PPIDs here. Put them in the dissector
119 * using them instead (and consider registering them!).
120 */
121#define NOT_SPECIFIED_PROTOCOL_ID 0
122#define IUA_PAYLOAD_PROTOCOL_ID 1
123#define M2UA_PAYLOAD_PROTOCOL_ID 2
124#define M3UA_PAYLOAD_PROTOCOL_ID 3
125#define SUA_PAYLOAD_PROTOCOL_ID 4
126#define M2PA_PAYLOAD_PROTOCOL_ID 5
127#define V5UA_PAYLOAD_PROTOCOL_ID 6
128#define H248_PAYLOAD_PROTOCOL_ID 7
129#define BICC_PAYLOAD_PROTOCOL_ID 8
130#define TALI_PAYLOAD_PROTOCOL_ID 9
131#define DUA_PAYLOAD_PROTOCOL_ID 10
132#define ASAP_PAYLOAD_PROTOCOL_ID 11
133#define ENRP_PAYLOAD_PROTOCOL_ID 12
134#define H323_PAYLOAD_PROTOCOL_ID 13
135#define QIPC_PAYLOAD_PROTOCOL_ID 14
136#define SIMCO_PAYLOAD_PROTOCOL_ID 15
137#define DDP_SEG_CHUNK_PROTOCOL_ID 16
138#define DDP_STREAM_SES_CTRL_PROTOCOL_ID 17
139#define S1AP_PAYLOAD_PROTOCOL_ID 18
140#define RUA_PAYLOAD_PROTOCOL_ID 19
141#define HNBAP_PAYLOAD_PROTOCOL_ID 20
142#define FORCES_HP_PAYLOAD_PROTOCOL_ID 21
143#define FORCES_MP_PAYLOAD_PROTOCOL_ID 22
144#define FORCES_LP_PAYLOAD_PROTOCOL_ID 23
145#define SBC_AP_PAYLOAD_PROTOCOL_ID 24
146#define NBAP_PAYLOAD_PROTOCOL_ID 25
147/* Unassigned 26 */
148#define X2AP_PAYLOAD_PROTOCOL_ID 27
149#define IRCP_PAYLOAD_PROTOCOL_ID 28
150#define LCS_AP_PAYLOAD_PROTOCOL_ID 29
151#define MPICH2_PAYLOAD_PROTOCOL_ID 30
152#define SABP_PAYLOAD_PROTOCOL_ID 31
153#define FGP_PAYLOAD_PROTOCOL_ID 32
154#define PPP_PAYLOAD_PROTOCOL_ID 33
155#define CALCAPP_PAYLOAD_PROTOCOL_ID 34
156#define SSP_PAYLOAD_PROTOCOL_ID 35
157#define NPMP_CTRL_PAYLOAD_PROTOCOL_ID 36
158#define NPMP_DATA_PAYLOAD_PROTOCOL_ID 37
159#define ECHO_PAYLOAD_PROTOCOL_ID 38
160#define DISCARD_PAYLOAD_PROTOCOL_ID 39
161#define DAYTIME_PAYLOAD_PROTOCOL_ID 40
162#define CHARGEN_PAYLOAD_PROTOCOL_ID 41
163#define PROTO_3GPP_RNA_PROTOCOL_ID 42
164#define PROTO_3GPP_M2AP_PROTOCOL_ID 43
165#define PROTO_3GPP_M3AP_PROTOCOL_ID 44
166#define SSH_PAYLOAD_PROTOCOL_ID 45
167#define DIAMETER_PROTOCOL_ID 46
168#define DIAMETER_DTLS_PROTOCOL_ID 47
169#define R14P_BER_PROTOCOL_ID 48
170#define GDT_PROTOCOL_ID 49
171#define WEBRTC_DCEP_PROTOCOL_ID 50
172#define WEBRTC_STRING_PAYLOAD_PROTOCOL_ID 51
173#define WEBRTC_BINARY_PARTIAL_PAYLOAD_PROTOCOL_ID 52
174#define WEBRTC_BINARY_PAYLOAD_PROTOCOL_ID 53
175#define WEBRTC_STRING_PARTIAL_PAYLOAD_PROTOCOL_ID 54
176#define PROTO_3GPP_PUA_PAYLOAD_PROTOCOL_ID 55
177#define WEBRTC_STRING_EMPTY_PAYLOAD_PROTOCOL_ID 56
178#define WEBRTC_BINARY_EMPTY_PAYLOAD_PROTOCOL_ID 57
179#define XWAP_PROTOCOL_ID 58
180#define XW_CONTROL_PLANE_PROTOCOL_ID 59
181#define NGAP_PROTOCOL_ID 60
182#define XNAP_PROTOCOL_ID 61
183#define F1AP_PROTOCOL_ID 62
184#define HTTP_SCTP_PROTOCOL_ID 63
185#define E1AP_PROTOCOL_ID 64
186#define ELE2_PROTOCOL_ID 65
187#define NGAP_OVER_DTLS_PROTOCOL_ID 66
188#define XNAP_OVER_DTLS_PROTOCOL_ID 67
189#define F1AP_OVER_DTLS_PROTOCOL_ID 68
190#define E1AP_OVER_DTLS_PROTOCOL_ID 69
191#define E2_CP_PROTOCOL_ID 70
192#define E2_UP_PROTOCOL_ID 71
193#define E2_DU_PROTOCOL_ID 72
194#define W1AP_PROTOCOL_ID 73
195#define DTLS_CHUNK_KM_MESSAGES_PAYLOAD_PROTOCOL_ID 4242
196
197WS_DLL_PUBLIC value_string_ext sctpppid_val_ext;
198
199#ifdef __cplusplus
200}
201#endif /* __cplusplus */
202
203#endif
204
205/*
206 * Editor modelines - https://www.wireshark.org/tools/modelines.html
207 *
208 * Local Variables:
209 * c-basic-offset: 2
210 * tab-width: 8
211 * indent-tabs-mode: nil
212 * End:
213 *
214 * vi: set shiftwidth=2 tabstop=8 expandtab:
215 * :indentSize=2:tabSize=8:noTabs=true:
216 */
struct _address address
Holds a network or link-layer address of any supported type.
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