diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-05-24 09:24:05 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-05-24 09:24:05 +0000 |
commit | 8a62ebc28de1fcd8b4f01065d224acbe904ae805 (patch) | |
tree | dcfa8b344d580131b387f8ee25f735da4c90ee72 /wiretap/libpcap.c | |
parent | d40cb34ba95e207eb6bb9a6697af795970fc9dea (diff) |
From Stephen Donnelly:
Add frame.interface_id support for pcap DLT_ERF file format
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7281
svn path=/trunk/; revision=42824
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r-- | wiretap/libpcap.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index c509643e7b..0e09e4026a 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -33,6 +33,7 @@ #include "pcap-common.h" #include "pcap-encap.h" #include "libpcap.h" +#include "erf.h" /* See source to the "libpcap" library for information on the "libpcap" file format. */ @@ -668,6 +669,14 @@ static gboolean libpcap_read(wtap *wth, int *err, gchar **err_info, } else { wth->phdr.ts.nsecs = hdr.hdr.ts_usec * 1000; } + } else { + /* update frame.interface_id for ERF format */ + wth->phdr.presence_flags |= WTAP_HAS_INTERFACE_ID; + wth->phdr.interface_id = wth->pseudo_header.erf.phdr.flags & 0x03; + + if(!wth->interface_data) { + erf_populate_interfaces(wth); + } } wth->phdr.caplen = packet_size; wth->phdr.len = orig_size; |