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