diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-11-19 16:24:45 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-11-19 16:25:14 -0800 |
commit | 8f0dc5d921943ff6bc055f54c053e6eb742d3bd8 (patch) | |
tree | 0b9cc129371301318e5d043b705e032f6d1778fe | |
parent | b131cecfd1ee42886c13ed11639ce1ae6ce92ea3 (diff) | |
download | libpcap-8f0dc5d921943ff6bc055f54c053e6eb742d3bd8.tar.gz |
Add a link-layer header type for RFC 4391 IP-over-Infiniband.
-rw-r--r-- | pcap-common.c | 10 | ||||
-rw-r--r-- | pcap.c | 1 | ||||
-rw-r--r-- | pcap/bpf.h | 7 |
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 } }; @@ -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 }; @@ -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 |