aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-nettl.c9
-rw-r--r--wiretap/nettl.c13
-rw-r--r--wiretap/nettl.h8
3 files changed, 17 insertions, 13 deletions
diff --git a/epan/dissectors/packet-nettl.c b/epan/dissectors/packet-nettl.c
index 4f7f54fe88..c44e02903f 100644
--- a/epan/dissectors/packet-nettl.c
+++ b/epan/dissectors/packet-nettl.c
@@ -183,6 +183,7 @@ static const value_string subsystem[] = {
{ 269, "HSSN" },
{ 270, "IGSSN" },
{ 271, "ICXGBE" },
+ { 275, "IEXGBE" },
{ 513, "KL_VM" },
{ 514, "KL_PKM" },
{ 515, "KL_DLKM" },
@@ -255,12 +256,8 @@ dissect_nettl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(data_handle, tvb, pinfo, tree);
break;
case WTAP_ENCAP_NETTL_RAW_IP:
- if ( ( (pinfo->pseudo_header->nettl.kind
- & ~NETTL_HDR_SUBSYSTEM_BITS_MASK)
- & (NETTL_HDR_PROCEDURE_TRACE |
- NETTL_HDR_STATE_TRACE |
- NETTL_HDR_ERROR_TRACE) ) != 0)
- /* not really a data packet */
+ if ( (pinfo->pseudo_header->nettl.kind & NETTL_HDR_PDU_MASK) == 0 )
+ /* not actually a data packet (PDU) trace record */
call_dissector(data_handle, tvb, pinfo, tree);
else if (pinfo->pseudo_header->nettl.subsys == NETTL_SUBSYS_NS_LS_SCTP )
call_dissector(sctp_handle, tvb, pinfo, tree);
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);