aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2009-02-25 23:19:56 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2009-02-25 23:19:56 +0000
commitb47e7619e63cf96cf8537f292cdae68161c461c6 (patch)
tree4c9496743597ab6031b56172c3e6a35fa7cb1625 /wiretap
parent88b8066be3e331f703937ec86008ba5dcffbd529 (diff)
From Mark C. Brown:
Added support for HPVM (Integrity Virtual Machines) guest AVIO (Accelerated Virtual IO) driver IGSSN. Cleaned up the trace record checks. Made the default ethernet if the nettl subsystem is not recognized. svn path=/trunk/; revision=27549
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/nettl.c13
-rw-r--r--wiretap/nettl.h8
2 files changed, 14 insertions, 7 deletions
diff --git a/wiretap/nettl.c b/wiretap/nettl.c
index dad9c02122..0b758ae7f5 100644
--- a/wiretap/nettl.c
+++ b/wiretap/nettl.c
@@ -411,11 +411,8 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
return -1;
offset += hdr_len;
- if ( ( (pntohl(&rec_hdr.kind) & ~NETTL_HDR_SUBSYSTEM_BITS_MASK)
- & (NETTL_HDR_PROCEDURE_TRACE |
- NETTL_HDR_STATE_TRACE |
- NETTL_HDR_ERROR_TRACE) ) != 0) {
- /* not actually a packet trace record */
+ if ( (pntohl(&rec_hdr.kind) & NETTL_HDR_PDU_MASK) == 0 ) {
+ /* not actually a data packet (PDU) trace record */
phdr->pkt_encap = WTAP_ENCAP_NETTL_RAW_IP;
length = pntohl(&rec_hdr.length);
caplen = pntohl(&rec_hdr.caplen);
@@ -434,8 +431,10 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
case NETTL_SUBSYS_IGELAN :
case NETTL_SUBSYS_IETHER :
case NETTL_SUBSYS_IXGBE :
+ case NETTL_SUBSYS_HSSN :
case NETTL_SUBSYS_IGSSN :
case NETTL_SUBSYS_ICXGBE :
+ case NETTL_SUBSYS_IEXGBE :
case NETTL_SUBSYS_HPPB_FDDI :
case NETTL_SUBSYS_EISA_FDDI :
case NETTL_SUBSYS_PCI_FDDI :
@@ -600,8 +599,10 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
break;
default:
+ /* We're going to assume it's ethernet if we don't recognize the
+ subsystem -- We'll probably spew junks and core if it isn't... */
wth->file_encap = WTAP_ENCAP_PER_PACKET;
- phdr->pkt_encap = WTAP_ENCAP_NETTL_UNKNOWN;
+ phdr->pkt_encap = WTAP_ENCAP_NETTL_ETHERNET;
length = pntohl(&rec_hdr.length);
caplen = pntohl(&rec_hdr.caplen);
padlen = 0;
diff --git a/wiretap/nettl.h b/wiretap/nettl.h
index 547aab24b2..be65ab63f5 100644
--- a/wiretap/nettl.h
+++ b/wiretap/nettl.h
@@ -92,8 +92,8 @@
#define NETTL_SUBSYS_IGELAN 252
#define NETTL_SUBSYS_IETHER 253
#define NETTL_SUBSYS_IXGBE 265
-#define NETTL_SUBSYS_IGSSN 270
#define NETTL_SUBSYS_ICXGBE 271
+#define NETTL_SUBSYS_IEXGBE 275
/* FDDI cards */
#define NETTL_SUBSYS_HPPB_FDDI 95
@@ -105,6 +105,10 @@
#define NETTL_SUBSYS_TOKEN 31
#define NETTL_SUBSYS_PCI_TR 187
+/* Accelerated Virtual I/O (AVIO) drivers */
+#define NETTL_SUBSYS_HSSN 269
+#define NETTL_SUBSYS_IGSSN 270
+
/* from /usr/include/sys/subsys_id.h */
#define NETTL_HDR_HDRIN 0x80000000
@@ -119,6 +123,8 @@
#define NETTL_HDR_PTOP 0x00400000
#define NETTL_HDR_SUBSYSTEM_BITS_MASK 0x000fffff
+#define NETTL_HDR_PDU_MASK 0x30000000
+
int nettl_open(wtap *wth, int *err, gchar **err_info);
gboolean nettl_dump_open(wtap_dumper *wdh, gboolean cant_seek _U_, int *err);
int nettl_dump_can_write_encap(int encap);