return;
case DLT_RAW:
+ case DLT_IPV4:
+ case DLT_IPV6:
off_linktype = -1;
off_macpl = 0;
off_nl = 0;
/*NOTREACHED*/
break;
+ case DLT_IPV4:
+ /*
+ * Raw IPv4, so no type field.
+ */
+ if (proto == ETHERTYPE_IP)
+ return gen_true(); /* always true */
+
+ /* Checking for something other than IPv4; always false */
+ return gen_false();
+ /*NOTREACHED*/
+ break;
+
+ case DLT_IPV6:
+ /*
+ * Raw IPv6, so no type field.
+ */
+#ifdef INET6
+ if (proto == ETHERTYPE_IPV6)
+ return gen_true(); /* always true */
+#endif
+
+ /* Checking for something other than IPv6; always false */
+ return gen_false();
+ /*NOTREACHED*/
+ break;
+
case DLT_PPP:
case DLT_PPP_PPPD:
case DLT_PPP_SERIAL:
DLT_CHOICE(DLT_FC_2_WITH_FRAME_DELIMS, "Fibre Channel FC-2 with frame delimiters"),
DLT_CHOICE(DLT_IPNET, "Solaris ipnet"),
DLT_CHOICE(DLT_CAN_SOCKETCAN, "CAN-bus with SocketCAN headers"),
+ DLT_CHOICE(DLT_IPV4, "Raw IPv4"),
+ DLT_CHOICE(DLT_IPV6, "Raw IPv6"),
DLT_CHOICE_SENTINEL
};
*/
#define DLT_CAN_SOCKETCAN 227
+/*
+ * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
+ */
+#define DLT_IPV4 228
+#define DLT_IPV6 229
+
/*
* IPNET
*/
#define IPNET_OUTBOUND 1
#define IPNET_INBOUND 2
-
/*
* DLT and savefile link type values are split into a class and
* a member of that class. A class value of 0 indicates a regular
*/
#define LINKTYPE_CAN_SOCKETCAN 227
-#define LINKTYPE_IPNET 226
+/*
+ * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
+ */
+#define LINKTYPE_IPV4 228
+#define LINKTYPE_IPV6 229
static struct linktype_map {
/* CAN frames with SocketCAN headers */
{ DLT_CAN_SOCKETCAN, LINKTYPE_CAN_SOCKETCAN },
- /* Solaris IPNET */
- { DLT_IPNET, LINKTYPE_IPNET },
+ /* Raw IPv4/IPv6 */
+ { DLT_IPV4, LINKTYPE_IPV4 },
+ { DLT_IPV6, LINKTYPE_IPV6 },
{ -1, -1 }
};