Wireshark  4.3.0
The Wireshark network protocol analyzer
util.h
Go to the documentation of this file.
1 
12 #ifndef __UTIL_H__
13 #define __UTIL_H__
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif /* __cplusplus */
18 
19 /* Collect command-line arguments as a string consisting of the arguments,
20  * separated by spaces.
21  */
22 char *get_args_as_string(int argc, char **argv, int optindex);
23 
24 /* Compute the difference between two seconds/microseconds time stamps.
25  * Beware: we're using nanosecond resolution now and function is currently unused
26  */
27 void compute_timestamp_diff(gint *diffsec, gint *diffusec,
28  guint32 sec1, guint32 usec1, guint32 sec2, guint32 usec2);
29 
30 /* Try to figure out if we're remotely connected, e.g. via ssh or
31  Terminal Server, and create a capture filter that matches aspects of the
32  connection. We match the following environment variables:
33 
34  SSH_CONNECTION (ssh): <remote IP> <remote port> <local IP> <local port>
35  SSH_CLIENT (ssh): <remote IP> <remote port> <local port>
36  REMOTEHOST (tcsh, others?): <remote name>
37  DISPLAY (x11): [remote name]:<display num>
38  CLIENTNAME (terminal server): <remote name>
39  */
40 const char *get_conn_cfilter(void);
41 
45 gboolean display_is_remote(void);
46 
52 extern void set_last_open_dir(const char *dirname);
53 
54 #ifdef __cplusplus
55 }
56 #endif /* __cplusplus */
57 
58 #endif /* __UTIL_H__ */
void set_last_open_dir(const char *dirname)
Definition: main_application.cpp:164
gboolean display_is_remote(void)
Definition: util.c:331