]> The Tcpdump Group git mirrors - tcpdump/blobdiff - addrtoname.c
Add CAP_FCNTL and use cap_fcntls_limit().
[tcpdump] / addrtoname.c
index f6e070e705b47400a219f467c6e4cebb85259124..d0437fe490a37e11f3fb399264cfd8347dec44ca 100644 (file)
@@ -1215,3 +1215,15 @@ newh6namemem(void)
        return (p);
 }
 #endif /* INET6 */
+
+/* Represent TCI part of the 802.1Q 4-octet tag as text. */
+const char *
+ieee8021q_tci_string(const uint16_t tci)
+{
+       static char buf[128];
+       snprintf(buf, sizeof(buf), "vlan %u, p %u%s",
+                tci & 0xfff,
+                tci >> 13,
+                (tci & 0x1000) ? ", DEI" : "");
+       return buf;
+}