summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-11-19 16:24:45 -0800
committerGuy Harris <guy@alum.mit.edu>2011-11-19 16:25:14 -0800
commit8f0dc5d921943ff6bc055f54c053e6eb742d3bd8 (patch)
tree0b9cc129371301318e5d043b705e032f6d1778fe
parentb131cecfd1ee42886c13ed11639ce1ae6ce92ea3 (diff)
downloadlibpcap-8f0dc5d921943ff6bc055f54c053e6eb742d3bd8.tar.gz
Add a link-layer header type for RFC 4391 IP-over-Infiniband.
-rw-r--r--pcap-common.c10
-rw-r--r--pcap.c1
-rw-r--r--pcap/bpf.h7
3 files changed, 18 insertions, 0 deletions
diff --git a/pcap-common.c b/pcap-common.c
index 9af2aaab..a0eb3a25 100644
--- a/pcap-common.c
+++ b/pcap-common.c
@@ -807,6 +807,13 @@
*/
#define LINKTYPE_NETANALYZER_TRANSPARENT 241
+/*
+ * IP-over-Infiniband, as specified by RFC 4391.
+ *
+ * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
+ */
+#define LINKTYPE_IPOIB 242
+
static struct linktype_map {
int dlt;
@@ -1189,6 +1196,9 @@ static struct linktype_map {
/* Ethernet with Hilscher netANALYZER pseudo-header and with preamble/SFD */
{ DLT_NETANALYZER_TRANSPARENT, LINKTYPE_NETANALYZER_TRANSPARENT },
+ /* RFC 4391 IP-over-Infiniband */
+ { DLT_IPOIB, LINKTYPE_IPOIB },
+
{ -1, -1 }
};
diff --git a/pcap.c b/pcap.c
index 9fc26f91..b0146a7b 100644
--- a/pcap.c
+++ b/pcap.c
@@ -864,6 +864,7 @@ static struct dlt_choice dlt_choices[] = {
DLT_CHOICE(DLT_NFLOG, "Linux netfilter log messages"),
DLT_CHOICE(DLT_NETANALYZER, "Ethernet with Hilscher netANALYZER pseudo-header"),
DLT_CHOICE(DLT_NETANALYZER_TRANSPARENT, "Ethernet with Hilscher netANALYZER pseudo-header and with preamble and SFD"),
+ DLT_CHOICE(DLT_IPOIB, "RFC 4391 IP-over-Infiniband"),
DLT_CHOICE_SENTINEL
};
diff --git a/pcap/bpf.h b/pcap/bpf.h
index 0820861e..354652bc 100644
--- a/pcap/bpf.h
+++ b/pcap/bpf.h
@@ -1061,6 +1061,13 @@ struct bpf_program {
*/
#define DLT_NETANALYZER_TRANSPARENT 241
+/*
+ * IP-over-Infiniband, as specified by RFC 4391.
+ *
+ * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
+ */
+#define DLT_IPOIB 242
+
/*
* DLT and savefile link type values are split into a class and