summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/addrtoname.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcpdump/addrtoname.c')
-rw-r--r--contrib/tcpdump/addrtoname.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/tcpdump/addrtoname.c b/contrib/tcpdump/addrtoname.c
index e208f54..b02d0f7 100644
--- a/contrib/tcpdump/addrtoname.c
+++ b/contrib/tcpdump/addrtoname.c
@@ -576,7 +576,7 @@ linkaddr_string(netdissect_options *ndo, const u_char *ep, const unsigned int ty
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)
@@ -1236,3 +1236,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;
+}
OpenPOWER on IntegriCloud