diff options
-rw-r--r-- | epan/libwireshark.def | 1 | ||||
-rw-r--r-- | epan/tap.c | 29 | ||||
-rw-r--r-- | epan/tap.h | 1 | ||||
-rw-r--r-- | file.c | 1 |
4 files changed, 23 insertions, 9 deletions
diff --git a/epan/libwireshark.def b/epan/libwireshark.def index 7c766e5236..fa4811e6c3 100644 --- a/epan/libwireshark.def +++ b/epan/libwireshark.def @@ -928,6 +928,7 @@ 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 diff --git a/epan/tap.c b/epan/tap.c index efbf9ddbc4..c0a06c8a33 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -192,6 +192,25 @@ tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data) /* ********************************************************************** * Functions used by file.c to drive the tap subsystem * ********************************************************************** */ + +void tap_build_interesting (epan_dissect_t *edt) +{ + tap_listener_t *tl; + + /* nothing to do, just return */ + if(!tap_listener_queue){ + return; + } + + /* loop over all tap listeners and build the list of all + interesting hf_fields */ + for(tl=(tap_listener_t *)tap_listener_queue;tl;tl=tl->next){ + if(tl->code){ + epan_dissect_prime_dfilter(edt, tl->code); + } + } +} + /* This function is used to delete/initialize the tap queue and prime an epan_dissect_t with all the filters for tap listeners. To free the tap queue, we just prepend the used queue to the free queue. @@ -199,8 +218,6 @@ tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data) void tap_queue_init(epan_dissect_t *edt) { - tap_listener_t *tl; - /* nothing to do, just return */ if(!tap_listener_queue){ return; @@ -210,13 +227,7 @@ tap_queue_init(epan_dissect_t *edt) tap_packet_index=0; - /* loop over all tap listeners and build the list of all - interesting hf_fields */ - for(tl=(tap_listener_t *)tap_listener_queue;tl;tl=tl->next){ - if(tl->code){ - epan_dissect_prime_dfilter(edt, tl->code); - } - } + tap_build_interesting (edt); } /* this function is called after a packet has been fully dissected to push the tapped diff --git a/epan/tap.h b/epan/tap.h index 942caed775..aa3e7814f0 100644 --- a/epan/tap.h +++ b/epan/tap.h @@ -41,6 +41,7 @@ extern void tap_init(void); extern int register_tap(const char *name); extern int find_tap_id(const char *name); extern void tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data); +extern void tap_build_interesting(epan_dissect_t *edt); extern void tap_queue_init(epan_dissect_t *edt); extern void tap_push_tapped_queue(epan_dissect_t *edt); extern void reset_tap_listeners(void); @@ -4056,6 +4056,7 @@ cf_select_packet(capture_file *cf, int row) /* We don't need the columns here. */ cf->edt = epan_dissect_new(TRUE, TRUE); + tap_build_interesting(cf->edt); epan_dissect_run(cf->edt, &cf->pseudo_header, cf->pd, cf->current_frame, NULL); |