summaryrefslogtreecommitdiff
path: root/wiretap/ngsniffer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-16 22:22:29 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-17 06:22:57 +0000
commit40f69b2778cb6a9add18cfeacbca430284b1cd66 (patch)
tree009e9cf4303fe66a2c8b3755fb2952ad993f2c4a /wiretap/ngsniffer.c
parentb56d4d01876a378530922e4de446b8434f75d871 (diff)
downloadwireshark-40f69b2778cb6a9add18cfeacbca430284b1cd66.tar.gz
Use WTAP_ERR_UNSUPPORTED for input file stuff we can't handle.
WTAP_ERR_UNSUPPORTED_ENCAP means "I can't *write* that particular encapsulation type to a file of this format", which mainly means "that file format simply can't handle packets of that type"; WTAP_ERR_UNSUPPORTED means "this file can't currently be supported by Wireshark, as there's some feature in the file - such as a file or per-packet encapsulation type - that we don't (yet) handle". Change-Id: I53cadf9913d20efb2bccb29f61877b71d53807be Reviewed-on: https://code.wireshark.org/review/5794 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r--wiretap/ngsniffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index c665fc1f6b..3f31395e0d 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -609,7 +609,7 @@ ngsniffer_open(wtap *wth, int *err, gchar **err_info)
/* Check the data link type. */
if (version.network >= NUM_NGSNIFF_ENCAPS
|| sniffer_encap[version.network] == WTAP_ENCAP_UNKNOWN) {
- *err = WTAP_ERR_UNSUPPORTED_ENCAP;
+ *err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup_printf("ngsniffer: network type %u unknown or unsupported",
version.network);
return WTAP_OPEN_ERROR;
@@ -888,7 +888,7 @@ process_rec_header2_v2(wtap *wth, unsigned char *buffer, guint16 length,
/*
* There's not enough data to compare.
*/
- *err = WTAP_ERR_UNSUPPORTED_ENCAP;
+ *err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup_printf("ngsniffer: WAN capture has too-short protocol list");
return -1;
}
@@ -899,7 +899,7 @@ process_rec_header2_v2(wtap *wth, unsigned char *buffer, guint16 length,
*/
wth->file_encap = WTAP_ENCAP_LAPB;
} else {
- *err = WTAP_ERR_UNSUPPORTED_ENCAP;
+ *err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup_printf("ngsniffer: WAN capture protocol string %.*s unknown",
length, buffer);
return -1;
@@ -919,7 +919,7 @@ process_rec_header2_v145(wtap *wth, unsigned char *buffer, guint16 length,
/*
* There is no 5th byte; give up.
*/
- *err = WTAP_ERR_UNSUPPORTED_ENCAP;
+ *err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup("ngsniffer: WAN capture has no network subtype");
return -1;
}
@@ -988,7 +988,7 @@ process_rec_header2_v145(wtap *wth, unsigned char *buffer, guint16 length,
/*
* There is no 5th byte; give up.
*/
- *err = WTAP_ERR_UNSUPPORTED_ENCAP;
+ *err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup("ngsniffer: WAN bridge/router capture has no ISDN flag");
return -1;
}
@@ -1006,7 +1006,7 @@ process_rec_header2_v145(wtap *wth, unsigned char *buffer, guint16 length,
/*
* Reject these until we can figure them out.
*/
- *err = WTAP_ERR_UNSUPPORTED_ENCAP;
+ *err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup_printf("ngsniffer: WAN network subtype %u unknown or unsupported",
buffer[4]);
return -1;