ts.table = bgp->rib[afi][safi];
thread_execute (bm->master, bgp_table_stats_walker, &ts, 0);
- vty_out (vty, "BGP %s RIB statistics%s\n",
- afi_safi_print (afi, safi), VTYNL);
+ vty_out (vty, "BGP %s RIB statistics\n\n",
+ afi_safi_print (afi, safi));
for (i = 0; i < BGP_STATS_MAX; i++)
{
*bgp = bgp_lookup_by_name (vrf_name);
if (!*bgp)
{
- vty_out (vty, "View/Vrf specified is unknown: %s%s", vrf_name, VTYNL);
+ vty_out (vty, "View/Vrf specified is unknown: %s\n", vrf_name);
*idx = 0;
return 0;
}
{
if ((peer = peer_lookup_by_hostname(bgp, ip_str)) == NULL)
{
- vty_out (vty, "%% Malformed address or name: %s%s", ip_str, VTYNL);
+ vty_out (vty, "%% Malformed address or name: %s\n", ip_str);
return NULL;
}
}
}
if (str)
{
- vty_out (vty, "%% %s%s", str, VTYNL);
+ vty_out (vty, "%% %s\n", str);
return CMD_WARNING;
}
return CMD_SUCCESS;
{
case BGP_ERR_AF_UNCONFIGURED:
vty_out (vty,
- "%%BGP: Enable %s address family for the neighbor %s%s",
- afi_safi_print(afi, safi), peer->host, VTYNL);
+ "%%BGP: Enable %s address family for the neighbor %s\n",
+ afi_safi_print(afi, safi), peer->host);
break;
case BGP_ERR_SOFT_RECONFIG_UNCONFIGURED:
- vty_out (vty, "%%BGP: Inbound soft reconfig for %s not possible as it%s has neither refresh capability, nor inbound soft reconfig%s", peer->host, VTYNL, VTYNL);
+ vty_out (vty, "%%BGP: Inbound soft reconfig for %s not possible as it\n has neither refresh capability, nor inbound soft reconfig\n", peer->host);
break;
default:
break;
peer = peer_lookup_by_hostname(bgp, arg);
if (!peer)
{
- vty_out (vty, "Malformed address or name: %s%s", arg, VTYNL);
+ vty_out (vty, "Malformed address or name: %s\n", arg);
return CMD_WARNING;
}
}
group = peer_group_lookup (bgp, arg);
if (! group)
{
- vty_out (vty, "%%BGP: No such peer-group %s%s", arg, VTYNL);
+ vty_out (vty, "%%BGP: No such peer-group %s\n", arg);
return CMD_WARNING;
}
bgp_clear_vty_error (vty, peer, afi, safi, ret);
}
if (! find)
- vty_out (vty, "%%BGP: No peer is configured with AS %s%s", arg,
- VTYNL);
+ vty_out (vty, "%%BGP: No peer is configured with AS %s\n", arg);
return CMD_SUCCESS;
}
bgp = bgp_lookup_by_name (name);
if (bgp == NULL)
{
- vty_out (vty, "Can't find BGP instance %s%s", name, VTYNL);
+ vty_out (vty, "Can't find BGP instance %s\n", name);
return CMD_WARNING;
}
}
vty_out (vty, "Please specify 'bgp multiple-instance' first\n");
return CMD_WARNING;
case BGP_ERR_AS_MISMATCH:
- vty_out (vty, "BGP is already running; AS is %u%s", as, VTYNL);
+ vty_out (vty, "BGP is already running; AS is %u\n", as);
return CMD_WARNING;
case BGP_ERR_INSTANCE_MISMATCH:
vty_out (vty, "BGP instance name and AS number mismatch\n");
- vty_out (vty, "BGP instance is already running; AS is %u%s",
- as, VTYNL);
+ vty_out (vty, "BGP instance is already running; AS is %u\n",
+ as);
return CMD_WARNING;
}
if (ret < 0)
{
vty_out (vty,
- "%% Failed to %sset maximum-paths %s %u for afi %u, safi %u%s",
+ "%% Failed to %sset maximum-paths %s %u for afi %u, safi %u\n",
(set == 1) ? "" : "un",
(peer_type == BGP_PEER_EBGP) ? "ebgp" : "ibgp",
- maxpaths, afi, safi, VTYNL);
+ maxpaths, afi, safi);
return CMD_WARNING;
}
bgp_config_write_wpkt_quanta (struct vty *vty, struct bgp *bgp)
{
if (bgp->wpkt_quanta != BGP_WRITE_PACKET_MAX)
- vty_out (vty, " write-quanta %d%s",
- bgp->wpkt_quanta, VTYNL);
+ vty_out (vty, " write-quanta %d\n",
+ bgp->wpkt_quanta);
return 0;
}
bgp_config_write_coalesce_time (struct vty *vty, struct bgp *bgp)
{
if (bgp->coalesce_time != BGP_DEFAULT_SUBGROUP_COALESCE_TIME)
- vty_out (vty, " coalesce-time %u%s",
- bgp->coalesce_time, VTYNL);
+ vty_out (vty, " coalesce-time %u\n",
+ bgp->coalesce_time);
return 0;
}
if (bgp->maxpaths[afi][safi].maxpaths_ebgp != MULTIPATH_NUM)
{
bgp_config_write_family_header (vty, afi, safi, write);
- vty_out (vty, " maximum-paths %d%s",
- bgp->maxpaths[afi][safi].maxpaths_ebgp, VTYNL);
+ vty_out (vty, " maximum-paths %d\n",
+ bgp->maxpaths[afi][safi].maxpaths_ebgp);
}
if (bgp->maxpaths[afi][safi].maxpaths_ibgp != MULTIPATH_NUM)
return CMD_SUCCESS;
else
{
- vty_out (vty, "%% Same listen range is attached to peer-group %s%s",
- existing_group->name, VTYNL);
+ vty_out (vty, "%% Same listen range is attached to peer-group %s\n",
+ existing_group->name);
return CMD_WARNING;
}
}
char buf[PREFIX2STR_BUFFER];
if (bgp->dynamic_neighbors_limit != BGP_DYNAMIC_NEIGHBORS_LIMIT_DEFAULT)
- vty_out (vty, " bgp listen limit %d%s",
- bgp->dynamic_neighbors_limit, VTYNL);
+ vty_out (vty, " bgp listen limit %d\n",
+ bgp->dynamic_neighbors_limit);
for (ALL_LIST_ELEMENTS (bgp->group, node, nnode, group))
{
for (ALL_LIST_ELEMENTS (group->listen_range[afi], rnode, nrnode, range))
{
prefix2str(range, buf, sizeof(buf));
- vty_out(vty, " bgp listen range %s peer-group %s%s",
- buf, group->name, VTYNL);
+ vty_out(vty, " bgp listen range %s peer-group %s\n",
+ buf, group->name);
}
}
}
switch (ret)
{
case BGP_ERR_PEER_GROUP_MEMBER:
- vty_out (vty, "%% Peer-group AS %u. Cannot configure remote-as for member%s", as, VTYNL);
+ vty_out (vty, "%% Peer-group AS %u. Cannot configure remote-as for member\n", as);
return CMD_WARNING;
case BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT:
- vty_out (vty, "%% The AS# can not be changed from %u to %s, peer-group members must be all internal or all external%s", as, as_str, VTYNL);
+ vty_out (vty, "%% The AS# can not be changed from %u to %s, peer-group members must be all internal or all external\n", as, as_str);
return CMD_WARNING;
}
return bgp_vty_return (vty, ret);
peer = peer_lookup_by_conf_if (bgp, argv[idx_peer]->arg);
if (!peer)
{
- vty_out (vty, "%% Malformed address or name: %s%s", argv[idx_peer]->arg, VTYNL);
+ vty_out (vty, "%% Malformed address or name: %s\n", argv[idx_peer]->arg);
return CMD_WARNING;
}
}
if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT)
{
- vty_out (vty, "%% Peer with AS %u cannot be in this peer-group, members must be all internal or all external%s", as, VTYNL);
+ vty_out (vty, "%% Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n", as);
return CMD_WARNING;
}
* we should not accept a ttl-security hops value greater than 1.
*/
if (peer->conf_if && (gtsm_hops > 1)) {
- vty_out (vty, "%s is directly connected peer, hops cannot exceed 1%s",
- argv[idx_peer]->arg, VTYNL);
+ vty_out (vty, "%s is directly connected peer, hops cannot exceed 1\n",
+ argv[idx_peer]->arg);
return CMD_WARNING;
}
bgp = bgp_lookup_by_name (view_name);
if (bgp == NULL)
{
- vty_out (vty, "%% Can't find BGP instance %s%s", view_name, VTYNL);
+ vty_out (vty, "%% Can't find BGP instance %s\n", view_name);
return CMD_WARNING;
}
}
/* Skip VRFs. */
if (bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
continue;
- vty_out (vty, "\t%s (AS%u)%s",
+ vty_out (vty, "\t%s (AS%u)\n",
bgp->name ? bgp->name : "(null)",
- bgp->as, VTYNL);
+ bgp->as);
}
return CMD_SUCCESS;
count++;
if (!uj && count == 1)
- vty_out (vty, "%s%s", header, VTYNL);
+ vty_out (vty, "%s\n", header);
peers_cfg = peers_estb = 0;
if (uj)
json_object_object_add(json_vrfs, name, json_vrf);
}
else
- vty_out (vty, "%4s %-5d %-16s %9u %10u %s%s",
+ vty_out (vty, "%4s %-5d %-16s %9u %10u %s\n",
type, vrf_id_ui, inet_ntoa (bgp->router_id),
- peers_cfg, peers_estb, name,
- VTYNL);
+ peers_cfg, peers_estb, name);
}
if (uj)
json_object_int_add(json, "totalVrfs", count);
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
{
if (count)
- vty_out (vty, "\nTotal number of VRFs (including default): %d%s", count, VTYNL);
+ vty_out (vty, "\nTotal number of VRFs (including default): %d\n", count);
}
return CMD_SUCCESS;
/* RIB related usage stats */
count = mtype_stats_alloc (MTYPE_BGP_NODE);
- vty_out (vty, "%ld RIB nodes, using %s of memory%s", count,
+ vty_out (vty, "%ld RIB nodes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_node)),
- VTYNL);
+ count * sizeof (struct bgp_node)));
count = mtype_stats_alloc (MTYPE_BGP_ROUTE);
- vty_out (vty, "%ld BGP routes, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP routes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_info)),
- VTYNL);
+ count * sizeof (struct bgp_info)));
if ((count = mtype_stats_alloc (MTYPE_BGP_ROUTE_EXTRA)))
- vty_out (vty, "%ld BGP route ancillaries, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP route ancillaries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_info_extra)),
- VTYNL);
+ count * sizeof (struct bgp_info_extra)));
if ((count = mtype_stats_alloc (MTYPE_BGP_STATIC)))
- vty_out (vty, "%ld Static routes, using %s of memory%s", count,
+ vty_out (vty, "%ld Static routes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_static)),
- VTYNL);
+ count * sizeof (struct bgp_static)));
if ((count = mtype_stats_alloc (MTYPE_BGP_PACKET)))
- vty_out (vty, "%ld Packets, using %s of memory%s", count,
+ vty_out (vty, "%ld Packets, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bpacket)),
- VTYNL);
+ count * sizeof (struct bpacket)));
/* Adj-In/Out */
if ((count = mtype_stats_alloc (MTYPE_BGP_ADJ_IN)))
- vty_out (vty, "%ld Adj-In entries, using %s of memory%s", count,
+ vty_out (vty, "%ld Adj-In entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_adj_in)),
- VTYNL);
+ count * sizeof (struct bgp_adj_in)));
if ((count = mtype_stats_alloc (MTYPE_BGP_ADJ_OUT)))
- vty_out (vty, "%ld Adj-Out entries, using %s of memory%s", count,
+ vty_out (vty, "%ld Adj-Out entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_adj_out)),
- VTYNL);
+ count * sizeof (struct bgp_adj_out)));
if ((count = mtype_stats_alloc (MTYPE_BGP_NEXTHOP_CACHE)))
- vty_out (vty, "%ld Nexthop cache entries, using %s of memory%s", count,
+ vty_out (vty, "%ld Nexthop cache entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_nexthop_cache)),
- VTYNL);
+ count * sizeof (struct bgp_nexthop_cache)));
if ((count = mtype_stats_alloc (MTYPE_BGP_DAMP_INFO)))
- vty_out (vty, "%ld Dampening entries, using %s of memory%s", count,
+ vty_out (vty, "%ld Dampening entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct bgp_damp_info)),
- VTYNL);
+ count * sizeof (struct bgp_damp_info)));
/* Attributes */
count = attr_count();
- vty_out (vty, "%ld BGP attributes, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP attributes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof(struct attr)),
- VTYNL);
+ count * sizeof(struct attr)));
if ((count = mtype_stats_alloc (MTYPE_ATTR_EXTRA)))
- vty_out (vty, "%ld BGP extra attributes, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP extra attributes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof(struct attr_extra)),
- VTYNL);
+ count * sizeof(struct attr_extra)));
if ((count = attr_unknown_count()))
- vty_out (vty, "%ld unknown attributes%s", count, VTYNL);
+ vty_out (vty, "%ld unknown attributes\n", count);
/* AS_PATH attributes */
count = aspath_count ();
- vty_out (vty, "%ld BGP AS-PATH entries, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP AS-PATH entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct aspath)),
- VTYNL);
+ count * sizeof (struct aspath)));
count = mtype_stats_alloc (MTYPE_AS_SEG);
- vty_out (vty, "%ld BGP AS-PATH segments, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP AS-PATH segments, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct assegment)),
- VTYNL);
+ count * sizeof (struct assegment)));
/* Other attributes */
if ((count = community_count ()))
- vty_out (vty, "%ld BGP community entries, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP community entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct community)),
- VTYNL);
+ count * sizeof (struct community)));
if ((count = mtype_stats_alloc (MTYPE_ECOMMUNITY)))
- vty_out (vty, "%ld BGP community entries, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP community entries, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct ecommunity)),
- VTYNL);
+ count * sizeof (struct ecommunity)));
if ((count = mtype_stats_alloc (MTYPE_LCOMMUNITY)))
- vty_out (vty, "%ld BGP large-community entries, using %s of memory%s",
+ vty_out (vty, "%ld BGP large-community entries, using %s of memory\n",
count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct lcommunity)),
- VTYNL);
+ count * sizeof (struct lcommunity)));
if ((count = mtype_stats_alloc (MTYPE_CLUSTER)))
- vty_out (vty, "%ld Cluster lists, using %s of memory%s", count,
+ vty_out (vty, "%ld Cluster lists, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct cluster_list)),
- VTYNL);
+ count * sizeof (struct cluster_list)));
/* Peer related usage */
count = mtype_stats_alloc (MTYPE_BGP_PEER);
- vty_out (vty, "%ld peers, using %s of memory%s", count,
+ vty_out (vty, "%ld peers, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct peer)),
- VTYNL);
+ count * sizeof (struct peer)));
if ((count = mtype_stats_alloc (MTYPE_PEER_GROUP)))
- vty_out (vty, "%ld peer groups, using %s of memory%s", count,
+ vty_out (vty, "%ld peer groups, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct peer_group)),
- VTYNL);
+ count * sizeof (struct peer_group)));
/* Other */
if ((count = mtype_stats_alloc (MTYPE_HASH)))
- vty_out (vty, "%ld hash tables, using %s of memory%s", count,
+ vty_out (vty, "%ld hash tables, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct hash)),
- VTYNL);
+ count * sizeof (struct hash)));
if ((count = mtype_stats_alloc (MTYPE_HASH_BACKET)))
- vty_out (vty, "%ld hash buckets, using %s of memory%s", count,
+ vty_out (vty, "%ld hash buckets, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (struct hash_backet)),
- VTYNL);
+ count * sizeof (struct hash_backet)));
if ((count = mtype_stats_alloc (MTYPE_BGP_REGEXP)))
- vty_out (vty, "%ld compiled regexes, using %s of memory%s", count,
+ vty_out (vty, "%ld compiled regexes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof (regex_t)),
- VTYNL);
+ count * sizeof (regex_t)));
return CMD_SUCCESS;
}
}
else
{
- vty_out (vty, "Read-only mode update-delay limit: %d seconds%s",
- bgp->v_update_delay, VTYNL);
+ vty_out (vty, "Read-only mode update-delay limit: %d seconds\n",
+ bgp->v_update_delay);
if (bgp->v_update_delay != bgp->v_establish_wait)
- vty_out (vty, " Establish wait: %d seconds%s",
- bgp->v_establish_wait, VTYNL);
+ vty_out (vty, " Establish wait: %d seconds\n",
+ bgp->v_establish_wait);
if (bgp_update_delay_active(bgp))
{
- vty_out (vty, " First neighbor established: %s%s",
- bgp->update_delay_begin_time, VTYNL);
+ vty_out (vty, " First neighbor established: %s\n",
+ bgp->update_delay_begin_time);
vty_out (vty, " Delay in progress\n");
}
else
{
if (bgp->update_delay_over)
{
- vty_out (vty, " First neighbor established: %s%s",
- bgp->update_delay_begin_time, VTYNL);
- vty_out (vty, " Best-paths resumed: %s%s",
- bgp->update_delay_end_time, VTYNL);
- vty_out (vty, " zebra update resumed: %s%s",
- bgp->update_delay_zebra_resume_time, VTYNL);
- vty_out (vty, " peers update resumed: %s%s",
- bgp->update_delay_peers_resume_time, VTYNL);
+ vty_out (vty, " First neighbor established: %s\n",
+ bgp->update_delay_begin_time);
+ vty_out (vty, " Best-paths resumed: %s\n",
+ bgp->update_delay_end_time);
+ vty_out (vty, " zebra update resumed: %s\n",
+ bgp->update_delay_zebra_resume_time);
+ vty_out (vty, " peers update resumed: %s\n",
+ bgp->update_delay_peers_resume_time);
}
}
}
bgp_table_version(bgp->rib[afi][safi]), VTYNL);
ents = bgp_table_count (bgp->rib[afi][safi]);
- vty_out (vty, "RIB entries %ld, using %s of memory%s", ents,
+ vty_out (vty, "RIB entries %ld, using %s of memory\n", ents,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- ents * sizeof (struct bgp_node)),
- VTYNL);
+ ents * sizeof (struct bgp_node)));
/* Peer related usage */
ents = listcount (bgp->peer);
- vty_out (vty, "Peers %ld, using %s of memory%s",
+ vty_out (vty, "Peers %ld, using %s of memory\n",
ents,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- ents * sizeof (struct peer)),
- VTYNL);
+ ents * sizeof (struct peer)));
if ((ents = listcount (bgp->group)))
- vty_out (vty, "Peer groups %ld, using %s of memory%s", ents,
+ vty_out (vty, "Peer groups %ld, using %s of memory\n", ents,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- ents * sizeof (struct peer_group)),
- VTYNL);
+ ents * sizeof (struct peer_group)));
if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
vty_out (vty, "Dampening enabled.\n");
json_object_int_add(json, "totalPeers", count);
json_object_int_add(json, "dynamicPeers", dn_count);
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
{
if (count)
- vty_out (vty, "\nTotal number of neighbors %d%s",
- count, VTYNL);
+ vty_out (vty, "\nTotal number of neighbors %d\n",
+ count);
else
{
if (use_json)
vty_out(vty, "{\"error\": {\"message\": \"No %s neighbor configured\"}}%s",
afi_safi_print(afi, safi), VTYNL);
else
- vty_out (vty, "No %s neighbor is configured%s",
- afi_safi_print(afi, safi), VTYNL);
+ vty_out (vty, "No %s neighbor is configured\n",
+ afi_safi_print(afi, safi));
}
if (dn_count && ! use_json)
{
vty_out(vty, "* - dynamic neighbor\n");
vty_out(vty,
- "%d dynamic neighbor(s), limit %d%s",
- dn_count, bgp->dynamic_neighbors_limit, VTYNL);
+ "%d dynamic neighbor(s), limit %d\n",
+ dn_count, bgp->dynamic_neighbors_limit);
}
}
}
else
{
- vty_out (vty, "\n%s Summary:%s", afi_safi_print(afi, safi), VTYNL);
+ vty_out (vty, "\n%s Summary:\n", afi_safi_print(afi, safi));
}
}
bgp_show_summary (vty, bgp, afi, safi, use_json, json);
}
else
{
- vty_out (vty, "\nInstance %s:%s",
+ vty_out (vty, "\nInstance %s:\n",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
- ? "Default" : bgp->name, VTYNL);
+ ? "Default" : bgp->name);
}
bgp_show_summary_afi_safi (vty, bgp, afi, safi, use_json, json);
}
{
filter = &p->filter[afi][safi];
- vty_out (vty, " For address family: %s%s", afi_safi_print (afi, safi),
- VTYNL);
+ vty_out (vty, " For address family: %s\n", afi_safi_print (afi, safi));
if (peer_group_active(p))
- vty_out (vty, " %s peer-group member%s", p->group->name, VTYNL);
+ vty_out (vty, " %s peer-group member\n", p->group->name);
paf = peer_af_find(p, afi, safi);
if (paf && PAF_SUBGRP(paf))
{
vty_out (vty, " Update group %" PRIu64 ", subgroup %" PRIu64 "%s",
PAF_UPDGRP(paf)->id, PAF_SUBGRP(paf)->id, VTYNL);
- vty_out (vty, " Packet Queue length %d%s",
- bpacket_queue_virtual_length(paf), VTYNL);
+ vty_out (vty, " Packet Queue length %d\n",
+ bpacket_queue_virtual_length(paf));
}
else
{
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_ADV)
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_RCV))
{
- vty_out (vty, " Outbound Route Filter (ORF) type (%d) Prefix-list:%s",
- ORF_TYPE_PREFIX, VTYNL);
+ vty_out (vty, " Outbound Route Filter (ORF) type (%d) Prefix-list:\n",
+ ORF_TYPE_PREFIX);
bgp_show_peer_afi_orf_cap (vty, p, afi, safi,
PEER_CAP_ORF_PREFIX_SM_ADV,
PEER_CAP_ORF_PREFIX_RM_ADV,
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_ADV)
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_OLD_RCV))
{
- vty_out (vty, " Outbound Route Filter (ORF) type (%d) Prefix-list:%s",
- ORF_TYPE_PREFIX_OLD, VTYNL);
+ vty_out (vty, " Outbound Route Filter (ORF) type (%d) Prefix-list:\n",
+ ORF_TYPE_PREFIX_OLD);
bgp_show_peer_afi_orf_cap (vty, p, afi, safi,
PEER_CAP_ORF_PREFIX_SM_ADV,
PEER_CAP_ORF_PREFIX_RM_ADV,
/* prefix-list */
if (filter->plist[FILTER_IN].name)
- vty_out (vty, " Incoming update prefix filter list is %s%s%s",
+ vty_out (vty, " Incoming update prefix filter list is %s%s\n",
filter->plist[FILTER_IN].plist ? "*" : "",
- filter->plist[FILTER_IN].name,
- VTYNL);
+ filter->plist[FILTER_IN].name);
if (filter->plist[FILTER_OUT].name)
- vty_out (vty, " Outgoing update prefix filter list is %s%s%s",
+ vty_out (vty, " Outgoing update prefix filter list is %s%s\n",
filter->plist[FILTER_OUT].plist ? "*" : "",
- filter->plist[FILTER_OUT].name,
- VTYNL);
+ filter->plist[FILTER_OUT].name);
/* distribute-list */
if (filter->dlist[FILTER_IN].name)
- vty_out (vty, " Incoming update network filter list is %s%s%s",
+ vty_out (vty, " Incoming update network filter list is %s%s\n",
filter->dlist[FILTER_IN].alist ? "*" : "",
- filter->dlist[FILTER_IN].name,
- VTYNL);
+ filter->dlist[FILTER_IN].name);
if (filter->dlist[FILTER_OUT].name)
- vty_out (vty, " Outgoing update network filter list is %s%s%s",
+ vty_out (vty, " Outgoing update network filter list is %s%s\n",
filter->dlist[FILTER_OUT].alist ? "*" : "",
- filter->dlist[FILTER_OUT].name,
- VTYNL);
+ filter->dlist[FILTER_OUT].name);
/* filter-list. */
if (filter->aslist[FILTER_IN].name)
- vty_out (vty, " Incoming update AS path filter list is %s%s%s",
+ vty_out (vty, " Incoming update AS path filter list is %s%s\n",
filter->aslist[FILTER_IN].aslist ? "*" : "",
- filter->aslist[FILTER_IN].name,
- VTYNL);
+ filter->aslist[FILTER_IN].name);
if (filter->aslist[FILTER_OUT].name)
- vty_out (vty, " Outgoing update AS path filter list is %s%s%s",
+ vty_out (vty, " Outgoing update AS path filter list is %s%s\n",
filter->aslist[FILTER_OUT].aslist ? "*" : "",
- filter->aslist[FILTER_OUT].name,
- VTYNL);
+ filter->aslist[FILTER_OUT].name);
/* route-map. */
if (filter->map[RMAP_IN].name)
- vty_out (vty, " Route map for incoming advertisements is %s%s%s",
+ vty_out (vty, " Route map for incoming advertisements is %s%s\n",
filter->map[RMAP_IN].map ? "*" : "",
- filter->map[RMAP_IN].name,
- VTYNL);
+ filter->map[RMAP_IN].name);
if (filter->map[RMAP_OUT].name)
- vty_out (vty, " Route map for outgoing advertisements is %s%s%s",
+ vty_out (vty, " Route map for outgoing advertisements is %s%s\n",
filter->map[RMAP_OUT].map ? "*" : "",
- filter->map[RMAP_OUT].name,
- VTYNL);
+ filter->map[RMAP_OUT].name);
/* unsuppress-map */
if (filter->usmap.name)
- vty_out (vty, " Route map for selective unsuppress is %s%s%s",
+ vty_out (vty, " Route map for selective unsuppress is %s%s\n",
filter->usmap.map ? "*" : "",
- filter->usmap.name, VTYNL);
+ filter->usmap.name);
/* Receive prefix count */
- vty_out (vty, " %ld accepted prefixes%s", p->pcount[afi][safi], VTYNL);
+ vty_out (vty, " %ld accepted prefixes\n", p->pcount[afi][safi]);
/* Maximum prefix */
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX))
{
- vty_out (vty, " Maximum prefixes allowed %ld%s%s", p->pmax[afi][safi],
+ vty_out (vty, " Maximum prefixes allowed %ld%s\n", p->pmax[afi][safi],
CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_WARNING)
- ? " (warning-only)" : "", VTYNL);
+ ? " (warning-only)" : "");
vty_out (vty, " Threshold for warning message %d%%",
p->pmax_threshold[afi][safi]);
if (p->pmax_restart[afi][safi])
if (use_json)
json_object_string_add(json_neigh, "nbrDesc", p->desc);
else
- vty_out (vty, " Description: %s%s", p->desc, VTYNL);
+ vty_out (vty, " Description: %s\n", p->desc);
}
if (p->hostname)
else
{
if (p->domainname && (p->domainname[0] != '\0'))
- vty_out(vty, "Hostname: %s.%s%s", p->hostname, p->domainname,
- VTYNL);
+ vty_out(vty, "Hostname: %s.%s\n", p->hostname, p->domainname);
else
- vty_out(vty, "Hostname: %s%s", p->hostname, VTYNL);
+ vty_out(vty, "Hostname: %s\n", p->hostname);
}
}
}
else
{
- vty_out (vty, " Member of peer-group %s for session parameters%s",
- p->group->name, VTYNL);
+ vty_out (vty, " Member of peer-group %s for session parameters\n",
+ p->group->name);
if (dn_flag[0])
{
if (range)
{
prefix2str(range, buf1, sizeof(buf1));
- vty_out (vty, " Belongs to the subnet range group: %s%s", buf1, VTYNL);
+ vty_out (vty, " Belongs to the subnet range group: %s\n", buf1);
}
}
}
/* BGP Version. */
vty_out (vty, " BGP version 4");
- vty_out (vty, ", remote router ID %s%s",
- inet_ntop (AF_INET, &p->remote_id, buf1, sizeof(buf1)),
- VTYNL);
+ vty_out (vty, ", remote router ID %s\n",
+ inet_ntop (AF_INET, &p->remote_id, buf1, sizeof(buf1)));
/* Confederation */
if (CHECK_FLAG (bgp->config, BGP_CONFIG_CONFEDERATION)
/* read timer */
vty_out (vty, " Last read %s", peer_uptime (p->readtime, timebuf, BGP_UPTIME_LEN, 0, NULL));
- vty_out (vty, ", Last write %s%s",
- peer_uptime (p->last_write, timebuf, BGP_UPTIME_LEN, 0, NULL), VTYNL);
+ vty_out (vty, ", Last write %s\n",
+ peer_uptime (p->last_write, timebuf, BGP_UPTIME_LEN, 0, NULL));
/* Configured timer values. */
- vty_out (vty, " Hold time is %d, keepalive interval is %d seconds%s",
- p->v_holdtime, p->v_keepalive, VTYNL);
+ vty_out (vty, " Hold time is %d, keepalive interval is %d seconds\n",
+ p->v_holdtime, p->v_keepalive);
if (CHECK_FLAG (p->config, PEER_CONFIG_TIMER))
{
vty_out (vty, " Configured hold time is %d", p->holdtime);
- vty_out (vty, ", keepalive interval is %d seconds%s",
- p->keepalive, VTYNL);
+ vty_out (vty, ", keepalive interval is %d seconds\n",
+ p->keepalive);
}
}
/* Capability. */
vty_out (vty, " Address families by peer:\n ");
for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
if (CHECK_FLAG (p->af_cap[AFI_IP][safi], PEER_CAP_ENHE_AF_RCV))
- vty_out (vty, " %s%s",
- afi_safi_print (AFI_IP, safi), VTYNL);
+ vty_out (vty, " %s\n",
+ afi_safi_print (AFI_IP, safi));
}
}
{
int restart_af_count = 0;
- vty_out (vty, " Remote Restart timer is %d seconds%s",
- p->v_gr_restart, VTYNL);
+ vty_out (vty, " Remote Restart timer is %d seconds\n",
+ p->v_gr_restart);
vty_out (vty, " Address families by peer:\n ");
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
}
if (p->t_gr_restart)
- vty_out (vty, " The remaining time of restart timer is %ld%s",
- thread_timer_remain_second (p->t_gr_restart), VTYNL);
+ vty_out (vty, " The remaining time of restart timer is %ld\n",
+ thread_timer_remain_second (p->t_gr_restart));
if (p->t_gr_stale)
- vty_out (vty, " The remaining time of stalepath timer is %ld%s",
- thread_timer_remain_second (p->t_gr_stale), VTYNL);
+ vty_out (vty, " The remaining time of stalepath timer is %ld\n",
+ thread_timer_remain_second (p->t_gr_stale));
}
}
if (use_json)
/* Packet counts. */
vty_out (vty, " Message statistics:\n");
vty_out (vty, " Inq depth is 0\n");
- vty_out (vty, " Outq depth is %lu%s", (unsigned long) p->obuf->count, VTYNL);
+ vty_out (vty, " Outq depth is %lu\n", (unsigned long) p->obuf->count);
vty_out (vty, " Sent Rcvd\n");
- vty_out (vty, " Opens: %10d %10d%s", p->open_out, p->open_in, VTYNL);
- vty_out (vty, " Notifications: %10d %10d%s", p->notify_out, p->notify_in, VTYNL);
- vty_out (vty, " Updates: %10d %10d%s", p->update_out, p->update_in, VTYNL);
- vty_out (vty, " Keepalives: %10d %10d%s", p->keepalive_out, p->keepalive_in, VTYNL);
- vty_out (vty, " Route Refresh: %10d %10d%s", p->refresh_out, p->refresh_in, VTYNL);
- vty_out (vty, " Capability: %10d %10d%s", p->dynamic_cap_out, p->dynamic_cap_in, VTYNL);
- vty_out (vty, " Total: %10d %10d%s", p->open_out + p->notify_out +
+ vty_out (vty, " Opens: %10d %10d\n", p->open_out, p->open_in);
+ vty_out (vty, " Notifications: %10d %10d\n", p->notify_out, p->notify_in);
+ vty_out (vty, " Updates: %10d %10d\n", p->update_out, p->update_in);
+ vty_out (vty, " Keepalives: %10d %10d\n", p->keepalive_out, p->keepalive_in);
+ vty_out (vty, " Route Refresh: %10d %10d\n", p->refresh_out, p->refresh_in);
+ vty_out (vty, " Capability: %10d %10d\n", p->dynamic_cap_out, p->dynamic_cap_in);
+ vty_out (vty, " Total: %10d %10d\n", p->open_out + p->notify_out +
p->update_out + p->keepalive_out + p->refresh_out + p->dynamic_cap_out,
p->open_in + p->notify_in + p->update_in + p->keepalive_in + p->refresh_in +
- p->dynamic_cap_in, VTYNL);
+ p->dynamic_cap_in);
}
if (use_json)
else
{
/* advertisement-interval */
- vty_out (vty, " Minimum time between advertisement runs is %d seconds%s",
- p->v_routeadv, VTYNL);
+ vty_out (vty, " Minimum time between advertisement runs is %d seconds\n",
+ p->v_routeadv);
/* Update-source. */
if (p->update_if || p->update_source)
json_object_int_add(json_neigh, "connectionsDropped", p->dropped);
}
else
- vty_out (vty, " Connections established %d; dropped %d%s", p->established, p->dropped,
- VTYNL);
+ vty_out (vty, " Connections established %d; dropped %d\n", p->established, p->dropped);
if (! p->last_reset)
{
{
code_str = bgp_notify_code_str(p->notify.code);
subcode_str = bgp_notify_subcode_str(p->notify.code, p->notify.subcode);
- vty_out (vty, "due to NOTIFICATION %s (%s%s)%s",
+ vty_out (vty, "due to NOTIFICATION %s (%s%s)\n",
p->last_reset == PEER_DOWN_NOTIFY_SEND ? "sent" : "received",
- code_str, subcode_str, VTYNL);
+ code_str, subcode_str);
if (p->last_reset == PEER_DOWN_NOTIFY_RECEIVED
&& p->notify.code == BGP_NOTIFY_CEASE
&& (p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN
}
else
{
- vty_out (vty, "due to %s%s",
- peer_down_str[(int) p->last_reset], VTYNL);
+ vty_out (vty, "due to %s\n",
+ peer_down_str[(int) p->last_reset]);
}
if (p->last_reset_cause_size)
json_object_int_add(json_neigh, "restartInTimerMsec", thread_timer_remain_second (p->t_pmax_restart) * 1000);
}
else
- vty_out (vty, " Reduce the no. of prefix from %s, will restart in %ld seconds%s",
- p->host, thread_timer_remain_second (p->t_pmax_restart),
- VTYNL);
+ vty_out (vty, " Reduce the no. of prefix from %s, will restart in %ld seconds\n",
+ p->host, thread_timer_remain_second (p->t_pmax_restart));
}
else
{
if (use_json)
json_object_boolean_true_add(json_neigh, "reducePrefixNumAndClearIpBgp");
else
- vty_out (vty, " Reduce the no. of prefix and clear ip bgp %s to restore peering%s",
- p->host, VTYNL);
+ vty_out (vty, " Reduce the no. of prefix and clear ip bgp %s to restore peering\n",
+ p->host);
}
}
else
{
if (p->gtsm_hops > 0)
- vty_out (vty, " External BGP neighbor may be up to %d hops away.%s",
- p->gtsm_hops, VTYNL);
+ vty_out (vty, " External BGP neighbor may be up to %d hops away.\n",
+ p->gtsm_hops);
else if (p->ttl > 1)
- vty_out (vty, " External BGP neighbor may be up to %d hops away.%s",
- p->ttl, VTYNL);
+ vty_out (vty, " External BGP neighbor may be up to %d hops away.\n",
+ p->ttl);
}
}
else
if (use_json)
json_object_int_add(json_neigh, "internalBgpNbrMaxHopsAway", p->gtsm_hops);
else
- vty_out (vty, " Internal BGP neighbor may be up to %d hops away.%s",
- p->gtsm_hops, VTYNL);
+ vty_out (vty, " Internal BGP neighbor may be up to %d hops away.\n",
+ p->gtsm_hops);
}
}
json_object_int_add(json_neigh, "portLocal", ntohs (p->su_local->sin.sin_port));
}
else
- vty_out (vty, "Local host: %s, Local port: %d%s",
+ vty_out (vty, "Local host: %s, Local port: %d\n",
sockunion2str (p->su_local, buf1, SU_ADDRSTRLEN),
- ntohs (p->su_local->sin.sin_port),
- VTYNL);
+ ntohs (p->su_local->sin.sin_port));
}
/* Remote address. */
json_object_int_add(json_neigh, "portForeign", ntohs (p->su_remote->sin.sin_port));
}
else
- vty_out (vty, "Foreign host: %s, Foreign port: %d%s",
+ vty_out (vty, "Foreign host: %s, Foreign port: %d\n",
sockunion2str (p->su_remote, buf1, SU_ADDRSTRLEN),
- ntohs (p->su_remote->sin.sin_port),
- VTYNL);
+ ntohs (p->su_remote->sin.sin_port));
}
/* Nexthop display. */
}
else
{
- vty_out (vty, "Nexthop: %s%s",
- inet_ntop (AF_INET, &p->nexthop.v4, buf1, sizeof(buf1)),
- VTYNL);
- vty_out (vty, "Nexthop global: %s%s",
- inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, sizeof(buf1)),
- VTYNL);
- vty_out (vty, "Nexthop local: %s%s",
- inet_ntop (AF_INET6, &p->nexthop.v6_local, buf1, sizeof(buf1)),
- VTYNL);
- vty_out (vty, "BGP connection: %s%s",
- p->shared_network ? "shared network" : "non shared network",
- VTYNL);
+ vty_out (vty, "Nexthop: %s\n",
+ inet_ntop (AF_INET, &p->nexthop.v4, buf1, sizeof(buf1)));
+ vty_out (vty, "Nexthop global: %s\n",
+ inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, sizeof(buf1)));
+ vty_out (vty, "Nexthop local: %s\n",
+ inet_ntop (AF_INET6, &p->nexthop.v6_local, buf1, sizeof(buf1)));
+ vty_out (vty, "BGP connection: %s\n",
+ p->shared_network ? "shared network" : "non shared network");
}
}
}
else
{
- vty_out (vty, "BGP Connect Retry Timer in Seconds: %d%s",
- p->v_connect, VTYNL);
+ vty_out (vty, "BGP Connect Retry Timer in Seconds: %d\n",
+ p->v_connect);
if (p->status == Established && p->rtt)
- vty_out (vty, "Estimated round trip time: %d ms%s",
- p->rtt, VTYNL);
+ vty_out (vty, "Estimated round trip time: %d ms\n",
+ p->rtt);
if (p->t_start)
- vty_out (vty, "Next start timer due in %ld seconds%s",
- thread_timer_remain_second (p->t_start), VTYNL);
+ vty_out (vty, "Next start timer due in %ld seconds\n",
+ thread_timer_remain_second (p->t_start));
if (p->t_connect)
- vty_out (vty, "Next connect timer due in %ld seconds%s",
- thread_timer_remain_second (p->t_connect), VTYNL);
+ vty_out (vty, "Next connect timer due in %ld seconds\n",
+ thread_timer_remain_second (p->t_connect));
if (p->t_routeadv)
- vty_out (vty, "MRAI (interval %u) timer expires in %ld seconds%s",
- p->v_routeadv, thread_timer_remain_second (p->t_routeadv),
- VTYNL);
+ vty_out (vty, "MRAI (interval %u) timer expires in %ld seconds\n",
+ p->v_routeadv, thread_timer_remain_second (p->t_routeadv));
if (p->password)
vty_out (vty, "Peer Authentication Enabled\n");
- vty_out (vty, "Read thread: %s Write thread: %s%s",
+ vty_out (vty, "Read thread: %s Write thread: %s\n",
p->t_read ? "on" : "off",
- p->t_write ? "on" : "off",
- VTYNL);
+ p->t_write ? "on" : "off");
}
if (p->notify.code == BGP_NOTIFY_OPEN_ERR
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
}
else
{
- vty_out (vty, "\nInstance %s:%s",
+ vty_out (vty, "\nInstance %s:\n",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
- ? "Default" : bgp->name,
- VTYNL);
+ ? "Default" : bgp->name);
}
bgp_show_neighbor (vty, bgp, show_all, NULL, NULL, use_json, json);
}
{
json = json_object_new_object();
json_object_boolean_true_add(json, "bgpNoSuchInstance");
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
struct community *com;
com = (struct community *) backet->data;
- vty_out (vty, "[%p] (%ld) %s%s", (void *)backet, com->refcnt,
- community_str (com), VTYNL);
+ vty_out (vty, "[%p] (%ld) %s\n", (void *)backet, com->refcnt,
+ community_str (com));
}
/* Show BGP's community internal data. */
struct lcommunity *lcom;
lcom = (struct lcommunity *) backet->data;
- vty_out (vty, "[%p] (%ld) %s%s", (void *)backet, lcom->refcnt,
- lcommunity_str (lcom), VTYNL);
+ vty_out (vty, "[%p] (%ld) %s\n", (void *)backet, lcom->refcnt,
+ lcommunity_str (lcom));
}
/* Show BGP's community internal data. */
for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
- vty_out (vty, "\nInstance %s:%s",
- (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name,
- VTYNL);
+ vty_out (vty, "\nInstance %s:\n",
+ (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
update_group_show(bgp, afi, safi, vty, 0);
}
}
if (conf->as_type == AS_SPECIFIED ||
conf->as_type == AS_EXTERNAL) {
- vty_out (vty, "\nBGP peer-group %s, remote AS %d%s", group->name, conf->as, VTYNL);
+ vty_out (vty, "\nBGP peer-group %s, remote AS %d\n", group->name, conf->as);
} else if (conf->as_type == AS_INTERNAL) {
- vty_out (vty, "\nBGP peer-group %s, remote AS %d%s", group->name, group->bgp->as, VTYNL);
+ vty_out (vty, "\nBGP peer-group %s, remote AS %d\n", group->name, group->bgp->as);
} else {
- vty_out (vty, "\nBGP peer-group %s%s", group->name, VTYNL);
+ vty_out (vty, "\nBGP peer-group %s\n", group->name);
}
if ((group->bgp->as == conf->as) || (conf->as_type == AS_INTERNAL))
if (lr_count)
{
vty_out(vty,
- " %d %s listen range(s)%s",
- lr_count, af_str, VTYNL);
+ " %d %s listen range(s)\n",
+ lr_count, af_str);
for (ALL_LIST_ELEMENTS (group->listen_range[afi], node,
nnode, range))
{
prefix2str(range, buf, sizeof(buf));
- vty_out(vty, " %s%s", buf, VTYNL);
+ vty_out(vty, " %s\n", buf);
}
}
}
peer_status = lookup_msg(bgp_status_msg, peer->status, NULL);
dynamic = peer_dynamic_neighbor(peer);
- vty_out (vty, " %s %s %s %s",
+ vty_out (vty, " %s %s %s \n",
peer->host, dynamic ? "(dynamic)" : "",
- peer_status, VTYNL);
+ peer_status);
}
}
if (entry == list->head)
{
if (all_digit (list->name))
- vty_out (vty, "Community %s list %s%s",
+ vty_out (vty, "Community %s list %s\n",
entry->style == COMMUNITY_LIST_STANDARD ?
"standard" : "(expanded) access",
- list->name, VTYNL);
+ list->name);
else
- vty_out (vty, "Named Community %s list %s%s",
+ vty_out (vty, "Named Community %s list %s\n",
entry->style == COMMUNITY_LIST_STANDARD ?
"standard" : "expanded",
- list->name, VTYNL);
+ list->name);
}
if (entry->any)
- vty_out (vty, " %s%s",
- community_direct_str (entry->direct), VTYNL);
+ vty_out (vty, " %s\n",
+ community_direct_str (entry->direct));
else
- vty_out (vty, " %s %s%s",
+ vty_out (vty, " %s %s\n",
community_direct_str (entry->direct),
entry->style == COMMUNITY_LIST_STANDARD
- ? community_str (entry->u.com) : entry->config,
- VTYNL);
+ ? community_str (entry->u.com) : entry->config);
}
}
if (entry == list->head)
{
if (all_digit (list->name))
- vty_out (vty, "Large community %s list %s%s",
+ vty_out (vty, "Large community %s list %s\n",
entry->style == EXTCOMMUNITY_LIST_STANDARD ?
"standard" : "(expanded) access",
- list->name, VTYNL);
+ list->name);
else
- vty_out (vty, "Named large community %s list %s%s",
+ vty_out (vty, "Named large community %s list %s\n",
entry->style == EXTCOMMUNITY_LIST_STANDARD ?
"standard" : "expanded",
- list->name, VTYNL);
+ list->name);
}
if (entry->any)
- vty_out (vty, " %s%s",
- community_direct_str (entry->direct), VTYNL);
+ vty_out (vty, " %s\n",
+ community_direct_str (entry->direct));
else
- vty_out (vty, " %s %s%s",
+ vty_out (vty, " %s %s\n",
community_direct_str (entry->direct),
entry->style == EXTCOMMUNITY_LIST_STANDARD ?
- entry->u.ecom->str : entry->config,
- VTYNL);
+ entry->u.ecom->str : entry->config);
}
}
if (entry == list->head)
{
if (all_digit (list->name))
- vty_out (vty, "Extended community %s list %s%s",
+ vty_out (vty, "Extended community %s list %s\n",
entry->style == EXTCOMMUNITY_LIST_STANDARD ?
"standard" : "(expanded) access",
- list->name, VTYNL);
+ list->name);
else
- vty_out (vty, "Named extended community %s list %s%s",
+ vty_out (vty, "Named extended community %s list %s\n",
entry->style == EXTCOMMUNITY_LIST_STANDARD ?
"standard" : "expanded",
- list->name, VTYNL);
+ list->name);
}
if (entry->any)
- vty_out (vty, " %s%s",
- community_direct_str (entry->direct), VTYNL);
+ vty_out (vty, " %s\n",
+ community_direct_str (entry->direct));
else
- vty_out (vty, " %s %s%s",
+ vty_out (vty, " %s %s\n",
community_direct_str (entry->direct),
entry->style == EXTCOMMUNITY_LIST_STANDARD ?
- entry->u.ecom->str : entry->config,
- VTYNL);
+ entry->u.ecom->str : entry->config);
}
}
for (list = cm->num.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next)
{
- vty_out (vty, "ip community-list %s %s %s%s",
+ vty_out (vty, "ip community-list %s %s %s\n",
list->name, community_direct_str (entry->direct),
- community_list_config_str (entry),
- VTYNL);
+ community_list_config_str (entry));
write++;
}
for (list = cm->str.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next)
{
- vty_out (vty, "ip community-list %s %s %s %s%s",
+ vty_out (vty, "ip community-list %s %s %s %s\n",
entry->style == COMMUNITY_LIST_STANDARD
? "standard" : "expanded",
list->name, community_direct_str (entry->direct),
- community_list_config_str (entry),
- VTYNL);
+ community_list_config_str (entry));
write++;
}
for (list = cm->num.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next)
{
- vty_out (vty, "ip extcommunity-list %s %s %s%s",
+ vty_out (vty, "ip extcommunity-list %s %s %s\n",
list->name, community_direct_str (entry->direct),
- community_list_config_str (entry), VTYNL);
+ community_list_config_str (entry));
write++;
}
for (list = cm->str.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next)
{
- vty_out (vty, "ip extcommunity-list %s %s %s %s%s",
+ vty_out (vty, "ip extcommunity-list %s %s %s %s\n",
entry->style == EXTCOMMUNITY_LIST_STANDARD
? "standard" : "expanded",
list->name, community_direct_str (entry->direct),
- community_list_config_str (entry), VTYNL);
+ community_list_config_str (entry));
write++;
}
for (list = cm->num.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next)
{
- vty_out (vty, "ip large-community-list %s %s %s%s",
+ vty_out (vty, "ip large-community-list %s %s %s\n",
list->name, community_direct_str (entry->direct),
- community_list_config_str (entry), VTYNL);
+ community_list_config_str (entry));
write++;
}
for (list = cm->str.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next)
{
- vty_out (vty, "ip large-community-list %s %s %s %s%s",
+ vty_out (vty, "ip large-community-list %s %s %s %s\n",
entry->style == LARGE_COMMUNITY_LIST_STANDARD
? "standard" : "expanded",
list->name, community_direct_str (entry->direct),
- community_list_config_str (entry), VTYNL);
+ community_list_config_str (entry));
write++;
}
struct in_addr router_id;
router_id.s_addr = eigrp->router_id;
- vty_out (vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)%s\n", eigrp->AS, inet_ntoa(router_id), VTYNL);
+ vty_out (vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)\n\n", eigrp->AS, inet_ntoa(router_id));
vty_out (vty, "Codes: P - Passive, A - Active, U - Update, Q - Query, "
"R - Reply%s r - reply Status, s - sia Status%s\n",
VTYNL, VTYNL);
ui_level,
area->dynhostname);
- vty_out (vty, " %u LSPs%s\n",
- lsp_count, VTYNL);
+ vty_out (vty, " %u LSPs\n\n",
+ lsp_count);
}
}
}
vty_out (vty, "%s\n", underln);
vty_out (vty, "# allocated: %d\n", _hashes->count);
- vty_out (vty, "# named: %d%s\n", tt->nrows - 1, VTYNL);
+ vty_out (vty, "# named: %d\n\n", tt->nrows - 1);
if (tt->nrows > 1)
{
ttable_colseps (tt, 0, RIGHT, true, '|');
char *table = ttable_dump (tt, VTYNL);
- vty_out (vty, "%s%s", table, VTYNL);
+ vty_out (vty, "%s\n", table);
XFREE (MTYPE_TMP, table);
}
else
if (ifp == NULL)
{
- vty_out (vty, "%% Interface %s does not exist%s", ifname, VTYNL);
+ vty_out (vty, "%% Interface %s does not exist\n", ifname);
return CMD_WARNING;
}
p = ifc->address;
if (p->family == AF_INET)
- vty_out (vty, "%s/%d%s", inet_ntoa (p->u.prefix4), p->prefixlen,
- VTYNL);
+ vty_out (vty, "%s/%d\n", inet_ntoa (p->u.prefix4), p->prefixlen);
}
}
return CMD_SUCCESS;
if (!vrf->iflist || !listcount (vrf->iflist))
continue;
- vty_out (vty, "\nVRF %u%s%s", vrf->vrf_id, VTYNL,
- VTYNL);
+ vty_out (vty, "\nVRF %u\n\n", vrf->vrf_id);
for (ALL_LIST_ELEMENTS_RO (vrf->iflist, node, ifp))
{
p = ifc->address;
if (p->family == AF_INET)
- vty_out (vty, "%s/%d%s", inet_ntoa (p->u.prefix4), p->prefixlen,
- VTYNL);
+ vty_out (vty, "%s/%d\n", inet_ntoa (p->u.prefix4), p->prefixlen);
}
}
}
{
struct frrmod_runtime *plug = frrmod_list;
- vty_out (vty, "%-12s %-25s %s%s\n",
- "Module Name", "Version", "Description",
- VTYNL);
+ vty_out (vty, "%-12s %-25s %s\n\n",
+ "Module Name", "Version", "Description");
while (plug)
{
const struct frrmod_info *i = plug->info;
if (ns->name && strcmp (ns->name, pathname) != 0)
{
- vty_out (vty, "NS %u is already configured with NETNS %s%s",
- ns->ns_id, ns->name, VTYNL);
+ vty_out (vty, "NS %u is already configured with NETNS %s\n",
+ ns->ns_id, ns->name);
return CMD_WARNING;
}
if (!ns_enable (ns))
{
- vty_out (vty, "Can not associate NS %u with NETNS %s%s",
- ns->ns_id, ns->name, VTYNL);
+ vty_out (vty, "Can not associate NS %u with NETNS %s\n",
+ ns->ns_id, ns->name);
return CMD_WARNING;
}
if (vrfp == NULL)
{
- vty_out (vty, "%% VRF %s does not exist%s", vrfname, VTYNL);
+ vty_out (vty, "%% VRF %s does not exist\n", vrfname);
return CMD_WARNING;
}
struct vrf *vrf; \
if (!(vrf = vrf_lookup_by_name(NAME))) \
{ \
- vty_out (vty, "%% VRF %s not found%s", NAME, VTYNL);\
+ vty_out (vty, "%% VRF %s not found\n", NAME);\
return CMD_WARNING; \
} \
if (vrf->vrf_id == VRF_UNKNOWN) \
{ \
- vty_out (vty, "%% VRF %s not active%s", NAME, VTYNL);\
+ vty_out (vty, "%% VRF %s not active\n", NAME);\
return CMD_WARNING; \
} \
(V) = vrf->vrf_id; \
vector_free(varcomps);
}
#if 0
- vty_out (vty, " %-*s %s%s", width
+ vty_out (vty, " %-*s %s\n", width
desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd,
- desc->str ? desc->str : "", VTYNL);
+ desc->str ? desc->str : "");
#endif /* 0 */
}
for (i = 0; i < vector_active (vtyvec); i++)
if ((v = vector_slot (vtyvec, i)) != NULL)
- vty_out (vty, "%svty[%d] connected from %s.%s",
+ vty_out (vty, "%svty[%d] connected from %s.\n",
v->config ? "*" : " ",
- i, v->address, VTYNL);
+ i, v->address);
return CMD_SUCCESS;
}
}
if (vty->hist[index] != NULL)
- vty_out (vty, " %s%s", vty->hist[index], VTYNL);
+ vty_out (vty, " %s\n", vty->hist[index]);
index++;
}
prefix_lsa = (struct ospf6_inter_prefix_lsa *)
OSPF6_LSA_HEADER_END (lsa->header);
- vty_out (vty, " Metric: %lu%s",
- (u_long) OSPF6_ABR_SUMMARY_METRIC (prefix_lsa), VTYNL);
+ vty_out (vty, " Metric: %lu\n",
+ (u_long) OSPF6_ABR_SUMMARY_METRIC (prefix_lsa));
ospf6_prefix_options_printbuf (prefix_lsa->prefix.prefix_options,
buf, sizeof (buf));
- vty_out (vty, " Prefix Options: %s%s", buf, VTYNL);
+ vty_out (vty, " Prefix Options: %s\n", buf);
- vty_out (vty, " Prefix: %s%s",
+ vty_out (vty, " Prefix: %s\n",
ospf6_inter_area_prefix_lsa_get_prefix_str (lsa, buf, sizeof(buf),
- 0), VTYNL);
+ 0));
return 0;
}
OSPF6_LSA_HEADER_END (lsa->header);
ospf6_options_printbuf (router_lsa->options, buf, sizeof (buf));
- vty_out (vty, " Options: %s%s", buf, VTYNL);
- vty_out (vty, " Metric: %lu%s",
- (u_long) OSPF6_ABR_SUMMARY_METRIC (router_lsa), VTYNL);
+ vty_out (vty, " Options: %s\n", buf);
+ vty_out (vty, " Metric: %lu\n",
+ (u_long) OSPF6_ABR_SUMMARY_METRIC (router_lsa));
inet_ntop (AF_INET, &router_lsa->router_id, buf, sizeof (buf));
- vty_out (vty, " Destination Router ID: %s%s", buf, VTYNL);
+ vty_out (vty, " Destination Router ID: %s\n", buf);
return 0;
}
unsigned long result;
if (!IS_AREA_STUB (oa))
- vty_out (vty, " Area %s%s", oa->name, VTYNL);
+ vty_out (vty, " Area %s\n", oa->name);
else
{
if (oa->no_summary)
{
- vty_out (vty, " Area %s[Stub, No Summary]%s", oa->name, VTYNL);
+ vty_out (vty, " Area %s[Stub, No Summary]\n", oa->name);
}
else
{
- vty_out (vty, " Area %s[Stub]%s", oa->name, VTYNL);
+ vty_out (vty, " Area %s[Stub]\n", oa->name);
}
}
- vty_out (vty, " Number of Area scoped LSAs is %u%s",
- oa->lsdb->count, VTYNL);
+ vty_out (vty, " Number of Area scoped LSAs is %u\n",
+ oa->lsdb->count);
vty_out (vty, " Interface attached to this area:");
for (ALL_LIST_ELEMENTS_RO (oa->if_list, i, oi))
u_int32_t area_id = htonl (strtoul (str, &ep, 10)); \
if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \
{ \
- vty_out (vty, "Malformed Area-ID: %s%s", str, VTYNL); \
+ vty_out (vty, "Malformed Area-ID: %s\n", str); \
return CMD_SUCCESS; \
} \
int format = !*ep ? OSPF6_AREA_FMT_DECIMAL : \
ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &prefix);
if (ret != 1 || prefix.family != AF_INET6)
{
- vty_out (vty, "Malformed argument: %s%s", argv[idx_ipv6_prefixlen]->arg, VTYNL);
+ vty_out (vty, "Malformed argument: %s\n", argv[idx_ipv6_prefixlen]->arg);
return CMD_SUCCESS;
}
ret = str2prefix (argv[idx_ipv6]->arg, &prefix);
if (ret != 1 || prefix.family != AF_INET6)
{
- vty_out (vty, "Malformed argument: %s%s", argv[idx_ipv6]->arg, VTYNL);
+ vty_out (vty, "Malformed argument: %s\n", argv[idx_ipv6]->arg);
return CMD_SUCCESS;
}
range = ospf6_route_lookup (&prefix, oa->range_table);
if (range == NULL)
{
- vty_out (vty, "Range %s does not exists.%s", argv[idx_ipv6]->arg, VTYNL);
+ vty_out (vty, "Range %s does not exists.\n", argv[idx_ipv6]->arg);
return CMD_SUCCESS;
}
if (IS_AREA_STUB (oa))
{
if (oa->no_summary)
- vty_out (vty, " area %s stub no-summary%s", oa->name, VTYNL);
+ vty_out (vty, " area %s stub no-summary\n", oa->name);
else
- vty_out (vty, " area %s stub%s", oa->name, VTYNL);
+ vty_out (vty, " area %s stub\n", oa->name);
}
if (PREFIX_NAME_IN (oa))
- vty_out (vty, " area %s filter-list prefix %s in%s",
- oa->name, PREFIX_NAME_IN (oa), VTYNL);
+ vty_out (vty, " area %s filter-list prefix %s in\n",
+ oa->name, PREFIX_NAME_IN (oa));
if (PREFIX_NAME_OUT (oa))
- vty_out (vty, " area %s filter-list prefix %s out%s",
- oa->name, PREFIX_NAME_OUT (oa), VTYNL);
+ vty_out (vty, " area %s filter-list prefix %s out\n",
+ oa->name, PREFIX_NAME_OUT (oa));
if (IMPORT_NAME (oa))
- vty_out (vty, " area %s import-list %s%s",
- oa->name, IMPORT_NAME (oa), VTYNL);
+ vty_out (vty, " area %s import-list %s\n",
+ oa->name, IMPORT_NAME (oa));
if (EXPORT_NAME (oa))
- vty_out (vty, " area %s export-list %s%s",
- oa->name, EXPORT_NAME (oa), VTYNL);
+ vty_out (vty, " area %s export-list %s\n",
+ oa->name, EXPORT_NAME (oa));
}
}
route = ospf6_route_lookup (&prefix, oa->spf_table);
if (route == NULL)
{
- vty_out (vty, "LS entry for root not found in area %s%s",
- oa->name, VTYNL);
+ vty_out (vty, "LS entry for root not found in area %s\n",
+ oa->name);
continue;
}
root = (struct ospf6_vertex *) route->route_option;
if (inet_pton (AF_INET, argv[idx_ipv4]->arg, &area_id) != 1)
{
- vty_out (vty, "Malformed Area-ID: %s%s", argv[idx_ipv4]->arg, VTYNL);
+ vty_out (vty, "Malformed Area-ID: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
oa = ospf6_area_lookup (area_id, ospf6);
if (oa == NULL)
{
- vty_out (vty, "No such Area: %s%s", argv[idx_ipv4]->arg, VTYNL);
+ vty_out (vty, "No such Area: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
route = ospf6_route_lookup (&prefix, oa->spf_table);
if (route == NULL)
{
- vty_out (vty, "LS entry for root not found in area %s%s",
- oa->name, VTYNL);
+ vty_out (vty, "LS entry for root not found in area %s\n",
+ oa->name);
return CMD_SUCCESS;
}
root = (struct ospf6_vertex *) route->route_option;
if (inet_pton (AF_INET, argv[idx_ipv4_2]->arg, &area_id) != 1)
{
- vty_out (vty, "Malformed Area-ID: %s%s", argv[idx_ipv4_2]->arg, VTYNL);
+ vty_out (vty, "Malformed Area-ID: %s\n", argv[idx_ipv4_2]->arg);
return CMD_SUCCESS;
}
oa = ospf6_area_lookup (area_id, ospf6);
if (oa == NULL)
{
- vty_out (vty, "No such Area: %s%s", argv[idx_ipv4_2]->arg, VTYNL);
+ vty_out (vty, "No such Area: %s\n", argv[idx_ipv4_2]->arg);
return CMD_SUCCESS;
}
continue;
if (ospf6->rmap[type].name)
- vty_out (vty, " redistribute %s route-map %s%s",
- ZROUTE_NAME (type), ospf6->rmap[type].name, VTYNL);
+ vty_out (vty, " redistribute %s route-map %s\n",
+ ZROUTE_NAME (type), ospf6->rmap[type].name);
else
- vty_out (vty, " redistribute %s%s",
- ZROUTE_NAME (type), VTYNL);
+ vty_out (vty, " redistribute %s\n",
+ ZROUTE_NAME (type));
}
return 0;
(ospf6->rmap[type].map ? "" : " (not found !)"),
VTYNL);
else
- vty_out (vty, " %d: %s%s", nroute[type],
- ZROUTE_NAME (type), VTYNL);
+ vty_out (vty, " %d: %s\n", nroute[type],
+ ZROUTE_NAME (type));
}
- vty_out (vty, "Total %d routes%s", total, VTYNL);
+ vty_out (vty, "Total %d routes\n", total);
}
(CHECK_FLAG (external->bits_metric, OSPF6_ASBR_BIT_F) ? 'F' : '-'),
(CHECK_FLAG (external->bits_metric, OSPF6_ASBR_BIT_T) ? 'T' : '-'));
- vty_out (vty, " Bits: %s%s", buf, VTYNL);
- vty_out (vty, " Metric: %5lu%s", (u_long) OSPF6_ASBR_METRIC (external),
- VTYNL);
+ vty_out (vty, " Bits: %s\n", buf);
+ vty_out (vty, " Metric: %5lu\n", (u_long) OSPF6_ASBR_METRIC (external));
ospf6_prefix_options_printbuf (external->prefix.prefix_options,
buf, sizeof (buf));
- vty_out (vty, " Prefix Options: %s%s", buf,
- VTYNL);
+ vty_out (vty, " Prefix Options: %s\n", buf);
- vty_out (vty, " Referenced LSType: %d%s",
- ntohs (external->prefix.prefix_refer_lstype),
- VTYNL);
+ vty_out (vty, " Referenced LSType: %d\n",
+ ntohs (external->prefix.prefix_refer_lstype));
- vty_out (vty, " Prefix: %s%s",
- ospf6_as_external_lsa_get_prefix_str (lsa, buf, sizeof(buf), 0), VTYNL);
+ vty_out (vty, " Prefix: %s\n",
+ ospf6_as_external_lsa_get_prefix_str (lsa, buf, sizeof(buf), 0));
/* Forwarding-Address */
if (CHECK_FLAG (external->bits_metric, OSPF6_ASBR_BIT_F))
{
- vty_out (vty, " Forwarding-Address: %s%s",
- ospf6_as_external_lsa_get_prefix_str (lsa, buf, sizeof(buf), 1),
- VTYNL);
+ vty_out (vty, " Forwarding-Address: %s\n",
+ ospf6_as_external_lsa_get_prefix_str (lsa, buf, sizeof(buf), 1));
}
/* Tag */
snprintf (forwarding, sizeof (forwarding), ":: (ifindex %d)",
ospf6_route_get_first_nh_index (route));
- vty_out (vty, "%c %-32s %-15s type-%d %5lu %s%s",
+ vty_out (vty, "%c %-32s %-15s type-%d %5lu %s\n",
zebra_route_char(info->type),
prefix, id, route->path.metric_type,
(u_long) (route->path.metric_type == 2 ?
route->path.u.cost_e2 : route->path.cost),
- forwarding, VTYNL);
+ forwarding);
}
DEFUN (show_ipv6_ospf6_redistribute,
else
type = "UNKNOWN";
- vty_out (vty, "%s is %s, type %s%s",
- ifp->name, updown[if_is_operative (ifp)], type,
- VTYNL);
- vty_out (vty, " Interface ID: %d%s", ifp->ifindex, VTYNL);
+ vty_out (vty, "%s is %s, type %s\n",
+ ifp->name, updown[if_is_operative (ifp)], type);
+ vty_out (vty, " Interface ID: %d\n", ifp->ifindex);
if (ifp->info == NULL)
{
switch (p->family)
{
case AF_INET:
- vty_out (vty, " inet : %s%s", strbuf,
- VTYNL);
+ vty_out (vty, " inet : %s\n", strbuf);
break;
case AF_INET6:
- vty_out (vty, " inet6: %s%s", strbuf,
- VTYNL);
+ vty_out (vty, " inet6: %s\n", strbuf);
break;
default:
- vty_out (vty, " ??? : %s%s", strbuf,
- VTYNL);
+ vty_out (vty, " ??? : %s\n", strbuf);
break;
}
}
if (oi->area)
{
- vty_out (vty, " Instance ID %d, Interface MTU %d (autodetect: %d)%s",
- oi->instance_id, oi->ifmtu, ifp->mtu6, VTYNL);
- vty_out (vty, " MTU mismatch detection: %s%s", oi->mtu_ignore ?
- "disabled" : "enabled", VTYNL);
+ vty_out (vty, " Instance ID %d, Interface MTU %d (autodetect: %d)\n",
+ oi->instance_id, oi->ifmtu, ifp->mtu6);
+ vty_out (vty, " MTU mismatch detection: %s\n", oi->mtu_ignore ?
+ "disabled" : "enabled");
inet_ntop (AF_INET, &oi->area->area_id,
strbuf, sizeof (strbuf));
- vty_out (vty, " Area ID %s, Cost %u%s", strbuf, oi->cost,
- VTYNL);
+ vty_out (vty, " Area ID %s, Cost %u\n", strbuf, oi->cost);
}
else
vty_out (vty, " Not Attached to Area\n");
- vty_out (vty, " State %s, Transmit Delay %d sec, Priority %d%s",
+ vty_out (vty, " State %s, Transmit Delay %d sec, Priority %d\n",
ospf6_interface_state_str[oi->state],
- oi->transdelay, oi->priority,
- VTYNL);
+ oi->transdelay, oi->priority);
vty_out (vty, " Timer intervals configured:\n");
- vty_out (vty, " Hello %d, Dead %d, Retransmit %d%s",
- oi->hello_interval, oi->dead_interval, oi->rxmt_interval,
- VTYNL);
+ vty_out (vty, " Hello %d, Dead %d, Retransmit %d\n",
+ oi->hello_interval, oi->dead_interval, oi->rxmt_interval);
inet_ntop (AF_INET, &oi->drouter, drouter, sizeof (drouter));
inet_ntop (AF_INET, &oi->bdrouter, bdrouter, sizeof (bdrouter));
- vty_out (vty, " DR: %s BDR: %s%s", drouter, bdrouter, VTYNL);
+ vty_out (vty, " DR: %s BDR: %s\n", drouter, bdrouter);
- vty_out (vty, " Number of I/F scoped LSAs is %u%s",
- oi->lsdb->count, VTYNL);
+ vty_out (vty, " Number of I/F scoped LSAs is %u\n",
+ oi->lsdb->count);
monotime(&now);
if (oi->thread_send_lsupdate)
timersub (&oi->thread_send_lsupdate->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
oi->lsupdate_list->count, duration,
- (oi->thread_send_lsupdate ? "on" : "off"),
- VTYNL);
+ (oi->thread_send_lsupdate ? "on" : "off"));
for (lsa = ospf6_lsdb_head (oi->lsupdate_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (oi->thread_send_lsack)
timersub (&oi->thread_send_lsack->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSAck in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSAck in Time %s [thread %s]\n",
oi->lsack_list->count, duration,
- (oi->thread_send_lsack ? "on" : "off"),
- VTYNL);
+ (oi->thread_send_lsack ? "on" : "off"));
for (lsa = ospf6_lsdb_head (oi->lsack_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
ospf6_bfd_show_info(vty, oi->bfd_info, 1);
return 0;
}
ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT);
if (ifp == NULL)
{
- vty_out (vty, "No such Interface: %s%s", argv[idx_ifname]->arg,
- VTYNL);
+ vty_out (vty, "No such Interface: %s\n", argv[idx_ifname]->arg);
return CMD_WARNING;
}
ospf6_interface_show (vty, ifp);
ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT);
if (ifp == NULL)
{
- vty_out (vty, "No such Interface: %s%s", argv[idx_ifname]->arg, VTYNL);
+ vty_out (vty, "No such Interface: %s\n", argv[idx_ifname]->arg);
return CMD_WARNING;
}
oi = ifp->info;
if (oi == NULL)
{
- vty_out (vty, "OSPFv3 is not enabled on %s%s", argv[idx_ifname]->arg, VTYNL);
+ vty_out (vty, "OSPFv3 is not enabled on %s\n", argv[idx_ifname]->arg);
return CMD_WARNING;
}
if (ifp->mtu6 != 0 && ifp->mtu6 < ifmtu)
{
- vty_out (vty, "%s's ospf6 ifmtu cannot go beyond physical mtu (%d)%s",
- ifp->name, ifp->mtu6, VTYNL);
+ vty_out (vty, "%s's ospf6 ifmtu cannot go beyond physical mtu (%d)\n",
+ ifp->name, ifp->mtu6);
return CMD_WARNING;
}
iobuflen = ospf6_iobuf_size (ifmtu);
if (iobuflen < ifmtu)
{
- vty_out (vty, "%s's ifmtu is adjusted to I/O buffer size (%d).%s",
- ifp->name, iobuflen, VTYNL);
+ vty_out (vty, "%s's ifmtu is adjusted to I/O buffer size (%d).\n",
+ ifp->name, iobuflen);
oi->ifmtu = oi->c_ifmtu = iobuflen;
}
else
iobuflen = ospf6_iobuf_size (ifp->mtu);
if (iobuflen < ifp->mtu)
{
- vty_out (vty, "%s's ifmtu is adjusted to I/O buffer size (%d).%s",
- ifp->name, iobuflen, VTYNL);
+ vty_out (vty, "%s's ifmtu is adjusted to I/O buffer size (%d).\n",
+ ifp->name, iobuflen);
oi->ifmtu = iobuflen;
}
else
if (lcost > UINT32_MAX)
{
- vty_out (vty, "Cost %ld is out of range%s", lcost, VTYNL);
+ vty_out (vty, "Cost %ld is out of range\n", lcost);
return CMD_WARNING;
}
if (oi == NULL)
continue;
- vty_out (vty, "interface %s%s",
- oi->interface->name, VTYNL);
+ vty_out (vty, "interface %s\n",
+ oi->interface->name);
if (ifp->desc)
- vty_out (vty, " description %s%s", ifp->desc, VTYNL);
+ vty_out (vty, " description %s\n", ifp->desc);
if (oi->c_ifmtu)
- vty_out (vty, " ipv6 ospf6 ifmtu %d%s", oi->c_ifmtu, VTYNL);
+ vty_out (vty, " ipv6 ospf6 ifmtu %d\n", oi->c_ifmtu);
if (CHECK_FLAG (oi->flag, OSPF6_INTERFACE_NOAUTOCOST))
- vty_out (vty, " ipv6 ospf6 cost %d%s",
- oi->cost, VTYNL);
+ vty_out (vty, " ipv6 ospf6 cost %d\n",
+ oi->cost);
if (oi->hello_interval != OSPF6_INTERFACE_HELLO_INTERVAL)
- vty_out (vty, " ipv6 ospf6 hello-interval %d%s",
- oi->hello_interval, VTYNL);
+ vty_out (vty, " ipv6 ospf6 hello-interval %d\n",
+ oi->hello_interval);
if (oi->dead_interval != OSPF6_INTERFACE_DEAD_INTERVAL)
- vty_out (vty, " ipv6 ospf6 dead-interval %d%s",
- oi->dead_interval, VTYNL);
+ vty_out (vty, " ipv6 ospf6 dead-interval %d\n",
+ oi->dead_interval);
if (oi->rxmt_interval != OSPF6_INTERFACE_RXMT_INTERVAL)
- vty_out (vty, " ipv6 ospf6 retransmit-interval %d%s",
- oi->rxmt_interval, VTYNL);
+ vty_out (vty, " ipv6 ospf6 retransmit-interval %d\n",
+ oi->rxmt_interval);
if (oi->priority != OSPF6_INTERFACE_PRIORITY)
- vty_out (vty, " ipv6 ospf6 priority %d%s",
- oi->priority, VTYNL);
+ vty_out (vty, " ipv6 ospf6 priority %d\n",
+ oi->priority);
if (oi->transdelay != OSPF6_INTERFACE_TRANSDELAY)
- vty_out (vty, " ipv6 ospf6 transmit-delay %d%s",
- oi->transdelay, VTYNL);
+ vty_out (vty, " ipv6 ospf6 transmit-delay %d\n",
+ oi->transdelay);
if (oi->instance_id != OSPF6_INTERFACE_INSTANCE_ID)
- vty_out (vty, " ipv6 ospf6 instance-id %d%s",
- oi->instance_id, VTYNL);
+ vty_out (vty, " ipv6 ospf6 instance-id %d\n",
+ oi->instance_id);
if (oi->plist_name)
- vty_out (vty, " ipv6 ospf6 advertise prefix-list %s%s",
- oi->plist_name, VTYNL);
+ vty_out (vty, " ipv6 ospf6 advertise prefix-list %s\n",
+ oi->plist_name);
if (CHECK_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE))
vty_out (vty, " ipv6 ospf6 passive\n");
{
if ((ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT)) == NULL)
{
- vty_out (vty, "No such Interface: %s%s", argv[idx_ifname]->arg, VTYNL);
+ vty_out (vty, "No such Interface: %s\n", argv[idx_ifname]->arg);
return CMD_WARNING;
}
ospf6_interface_clear (vty, ifp);
ospf6_capability_printbuf (router_lsa->bits, bits, sizeof (bits));
ospf6_options_printbuf (router_lsa->options, options, sizeof (options));
- vty_out (vty, " Bits: %s Options: %s%s", bits, options, VTYNL);
+ vty_out (vty, " Bits: %s Options: %s\n", bits, options);
start = (char *) router_lsa + sizeof (struct ospf6_router_lsa);
end = (char *) lsa->header + ntohs (lsa->header->length);
else
snprintf (name, sizeof (name), "Unknown (%#x)", lsdesc->type);
- vty_out (vty, " Type: %s Metric: %d%s",
- name, ntohs (lsdesc->metric), VTYNL);
- vty_out (vty, " Interface ID: %s%s",
+ vty_out (vty, " Type: %s Metric: %d\n",
+ name, ntohs (lsdesc->metric));
+ vty_out (vty, " Interface ID: %s\n",
inet_ntop (AF_INET, &lsdesc->interface_id,
- buf, sizeof (buf)), VTYNL);
- vty_out (vty, " Neighbor Interface ID: %s%s",
+ buf, sizeof (buf)));
+ vty_out (vty, " Neighbor Interface ID: %s\n",
inet_ntop (AF_INET, &lsdesc->neighbor_interface_id,
- buf, sizeof (buf)), VTYNL);
- vty_out (vty, " Neighbor Router ID: %s%s",
+ buf, sizeof (buf)));
+ vty_out (vty, " Neighbor Router ID: %s\n",
inet_ntop (AF_INET, &lsdesc->neighbor_router_id,
- buf, sizeof (buf)), VTYNL);
+ buf, sizeof (buf)));
}
return 0;
}
((caddr_t) lsa->header + sizeof (struct ospf6_lsa_header));
ospf6_options_printbuf (network_lsa->options, options, sizeof (options));
- vty_out (vty, " Options: %s%s", options, VTYNL);
+ vty_out (vty, " Options: %s\n", options);
start = (char *) network_lsa + sizeof (struct ospf6_network_lsa);
end = (char *) lsa->header + ntohs (lsa->header->length);
{
lsdesc = (struct ospf6_network_lsdesc *) current;
inet_ntop (AF_INET, &lsdesc->router_id, buf, sizeof (buf));
- vty_out (vty, " Attached Router: %s%s", buf, VTYNL);
+ vty_out (vty, " Attached Router: %s\n", buf);
}
return 0;
}
inet_ntop (AF_INET6, &link_lsa->linklocal_addr, buf, sizeof (buf));
prefixnum = ntohl (link_lsa->prefix_num);
- vty_out (vty, " Priority: %d Options: %s%s",
- link_lsa->priority, options, VTYNL);
- vty_out (vty, " LinkLocal Address: %s%s", buf, VTYNL);
- vty_out (vty, " Number of Prefix: %d%s", prefixnum, VTYNL);
+ vty_out (vty, " Priority: %d Options: %s\n",
+ link_lsa->priority, options);
+ vty_out (vty, " LinkLocal Address: %s\n", buf);
+ vty_out (vty, " Number of Prefix: %d\n", prefixnum);
start = (char *) link_lsa + sizeof (struct ospf6_link_lsa);
end = (char *) lsa->header + ntohs (lsa->header->length);
"LA" : "--");
nu = (CHECK_FLAG (prefix->prefix_options, OSPF6_PREFIX_OPTION_NU) ?
"NU" : "--");
- vty_out (vty, " Prefix Options: %s|%s|%s|%s%s",
- p, mc, la, nu, VTYNL);
+ vty_out (vty, " Prefix Options: %s|%s|%s|%s\n",
+ p, mc, la, nu);
memset (&in6, 0, sizeof (in6));
memcpy (&in6, OSPF6_PREFIX_BODY (prefix),
OSPF6_PREFIX_SPACE (prefix->prefix_length));
inet_ntop (AF_INET6, &in6, buf, sizeof (buf));
- vty_out (vty, " Prefix: %s/%d%s",
- buf, prefix->prefix_length, VTYNL);
+ vty_out (vty, " Prefix: %s/%d\n",
+ buf, prefix->prefix_length);
}
return 0;
prefixnum = ntohs (intra_prefix_lsa->prefix_num);
- vty_out (vty, " Number of Prefix: %d%s", prefixnum, VTYNL);
+ vty_out (vty, " Number of Prefix: %d\n", prefixnum);
inet_ntop (AF_INET, &intra_prefix_lsa->ref_id, id, sizeof (id));
inet_ntop (AF_INET, &intra_prefix_lsa->ref_adv_router,
adv_router, sizeof (adv_router));
- vty_out (vty, " Reference: %s Id: %s Adv: %s%s",
- ospf6_lstype_name (intra_prefix_lsa->ref_type), id, adv_router,
- VTYNL);
+ vty_out (vty, " Reference: %s Id: %s Adv: %s\n",
+ ospf6_lstype_name (intra_prefix_lsa->ref_type), id, adv_router);
start = (char *) intra_prefix_lsa + sizeof (struct ospf6_intra_prefix_lsa);
end = (char *) lsa->header + ntohs (lsa->header->length);
"LA" : "--");
nu = (CHECK_FLAG (prefix->prefix_options, OSPF6_PREFIX_OPTION_NU) ?
"NU" : "--");
- vty_out (vty, " Prefix Options: %s|%s|%s|%s%s",
- p, mc, la, nu, VTYNL);
+ vty_out (vty, " Prefix Options: %s|%s|%s|%s\n",
+ p, mc, la, nu);
memset (&in6, 0, sizeof (in6));
memcpy (&in6, OSPF6_PREFIX_BODY (prefix),
OSPF6_PREFIX_SPACE (prefix->prefix_length));
inet_ntop (AF_INET6, &in6, buf, sizeof (buf));
- vty_out (vty, " Prefix: %s/%d%s",
- buf, prefix->prefix_length, VTYNL);
+ vty_out (vty, " Prefix: %s/%d\n",
+ buf, prefix->prefix_length);
}
return 0;
{
inet_ntop (AF_INET, &conf_debug_ospf6_brouter_specific_router_id,
buf, sizeof (buf));
- vty_out (vty, "debug ospf6 border-routers router-id %s%s", buf, VTYNL);
+ vty_out (vty, "debug ospf6 border-routers router-id %s\n", buf);
}
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA)
{
inet_ntop (AF_INET, &conf_debug_ospf6_brouter_specific_area_id,
buf, sizeof (buf));
- vty_out (vty, "debug ospf6 border-routers area-id %s%s", buf, VTYNL);
+ vty_out (vty, "debug ospf6 border-routers area-id %s\n", buf);
}
return 0;
}
void
ospf6_lsa_show_summary_header (struct vty *vty)
{
- vty_out (vty, "%-4s %-15s%-15s%4s %8s %30s%s",
+ vty_out (vty, "%-4s %-15s%-15s%4s %8s %30s\n",
"Type", "LSId", "AdvRouter", "Age", "SeqNum",
- "Payload", VTYNL);
+ "Payload");
}
void
(type == OSPF6_LSTYPE_INTER_ROUTER) ||
(type == OSPF6_LSTYPE_AS_EXTERNAL))
{
- vty_out (vty, "%-4s %-15s%-15s%4hu %8lx %30s%s",
+ vty_out (vty, "%-4s %-15s%-15s%4hu %8lx %30s\n",
ospf6_lstype_short_name (lsa->header->type),
id, adv_router, ospf6_lsa_age_current (lsa),
(u_long) ntohl (lsa->header->seqnum),
- handler->get_prefix_str(lsa, buf, sizeof(buf), 0), VTYNL);
+ handler->get_prefix_str(lsa, buf, sizeof(buf), 0));
}
else if (type != OSPF6_LSTYPE_UNKNOWN)
{
while (handler->get_prefix_str(lsa, buf, sizeof(buf), cnt) != NULL)
{
- vty_out (vty, "%s %30s%s", tmpbuf, buf, VTYNL);
+ vty_out (vty, "%s %30s\n", tmpbuf, buf);
cnt++;
}
}
else
{
- vty_out (vty, "%-4s %-15s%-15s%4hu %8lx%s",
+ vty_out (vty, "%-4s %-15s%-15s%4hu %8lx\n",
ospf6_lstype_short_name (lsa->header->type),
id, adv_router, ospf6_lsa_age_current (lsa),
- (u_long) ntohl (lsa->header->seqnum), VTYNL);
+ (u_long) ntohl (lsa->header->seqnum));
}
}
end = (u_char *) lsa->header + ntohs (lsa->header->length);
vty_out (vty, "\n");
- vty_out (vty, "%s:%s", lsa->name, VTYNL);
+ vty_out (vty, "%s:\n", lsa->name);
for (current = start; current < end; current ++)
{
adv_router, sizeof (adv_router));
vty_out (vty, "\n");
- vty_out (vty, "Age: %4hu Type: %s%s", ospf6_lsa_age_current (lsa),
- ospf6_lstype_name (lsa->header->type), VTYNL);
- vty_out (vty, "Link State ID: %s%s", id, VTYNL);
- vty_out (vty, "Advertising Router: %s%s", adv_router, VTYNL);
- vty_out (vty, "LS Sequence Number: %#010lx%s",
- (u_long) ntohl (lsa->header->seqnum), VTYNL);
- vty_out (vty, "CheckSum: %#06hx Length: %hu%s",
+ vty_out (vty, "Age: %4hu Type: %s\n", ospf6_lsa_age_current (lsa),
+ ospf6_lstype_name (lsa->header->type));
+ vty_out (vty, "Link State ID: %s\n", id);
+ vty_out (vty, "Advertising Router: %s\n", adv_router);
+ vty_out (vty, "LS Sequence Number: %#010lx\n",
+ (u_long) ntohl (lsa->header->seqnum));
+ vty_out (vty, "CheckSum: %#06hx Length: %hu\n",
ntohs (lsa->header->checksum),
- ntohs (lsa->header->length), VTYNL);
- vty_out (vty, "Flag: %x %s", lsa->flag, VTYNL);
- vty_out (vty, "Lock: %d %s", lsa->lock, VTYNL);
- vty_out (vty, "ReTx Count: %d%s", lsa->retrans_count, VTYNL);
- vty_out (vty, "Threads: Expire: 0x%p, Refresh: 0x%p %s",
- (void *)lsa->expire, (void *)lsa->refresh, VTYNL);
+ ntohs (lsa->header->length));
+ vty_out (vty, "Flag: %x \n", lsa->flag);
+ vty_out (vty, "Lock: %d \n", lsa->lock);
+ vty_out (vty, "ReTx Count: %d\n", lsa->retrans_count);
+ vty_out (vty, "Threads: Expire: 0x%p, Refresh: 0x%p \n",
+ (void *)lsa->expire, (void *)lsa->refresh);
vty_out (vty, "\n");
return;
}
timersub (&now, &lsa->installed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, "Age: %4hu Type: %s%s", ospf6_lsa_age_current (lsa),
- ospf6_lstype_name (lsa->header->type), VTYNL);
- vty_out (vty, "Link State ID: %s%s", id, VTYNL);
- vty_out (vty, "Advertising Router: %s%s", adv_router, VTYNL);
- vty_out (vty, "LS Sequence Number: %#010lx%s",
- (u_long) ntohl (lsa->header->seqnum), VTYNL);
- vty_out (vty, "CheckSum: %#06hx Length: %hu%s",
+ vty_out (vty, "Age: %4hu Type: %s\n", ospf6_lsa_age_current (lsa),
+ ospf6_lstype_name (lsa->header->type));
+ vty_out (vty, "Link State ID: %s\n", id);
+ vty_out (vty, "Advertising Router: %s\n", adv_router);
+ vty_out (vty, "LS Sequence Number: %#010lx\n",
+ (u_long) ntohl (lsa->header->seqnum));
+ vty_out (vty, "CheckSum: %#06hx Length: %hu\n",
ntohs (lsa->header->checksum),
- ntohs (lsa->header->length), VTYNL);
- vty_out (vty, "Duration: %s%s", duration, VTYNL);
+ ntohs (lsa->header->length));
+ vty_out (vty, "Duration: %s\n", duration);
handler = ospf6_get_lsa_handler (lsa->header->type);
if (handler->show == NULL)
if (handler == NULL)
continue;
if (CHECK_FLAG (handler->debug, OSPF6_LSA_DEBUG))
- vty_out (vty, "debug ospf6 lsa %s%s",
- ospf6_lsa_handler_name (handler), VTYNL);
+ vty_out (vty, "debug ospf6 lsa %s\n",
+ ospf6_lsa_handler_name (handler));
if (CHECK_FLAG (handler->debug, OSPF6_LSA_DEBUG_ORIGINATE))
- vty_out (vty, "debug ospf6 lsa %s originate%s",
- ospf6_lsa_handler_name (handler), VTYNL);
+ vty_out (vty, "debug ospf6 lsa %s originate\n",
+ ospf6_lsa_handler_name (handler));
if (CHECK_FLAG (handler->debug, OSPF6_LSA_DEBUG_EXAMIN))
- vty_out (vty, "debug ospf6 lsa %s examine%s",
- ospf6_lsa_handler_name (handler), VTYNL);
+ vty_out (vty, "debug ospf6 lsa %s examine\n",
+ ospf6_lsa_handler_name (handler));
if (CHECK_FLAG (handler->debug, OSPF6_LSA_DEBUG_FLOOD))
- vty_out (vty, "debug ospf6 lsa %s flooding%s",
- ospf6_lsa_handler_name (handler), VTYNL);
+ vty_out (vty, "debug ospf6 lsa %s flooding\n",
+ ospf6_lsa_handler_name (handler));
}
return 0;
{
if (IS_OSPF6_DEBUG_MESSAGE (i, SEND) &&
IS_OSPF6_DEBUG_MESSAGE (i, RECV))
- vty_out (vty, "debug ospf6 message %s%s", type_str[i], VTYNL);
+ vty_out (vty, "debug ospf6 message %s\n", type_str[i]);
else if (IS_OSPF6_DEBUG_MESSAGE (i, SEND))
- vty_out (vty, "debug ospf6 message %s send%s", type_str[i],
- VTYNL);
+ vty_out (vty, "debug ospf6 message %s send\n", type_str[i]);
else if (IS_OSPF6_DEBUG_MESSAGE (i, RECV))
- vty_out (vty, "debug ospf6 message %s recv%s", type_str[i],
- VTYNL);
+ vty_out (vty, "debug ospf6 message %s recv\n", type_str[i]);
}
return 0;
timerstring (&res, duration, sizeof (duration));
/*
- vty_out (vty, "%-15s %3d %11s %6s/%-12s %11s %s[%s]%s",
+ vty_out (vty, "%-15s %3d %11s %6s/%-12s %11s %s[%s]\n",
"Neighbor ID", "Pri", "DeadTime", "State", "", "Duration",
- "I/F", "State", VTYNL);
+ "I/F", "State");
*/
- vty_out (vty, "%-15s %3d %11s %8s/%-12s %11s %s[%s]%s",
+ vty_out (vty, "%-15s %3d %11s %8s/%-12s %11s %s[%s]\n",
router_id, on->priority, deadtime,
ospf6_neighbor_state_str[on->state], nstate, duration,
on->ospf6_if->interface->name,
- ospf6_interface_state_str[on->ospf6_if->state], VTYNL);
+ ospf6_interface_state_str[on->ospf6_if->state]);
}
static void
struct timeval now, res;
/*
- vty_out (vty, "%-15s %6s/%-11s %-15s %-15s %s[%s]%s",
+ vty_out (vty, "%-15s %6s/%-11s %-15s %-15s %s[%s]\n",
"RouterID", "State", "Duration", "DR", "BDR", "I/F",
- "State", VTYNL);
+ "State");
*/
inet_ntop (AF_INET, &on->router_id, router_id, sizeof (router_id));
timersub (&now, &on->last_changed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]%s",
+ vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]\n",
router_id, ospf6_neighbor_state_str[on->state],
duration, drouter, bdrouter, on->ospf6_if->interface->name,
- ospf6_interface_state_str[on->ospf6_if->state],
- VTYNL);
+ ospf6_interface_state_str[on->ospf6_if->state]);
}
static void
timersub (&now, &on->last_changed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " Neighbor %s%s", on->name,
- VTYNL);
- vty_out (vty, " Area %s via interface %s (ifindex %d)%s",
+ vty_out (vty, " Neighbor %s\n", on->name);
+ vty_out (vty, " Area %s via interface %s (ifindex %d)\n",
on->ospf6_if->area->name,
on->ospf6_if->interface->name,
- on->ospf6_if->interface->ifindex,
- VTYNL);
- vty_out (vty, " His IfIndex: %d Link-local address: %s%s",
- on->ifindex, linklocal_addr,
- VTYNL);
- vty_out (vty, " State %s for a duration of %s%s",
- ospf6_neighbor_state_str[on->state], duration,
- VTYNL);
- vty_out (vty, " His choice of DR/BDR %s/%s, Priority %d%s",
- drouter, bdrouter, on->priority,
- VTYNL);
- vty_out (vty, " DbDesc status: %s%s%s SeqNum: %#lx%s",
+ on->ospf6_if->interface->ifindex);
+ vty_out (vty, " His IfIndex: %d Link-local address: %s\n",
+ on->ifindex, linklocal_addr);
+ vty_out (vty, " State %s for a duration of %s\n",
+ ospf6_neighbor_state_str[on->state], duration);
+ vty_out (vty, " His choice of DR/BDR %s/%s, Priority %d\n",
+ drouter, bdrouter, on->priority);
+ vty_out (vty, " DbDesc status: %s%s%s SeqNum: %#lx\n",
(CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_IBIT) ? "Initial " : ""),
(CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MBIT) ? "More " : ""),
(CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MSBIT) ?
- "Master" : "Slave"), (u_long) ntohl (on->dbdesc_seqnum),
- VTYNL);
+ "Master" : "Slave"), (u_long) ntohl (on->dbdesc_seqnum));
- vty_out (vty, " Summary-List: %d LSAs%s", on->summary_list->count,
- VTYNL);
+ vty_out (vty, " Summary-List: %d LSAs\n", on->summary_list->count);
for (lsa = ospf6_lsdb_head (on->summary_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
- vty_out (vty, " Request-List: %d LSAs%s", on->request_list->count,
- VTYNL);
+ vty_out (vty, " Request-List: %d LSAs\n", on->request_list->count);
for (lsa = ospf6_lsdb_head (on->request_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
- vty_out (vty, " Retrans-List: %d LSAs%s", on->retrans_list->count,
- VTYNL);
+ vty_out (vty, " Retrans-List: %d LSAs\n", on->retrans_list->count);
for (lsa = ospf6_lsdb_head (on->retrans_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_dbdesc)
timersub (&on->thread_send_dbdesc->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for DbDesc in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for DbDesc in Time %s [thread %s]\n",
on->dbdesc_list->count, duration,
- (on->thread_send_dbdesc ? "on" : "off"),
- VTYNL);
+ (on->thread_send_dbdesc ? "on" : "off"));
for (lsa = ospf6_lsdb_head (on->dbdesc_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_lsreq)
timersub (&on->thread_send_lsreq->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSReq in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSReq in Time %s [thread %s]\n",
on->request_list->count, duration,
- (on->thread_send_lsreq ? "on" : "off"),
- VTYNL);
+ (on->thread_send_lsreq ? "on" : "off"));
for (lsa = ospf6_lsdb_head (on->request_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_lsupdate)
timersub (&on->thread_send_lsupdate->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
on->lsupdate_list->count, duration,
- (on->thread_send_lsupdate ? "on" : "off"),
- VTYNL);
+ (on->thread_send_lsupdate ? "on" : "off"));
for (lsa = ospf6_lsdb_head (on->lsupdate_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_lsack)
timersub (&on->thread_send_lsack->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSAck in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSAck in Time %s [thread %s]\n",
on->lsack_list->count, duration,
- (on->thread_send_lsack ? "on" : "off"),
- VTYNL);
+ (on->thread_send_lsack ? "on" : "off"));
for (lsa = ospf6_lsdb_head (on->lsack_list); lsa;
lsa = ospf6_lsdb_next (lsa))
- vty_out (vty, " %s%s", lsa->name, VTYNL);
+ vty_out (vty, " %s\n", lsa->name);
ospf6_bfd_show_info(vty, on->bfd_info, 0);
}
}
if (showfunc == ospf6_neighbor_show)
- vty_out (vty, "%-15s %3s %11s %8s/%-12s %11s %s[%s]%s",
+ vty_out (vty, "%-15s %3s %11s %8s/%-12s %11s %s[%s]\n",
"Neighbor ID", "Pri", "DeadTime", "State", "IfState", "Duration",
- "I/F", "State", VTYNL);
+ "I/F", "State");
else if (showfunc == ospf6_neighbor_show_drchoice)
- vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]%s",
+ vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]\n",
"RouterID", "State", "Duration", "DR", "BDR", "I/F",
- "State", VTYNL);
+ "State");
for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, i, oa))
for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
if ((inet_pton (AF_INET, argv[idx_ipv4]->arg, &router_id)) != 1)
{
- vty_out (vty, "Router-ID is not parsable: %s%s", argv[idx_ipv4]->arg,
- VTYNL);
+ vty_out (vty, "Router-ID is not parsable: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
if (!i)
{
- vty_out (vty, "%c%1s %2s %-30s %-25s %6.*s %s%s",
+ vty_out (vty, "%c%1s %2s %-30s %-25s %6.*s %s\n",
(ospf6_route_is_best (route) ? '*' : ' '),
OSPF6_DEST_TYPE_SUBSTR (route->type),
OSPF6_PATH_TYPE_SUBSTR (route->path.type),
- destination, nexthop, IFNAMSIZ, ifname, duration, VTYNL);
+ destination, nexthop, IFNAMSIZ, ifname, duration);
i++;
}
else
- vty_out (vty, "%c%1s %2s %-30s %-25s %6.*s %s%s",
- ' ', "", "", "", nexthop, IFNAMSIZ, ifname, "", VTYNL);
+ vty_out (vty, "%c%1s %2s %-30s %-25s %6.*s %s\n",
+ ' ', "", "", "", nexthop, IFNAMSIZ, ifname, "");
}
}
destination, sizeof (destination));
else
prefix2str (&route->prefix, destination, sizeof (destination));
- vty_out (vty, "Destination: %s%s", destination, VTYNL);
+ vty_out (vty, "Destination: %s\n", destination);
/* destination type */
- vty_out (vty, "Destination type: %s%s",
- OSPF6_DEST_TYPE_NAME (route->type),
- VTYNL);
+ vty_out (vty, "Destination type: %s\n",
+ OSPF6_DEST_TYPE_NAME (route->type));
/* Time */
timersub (&now, &route->installed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, "Installed Time: %s ago%s", duration, VTYNL);
+ vty_out (vty, "Installed Time: %s ago\n", duration);
timersub (&now, &route->changed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " Changed Time: %s ago%s", duration, VTYNL);
+ vty_out (vty, " Changed Time: %s ago\n", duration);
/* Debugging info */
- vty_out (vty, "Lock: %d Flags: %s%s%s%s%s", route->lock,
+ vty_out (vty, "Lock: %d Flags: %s%s%s%s\n", route->lock,
(CHECK_FLAG (route->flag, OSPF6_ROUTE_BEST) ? "B" : "-"),
(CHECK_FLAG (route->flag, OSPF6_ROUTE_ADD) ? "A" : "-"),
(CHECK_FLAG (route->flag, OSPF6_ROUTE_REMOVE) ? "R" : "-"),
- (CHECK_FLAG (route->flag, OSPF6_ROUTE_CHANGE) ? "C" : "-"),
- VTYNL);
- vty_out (vty, "Memory: prev: %p this: %p next: %p%s",
- (void *)route->prev, (void *)route, (void *)route->next, VTYNL);
+ (CHECK_FLAG (route->flag, OSPF6_ROUTE_CHANGE) ? "C" : "-"));
+ vty_out (vty, "Memory: prev: %p this: %p next: %p\n",
+ (void *)route->prev, (void *)route, (void *)route->next);
/* Path section */
/* Area-ID */
inet_ntop (AF_INET, &route->path.area_id, area_id, sizeof (area_id));
- vty_out (vty, "Associated Area: %s%s", area_id, VTYNL);
+ vty_out (vty, "Associated Area: %s\n", area_id);
/* Path type */
- vty_out (vty, "Path Type: %s%s",
- OSPF6_PATH_TYPE_NAME (route->path.type), VTYNL);
+ vty_out (vty, "Path Type: %s\n",
+ OSPF6_PATH_TYPE_NAME (route->path.type));
/* LS Origin */
inet_ntop (AF_INET, &route->path.origin.id, id, sizeof (id));
inet_ntop (AF_INET, &route->path.origin.adv_router, adv_router,
sizeof (adv_router));
- vty_out (vty, "LS Origin: %s Id: %s Adv: %s%s",
+ vty_out (vty, "LS Origin: %s Id: %s Adv: %s\n",
ospf6_lstype_name (route->path.origin.type),
- id, adv_router, VTYNL);
+ id, adv_router);
/* Options */
ospf6_options_printbuf (route->path.options, options, sizeof (options));
- vty_out (vty, "Options: %s%s", options, VTYNL);
+ vty_out (vty, "Options: %s\n", options);
/* Router Bits */
ospf6_capability_printbuf (route->path.router_bits, capa, sizeof (capa));
- vty_out (vty, "Router Bits: %s%s", capa, VTYNL);
+ vty_out (vty, "Router Bits: %s\n", capa);
/* Prefix Options */
vty_out (vty, "Prefix Options: xxx\n");
/* Metrics */
- vty_out (vty, "Metric Type: %d%s", route->path.metric_type,
- VTYNL);
- vty_out (vty, "Metric: %d (%d)%s",
- route->path.cost, route->path.u.cost_e2, VTYNL);
+ vty_out (vty, "Metric Type: %d\n", route->path.metric_type);
+ vty_out (vty, "Metric: %d (%d)\n",
+ route->path.cost, route->path.u.cost_e2);
/* Nexthops */
vty_out (vty, "Nexthop:\n");
/* nexthop */
inet_ntop (AF_INET6, &nh->address, nexthop, sizeof (nexthop));
ifname = ifindex2ifname (nh->ifindex, VRF_DEFAULT);
- vty_out (vty, " %s %.*s%s", nexthop, IFNAMSIZ, ifname, VTYNL);
+ vty_out (vty, " %s %.*s\n", nexthop, IFNAMSIZ, ifname);
}
vty_out (vty, "\n");
}
assert (number == table->count);
- vty_out (vty, "Number of OSPFv3 routes: %d%s", number, VTYNL);
- vty_out (vty, "Number of Destination: %d%s", destination, VTYNL);
- vty_out (vty, "Number of Alternative routes: %d%s", alternative, VTYNL);
- vty_out (vty, "Number of Equal Cost Multi Path: %d%s", ecmp, VTYNL);
+ vty_out (vty, "Number of OSPFv3 routes: %d\n", number);
+ vty_out (vty, "Number of Destination: %d\n", destination);
+ vty_out (vty, "Number of Alternative routes: %d\n", alternative);
+ vty_out (vty, "Number of Equal Cost Multi Path: %d\n", ecmp);
for (i = OSPF6_PATH_TYPE_INTRA; i <= OSPF6_PATH_TYPE_EXTERNAL2; i++)
{
- vty_out (vty, "Number of %s routes: %d%s",
- OSPF6_PATH_TYPE_NAME (i), pathtype[i], VTYNL);
+ vty_out (vty, "Number of %s routes: %d\n",
+ OSPF6_PATH_TYPE_NAME (i), pathtype[i]);
}
}
continue;
}
- vty_out (vty, "Malformed argument: %s%s", argv[i]->arg, VTYNL);
+ vty_out (vty, "Malformed argument: %s\n", argv[i]->arg);
return CMD_SUCCESS;
}
static void
ospf6_linkstate_show_header (struct vty *vty)
{
- vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %s%s",
- "Type", "Router-ID", "Net-ID", "Rtr-Bits", "Options", "Cost", VTYNL);
+ vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %s\n",
+ "Type", "Router-ID", "Net-ID", "Rtr-Bits", "Options", "Cost");
}
static void
ospf6_options_printbuf (route->path.options, options, sizeof (options));
if (ntohl (id))
- vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %lu%s",
+ vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %lu\n",
"Network", routername, idname, rbits, options,
- (unsigned long) route->path.cost, VTYNL);
+ (unsigned long) route->path.cost);
else
- vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %lu%s",
+ vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %lu\n",
"Router", routername, idname, rbits, options,
- (unsigned long) route->path.cost, VTYNL);
+ (unsigned long) route->path.cost);
}
is_router++;
continue;
}
- vty_out (vty, "Malformed argument: %s%s", argv[i]->arg, VTYNL);
+ vty_out (vty, "Malformed argument: %s\n", argv[i]->arg);
return CMD_SUCCESS;
}
is_id++;
continue;
}
- vty_out (vty, "Malformed argument: %s%s", argv[i]->arg, VTYNL);
+ vty_out (vty, "Malformed argument: %s\n", argv[i]->arg);
return CMD_SUCCESS;
}
- vty_out (vty, "Malformed argument: %s%s", argv[i]->arg, VTYNL);
+ vty_out (vty, "Malformed argument: %s\n", argv[i]->arg);
return CMD_SUCCESS;
}
void
ospf6_brouter_show_header (struct vty *vty)
{
- vty_out (vty, "%-15s %-8s %-14s %-10s %-15s%s",
- "Router-ID", "Rtr-Bits", "Options", "Path-Type", "Area", VTYNL);
+ vty_out (vty, "%-15s %-8s %-14s %-10s %-15s\n",
+ "Router-ID", "Rtr-Bits", "Options", "Path-Type", "Area");
}
void
ospf6_options_printbuf (route->path.options, options, sizeof (options));
inet_ntop (AF_INET, &route->path.area_id, area, sizeof (area));
- /* vty_out (vty, "%-15s %-8s %-14s %-10s %-15s%s",
- "Router-ID", "Rtr-Bits", "Options", "Path-Type", "Area", VTYNL); */
- vty_out (vty, "%-15s %-8s %-14s %-10s %-15s%s",
+ /* vty_out (vty, "%-15s %-8s %-14s %-10s %-15s\n",
+ "Router-ID", "Rtr-Bits", "Options", "Path-Type", "Area"); */
+ vty_out (vty, "%-15s %-8s %-14s %-10s %-15s\n",
adv, rbits, options, OSPF6_PATH_TYPE_NAME (route->path.type),
- area, VTYNL);
+ area);
}
DEFUN (debug_ospf6_route,
int restnum;
/* "prefix" is the space prefix of the display line */
- vty_out (vty, "%s+-%s [%d]%s", prefix, v->name, v->cost, VTYNL);
+ vty_out (vty, "%s+-%s [%d]\n", prefix, v->name, v->cost);
len = strlen (prefix) + 4;
next_prefix = (char *) malloc (len);
ret = inet_pton (AF_INET, argv[idx_ipv4]->arg, &router_id);
if (ret == 0)
{
- vty_out (vty, "malformed OSPF Router-ID: %s%s", argv[idx_ipv4]->arg, VTYNL);
+ vty_out (vty, "malformed OSPF Router-ID: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
oi = ospf6_interface_create (ifp);
if (oi->area)
{
- vty_out (vty, "%s already attached to Area %s%s",
- oi->interface->name, oi->area->name, VTYNL);
+ vty_out (vty, "%s already attached to Area %s\n",
+ oi->interface->name, oi->area->name);
return CMD_SUCCESS;
}
/* parse Area-ID */
if (inet_pton (AF_INET, argv[idx_ipv4]->arg, &area_id) != 1)
{
- vty_out (vty, "Invalid Area-ID: %s%s", argv[idx_ipv4]->arg, VTYNL);
+ vty_out (vty, "Invalid Area-ID: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT);
if (ifp == NULL)
{
- vty_out (vty, "No such interface %s%s", argv[idx_ifname]->arg, VTYNL);
+ vty_out (vty, "No such interface %s\n", argv[idx_ifname]->arg);
return CMD_SUCCESS;
}
oi = (struct ospf6_interface *) ifp->info;
if (oi == NULL)
{
- vty_out (vty, "Interface %s not enabled%s", ifp->name, VTYNL);
+ vty_out (vty, "Interface %s not enabled\n", ifp->name);
return CMD_SUCCESS;
}
/* parse Area-ID */
if (inet_pton (AF_INET, argv[idx_ipv4]->arg, &area_id) != 1)
{
- vty_out (vty, "Invalid Area-ID: %s%s", argv[idx_ipv4]->arg, VTYNL);
+ vty_out (vty, "Invalid Area-ID: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
/* Verify Area */
if (oi->area == NULL)
{
- vty_out (vty, "No such Area-ID: %s%s", argv[idx_ipv4]->arg, VTYNL);
+ vty_out (vty, "No such Area-ID: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
if (oi->area->area_id != area_id)
{
- vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s",
- oi->interface->name, oi->area->name, VTYNL);
+ vty_out (vty, "Wrong Area-ID: %s is attached to area %s\n",
+ oi->interface->name, oi->area->name);
return CMD_SUCCESS;
}
/* process id, router id */
inet_ntop (AF_INET, &o->router_id, router_id, sizeof (router_id));
- vty_out (vty, " OSPFv3 Routing Process (0) with Router-ID %s%s",
- router_id, VTYNL);
+ vty_out (vty, " OSPFv3 Routing Process (0) with Router-ID %s\n",
+ router_id);
/* running time */
monotime(&now);
timersub (&now, &o->starttime, &running);
timerstring (&running, duration, sizeof (duration));
- vty_out (vty, " Running %s%s", duration, VTYNL);
+ vty_out (vty, " Running %s\n", duration);
/* Redistribute configuration */
/* XXX */
timersub(&now, &o->ts_spf, &result);
timerstring(&result, buf, sizeof(buf));
ospf6_spf_reason_string(o->last_spf_reason, rbuf, sizeof(rbuf));
- vty_out(vty, "last executed %s ago, reason %s%s", buf, rbuf, VTYNL);
- vty_out (vty, " Last SPF duration %lld sec %lld usec%s",
+ vty_out(vty, "last executed %s ago, reason %s\n", buf, rbuf);
+ vty_out (vty, " Last SPF duration %lld sec %lld usec\n",
(long long)o->ts_spf_duration.tv_sec,
- (long long)o->ts_spf_duration.tv_usec, VTYNL);
+ (long long)o->ts_spf_duration.tv_usec);
}
else
vty_out(vty, "has not been run$\n");
threadtimer_string(now, o->t_spf_calc, buf, sizeof(buf));
- vty_out (vty, " SPF timer %s%s%s",
- (o->t_spf_calc ? "due in " : "is "), buf, VTYNL);
+ vty_out (vty, " SPF timer %s%s\n",
+ (o->t_spf_calc ? "due in " : "is "), buf);
if (CHECK_FLAG (o->flag, OSPF6_STUB_ROUTER))
vty_out (vty, " Router Is Stub Router\n");
/* LSAs */
- vty_out (vty, " Number of AS scoped LSAs is %u%s",
- o->lsdb->count, VTYNL);
+ vty_out (vty, " Number of AS scoped LSAs is %u\n",
+ o->lsdb->count);
/* Areas */
- vty_out (vty, " Number of areas in this router is %u%s",
- listcount (o->area_list), VTYNL);
+ vty_out (vty, " Number of areas in this router is %u\n",
+ listcount (o->area_list));
if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES))
{
inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id));
vty_out (vty, "router ospf6\n");
if (ospf6->router_id_static != 0)
- vty_out (vty, " router-id %s%s", router_id, VTYNL);
+ vty_out (vty, " router-id %s\n", router_id);
/* log-adjacency-changes flag print. */
if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES))
}
if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH)
- vty_out (vty, " auto-cost reference-bandwidth %d%s", ospf6->ref_bandwidth,
- VTYNL);
+ vty_out (vty, " auto-cost reference-bandwidth %d\n", ospf6->ref_bandwidth);
/* LSA timers print. */
if (ospf6->lsa_minarrival != OSPF_MIN_LS_ARRIVAL)
for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, j, oa))
{
for (ALL_LIST_ELEMENTS_RO (oa->if_list, k, oi))
- vty_out (vty, " interface %s area %s%s",
- oi->interface->name, oa->name, VTYNL);
+ vty_out (vty, " interface %s area %s\n",
+ oi->interface->name, oa->name);
}
vty_out (vty, "!\n");
return 0;
}
vty_out (vty, "Zebra Infomation\n");
- vty_out (vty, " enable: %d fail: %d%s",
- zclient->enable, zclient->fail, VTYNL);
- vty_out (vty, " redistribute default: %d%s",
- vrf_bitmap_check (zclient->default_information, VRF_DEFAULT),
- VTYNL);
+ vty_out (vty, " enable: %d fail: %d\n",
+ zclient->enable, zclient->fail);
+ vty_out (vty, " redistribute default: %d\n",
+ vrf_bitmap_check (zclient->default_information, VRF_DEFAULT));
vty_out (vty, " redistribute:");
for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
{
"Display ospf6d version\n"
)
{
- vty_out (vty, "Zebra OSPF6d Version: %s%s",
- ospf6_daemon_version, VTYNL);
+ vty_out (vty, "Zebra OSPF6d Version: %s\n",
+ ospf6_daemon_version);
return CMD_SUCCESS;
}
ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
if (!ro)
{
- vty_out (vty, "No Route found for Router ID: %s%s", argv[4]->arg, VTYNL);
+ vty_out (vty, "No Route found for Router ID: %s\n", argv[4]->arg);
return CMD_SUCCESS;
}
for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
{
- vty_out (vty, "\n SPF Result in Area %s%s%s", oa->name, VTYNL, VTYNL);
+ vty_out (vty, "\n SPF Result in Area %s\n\n", oa->name);
ospf6_linkstate_table_show (vty, idx_ipv4, argc, argv, oa->spf_table);
}
for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
{
- vty_out (vty, "\n SPF Result in Area %s%s%s", oa->name, VTYNL, VTYNL);
+ vty_out (vty, "\n SPF Result in Area %s\n\n", oa->name);
ospf6_linkstate_table_show (vty, idx_detail, argc, argv, oa->spf_table);
}
int i;
if (ospf->instance)
- vty_out (vty, "\nOSPF Instance: %d%s\n", ospf->instance,
- VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
vty_out (vty, "OSPF debugging status:\n");
if (area->external_routing != OSPF_AREA_DEFAULT)
{
if (vl_config->area_id_fmt == OSPF_AREA_ID_FMT_DOTTEDQUAD)
- vty_out (vty, "Area %s is %s%s",
+ vty_out (vty, "Area %s is %s\n",
inet_ntoa (area_id),
- area->external_routing == OSPF_AREA_NSSA?"nssa":"stub",
- VTYNL);
+ area->external_routing == OSPF_AREA_NSSA?"nssa":"stub");
else
- vty_out (vty, "Area %ld is %s%s",
+ vty_out (vty, "Area %ld is %s\n",
(u_long)ntohl (area_id.s_addr),
- area->external_routing == OSPF_AREA_NSSA?"nssa":"stub",
- VTYNL);
+ area->external_routing == OSPF_AREA_NSSA?"nssa":"stub");
return NULL;
}
if (ospf_crypt_key_lookup (IF_DEF_PARAMS (ifp)->auth_crypt, vl_config->crypto_key_id)
!= NULL)
{
- vty_out (vty, "OSPF: Key %d already exists%s",
- vl_config->crypto_key_id, VTYNL);
+ vty_out (vty, "OSPF: Key %d already exists\n",
+ vl_config->crypto_key_id);
return CMD_WARNING;
}
ck = ospf_crypt_key_new ();
if (ospf_crypt_key_lookup (IF_DEF_PARAMS (ifp)->auth_crypt,
vl_config->crypto_key_id) == NULL)
{
- vty_out (vty, "OSPF: Key %d does not exist%s",
- vl_config->crypto_key_id, VTYNL);
+ vty_out (vty, "OSPF: Key %d does not exist\n",
+ vl_config->crypto_key_id);
return CMD_WARNING;
}
for (i=5; i < argc; i++)
{
- /* vty_out (vty, "argv[%d]->arg - %s%s", i, argv[i]->text, VTYNL); */
+ /* vty_out (vty, "argv[%d]->arg - %s\n", i, argv[i]->text); */
switch (argv[i]->arg[0])
{
/* Deal with other parameters */
for (i=6; i < argc; i++)
{
- /* vty_out (vty, "argv[%d] - %s%s", i, argv[i], VTYNL); */
+ /* vty_out (vty, "argv[%d] - %s\n", i, argv[i]); */
switch (argv[i]->arg[0])
{
vty_out (vty, "\n");
vty_out (vty, " Shortcutting mode: %s",
ospf_shortcut_mode_descr_str[area->shortcut_configured]);
- vty_out (vty, ", S-bit consensus: %s%s",
- area->shortcut_capability ? "ok" : "no", VTYNL);
+ vty_out (vty, ", S-bit consensus: %s\n",
+ area->shortcut_capability ? "ok" : "no");
}
}
if (CHECK_FLAG(area->stub_router_state, OSPF_AREA_ADMIN_STUB_ROUTED))
vty_out (vty, " Administratively activated (indefinitely)\n");
if (area->t_stub_router)
- vty_out (vty, " Active from startup, %s remaining%s",
+ vty_out (vty, " Active from startup, %s remaining\n",
ospf_timer_dump (area->t_stub_router, timebuf,
- sizeof(timebuf)), VTYNL);
+ sizeof(timebuf)));
}
}
" this area: %d%s", area->full_vls, VTYNL);
/* Show SPF calculation times. */
- vty_out (vty, " SPF algorithm executed %d times%s",
- area->spf_calculation, VTYNL);
+ vty_out (vty, " SPF algorithm executed %d times\n",
+ area->spf_calculation);
/* Show number of LSA. */
- vty_out (vty, " Number of LSA %ld%s", area->lsdb->total, VTYNL);
- vty_out (vty, " Number of router LSA %ld. Checksum Sum 0x%08x%s",
+ vty_out (vty, " Number of LSA %ld\n", area->lsdb->total);
+ vty_out (vty, " Number of router LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_ROUTER_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_ROUTER_LSA), VTYNL);
- vty_out (vty, " Number of network LSA %ld. Checksum Sum 0x%08x%s",
+ ospf_lsdb_checksum (area->lsdb, OSPF_ROUTER_LSA));
+ vty_out (vty, " Number of network LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_NETWORK_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_NETWORK_LSA), VTYNL);
- vty_out (vty, " Number of summary LSA %ld. Checksum Sum 0x%08x%s",
+ ospf_lsdb_checksum (area->lsdb, OSPF_NETWORK_LSA));
+ vty_out (vty, " Number of summary LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_SUMMARY_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_SUMMARY_LSA), VTYNL);
- vty_out (vty, " Number of ASBR summary LSA %ld. Checksum Sum 0x%08x%s",
+ ospf_lsdb_checksum (area->lsdb, OSPF_SUMMARY_LSA));
+ vty_out (vty, " Number of ASBR summary LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_ASBR_SUMMARY_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_ASBR_SUMMARY_LSA), VTYNL);
- vty_out (vty, " Number of NSSA LSA %ld. Checksum Sum 0x%08x%s",
+ ospf_lsdb_checksum (area->lsdb, OSPF_ASBR_SUMMARY_LSA));
+ vty_out (vty, " Number of NSSA LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_AS_NSSA_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_AS_NSSA_LSA), VTYNL);
+ ospf_lsdb_checksum (area->lsdb, OSPF_AS_NSSA_LSA));
}
if (use_json)
}
else
{
- vty_out (vty, " Number of opaque link LSA %ld. Checksum Sum 0x%08x%s",
+ vty_out (vty, " Number of opaque link LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_OPAQUE_LINK_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_LINK_LSA), VTYNL);
- vty_out (vty, " Number of opaque area LSA %ld. Checksum Sum 0x%08x%s",
+ ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_LINK_LSA));
+ vty_out (vty, " Number of opaque area LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (area->lsdb, OSPF_OPAQUE_AREA_LSA),
- ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_AREA_LSA), VTYNL);
+ ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_AREA_LSA));
}
if (use_json)
}
else
{
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
}
}
else
{
- vty_out (vty, " OSPF Routing Process, Router ID: %s%s",
- inet_ntoa (ospf->router_id),
- VTYNL);
+ vty_out (vty, " OSPF Routing Process, Router ID: %s\n",
+ inet_ntoa (ospf->router_id));
}
/* Graceful shutdown */
}
else
{
- vty_out (vty, " Deferred shutdown in progress, %s remaining%s",
+ vty_out (vty, " Deferred shutdown in progress, %s remaining\n",
ospf_timer_dump (ospf->t_deferred_shutdown,
- timebuf, sizeof (timebuf)), VTYNL);
+ timebuf, sizeof (timebuf)));
}
}
{
vty_out (vty, " Supports only single TOS (TOS0) routes\n");
vty_out (vty, " This implementation conforms to RFC2328\n");
- vty_out (vty, " RFC1583Compatibility flag is %s%s",
+ vty_out (vty, " RFC1583Compatibility flag is %s\n",
CHECK_FLAG (ospf->config, OSPF_RFC1583_COMPATIBLE) ?
- "enabled" : "disabled", VTYNL);
+ "enabled" : "disabled");
}
if (use_json)
}
else
{
- vty_out (vty, " OpaqueCapability flag is %s%s",
- CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE) ? "enabled" : "disabled",
- VTYNL);
+ vty_out (vty, " OpaqueCapability flag is %s\n",
+ CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE) ? "enabled" : "disabled");
}
/* Show stub-router configuration */
{
vty_out (vty, " Stub router advertisement is configured\n");
if (ospf->stub_router_startup_time != OSPF_STUB_ROUTER_UNCONFIGURED)
- vty_out (vty, " Enabled for %us after start-up%s",
- ospf->stub_router_startup_time, VTYNL);
+ vty_out (vty, " Enabled for %us after start-up\n",
+ ospf->stub_router_startup_time);
if (ospf->stub_router_shutdown_time != OSPF_STUB_ROUTER_UNCONFIGURED)
- vty_out (vty, " Enabled for %us prior to full shutdown%s",
- ospf->stub_router_shutdown_time, VTYNL);
+ vty_out (vty, " Enabled for %us prior to full shutdown\n",
+ ospf->stub_router_shutdown_time);
}
}
if (ospf->ts_spf.tv_sec || ospf->ts_spf.tv_usec)
{
monotime_since(&ospf->ts_spf, &result);
- vty_out (vty, "last executed %s ago%s",
- ospf_timeval_dump (&result, timebuf, sizeof (timebuf)),
- VTYNL);
- vty_out (vty, " Last SPF duration %s%s",
- ospf_timeval_dump (&ospf->ts_spf_duration, timebuf, sizeof (timebuf)),
- VTYNL);
+ vty_out (vty, "last executed %s ago\n",
+ ospf_timeval_dump (&result, timebuf, sizeof (timebuf)));
+ vty_out (vty, " Last SPF duration %s\n",
+ ospf_timeval_dump (&ospf->ts_spf_duration, timebuf, sizeof (timebuf)));
}
else
vty_out (vty, "has not been run\n");
}
else
{
- vty_out (vty, " SPF timer %s%s%s",
+ vty_out (vty, " SPF timer %s%s\n",
(ospf->t_spf_calc ? "due in " : "is "),
- ospf_timer_dump (ospf->t_spf_calc, timebuf, sizeof (timebuf)),
- VTYNL);
+ ospf_timer_dump (ospf->t_spf_calc, timebuf, sizeof (timebuf)));
- vty_out (vty, " LSA minimum interval %d msecs%s",
- ospf->min_ls_interval, VTYNL);
- vty_out (vty, " LSA minimum arrival %d msecs%s",
- ospf->min_ls_arrival, VTYNL);
+ vty_out (vty, " LSA minimum interval %d msecs\n",
+ ospf->min_ls_interval);
+ vty_out (vty, " LSA minimum arrival %d msecs\n",
+ ospf->min_ls_arrival);
/* Show write multiplier values */
- vty_out (vty, " Write Multiplier set to %d %s",
- ospf->write_oi_count, VTYNL);
+ vty_out (vty, " Write Multiplier set to %d \n",
+ ospf->write_oi_count);
/* Show refresh parameters. */
- vty_out (vty, " Refresh timer %d secs%s",
- ospf->lsa_refresh_interval, VTYNL);
+ vty_out (vty, " Refresh timer %d secs\n",
+ ospf->lsa_refresh_interval);
}
/* Show ABR/ASBR flags. */
if (use_json)
json_object_string_add(json, "abrType", ospf_abr_type_descr_str[ospf->abr_type]);
else
- vty_out (vty, " This router is an ABR, ABR type is: %s%s",
- ospf_abr_type_descr_str[ospf->abr_type], VTYNL);
+ vty_out (vty, " This router is an ABR, ABR type is: %s\n",
+ ospf_abr_type_descr_str[ospf->abr_type]);
}
if (CHECK_FLAG (ospf->flags, OSPF_FLAG_ASBR))
{
}
else
{
- vty_out (vty, " Number of external LSA %ld. Checksum Sum 0x%08x%s",
+ vty_out (vty, " Number of external LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (ospf->lsdb, OSPF_AS_EXTERNAL_LSA),
- ospf_lsdb_checksum (ospf->lsdb, OSPF_AS_EXTERNAL_LSA), VTYNL);
+ ospf_lsdb_checksum (ospf->lsdb, OSPF_AS_EXTERNAL_LSA));
}
if (use_json)
}
else
{
- vty_out (vty, " Number of opaque AS LSA %ld. Checksum Sum 0x%08x%s",
+ vty_out (vty, " Number of opaque AS LSA %ld. Checksum Sum 0x%08x\n",
ospf_lsdb_count (ospf->lsdb, OSPF_OPAQUE_AS_LSA),
- ospf_lsdb_checksum (ospf->lsdb, OSPF_OPAQUE_AS_LSA), VTYNL);
+ ospf_lsdb_checksum (ospf->lsdb, OSPF_OPAQUE_AS_LSA));
}
/* Show number of areas attached. */
if (use_json)
json_object_int_add(json, "attachedAreaCounter", listcount (ospf->areas));
else
- vty_out (vty, " Number of areas attached to this router: %d%s",
- listcount (ospf->areas), VTYNL);
+ vty_out (vty, " Number of areas attached to this router: %d\n",
+ listcount (ospf->areas));
if (CHECK_FLAG(ospf->config, OSPF_LOG_ADJACENCY_CHANGES))
{
if (use_json)
{
json_object_object_add(json, "areas", json_areas);
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_int_add(json_interface_sub, "networkLsaSequence", ntohl (oi->params->network_lsa_seqnum));
else
- vty_out (vty, " Saved Network-LSA sequence number 0x%x%s",
- ntohl (oi->params->network_lsa_seqnum), VTYNL);
+ vty_out (vty, " Saved Network-LSA sequence number 0x%x\n",
+ ntohl (oi->params->network_lsa_seqnum));
}
if (use_json)
vty_out (vty, "%ds,", OSPF_IF_PARAM (oi, v_hello));
else
vty_out (vty, "%dms,", 1000 / OSPF_IF_PARAM (oi, fast_hello));
- vty_out (vty, " Dead %ds, Wait %ds, Retransmit %d%s",
+ vty_out (vty, " Dead %ds, Wait %ds, Retransmit %d\n",
OSPF_IF_PARAM (oi, v_wait),
OSPF_IF_PARAM (oi, v_wait),
- OSPF_IF_PARAM (oi, retransmit_interval),
- VTYNL);
+ OSPF_IF_PARAM (oi, retransmit_interval));
}
if (OSPF_IF_PASSIVE_STATUS (oi) == OSPF_IF_ACTIVE)
json_object_int_add(json_interface_sub, "timerHelloInMsecs", time_store);
}
else
- vty_out (vty, " Hello due in %s%s",
- ospf_timer_dump (oi->t_hello, timebuf, sizeof(timebuf)),
- VTYNL);
+ vty_out (vty, " Hello due in %s\n",
+ ospf_timer_dump (oi->t_hello, timebuf, sizeof(timebuf)));
}
else /* passive-interface is set */
{
json_object_int_add(json_interface_sub, "nbrAdjacentCount", ospf_nbr_count (oi, NSM_Full));
}
else
- vty_out (vty, " Neighbor Count is %d, Adjacent neighbor count is %d%s",
- ospf_nbr_count (oi, 0), ospf_nbr_count (oi, NSM_Full),
- VTYNL);
+ vty_out (vty, " Neighbor Count is %d, Adjacent neighbor count is %d\n",
+ ospf_nbr_count (oi, 0), ospf_nbr_count (oi, NSM_Full));
ospf_bfd_interface_show(vty, ifp, json_interface_sub, use_json);
}
}
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
if (argc == iface_argv)
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
static void
show_ip_ospf_neighbour_header (struct vty *vty)
{
- vty_out (vty, "\n%-15s %3s %-15s %9s %-15s %-20s %5s %5s %5s%s",
+ vty_out (vty, "\n%-15s %3s %-15s %9s %-15s %-20s %5s %5s %5s\n",
"Neighbor ID", "Pri", "State", "Dead Time",
- "Address", "Interface", "RXmtL", "RqstL", "DBsmL",
- VTYNL);
+ "Address", "Interface", "RXmtL", "RqstL", "DBsmL");
}
static void
ospf_timer_dump (nbr->t_inactivity, timebuf,
sizeof(timebuf)));
vty_out (vty, "%-15s ", inet_ntoa (nbr->src));
- vty_out (vty, "%-20s %5ld %5ld %5d%s",
+ vty_out (vty, "%-20s %5ld %5ld %5d\n",
IF_NAME (oi), ospf_ls_retransmit_count (nbr),
- ospf_ls_request_count (nbr), ospf_db_summary_count (nbr),
- VTYNL);
+ ospf_ls_request_count (nbr), ospf_db_summary_count (nbr));
}
}
}
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
{
vty_out (vty, "%-15s %3d %-15s %9s ",
"-", nbr_nbma->priority, "Down", "-");
- vty_out (vty, "%-15s %-20s %5d %5d %5d%s",
+ vty_out (vty, "%-15s %-20s %5d %5d %5d\n",
inet_ntoa (nbr_nbma->addr), IF_NAME (oi),
- 0, 0, 0, VTYNL);
+ 0, 0, 0);
}
}
}
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
ifp = if_lookup_by_name (argv[arg_base]->arg, VRF_DEFAULT);
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_string_add(json_sub, "ifaceAddress", inet_ntoa (nbr_nbma->addr));
else
- vty_out (vty, " interface address %s%s",
- inet_ntoa (nbr_nbma->addr), VTYNL);
+ vty_out (vty, " interface address %s\n",
+ inet_ntoa (nbr_nbma->addr));
/* Show Area ID. */
if (use_json)
json_object_string_add(json_sub, "iface", IF_NAME (oi));
}
else
- vty_out (vty, " In the area %s via interface %s%s",
- ospf_area_desc_string (oi->area), IF_NAME (oi), VTYNL);
+ vty_out (vty, " In the area %s via interface %s\n",
+ ospf_area_desc_string (oi->area), IF_NAME (oi));
/* Show neighbor priority and state. */
if (use_json)
if (use_json)
json_object_int_add(json_sub, "stateChangeCounter", nbr_nbma->state_change);
else
- vty_out (vty, " %d state changes%s", nbr_nbma->state_change, VTYNL);
+ vty_out (vty, " %d state changes\n", nbr_nbma->state_change);
/* Show PollInterval */
if (use_json)
json_object_int_add(json_sub, "pollInterval", nbr_nbma->v_poll);
else
- vty_out (vty, " Poll interval %d%s", nbr_nbma->v_poll, VTYNL);
+ vty_out (vty, " Poll interval %d\n", nbr_nbma->v_poll);
/* Show poll-interval timer. */
if (use_json)
json_object_int_add(json_sub, "pollIntervalTimerDueMsec", time_store);
}
else
- vty_out (vty, " Poll timer due in %s%s",
- ospf_timer_dump (nbr_nbma->t_poll, timebuf, sizeof(timebuf)),
- VTYNL);
+ vty_out (vty, " Poll timer due in %s\n",
+ ospf_timer_dump (nbr_nbma->t_poll, timebuf, sizeof(timebuf)));
/* Show poll-interval timer thread. */
if (use_json)
json_object_string_add(json_sub, "pollIntervalTimerThread", "on");
}
else
- vty_out (vty, " Thread Poll Timer %s%s",
- nbr_nbma->t_poll != NULL ? "on" : "off", VTYNL);
+ vty_out (vty, " Thread Poll Timer %s\n",
+ nbr_nbma->t_poll != NULL ? "on" : "off");
if (use_json)
json_object_object_add(json, "noNbrId", json_sub);
if (use_json)
json_object_string_add(json_sub, "ifaceAddress", inet_ntoa (nbr->address.u.prefix4));
else
- vty_out (vty, " interface address %s%s",
- inet_ntoa (nbr->address.u.prefix4), VTYNL);
+ vty_out (vty, " interface address %s\n",
+ inet_ntoa (nbr->address.u.prefix4));
/* Show Area ID. */
if (use_json)
json_object_string_add(json_sub, "ifaceName", oi->ifp->name);
}
else
- vty_out (vty, " In the area %s via interface %s%s",
- ospf_area_desc_string (oi->area), oi->ifp->name, VTYNL);
+ vty_out (vty, " In the area %s via interface %s\n",
+ ospf_area_desc_string (oi->area), oi->ifp->name);
/* Show neighbor priority and state. */
if (use_json)
if (use_json)
json_object_int_add(json_sub, "stateChangeCounter", nbr->state_change);
else
- vty_out (vty, " %d state changes%s", nbr->state_change, VTYNL);
+ vty_out (vty, " %d state changes\n", nbr->state_change);
if (nbr->ts_last_progress.tv_sec || nbr->ts_last_progress.tv_usec)
{
else
{
vty_out (vty, " Most recent state change statistics:\n");
- vty_out (vty, " Progressive change %s ago%s",
- ospf_timeval_dump (&res, timebuf, sizeof(timebuf)),
- VTYNL);
+ vty_out (vty, " Progressive change %s ago\n",
+ ospf_timeval_dump (&res, timebuf, sizeof(timebuf)));
}
}
}
else
{
- vty_out (vty, " Regressive change %s ago, due to %s%s",
+ vty_out (vty, " Regressive change %s ago, due to %s\n",
ospf_timeval_dump (&res, timebuf, sizeof(timebuf)),
- (nbr->last_regress_str ? nbr->last_regress_str : "??"),
- VTYNL);
+ (nbr->last_regress_str ? nbr->last_regress_str : "??"));
}
}
if (use_json)
json_object_string_add(json_sub, "routerDesignatedBackupId", inet_ntoa (nbr->bd_router));
else
- vty_out (vty, " BDR is %s%s", inet_ntoa (nbr->bd_router), VTYNL);
+ vty_out (vty, " BDR is %s\n", inet_ntoa (nbr->bd_router));
/* Show options. */
if (use_json)
json_object_string_add(json_sub, "optionsList", ospf_options_dump (nbr->options));
}
else
- vty_out (vty, " Options %d %s%s", nbr->options,
- ospf_options_dump (nbr->options), VTYNL);
+ vty_out (vty, " Options %d %s\n", nbr->options,
+ ospf_options_dump (nbr->options));
/* Show Router Dead interval timer. */
if (use_json)
json_object_int_add(json_sub, "routerDeadIntervalTimerDueMsec", -1);
}
else
- vty_out (vty, " Dead timer due in %s%s",
- ospf_timer_dump (nbr->t_inactivity, timebuf, sizeof (timebuf)),
- VTYNL);
+ vty_out (vty, " Dead timer due in %s\n",
+ ospf_timer_dump (nbr->t_inactivity, timebuf, sizeof (timebuf)));
/* Show Database Summary list. */
if (use_json)
json_object_int_add(json_sub, "databaseSummaryListCounter", ospf_db_summary_count (nbr));
else
- vty_out (vty, " Database Summary List %d%s",
- ospf_db_summary_count (nbr), VTYNL);
+ vty_out (vty, " Database Summary List %d\n",
+ ospf_db_summary_count (nbr));
/* Show Link State Request list. */
if (use_json)
json_object_int_add(json_sub, "linkStateRequestListCounter", ospf_ls_request_count (nbr));
else
- vty_out (vty, " Link State Request List %ld%s",
- ospf_ls_request_count (nbr), VTYNL);
+ vty_out (vty, " Link State Request List %ld\n",
+ ospf_ls_request_count (nbr));
/* Show Link State Retransmission list. */
if (use_json)
json_object_int_add(json_sub, "linkStateRetransmissionListCounter", ospf_ls_retransmit_count (nbr));
else
- vty_out (vty, " Link State Retransmission List %ld%s",
- ospf_ls_retransmit_count (nbr), VTYNL);
+ vty_out (vty, " Link State Retransmission List %ld\n",
+ ospf_ls_retransmit_count (nbr));
/* Show inactivity timer thread. */
if (use_json)
json_object_string_add(json_sub, "threadInactivityTimer", "on");
}
else
- vty_out (vty, " Thread Inactivity Timer %s%s",
- nbr->t_inactivity != NULL ? "on" : "off", VTYNL);
+ vty_out (vty, " Thread Inactivity Timer %s\n",
+ nbr->t_inactivity != NULL ? "on" : "off");
/* Show Database Description retransmission thread. */
if (use_json)
json_object_string_add(json_sub, "threadDatabaseDescriptionRetransmission", "on");
}
else
- vty_out (vty, " Thread Database Description Retransmision %s%s",
- nbr->t_db_desc != NULL ? "on" : "off", VTYNL);
+ vty_out (vty, " Thread Database Description Retransmision %s\n",
+ nbr->t_db_desc != NULL ? "on" : "off");
/* Show Link State Request Retransmission thread. */
if (use_json)
json_object_string_add(json_sub, "threadLinkStateRequestRetransmission", "on");
}
else
- vty_out (vty, " Thread Link State Request Retransmission %s%s",
- nbr->t_ls_req != NULL ? "on" : "off", VTYNL);
+ vty_out (vty, " Thread Link State Request Retransmission %s\n",
+ nbr->t_ls_req != NULL ? "on" : "off");
/* Show Link State Update Retransmission thread. */
if (use_json)
json_object_string_add(json_sub, "threadLinkStateUpdateRetransmission", "on");
}
else
- vty_out (vty, " Thread Link State Update Retransmission %s%s%s",
- nbr->t_ls_upd != NULL ? "on" : "off", VTYNL, VTYNL);
+ vty_out (vty, " Thread Link State Update Retransmission %s\n\n",
+ nbr->t_ls_upd != NULL ? "on" : "off");
if (use_json)
{
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
ret = inet_aton (argv[arg_base]->arg, &router_id);
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
if (use_json)
json_object_int_add(json, "ospfInstance", ospf->instance);
else
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
}
ifp = if_lookup_by_name (argv[arg_base]->arg, VRF_DEFAULT);
if (use_json)
{
- vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTYNL);
+ vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
else
vty_out (vty, " Advertising Router: %s\n", inet_ntoa (lsa->data->adv_router));
vty_out (vty, " LS Seq Number: %08lx\n", (u_long)ntohl (lsa->data->ls_seqnum));
vty_out (vty, " Checksum: 0x%04x\n", ntohs (lsa->data->checksum));
- vty_out (vty, " Length: %d%s\n", ntohs (lsa->data->length), VTYNL);
+ vty_out (vty, " Length: %d\n\n", ntohs (lsa->data->length));
}
const char *link_type_desc[] =
{
type = rl->link[i].type;
- vty_out (vty, " Link connected to: %s%s",
- link_type_desc[type], VTYNL);
- vty_out (vty, " (Link ID) %s: %s%s", link_id_desc[type],
- inet_ntoa (rl->link[i].link_id), VTYNL);
- vty_out (vty, " (Link Data) %s: %s%s", link_data_desc[type],
- inet_ntoa (rl->link[i].link_data), VTYNL);
+ vty_out (vty, " Link connected to: %s\n",
+ link_type_desc[type]);
+ vty_out (vty, " (Link ID) %s: %s\n", link_id_desc[type],
+ inet_ntoa (rl->link[i].link_id));
+ vty_out (vty, " (Link Data) %s: %s\n", link_data_desc[type],
+ inet_ntoa (rl->link[i].link_data));
vty_out (vty, " Number of TOS metrics: 0\n");
- vty_out (vty, " TOS 0 Metric: %d%s",
- ntohs (rl->link[i].metric), VTYNL);
+ vty_out (vty, " TOS 0 Metric: %d\n",
+ ntohs (rl->link[i].metric));
vty_out (vty, "\n");
}
}
show_ip_ospf_database_header (vty, lsa);
- vty_out (vty, " Number of Links: %d%s%s", ntohs (rl->links),
- VTYNL, VTYNL);
+ vty_out (vty, " Number of Links: %d\n\n", ntohs (rl->links));
show_ip_ospf_database_router_links (vty, rl);
vty_out (vty, "\n");
show_ip_ospf_database_header (vty, lsa);
- vty_out (vty, " Network Mask: /%d%s",
- ip_masklen (nl->mask), VTYNL);
+ vty_out (vty, " Network Mask: /%d\n",
+ ip_masklen (nl->mask));
length = ntohs (lsa->data->length) - OSPF_LSA_HEADER_SIZE - 4;
for (i = 0; length > 0; i++, length -= 4)
- vty_out (vty, " Attached Router: %s%s",
- inet_ntoa (nl->routers[i]), VTYNL);
+ vty_out (vty, " Attached Router: %s\n",
+ inet_ntoa (nl->routers[i]));
vty_out (vty, "\n");
}
show_ip_ospf_database_header (vty, lsa);
- vty_out (vty, " Network Mask: /%d%s", ip_masklen (sl->mask),
- VTYNL);
- vty_out (vty, " TOS: 0 Metric: %d%s", GET_METRIC (sl->metric),
- VTYNL);
+ vty_out (vty, " Network Mask: /%d\n", ip_masklen (sl->mask));
+ vty_out (vty, " TOS: 0 Metric: %d\n", GET_METRIC (sl->metric));
vty_out (vty, "\n");
}
show_ip_ospf_database_header (vty, lsa);
- vty_out (vty, " Network Mask: /%d%s",
- ip_masklen (sl->mask), VTYNL);
- vty_out (vty, " TOS: 0 Metric: %d%s", GET_METRIC (sl->metric),
- VTYNL);
+ vty_out (vty, " Network Mask: /%d\n",
+ ip_masklen (sl->mask));
+ vty_out (vty, " TOS: 0 Metric: %d\n", GET_METRIC (sl->metric));
vty_out (vty, "\n");
}
show_ip_ospf_database_header (vty, lsa);
- vty_out (vty, " Network Mask: /%d%s",
- ip_masklen (al->mask), VTYNL);
- vty_out (vty, " Metric Type: %s%s",
+ vty_out (vty, " Network Mask: /%d\n",
+ ip_masklen (al->mask));
+ vty_out (vty, " Metric Type: %s\n",
IS_EXTERNAL_METRIC (al->e[0].tos) ?
- "2 (Larger than any link state path)" : "1", VTYNL);
+ "2 (Larger than any link state path)" : "1");
vty_out (vty, " TOS: 0\n");
- vty_out (vty, " Metric: %d%s",
- GET_METRIC (al->e[0].metric), VTYNL);
- vty_out (vty, " Forward Address: %s%s",
- inet_ntoa (al->e[0].fwd_addr), VTYNL);
+ vty_out (vty, " Metric: %d\n",
+ GET_METRIC (al->e[0].metric));
+ vty_out (vty, " Forward Address: %s\n",
+ inet_ntoa (al->e[0].fwd_addr));
vty_out (vty, " External Route Tag: %"ROUTE_TAG_PRI"%s%s",
(route_tag_t)ntohl (al->e[0].route_tag), VTYNL, VTYNL);
show_ip_ospf_database_header (vty, lsa);
- vty_out (vty, " Network Mask: /%d%s",
- ip_masklen (al->mask), VTYNL);
- vty_out (vty, " Metric Type: %s%s",
+ vty_out (vty, " Network Mask: /%d\n",
+ ip_masklen (al->mask));
+ vty_out (vty, " Metric Type: %s\n",
IS_EXTERNAL_METRIC (al->e[0].tos) ?
- "2 (Larger than any link state path)" : "1", VTYNL);
+ "2 (Larger than any link state path)" : "1");
vty_out (vty, " TOS: 0\n");
- vty_out (vty, " Metric: %d%s",
- GET_METRIC (al->e[0].metric), VTYNL);
- vty_out (vty, " NSSA: Forward Address: %s%s",
- inet_ntoa (al->e[0].fwd_addr), VTYNL);
+ vty_out (vty, " Metric: %d\n",
+ GET_METRIC (al->e[0].metric));
+ vty_out (vty, " NSSA: Forward Address: %s\n",
+ inet_ntoa (al->e[0].fwd_addr));
vty_out (vty, " External Route Tag: %"ROUTE_TAG_PRI"%s%s",
(route_tag_t)ntohl (al->e[0].route_tag), VTYNL, VTYNL);
{
case OSPF_AS_EXTERNAL_LSA:
case OSPF_OPAQUE_AS_LSA:
- vty_out (vty, " %s %s%s",
- show_database_desc[type],
- VTYNL, VTYNL);
+ vty_out (vty, " %s \n\n",
+ show_database_desc[type]);
show_lsa_detail_proc (vty, AS_LSDB (ospf, type), id, adv_router);
break;
default:
for (ALL_LIST_ELEMENTS_RO (ospf->areas, node, area))
{
- vty_out (vty, "\n %s (Area %s)%s%s", show_database_desc[type],
- ospf_area_desc_string (area), VTYNL, VTYNL);
+ vty_out (vty, "\n %s (Area %s)\n\n", show_database_desc[type],
+ ospf_area_desc_string (area));
show_lsa_detail_proc (vty, AREA_LSDB (area, type), id, adv_router);
}
break;
{
case OSPF_AS_EXTERNAL_LSA:
case OSPF_OPAQUE_AS_LSA:
- vty_out (vty, " %s %s%s",
- show_database_desc[type],
- VTYNL, VTYNL);
+ vty_out (vty, " %s \n\n",
+ show_database_desc[type]);
show_lsa_detail_adv_router_proc (vty, AS_LSDB (ospf, type),
adv_router);
break;
default:
for (ALL_LIST_ELEMENTS_RO (ospf->areas, node, area))
{
- vty_out (vty, "\n %s (Area %s)%s%s", show_database_desc[type],
- ospf_area_desc_string (area), VTYNL, VTYNL);
+ vty_out (vty, "\n %s (Area %s)\n\n", show_database_desc[type],
+ ospf_area_desc_string (area));
show_lsa_detail_adv_router_proc (vty, AREA_LSDB (area, type),
adv_router);
}
if (ospf_lsdb_count_self (area->lsdb, type) > 0 ||
(!self && ospf_lsdb_count (area->lsdb, type) > 0))
{
- vty_out (vty, " %s (Area %s)%s%s",
+ vty_out (vty, " %s (Area %s)\n\n",
show_database_desc[type],
- ospf_area_desc_string (area),
- VTYNL, VTYNL);
- vty_out (vty, "%s%s", show_database_header[type], VTYNL);
+ ospf_area_desc_string (area));
+ vty_out (vty, "%s\n", show_database_header[type]);
LSDB_LOOP (AREA_LSDB (area, type), rn, lsa)
show_lsa_summary (vty, lsa, self);
if (ospf_lsdb_count_self (ospf->lsdb, type) ||
(!self && ospf_lsdb_count (ospf->lsdb, type)))
{
- vty_out (vty, " %s%s%s",
- show_database_desc[type],
- VTYNL, VTYNL);
- vty_out (vty, "%s%s", show_database_header[type],
- VTYNL);
+ vty_out (vty, " %s\n\n",
+ show_database_desc[type]);
+ vty_out (vty, "%s\n", show_database_header[type]);
LSDB_LOOP (AS_LSDB (ospf, type), rn, lsa)
show_lsa_summary (vty, lsa, self);
if ((lsa = rn->info) != NULL)
{
- vty_out (vty, "Link type: %d%s", lsa->data->type, VTYNL);
- vty_out (vty, "Link State ID: %s%s",
- inet_ntoa (lsa->data->id), VTYNL);
- vty_out (vty, "Advertising Router: %s%s",
- inet_ntoa (lsa->data->adv_router), VTYNL);
- vty_out (vty, "LSA lock count: %d%s", lsa->lock, VTYNL);
+ vty_out (vty, "Link type: %d\n", lsa->data->type);
+ vty_out (vty, "Link State ID: %s\n",
+ inet_ntoa (lsa->data->id));
+ vty_out (vty, "Advertising Router: %s\n",
+ inet_ntoa (lsa->data->adv_router));
+ vty_out (vty, "LSA lock count: %d\n", lsa->lock);
vty_out (vty, "\n");
}
}
struct in_addr id, adv_router;
if (ospf->instance)
- vty_out (vty, "\nOSPF Instance: %d%s", ospf->instance,
- VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n", ospf->instance);
- vty_out (vty, "\n OSPF Router with ID (%s)%s%s",
- inet_ntoa (ospf->router_id), VTYNL, VTYNL);
+ vty_out (vty, "\n OSPF Router with ID (%s)\n\n",
+ inet_ntoa (ospf->router_id));
/* Show all LSA. */
if (argc == arg_base + 4)
struct in_addr adv_router;
if (ospf->instance)
- vty_out (vty, "\nOSPF Instance: %d%s", ospf->instance,
- VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n", ospf->instance);
- vty_out (vty, "\n OSPF Router with ID (%s)%s%s",
- inet_ntoa (ospf->router_id), VTYNL, VTYNL);
+ vty_out (vty, "\n OSPF Router with ID (%s)\n\n",
+ inet_ntoa (ospf->router_id));
/* Set database type to show. */
if (strncmp (argv[arg_base + idx_type]->text, "r", 1) == 0)
key_id = strtol (keyid, NULL, 10);
if (ospf_crypt_key_lookup (params->auth_crypt, key_id) != NULL)
{
- vty_out (vty, "OSPF: Key %d already exists%s", key_id, VTYNL);
+ vty_out (vty, "OSPF: Key %d already exists\n", key_id);
return CMD_WARNING;
}
ck = ospf_crypt_key_lookup (params->auth_crypt, key_id);
if (ck == NULL)
{
- vty_out (vty, "OSPF: Key %d does not exist%s", key_id, VTYNL);
+ vty_out (vty, "OSPF: Key %d does not exist\n", key_id);
return CMD_WARNING;
}
struct ospf_area *area;
if (ospf->stub_router_startup_time != OSPF_STUB_ROUTER_UNCONFIGURED)
- vty_out (vty, " max-metric router-lsa on-startup %u%s",
- ospf->stub_router_startup_time, VTYNL);
+ vty_out (vty, " max-metric router-lsa on-startup %u\n",
+ ospf->stub_router_startup_time);
if (ospf->stub_router_shutdown_time != OSPF_STUB_ROUTER_UNCONFIGURED)
- vty_out (vty, " max-metric router-lsa on-shutdown %u%s",
- ospf->stub_router_shutdown_time, VTYNL);
+ vty_out (vty, " max-metric router-lsa on-shutdown %u\n",
+ ospf->stub_router_shutdown_time);
for (ALL_LIST_ELEMENTS_RO (ospf->areas, ln, area))
{
if (CHECK_FLAG (area->stub_router_state, OSPF_AREA_ADMIN_STUB_ROUTED))
{
case OSPF_PATH_INTER_AREA:
if (or->type == OSPF_DESTINATION_NETWORK)
- vty_out (vty, "N IA %-18s [%d] area: %s%s", buf1, or->cost,
- inet_ntoa (or->u.std.area_id), VTYNL);
+ vty_out (vty, "N IA %-18s [%d] area: %s\n", buf1, or->cost,
+ inet_ntoa (or->u.std.area_id));
else if (or->type == OSPF_DESTINATION_DISCARD)
- vty_out (vty, "D IA %-18s Discard entry%s", buf1, VTYNL);
+ vty_out (vty, "D IA %-18s Discard entry\n", buf1);
break;
case OSPF_PATH_INTRA_AREA:
- vty_out (vty, "N %-18s [%d] area: %s%s", buf1, or->cost,
- inet_ntoa (or->u.std.area_id), VTYNL);
+ vty_out (vty, "N %-18s [%d] area: %s\n", buf1, or->cost,
+ inet_ntoa (or->u.std.area_id));
break;
default:
break;
if (if_lookup_by_index(path->ifindex, VRF_DEFAULT))
{
if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", ifindex2ifname (path->ifindex, VRF_DEFAULT), VTYNL);
+ vty_out (vty, "%24s directly attached to %s\n",
+ "", ifindex2ifname (path->ifindex, VRF_DEFAULT));
else
- vty_out (vty, "%24s via %s, %s%s", "",
+ vty_out (vty, "%24s via %s, %s\n", "",
inet_ntoa (path->nexthop),
- ifindex2ifname (path->ifindex, VRF_DEFAULT), VTYNL);
+ ifindex2ifname (path->ifindex, VRF_DEFAULT));
}
}
}
(or->path_type == OSPF_PATH_INTER_AREA ? "IA" : " "),
or->cost, inet_ntoa (or->u.std.area_id));
/* Show flags. */
- vty_out (vty, "%s%s%s",
+ vty_out (vty, "%s%s\n",
(or->u.std.flags & ROUTER_LSA_BORDER ? ", ABR" : ""),
- (or->u.std.flags & ROUTER_LSA_EXTERNAL ? ", ASBR" : ""),
- VTYNL);
+ (or->u.std.flags & ROUTER_LSA_EXTERNAL ? ", ASBR" : ""));
for (ALL_LIST_ELEMENTS_RO (or->paths, pnode, path))
{
if (if_lookup_by_index(path->ifindex, VRF_DEFAULT))
{
if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", ifindex2ifname (path->ifindex, VRF_DEFAULT),
- VTYNL);
+ vty_out (vty, "%24s directly attached to %s\n",
+ "", ifindex2ifname (path->ifindex, VRF_DEFAULT));
else
- vty_out (vty, "%24s via %s, %s%s", "",
+ vty_out (vty, "%24s via %s, %s\n", "",
inet_ntoa (path->nexthop),
- ifindex2ifname (path->ifindex, VRF_DEFAULT),
- VTYNL);
+ ifindex2ifname (path->ifindex, VRF_DEFAULT));
}
}
}
if (if_lookup_by_index(path->ifindex, VRF_DEFAULT))
{
if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", ifindex2ifname (path->ifindex, VRF_DEFAULT), VTYNL);
+ vty_out (vty, "%24s directly attached to %s\n",
+ "", ifindex2ifname (path->ifindex, VRF_DEFAULT));
else
- vty_out (vty, "%24s via %s, %s%s", "",
+ vty_out (vty, "%24s via %s, %s\n", "",
inet_ntoa (path->nexthop),
- ifindex2ifname (path->ifindex, VRF_DEFAULT),
- VTYNL);
+ ifindex2ifname (path->ifindex, VRF_DEFAULT));
}
}
}
show_ip_ospf_border_routers_common (struct vty *vty, struct ospf *ospf)
{
if (ospf->instance)
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
if (ospf->new_table == NULL)
{
show_ip_ospf_route_common (struct vty *vty, struct ospf *ospf)
{
if (ospf->instance)
- vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
- VTYNL, VTYNL);
+ vty_out (vty, "\nOSPF Instance: %d\n\n", ospf->instance);
if (ospf->new_table == NULL)
{
continue;
vty_out (vty, "!\n");
- vty_out (vty, "interface %s%s", ifp->name,
- VTYNL);
+ vty_out (vty, "interface %s\n", ifp->name);
if (ifp->desc)
- vty_out (vty, " description %s%s", ifp->desc,
- VTYNL);
+ vty_out (vty, " description %s\n", ifp->desc);
write++;
(unsigned long int) ntohl (n->area_id.s_addr));
/* Network print. */
- vty_out (vty, " network %s/%d area %s%s",
+ vty_out (vty, " network %s/%d area %s\n",
inet_ntoa (rn->p.u.prefix4), rn->p.prefixlen,
- buf, VTYNL);
+ buf);
}
return 0;
if (area->auth_type != OSPF_AUTH_NULL)
{
if (area->auth_type == OSPF_AUTH_SIMPLE)
- vty_out (vty, " area %s authentication%s", buf, VTYNL);
+ vty_out (vty, " area %s authentication\n", buf);
else
- vty_out (vty, " area %s authentication message-digest%s",
- buf, VTYNL);
+ vty_out (vty, " area %s authentication message-digest\n",
+ buf);
}
if (area->shortcut_configured != OSPF_SHORTCUT_DEFAULT)
- vty_out (vty, " area %s shortcut %s%s", buf,
- ospf_shortcut_mode_str[area->shortcut_configured],
- VTYNL);
+ vty_out (vty, " area %s shortcut %s\n", buf,
+ ospf_shortcut_mode_str[area->shortcut_configured]);
if ((area->external_routing == OSPF_AREA_STUB)
|| (area->external_routing == OSPF_AREA_NSSA)
vty_out (vty, "\n");
if (area->default_cost != 1)
- vty_out (vty, " area %s default-cost %d%s", buf,
- area->default_cost, VTYNL);
+ vty_out (vty, " area %s default-cost %d\n", buf,
+ area->default_cost);
}
for (rn1 = route_top (area->ranges); rn1; rn1 = route_next (rn1))
}
if (EXPORT_NAME (area))
- vty_out (vty, " area %s export-list %s%s", buf,
- EXPORT_NAME (area), VTYNL);
+ vty_out (vty, " area %s export-list %s\n", buf,
+ EXPORT_NAME (area));
if (IMPORT_NAME (area))
- vty_out (vty, " area %s import-list %s%s", buf,
- IMPORT_NAME (area), VTYNL);
+ vty_out (vty, " area %s import-list %s\n", buf,
+ IMPORT_NAME (area));
if (PREFIX_NAME_IN (area))
- vty_out (vty, " area %s filter-list prefix %s in%s", buf,
- PREFIX_NAME_IN (area), VTYNL);
+ vty_out (vty, " area %s filter-list prefix %s in\n", buf,
+ PREFIX_NAME_IN (area));
if (PREFIX_NAME_OUT (area))
- vty_out (vty, " area %s filter-list prefix %s out%s", buf,
- PREFIX_NAME_OUT (area), VTYNL);
+ vty_out (vty, " area %s filter-list prefix %s out\n", buf,
+ PREFIX_NAME_OUT (area));
}
return 0;
OSPF_IF_PARAM (oi, v_wait) != OSPF_ROUTER_DEAD_INTERVAL_DEFAULT ||
OSPF_IF_PARAM (oi, retransmit_interval) != OSPF_RETRANSMIT_INTERVAL_DEFAULT ||
OSPF_IF_PARAM (oi, transmit_delay) != OSPF_TRANSMIT_DELAY_DEFAULT)
- vty_out (vty, " area %s virtual-link %s hello-interval %d retransmit-interval %d transmit-delay %d dead-interval %d%s",
+ vty_out (vty, " area %s virtual-link %s hello-interval %d retransmit-interval %d transmit-delay %d dead-interval %d\n",
buf,
inet_ntoa (vl_data->vl_peer),
OSPF_IF_PARAM (oi, v_hello),
OSPF_IF_PARAM (oi, retransmit_interval),
OSPF_IF_PARAM (oi, transmit_delay),
- OSPF_IF_PARAM (oi, v_wait),
- VTYNL);
+ OSPF_IF_PARAM (oi, v_wait));
else
- vty_out (vty, " area %s virtual-link %s%s", buf,
- inet_ntoa (vl_data->vl_peer), VTYNL);
+ vty_out (vty, " area %s virtual-link %s\n", buf,
+ inet_ntoa (vl_data->vl_peer));
/* Auth key */
if (IF_DEF_PARAMS (vl_data->vl_oi->ifp)->auth_simple[0] != '\0')
- vty_out (vty, " area %s virtual-link %s authentication-key %s%s",
+ vty_out (vty, " area %s virtual-link %s authentication-key %s\n",
buf,
inet_ntoa (vl_data->vl_peer),
- IF_DEF_PARAMS (vl_data->vl_oi->ifp)->auth_simple,
- VTYNL);
+ IF_DEF_PARAMS (vl_data->vl_oi->ifp)->auth_simple);
/* md5 keys */
for (ALL_LIST_ELEMENTS_RO (IF_DEF_PARAMS (vl_data->vl_oi->ifp)->auth_crypt,
n2, ck))
config_write_ospf_default_metric (struct vty *vty, struct ospf *ospf)
{
if (ospf->default_metric != -1)
- vty_out (vty, " default-metric %d%s", ospf->default_metric,
- VTYNL);
+ vty_out (vty, " default-metric %d\n", ospf->default_metric);
return 0;
}
/* distribute-list print. */
for (type = 0; type < ZEBRA_ROUTE_MAX; type++)
if (DISTRIBUTE_NAME (ospf, type))
- vty_out (vty, " distribute-list %s out %s%s",
+ vty_out (vty, " distribute-list %s out %s\n",
DISTRIBUTE_NAME (ospf, type),
- zebra_route_string(type), VTYNL);
+ zebra_route_string(type));
/* default-information print. */
if (ospf->default_originate != DEFAULT_ORIGINATE_NONE)
struct ospf_distance *odistance;
if (ospf->distance_all)
- vty_out (vty, " distance %d%s", ospf->distance_all, VTYNL);
+ vty_out (vty, " distance %d\n", ospf->distance_all);
if (ospf->distance_intra
|| ospf->distance_inter
for (rn = route_top (ospf->distance_table); rn; rn = route_next (rn))
if ((odistance = rn->info) != NULL)
{
- vty_out (vty, " distance %d %s/%d %s%s", odistance->distance,
+ vty_out (vty, " distance %d %s/%d %s\n", odistance->distance,
inet_ntoa (rn->p.u.prefix4), rn->p.prefixlen,
- odistance->access_list ? odistance->access_list : "",
- VTYNL);
+ odistance->access_list ? odistance->access_list : "");
}
return 0;
}
{
/* `router ospf' print. */
if (ospf->instance)
- vty_out (vty, "router ospf %d%s", ospf->instance, VTYNL);
+ vty_out (vty, "router ospf %d\n", ospf->instance);
else
vty_out (vty, "router ospf\n");
/* Router ID print. */
if (ospf->router_id_static.s_addr != 0)
- vty_out (vty, " ospf router-id %s%s",
- inet_ntoa (ospf->router_id_static), VTYNL);
+ vty_out (vty, " ospf router-id %s\n",
+ inet_ntoa (ospf->router_id_static));
/* ABR type print. */
if (ospf->abr_type != OSPF_ABR_DEFAULT)
- vty_out (vty, " ospf abr-type %s%s",
- ospf_abr_type_str[ospf->abr_type], VTYNL);
+ vty_out (vty, " ospf abr-type %s\n",
+ ospf_abr_type_str[ospf->abr_type]);
/* log-adjacency-changes flag print. */
if (CHECK_FLAG(ospf->config, OSPF_LOG_ADJACENCY_CHANGES))
{
vty_out (vty, "! Important: ensure reference bandwidth "
"is consistent across all routers%s", VTYNL);
- vty_out (vty, " auto-cost reference-bandwidth %d%s",
- ospf->ref_bandwidth, VTYNL);
+ vty_out (vty, " auto-cost reference-bandwidth %d\n",
+ ospf->ref_bandwidth);
}
/* SPF timers print. */
if (ospf->spf_delay != OSPF_SPF_DELAY_DEFAULT ||
ospf->spf_holdtime != OSPF_SPF_HOLDTIME_DEFAULT ||
ospf->spf_max_holdtime != OSPF_SPF_MAX_HOLDTIME_DEFAULT)
- vty_out (vty, " timers throttle spf %d %d %d%s",
+ vty_out (vty, " timers throttle spf %d %d %d\n",
ospf->spf_delay, ospf->spf_holdtime,
- ospf->spf_max_holdtime, VTYNL);
+ ospf->spf_max_holdtime);
/* LSA timers print. */
if (ospf->min_ls_interval != OSPF_MIN_LS_INTERVAL)
- vty_out (vty, " timers throttle lsa all %d%s",
- ospf->min_ls_interval, VTYNL);
+ vty_out (vty, " timers throttle lsa all %d\n",
+ ospf->min_ls_interval);
if (ospf->min_ls_arrival != OSPF_MIN_LS_ARRIVAL)
- vty_out (vty, " timers lsa min-arrival %d%s",
- ospf->min_ls_arrival, VTYNL);
+ vty_out (vty, " timers lsa min-arrival %d\n",
+ ospf->min_ls_arrival);
/* Write multiplier print. */
if (ospf->write_oi_count != OSPF_WRITE_INTERFACE_COUNT_DEFAULT)
- vty_out (vty, " ospf write-multiplier %d%s",
- ospf->write_oi_count, VTYNL);
+ vty_out (vty, " ospf write-multiplier %d\n",
+ ospf->write_oi_count);
/* Max-metric router-lsa print */
config_write_stub_router (vty, ospf);
/* SPF refresh parameters print. */
if (ospf->lsa_refresh_interval != OSPF_LSA_REFRESH_INTERVAL_DEFAULT)
- vty_out (vty, " refresh timer %d%s",
- ospf->lsa_refresh_interval, VTYNL);
+ vty_out (vty, " refresh timer %d\n",
+ ospf->lsa_refresh_interval);
/* Redistribute information print. */
config_write_ospf_redistribute (vty, ospf);
&& IF_DEF_PARAMS (ifp)->passive_interface !=
ospf->passive_interface_default)
{
- vty_out (vty, " %spassive-interface %s%s",
+ vty_out (vty, " %spassive-interface %s\n",
IF_DEF_PARAMS (ifp)->passive_interface ? "" : "no ",
- ifp->name, VTYNL);
+ ifp->name);
}
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
{
else if (oi->params->passive_interface == ospf->passive_interface_default)
continue;
- vty_out (vty, " %spassive-interface %s %s%s",
+ vty_out (vty, " %spassive-interface %s %s\n",
oi->params->passive_interface ? "" : "no ",
oi->ifp->name,
- inet_ntoa (oi->address->u.prefix4), VTYNL);
+ inet_ntoa (oi->address->u.prefix4));
}
/* Network area print. */
} \
if (OSPF_IS_AREA_ID_BACKBONE ((V))) \
{ \
- vty_out (vty, "%% You can't configure %s to backbone%s", \
- NAME, VTYNL); \
+ vty_out (vty, "%% You can't configure %s to backbone\n", \
+ NAME); \
} \
}
vty_out (vty, "Routing Protocol is \"ripng\"\n");
- vty_out (vty, "Sending updates every %ld seconds, next due in %d seconds%s",
- ripng->update_time, 0,
- VTYNL);
+ vty_out (vty, "Sending updates every %ld seconds, next due in %d seconds\n",
+ ripng->update_time, 0);
- vty_out (vty, "Timerout after %ld seconds, garbage correct %ld%s",
+ vty_out (vty, "Timerout after %ld seconds, garbage correct %ld\n",
ripng->timeout_time,
- ripng->garbage_time,
- VTYNL);
+ ripng->garbage_time);
vty_out (vty, "Outgoing update filter list for all interfaces is not set");
vty_out (vty, "Incoming update filter list for all interfaces is not set");
}
#if 0
if (ripng->update_time != RIPNG_UPDATE_TIMER_DEFAULT)
- vty_out (vty, " update-timer %d%s", ripng->update_time,
- VTYNL);
+ vty_out (vty, " update-timer %d\n", ripng->update_time);
if (ripng->timeout_time != RIPNG_TIMEOUT_TIMER_DEFAULT)
- vty_out (vty, " timeout-timer %d%s", ripng->timeout_time,
- VTYNL);
+ vty_out (vty, " timeout-timer %d\n", ripng->timeout_time);
if (ripng->garbage_time != RIPNG_GARBAGE_TIMER_DEFAULT)
- vty_out (vty, " garbage-timer %d%s", ripng->garbage_time,
- VTYNL);
+ vty_out (vty, " garbage-timer %d\n", ripng->garbage_time);
#endif /* 0 */
write += config_write_distribute (vty);
{
if (IS_ZEBRA_DEBUG_SEND && IS_ZEBRA_DEBUG_RECV)
{
- vty_out (vty, " Zebra packet%s debugging is on%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTYNL);
+ vty_out (vty, " Zebra packet%s debugging is on\n",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "");
}
else
{
if (IS_ZEBRA_DEBUG_SEND)
- vty_out (vty, " Zebra packet send%s debugging is on%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTYNL);
+ vty_out (vty, " Zebra packet send%s debugging is on\n",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "");
else
- vty_out (vty, " Zebra packet receive%s debugging is on%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTYNL);
+ vty_out (vty, " Zebra packet receive%s debugging is on\n",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "");
}
}
{
if (IS_ZEBRA_DEBUG_SEND && IS_ZEBRA_DEBUG_RECV)
{
- vty_out (vty, "debug zebra packet%s%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTYNL);
+ vty_out (vty, "debug zebra packet%s\n",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "");
write++;
}
else
{
if (IS_ZEBRA_DEBUG_SEND)
- vty_out (vty, "debug zebra packet send%s%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTYNL);
+ vty_out (vty, "debug zebra packet send%s\n",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "");
else
- vty_out (vty, "debug zebra packet recv%s%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTYNL);
+ vty_out (vty, "debug zebra packet recv%s\n",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "");
write++;
}
}
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
if (!list_isempty (vrf->iflist))
{
- vty_out (vty, "\n\tVRF %u%s\n", vrf->vrf_id,
- VTYNL);
+ vty_out (vty, "\n\tVRF %u\n\n", vrf->vrf_id);
if_show_description (vty, vrf->vrf_id);
}
zfpm_stats_t total_stats;
time_t elapsed;
- vty_out (vty, "\n%-40s %10s Last %2d secs%s\n", "Counter",
- "Total", ZFPM_STATS_IVL_SECS, VTYNL);
+ vty_out (vty, "\n%-40s %10s Last %2d secs\n\n", "Counter",
+ "Total", ZFPM_STATS_IVL_SECS);
/*
* Compute the total stats up to this instant.
char buf[BUFSIZ];
rnh = rn->info;
- vty_out(vty, "%s%s%s", inet_ntop(rn->p.family, &rn->p.u.prefix, buf, BUFSIZ),
- CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED) ? "(Connected)" : "",
- VTYNL);
+ vty_out(vty, "%s%s\n", inet_ntop(rn->p.family, &rn->p.u.prefix, buf, BUFSIZ),
+ CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED) ? "(Connected)" : "");
if (rnh->state)
{
- vty_out(vty, " resolved via %s%s",
- zebra_route_string(rnh->state->type), VTYNL);
+ vty_out(vty, " resolved via %s\n",
+ zebra_route_string(rnh->state->type));
for (nexthop = rnh->state->nexthop; nexthop; nexthop = nexthop->next)
print_nh(nexthop, vty);
}
else
- vty_out(vty, " unresolved%s%s",
- CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED) ? "(Connected)" : "",
- VTYNL);
+ vty_out(vty, " unresolved%s\n",
+ CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED) ? "(Connected)" : "");
vty_out(vty, " Client list:");
for (ALL_LIST_ELEMENTS_RO(rnh->client_list, node, client))
: " using Unicast RIB";
}
- vty_out (vty, "Routing entry for %s%s%s",
- srcdest_rnode2str(rn, buf, sizeof(buf)), mcast_info,
- VTYNL);
+ vty_out (vty, "Routing entry for %s%s\n",
+ srcdest_rnode2str(rn, buf, sizeof(buf)), mcast_info);
vty_out (vty, " Known via \"%s", zebra_route_string (re->type));
if (re->instance)
vty_out (vty, "[%d]", re->instance);