aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-17 16:02:50 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-18 00:03:26 +0000
commit51522b33723dec4dd0481dcabc261010be39937c (patch)
tree4c772ba5dd3a61a470784464e39573ca27c5028c /wiretap/wtap.h
parent8ce0f122011f26ab4e81172e9899ed27a5508abd (diff)
Handle "I can't map this for that file format" better.
For cases where record (meta)data is something that can't be written out in a particular file format, return WTAP_ERR_UNWRITABLE_REC_DATA along with an err_info string. Report (and free) that err_info string in cases where WTAP_ERR_UNWRITABLE_REC_DATA is returned. Clean up some other error reporting cases, and flag with an XXX some cases where we aren't reporting errors at all, while we're at it. Change-Id: I91d02093af0d42c24ec4634c2c773b30f3d39ab3 Reviewed-on: https://code.wireshark.org/review/5823 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index e7d80da355..5e707a24db 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1562,7 +1562,8 @@ wtap_dumper* wtap_dump_fdopen_ng(int fd, int filetype, int encap, int snaplen,
WS_DLL_PUBLIC
-gboolean wtap_dump(wtap_dumper *, const struct wtap_pkthdr *, const guint8 *, int *err);
+gboolean wtap_dump(wtap_dumper *, const struct wtap_pkthdr *, const guint8 *,
+ int *err, gchar **err_info);
WS_DLL_PUBLIC
void wtap_dump_flush(wtap_dumper *);
WS_DLL_PUBLIC
@@ -1738,6 +1739,9 @@ int wtap_register_encap_type(const char* name, const char* short_name);
#define WTAP_ERR_REC_TYPE_UNSUPPORTED -24
/** Specified record type can't be written to that file type */
+#define WTAP_ERR_UNWRITABLE_REC_DATA -25
+ /** Something in the record data can't be written to that file type */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */