Wireshark 4.5.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
111WS_DLL_PUBLIC const value_string chunk_type_values[];
112
113#ifdef __cplusplus
114}
115#endif /* __cplusplus */
116
117#endif
118
119/*
120 * Editor modelines - https://www.wireshark.org/tools/modelines.html
121 *
122 * Local Variables:
123 * c-basic-offset: 2
124 * tab-width: 8
125 * indent-tabs-mode: nil
126 * End:
127 *
128 * vi: set shiftwidth=2 tabstop=8 expandtab:
129 * :indentSize=2:tabSize=8:noTabs=true:
130 */
Definition address.h:56
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
Definition value_string.h:25
Definition tvbuff-int.h:35