]> The Tcpdump Group git mirrors - libpcap/commitdiff
Make sure DLT_ updates include LINKTYPE_ updates.
authorGuy Harris <[email protected]>
Sun, 24 Jun 2018 19:14:45 +0000 (12:14 -0700)
committerGuy Harris <[email protected]>
Sun, 24 Jun 2018 19:14:59 +0000 (12:14 -0700)
From a suggestion by mcr.

pcap-common.c

index 7f2b81a3a33763c6d5f5da81dbf5adc823064c08..7561fb3d81cb241bc1a78cc0d06a3e85441915ae 100644 (file)
 
 #define LINKTYPE_MATCHING_MAX  275             /* highest value in the "matching" range */
 
+/*
+ * The DLT_ and LINKTYPE_ values in the "matching" range should be the
+ * same, so DLT_MATCHING_MAX and LINKTYPE_MATCHING_MAX should be the
+ * same.
+ */
+#if LINKTYPE_MATCHING_MAX != DLT_MATCHING_MAX
+#error The LINKTYPE_ matching range doesn't match the DLT_ matching range
+#endif
+
 static struct linktype_map {
        int     dlt;
        int     linktype;