nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /* util.h
2 * Utility definitions
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22  
23 #ifndef __UTIL_H__
24 #define __UTIL_H__
25  
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29  
30 /* Collect command-line arguments as a string consisting of the arguments,
31 * separated by spaces.
32 */
33 char *get_args_as_string(int argc, char **argv, int optindex);
34  
35 /* Compute the difference between two seconds/microseconds time stamps.
36 * Beware: we're using nanosecond resolution now and function is currently unused
37 */
38 void compute_timestamp_diff(gint *diffsec, gint *diffusec,
39 guint32 sec1, guint32 usec1, guint32 sec2, guint32 usec2);
40  
41 /* Try to figure out if we're remotely connected, e.g. via ssh or
42 Terminal Server, and create a capture filter that matches aspects of the
43 connection. We match the following environment variables:
44  
45 SSH_CONNECTION (ssh): <remote IP> <remote port> <local IP> <local port>
46 SSH_CLIENT (ssh): <remote IP> <remote port> <local port>
47 REMOTEHOST (tcsh, others?): <remote name>
48 DISPLAY (x11): [remote name]:<display num>
49 CLIENTNAME (terminal server): <remote name>
50 */
51 const char *get_conn_cfilter(void);
52  
53 /** Check if we're running on a remote connection.
54 * @return TRUE if we're running remotely, FALSE if local.
55 */
56 gboolean display_is_remote(void);
57  
58 /** Set the latest opened directory.
59 * Will already be done when using file_selection_new().
60 *
61 * @param dirname the dirname
62 */
63 extern void set_last_open_dir(const char *dirname);
64  
65 #ifdef __cplusplus
66 }
67 #endif /* __cplusplus */
68  
69 #endif /* __UTIL_H__ */
70  
71 /*
72 * Editor modelines
73 *
74 * Local Variables:
75 * c-basic-offset: 4
76 * tab-width: 8
77 * indent-tabs-mode: nil
78 * End:
79 *
80 * ex: set shiftwidth=4 tabstop=8 expandtab:
81 * :indentSize=4:tabSize=8:noTabs=true:
82 */