1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Adds igp_metric attribute.

This commit is contained in:
Ondrej Zajicek
2010-08-02 13:11:53 +02:00
parent d395fe4855
commit ba5e5940aa
5 changed files with 31 additions and 2 deletions

View File

@@ -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)