diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-01-29 20:09:03 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-01-29 20:09:03 +0000 |
commit | efd918ce6935f071b56aa9112fb291bcbd9347bc (patch) | |
tree | 2ae807fa340e5b0b3fb910d5cf093f035fdc817e | |
parent | cca55b18a1dbd4cf370e50d5662a29eb6015b500 (diff) |
One more step on the long road of beautifying ospf6ctl output:
The Link State ID in OSPFv3 is just a unique identifier and has
lost its semantic meaning for a most LSA types.
Print the correct semantic meaning for those that still have one,
and don't print any additional information for those that don't.
ok claudio@
-rw-r--r-- | usr.sbin/ospf6ctl/ospf6ctl.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c index 9856349b930..7af43ebd260 100644 --- a/usr.sbin/ospf6ctl/ospf6ctl.c +++ b/usr.sbin/ospf6ctl/ospf6ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6ctl.c,v 1.22 2009/01/29 19:39:41 stsp Exp $ */ +/* $OpenBSD: ospf6ctl.c,v 1.23 2009/01/29 20:09:02 stsp Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -638,33 +638,23 @@ void show_db_hdr_msg_detail(struct lsa_hdr *lsa) { printf("LS age: %d\n", ntohs(lsa->age)); -//XXX printf("Options: %s\n", print_ospf_options(lsa->opts)); printf("LS Type: %s\n", print_ls_type(lsa->type)); switch (ntohs(lsa->type)) { - case LSA_TYPE_LINK: - printf("Link State ID: %s\n", log_id(lsa->ls_id)); - break; case LSA_TYPE_ROUTER: - printf("Link State ID: %s\n", log_id(lsa->ls_id)); - break; - case LSA_TYPE_NETWORK: - printf("Link State ID: %s (interface ID of Designated Router)\n", - log_id(lsa->ls_id)); - break; case LSA_TYPE_INTER_A_PREFIX: - printf("Link State ID: %s (Network ID)\n", log_id(lsa->ls_id)); - break; case LSA_TYPE_INTER_A_ROUTER: - printf("Link State ID: %s (ASBR Router ID)\n", - log_id(lsa->ls_id)); - break; case LSA_TYPE_INTRA_A_PREFIX: - printf("Link State ID: %s (Network ID)\n", log_id(lsa->ls_id)); - break; case LSA_TYPE_EXTERNAL: - printf("Link State ID: %s (External Network Number)\n", - log_id(lsa->ls_id)); + printf("Link State ID: %s\n", log_id(lsa->ls_id)); + break; + case LSA_TYPE_LINK: + printf("Link State ID: %s (Interface ID of Advertising " + "Router)\n", log_id(lsa->ls_id)); + break; + case LSA_TYPE_NETWORK: + printf("Link State ID: %s (Interface ID of Designated " + "Router)\n", log_id(lsa->ls_id)); break; } |