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