]> The Tcpdump Group git mirrors - libpcap/commitdiff
Add a link-layer header type for RFC 4391 IP-over-Infiniband.
authorGuy Harris <[email protected]>
Sun, 20 Nov 2011 00:24:45 +0000 (16:24 -0800)
committerGuy Harris <[email protected]>
Sun, 20 Nov 2011 00:25:14 +0000 (16:25 -0800)
pcap-common.c
pcap.c
pcap/bpf.h

index 9af2aaab5ee6c0c17a7dba6ac82cd3d93d710a82..a0eb3a25414f28619e349d62498104ccd13f3434 100644 (file)
  */
 #define LINKTYPE_NETANALYZER_TRANSPARENT       241
 
  */
 #define LINKTYPE_NETANALYZER_TRANSPARENT       241
 
+/*
+ * IP-over-Infiniband, as specified by RFC 4391.
+ *
+ * Requested by Petr Sumbera <[email protected]>.
+ */
+#define LINKTYPE_IPOIB                         242
+
 
 static struct linktype_map {
        int     dlt;
 
 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 },
 
        /* 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 }
 };
 
        { -1,                   -1 }
 };
 
diff --git a/pcap.c b/pcap.c
index 9fc26f91e733b50ce60818eac6bc4d81c8de40cb..b0146a7bd9b06e5baf79889e26e2239552ac5783 100644 (file)
--- 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_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
 };
 
        DLT_CHOICE_SENTINEL
 };
 
index 0820861ed1ab74584f93cd6f18934a964f380aca..354652bccc796f0a280c51e52ddbc14dffa05408 100644 (file)
@@ -1061,6 +1061,13 @@ struct bpf_program {
  */
 #define DLT_NETANALYZER_TRANSPARENT    241
 
  */
 #define DLT_NETANALYZER_TRANSPARENT    241
 
+/*
+ * IP-over-Infiniband, as specified by RFC 4391.
+ *
+ * Requested by Petr Sumbera <[email protected]>.
+ */
+#define DLT_IPOIB                      242
+
 
 /*
  * DLT and savefile link type values are split into a class and
 
 /*
  * DLT and savefile link type values are split into a class and