diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-08-22 02:29:40 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-08-22 02:29:40 +0000 |
commit | 4b9ab6d1fce496323994ad288599e0f716be3449 (patch) | |
tree | b2848d90e752e28925e1506f98136d732c256877 /wiretap/lanalyzer.c | |
parent | 63a69a5ccaa96027d68119d36dda72480f5e9c29 (diff) | |
download | wireshark-4b9ab6d1fce496323994ad288599e0f716be3449.tar.gz wireshark-4b9ab6d1fce496323994ad288599e0f716be3449.tar.bz2 wireshark-4b9ab6d1fce496323994ad288599e0f716be3449.zip |
Get rid of some cruft left in by previous checkins as placeholders.
Get rid of WTAP_ENCAP_NONE; replace it with WTAP_ENCAP_UNKNOWN, which
means "I can't handle that file, it's using an encapsulation I don't
support".
Check for encapsulations we don't support, and return an error (as is
already done in "libpcap.c").
Check for too-large packet sizes, and return an error (as is already
done in "libpcap.c").
Print unsigned quantities in Wiretap messages with "%u", not "%d".
svn path=/trunk/; revision=544
Diffstat (limited to 'wiretap/lanalyzer.c')
-rw-r--r-- | wiretap/lanalyzer.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index da19d26f7e..b28cfa1444 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -1,6 +1,6 @@ /* lanalyzer.c * - * $Id: lanalyzer.c,v 1.12 1999/08/20 04:49:18 gram Exp $ + * $Id: lanalyzer.c,v 1.13 1999/08/22 02:29:40 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu> @@ -163,7 +163,11 @@ int lanalyzer_open(wtap *wth, int *err) wth->file_encap = WTAP_ENCAP_TR; break; default: - wth->file_encap = WTAP_ENCAP_NONE; + g_message("lanalyzer: board type %u unknown", + board_type); + g_free(wth->capture.lanalyzer); + *err = WTAP_ERR_UNSUPPORTED; + return -1; } break; @@ -229,6 +233,8 @@ static int lanalyzer_read(wtap *wth, int *err) * the middle of reading packets. If any other record type exists * after a Trace Packet Data Record, mark it as an error. */ if (record_type != REC_TRACE_PACKET_DATA) { + g_message("lanalyzer: record type %u seen after trace summary record", + record_type); *err = WTAP_ERR_BAD_RECORD; return -1; } |