summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-08-12 21:03:43 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-08-14 13:55:02 +0200
commit42a0c05408c4151442e6a0ec1c6889acbcfe9c17 (patch)
tree5a4992c5fa66256987e335ffe94ee960ed1ff9db /nest/rt-attr.c
parentbde872bba745e5596bdb066df6ef323b7cabcfdd (diff)
BGP Extended communities.
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 486a543d..5a78f167 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -465,6 +465,18 @@ ea_show_int_set(struct cli *c, struct adata *ad, int way, byte *pos, byte *buf,
}
}
+static inline void
+ea_show_ec_set(struct cli *c, struct adata *ad, byte *pos, byte *buf, byte *end)
+{
+ int i = ec_set_format(ad, 0, pos, end - pos);
+ cli_printf(c, -1012, "%s", buf);
+ while (i)
+ {
+ i = ec_set_format(ad, i, buf, end - buf - 1);
+ cli_printf(c, -1012, "\t%s", buf);
+ }
+}
+
/**
* ea_show - print an &eattr to CLI
* @c: destination CLI
@@ -523,6 +535,9 @@ ea_show(struct cli *c, eattr *e)
case EAF_TYPE_INT_SET:
ea_show_int_set(c, ad, 1, pos, buf, end);
return;
+ case EAF_TYPE_EC_SET:
+ ea_show_ec_set(c, ad, pos, buf, end);
+ return;
case EAF_TYPE_UNDEF:
default:
bsprintf(pos, "<type %02x>", e->type);