aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip.c')
-rw-r--r--src/vnet/ip/ip.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c
index 6e8ac7c437d..133767bd06c 100644
--- a/src/vnet/ip/ip.c
+++ b/src/vnet/ip/ip.c
@@ -294,6 +294,23 @@ format_ip_address_family (u8 * s, va_list * args)
return (format (s, "unknown"));
}
+u8 *
+format_ip_dscp (u8 * s, va_list * va)
+{
+ ip_dscp_t dscp = va_arg (*va, u32); // int promotion of u8
+
+ switch (dscp)
+ {
+#define _(n,v) \
+ case IP_DSCP_##v: \
+ return (format (s, "%s", #v));
+ foreach_ip_dscp
+#undef _
+ }
+
+ return (format (s, "unknon"));
+}
+
/*
* fd.io coding-style-patch-verification: ON
*