2 * Declarations of routines to report version information for Wireshark
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __WS_VERSION_INFO_H__
13 #define __WS_VERSION_INFO_H__
19 #endif /* __cplusplus */
22 * Initialize information about the program for various purposes, including
23 * reporting the version and build information for the program, putting
24 * that information into crash dumps if possible, and giving the program
25 * name and version information into capture files written by the program
28 * "appname" is a string that appears at the beginning of the information;
29 * it should include the application name, followed by "(Wireshark)" if
30 * the program isn't Wireshark.
32 * "prepend_compile_time_info" is called at the start to prepend any
33 * additional build information before the standard library information.
35 * "append_compile_time_info" is called at the end to append any additional
36 * build information after the standard library information. This is
37 * required in order to, for example, put Qt information at the
38 * end of the string, as we don't use Qt in TShark.
40 * "additional_info" is called at the end to append any additional
41 * run-time information; this is required in order to, for example,
42 * put the libcap information at the end of the string, as we currently
43 * don't use libcap in TShark.
45 void ws_init_version_info(const char *appname,
46 void (*prepend_compile_time_info)(GString *),
47 void (*append_compile_time_info)(GString *),
48 void (*additional_run_time_info)(GString *));
51 * Get a string giving the application name, as provided to
52 * ws_init_version_info(), followed by a string giving the
53 * application version.
55 const char *get_appname_and_version(void);
58 * Get various library compile-time versions, put them in a GString,
59 * and return the GString.
61 * "prepend_info" is called at the start to prepend any additional
62 * information before the standard library information.
64 * "append_info" is called at the end to append any additional
65 * information after the standard library information. This is
66 * required in order to, for example, put Qt information at the
67 * end of the string, as we don't use Qt in TShark.
69 GString *get_compiled_version_info(void (*prepend_info)(GString *),
70 void (*append_info)(GString *));
73 * Get various library run-time versions, and the OS version, put them in
74 * a GString, and return the GString.
76 * "additional_info" is called at the end to append any additional
77 * information; this is required in order to, for example, put the
78 * libcap information at the end of the string, as we currently
79 * don't use libcap in TShark.
81 GString *get_runtime_version_info(void (*additional_info)(GString *));
84 * Return a version number string for Wireshark, including, for builds
85 * from a tree checked out from Wireshark's version control system,
86 * something identifying what version was checked out.
88 const char *get_ws_vcs_version_info(void);
91 * Return version number as integers.
93 void get_ws_version_number(int *major, int *minor, int *micro);
96 * Show the program name and version number information on the standard
97 * output; this is used for command-line "show the version" options.
99 void show_version(void);
102 * Show the program name and version number information, a supplied
103 * description string, and a "See {URL} for more information" message.
104 * This is used for command-line "help" options.
106 void show_help_header(const char *description);
110 #endif /* __cplusplus */
112 #endif /* __WS_VERSION_INFO_H__ */