#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-
#include <string.h>
#include <ctype.h>
-#include "register.h"
-
-#include "graph_analysis.h"
-#include "voip_calls_dlg.h"
-#include "voip_calls.h"
+#include "gtk/gtk.h"
-#include "globals.h"
+#include <epan/epan.h>
+#include <epan/packet.h>
#include "epan/filesystem.h"
-
#include <epan/tap.h>
#include <epan/stat_cmd_args.h>
+#include <epan/to_str.h>
+#include <epan/address.h>
+#include <epan/addr_resolv.h>
+#include <epan/dissectors/packet-h248.h>
+
+#include "../register.h"
+#include "../globals.h"
#include "../stat_menu.h"
-#include "gui_stat_menu.h"
-#include "dlg_utils.h"
-#include "gui_utils.h"
-#include "gtkglobals.h"
+
+#include "gtk/graph_analysis.h"
+#include "gtk/voip_calls_dlg.h"
+#include "gtk/voip_calls.h"
+#include "gtk/gui_stat_menu.h"
+#include "gtk/dlg_utils.h"
+#include "gtk/gui_utils.h"
+#include "gtk/gtkglobals.h"
#include "image/clist_ascend.xpm"
#include "image/clist_descend.xpm"
#include "simple_dialog.h"
-#include <epan/to_str.h>
-
-#include <epan/address.h>
-#include <epan/addr_resolv.h>
-#include <epan/dissectors/packet-h248.h>
-
#ifdef HAVE_LIBPORTAUDIO
-#include "rtp_analysis.h"
-#include "rtp_player.h"
+#include "gtk/rtp_analysis.h"
+#include "gtk/rtp_player.h"
#endif /* HAVE_LIBPORTAUDIO */
#define CALL_COL_COMMENTS 8
static const GdkColor COLOR_SELECT = {0, 0x00ff, 0x80ff, 0x80ff};
static const GdkColor COLOR_DEFAULT = {0, 0xffff, 0xffff, 0xffff};
+static const GdkColor COLOR_FOREGROUND = {0, 0x0000, 0x0000, 0x0000};
/****************************************************************************/
/* append a line to clist */
isup_calls_info_t *tmp_isupinfo;
h323_calls_info_t *tmp_h323info;
gboolean tmp_bool = FALSE;
- GdkColor color = COLOR_SELECT;
+ GdkColor bg_color = COLOR_SELECT;
+ GdkColor fg_color = COLOR_FOREGROUND;
for (c=0;c<NUM_COLS;c++){
data[c]=&field[c][0];
}
/* set the background color if selected */
if (strinfo->selected) {
calls_ns++;
- gtk_clist_set_background(GTK_CLIST(clist), added_row, &color);
+ gtk_clist_set_background(GTK_CLIST(clist), added_row, &bg_color);
+ gtk_clist_set_foreground(GTK_CLIST(clist), added_row, &fg_color);
}
/* set data pointer of last row to point to user data for that row */
plurality(calls_nb, "Call", "Calls"),
calls_ns,
plurality(calls_ns, "Call", "Calls"));
- gtk_label_set(GTK_LABEL(top_label), label_text);
+ gtk_label_set_text(GTK_LABEL(top_label), label_text);
/* Update the status label with the number of total messages */
g_snprintf(label_text, 256,
voip_calls_get_info()->start_packets,
voip_calls_get_info()->completed_calls,
voip_calls_get_info()->rejected_calls);
- gtk_label_set(GTK_LABEL(status_label), label_text);
+ gtk_label_set_text(GTK_LABEL(status_label), label_text);
}
remove_tap_listener_voip_calls();
}
remove_tap_listener_rtp_event();
- if (find_tap_id("mgcp")) {
- remove_tap_listener_mgcp_calls();
- }
+ remove_tap_listener_mgcp_calls();
remove_tap_listener_actrace_calls();
remove_tap_listener_t38();
+ remove_tap_listener_skinny_calls();
+ remove_tap_listener_iax2_calls();
}
/****************************************************************************/
const gchar *filter_prepend;
gboolean isFirst = TRUE;
GList* list;
- guint filter_length = 0;
- guint max_filter_length = 2048;
+ size_t filter_length = 0;
+ size_t max_filter_length = 2048;
sip_calls_info_t *tmp_sipinfo;
isup_calls_info_t *tmp_isupinfo;
h323_calls_info_t *tmp_h323info;
filter_string_fwd = g_string_new(filter_prepend);
/* look in the Graph and get all the frame_num for this call */
- g_string_sprintfa(filter_string_fwd, " (");
+ g_string_append_printf(filter_string_fwd, " (");
list = g_list_first(voip_calls_get_info()->graph_analysis->list);
while (list)
{
gai = list->data;
if (gai->conv_num == selected_call_fwd->call_num){
- g_string_sprintfa(filter_string_fwd,"%sframe.number == %d", isFirst?"":" or ", gai->frame_num );
+ g_string_append_printf(filter_string_fwd,"%sframe.number == %d", isFirst?"":" or ", gai->frame_num );
isFirst = FALSE;
}
list = g_list_next (list);
}
- g_string_sprintfa(filter_string_fwd, ") ");
+ g_string_append_printf(filter_string_fwd, ") ");
filter_length = filter_length + filter_string_fwd->len;
if (filter_length < max_filter_length){
switch(selected_call_fwd->protocol){
case VOIP_SIP:
tmp_sipinfo = selected_call_fwd->prot_info;
- g_string_sprintfa(filter_string_fwd,
+ g_string_append_printf(filter_string_fwd,
"(sip.Call-ID == \"%s\") ",
tmp_sipinfo->call_identifier
);
break;
case VOIP_ISUP:
tmp_isupinfo = selected_call_fwd->prot_info;
- g_string_sprintfa(filter_string_fwd,
+ g_string_append_printf(filter_string_fwd,
"(isup.cic == %i and frame.number >=%i and frame.number<=%i and mtp3.network_indicator == %i and ((mtp3.dpc == %i) and (mtp3.opc == %i)) or((mtp3.dpc == %i) and (mtp3.opc == %i))) ",
tmp_isupinfo->cic,selected_call_fwd->first_frame_num,
selected_call_fwd->last_frame_num,
break;
case VOIP_H323:
tmp_h323info = selected_call_fwd->prot_info;
- g_string_sprintfa(filter_string_fwd,
+ g_string_append_printf(filter_string_fwd,
"((h225.guid == %s || q931.call_ref == %x:%x || q931.call_ref == %x:%x) ",
guid_to_str(&tmp_h323info->guid[0]),
(guint8)(tmp_h323info->q931_crv & 0xff),
while (list)
{
h245_add=list->data;
- g_string_sprintfa(filter_string_fwd,
+ g_string_append_printf(filter_string_fwd,
" || (ip.addr == %s && tcp.port == %d && h245) ",
ip_to_str((guint8 *)&(h245_add->h245_address)), h245_add->h245_port);
list = g_list_next(list);
}
- g_string_sprintfa(filter_string_fwd, ") ");
+ g_string_append_printf(filter_string_fwd, ") ");
gtk_entry_append_text(GTK_ENTRY(main_display_filter_widget), filter_string_fwd->str);
break;
case TEL_H248: {
case TEL_BSSMAP:
case TEL_RANAP:
case VOIP_UNISTIM:
+ case VOIP_SKINNY:
+ case VOIP_IAX2:
case VOIP_COMMON:
/* XXX - not supported */
break;
plurality(calls_nb, "Call", "Calls"),
calls_ns,
plurality(calls_ns, "Call", "Calls"));
- gtk_label_set(GTK_LABEL(top_label), label_text);
+ gtk_label_set_text(GTK_LABEL(top_label), label_text);
if (calls_ns > 0) {
plurality(calls_nb, "Call", "Calls"),
calls_ns,
plurality(calls_ns, "Call", "Calls"));
- gtk_label_set(GTK_LABEL(top_label), label_text);
+ gtk_label_set_text(GTK_LABEL(top_label), label_text);
if (calls_ns > 0) {
gtk_widget_set_sensitive(bt_filter, TRUE);
hbuttonbox = gtk_hbutton_box_new ();
gtk_box_pack_start (GTK_BOX (main_vb), hbuttonbox, FALSE, FALSE, 0);
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_SPREAD);
- gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox), 30);
+ gtk_box_set_spacing (GTK_BOX (hbuttonbox), 30);
/*bt_unselect = gtk_button_new_with_label ("Unselect");
gtk_container_add (GTK_CONTAINER (hbuttonbox), bt_unselect);
voip_calls_get_info()->start_packets,
voip_calls_get_info()->completed_calls,
voip_calls_get_info()->rejected_calls);
- gtk_label_set(GTK_LABEL(status_label), label_text);
+ gtk_label_set_text(GTK_LABEL(status_label), label_text);
gtk_clist_freeze(GTK_CLIST(clist));
gtk_clist_clear(GTK_CLIST(clist));
plurality(calls_nb, "Call", "Calls"),
calls_ns,
plurality(calls_ns, "Call", "Calls"));
- gtk_label_set(GTK_LABEL(top_label), label_text);
+ gtk_label_set_text(GTK_LABEL(top_label), label_text);
}
last_list = list;
}
rtp_init_tap();
rtp_event_init_tap();
- /* We don't register this tap, if we don't have the mgcp plugin loaded.*/
- if (find_tap_id("mgcp")) {
- mgcp_calls_init_tap();
- }
+ mgcp_calls_init_tap();
actrace_calls_init_tap();
t38_init_tap();
+ skinny_calls_init_tap();
+ iax2_calls_init_tap();
/* create dialog box if necessary */
if (voip_calls_dlg == NULL) {
gtk_clist_append(GTK_CLIST(clist), data);
/* Scan for VoIP calls calls (redissect all packets) */
- cf_retap_packets(&cfile, FALSE);
-
+ cf_retap_packets(&cfile);
+ gdk_window_raise(voip_calls_dlg->window);
/* Tap listener will be removed and cleaned up in voip_calls_on_destroy */
}