nl80211: display interface name as a string
[metze/wireshark/wip.git] / ui / summary.h
1 /* summary.h
2  * Definitions for capture file summary data
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10
11 #ifndef __SUMMARY_H__
12 #define __SUMMARY_H__
13
14 #ifdef HAVE_LIBPCAP
15 #include "ui/capture.h"
16 #endif
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21
22 typedef struct iface_summary_info_tag {
23   char     *name;
24   char     *descr;
25   char     *cfilter;
26   char     *isb_comment;
27   guint64   drops;                 /**< number of packet drops */
28   gboolean  drops_known;           /**< TRUE if number of packet drops is known */
29   int       snap;                  /**< Maximum captured packet length; 0 if not known */
30   int       encap_type;            /**< wiretap encapsulation type */
31 } iface_summary_info;
32
33 #define HASH_STR_SIZE (65) /* Max hash size * 2 + '\0' */
34
35 typedef struct _summary_tally {
36   guint64               bytes;              /**< total bytes */
37   double                start_time;         /**< seconds, with msec resolution */
38   double                stop_time;          /**< seconds, with msec resolution */
39   double                elapsed_time;       /**< seconds, with msec resolution,
40                                               includes time before first packet
41                                               and after last packet */
42   guint32               marked_count;       /**< number of marked packets */
43   guint32               marked_count_ts;    /**< number of time-stamped marked packets */
44   guint64               marked_bytes;       /**< total bytes in the marked packets */
45   double                marked_start;       /**< time in seconds, with msec resolution */
46   double                marked_stop;        /**< time in seconds, with msec resolution */
47   guint32               ignored_count;      /**< number of ignored packets */
48   guint32               packet_count;       /**< total number of packets in trace */
49   guint32               packet_count_ts;    /**< total number of time-stamped packets in trace */
50   guint32               filtered_count;     /**< number of filtered packets */
51   guint32               filtered_count_ts;  /**< number of time-stamped filtered packets */
52   guint64               filtered_bytes;     /**< total bytes in the filtered packets */
53   double                filtered_start;     /**< time in seconds, with msec resolution */
54   double                filtered_stop;      /**< time in seconds, with msec resolution */
55   const char           *filename;           /**< path of capture file */
56   gint64                file_length;        /**< file length in bytes */
57   gchar                 file_sha256[HASH_STR_SIZE];  /**< SHA256 hash of capture file */
58   gchar                 file_rmd160[HASH_STR_SIZE];  /**< RIPEMD160 hash of capture file */
59   gchar                 file_sha1[HASH_STR_SIZE];    /**< SHA1 hash of capture file */
60   int                   file_type;          /**< wiretap file type */
61   wtap_compression_type compression_type;   /**< compression type of file, or uncompressed */
62   int                   file_encap_type;    /**< wiretap encapsulation type for file */
63   GArray               *packet_encap_types; /**< wiretap encapsulation types for packets */
64   int                   snap;               /**< Maximum captured packet length; 0 if not known */
65   gboolean              drops_known;        /**< TRUE if number of packet drops is known */
66   guint64               drops;              /**< number of packet drops */
67   const char           *dfilter;            /**< display filter */
68   gboolean              is_tempfile;
69   /* capture related, use summary_fill_in_capture() to get values */
70   GArray               *ifaces;
71   gboolean              legacy;
72 } summary_tally;
73
74 extern void
75 summary_fill_in(capture_file *cf, summary_tally *st);
76
77 #ifdef HAVE_LIBPCAP
78 extern void
79 summary_fill_in_capture(capture_file *cf, capture_options *capture_opts, summary_tally *st);
80 #endif
81
82 #ifdef __cplusplus
83 }
84 #endif /* __cplusplus */
85
86 #endif /* summary.h */
87
88 /*
89  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
90  *
91  * Local Variables:
92  * c-basic-offset: 2
93  * tab-width: 8
94  * indent-tabs-mode: nil
95  * End:
96  *
97  * vi: set shiftwidth=2 tabstop=8 expandtab:
98  * :indentSize=2:tabSize=8:noTabs=true:
99  */