From e829856c0c03666c5b9b917fba4716b88fd580e6 Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Sun, 4 Dec 2005 02:04:18 +0000 Subject: move the complete functionality of the capture info dialog from capture_loop.c to capture_info.c and call it from capture.c (instead of capture_loop.c). This way, the capture child don't need to now any of the packet_counter things (no epan/packet.h and all alike). Currently the capture_info code will always open another wiretap file instance to build it's own counter values. This isn't optimized for now (next step: use data from cf_continue_tail() somehow). svn path=/trunk/; revision=16669 --- capture_info.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'capture_info.h') diff --git a/capture_info.h b/capture_info.h index 02e1f210aa..fefedbf564 100644 --- a/capture_info.h +++ b/capture_info.h @@ -33,10 +33,18 @@ #define __CAPTURE_INFO_H__ -extern void capture_info_init(packet_counts *counts); +/* open the info - init values (wtap, counts), create dialog */ +extern void capture_info_open(const char *iface); + +/* new file arrived - (eventually close old wtap), open wtap */ +extern void capture_info_new_file(const char *new_filename); + +/* new packets arrived - read from wtap, count */ +extern void capture_info_new_packets(int to_read); + +/* close the info - close wtap, destroy dialog */ +extern void capture_info_close(void); -extern void capture_info_packet( -packet_counts *counts, gint wtap_linktype, const u_char *pd, guint32 caplen, union wtap_pseudo_header pseudo_header); /** Current Capture info. */ @@ -54,7 +62,7 @@ typedef struct { /** Create the capture info dialog */ extern void capture_info_ui_create( capture_info *cinfo, -gchar *iface); +const gchar *iface); /** Update the capture info counters in the dialog */ extern void capture_info_ui_update( -- cgit v1.2.1