return (etheraddr_string(ndo, ep));
if (type == LINKADDR_FRELAY)
- return (q922_string(ep));
+ return (q922_string(ndo, ep, len));
tp = lookup_bytestring(ep, len);
if (tp->e_name)
/* in libpcap.a (nametoaddr.c) */
#if defined(WIN32) && !defined(USE_STATIC_LIBPCAP)
-__declspec(dllimport)
+extern __declspec(dllimport)
#else
extern
#endif
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;
+}