#include "ui/gtk/gui_stat_menu.h"
#include "ui/gtk/pixmap_save.h"
#include "ui/gtk/main.h"
-#include "ui/rtp_analysis.h"
#include "ui/rtp_stream.h"
+#include "ui/tap-rtp-analysis.h"
#include "ui/gtk/rtp_stream_dlg.h"
#include "ui/gtk/stock_icons.h"
/****************************************************************************/
/* whenever a RTP packet is seen by the tap listener */
-static int
+static gboolean
rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *rtpinfo_arg)
{
user_data_t *user_data = (user_data_t *)user_data_arg;
/* we ignore packets that are not displayed */
if (pinfo->fd->flags.passed_dfilter == 0)
- return 0;
+ return FALSE;
/* also ignore RTP Version != 2 */
else if (rtpinfo->info_version != 2)
- return 0;
+ return FALSE;
/* is it the forward direction? */
else if (user_data->ssrc_fwd == rtpinfo->info_sync_src
&& (CMP_ADDRESS(&(user_data->src_fwd), &(pinfo->src)) == 0)
#endif
}
- return 0;
+ return FALSE;
}
/*
g_snprintf(color_str, sizeof(color_str), "#ffffbfffbfff");
}
else if (statinfo->flags & STAT_FLAG_DUP_PKT) {
- g_snprintf(status, sizeof(status), "Suspected duplicate(MAC address) only delta time calculated");
+ g_snprintf(status, sizeof(status), "Suspected duplicate (MAC address) only delta time calculated");
/* color = Yellow; */
g_snprintf(color_str, sizeof(color_str), "#ffffffff0000");
}
saveinfo->error_type = TAP_RTP_FILE_WRITE_ERROR;
return 0;
}
- saveinfo->count += (rtpinfo->info_payload_len - rtpinfo->info_padding_count);
+ saveinfo->count += ((int)rtpinfo->info_payload_len - rtpinfo->info_padding_count);
fflush(saveinfo->fp);
saveinfo->saved = TRUE;
if (nchars != 4)
goto copy_file_err;
/* total length; it is permitted to set this to 0xffffffff */
- phton32(pd, -1);
+ phton32(pd, 0xffffffff);
nchars = fwrite(pd, 1, 4, to_stream);
if (nchars != 4)
goto copy_file_err;
user_data->forward.statinfo.max_delta, user_data->forward.statinfo.max_nr,
user_data->forward.statinfo.max_jitter, user_data->forward.statinfo.mean_jitter,
user_data->forward.statinfo.max_skew,
- f_expected, f_expected, f_lost, f_perc,
+ f_total_nr, f_expected, f_lost, f_perc,
user_data->forward.statinfo.sequence,
f_duration / 1000,
f_duration * (f_clock_drift - 1.0),
user_data->reversed.statinfo.max_delta, user_data->reversed.statinfo.max_nr,
user_data->reversed.statinfo.max_jitter, user_data->reversed.statinfo.mean_jitter,
user_data->reversed.statinfo.max_skew,
- r_expected, r_expected, r_lost, r_perc,
+ r_total_nr, r_expected, r_lost, r_perc,
user_data->reversed.statinfo.sequence,
r_duration / 1000,
r_duration * (r_clock_drift - 1.0),
GtkWidget *player_bt;
#endif /* HAVE_LIBPORTAUDIO */
GtkWidget *graph_bt;
- gchar label_forward[150];
- gchar label_forward_tree[150];
- gchar label_reverse[150];
+ gchar label_forward[200];
+ gchar label_forward_tree[200];
+ gchar label_reverse[200];
char *src_addr, *dst_addr;
window = dlg_window_new("Wireshark: RTP Stream Analysis"); /* transient_for top_level */
g_snprintf(label_forward_tree, sizeof(label_forward_tree),
"Analysing stream from %s port %u to %s port %u SSRC = 0x%X \n"
- "Note many things affects the accurasy of the analysis, use with caution",
+ "Note many things affects the accuracy of the analysis, use with caution",
src_addr, user_data->port_src_fwd, dst_addr, user_data->port_dst_fwd, user_data->ssrc_fwd);
wmem_free(NULL, src_addr);
wmem_free(NULL, dst_addr);
dst_addr = (char*)address_to_display(NULL, &(user_data->dst_rev));
g_snprintf(label_reverse, sizeof(label_reverse),
"Analysing stream from %s port %u to %s port %u SSRC = 0x%X \n"
- "Note many things affects the accurasy of the analysis, use with caution",
+ "Note many things affects the accuracy of the analysis, use with caution",
src_addr, user_data->port_src_rev, dst_addr, user_data->port_dst_rev, user_data->ssrc_rev);
wmem_free(NULL, src_addr);
wmem_free(NULL, dst_addr);
guint32 ssrc_rev = 0;
unsigned int version_fwd;
- gchar filter_text[256];
+ const gchar *filter_text = "rtp && rtp.version && rtp.ssrc && (ip || ipv6)";
dfilter_t *sfcode;
gchar *err_msg;
capture_file *cf;
rtp_stream_info_t *strinfo;
/* Try to compile the filter. */
- g_strlcpy(filter_text, "rtp && rtp.version && rtp.ssrc && (ip || ipv6)", sizeof(filter_text));
if (!dfilter_compile(filter_text, &sfcode, &err_msg)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg);
g_free(err_msg);