aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-08-22 06:04:40 +0000
committerGuy Harris <guy@alum.mit.edu>2000-08-22 06:04:40 +0000
commit064936053c5c2db7dd2cf4eec0f744a3dcbaca87 (patch)
treeeb752eade1e0e6e3965a513930b38cb09a2c7fa8 /capture.c
parent0746b8a5edb37c5c7acd64353b8c764445994e3a (diff)
Given that DLT_ values and libpcap appear to mutate almost as fast as
the influenza virus, if "wtap_pcap_encap_to_wtap_encap()" returns WTAP_ENCAP_UNKNOWN, indicating that the libpcap encapsulation type can't be mapped to a Wiretap encapsulation type, include the data link type in the message, so the user can at least give us a clue as to what type it is that we don't support (or, at least, the DLT_ value for that type - it could well be some standard type whose value just got gratuitously changed). svn path=/trunk/; revision=2333
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/capture.c b/capture.c
index 9c04369999..ad6b318ba8 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.121 2000/08/20 07:53:29 guy Exp $
+ * $Id: capture.c,v 1.122 2000/08/22 06:04:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -1108,8 +1108,9 @@ capture(void)
}
ld.linktype = wtap_pcap_encap_to_wtap_encap(pcap_encap);
if (ld.linktype == WTAP_ENCAP_UNKNOWN) {
- strcpy(errmsg, "The network you're capturing from is of a type"
- " that Ethereal doesn't support.");
+ snprintf(errmsg, sizeof errmsg,
+ "The network you're capturing from is of a type"
+ " that Ethereal doesn't support (data link type %d).", pcap_encap);
goto error;
}
ld.pdh = wtap_dump_fdopen(cfile.save_file_fd, WTAP_FILE_PCAP,