2 * Routines to put up various "standard" alert boxes used in multiple
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0+*/
11 #ifndef __ALERT_BOX_H__
12 #define __ALERT_BOX_H__
16 #endif /* __cplusplus */
19 * Alert box for general errors.
21 extern void failure_alert_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
22 extern void vfailure_alert_box(const char *msg_format, va_list ap);
25 * Alert box for general warnings.
27 extern void vwarning_alert_box(const char *msg_format, va_list ap);
30 * Alert box for a failed attempt to open a capture file for reading.
31 * "filename" is the name of the file being opened; "err" is assumed
32 * to be a UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed
33 * to be a string giving further information for some WTAP_ERR_ values..
35 extern void cfile_open_failure_alert_box(const char *filename, int err,
39 * Alert box for a failed attempt to open a capture file for writing.
40 * "filename" is the name of the file being opened; "err" is assumed
41 * to be a UNIX-style errno or a WTAP_ERR_ value; "file_type_subtype"
42 * is a WTAP_FILE_TYPE_SUBTYPE_ value for the type and subtype of file
45 extern void cfile_dump_open_failure_alert_box(const char *filename, int err,
46 int file_type_subtype);
49 * Alert box for a failed attempt to read from a capture file.
50 * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value;
51 * "err_info" is assumed to be a string giving further information for
52 * some WTAP_ERR_ values.
54 extern void cfile_read_failure_alert_box(const char *filename, int err,
58 * Alert box for a failed attempt to write to a capture file.
59 * "in_filename" is the name of the file from which the record being
60 * written came; "out_filename" is the name of the file to which we're
61 * writing; "err" is assumed "err" is assumed to be a UNIX-style errno
62 * or a WTAP_ERR_ value; "err_info" is assumed to be a string giving
63 * further information for some WTAP_ERR_ values; "framenum" is the frame
64 * number of the record on which the error occurred; "file_type_subtype"
65 * is a WTAP_FILE_TYPE_SUBTYPE_ value for the type and subtype of file
68 extern void cfile_write_failure_alert_box(const char *in_filename,
69 const char *out_filename,
70 int err, gchar *err_info,
72 int file_type_subtype);
75 * Alert box for a failed attempt to close a capture file.
76 * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value.
78 * When closing a capture file:
80 * some information in the file that can't be determined until
81 * all packets have been written might be written to the file
82 * (such as a table of the file offsets of all packets);
84 * data buffered in the low-level file writing code might be
85 * flushed to the file;
87 * for remote file systems, data written to the file but not
88 * yet sent to the server might be sent to the server or, if
89 * that data was sent asynchronously, "out of space", "disk
90 * quota exceeded", or "I/O error" indications might have
91 * been received but not yet delivered, and the close operation
94 * so we have to check for write errors here.
96 extern void cfile_close_failure_alert_box(const char *filename, int err);
99 * Alert box for a failed attempt to open or create a file.
100 * "err" is assumed to be a UNIX-style errno; "for_writing" is TRUE if
101 * the file is being opened for writing and FALSE if it's being opened
104 extern void open_failure_alert_box(const char *filename, int err,
105 gboolean for_writing);
108 * Alert box for a failed attempt to read a file.
109 * "err" is assumed to be a UNIX-style errno.
111 extern void read_failure_alert_box(const char *filename, int err);
114 * Alert box for a failed attempt to write to a file.
115 * "err" is assumed to be a UNIX-style errno.
117 extern void write_failure_alert_box(const char *filename, int err);
121 #endif /* __cplusplus */
123 #endif /* __ALERT_BOX_H__ */
131 * indent-tabs-mode: nil
134 * ex: set shiftwidth=4 tabstop=8 expandtab:
135 * :indentSize=4:tabSize=8:noTabs=true: