@@ -590,20 +590,6 @@ static void close_vlan_port(void)
close_json_object();
}
-static unsigned int print_range(const char *name, __u32 start, __u32 id)
-{
- char end[64];
- int width;
-
- snprintf(end, sizeof(end), "%sEnd", name);
-
- width = print_uint(PRINT_ANY, name, "%u", start);
- if (start != id)
- width += print_uint(PRINT_ANY, end, "-%u", id);
-
- return width;
-}
-
static void print_vlan_tunnel_info(struct rtattr *tb, int ifindex)
{
struct rtattr *i, *list = tb;
@@ -163,20 +163,6 @@ static void close_vni_port(void)
close_json_object();
}
-static unsigned int print_range(const char *name, __u32 start, __u32 id)
-{
- char end[64];
- int width;
-
- snprintf(end, sizeof(end), "%sEnd", name);
-
- width = print_uint(PRINT_ANY, name, "%u", start);
- if (start != id)
- width += print_uint(PRINT_ANY, end, "-%u", id);
-
- return width;
-}
-
static void print_vnifilter_entry_stats(struct rtattr *stats_attr)
{
struct rtattr *stb[VNIFILTER_ENTRY_STATS_MAX+1];
@@ -97,6 +97,8 @@ static inline int print_rate(bool use_iec, enum output_type t,
return print_color_rate(use_iec, t, COLOR_NONE, key, fmt, rate);
}
+unsigned int print_range(const char *name, __u32 start, __u32 id);
+
int print_color_bool_opt(enum output_type type, enum color_attr color,
const char *key, bool value, bool show);
@@ -374,3 +374,17 @@ int print_color_rate(bool use_iec, enum output_type type, enum color_attr color,
free(buf);
return rc;
}
+
+unsigned int print_range(const char *name, __u32 start, __u32 id)
+{
+ char end[64];
+ int width;
+
+ snprintf(end, sizeof(end), "%sEnd", name);
+
+ width = print_uint(PRINT_ANY, name, "%u", start);
+ if (start != id)
+ width += print_uint(PRINT_ANY, end, "-%u", id);
+
+ return width;
+}