2 * Routines to print various "standard" failure messages 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-or-later
12 #ifndef __FAILURE_MESSAGE_H__
13 #define __FAILURE_MESSAGE_H__
17 #endif /* __cplusplus */
20 * Error message for a failed attempt to open a capture file for input.
21 * "progname" is the name of the program trying to open the file;
22 * "filename" is the name of the file being opened; "err" is assumed
23 * to be a UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed
24 * to be a string giving further information for some WTAP_ERR_ values.
26 extern void cfile_open_failure_message(const char *progname,
27 const char *filename, int err,
31 * Error message for a failed attempt to open a capture file for writing.
32 * "progname" is the name of the program trying to open the file;
33 * "filename" is the name of the file being opened; "err" is assumed
34 * to be a UNIX-style errno or a WTAP_ERR_ value; "file_type_subtype" is
35 * a WTAP_FILE_TYPE_SUBTYPE_ value for the type and subtype of file being
38 extern void cfile_dump_open_failure_message(const char *progname,
39 const char *filename, int err,
40 int file_type_subtype);
43 * Error message for a failed attempt to read from a capture file.
44 * "progname" is the name of the program trying to open the file;
45 * "filename" is the name of the file being opened; "err" is assumed
46 * to be a UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed
47 * to be a string giving further information for some WTAP_ERR_ values.
49 extern void cfile_read_failure_message(const char *progname,
50 const char *filename, int err,
54 * Error message for a failed attempt to write to a capture file.
55 * "progname" is the name of the program trying to open the file;
56 * "in_filename" is the name of the file from which the record
57 * being written came; "out_filename" is the name of the file to
58 * which we're writing; "err" is assumed "err" is assumed to be a
59 * UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed to be
60 * a string giving further information for some WTAP_ERR_ values;
61 * "framenum" is the frame number of the record on which the error
62 * occurred; "file_type_subtype" is a WTAP_FILE_TYPE_SUBTYPE_ value
63 * for the type and subtype of file being written.
65 extern void cfile_write_failure_message(const char *progname,
66 const char *in_filename,
67 const char *out_filename,
68 int err, gchar *err_info,
70 int file_type_subtype);
73 * Error message for a failed attempt to close a capture file.
74 * "filename" is the name of the file being closed; "err" is assumed
75 * to be a UNIX-style errno or a WTAP_ERR_ value.
77 * When closing a capture file:
79 * some information in the file that can't be determined until
80 * all packets have been written might be written to the file
81 * (such as a table of the file offsets of all packets);
83 * data buffered in the low-level file writing code might be
84 * flushed to the file;
86 * for remote file systems, data written to the file but not
87 * yet sent to the server might be sent to the server or, if
88 * that data was sent asynchronously, "out of space", "disk
89 * quota exceeded", or "I/O error" indications might have
90 * been received but not yet delivered, and the close operation
93 * so we have to check for write errors here.
95 extern void cfile_close_failure_message(const char *filename, int err);
99 #endif /* __cplusplus */
101 #endif /* __FAILURE_MESSAGE_H__ */
109 * indent-tabs-mode: nil
112 * ex: set shiftwidth=4 tabstop=8 expandtab:
113 * :indentSize=4:tabSize=8:noTabs=true: