Add dissector for CP "Cooper" 2179 Protocol
[metze/wireshark/wip.git] / epan / dissectors / packet-sctp.h
1 /* packet-sctp.h
2  *
3  * Defintion 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 <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #ifndef __PACKET_SCTP_H__
27 #define __PACKET_SCTP_H__
28
29 #define MAXIMUM_NUMBER_OF_TVBS 2048
30
31 struct _sctp_info {
32   gboolean incomplete;
33   gboolean adler32_calculated;
34   gboolean adler32_correct;
35   gboolean crc32c_calculated;
36   gboolean crc32c_correct;
37   gboolean checksum_zero;
38   gboolean vtag_reflected;
39   guint16 sport;
40   guint16 dport;
41   address ip_src;
42   address ip_dst;
43   guint32 verification_tag;
44   guint16 assoc_index;
45   guint16 direction;
46   guint32 number_of_tvbs;
47   tvbuff_t *tvb[MAXIMUM_NUMBER_OF_TVBS];
48 };
49
50 typedef struct _sctp_fragment {
51   guint32 frame_num;
52   guint32 tsn;
53   guint32 len;
54   unsigned char *data;
55   struct _sctp_fragment *next;
56 } sctp_fragment;
57
58 typedef struct _sctp_frag_be {
59   sctp_fragment* fragment;
60   struct _sctp_frag_be *next;
61 } sctp_frag_be;
62
63 typedef struct _sctp_complete_msg {
64   guint32 begin;
65   guint32 end;
66   sctp_fragment* reassembled_in;
67   guint32 len;
68   unsigned char *data;
69   struct _sctp_complete_msg *next;
70 } sctp_complete_msg;
71
72 typedef struct _sctp_frag_msg {
73   sctp_frag_be* begins;
74   sctp_frag_be* ends;
75   sctp_fragment* fragments;
76   sctp_complete_msg* messages;
77   struct _sctp_frag_msg* next;
78 } sctp_frag_msg;
79
80
81 #endif