if (ld->pdh) {
if (capture_opts->use_pcapng) {
char appname[100];
if (ld->pdh) {
if (capture_opts->use_pcapng) {
char appname[100];
- GString *runtime_info_str;
- runtime_info_str = g_string_new("");
- get_runtime_version_info(runtime_info_str, NULL);
+ os_info_str = g_string_new("");
+ get_os_version_info(os_info_str);
g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_svnversion);
successful = libpcap_write_session_header_block(ld->pdh,
NULL, /* Comment*/
NULL, /* HW*/
g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_svnversion);
successful = libpcap_write_session_header_block(ld->pdh,
NULL, /* Comment*/
NULL, /* HW*/
- runtime_info_str->str, /* OS*/
+ os_info_str->str, /* OS*/
appname,
-1, /* section_length */
&ld->bytes_written,
&err);
appname,
-1, /* section_length */
&ld->bytes_written,
&err);
- g_string_free(runtime_info_str, TRUE);
+ g_string_free(os_info_str, TRUE);
for (i = 0; successful && (i < capture_opts->ifaces->len); i++) {
interface_opts = g_array_index(capture_opts->ifaces, interface_options, i);
for (i = 0; successful && (i < capture_opts->ifaces->len); i++) {
interface_opts = g_array_index(capture_opts->ifaces, interface_options, i);
- * Get various library run-time versions, and the OS version, and append
- * them to the specified GString.
+ * Get the OS version, and append it to the GString
-void
-get_runtime_version_info(GString *str, void (*additional_info)(GString *))
+void get_os_version_info(GString *str)
{
#if defined(_WIN32)
OSVERSIONINFOEX info;
{
#if defined(_WIN32)
OSVERSIONINFOEX info;
#if HAVE_OS_X_FRAMEWORKS
SInt32 macosx_ver, macosx_major_ver, macosx_minor_ver, macosx_bugfix_ver;
#endif
#if HAVE_OS_X_FRAMEWORKS
SInt32 macosx_ver, macosx_major_ver, macosx_minor_ver, macosx_bugfix_ver;
#endif
-#ifndef _WIN32
- gchar *lang;
-#endif
-
- g_string_append(str, "on ");
#else
g_string_append(str, "an unknown OS");
#endif
#else
g_string_append(str, "an unknown OS");
#endif
+}
+
+
+/*
+ * Get various library run-time versions, and the OS version, and append
+ * them to the specified GString.
+ */
+void
+get_runtime_version_info(GString *str, void (*additional_info)(GString *))
+{
+#ifndef _WIN32
+ gchar *lang;
+#endif
+
+ g_string_append(str, "on ");
+
+ get_os_version_info(str);
#ifndef _WIN32
/* Locale */
#ifndef _WIN32
/* Locale */
void (*prepend_info)(GString *),
void (*append_info)(GString *));
void (*prepend_info)(GString *),
void (*append_info)(GString *));
+/*
+ * Get the OS version, and append it to the GString
+ */
+void get_os_version_info(GString *str);
+
/*
* Get various library run-time versions, and the OS version, and append
* them to the specified GString.
/*
* Get various library run-time versions, and the OS version, and append
* them to the specified GString.