Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

voip_calls.h
Go to the documentation of this file.
1 /* voip_calls.h
2 * VoIP calls summary addition for Wireshark
3 *
4 * Copyright 2004, Ericsson , Spain
5 * By Francisco Alcoba <francisco.alcoba@ericsson.com>
6 *
7 * based on h323_calls.h
8 * Copyright 2004, Iskratel, Ltd, Kranj
9 * By Miha Jemec <m.jemec@iskratel.si>
10 *
11 * H323, RTP and Graph Support
12 * By Alejandro Vaquero, alejandro.vaquero@verso.com
13 * Copyright 2005, Verso Technologies Inc.
14 *
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
18 *
19 * SPDX-License-Identifier: GPL-2.0-or-later
20 */
21
22 #ifndef __VOIP_CALLS_H__
23 #define __VOIP_CALLS_H__
24
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 #include <glib.h>
35 #include <stdio.h>
36
37 #include "epan/address.h"
38 #include "epan/packet.h"
39 #include "epan/guid-utils.h"
40 #include "epan/tap.h"
41 #include "epan/tap-voip.h"
42 #include "epan/sequence_analysis.h"
43
44 /****************************************************************************/
45 extern const char *voip_call_state_name[8];
46
47 typedef enum _voip_protocol {
48 VOIP_SIP,
49 VOIP_ISUP,
50 VOIP_H323,
51 VOIP_MGCP,
52 VOIP_AC_ISDN,
53 VOIP_AC_CAS,
54 MEDIA_T38,
55 TEL_H248,
56 TEL_SCCP,
57 TEL_BSSMAP,
58 TEL_RANAP,
59 VOIP_UNISTIM,
60 VOIP_SKINNY,
61 VOIP_IAX2,
62 VOIP_COMMON
63 } voip_protocol;
64
65 typedef enum _hash_indexes {
66 SIP_HASH=0
67 } hash_indexes;
68
69 extern const char *voip_protocol_name[];
70
71 typedef enum _flow_show_options
72 {
73 FLOW_ALL,
74 FLOW_ONLY_INVITES
75 } flow_show_options;
76
79 typedef enum _sip_call_state {
80 SIP_INVITE_SENT,
81 SIP_200_REC,
82 SIP_CANCEL_SENT
83 } sip_call_state;
84
85 typedef struct _sip_calls_info {
86 gchar *call_identifier;
87 guint32 invite_cseq;
88 sip_call_state sip_state;
89 } sip_calls_info_t;
90
92 typedef struct _isup_calls_info {
93 guint16 cic;
94 guint32 opc, dpc;
95 guint8 ni;
96 } isup_calls_info_t;
97
98 /* defines specific H245 data */
99 typedef struct _h245_address {
100 address h245_address;
101 guint16 h245_port;
102 } h245_address_t;
103
105 typedef struct _h323_calls_info {
106 e_guid_t *guid; /* Call ID to identify a H225 */
107 GList* h245_list;
108 address h225SetupAddr;
109 gboolean is_h245;
110 gboolean is_faststart_Setup;
111 gboolean is_faststart_Proc;
112 gboolean is_h245Tunneling;
113 gint32 q931_crv;
114 gint32 q931_crv2;
115 guint requestSeqNum;
116 } h323_calls_info_t;
117
119 typedef struct _mgcp_calls_info {
120 gchar *endpointId;
121 gboolean fromEndpoint;
122 } mgcp_calls_info_t;
123
125 typedef struct _actrace_isdn_calls_info {
126 gint32 crv;
127 int trunk;
128 } actrace_isdn_calls_info_t;
129
131 typedef struct _actrace_cas_calls_info {
132 gint32 bchannel;
133 int trunk;
134 } actrace_cas_calls_info_t;
135
137 typedef struct _skinny_calls_info {
138 guint32 callId;
139 } skinny_calls_info_t;
140
142 typedef struct _voip_calls_info {
143 voip_call_state call_state;
144 voip_call_active_state call_active_state;
145 gchar *call_id;
146 gchar *from_identity;
147 gchar *to_identity;
148 gpointer prot_info;
149 void (*free_prot_info)(gpointer);
150 address initial_speaker;
151 guint32 npackets;
152 voip_protocol protocol;
153 gchar *protocol_name;
154 gchar *call_comment;
155 guint16 call_num;
157 frame_data *start_fd;
158 nstime_t start_rel_ts;
159 frame_data *stop_fd;
160 nstime_t stop_rel_ts;
161 } voip_calls_info_t;
162
165 /* struct holding all information of the tap */
166 /*
167 * XXX Most of these are private to voip_calls.c. We might want to
168 * make them private.
169 */
170 struct _h245_labels;
171 typedef struct _voip_calls_tapinfo {
172 tap_reset_cb tap_reset;
173 tap_packet_cb tap_packet;
174 tap_draw_cb tap_draw;
175 void *tap_data;
176 int ncalls;
177 GQueue* callsinfos;
178 GHashTable* callsinfo_hashtable[1];
179 int npackets;
180 voip_calls_info_t *filter_calls_fwd;
181 int start_packets;
182 int completed_calls;
183 int rejected_calls;
184 seq_analysis_info_t *graph_analysis;
185 epan_t *session;
186 int nrtp_streams;
187 GList* rtp_stream_list;
188 guint32 rtp_evt_frame_num;
189 guint8 rtp_evt;
190 gboolean rtp_evt_end;
191 gchar *sdp_summary;
192 guint32 sdp_frame_num;
193 guint32 mtp3_opc;
194 guint32 mtp3_dpc;
195 guint8 mtp3_ni;
196 guint32 mtp3_frame_num;
197 struct _h245_labels *h245_labels;
198 gchar *q931_calling_number;
199 gchar *q931_called_number;
200 guint8 q931_cause_value;
201 gint32 q931_crv;
202 guint32 q931_frame_num;
203 guint32 h225_frame_num;
204 guint16 h225_call_num;
205 int h225_cstype; /* XXX actually an enum */
206 gboolean h225_is_faststart;
207 guint32 sip_frame_num;
208 guint32 actrace_frame_num;
209 gint32 actrace_trunk;
210 gint32 actrace_direction;
211 flow_show_options fs_option;
212 guint32 redraw;
213 } voip_calls_tapinfo_t;
214
215 #if 0
216 #define VOIP_CALLS_DEBUG(...) { \
217 char *VOIP_CALLS_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
218 g_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \
219 g_free(VOIP_CALLS_DEBUG_MSG); \
220 }
221 #else
222 #define VOIP_CALLS_DEBUG(...)
223 #endif
224
225 /****************************************************************************/
226 /* INTERFACE */
227
235 void voip_calls_init_all_taps(voip_calls_tapinfo_t *tap_id_base);
236
241 void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base);
242
246 void voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo);
247
248 #ifdef __cplusplus
249 }
250 #endif /* __cplusplus */
251
252 #endif /* __VOIP_CALLS_H__ */
253
254 /*
255 * Editor modelines - https://www.wireshark.org/tools/modelines.html
256 *
257 * Local Variables:
258 * c-basic-offset: 4
259 * tab-width: 8
260 * indent-tabs-mode: nil
261 * End:
262 *
263 * ex: set shiftwidth=4 tabstop=8 expandtab:
264 * :indentSize=4:tabSize=8:noTabs=true:
265 */
_voip_calls_tapinfo::filter_calls_fwd
voip_calls_info_t * filter_calls_fwd
Definition: voip_calls.h:180
_voip_calls_info
Definition: voip_calls.h:142
_mgcp_calls_info::fromEndpoint
gboolean fromEndpoint
Definition: voip_calls.h:121
voip_calls_reset_all_taps
void voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
Definition: voip_calls.c:259
_voip_calls_info::start_fd
frame_data * start_fd
Definition: voip_calls.h:157
_voip_calls_tapinfo
Definition: voip_calls.h:171
_voip_calls_tapinfo::session
epan_t * session
Definition: voip_calls.h:185
actrace_isdn_calls_info_t
struct _actrace_isdn_calls_info actrace_isdn_calls_info_t
_h323_calls_info::is_faststart_Setup
gboolean is_faststart_Setup
Definition: voip_calls.h:110
_seq_analysis_info
Definition: sequence_analysis.h:58
isup_calls_info_t
struct _isup_calls_info isup_calls_info_t
_h323_calls_info
Definition: voip_calls.h:105
_voip_calls_tapinfo::nrtp_streams
int nrtp_streams
Definition: voip_calls.h:186
_voip_calls_tapinfo::rtp_stream_list
GList * rtp_stream_list
Definition: voip_calls.h:187
voip_calls_info_t
struct _voip_calls_info voip_calls_info_t
nstime_t
Definition: nstime.h:27
_skinny_calls_info
Definition: voip_calls.h:137
actrace_cas_calls_info_t
struct _actrace_cas_calls_info actrace_cas_calls_info_t
_sip_call_state
_sip_call_state
Definition: voip_calls.h:79
_h323_calls_info::h225SetupAddr
address h225SetupAddr
Definition: voip_calls.h:108
h323_calls_info_t
struct _h323_calls_info h323_calls_info_t
sip_call_state
enum _sip_call_state sip_call_state
_e_guid_t
Definition: guid-utils.h:21
_voip_calls_tapinfo::tap_packet
tap_packet_cb tap_packet
Definition: voip_calls.h:173
_voip_calls_tapinfo::tap_draw
tap_draw_cb tap_draw
Definition: voip_calls.h:174
voip_calls_remove_all_tap_listeners
void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base)
Definition: voip_calls.c:229
_frame_data
Definition: frame_data.h:53
_voip_calls_tapinfo::npackets
int npackets
Definition: voip_calls.h:179
_mgcp_calls_info
Definition: voip_calls.h:119
_voip_calls_tapinfo::tap_data
void * tap_data
Definition: voip_calls.h:175
_h323_calls_info::h245_list
GList * h245_list
Definition: voip_calls.h:107
_actrace_isdn_calls_info
Definition: voip_calls.h:125
_h323_calls_info::is_faststart_Proc
gboolean is_faststart_Proc
Definition: voip_calls.h:111
_h245_labels
Definition: voip_calls.c:157
voip_calls_init_all_taps
void voip_calls_init_all_taps(voip_calls_tapinfo_t *tap_id_base)
Definition: voip_calls.c:183
_voip_calls_tapinfo::callsinfos
GQueue * callsinfos
Definition: voip_calls.h:177
_actrace_cas_calls_info
Definition: voip_calls.h:131
_voip_calls_tapinfo::tap_reset
tap_reset_cb tap_reset
Definition: voip_calls.h:172
_h245_address
Definition: voip_calls.h:99
_voip_calls_tapinfo::h245_labels
struct _h245_labels * h245_labels
Definition: voip_calls.h:197
_voip_calls_tapinfo::ncalls
int ncalls
Definition: voip_calls.h:176
_sip_calls_info
Definition: voip_calls.h:85
_address
Definition: address.h:47
skinny_calls_info_t
struct _skinny_calls_info skinny_calls_info_t
epan_session
Definition: epan.c:348
_isup_calls_info
Definition: voip_calls.h:92