⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospf6d.c

📁 linux 路由软件 可支持RIP OSPF BGP等
💻 C
📖 第 1 页 / 共 4 页
字号:
    {      oa = (struct ospf6_area *) getdata (i);      vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);      ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oa->lsdb);    }  for (i = listhead (o->area_list); i; nextnode (i))    {      oa = (struct ospf6_area *) getdata (i);      for (j = listhead (oa->if_list); j; nextnode (j))        {          oi = (struct ospf6_interface *) getdata (j);          vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,                   oi->interface->name, oa->name, VNL, VNL);          ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, oi->lsdb);        }    }  vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);  ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);  vty_out (vty, "%s", VNL);  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"      );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_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"      ){  int level;  listnode i, j;  struct ospf6 *o = ospf6;  struct ospf6_area *oa;  struct ospf6_interface *oi;  u_int16_t type = 0;  u_int32_t id = 0;  u_int32_t adv_router = 0;  OSPF6_CMD_CHECK_RUNNING ();  type = parse_type_spec (argc, argv);  argc--;  argv++;  if ((inet_pton (AF_INET, argv[0], &id)) != 1)    {      vty_out (vty, "Link state ID is not parsable: %s%s",               argv[0], VNL);      return CMD_SUCCESS;    }  argc--;  argv++;  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)    {      vty_out (vty, "Advertising Router is not parsable: %s%s",               argv[0], VNL);      return CMD_SUCCESS;    }  argc--;  argv++;  level = parse_show_level (argc, argv);  switch (OSPF6_LSA_SCOPE (type))    {      case OSPF6_SCOPE_AREA:        for (i = listhead (o->area_list); i; nextnode (i))          {            oa = (struct ospf6_area *) getdata (i);            vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);            ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);          }        break;      case OSPF6_SCOPE_LINKLOCAL:        for (i = listhead (o->area_list); i; nextnode (i))          {            oa = (struct ospf6_area *) getdata (i);            for (j = listhead (oa->if_list); j; nextnode (j))              {                oi = (struct ospf6_interface *) getdata (j);                vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,                         oi->interface->name, oa->name, VNL, VNL);                ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);              }          }        break;      case OSPF6_SCOPE_AS:        vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);        ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);        break;      default:        assert (0);        break;    }  vty_out (vty, "%s", VNL);  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"      );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_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"      ){  int level;  listnode i, j;  struct ospf6 *o = ospf6;  struct ospf6_area *oa;  struct ospf6_interface *oi;  u_int16_t type = 0;  u_int32_t id = 0;  u_int32_t adv_router = 0;  OSPF6_CMD_CHECK_RUNNING ();  type = parse_type_spec (argc, argv);  argc--;  argv++;  if ((inet_pton (AF_INET, argv[0], &adv_router)) != 1)    {      vty_out (vty, "Advertising Router is not parsable: %s%s",               argv[0], VNL);      return CMD_SUCCESS;    }  argc--;  argv++;  if ((inet_pton (AF_INET, argv[0], &id)) != 1)    {      vty_out (vty, "Link state ID is not parsable: %s%s",               argv[0], VNL);      return CMD_SUCCESS;    }  argc--;  argv++;  level = parse_show_level (argc, argv);  switch (OSPF6_LSA_SCOPE (type))    {      case OSPF6_SCOPE_AREA:        for (i = listhead (o->area_list); i; nextnode (i))          {            oa = (struct ospf6_area *) getdata (i);            vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);            ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oa->lsdb);          }        break;      case OSPF6_SCOPE_LINKLOCAL:        for (i = listhead (o->area_list); i; nextnode (i))          {            oa = (struct ospf6_area *) getdata (i);            for (j = listhead (oa->if_list); j; nextnode (j))              {                oi = (struct ospf6_interface *) getdata (j);                vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,                         oi->interface->name, oa->name, VNL, VNL);                ospf6_lsdb_show (vty, level, &type, &id, &adv_router, oi->lsdb);              }          }        break;      case OSPF6_SCOPE_AS:        vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);        ospf6_lsdb_show (vty, level, &type, &id, &adv_router, o->lsdb);        break;      default:        assert (0);        break;    }  vty_out (vty, "%s", VNL);  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"      );DEFUN (show_ipv6_ospf6_database_self_originated,       show_ipv6_ospf6_database_self_originated_cmd,       "show ipv6 ospf6 database self-originated",       SHOW_STR       IPV6_STR       OSPF6_STR       "Display Self-originated LSAs\n"      ){  int level;  listnode i, j;  struct ospf6 *o = ospf6;  struct ospf6_area *oa;  struct ospf6_interface *oi;  u_int32_t adv_router = 0;  OSPF6_CMD_CHECK_RUNNING ();  level = parse_show_level (argc, argv);  adv_router = o->router_id;  for (i = listhead (o->area_list); i; nextnode (i))    {      oa = (struct ospf6_area *) getdata (i);      vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);      ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oa->lsdb);    }  for (i = listhead (o->area_list); i; nextnode (i))    {      oa = (struct ospf6_area *) getdata (i);      for (j = listhead (oa->if_list); j; nextnode (j))        {          oi = (struct ospf6_interface *) getdata (j);          vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,                   oi->interface->name, oa->name, VNL, VNL);          ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, oi->lsdb);        }    }  vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);  ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);  vty_out (vty, "%s", VNL);  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"      )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_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"      ){  int level;  listnode i, j;  struct ospf6 *o = ospf6;  struct ospf6_area *oa;  struct ospf6_interface *oi;  u_int16_t type = 0;  u_int32_t adv_router = 0;  OSPF6_CMD_CHECK_RUNNING ();  type = parse_type_spec (argc, argv);  argc--;  argv++;  level = parse_show_level (argc, argv);  adv_router = o->router_id;  switch (OSPF6_LSA_SCOPE (type))    {      case OSPF6_SCOPE_AREA:        for (i = listhead (o->area_list); i; nextnode (i))          {            oa = (struct ospf6_area *) getdata (i);            vty_out (vty, AREA_LSDB_TITLE_FORMAT, VNL, oa->name, VNL, VNL);            ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oa->lsdb);          }        break;      case OSPF6_SCOPE_LINKLOCAL:        for (i = listhead (o->area_list); i; nextnode (i))          {            oa = (struct ospf6_area *) getdata (i);            for (j = listhead (oa->if_list); j; nextnode (j))              {                oi = (struct ospf6_interface *) getdata (j);                vty_out (vty, IF_LSDB_TITLE_FORMAT, VNL,                         oi->interface->name, oa->name, VNL, VNL);                ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, oi->lsdb);              }          }        break;      case OSPF6_SCOPE_AS:        vty_out (vty, AS_LSDB_TITLE_FORMAT, VNL, VNL, VNL);        ospf6_lsdb_show (vty, level, &type, NULL, &adv_router, o->lsdb);        break;      default:        assert (0);        break;    }  vty_out (vty, "%s", VNL);  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"      );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_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"      ){  int level;  listnode i, j;  struct ospf6 *o = ospf6;  struct ospf6_area *oa;  struct ospf6_interface *oi;  u_int16_t type = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -