diff options
author | Sam Leffler <sam@FreeBSD.org> | 2006-09-04 19:43:23 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2006-09-04 19:43:23 +0000 |
commit | 5d18909f051071ca5d247717c804d525cec0c356 (patch) | |
tree | db8dd338004459feebb8546681de0f273dcd020f /contrib/libpcap/savefile.c | |
parent | 04679efc461cf40fcd2f0d0c54918307fb25f037 (diff) | |
download | src-5d18909f051071ca5d247717c804d525cec0c356.tar.gz src-5d18909f051071ca5d247717c804d525cec0c356.zip |
Import of libpcap v0.9.4
Notes
Notes:
svn path=/vendor/libpcap/dist/; revision=162012
Diffstat (limited to 'contrib/libpcap/savefile.c')
-rw-r--r-- | contrib/libpcap/savefile.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/contrib/libpcap/savefile.c b/contrib/libpcap/savefile.c index ec1088d01320..52302c9141d5 100644 --- a/contrib/libpcap/savefile.c +++ b/contrib/libpcap/savefile.c @@ -30,7 +30,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.126.2.8 2005/06/03 20:36:57 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.126.2.13 2005/08/29 21:05:45 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -72,6 +72,12 @@ static const char rcsid[] _U_ = #define NAVTEL_TCPDUMP_MAGIC 0xa12b3c4d /* + * Normal libpcap format, except for seconds/nanoseconds timestamps, + * as per a request by Ulf Lamping <ulf.lamping@web.de> + */ +#define NSEC_TCPDUMP_MAGIC 0xa1b23c4d + +/* * We use the "receiver-makes-right" approach to byte order, * because time is at a premium when we are writing the file. * In other words, the pcap_file_header and pcap_pkthdr, @@ -412,6 +418,18 @@ static const char rcsid[] _U_ = */ #define LINKTYPE_LINUX_LAPD 177 +/* + * Juniper-private data link type, as per request from + * Hannes Gredler <hannes@juniper.net>. + * The Link Types are used for prepending meta-information + * like interface index, interface name + * before standard Ethernet, PPP, Frelay & C-HDLC Frames + */ +#define LINKTYPE_JUNIPER_ETHER 178 +#define LINKTYPE_JUNIPER_PPP 179 +#define LINKTYPE_JUNIPER_FRELAY 180 +#define LINKTYPE_JUNIPER_CHDLC 181 + static struct linktype_map { int dlt; int linktype; @@ -611,6 +629,13 @@ static struct linktype_map { /* viSDN LAPD */ { DLT_LINUX_LAPD, LINKTYPE_LINUX_LAPD }, + /* Juniper meta-information before Ether, PPP, Frame Relay, C-HDLC Frames */ + { DLT_JUNIPER_ETHER, LINKTYPE_JUNIPER_ETHER }, + { DLT_JUNIPER_PPP, LINKTYPE_JUNIPER_PPP }, + { DLT_JUNIPER_FRELAY, LINKTYPE_JUNIPER_FRELAY }, + { DLT_JUNIPER_CHDLC, LINKTYPE_JUNIPER_CHDLC }, + + { -1, -1 } }; @@ -722,7 +747,7 @@ sf_inject(pcap_t *p, const void *buf _U_, size_t size _U_) * single device? IN, OUT or both? */ static int -sf_setdirection(pcap_t *p, direction_t d) +sf_setdirection(pcap_t *p, pcap_direction_t d) { snprintf(p->errbuf, sizeof(p->errbuf), "Setting direction is not supported on savefiles"); |