From efd918ce6935f071b56aa9112fb291bcbd9347bc Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Thu, 29 Jan 2009 20:09:03 +0000 Subject: 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@ --- usr.sbin/ospf6ctl/ospf6ctl.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'usr.sbin') 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 @@ -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; } -- cgit v1.2.3