Have cf_retap_packets() take an argument that indicates whether to
generate columns; use cf_retap_packets instead of cf_redissect_packets() when running taps (the general flow graph stat uses the Info column). svn path=/trunk/; revision=15793
This commit is contained in:
parent
a7e184cb59
commit
f34e1a97c6
9
file.c
9
file.c
|
@ -1603,8 +1603,9 @@ process_specified_packets(capture_file *cf, packet_range_t *range,
|
|||
static gboolean
|
||||
retap_packet(capture_file *cf _U_, frame_data *fdata,
|
||||
union wtap_pseudo_header *pseudo_header, const guint8 *pd,
|
||||
void *argsp _U_)
|
||||
void *argsp)
|
||||
{
|
||||
column_info *cinfo = argsp;
|
||||
epan_dissect_t *edt;
|
||||
|
||||
/* If we have tap listeners, allocate a protocol tree root node, so that
|
||||
|
@ -1612,7 +1613,7 @@ retap_packet(capture_file *cf _U_, frame_data *fdata,
|
|||
be evaluated. */
|
||||
edt = epan_dissect_new(num_tap_filters != 0, FALSE);
|
||||
tap_queue_init(edt);
|
||||
epan_dissect_run(edt, pseudo_header, pd, fdata, NULL);
|
||||
epan_dissect_run(edt, pseudo_header, pd, fdata, cinfo);
|
||||
tap_push_tapped_queue(edt);
|
||||
epan_dissect_free(edt);
|
||||
|
||||
|
@ -1620,7 +1621,7 @@ retap_packet(capture_file *cf _U_, frame_data *fdata,
|
|||
}
|
||||
|
||||
cf_read_status_t
|
||||
cf_retap_packets(capture_file *cf)
|
||||
cf_retap_packets(capture_file *cf, gboolean do_columns)
|
||||
{
|
||||
packet_range_t range;
|
||||
|
||||
|
@ -1633,7 +1634,7 @@ cf_retap_packets(capture_file *cf)
|
|||
packet_range_process_init(&range);
|
||||
switch (process_specified_packets(cf, &range, "Refiltering statistics on",
|
||||
"all packets", retap_packet,
|
||||
NULL)) {
|
||||
do_columns ? &cf->cinfo : NULL)) {
|
||||
case PSP_FINISHED:
|
||||
/* Completed successfully. */
|
||||
return CF_OK;
|
||||
|
|
3
file.h
3
file.h
|
@ -266,9 +266,10 @@ void cf_redissect_packets(capture_file *cf);
|
|||
* Rescan all packets and just run taps - don't reconstruct the display.
|
||||
*
|
||||
* @param cf the capture file
|
||||
* @param do_columns TRUE if columns are to be generated, FALSE otherwise
|
||||
* @return one of cf_read_status_t
|
||||
*/
|
||||
cf_read_status_t cf_retap_packets(capture_file *cf);
|
||||
cf_read_status_t cf_retap_packets(capture_file *cf, gboolean do_columns);
|
||||
|
||||
/**
|
||||
* The time format has changed, rescan all packets.
|
||||
|
|
|
@ -194,7 +194,7 @@ gtk_afpstat_init(const char *optarg)
|
|||
gtk_widget_show_all(ss->win);
|
||||
window_present(ss->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg afp_stat_dlg = {
|
||||
|
|
|
@ -267,7 +267,7 @@ dhcpstat_init(const char *optarg)
|
|||
|
||||
window_present(sp->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg dhcp_stat_dlg = {
|
||||
|
|
|
@ -1327,7 +1327,7 @@ init_conversation_table(gboolean hide_ports, const char *table_name, const char
|
|||
gtk_widget_show_all(conversations->win);
|
||||
window_present(conversations->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
|
||||
/* Keep clist frozen to cause modifications to the clist (inserts, appends, others that are extremely slow
|
||||
|
@ -1515,7 +1515,7 @@ init_conversation_notebook_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
gtk_widget_show_all(win);
|
||||
window_present(win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
/* after retapping, redraw table */
|
||||
for (page=1; page<=GPOINTER_TO_INT(pages[0]); page++) {
|
||||
|
|
|
@ -333,7 +333,7 @@ gtk_dcerpcstat_init(const char *optarg)
|
|||
gtk_widget_show_all(rs->win);
|
||||
window_present(rs->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -574,7 +574,7 @@ expert_dlg_init(const char *optarg)
|
|||
gtk_widget_show_all(etd->win);
|
||||
window_present(etd->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ gtk_fcstat_init(const char *optarg)
|
|||
gtk_widget_show_all(fc->win);
|
||||
window_present(fc->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg fc_stat_dlg = {
|
||||
|
|
|
@ -335,7 +335,7 @@ flow_graph_on_ok (GtkButton *button _U_,
|
|||
remove_tap_listener_flow_graph();
|
||||
}
|
||||
|
||||
/* Scan for displayed packets (redissect all packets) */
|
||||
/* Scan for displayed packets (retap all packets) */
|
||||
|
||||
if (type_of_flow == GENERAL){
|
||||
/* Register the tap listener */
|
||||
|
@ -351,7 +351,7 @@ flow_graph_on_ok (GtkButton *button _U_,
|
|||
have_frame_tap_listener=TRUE;
|
||||
}
|
||||
|
||||
cf_redissect_packets(&cfile);
|
||||
cf_retap_packets(&cfile, TRUE);
|
||||
}
|
||||
else if (type_of_flow == TCP){
|
||||
/* Register the tap listener */
|
||||
|
@ -367,7 +367,7 @@ flow_graph_on_ok (GtkButton *button _U_,
|
|||
have_tcp_tap_listener=TRUE;
|
||||
}
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
if (graph_analysis_data->dlg.window != NULL){ /* if we still have a window */
|
||||
|
|
|
@ -555,7 +555,7 @@ gtk_h225counter_init(const char *optarg)
|
|||
gtk_widget_show_all(hs->win);
|
||||
window_present(hs->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -335,7 +335,7 @@ gtk_h225rassrt_init(const char *optarg)
|
|||
gtk_widget_show_all(hs->win);
|
||||
window_present(hs->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -779,7 +779,7 @@ init_hostlist_table(gboolean hide_ports, const char *table_name, const char *tap
|
|||
gtk_widget_show_all(hosttable->win);
|
||||
window_present(hosttable->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
/* Keep clist frozen to cause modifications to the clist (inserts, appends, others that are extremely slow
|
||||
in GTK2) to not be drawn, allow refreshes to occur at strategic points for performance */
|
||||
|
@ -967,7 +967,7 @@ init_hostlist_notebook_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
gtk_widget_show_all(win);
|
||||
window_present(win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
/* after retapping, redraw table */
|
||||
for (page=1; page<=GPOINTER_TO_INT(pages[0]); page++) {
|
||||
|
|
|
@ -1115,7 +1115,7 @@ gtk_iostat_init(const char *optarg _U_)
|
|||
/* build the GUI */
|
||||
init_io_stat_window(io);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
io_stat_redraw(io);
|
||||
}
|
||||
|
||||
|
@ -1275,7 +1275,7 @@ tick_interval_select(GtkWidget *item, gpointer key)
|
|||
val=(int)OBJECT_GET_DATA(item, "tick_interval");
|
||||
|
||||
io->interval=val;
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
io_stat_redraw(io);
|
||||
}
|
||||
|
||||
|
@ -1640,7 +1640,7 @@ filter_callback(GtkWidget *widget _U_, io_stat_graph_t *gio)
|
|||
|
||||
io_stat_reset(gio->io);
|
||||
enable_graph(gio, filter, field);
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
io_stat_redraw(gio->io);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -232,7 +232,7 @@ gtk_ldapstat_init(const char *optarg)
|
|||
gtk_widget_show_all(ldap->win);
|
||||
window_present(ldap->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg ldap_stat_dlg = {
|
||||
|
|
|
@ -305,7 +305,7 @@ gtk_mgcpstat_init(const char *optarg)
|
|||
gtk_widget_show_all(ms->win);
|
||||
window_present(ms->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg mgcp_srt_dlg = {
|
||||
|
|
|
@ -403,7 +403,7 @@ gtk_rpcprogs_init(const char *optarg _U_)
|
|||
gtk_widget_show_all(win);
|
||||
window_present(win);
|
||||
|
||||
cf_redissect_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -309,7 +309,7 @@ gtk_rpcstat_init(const char *optarg)
|
|||
gtk_widget_show_all(rs->win);
|
||||
window_present(rs->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1776,7 +1776,7 @@ static gint filter_callback(GtkWidget *widget _U_, dialog_graph_graph_t *dgg)
|
|||
}
|
||||
|
||||
enable_graph(dgg);
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
dialog_graph_redraw(dgg->ud);
|
||||
|
||||
return 0;
|
||||
|
@ -1895,7 +1895,7 @@ static void tick_interval_select(GtkWidget *item, gpointer key)
|
|||
val=(int)OBJECT_GET_DATA(item, "tick_interval");
|
||||
|
||||
user_data->dlg.dialog_graph.interval=val;
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
dialog_graph_redraw(user_data);
|
||||
}
|
||||
|
||||
|
@ -2128,7 +2128,7 @@ static void on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data _U_)
|
|||
}
|
||||
|
||||
/* retap all packets */
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
/* draw statistics info */
|
||||
draw_stat(user_data);
|
||||
|
|
|
@ -324,7 +324,7 @@ void rtpstream_scan(void)
|
|||
register_tap_listener_rtp_stream();
|
||||
|
||||
the_tapinfo_struct.mode = TAP_ANALYSE;
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
if (!was_registered)
|
||||
remove_tap_listener_rtp_stream();
|
||||
|
@ -355,7 +355,7 @@ gboolean rtpstream_save(rtp_stream_info_t* stream, const gchar *filename)
|
|||
|
||||
the_tapinfo_struct.mode = TAP_SAVE;
|
||||
the_tapinfo_struct.filter_stream_fwd = stream;
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
the_tapinfo_struct.mode = TAP_ANALYSE;
|
||||
|
||||
if (!was_registered)
|
||||
|
@ -386,7 +386,7 @@ void rtpstream_mark(rtp_stream_info_t* stream_fwd, rtp_stream_info_t* stream_rev
|
|||
the_tapinfo_struct.mode = TAP_MARK;
|
||||
the_tapinfo_struct.filter_stream_fwd = stream_fwd;
|
||||
the_tapinfo_struct.filter_stream_rev = stream_rev;
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
the_tapinfo_struct.mode = TAP_ANALYSE;
|
||||
|
||||
if (!was_registered)
|
||||
|
|
|
@ -868,7 +868,7 @@ void sctp_analyse_start(GtkWidget *w _U_, gpointer data _U_)
|
|||
u_data->window = NULL;
|
||||
u_data->num_children = 0;
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
sctp_analyse_cb(u_data);
|
||||
}
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ sctpstat_init(const char *optarg)
|
|||
gtk_widget_show_all(hs->win);
|
||||
window_present(hs->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -324,7 +324,7 @@ gtk_sctpstat_dlg(struct sctp_udata *u_data, unsigned int direction)
|
|||
|
||||
SIGNAL_CONNECT(bt_close, "clicked", sctp_chunk_stat_on_close, u_data);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -565,7 +565,7 @@ gtk_sctpstat_dlg(void)
|
|||
SIGNAL_CONNECT(bt_close, "clicked", sctp_stat_on_close, NULL);
|
||||
|
||||
sctp_stat_dlg = sctp_stat_dlg_w;
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -647,7 +647,7 @@ gtk_sipstat_init(const char *optarg)
|
|||
window_present(sp->win);
|
||||
|
||||
sip_init_hash(sp);
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg sip_stat_dlg = {
|
||||
|
|
|
@ -235,7 +235,7 @@ gtk_smbstat_init(const char *optarg)
|
|||
gtk_widget_show_all(ss->win);
|
||||
window_present(ss->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg smb_stat_dlg = {
|
||||
|
|
|
@ -360,7 +360,7 @@ static void init_gtk_tree(const char* optarg) {
|
|||
|
||||
st->cfg->init(st);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1838,7 +1838,7 @@ static void graph_segment_list_get (struct graph *g)
|
|||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
remove_tap_listener(&ts);
|
||||
}
|
||||
|
||||
|
|
|
@ -794,7 +794,7 @@ voip_calls_init_tap(const char *dummy _U_)
|
|||
gtk_clist_append(GTK_CLIST(clist), data);
|
||||
|
||||
/* Scan for VoIP calls calls (redissect all packets) */
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
|
||||
/* Tap listener will be removed and cleaned up in voip_calls_on_destroy */
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ gtk_wspstat_init(const char *optarg)
|
|||
gtk_widget_show_all(sp->win);
|
||||
window_present(sp->win);
|
||||
|
||||
cf_retap_packets(&cfile);
|
||||
cf_retap_packets(&cfile, FALSE);
|
||||
}
|
||||
|
||||
static tap_dfilter_dlg wsp_stat_dlg = {
|
||||
|
|
Loading…
Reference in New Issue