Introduce epan_dissect_run_with_taps() which run dissection with taps.
unexport tap_queue_init, tap_push_tapped_queue svn path=/trunk/; revision=45670
This commit is contained in:
parent
6dc977b7d2
commit
77368c3668
12
epan/epan.c
12
epan/epan.c
@ -198,6 +198,18 @@ epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
||||
dissect_packet(edt, phdr, data, fd, cinfo);
|
||||
}
|
||||
|
||||
void
|
||||
epan_dissect_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
||||
const guint8* data, frame_data *fd, column_info *cinfo)
|
||||
{
|
||||
/* free all memory allocated during previous packet */
|
||||
ep_free_all();
|
||||
|
||||
tap_queue_init(edt);
|
||||
dissect_packet(edt, phdr, data, fd, cinfo);
|
||||
tap_push_tapped_queue(edt);
|
||||
}
|
||||
|
||||
void
|
||||
epan_dissect_reset(epan_dissect_t *edt)
|
||||
{
|
||||
|
@ -154,6 +154,10 @@ void
|
||||
epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
||||
const guint8* data, frame_data *fd, column_info *cinfo);
|
||||
|
||||
void
|
||||
epan_dissect_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
||||
const guint8* data, frame_data *fd, column_info *cinfo);
|
||||
|
||||
/** Prime a proto_tree using the fields/protocols used in a dfilter. */
|
||||
void
|
||||
epan_dissect_prime_dfilter(epan_dissect_t *edt, const dfilter_t *dfcode);
|
||||
|
@ -411,6 +411,7 @@ epan_dissect_init
|
||||
epan_dissect_new
|
||||
epan_dissect_prime_dfilter
|
||||
epan_dissect_run
|
||||
epan_dissect_run_with_taps
|
||||
epan_dissect_reset
|
||||
epan_get_compiled_version_info
|
||||
epan_get_runtime_version_info
|
||||
@ -1050,9 +1051,7 @@ t38_T30_data_vals DATA
|
||||
t38_T30_indicator_vals DATA
|
||||
t38_add_address
|
||||
T_h323_message_body_vals DATA
|
||||
tap_push_tapped_queue
|
||||
tap_build_interesting
|
||||
tap_queue_init
|
||||
tap_queue_packet
|
||||
tcp_dissect_pdus
|
||||
tap_listeners_require_dissection
|
||||
|
8
file.c
8
file.c
@ -1121,9 +1121,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
|
||||
&first_ts, prev_dis, prev_cap);
|
||||
prev_cap = fdata;
|
||||
|
||||
tap_queue_init(edt);
|
||||
epan_dissect_run(edt, phdr, buf, fdata, cinfo);
|
||||
tap_push_tapped_queue(edt);
|
||||
epan_dissect_run_with_taps(edt, phdr, buf, fdata, cinfo);
|
||||
|
||||
/* If we don't have a display filter, set "passed_dfilter" to 1. */
|
||||
if (dfcode != NULL) {
|
||||
@ -2286,9 +2284,7 @@ retap_packet(capture_file *cf _U_, frame_data *fdata,
|
||||
epan_dissect_t edt;
|
||||
|
||||
epan_dissect_init(&edt, args->construct_protocol_tree, FALSE);
|
||||
tap_queue_init(&edt);
|
||||
epan_dissect_run(&edt, phdr, pd, fdata, args->cinfo);
|
||||
tap_push_tapped_queue(&edt);
|
||||
epan_dissect_run_with_taps(&edt, phdr, pd, fdata, args->cinfo);
|
||||
epan_dissect_cleanup(&edt);
|
||||
|
||||
return TRUE;
|
||||
|
@ -1057,8 +1057,6 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr,
|
||||
}
|
||||
}
|
||||
|
||||
tap_queue_init(&edt);
|
||||
|
||||
printf("%lu", (unsigned long int) cf->count);
|
||||
|
||||
frame_data_set_before_dissect(&fdata, &cf->elapsed_time,
|
||||
@ -1067,9 +1065,7 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr,
|
||||
/* We only need the columns if we're printing packet info but we're
|
||||
*not* verbose; in verbose mode, we print the protocol tree, not
|
||||
the protocol summary. */
|
||||
epan_dissect_run(&edt, whdr, pd, &fdata, &cf->cinfo);
|
||||
|
||||
tap_push_tapped_queue(&edt);
|
||||
epan_dissect_run_with_taps(&edt, whdr, pd, &fdata, &cf->cinfo);
|
||||
|
||||
frame_data_set_after_dissect(&fdata, &cum_bytes);
|
||||
prev_dis_frame = fdata;
|
||||
|
12
tshark.c
12
tshark.c
@ -2632,8 +2632,6 @@ process_packet_second_pass(capture_file *cf, frame_data *fdata,
|
||||
|
||||
col_custom_prime_edt(&edt, &cf->cinfo);
|
||||
|
||||
tap_queue_init(&edt);
|
||||
|
||||
/* We only need the columns if either
|
||||
|
||||
1) some tap needs the columns
|
||||
@ -2647,9 +2645,7 @@ process_packet_second_pass(capture_file *cf, frame_data *fdata,
|
||||
else
|
||||
cinfo = NULL;
|
||||
|
||||
epan_dissect_run(&edt, phdr, pd, fdata, cinfo);
|
||||
|
||||
tap_push_tapped_queue(&edt);
|
||||
epan_dissect_run_with_taps(&edt, phdr, pd, fdata, cinfo);
|
||||
|
||||
/* Run the read filter if we have one. */
|
||||
if (cf->rfcode)
|
||||
@ -3083,8 +3079,6 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr,
|
||||
|
||||
col_custom_prime_edt(&edt, &cf->cinfo);
|
||||
|
||||
tap_queue_init(&edt);
|
||||
|
||||
/* We only need the columns if either
|
||||
|
||||
1) some tap needs the columns
|
||||
@ -3101,9 +3095,7 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr,
|
||||
frame_data_set_before_dissect(&fdata, &cf->elapsed_time,
|
||||
&first_ts, prev_dis, prev_cap);
|
||||
|
||||
epan_dissect_run(&edt, whdr, pd, &fdata, cinfo);
|
||||
|
||||
tap_push_tapped_queue(&edt);
|
||||
epan_dissect_run_with_taps(&edt, whdr, pd, &fdata, cinfo);
|
||||
|
||||
/* Run the read filter if we have one. */
|
||||
if (cf->rfcode)
|
||||
|
@ -927,9 +927,7 @@ static rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf, struct segment
|
||||
|
||||
epan_dissect_init(&edt, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
tap_queue_init(&edt);
|
||||
epan_dissect_run(&edt, &cf->phdr, cf->pd, fdata, NULL);
|
||||
tap_push_tapped_queue(&edt);
|
||||
epan_dissect_run_with_taps(&edt, &cf->phdr, cf->pd, fdata, NULL);
|
||||
epan_dissect_cleanup(&edt);
|
||||
remove_tap_listener(&th);
|
||||
|
||||
|
@ -1935,9 +1935,7 @@ static struct tcpheader *select_tcpip_session (capture_file *cf, struct segment
|
||||
|
||||
epan_dissect_init(&edt, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
tap_queue_init(&edt);
|
||||
epan_dissect_run(&edt, &cf->phdr, cf->pd, fdata, NULL);
|
||||
tap_push_tapped_queue(&edt);
|
||||
epan_dissect_run_with_taps(&edt, &cf->phdr, cf->pd, fdata, NULL);
|
||||
epan_dissect_cleanup(&edt);
|
||||
remove_tap_listener(&th);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user