2005-02-01 12:12:35 +00:00
|
|
|
/* voip_calls.h
|
2006-05-22 07:29:40 +00:00
|
|
|
* VoIP calls summary addition for Wireshark
|
2005-02-01 12:12:35 +00:00
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright 2004, Ericsson , Spain
|
|
|
|
* By Francisco Alcoba <francisco.alcoba@ericsson.com>
|
|
|
|
*
|
|
|
|
* based on h323_calls.h
|
|
|
|
* Copyright 2004, Iskratel, Ltd, Kranj
|
|
|
|
* By Miha Jemec <m.jemec@iskratel.si>
|
|
|
|
*
|
|
|
|
* H323, RTP and Graph Support
|
|
|
|
* By Alejandro Vaquero, alejandro.vaquero@verso.com
|
|
|
|
* Copyright 2005, Verso Technologies Inc.
|
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-02-01 12:12:35 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VOIP_CALLS_H_INCLUDED
|
|
|
|
#define VOIP_CALLS_H_INCLUDED
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <stdio.h>
|
2005-02-05 11:07:21 +00:00
|
|
|
#include <epan/address.h>
|
2006-03-19 20:45:45 +00:00
|
|
|
#include <epan/guid-utils.h>
|
2007-10-24 08:30:46 +00:00
|
|
|
#include <epan/tap-voip.h>
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
/****************************************************************************/
|
2007-03-21 00:59:00 +00:00
|
|
|
extern const char *voip_call_state_name[8];
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
typedef enum _voip_protocol {
|
|
|
|
VOIP_SIP,
|
|
|
|
VOIP_ISUP,
|
2005-02-20 15:53:11 +00:00
|
|
|
VOIP_H323,
|
2005-06-27 06:20:23 +00:00
|
|
|
VOIP_MGCP,
|
|
|
|
VOIP_AC_ISDN,
|
2006-01-15 15:01:14 +00:00
|
|
|
VOIP_AC_CAS,
|
2007-03-18 22:14:12 +00:00
|
|
|
MEDIA_T38,
|
|
|
|
TEL_H248,
|
2007-03-21 00:59:00 +00:00
|
|
|
TEL_SCCP,
|
|
|
|
TEL_BSSMAP,
|
2007-09-10 07:21:27 +00:00
|
|
|
TEL_RANAP,
|
2007-10-24 08:30:46 +00:00
|
|
|
VOIP_UNISTIM,
|
|
|
|
VOIP_COMMON
|
2005-02-01 12:12:35 +00:00
|
|
|
} voip_protocol;
|
|
|
|
|
2007-03-18 22:14:12 +00:00
|
|
|
extern const char *voip_protocol_name[];
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
/* defines specific SIP data */
|
|
|
|
|
|
|
|
typedef enum _sip_call_state {
|
|
|
|
SIP_INVITE_SENT,
|
|
|
|
SIP_200_REC,
|
|
|
|
SIP_CANCEL_SENT
|
|
|
|
} sip_call_state;
|
|
|
|
|
|
|
|
typedef struct _sip_calls_info {
|
|
|
|
gchar *call_identifier;
|
|
|
|
guint32 invite_cseq;
|
|
|
|
sip_call_state sip_state;
|
|
|
|
} sip_calls_info_t;
|
|
|
|
|
|
|
|
/* defines specific ISUP data */
|
|
|
|
typedef struct _isup_calls_info {
|
|
|
|
guint16 cic;
|
|
|
|
guint32 opc, dpc;
|
|
|
|
guint8 ni;
|
|
|
|
} isup_calls_info_t;
|
|
|
|
|
2005-02-20 15:53:11 +00:00
|
|
|
/* defines specific H245 data */
|
2005-02-01 12:12:35 +00:00
|
|
|
typedef struct _h245_address {
|
2005-02-24 21:31:20 +00:00
|
|
|
address h245_address;
|
2005-02-01 12:12:35 +00:00
|
|
|
guint16 h245_port;
|
|
|
|
} h245_address_t;
|
|
|
|
|
|
|
|
/* defines specific H323 data */
|
|
|
|
typedef struct _h323_calls_info {
|
2006-03-19 20:45:45 +00:00
|
|
|
e_guid_t *guid; /* Call ID to identify a H225 */
|
2005-02-01 12:12:35 +00:00
|
|
|
GList* h245_list; /* list of H245 Address and ports for tunneling off calls*/
|
2005-02-24 21:31:20 +00:00
|
|
|
address h225SetupAddr; /* we use the SETUP H225 IP to determine if packets are forward or reverse */
|
2005-02-01 12:12:35 +00:00
|
|
|
gboolean is_h245;
|
|
|
|
gboolean is_faststart_Setup; /* if faststart field is included in Setup*/
|
|
|
|
gboolean is_faststart_Proc; /* if faststart field is included in Proce, Alerting, Progress or Connect*/
|
|
|
|
gboolean is_h245Tunneling;
|
|
|
|
gint32 q931_crv;
|
|
|
|
gint32 q931_crv2;
|
2005-02-07 08:56:39 +00:00
|
|
|
guint requestSeqNum;
|
2005-02-01 12:12:35 +00:00
|
|
|
} h323_calls_info_t;
|
|
|
|
|
2005-02-20 15:53:11 +00:00
|
|
|
/* defines specific MGCP data */
|
|
|
|
typedef struct _mgcp_calls_info {
|
|
|
|
gchar *endpointId;
|
|
|
|
gboolean fromEndpoint; /* true if the call was originated from the Endpoint, false for calls from MGC */
|
|
|
|
} mgcp_calls_info_t;
|
|
|
|
|
2005-06-27 06:20:23 +00:00
|
|
|
/* defines specific ACTRACE ISDN data */
|
|
|
|
typedef struct _actrace_isdn_calls_info {
|
|
|
|
gint32 crv;
|
|
|
|
int trunk;
|
|
|
|
} actrace_isdn_calls_info_t;
|
|
|
|
|
|
|
|
/* defines specific ACTRACE CAS data */
|
|
|
|
typedef struct _actrace_cas_calls_info {
|
|
|
|
gint32 bchannel;
|
|
|
|
int trunk;
|
|
|
|
} actrace_cas_calls_info_t;
|
2005-02-20 15:53:11 +00:00
|
|
|
|
2005-02-01 12:12:35 +00:00
|
|
|
/* defines a voip call */
|
|
|
|
typedef struct _voip_calls_info {
|
|
|
|
voip_call_state call_state;
|
|
|
|
voip_call_active_state call_active_state;
|
2007-10-24 08:30:46 +00:00
|
|
|
gchar *call_id;
|
2005-02-01 12:12:35 +00:00
|
|
|
gchar *from_identity;
|
|
|
|
gchar *to_identity;
|
|
|
|
gpointer prot_info;
|
2007-03-18 22:14:12 +00:00
|
|
|
void(*free_prot_info)(gpointer);
|
2005-02-24 21:31:20 +00:00
|
|
|
address initial_speaker;
|
2005-02-01 12:12:35 +00:00
|
|
|
guint32 npackets;
|
|
|
|
guint32 first_frame_num; /* frame number of first frame */
|
|
|
|
guint32 last_frame_num;
|
|
|
|
voip_protocol protocol;
|
2007-10-24 08:30:46 +00:00
|
|
|
gchar *protocol_name;
|
|
|
|
gchar *call_comment;
|
2005-02-01 12:12:35 +00:00
|
|
|
guint16 call_num;
|
|
|
|
gint32 start_sec, start_usec, stop_sec, stop_usec;
|
|
|
|
gboolean selected;
|
|
|
|
|
|
|
|
} voip_calls_info_t;
|
|
|
|
|
|
|
|
/* structure that holds the information about all detected calls */
|
|
|
|
/* struct holding all information of the tap */
|
|
|
|
|
|
|
|
typedef struct _voip_calls_tapinfo {
|
2005-02-07 08:56:39 +00:00
|
|
|
int ncalls; /* number of call */
|
2008-01-09 08:34:58 +00:00
|
|
|
GList* callsinfo_list; /* list with all calls */
|
2005-02-01 12:12:35 +00:00
|
|
|
int npackets; /* total number of packets of all calls */
|
|
|
|
voip_calls_info_t* filter_calls_fwd; /* used as filter in some tap modes */
|
|
|
|
guint32 launch_count; /* number of times the tap has been run */
|
|
|
|
int start_packets;
|
|
|
|
int completed_calls;
|
|
|
|
int rejected_calls;
|
|
|
|
graph_analysis_info_t* graph_analysis;
|
From Alejandro Vaquero
- avoid the clist of the calls dlg to be refreshed multiple times when
first appear.
- destroy the Graph window when the data is not valid anymore.
- fixes an H245 packet count error
- resizing the Graph windows when is displayed (up to 5 columns).
With a change to leave static voip_calls_tapinfo_t the_tapinfo_struct =
{0, NULL, 0, NULL, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0};
alone.
svn path=/trunk/; revision=14852
2005-07-05 05:16:28 +00:00
|
|
|
gboolean redraw;
|
2005-02-02 01:02:09 +00:00
|
|
|
/*
|
|
|
|
* Now add dummy variables, one for each tap listener.
|
|
|
|
* Their address will be used to distinguish between them.
|
|
|
|
*/
|
|
|
|
int sip_dummy;
|
|
|
|
int sdp_dummy;
|
|
|
|
int h225_dummy;
|
|
|
|
int h245dg_dummy;
|
|
|
|
int mtp3_dummy;
|
2007-03-18 23:16:54 +00:00
|
|
|
int m3ua_dummy;
|
2005-02-02 01:02:09 +00:00
|
|
|
int isup_dummy;
|
|
|
|
int q931_dummy;
|
2005-02-20 15:53:11 +00:00
|
|
|
int mgcp_dummy;
|
2005-06-27 06:20:23 +00:00
|
|
|
int actrace_dummy;
|
2006-01-15 15:01:14 +00:00
|
|
|
int t38_dummy;
|
2007-03-18 22:14:12 +00:00
|
|
|
int h248_dummy;
|
2007-03-21 00:59:00 +00:00
|
|
|
int sccp_dummy;
|
2007-03-22 22:59:20 +00:00
|
|
|
int sua_dummy;
|
2007-03-26 21:12:24 +00:00
|
|
|
int megaco_dummy;
|
2007-09-10 07:21:27 +00:00
|
|
|
int unistim_dummy;
|
2007-10-24 08:30:46 +00:00
|
|
|
int voip_dummy;
|
2005-02-01 12:12:35 +00:00
|
|
|
} voip_calls_tapinfo_t;
|
|
|
|
|
|
|
|
|
2005-02-05 11:07:21 +00:00
|
|
|
/* defines a RTP stream */
|
|
|
|
typedef struct _voip_rtp_stream_info {
|
|
|
|
address src_addr;
|
|
|
|
guint16 src_port;
|
|
|
|
address dest_addr;
|
|
|
|
guint16 dest_port;
|
|
|
|
guint32 ssrc;
|
2005-03-27 20:54:18 +00:00
|
|
|
guint32 pt;
|
|
|
|
gchar *pt_str;
|
2007-11-02 07:43:49 +00:00
|
|
|
gboolean is_srtp;
|
2005-02-05 11:07:21 +00:00
|
|
|
guint32 npackets;
|
2005-03-07 19:10:21 +00:00
|
|
|
gboolean end_stream;
|
2005-02-05 11:07:21 +00:00
|
|
|
|
|
|
|
guint32 first_frame_num; /* frame number of first frame */
|
|
|
|
guint32 setup_frame_number; /* frame number of setup message */
|
|
|
|
/* start of recording (GMT) of this stream */
|
|
|
|
guint32 start_rel_sec; /* start stream rel seconds */
|
|
|
|
guint32 start_rel_usec; /* start stream rel microseconds */
|
|
|
|
guint32 stop_rel_sec; /* stop stream rel seconds */
|
|
|
|
guint32 stop_rel_usec; /* stop stream rel microseconds */
|
2005-03-10 19:32:22 +00:00
|
|
|
gint32 rtp_event;
|
2005-02-05 11:07:21 +00:00
|
|
|
} voip_rtp_stream_info_t;
|
|
|
|
|
|
|
|
/* structure that holds the information about all RTP streams associated with the calls */
|
|
|
|
/* struct holding all information of the RTP tap */
|
|
|
|
typedef struct _voip_rtp_tapinfo {
|
|
|
|
int nstreams; /* number of rtp streams */
|
|
|
|
GList* list; /* list with the rtp streams */
|
|
|
|
int rtp_dummy;
|
2005-03-10 19:32:22 +00:00
|
|
|
int rtp_event_dummy;
|
2005-02-05 11:07:21 +00:00
|
|
|
} voip_rtp_tapinfo_t;
|
|
|
|
|
2005-02-01 12:12:35 +00:00
|
|
|
/****************************************************************************/
|
|
|
|
/* INTERFACE */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Registers the voip_calls tap listeners (if not already done).
|
|
|
|
* From that point on, the calls list will be updated with every redissection.
|
|
|
|
* This function is also the entry point for the initialization routine of the tap system.
|
2006-05-28 17:19:08 +00:00
|
|
|
* So whenever voip_calls.c is added to the list of WIRESHARK_TAP_SRCs, the tap will be registered on startup.
|
2005-02-01 12:12:35 +00:00
|
|
|
* If not, it will be registered on demand by the voip_calls functions that need it.
|
|
|
|
*/
|
|
|
|
void sip_calls_init_tap(void);
|
|
|
|
void isup_calls_init_tap(void);
|
|
|
|
void mtp3_calls_init_tap(void);
|
|
|
|
void h225_calls_init_tap(void);
|
|
|
|
void h245dg_calls_init_tap(void);
|
|
|
|
void q931_calls_init_tap(void);
|
|
|
|
void sdp_calls_init_tap(void);
|
2005-02-05 11:07:21 +00:00
|
|
|
void rtp_init_tap(void);
|
2005-03-10 21:47:35 +00:00
|
|
|
void rtp_event_init_tap(void);
|
2005-02-20 15:53:11 +00:00
|
|
|
void mgcp_calls_init_tap(void);
|
2005-06-27 06:20:23 +00:00
|
|
|
void actrace_calls_init_tap(void);
|
2006-01-15 15:01:14 +00:00
|
|
|
void t38_init_tap(void);
|
2007-03-18 22:14:12 +00:00
|
|
|
void h248_calls_init_tap(void);
|
2007-03-21 00:59:00 +00:00
|
|
|
void sccp_calls_init_tap(void);
|
2007-09-10 07:21:27 +00:00
|
|
|
void unistim_calls_init_tap(void);
|
2007-10-24 08:30:46 +00:00
|
|
|
void VoIPcalls_init_tap(void);
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Removes the voip_calls tap listener (if not already done)
|
|
|
|
* From that point on, the voip calls list won't be updated any more.
|
|
|
|
*/
|
|
|
|
void remove_tap_listener_sip_calls(void);
|
|
|
|
void remove_tap_listener_isup_calls(void);
|
|
|
|
void remove_tap_listener_mtp3_calls(void);
|
|
|
|
void remove_tap_listener_h225_calls(void);
|
|
|
|
void remove_tap_listener_h245dg_calls(void);
|
|
|
|
void remove_tap_listener_q931_calls(void);
|
|
|
|
void remove_tap_listener_sdp_calls(void);
|
2005-02-05 11:07:21 +00:00
|
|
|
void remove_tap_listener_rtp(void);
|
2005-03-10 19:32:22 +00:00
|
|
|
void remove_tap_listener_rtp_event(void);
|
2005-02-20 15:53:11 +00:00
|
|
|
void remove_tap_listener_mgcp_calls(void);
|
2005-06-27 06:20:23 +00:00
|
|
|
void remove_tap_listener_actrace_calls(void);
|
2006-01-15 15:01:14 +00:00
|
|
|
void remove_tap_listener_t38(void);
|
2007-03-18 22:14:12 +00:00
|
|
|
void remove_tap_listener_h248_calls(void);
|
2007-03-21 00:59:00 +00:00
|
|
|
void remove_tap_listener_sccp_calls(void);
|
2007-09-10 07:21:27 +00:00
|
|
|
void remove_tap_listener_unistim_calls(void);
|
2007-10-24 08:30:46 +00:00
|
|
|
void remove_tap_listener_voip_calls(void);
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Retrieves a constant reference to the unique info structure of the voip_calls tap listener.
|
|
|
|
* The user should not modify the data pointed to.
|
|
|
|
*/
|
From Alejandro Vaquero
- avoid the clist of the calls dlg to be refreshed multiple times when
first appear.
- destroy the Graph window when the data is not valid anymore.
- fixes an H245 packet count error
- resizing the Graph windows when is displayed (up to 5 columns).
With a change to leave static voip_calls_tapinfo_t the_tapinfo_struct =
{0, NULL, 0, NULL, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0};
alone.
svn path=/trunk/; revision=14852
2005-07-05 05:16:28 +00:00
|
|
|
voip_calls_tapinfo_t* voip_calls_get_info(void);
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Cleans up memory of voip calls tap.
|
|
|
|
*/
|
|
|
|
void voip_calls_reset(voip_calls_tapinfo_t *tapinfo);
|
|
|
|
void isup_calls_reset(voip_calls_tapinfo_t *tapinfo);
|
|
|
|
void mtp3_calls_reset(voip_calls_tapinfo_t *tapinfo);
|
|
|
|
void q931_calls_reset(voip_calls_tapinfo_t *tapinfo);
|
|
|
|
|
2005-02-02 09:08:42 +00:00
|
|
|
void graph_analysis_data_init(void);
|
2005-02-01 12:12:35 +00:00
|
|
|
|
|
|
|
#endif /*VOIP_CALLS_H_INCLUDED*/
|