|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <wireshark.h>Go to the source code of this file.
Classes | |
| struct | report_message_routines |
Functions | |
| WS_DLL_PUBLIC void | init_report_message (const char *friendly_program_name, const struct report_message_routines *routines) |
| Initialize the report message system with program context and output routines. | |
| WS_DLL_PUBLIC void | report_failure (const char *msg_format,...) G_GNUC_PRINTF(1 |
| Report a general error message. | |
| WS_DLL_PUBLIC void WS_DLL_PUBLIC void | report_warning (const char *msg_format,...) G_GNUC_PRINTF(1 |
| Report a general warning message. | |
| WS_DLL_PUBLIC void WS_DLL_PUBLIC void WS_DLL_PUBLIC void | report_open_failure (const char *filename, int err, bool for_writing) |
| WS_DLL_PUBLIC void | report_read_failure (const char *filename, int err) |
| WS_DLL_PUBLIC void | report_write_failure (const char *filename, int err) |
| WS_DLL_PUBLIC void | report_rename_failure (const char *old_filename, const char *new_filename, int err) |
| WS_DLL_PUBLIC void | report_cfile_open_failure (const char *filename, int err, char *err_info) |
| WS_DLL_PUBLIC void | report_cfile_dump_open_failure (const char *filename, int err, char *err_info, int file_type_subtype) |
| WS_DLL_PUBLIC void | report_cfile_read_failure (const char *filename, int err, char *err_info) |
| WS_DLL_PUBLIC void | report_cfile_write_failure (const char *in_filename, const char *out_filename, int err, char *err_info, uint64_t framenum, int file_type_subtype) |
| WS_DLL_PUBLIC void | report_cfile_close_failure (const char *filename, int err, char *err_info) |
| WS_DLL_PUBLIC const char * | get_friendly_program_name (void) |
| Return the "friendly" program name. | |
Declarations of routines for code that can run in GUI and command-line environments to use to report errors and warnings to the user (e.g., I/O errors, or problems with preference settings) if the message should be shown as a GUI error in a GUI environment.
The application using libwsutil will register message-reporting routines, and the routines declared here will call the registered routines. That way, these routines can be called by code that doesn't itself know whether to pop up a dialog or print something to the standard error.
XXX - Should the capture file (cfile) routines be moved to libwiretap?
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| WS_DLL_PUBLIC void init_report_message | ( | const char * | friendly_program_name, |
| const struct report_message_routines * | routines | ||
| ) |
Initialize the report message system with program context and output routines.
This function sets up the global reporting mechanism used for error, warning, and informational messages. It registers the program name and the set of callback routines that handle message output.
| friendly_program_name | A human-readable name for the program (e.g., "Wireshark"). This name may be included in formatted messages. |
| routines | Pointer to a structure containing function pointers for handling different types of report messages (e.g., errors, warnings, debug). |
| WS_DLL_PUBLIC void report_failure | ( | const char * | msg_format, |
| ... | |||
| ) |
Report a general error message.
Formats and emits an error message using the global reporting system.
| msg_format | printf-style format string. |
| ... | Arguments matching the format string. |
| WS_DLL_PUBLIC void WS_DLL_PUBLIC void report_warning | ( | const char * | msg_format, |
| ... | |||
| ) |
Report a general warning message.
Formats and emits a warning message using the global reporting system.
| msg_format | printf-style format string. |
| ... | Arguments matching the format string. |