change a whole bunch of ethereal into wireshark
[obnox/wireshark/wip.git] / epan / dissectors / packet-t38.h
1 /* packet-t38.h
2  *
3  * Routines for T38 dissection
4  * 2003 Hans Viens
5  * 2004 Alejandro Vaquero, add support to conversation
6  *
7  * $Id$
8  *
9  * Wireshark - Network traffic analyzer
10  * By Gerald Combs <gerald@wireshark.org>
11  * Copyright 1998 Gerald Combs
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 #define MAX_T38_DATA_ITEMS 4
29 #define MAX_T38_DESC 128
30
31 typedef struct _t38_packet_info {
32         guint16 seq_num;        /* UDPTLPacket sequence number */
33         guint32 type_msg;       /* 0=t30-indicator    1=data */
34         guint32 t30ind_value;
35         guint32 data_value;     /* standard and speed */
36         guint32 setup_frame_number;
37         guint32 Data_Field_field_type_value;
38         guint8  t30_Facsimile_Control;
39         gchar   desc[MAX_T38_DESC]; /* Description used to be displayed in the frame label Graph Anlaysis */
40         gchar   desc_comment[MAX_T38_DESC]; /* Description used to be displayed in the Comment Graph Anlaysis */
41         double time_first_t4_data; 
42         guint32 frame_num_first_t4_data;
43 } t38_packet_info;
44
45
46 #define MAX_T38_SETUP_METHOD_SIZE 7
47
48
49 /* Info to save the State to reassemble Data (e.g. HDLC) and the Setup (e.g. SDP) in T38 conversations */
50 typedef struct _t38_conv_info
51 {
52         guint32 reass_ID;
53         int reass_start_seqnum;
54         guint32 reass_data_type;
55         gint32 last_seqnum; /* used to avoid duplicated seq num shown in the Graph Analysis */
56         guint32 packet_lost;
57         guint32 burst_lost;
58         double time_first_t4_data; 
59 } t38_conv_info;
60
61 /* Info to save the State to reassemble Data (e.g. HDLC) and the Setup (e.g. SDP) in T38 conversations */
62 typedef struct _t38_conv
63 {
64         gchar   setup_method[MAX_T38_SETUP_METHOD_SIZE + 1];
65         guint32 setup_frame_number;
66         t38_conv_info src_t38_info;
67         t38_conv_info dst_t38_info;
68 } t38_conv;
69
70 /* Add an T38 conversation with the given details */
71 void t38_add_address(packet_info *pinfo,
72                      address *addr, int port,
73                      int other_port,
74                      const gchar *setup_method, guint32 setup_frame_number);
75
76 ETH_VAR_IMPORT const value_string t30_indicator_vals[];
77 ETH_VAR_IMPORT const value_string t30_facsimile_control_field_vals[];
78 ETH_VAR_IMPORT const value_string t30_facsimile_control_field_vals_short[];
79 ETH_VAR_IMPORT const value_string t30_data_vals[];
80
81
82