From ba5e5940aa1f11128c76a3964823bda22e47ab04 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 2 Aug 2010 13:11:53 +0200 Subject: Adds igp_metric attribute. --- nest/rt-attr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'nest/rt-attr.c') diff --git a/nest/rt-attr.c b/nest/rt-attr.c index d714818..ce6fe85 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -362,6 +362,18 @@ ea_free(ea_list *o) } } +static int +get_generic_attr(eattr *a, byte **buf, int buflen UNUSED) +{ + if (a->id == EA_GEN_IGP_METRIC) + { + *buf += bsprintf(*buf, "igp_metric"); + return GA_NAME; + } + + return GA_UNKNOWN; +} + /** * ea_format - format an &eattr for printing * @e: attribute to be formatted @@ -392,6 +404,9 @@ ea_format(eattr *e, byte *buf) } else if (EA_PROTO(e->id)) buf += bsprintf(buf, "%02x.", EA_PROTO(e->id)); + else + status = get_generic_attr(e, &buf, end - buf); + if (status < GA_NAME) buf += bsprintf(buf, "%02x", EA_ID(e->id)); if (status < GA_FULL) -- cgit v1.2.3