diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-07-08 09:42:33 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-07-08 09:42:33 +0000 |
commit | ed3123ada7f44428471003d6c1429caace9d2453 (patch) | |
tree | 42c2e8d1c46e28f2d76ecdf1f038034263f70360 /usr.sbin | |
parent | 8a82fbde58252dc64049c506b6f5a3687a336ead (diff) |
Update after kroute.c change. As a goody print the route priority.
OK michele@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldpctl/ldpctl.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c index 3316763ba2a..a2fde8099d8 100644 --- a/usr.sbin/ldpctl/ldpctl.c +++ b/usr.sbin/ldpctl/ldpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpctl.c,v 1.10 2010/06/07 13:24:23 claudio Exp $ +/* $OpenBSD: ldpctl.c,v 1.11 2010/07/08 09:42:32 claudio Exp $ * * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -390,9 +390,9 @@ show_nbr_msg(struct imsg *imsg) void show_lfib_head(void) { - printf("flags: * = valid, C = Connected, S = Static\n"); - printf("%-6s %-20s %-17s %-17s %s\n", "Flags", "Destination", "Nexthop", - "Local Label", "Remote Label"); + printf("Flags: C = Connected, S = Static\n"); + printf(" %-4s %-20s %-17s %-17s %s\n", "Prio", "Destination", + "Nexthop", "Local Label", "Remote Label"); } int @@ -407,21 +407,14 @@ show_lfib_msg(struct imsg *imsg) errx(1, "wrong imsg len"); k = imsg->data; - if (k->flags & F_DOWN) - printf(" "); - else - printf("*"); - - if (!(k->flags & F_KERNEL)) - printf("R"); - else if (k->flags & F_CONNECTED) + if (k->flags & F_CONNECTED) printf("C"); else if (k->flags & F_STATIC) printf("S"); else printf(" "); - printf(" "); + printf(" %3d ", k->priority); if (asprintf(&p, "%s/%u", inet_ntoa(k->prefix), k->prefixlen) == -1) err(1, NULL); |