aboutsummaryrefslogtreecommitdiffstats
path: root/epan/report_err.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-03-23 21:19:58 +0000
committerGuy Harris <guy@alum.mit.edu>2004-03-23 21:19:58 +0000
commit121f06fab70d77c4babb512924b2b8d3c3921944 (patch)
tree9dba3131d845040ea0ab402a8b3e4a5147d5d315 /epan/report_err.h
parentbf1315c25615bdd7d5ebff4245d8ba37b525871e (diff)
downloadwireshark-121f06fab70d77c4babb512924b2b8d3c3921944.tar.gz
wireshark-121f06fab70d77c4babb512924b2b8d3c3921944.tar.bz2
wireshark-121f06fab70d77c4babb512924b2b8d3c3921944.zip
Make "epan_init()" take, as additional arguments, pointers to routines
that dissectors should call to report file open and read errors, and have "report_open_failure()" and "report_read_failure()" call through those pointers, rather than being defined and exported by the application using libethereal - instead, the application would define those functions and pass pointers to them to 'epan_init()". Move "report_err.h" to the epan directory, as the functions it declares are now part of the libethereal API. svn path=/trunk/; revision=10470
Diffstat (limited to 'epan/report_err.h')
-rw-r--r--epan/report_err.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/epan/report_err.h b/epan/report_err.h
new file mode 100644
index 0000000000..ef116eb046
--- /dev/null
+++ b/epan/report_err.h
@@ -0,0 +1,48 @@
+/* report_err.h
+ * Declarations of routines for dissectors to use to report errors to
+ * the user (e.g., problems with preference settings)
+ *
+ * $Id: report_err.h,v 1.1 2004/03/23 21:19:56 guy Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __REPORT_ERR_H__
+#define __REPORT_ERR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Report an error when trying to open a file.
+ */
+extern void report_open_failure(const char *filename, int err,
+ gboolean for_writing);
+
+/*
+ * Report an error when trying to read a file.
+ */
+extern void report_read_failure(const char *filename, int err);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __REPORT_ERR_H__ */