aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netscreen.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-12-13 09:53:50 +0000
committerGuy Harris <guy@alum.mit.edu>2011-12-13 09:53:50 +0000
commitd94bd07f99438278cb11f24b00571ab2907b6bdb (patch)
tree5f96d0a35c97af466bcb2d5b8a9371327bb0190f /wiretap/netscreen.c
parent1df4ee91090e35c25835204d7175b9395be32606 (diff)
Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports any
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
Diffstat (limited to 'wiretap/netscreen.c')
-rw-r--r--wiretap/netscreen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/netscreen.c b/wiretap/netscreen.c
index dadc4a6679..e3c29e70f3 100644
--- a/wiretap/netscreen.c
+++ b/wiretap/netscreen.c
@@ -360,7 +360,7 @@ parse_netscreen_rec_hdr(wtap *wth, const char *line, char *cap_int,
if (sscanf(line, "%9d.%9d: %15[a-z0-9/:.](%1[io]) len=%9d:%12s->%12s/",
&sec, &dsec, cap_int, direction, &pkt_len, cap_src, cap_dst) < 5) {
- *err = WTAP_ERR_BAD_RECORD;
+ *err = WTAP_ERR_BAD_FILE;
*err_info = g_strdup("netscreen: Can't parse packet-header");
return -1;
}
@@ -422,7 +422,7 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err, gchar **
continue;
}
} else {
- *err = WTAP_ERR_BAD_RECORD;
+ *err = WTAP_ERR_BAD_FILE;
*err_info = g_strdup("netscreen: cannot parse hex-data");
return -1;
}
@@ -432,7 +432,7 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err, gchar **
* then there must be an error in the file
*/
if(n == -1) {
- *err = WTAP_ERR_BAD_RECORD;
+ *err = WTAP_ERR_BAD_FILE;
*err_info = g_strdup("netscreen: cannot parse hex-data");
return -1;
}
@@ -444,7 +444,7 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err, gchar **
* header, then then there must be an error in the file
*/
if(offset > pkt_len) {
- *err = WTAP_ERR_BAD_RECORD;
+ *err = WTAP_ERR_BAD_FILE;
*err_info = g_strdup("netscreen: to much hex-data");
return -1;
}