diff options
author | Gerald Combs <gerald@wireshark.org> | 2007-08-02 21:45:27 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2007-08-02 21:45:27 +0000 |
commit | 89a2966ced23693ab513131ef37641ed40787e01 (patch) | |
tree | cca4caad8e2d8be6877bd0cb6820661817c69dfb /capture.h | |
parent | 98309a6c837fb050aeab6106b619701cbb75af9f (diff) |
Add a "-S" flag to dumpcap, which prints out interface statistics. Use
this in the GUI rather than calling pcap_stats() directly. This gets rid
of the last pcap_open_live() call in the GUI code. Update
README.packaging.
svn path=/trunk/; revision=22443
Diffstat (limited to 'capture.h')
-rw-r--r-- | capture.h | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -81,6 +81,7 @@ extern void capture_input_cfilter_error_message(capture_options *capture_opts, c */ extern void capture_input_closed(capture_options *capture_opts); +#ifdef HAVE_LIBPCAP /** * Fetch the interface list from a child process. */ @@ -92,4 +93,26 @@ extern GList *capture_interface_list(int *err, char **err_str); extern GList *capture_pcap_linktype_list(char *devname, char **err_str); +struct if_stat_cache_s; +typedef struct if_stat_cache_s if_stat_cache_t; + +/** + * Start gathering capture statistics for the interfaces specified. + * @param A GList of if_info_t items + * @return A pointer to the statistics state data. + */ +extern if_stat_cache_t * capture_stat_start(GList *if_list); + +/** + * Fetch capture statistics, similar to pcap_stats(). + */ +struct pcap_stat; /* Stub in case we don't or haven't yet included pcap.h */ +extern gboolean capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps); + +/** + * Stop gathering capture statistics. + */ +void capture_stat_stop(if_stat_cache_t *sc); +#endif /* HAVE_LIBPCAP */ + #endif /* capture.h */ |