]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6d.c
convert <1-255> to (1-255), ()s to <>s, etc
[mirror_frr.git] / ospf6d / ospf6d.c
index 3fdbda18e0fd69db6242797e6a2638c24b5d82bb..907cd118a5556ea83170505e18363b309e4d58ef 100644 (file)
@@ -43,6 +43,7 @@
 #include "ospf6_abr.h"
 #include "ospf6_flood.h"
 #include "ospf6d.h"
+#include "ospf6_bfd.h"
 
 #ifdef HAVE_SNMP
 #include "ospf6_snmp.h"
@@ -77,7 +78,7 @@ route_prev (struct route_node *node)
   return prev;
 }
 
-\f
+
 /* show database functions */
 DEFUN (show_version_ospf6,
        show_version_ospf6_cmd,
@@ -125,16 +126,16 @@ config_write_ospf6_debug (struct vty *vty)
   "%s        AS Scoped Link State Database%s%s"
 
 static int
-parse_show_level (int argc, const char *argv[])
+parse_show_level (int argc, struct cmd_token **argv)
 {
   int level = 0;
   if (argc)
     {
-      if (! strncmp (argv[0], "de", 2))
+      if (! strncmp (argv[0]->arg, "de", 2))
         level = OSPF6_LSDB_SHOW_LEVEL_DETAIL;
-      else if (! strncmp (argv[0], "du", 2))
+      else if (! strncmp (argv[0]->arg, "du", 2))
         level = OSPF6_LSDB_SHOW_LEVEL_DUMP;
-      else if (! strncmp (argv[0], "in", 2))
+      else if (! strncmp (argv[0]->arg, "in", 2))
         level = OSPF6_LSDB_SHOW_LEVEL_INTERNAL;
     }
   else
@@ -143,27 +144,40 @@ parse_show_level (int argc, const char *argv[])
 }
 
 static u_int16_t
-parse_type_spec (int argc, const char *argv[])
+parse_type_spec (int argc, struct cmd_token **argv)
 {
   u_int16_t type = 0;
   assert (argc);
-  if (! strcmp (argv[0], "router"))
+  if (! strcmp (argv[0]->arg, "router"))
     type = htons (OSPF6_LSTYPE_ROUTER);
-  else if (! strcmp (argv[0], "network"))
+  else if (! strcmp (argv[0]->arg, "network"))
     type = htons (OSPF6_LSTYPE_NETWORK);
-  else if (! strcmp (argv[0], "as-external"))
+  else if (! strcmp (argv[0]->arg, "as-external"))
     type = htons (OSPF6_LSTYPE_AS_EXTERNAL);
-  else if (! strcmp (argv[0], "intra-prefix"))
+  else if (! strcmp (argv[0]->arg, "intra-prefix"))
     type = htons (OSPF6_LSTYPE_INTRA_PREFIX);
-  else if (! strcmp (argv[0], "inter-router"))
+  else if (! strcmp (argv[0]->arg, "inter-router"))
     type = htons (OSPF6_LSTYPE_INTER_ROUTER);
-  else if (! strcmp (argv[0], "inter-prefix"))
+  else if (! strcmp (argv[0]->arg, "inter-prefix"))
     type = htons (OSPF6_LSTYPE_INTER_PREFIX);
-  else if (! strcmp (argv[0], "link"))
+  else if (! strcmp (argv[0]->arg, "link"))
     type = htons (OSPF6_LSTYPE_LINK);
   return type;
 }
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database (detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database,
        show_ipv6_ospf6_database_cmd,
        "show ipv6 ospf6 database",
@@ -206,23 +220,35 @@ DEFUN (show_ipv6_ospf6_database,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database,
-       show_ipv6_ospf6_database_detail_cmd,
-       "show ipv6 ospf6 database (detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type,
        show_ipv6_ospf6_database_type_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix)",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix>",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -288,30 +314,45 @@ DEFUN (show_ipv6_ospf6_database_type,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type,
-       show_ipv6_ospf6_database_type_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database * A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Any Link state Type\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database linkstate-id A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database linkstate-id A.B.C.D",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_id,
        show_ipv6_ospf6_database_id_cmd,
        "show ipv6 ospf6 database * A.B.C.D",
@@ -332,10 +373,10 @@ DEFUN (show_ipv6_ospf6_database_id,
 
   OSPF6_CMD_CHECK_RUNNING ();
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[5]->arg, &id)) != 1)
     {
       vty_out (vty, "Link State ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[5]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -366,47 +407,48 @@ DEFUN (show_ipv6_ospf6_database_id,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_id,
-       show_ipv6_ospf6_database_id_detail_cmd,
-       "show ipv6 ospf6 database * A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Any Link state Type\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_id,
-       show_ipv6_ospf6_database_linkstate_id_cmd,
-       "show ipv6 ospf6 database linkstate-id A.B.C.D",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_id,
-       show_ipv6_ospf6_database_linkstate_id_detail_cmd,
-       "show ipv6 ospf6 database linkstate-id A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database * * A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Any Link state Type\n"
+ *     "Any Link state ID\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database adv-router A.B.C.D",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Search by Advertising Router\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     
+ *
+ * "show ipv6 ospf6 database adv-router A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Search by Advertising Router\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_router,
        show_ipv6_ospf6_database_router_cmd,
        "show ipv6 ospf6 database * * A.B.C.D",
@@ -428,10 +470,10 @@ DEFUN (show_ipv6_ospf6_database_router,
 
   OSPF6_CMD_CHECK_RUNNING ();
 
-  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+  if ((inet_pton (AF_INET, argv[6]->arg, &adv_router)) != 1)
     {
       vty_out (vty, "Advertising Router is not parsable: %s%s",
-               argv[0], VNL);
+               argv[6]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -462,53 +504,82 @@ DEFUN (show_ipv6_ospf6_database_router,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_router,
-       show_ipv6_ospf6_database_router_detail_cmd,
-       "show ipv6 ospf6 database * * A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Any Link state Type\n"
-       "Any Link state ID\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_router,
-       show_ipv6_ospf6_database_adv_router_cmd,
-       "show ipv6 ospf6 database adv-router A.B.C.D",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Search by Advertising Router\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_router,
-       show_ipv6_ospf6_database_adv_router_detail_cmd,
-       "show ipv6 ospf6 database adv-router A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Search by Advertising Router\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_id,
        show_ipv6_ospf6_database_type_id_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) A.B.C.D",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> A.B.C.D",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -539,10 +610,10 @@ DEFUN (show_ipv6_ospf6_database_type_id,
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &id)) != 1)
     {
       vty_out (vty, "Link state ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -586,84 +657,83 @@ DEFUN (show_ipv6_ospf6_database_type_id,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_id,
-       show_ipv6_ospf6_database_type_id_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_type_id,
-       show_ipv6_ospf6_database_type_linkstate_id_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_type_id,
-       show_ipv6_ospf6_database_type_linkstate_id_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) * A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Any Link state ID\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Search by Advertising Router\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Search by Advertising Router\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_router,
        show_ipv6_ospf6_database_type_router_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) * A.B.C.D",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> * A.B.C.D",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -695,10 +765,10 @@ DEFUN (show_ipv6_ospf6_database_type_router,
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &adv_router)) != 1)
     {
       vty_out (vty, "Advertising Router is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -742,80 +812,26 @@ DEFUN (show_ipv6_ospf6_database_type_router,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_router,
-       show_ipv6_ospf6_database_type_router_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) * A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Any Link state ID\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_type_router,
-       show_ipv6_ospf6_database_type_adv_router_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Search by Advertising Router\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-      )
 
-ALIAS (show_ipv6_ospf6_database_type_router,
-       show_ipv6_ospf6_database_type_adv_router_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Search by Advertising Router\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database * A.B.C.D A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Any Link state Type\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_id_router,
        show_ipv6_ospf6_database_id_router_cmd,
        "show ipv6 ospf6 database * A.B.C.D A.B.C.D",
@@ -838,20 +854,20 @@ DEFUN (show_ipv6_ospf6_database_id_router,
 
   OSPF6_CMD_CHECK_RUNNING ();
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[5]->arg, &id)) != 1)
     {
       vty_out (vty, "Link state ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[5]->arg, VNL);
       return CMD_SUCCESS;
     }
 
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+  if ((inet_pton (AF_INET, argv[5]->arg, &adv_router)) != 1)
     {
       vty_out (vty, "Advertising Router is not parsable: %s%s",
-               argv[0], VNL);
+               argv[5]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -882,22 +898,25 @@ DEFUN (show_ipv6_ospf6_database_id_router,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_id_router,
-       show_ipv6_ospf6_database_id_router_detail_cmd,
-       "show ipv6 ospf6 database * A.B.C.D A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Any Link state Type\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Search by Advertising Router\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
        show_ipv6_ospf6_database_adv_router_linkstate_id_cmd,
        "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D",
@@ -921,20 +940,20 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
 
   OSPF6_CMD_CHECK_RUNNING ();
 
-  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+  if ((inet_pton (AF_INET, argv[5]->arg, &adv_router)) != 1)
     {
       vty_out (vty, "Advertising Router is not parsable: %s%s",
-               argv[0], VNL);
+               argv[5]->arg, VNL);
       return CMD_SUCCESS;
     }
 
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[5]->arg, &id)) != 1)
     {
       vty_out (vty, "Link state ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[5]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -965,28 +984,36 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id,
-       show_ipv6_ospf6_database_adv_router_linkstate_id_detail_cmd,
-       "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Search by Advertising Router\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D "
+ *     "(dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_id_router,
        show_ipv6_ospf6_database_type_id_router_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> A.B.C.D A.B.C.D",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -1019,20 +1046,20 @@ DEFUN (show_ipv6_ospf6_database_type_id_router,
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &id)) != 1)
     {
       vty_out (vty, "Link state ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &adv_router)) != 1)
     {
       vty_out (vty, "Advertising Router is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -1076,37 +1103,39 @@ DEFUN (show_ipv6_ospf6_database_type_id_router,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_id_router,
-       show_ipv6_ospf6_database_type_id_router_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D "
-       "(dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) "
+ *     "adv-router A.B.C.D linkstate-id A.B.C.D "
+ *     "(dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Search by Advertising Router\n"
+ *     "Specify Advertising Router as IPv4 address notation\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
        show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) "
-       "adv-router A.B.C.D linkstate-id A.B.C.D",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> adv-router A.B.C.D linkstate-id A.B.C.D",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -1141,20 +1170,20 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &adv_router)) != 1)
     {
       vty_out (vty, "Advertising Router is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &id)) != 1)
     {
       vty_out (vty, "Link state ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -1198,34 +1227,21 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
-       show_ipv6_ospf6_database_type_adv_router_linkstate_id_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) "
-       "adv-router A.B.C.D linkstate-id A.B.C.D "
-       "(dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Search by Advertising Router\n"
-       "Specify Advertising Router as IPv4 address notation\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database self-originated "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Self-originated LSAs\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_self_originated,
        show_ipv6_ospf6_database_self_originated_cmd,
        "show ipv6 ospf6 database self-originated",
@@ -1271,24 +1287,36 @@ DEFUN (show_ipv6_ospf6_database_self_originated,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_self_originated,
-       show_ipv6_ospf6_database_self_originated_detail_cmd,
-       "show ipv6 ospf6 database self-originated "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Self-originated LSAs\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) self-originated "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Display Self-originated LSAs\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_self_originated,
        show_ipv6_ospf6_database_type_self_originated_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) self-originated",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> self-originated",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -1358,37 +1386,38 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_self_originated,
-       show_ipv6_ospf6_database_type_self_originated_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) self-originated "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Display Self-originated LSAs\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) self-originated "
+ *     "linkstate-id A.B.C.D (detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Display Self-originated LSAs\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
        show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) self-originated "
-       "linkstate-id A.B.C.D",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> self-originated linkstate-id A.B.C.D",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -1422,10 +1451,10 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &id)) != 1)
     {
       vty_out (vty, "Link State ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -1471,38 +1500,38 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
-       show_ipv6_ospf6_database_type_self_originated_linkstate_id_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) self-originated "
-       "linkstate-id A.B.C.D (detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Display Self-originated LSAs\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 database "
+ *     "(router|network|inter-prefix|inter-router|as-external|"
+ *     "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated "
+ *     "(detail|dump|internal)",
+ *     SHOW_STR
+ *     IPV6_STR
+ *     OSPF6_STR
+ *     "Display Link state database\n"
+ *     "Display Router LSAs\n"
+ *     "Display Network LSAs\n"
+ *     "Display Inter-Area-Prefix LSAs\n"
+ *     "Display Inter-Area-Router LSAs\n"
+ *     "Display As-External LSAs\n"
+ *     "Display Group-Membership LSAs\n"
+ *     "Display Type-7 LSAs\n"
+ *     "Display Link LSAs\n"
+ *     "Display Intra-Area-Prefix LSAs\n"
+ *     "Display Self-originated LSAs\n"
+ *     "Search by Link state ID\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     "Display details of LSAs\n"
+ *     "Dump LSAs\n"
+ *     "Display LSA's internal information\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
        show_ipv6_ospf6_database_type_id_self_originated_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated",
+       "show ipv6 ospf6 database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> A.B.C.D self-originated",
        SHOW_STR
        IPV6_STR
        OSPF6_STR
@@ -1535,10 +1564,10 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
   argc--;
   argv++;
 
-  if ((inet_pton (AF_INET, argv[0], &id)) != 1)
+  if ((inet_pton (AF_INET, argv[4]->arg, &id)) != 1)
     {
       vty_out (vty, "Link State ID is not parsable: %s%s",
-               argv[0], VNL);
+               argv[4]->arg, VNL);
       return CMD_SUCCESS;
     }
 
@@ -1584,34 +1613,20 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_database_type_id_self_originated,
-       show_ipv6_ospf6_database_type_id_self_originated_detail_cmd,
-       "show ipv6 ospf6 database "
-       "(router|network|inter-prefix|inter-router|as-external|"
-       "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated "
-       "(detail|dump|internal)",
-       SHOW_STR
-       IPV6_STR
-       OSPF6_STR
-       "Display Link state database\n"
-       "Display Router LSAs\n"
-       "Display Network LSAs\n"
-       "Display Inter-Area-Prefix LSAs\n"
-       "Display Inter-Area-Router LSAs\n"
-       "Display As-External LSAs\n"
-       "Display Group-Membership LSAs\n"
-       "Display Type-7 LSAs\n"
-       "Display Link LSAs\n"
-       "Display Intra-Area-Prefix LSAs\n"
-       "Display Self-originated LSAs\n"
-       "Search by Link state ID\n"
-       "Specify Link state ID as IPv4 address notation\n"
-       "Display details of LSAs\n"
-       "Dump LSAs\n"
-       "Display LSA's internal information\n"
-      )
 
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 border-routers (A.B.C.D|detail)",
+ *     SHOW_STR
+ *     IP6_STR
+ *     OSPF6_STR
+ *     "Display routing table for ABR and ASBR\n"
+ *     "Specify Router-ID\n"
+ *     "Display Detail\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_border_routers,
        show_ipv6_ospf6_border_routers_cmd,
        "show ipv6 ospf6 border-routers",
@@ -1628,7 +1643,7 @@ DEFUN (show_ipv6_ospf6_border_routers,
 
   OSPF6_CMD_CHECK_RUNNING ();
 
-  if (argc && ! strcmp ("detail", argv[0]))
+  if (argc && ! strcmp ("detail", argv[4]->arg))
     {
       showfunc = ospf6_route_show_detail;
       argc--;
@@ -1639,9 +1654,9 @@ DEFUN (show_ipv6_ospf6_border_routers,
 
   if (argc)
     {
-      if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)
+      if ((inet_pton (AF_INET, argv[4]->arg, &adv_router)) != 1)
         {
-          vty_out (vty, "Router ID is not parsable: %s%s", argv[0], VNL);
+          vty_out (vty, "Router ID is not parsable: %s%s", argv[4]->arg, VNL);
           return CMD_SUCCESS;
         }
 
@@ -1649,7 +1664,7 @@ DEFUN (show_ipv6_ospf6_border_routers,
       ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
       if (!ro)
         {
-          vty_out (vty, "No Route found for Router ID: %s%s", argv[0], VNL);
+          vty_out (vty, "No Route found for Router ID: %s%s", argv[4]->arg, VNL);
           return CMD_SUCCESS;
         }
 
@@ -1667,17 +1682,29 @@ DEFUN (show_ipv6_ospf6_border_routers,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_border_routers,
-       show_ipv6_ospf6_border_routers_detail_cmd,
-       "show ipv6 ospf6 border-routers (A.B.C.D|detail)",
-       SHOW_STR
-       IP6_STR
-       OSPF6_STR
-       "Display routing table for ABR and ASBR\n"
-       "Specify Router-ID\n"
-       "Display Detail\n"
-      )
 
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D",
+ *     SHOW_STR
+ *     IP6_STR
+ *     OSPF6_STR
+ *     "Display linkstate routing table\n"
+ *     "Display Network Entry\n"
+ *     "Specify Router ID as IPv4 address notation\n"
+ *     "Specify Link state ID as IPv4 address notation\n"
+ *     
+ *
+ * "show ipv6 ospf6 linkstate router A.B.C.D",
+ *     SHOW_STR
+ *     IP6_STR
+ *     OSPF6_STR
+ *     "Display linkstate routing table\n"
+ *     "Display Router Entry\n"
+ *     "Specify Router ID as IPv4 address notation\n"
+ *     
+ *
+ */
 DEFUN (show_ipv6_ospf6_linkstate,
        show_ipv6_ospf6_linkstate_cmd,
        "show ipv6 ospf6 linkstate",
@@ -1690,6 +1717,8 @@ DEFUN (show_ipv6_ospf6_linkstate,
   struct listnode *node;
   struct ospf6_area *oa;
 
+  OSPF6_CMD_CHECK_RUNNING ();
+
   for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
     {
       vty_out (vty, "%s        SPF Result in Area %s%s%s",
@@ -1701,28 +1730,7 @@ DEFUN (show_ipv6_ospf6_linkstate,
   return CMD_SUCCESS;
 }
 
-ALIAS (show_ipv6_ospf6_linkstate,
-       show_ipv6_ospf6_linkstate_router_cmd,
-       "show ipv6 ospf6 linkstate router A.B.C.D",
-       SHOW_STR
-       IP6_STR
-       OSPF6_STR
-       "Display linkstate routing table\n"
-       "Display Router Entry\n"
-       "Specify Router ID as IPv4 address notation\n"
-      )
 
-ALIAS (show_ipv6_ospf6_linkstate,
-       show_ipv6_ospf6_linkstate_network_cmd,
-       "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D",
-       SHOW_STR
-       IP6_STR
-       OSPF6_STR
-       "Display linkstate routing table\n"
-       "Display Network Entry\n"
-       "Specify Router ID as IPv4 address notation\n"
-       "Specify Link state ID as IPv4 address notation\n"
-      )
 
 DEFUN (show_ipv6_ospf6_linkstate_detail,
        show_ipv6_ospf6_linkstate_detail_cmd,
@@ -1733,23 +1741,16 @@ DEFUN (show_ipv6_ospf6_linkstate_detail,
        "Display linkstate routing table\n"
       )
 {
-  const char *sargv[CMD_ARGC_MAX];
-  int i, sargc;
   struct listnode *node;
   struct ospf6_area *oa;
 
-  /* copy argv to sargv and then append "detail" */
-  for (i = 0; i < argc; i++)
-    sargv[i] = argv[i];
-  sargc = argc;
-  sargv[sargc++] = "detail";
-  sargv[sargc] = NULL;
+  OSPF6_CMD_CHECK_RUNNING ();
 
   for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
     {
       vty_out (vty, "%s        SPF Result in Area %s%s%s",
                VNL, oa->name, VNL, VNL);
-      ospf6_linkstate_table_show (vty, sargc, sargv, oa->spf_table);
+      ospf6_linkstate_table_show (vty, argc, argv, oa->spf_table);
     }
 
   vty_out (vty, "%s", VNL);
@@ -1764,7 +1765,7 @@ ospf6_init (void)
   ospf6_area_init ();
   ospf6_interface_init ();
   ospf6_neighbor_init ();
-  ospf6_zebra_init ();
+  ospf6_zebra_init(master);
 
   ospf6_lsa_init ();
   ospf6_spf_init ();
@@ -1776,124 +1777,6 @@ ospf6_init (void)
   ospf6_snmp_init (master);
 #endif /*HAVE_SNMP*/
 
+  ospf6_bfd_init();
   install_node (&debug_node, config_write_ospf6_debug);
 
-  install_element_ospf6_debug_message ();
-  install_element_ospf6_debug_lsa ();
-  install_element_ospf6_debug_interface ();
-  install_element_ospf6_debug_neighbor ();
-  install_element_ospf6_debug_zebra ();
-  install_element_ospf6_debug_spf ();
-  install_element_ospf6_debug_route ();
-  install_element_ospf6_debug_brouter ();
-  install_element_ospf6_debug_asbr ();
-  install_element_ospf6_debug_abr ();
-  install_element_ospf6_debug_flood ();
-
-  install_element (VIEW_NODE, &show_version_ospf6_cmd);
-  install_element (ENABLE_NODE, &show_version_ospf6_cmd);
-
-  install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd);
-  install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
-  install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_cmd);
-  install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_detail_cmd);
-
-  install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd);
-  install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_router_cmd);
-  install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_network_cmd);
-  install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
-  install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_cmd);
-  install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_router_cmd);
-  install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_network_cmd);
-  install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
-
-#define INSTALL(n,c) \
-  install_element (n ## _NODE, &show_ipv6_ospf6_ ## c)
-
-  INSTALL (VIEW, database_cmd);
-  INSTALL (VIEW, database_detail_cmd);
-  INSTALL (VIEW, database_type_cmd);
-  INSTALL (VIEW, database_type_detail_cmd);
-  INSTALL (VIEW, database_id_cmd);
-  INSTALL (VIEW, database_id_detail_cmd);
-  INSTALL (VIEW, database_linkstate_id_cmd);
-  INSTALL (VIEW, database_linkstate_id_detail_cmd);
-  INSTALL (VIEW, database_router_cmd);
-  INSTALL (VIEW, database_router_detail_cmd);
-  INSTALL (VIEW, database_adv_router_cmd);
-  INSTALL (VIEW, database_adv_router_detail_cmd);
-  INSTALL (VIEW, database_type_id_cmd);
-  INSTALL (VIEW, database_type_id_detail_cmd);
-  INSTALL (VIEW, database_type_linkstate_id_cmd);
-  INSTALL (VIEW, database_type_linkstate_id_detail_cmd);
-  INSTALL (VIEW, database_type_router_cmd);
-  INSTALL (VIEW, database_type_router_detail_cmd);
-  INSTALL (VIEW, database_type_adv_router_cmd);
-  INSTALL (VIEW, database_type_adv_router_detail_cmd);
-  INSTALL (VIEW, database_adv_router_linkstate_id_cmd);
-  INSTALL (VIEW, database_adv_router_linkstate_id_detail_cmd);
-  INSTALL (VIEW, database_id_router_cmd);
-  INSTALL (VIEW, database_id_router_detail_cmd);
-  INSTALL (VIEW, database_type_id_router_cmd);
-  INSTALL (VIEW, database_type_id_router_detail_cmd);
-  INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd);
-  INSTALL (VIEW, database_type_adv_router_linkstate_id_detail_cmd);
-  INSTALL (VIEW, database_self_originated_cmd);
-  INSTALL (VIEW, database_self_originated_detail_cmd);
-  INSTALL (VIEW, database_type_self_originated_cmd);
-  INSTALL (VIEW, database_type_self_originated_detail_cmd);
-  INSTALL (VIEW, database_type_id_self_originated_cmd);
-  INSTALL (VIEW, database_type_id_self_originated_detail_cmd);
-  INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd);
-  INSTALL (VIEW, database_type_self_originated_linkstate_id_detail_cmd);
-
-  INSTALL (ENABLE, database_cmd);
-  INSTALL (ENABLE, database_detail_cmd);
-  INSTALL (ENABLE, database_type_cmd);
-  INSTALL (ENABLE, database_type_detail_cmd);
-  INSTALL (ENABLE, database_id_cmd);
-  INSTALL (ENABLE, database_id_detail_cmd);
-  INSTALL (ENABLE, database_linkstate_id_cmd);
-  INSTALL (ENABLE, database_linkstate_id_detail_cmd);
-  INSTALL (ENABLE, database_router_cmd);
-  INSTALL (ENABLE, database_router_detail_cmd);
-  INSTALL (ENABLE, database_adv_router_cmd);
-  INSTALL (ENABLE, database_adv_router_detail_cmd);
-  INSTALL (ENABLE, database_type_id_cmd);
-  INSTALL (ENABLE, database_type_id_detail_cmd);
-  INSTALL (ENABLE, database_type_linkstate_id_cmd);
-  INSTALL (ENABLE, database_type_linkstate_id_detail_cmd);
-  INSTALL (ENABLE, database_type_router_cmd);
-  INSTALL (ENABLE, database_type_router_detail_cmd);
-  INSTALL (ENABLE, database_type_adv_router_cmd);
-  INSTALL (ENABLE, database_type_adv_router_detail_cmd);
-  INSTALL (ENABLE, database_adv_router_linkstate_id_cmd);
-  INSTALL (ENABLE, database_adv_router_linkstate_id_detail_cmd);
-  INSTALL (ENABLE, database_id_router_cmd);
-  INSTALL (ENABLE, database_id_router_detail_cmd);
-  INSTALL (ENABLE, database_type_id_router_cmd);
-  INSTALL (ENABLE, database_type_id_router_detail_cmd);
-  INSTALL (ENABLE, database_type_adv_router_linkstate_id_cmd);
-  INSTALL (ENABLE, database_type_adv_router_linkstate_id_detail_cmd);
-  INSTALL (ENABLE, database_self_originated_cmd);
-  INSTALL (ENABLE, database_self_originated_detail_cmd);
-  INSTALL (ENABLE, database_type_self_originated_cmd);
-  INSTALL (ENABLE, database_type_self_originated_detail_cmd);
-  INSTALL (ENABLE, database_type_id_self_originated_cmd);
-  INSTALL (ENABLE, database_type_id_self_originated_detail_cmd);
-  INSTALL (ENABLE, database_type_self_originated_linkstate_id_cmd);
-  INSTALL (ENABLE, database_type_self_originated_linkstate_id_detail_cmd);
-
-  /* Make ospf protocol socket. */
-  ospf6_serv_sock ();
-  thread_add_read (master, ospf6_receive, NULL, ospf6_sock);
-}
-
-void
-ospf6_clean (void)
-{
-  if (ospf6->route_table)
-    ospf6_route_remove_all (ospf6->route_table);
-  if (ospf6->brouter_table)
-    ospf6_route_remove_all (ospf6->brouter_table);
-}