As suggested by multipleinterfaces in http://ask.wireshark.org/questions/9194/can...
[obnox/wireshark/wip.git] / summary.h
1 /* summary.h
2  * Definitions for capture file summary data
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __SUMMARY_H__
26 #define __SUMMARY_H__
27
28 #ifdef HAVE_LIBPCAP
29 #include "capture.h"
30 #endif
31
32 typedef struct iface_options_tag {
33     char        *name;
34     char        *descr;
35     char        *cfilter;
36     guint64     drops;                          /* number of packet drops */
37     gboolean    drops_known;    /* TRUE if number of packet drops is known */
38     gboolean    has_snap;               /* TRUE if maximum capture packet length is known */
39     int         snap;                           /* Maximum captured packet length */
40     int         linktype;                       /* wiretap encapsulation type */
41 } iface_options;
42
43 typedef struct _summary_tally {
44     guint64     bytes;                          /**< total bytes */
45     double      start_time;                     /**< seconds, with msec resolution */
46     double      stop_time;                      /**< seconds, with msec resolution */
47     double      elapsed_time;           /**< seconds, with msec resolution,
48                                                                    includes time before first packet
49                                                                    and after last packet */
50     int         marked_count;           /**< number of marked packets */
51     guint64     marked_bytes;           /**< total bytes in the marked packets */
52     double      marked_start;           /**< time in seconds, with msec resolution */
53     double      marked_stop;            /**< time in seconds, with msec resolution */
54     int         ignored_count;          /**< number of ignored packets */
55     int         packet_count;           /**< total number of packets in trace */
56     int         filtered_count;         /**< number of filtered packets */
57     guint64     filtered_bytes;         /**< total bytes in the filtered packets */
58     double      filtered_start;         /**< time in seconds, with msec resolution */
59     double      filtered_stop;          /**< time in seconds, with msec resolution */
60     const char  *filename;
61     gint64      file_length;            /**< file length in bytes */
62     int         file_type;                      /**< wiretap file type */
63     int         encap_type;                     /**< wiretap encapsulation type */
64     gboolean    has_snap;               /**< TRUE if maximum capture packet length is known */
65     int         snap;                           /**< Maximum captured packet length */
66     gboolean    drops_known;    /**< TRUE if number of packet drops is known */
67     guint64     drops;                  /**< number of packet drops */
68     const char  *dfilter;               /**< display filter */
69     gboolean    is_tempfile;
70         /* from SHB, use summary_fill_shb_inf() to get values */
71     gchar       *opt_comment;   /**< comment from SHB block */
72     gchar       *shb_hardware;  /**< Capture HW from SHB block */
73     gchar       *shb_os;        /**< The OS the capture was made on from SHB block */
74     gchar       *shb_user_appl; /**< The application that made the capture from SHB block */
75     /* capture related, use summary_fill_in_capture() to get values */
76     GArray      *ifaces;
77     gboolean    legacy;
78 } summary_tally;
79
80 extern void
81 summary_fill_in(capture_file *cf, summary_tally *st);
82
83 #ifdef HAVE_LIBPCAP
84 extern void
85 summary_fill_in_capture(capture_file *cf, capture_options *capture_opts, summary_tally *st);
86 #endif
87
88 #endif /* summary.h */
89
90
91
92
93