aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/erf.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-03-14 17:47:53 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-03-14 17:47:53 +0000
commit2aefe192447e4e98234d711b64a2813441d0ac8c (patch)
tree73c5653c388e74ea09b7f70042a978dc23b9f2f2 /wiretap/erf.c
parent5cdfb6e973b51d608a3b5f1688fe8ed3a41ec7ee (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24628 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r--wiretap/erf.c11
1 files changed, 9 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: