diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-16 22:22:29 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-17 06:22:57 +0000 |
commit | 40f69b2778cb6a9add18cfeacbca430284b1cd66 (patch) | |
tree | 009e9cf4303fe66a2c8b3755fb2952ad993f2c4a /wiretap/netmon.c | |
parent | b56d4d01876a378530922e4de446b8434f75d871 (diff) | |
download | wireshark-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/netmon.c')
-rw-r--r-- | wiretap/netmon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/netmon.c b/wiretap/netmon.c index 8a0725ad08..9b23d284b7 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -237,7 +237,7 @@ wtap_open_return_val netmon_open(wtap *wth, int *err, gchar **err_info) hdr.network = pletoh16(&hdr.network); if (hdr.network >= NUM_NETMON_ENCAPS || netmon_encap[hdr.network] == WTAP_ENCAP_UNKNOWN) { - *err = WTAP_ERR_UNSUPPORTED_ENCAP; + *err = WTAP_ERR_UNSUPPORTED; *err_info = g_strdup_printf("netmon: network type %u unknown or unsupported", hdr.network); return WTAP_OPEN_ERROR; @@ -669,7 +669,7 @@ netmon_process_record(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, network &= 0x0FFF; pkt_encap = wtap_pcap_encap_to_wtap_encap(network); if (pkt_encap == WTAP_ENCAP_UNKNOWN) { - *err = WTAP_ERR_UNSUPPORTED_ENCAP; + *err = WTAP_ERR_UNSUPPORTED; *err_info = g_strdup_printf("netmon: converted pcap network type %u unknown or unsupported", network); return FAILURE; @@ -680,7 +680,7 @@ netmon_process_record(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, */ pkt_encap = netmon_encap[network]; if (pkt_encap == WTAP_ENCAP_UNKNOWN) { - *err = WTAP_ERR_UNSUPPORTED_ENCAP; + *err = WTAP_ERR_UNSUPPORTED; *err_info = g_strdup_printf("netmon: network type %u unknown or unsupported", network); return FAILURE; @@ -734,7 +734,7 @@ netmon_process_record(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, return RETRY; default: - *err = WTAP_ERR_UNSUPPORTED_ENCAP; + *err = WTAP_ERR_UNSUPPORTED; *err_info = g_strdup_printf("netmon: network type %u unknown or unsupported", network); return FAILURE; |