- char *scope;
-
- switch (ls_type & LS_SCOPE_MASK) {
- case LS_SCOPE_LINKLOCAL:
- scope = "linklocal-";
- break;
- case LS_SCOPE_AREA:
- scope = "area-";
- break;
- case LS_SCOPE_AS:
- scope = "AS-";
- break;
- default:
- scope = "";
- break;
- }
-
- switch (ls_type & LS_TYPE_MASK) {
- case LS_TYPE_ROUTER:
- printf(" %srtr %s", scope, ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_NETWORK:
- printf(" %snet dr %s if %s", scope,
- ipaddr_string(ls_router),
- ipaddr_string(ls_stateid));
- break;
-
- case LS_TYPE_INTER_AP:
- printf(" %sinter-area-prefix %s abr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_INTER_AR:
- printf(" %sinter-area-router %s rtr %s", scope,
- ipaddr_string(ls_router),
- ipaddr_string(ls_stateid));
- break;
-
- case LS_TYPE_ASE:
- printf(" %sase %s asbr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_GROUP:
- printf(" %sgroup %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_TYPE7:
- printf(" %stype7 %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_LINK:
- printf(" %slink %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_INTRA_AP:
- printf(" %sintra-area-prefix %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- default:
- printf(" %s", scope);
- printf(fmt, ls_type);
- break;
- }
-
+ printf("\n\t %s LSA (%d), %s Scope%s, LSA-ID %s",
+ tok2str(ospf6_lsa_values, "Unknown", ls_type & LS_TYPE_MASK),
+ ls_type & LS_TYPE_MASK,
+ tok2str(ospf6_ls_scope_values, "Unknown", ls_type & LS_SCOPE_MASK),
+ ls_type &0x8000 ? ", transitive" : "", /* U-bit */
+ ipaddr_string(ls_stateid));