summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2008-03-14 17:47:53 +0000
committerGerald Combs <gerald@wireshark.org>2008-03-14 17:47:53 +0000
commit68d23708bc686821b0df3c3ffaaf233cca6e4eee (patch)
tree73c5653c388e74ea09b7f70042a978dc23b9f2f2 /wiretap
parent14e0b8f79233987dde0b88aec2667cf9244c9585 (diff)
downloadwireshark-68d23708bc686821b0df3c3ffaaf233cca6e4eee.tar.gz
From Stephen Donnelly via bug 2235:
This plugin implements a dissector for Infiniband. It is released under the GPL v2. Rather than using say libpcap to capture raw (unframed) IP packets from near the top of an IPoIB stack, this plugin dissects link level Infiniband frames. Infiniband trace files can be read from Endace ERF format trace files, or from libpcap DLT_ERF files containing ERF TYPE_INFINIBAND records. There is currently no native DLT_INFINIBAND in libpcap. Each record contains a hardware timestamp, capture metadata such as port Id, and a complete link level Infiniband frame starting from the Local Route Header. svn path=/trunk/; revision=24628
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/erf.c11
-rw-r--r--wiretap/erf.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index 01c6dbdbf4..e81f76cf55 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -159,7 +159,7 @@ int erf_open(wtap *wth, int *err, gchar **err_info _U_)
}
/* The ERF_TYPE_MAX is the PAD record, but the last used type is ERF_TYPE_AAL2 */
- if (header.type > ERF_TYPE_AAL2 ) {
+ if (header.type > ERF_TYPE_INFINIBAND) {
return 0;
}
@@ -347,7 +347,14 @@ static int erf_read_header(
pseudo_header->erf.phdr.wlen = g_ntohs(erf_header->wlen);
switch (erf_header->type) {
-
+
+ case ERF_TYPE_INFINIBAND:
+ if (phdr != NULL)
+ {
+ phdr->len = g_htons(erf_header->wlen);
+ phdr->caplen = g_htons(erf_header->wlen);
+ }
+ break;
case ERF_TYPE_HDLC_POS:
case ERF_TYPE_COLOR_HDLC_POS:
case ERF_TYPE_DSM_COLOR_HDLC_POS:
diff --git a/wiretap/erf.h b/wiretap/erf.h
index cf46072b29..ee79d974f1 100644
--- a/wiretap/erf.h
+++ b/wiretap/erf.h
@@ -58,6 +58,7 @@
#define ERF_TYPE_DSM_COLOR_ETH 16
#define ERF_TYPE_COLOR_MC_HDLC_POS 17
#define ERF_TYPE_AAL2 18
+#define ERF_TYPE_INFINIBAND 21
#define ERF_TYPE_PAD 48