The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / capture_info.h @ master

History | View | Annotate | Download (2.32 KB)

1
/* capture_info.h
2
 * capture info functions
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
 */
24

    
25

    
26
/** @file
27
 *
28
 * capture info functions
29
 *
30
 */
31

    
32
#ifndef __CAPTURE_INFO_H__
33
#define __CAPTURE_INFO_H__
34

    
35
#include "capture_opts.h"
36
#include "capture_session.h"
37

    
38
#ifdef __cplusplus
39
extern "C" {
40
#endif /* __cplusplus */
41

    
42
/* open the info - init values (wtap, counts), create dialog */
43
extern void capture_info_open(capture_session *cap_session);
44

    
45
/* new file arrived - (eventually close old wtap), open wtap */
46
extern gboolean capture_info_new_file(const char *new_filename);
47

    
48
/* new packets arrived - read from wtap, count */
49
extern void capture_info_new_packets(int to_read);
50

    
51
/* close the info - close wtap, destroy dialog */
52
extern void capture_info_close(void);
53

    
54

    
55

    
56
/** Current Capture info. */
57
typedef struct {
58
    /* handle */
59
    gpointer        ui;             /**< user interface handle */
60

    
61
    /* capture info */
62
    packet_counts   *counts;        /**< protocol specific counters */
63
    time_t          running_time;   /**< running time since last update */
64
    gint            new_packets;    /**< packets since last update */
65
} capture_info;
66

    
67

    
68
/** Create the capture info dialog */
69
extern void
70
capture_info_ui_create(capture_info *cinfo, capture_session *cap_session);
71

    
72
/** Update the capture info counters in the dialog */
73
extern void capture_info_ui_update(
74
capture_info    *cinfo);
75

    
76
/** Destroy the capture info dialog again */
77
extern void capture_info_ui_destroy(
78
capture_info    *cinfo);
79

    
80
#ifdef __cplusplus
81
}
82
#endif /* __cplusplus */
83

    
84
#endif /* capture_info.h */