summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-13 19:42:42 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-14 10:20:03 +0200
commit55f70b671f064c315887ec9dd46382eefdc40b78 (patch)
tree0b82e487fc265a03ef83a8b7f87ceb701a3b4c35
parent*: remove VTYNL, part 3 of 6 (diff)
downloadfrr-55f70b671f064c315887ec9dd46382eefdc40b78.tar.xz
frr-55f70b671f064c315887ec9dd46382eefdc40b78.zip
*: remove VTYNL, part 4 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r--bgpd/bgp_route.c4
-rw-r--r--bgpd/bgp_vty.c597
-rw-r--r--eigrpd/eigrp_dump.c2
-rw-r--r--isisd/isisd.c4
-rw-r--r--lib/hash.c4
-rw-r--r--lib/if.c11
-rw-r--r--lib/memory_vty.c5
-rw-r--r--lib/ns.c8
-rw-r--r--lib/vrf.c2
-rw-r--r--lib/vrf.h4
-rw-r--r--lib/vty.c10
-rw-r--r--ospf6d/ospf6_abr.c18
-rw-r--r--ospf6d/ospf6_area.c54
-rw-r--r--ospf6d/ospf6_asbr.c40
-rw-r--r--ospf6d/ospf6_interface.c120
-rw-r--r--ospf6d/ospf6_intra.c57
-rw-r--r--ospf6d/ospf6_lsa.c76
-rw-r--r--ospf6d/ospf6_message.c8
-rw-r--r--ospf6d/ospf6_neighbor.c99
-rw-r--r--ospf6d/ospf6_route.c95
-rw-r--r--ospf6d/ospf6_spf.c2
-rw-r--r--ospf6d/ospf6_top.c53
-rw-r--r--ospf6d/ospf6_zebra.c9
-rw-r--r--ospf6d/ospf6d.c10
-rw-r--r--ospfd/ospf_dump.c3
-rw-r--r--ospfd/ospf_vty.c599
-rw-r--r--ospfd/ospf_vty.h4
-rw-r--r--ripngd/ripngd.c19
-rw-r--r--zebra/debug.c30
-rw-r--r--zebra/interface.c3
-rw-r--r--zebra/zebra_fpm.c4
-rw-r--r--zebra/zebra_rnh.c14
-rw-r--r--zebra/zebra_vty.c5
33 files changed, 906 insertions, 1067 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 80161412d..9a64c62af 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -9184,8 +9184,8 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)
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++)
{
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index e84a7f005..cf4ee2637 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -308,7 +308,7 @@ bgp_vty_find_and_parse_afi_safi_bgp (struct vty *vty, struct cmd_token **argv, 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;
}
@@ -373,7 +373,7 @@ peer_lookup_vty (struct vty *vty, const char *ip_str)
{
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;
}
}
@@ -519,7 +519,7 @@ bgp_vty_return (struct vty *vty, int ret)
}
if (str)
{
- vty_out (vty, "%% %s%s", str, VTYNL);
+ vty_out (vty, "%% %s\n", str);
return CMD_WARNING;
}
return CMD_SUCCESS;
@@ -543,11 +543,11 @@ bgp_clear_vty_error (struct vty *vty, struct peer *peer, afi_t afi,
{
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;
@@ -606,7 +606,7 @@ bgp_clear (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
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;
}
}
@@ -640,7 +640,7 @@ bgp_clear (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
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;
}
@@ -703,8 +703,7 @@ bgp_clear (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
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;
}
@@ -724,7 +723,7 @@ bgp_clear_vty (struct vty *vty, const char *name, afi_t afi, safi_t safi,
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;
}
}
@@ -905,12 +904,12 @@ DEFUN_NOSH (router_bgp,
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;
}
@@ -1183,10 +1182,10 @@ bgp_maxpaths_config_vty (struct vty *vty, int peer_type, const char *mpaths,
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;
}
@@ -1409,8 +1408,8 @@ int
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;
}
@@ -1443,8 +1442,8 @@ int
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;
}
@@ -1578,8 +1577,8 @@ bgp_config_write_maxpaths (struct vty *vty, struct bgp *bgp, afi_t afi,
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)
@@ -2467,8 +2466,8 @@ DEFUN (bgp_listen_range,
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;
}
}
@@ -2554,8 +2553,8 @@ bgp_config_write_listen (struct vty *vty, struct bgp *bgp)
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))
{
@@ -2564,8 +2563,8 @@ bgp_config_write_listen (struct vty *vty, struct bgp *bgp)
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);
}
}
}
@@ -2659,10 +2658,10 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str,
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);
@@ -3310,7 +3309,7 @@ DEFUN (neighbor_set_peer_group,
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;
}
}
@@ -3342,7 +3341,7 @@ DEFUN (neighbor_set_peer_group,
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;
}
@@ -6031,8 +6030,8 @@ DEFUN (neighbor_ttl_security,
* 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;
}
@@ -6264,7 +6263,7 @@ bgp_clear_prefix (struct vty *vty, const char *view_name, const char *ip_str,
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;
}
}
@@ -6518,9 +6517,9 @@ DEFUN (show_bgp_views,
/* 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;
@@ -6571,7 +6570,7 @@ DEFUN (show_bgp_vrfs,
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)
@@ -6610,10 +6609,9 @@ DEFUN (show_bgp_vrfs,
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)
@@ -6622,13 +6620,13 @@ DEFUN (show_bgp_vrfs,
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;
@@ -6647,139 +6645,117 @@ DEFUN (show_bgp_memory,
/* 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;
}
@@ -6905,30 +6881,30 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
}
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);
}
}
}
@@ -6971,24 +6947,21 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
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");
@@ -7104,30 +7077,30 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
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);
}
}
@@ -7197,7 +7170,7 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi,
}
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);
@@ -7249,9 +7222,9 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi,
}
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);
}
@@ -7665,19 +7638,18 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
{
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
{
@@ -7696,8 +7668,8 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
|| 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,
@@ -7709,8 +7681,8 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
|| 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,
@@ -7812,67 +7784,59 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
/* 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])
@@ -7996,7 +7960,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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)
@@ -8012,10 +7976,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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);
}
}
@@ -8043,8 +8006,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
}
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])
{
@@ -8056,7 +8019,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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);
}
}
}
@@ -8141,9 +8104,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
/* 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)
@@ -8167,17 +8129,17 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
/* 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. */
@@ -8493,8 +8455,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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));
}
}
@@ -8559,8 +8521,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
{
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++)
@@ -8672,12 +8634,12 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
}
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)
@@ -8708,18 +8670,18 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
/* 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)
@@ -8739,8 +8701,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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)
@@ -8774,8 +8736,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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)
{
@@ -8835,9 +8796,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
{
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
@@ -8855,8 +8816,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
}
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)
@@ -8899,17 +8860,16 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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);
}
}
@@ -8926,11 +8886,11 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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
@@ -8940,8 +8900,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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);
}
}
@@ -8954,10 +8914,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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. */
@@ -8969,10 +8928,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
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. */
@@ -8993,18 +8951,14 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
}
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");
}
}
@@ -9037,28 +8991,26 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
}
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
@@ -9130,7 +9082,7 @@ bgp_show_neighbor (struct vty *vty, struct bgp *bgp, enum show_type type,
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
@@ -9182,10 +9134,9 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_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_neighbor (vty, bgp, show_all, NULL, NULL, use_json, json);
}
@@ -9219,7 +9170,7 @@ bgp_show_neighbor_vty (struct vty *vty, const char *name,
{
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
@@ -9326,8 +9277,8 @@ community_show_all_iterator (struct hash_backet *backet, struct vty *vty)
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. */
@@ -9355,8 +9306,8 @@ lcommunity_show_all_iterator (struct hash_backet *backet, struct vty *vty)
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. */
@@ -9399,9 +9350,8 @@ bgp_show_all_instances_updgrps_vty (struct vty *vty, afi_t afi, safi_t safi)
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);
}
}
@@ -9784,11 +9734,11 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)
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))
@@ -9825,15 +9775,15 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)
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);
}
}
}
@@ -9852,9 +9802,9 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)
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);
}
}
@@ -11961,25 +11911,24 @@ community_list_show (struct vty *vty, struct community_list *list)
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);
}
}
@@ -12306,25 +12255,24 @@ lcommunity_list_show (struct vty *vty, struct community_list *list)
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);
}
}
@@ -12542,25 +12490,24 @@ extcommunity_list_show (struct vty *vty, struct community_list *list)
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);
}
}
@@ -12644,21 +12591,19 @@ community_list_config_write (struct vty *vty)
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++;
}
@@ -12668,19 +12613,19 @@ community_list_config_write (struct vty *vty)
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++;
}
@@ -12691,19 +12636,19 @@ community_list_config_write (struct vty *vty)
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++;
}
diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c
index 70716d166..75c49fb4b 100644
--- a/eigrpd/eigrp_dump.c
+++ b/eigrpd/eigrp_dump.c
@@ -296,7 +296,7 @@ show_ip_eigrp_topology_header (struct vty *vty, struct eigrp *eigrp)
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);
diff --git a/isisd/isisd.c b/isisd/isisd.c
index f64f98a7d..473b6594e 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -1560,8 +1560,8 @@ show_isis_database (struct vty *vty, const char *argv, int ui_level)
ui_level,
area->dynhostname);
- vty_out (vty, " %u LSPs%s\n",
- lsp_count, VTYNL);
+ vty_out (vty, " %u LSPs\n\n",
+ lsp_count);
}
}
}
diff --git a/lib/hash.c b/lib/hash.c
index fb6d96ca7..71f200d85 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -462,13 +462,13 @@ DEFUN(show_hash_stats,
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
diff --git a/lib/if.c b/lib/if.c
index 18da3f2f3..718ec7f01 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -739,7 +739,7 @@ DEFUN_NOSH (no_interface,
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;
}
@@ -792,8 +792,7 @@ DEFUN (show_address,
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;
@@ -818,8 +817,7 @@ DEFUN (show_address_vrf_all,
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))
{
@@ -828,8 +826,7 @@ DEFUN (show_address_vrf_all,
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);
}
}
}
diff --git a/lib/memory_vty.c b/lib/memory_vty.c
index 04909d633..f65952e8a 100644
--- a/lib/memory_vty.c
+++ b/lib/memory_vty.c
@@ -108,9 +108,8 @@ DEFUN (show_modules,
{
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;
diff --git a/lib/ns.c b/lib/ns.c
index dbf07b197..4e7192c14 100644
--- a/lib/ns.c
+++ b/lib/ns.c
@@ -324,8 +324,8 @@ DEFUN_NOSH (ns_netns,
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;
}
@@ -334,8 +334,8 @@ DEFUN_NOSH (ns_netns,
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;
}
diff --git a/lib/vrf.c b/lib/vrf.c
index 7fe5d9a87..585341a40 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -501,7 +501,7 @@ DEFUN_NOSH (no_vrf,
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;
}
diff --git a/lib/vrf.h b/lib/vrf.h
index 8baa15c96..dcbc9b5e6 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -115,12 +115,12 @@ extern vrf_id_t vrf_name_to_id (const char *);
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; \
diff --git a/lib/vty.c b/lib/vty.c
index fea1842bf..384170412 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1130,9 +1130,9 @@ vty_describe_command (struct vty *vty)
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 */
}
@@ -2700,9 +2700,9 @@ DEFUN_NOSH (config_who,
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;
}
@@ -2944,7 +2944,7 @@ DEFUN_NOSH (show_history,
}
if (vty->hist[index] != NULL)
- vty_out (vty, " %s%s", vty->hist[index], VTYNL);
+ vty_out (vty, " %s\n", vty->hist[index]);
index++;
}
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index b1f2401d5..314fe4873 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -1066,16 +1066,16 @@ ospf6_inter_area_prefix_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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;
}
@@ -1109,12 +1109,12 @@ ospf6_inter_area_router_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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;
}
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index 7ee5c9b6e..102eb5e0e 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -371,20 +371,20 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa)
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))
@@ -417,7 +417,7 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa)
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 : \
@@ -454,7 +454,7 @@ DEFUN (area_range,
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;
}
@@ -528,14 +528,14 @@ DEFUN (no_area_range,
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;
}
@@ -589,22 +589,22 @@ ospf6_area_config_write (struct vty *vty)
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));
}
}
@@ -831,8 +831,8 @@ DEFUN (show_ipv6_ospf6_spf_tree,
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;
@@ -866,21 +866,21 @@ DEFUN (show_ipv6_ospf6_area_spf_tree,
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;
@@ -919,13 +919,13 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root,
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;
}
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 57b1e9481..37c780795 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -759,11 +759,11 @@ ospf6_redistribute_config_write (struct vty *vty)
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;
@@ -803,10 +803,10 @@ ospf6_redistribute_show_config (struct vty *vty)
(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);
}
@@ -1247,28 +1247,24 @@ ospf6_as_external_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
(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 */
@@ -1297,12 +1293,12 @@ ospf6_asbr_external_route_show (struct vty *vty, struct ospf6_route *route)
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,
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index c5026e2f7..adfc14879 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -917,10 +917,9 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp)
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)
{
@@ -939,49 +938,43 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp)
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);
@@ -989,25 +982,23 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp)
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;
}
@@ -1031,8 +1022,7 @@ DEFUN (show_ipv6_ospf6_interface,
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);
@@ -1068,14 +1058,14 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix,
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;
}
@@ -1145,8 +1135,8 @@ DEFUN (ipv6_ospf6_ifmtu,
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;
}
@@ -1155,8 +1145,8 @@ DEFUN (ipv6_ospf6_ifmtu,
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
@@ -1203,8 +1193,8 @@ DEFUN (no_ipv6_ospf6_ifmtu,
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
@@ -1250,7 +1240,7 @@ DEFUN (ipv6_ospf6_cost,
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;
}
@@ -1769,45 +1759,45 @@ config_write_ospf6_interface (struct vty *vty)
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");
@@ -1922,7 +1912,7 @@ DEFUN (clear_ipv6_ospf6_interface,
{
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);
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 2f4e06e1e..41271d802 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -105,7 +105,7 @@ ospf6_router_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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);
@@ -125,17 +125,17 @@ ospf6_router_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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;
}
@@ -408,7 +408,7 @@ ospf6_network_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
((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);
@@ -417,7 +417,7 @@ ospf6_network_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
{
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;
}
@@ -623,10 +623,10 @@ ospf6_link_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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);
@@ -645,15 +645,15 @@ ospf6_link_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
"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;
@@ -825,14 +825,13 @@ ospf6_intra_prefix_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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);
@@ -851,15 +850,15 @@ ospf6_intra_prefix_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
"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;
@@ -1798,13 +1797,13 @@ config_write_ospf6_debug_brouter (struct vty *vty)
{
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;
}
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index 3f6263563..7817448b7 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -381,9 +381,9 @@ ospf6_lsa_header_print (struct ospf6_lsa *lsa)
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
@@ -408,11 +408,11 @@ ospf6_lsa_show_summary (struct vty *vty, struct ospf6_lsa *lsa)
(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)
{
@@ -423,16 +423,16 @@ ospf6_lsa_show_summary (struct vty *vty, struct ospf6_lsa *lsa)
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));
}
}
@@ -446,7 +446,7 @@ ospf6_lsa_show_dump (struct vty *vty, struct ospf6_lsa *lsa)
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 ++)
{
@@ -475,20 +475,20 @@ ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa)
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;
}
@@ -511,16 +511,16 @@ ospf6_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
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)
@@ -937,17 +937,17 @@ config_write_ospf6_debug_lsa (struct vty *vty)
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;
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index b087802b3..5924afc38 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -2487,13 +2487,11 @@ config_write_ospf6_debug_message (struct vty *vty)
{
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;
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 99f5830bf..fec992927 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -673,16 +673,16 @@ ospf6_neighbor_show (struct vty *vty, struct ospf6_neighbor *on)
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
@@ -694,9 +694,9 @@ ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on)
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));
@@ -707,11 +707,10 @@ ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on)
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
@@ -731,94 +730,81 @@ ospf6_neighbor_show_detail (struct vty *vty, struct ospf6_neighbor *on)
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);
}
@@ -852,13 +838,13 @@ DEFUN (show_ipv6_ospf6_neighbor,
}
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))
@@ -892,8 +878,7 @@ DEFUN (show_ipv6_ospf6_neighbor_one,
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;
}
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 1befbe248..7b01c69a8 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -1043,16 +1043,16 @@ ospf6_route_show (struct vty *vty, struct ospf6_route *route)
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, "");
}
}
@@ -1078,66 +1078,63 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route)
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");
@@ -1146,7 +1143,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route)
/* 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");
}
@@ -1184,14 +1181,14 @@ ospf6_route_show_table_summary (struct vty *vty,
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]);
}
}
@@ -1364,7 +1361,7 @@ ospf6_route_table_show (struct vty *vty, int argc_start, int argc, struct cmd_to
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;
}
@@ -1400,8 +1397,8 @@ ospf6_route_table_show (struct vty *vty, int argc_start, int argc, struct cmd_to
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
@@ -1419,13 +1416,13 @@ ospf6_linkstate_show (struct vty *vty, struct ospf6_route *route)
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);
}
@@ -1502,7 +1499,7 @@ ospf6_linkstate_table_show (struct vty *vty, int idx_ipv4, int argc,
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;
}
@@ -1514,11 +1511,11 @@ ospf6_linkstate_table_show (struct vty *vty, int idx_ipv4, int argc,
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;
}
@@ -1538,8 +1535,8 @@ ospf6_linkstate_table_show (struct vty *vty, int idx_ipv4, int argc,
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
@@ -1554,11 +1551,11 @@ ospf6_brouter_show (struct vty *vty, struct ospf6_route *route)
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,
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index c9f1740a9..a1a5fbd70 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -742,7 +742,7 @@ ospf6_spf_display_subtree (struct vty *vty, const char *prefix, int rest,
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);
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 9040e4ab9..6acaf35e9 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -343,7 +343,7 @@ DEFUN (ospf6_router_id,
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;
}
@@ -588,15 +588,15 @@ DEFUN (ospf6_interface_area,
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;
}
@@ -645,35 +645,35 @@ DEFUN (no_ospf6_interface_area,
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;
}
@@ -799,14 +799,14 @@ ospf6_show (struct vty *vty, struct ospf6 *o)
/* 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 */
@@ -829,27 +829,27 @@ ospf6_show (struct vty *vty, struct ospf6 *o)
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))
{
@@ -1021,7 +1021,7 @@ config_write_ospf6 (struct vty *vty)
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))
@@ -1037,8 +1037,7 @@ config_write_ospf6 (struct vty *vty)
}
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)
@@ -1053,8 +1052,8 @@ config_write_ospf6 (struct vty *vty)
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;
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 3ca9182f0..b609b4bb2 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -320,11 +320,10 @@ DEFUN (show_zebra,
}
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++)
{
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index bee7828a9..13fb0ae3c 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -83,8 +83,8 @@ DEFUN (show_version_ospf6,
"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;
}
@@ -1115,7 +1115,7 @@ DEFUN (show_ipv6_ospf6_border_routers,
ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
if (!ro)
{
- vty_out (vty, "No Route found for Router ID: %s%s", argv[4]->arg, VTYNL);
+ vty_out (vty, "No Route found for Router ID: %s\n", argv[4]->arg);
return CMD_SUCCESS;
}
@@ -1157,7 +1157,7 @@ DEFUN (show_ipv6_ospf6_linkstate,
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);
}
@@ -1184,7 +1184,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail,
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);
}
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index 8707960ae..f233f79c0 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -1568,8 +1568,7 @@ show_debugging_ospf_common (struct vty *vty, struct ospf *ospf)
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");
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index e0cbc842e..98d36bb50 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -815,15 +815,13 @@ ospf_find_vl_data (struct ospf *ospf, struct ospf_vl_config_data *vl_config)
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;
}
@@ -868,8 +866,8 @@ ospf_vl_set_security (struct ospf_vl_data *vl_data,
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 ();
@@ -886,8 +884,8 @@ ospf_vl_set_security (struct ospf_vl_data *vl_data,
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;
}
@@ -1052,7 +1050,7 @@ DEFUN (ospf_area_vlink,
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])
{
@@ -1184,7 +1182,7 @@ DEFUN (no_ospf_area_vlink,
/* 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])
{
@@ -2705,8 +2703,8 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
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");
}
}
@@ -2792,9 +2790,9 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
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)));
}
}
@@ -2848,26 +2846,26 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
" 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)
@@ -2879,12 +2877,12 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
}
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)
@@ -2917,8 +2915,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char 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);
}
}
@@ -2929,9 +2926,8 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
}
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 */
@@ -2945,9 +2941,9 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
}
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)));
}
}
@@ -2965,9 +2961,9 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
{
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)
@@ -2979,9 +2975,8 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char 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 */
@@ -3000,11 +2995,11 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
{
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);
}
}
@@ -3049,12 +3044,10 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
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");
@@ -3078,23 +3071,22 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
}
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. */
@@ -3103,8 +3095,8 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
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))
{
@@ -3125,9 +3117,9 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
}
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)
@@ -3139,17 +3131,17 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char 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))
{
@@ -3175,7 +3167,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
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
@@ -3405,8 +3397,8 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface
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)
@@ -3454,11 +3446,10 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface
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)
@@ -3472,9 +3463,8 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface
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 */
{
@@ -3490,9 +3480,8 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface
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);
}
}
@@ -3516,8 +3505,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc,
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)
@@ -3561,7 +3549,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc,
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
@@ -3621,10 +3609,9 @@ DEFUN (show_ip_ospf_instance_interface,
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
@@ -3685,10 +3672,9 @@ show_ip_ospf_neighbor_sub (struct vty *vty, struct ospf_interface *oi, json_obje
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));
}
}
}
@@ -3713,8 +3699,7 @@ show_ip_ospf_neighbor_common (struct vty *vty, struct ospf *ospf, u_char use_jso
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))
@@ -3722,7 +3707,7 @@ show_ip_ospf_neighbor_common (struct vty *vty, struct ospf *ospf, u_char use_jso
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
@@ -3793,8 +3778,7 @@ show_ip_ospf_neighbor_all_common (struct vty *vty, struct ospf *ospf, u_char use
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))
@@ -3824,9 +3808,9 @@ show_ip_ospf_neighbor_all_common (struct vty *vty, struct ospf *ospf, u_char use
{
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);
}
}
}
@@ -3834,7 +3818,7 @@ show_ip_ospf_neighbor_all_common (struct vty *vty, struct ospf *ospf, u_char use
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
@@ -3903,8 +3887,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba
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);
@@ -3929,7 +3912,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba
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
@@ -3996,8 +3979,8 @@ show_ip_ospf_nbr_nbma_detail_sub (struct vty *vty, struct ospf_interface *oi, st
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)
@@ -4006,8 +3989,8 @@ show_ip_ospf_nbr_nbma_detail_sub (struct vty *vty, struct ospf_interface *oi, st
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)
@@ -4023,13 +4006,13 @@ show_ip_ospf_nbr_nbma_detail_sub (struct vty *vty, struct ospf_interface *oi, st
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)
@@ -4039,9 +4022,8 @@ show_ip_ospf_nbr_nbma_detail_sub (struct vty *vty, struct ospf_interface *oi, st
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)
@@ -4050,8 +4032,8 @@ show_ip_ospf_nbr_nbma_detail_sub (struct vty *vty, struct ospf_interface *oi, st
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);
@@ -4079,8 +4061,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4089,8 +4071,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4106,7 +4088,7 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
{
@@ -4121,9 +4103,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)));
}
}
@@ -4141,10 +4122,9 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
}
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 : "??"));
}
}
@@ -4158,7 +4138,7 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4167,8 +4147,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4183,30 +4163,29 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4215,8 +4194,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4225,8 +4204,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4235,8 +4214,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
@@ -4245,8 +4224,8 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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)
{
@@ -4278,8 +4257,7 @@ show_ip_ospf_neighbor_id_common (struct vty *vty, struct ospf *ospf,
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);
@@ -4300,7 +4278,7 @@ show_ip_ospf_neighbor_id_common (struct vty *vty, struct ospf *ospf,
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
@@ -4366,8 +4344,7 @@ show_ip_ospf_neighbor_detail_common (struct vty *vty, struct ospf *ospf, u_char
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))
@@ -4392,7 +4369,7 @@ show_ip_ospf_neighbor_detail_common (struct vty *vty, struct ospf *ospf, u_char
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
@@ -4458,8 +4435,7 @@ show_ip_ospf_neighbor_detail_all_common (struct vty *vty, struct ospf *ospf, u_c
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))
@@ -4488,7 +4464,7 @@ show_ip_ospf_neighbor_detail_all_common (struct vty *vty, struct ospf *ospf, u_c
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
@@ -4561,8 +4537,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf,
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);
@@ -4593,7 +4568,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf,
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
@@ -4774,7 +4749,7 @@ show_ip_ospf_database_header (struct vty *vty, struct ospf_lsa *lsa)
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[] =
@@ -4817,15 +4792,15 @@ show_ip_ospf_database_router_links (struct vty *vty,
{
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");
}
}
@@ -4840,8 +4815,7 @@ show_router_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
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");
@@ -4862,14 +4836,14 @@ show_network_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
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");
}
@@ -4887,10 +4861,8 @@ show_summary_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
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");
}
@@ -4907,10 +4879,9 @@ show_summary_asbr_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
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");
}
@@ -4927,16 +4898,16 @@ show_as_external_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
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);
@@ -4979,16 +4950,16 @@ show_as_nssa_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
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);
@@ -5089,16 +5060,15 @@ show_lsa_detail (struct vty *vty, struct ospf *ospf, int type,
{
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;
@@ -5135,17 +5105,16 @@ show_lsa_detail_adv_router (struct vty *vty, struct ospf *ospf, int type,
{
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);
}
@@ -5177,11 +5146,10 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
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);
@@ -5204,11 +5172,9 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int 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);
@@ -5233,12 +5199,12 @@ show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf)
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");
}
}
@@ -5272,11 +5238,10 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf,
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)
@@ -5431,11 +5396,10 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf
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)
@@ -5904,7 +5868,7 @@ DEFUN (ip_ospf_message_digest_key,
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;
}
@@ -5972,7 +5936,7 @@ DEFUN (no_ip_ospf_message_digest_key,
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;
}
@@ -7806,11 +7770,11 @@ config_write_stub_router (struct vty *vty, struct ospf *ospf)
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))
@@ -7843,14 +7807,14 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt)
{
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;
@@ -7862,12 +7826,12 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt)
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));
}
}
}
@@ -7901,24 +7865,21 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs)
(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));
}
}
}
@@ -7959,13 +7920,12 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt)
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));
}
}
}
@@ -7976,8 +7936,7 @@ static int
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)
{
@@ -8036,8 +7995,7 @@ static int
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)
{
@@ -8143,11 +8101,9 @@ config_write_interface (struct vty *vty)
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++;
@@ -8366,9 +8322,9 @@ config_write_network_area (struct vty *vty, struct ospf *ospf)
(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;
@@ -8392,16 +8348,15 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf)
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)
@@ -8432,8 +8387,8 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf)
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))
@@ -8458,20 +8413,20 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf)
}
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;
@@ -8527,24 +8482,22 @@ config_write_virtual_link (struct vty *vty, struct ospf *ospf)
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))
@@ -8603,8 +8556,7 @@ static int
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;
}
@@ -8619,9 +8571,9 @@ config_write_ospf_distribute (struct vty *vty, struct ospf *ospf)
/* 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)
@@ -8659,7 +8611,7 @@ config_write_ospf_distance (struct vty *vty, struct ospf *ospf)
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
@@ -8680,10 +8632,9 @@ config_write_ospf_distance (struct vty *vty, struct ospf *ospf)
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;
}
@@ -8703,7 +8654,7 @@ ospf_config_write (struct vty *vty)
{
/* `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");
@@ -8714,13 +8665,13 @@ ospf_config_write (struct vty *vty)
/* 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))
@@ -8744,38 +8695,38 @@ ospf_config_write (struct vty *vty)
{
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);
@@ -8789,9 +8740,9 @@ ospf_config_write (struct vty *vty)
&& 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))
{
@@ -8806,10 +8757,10 @@ ospf_config_write (struct vty *vty)
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. */
diff --git a/ospfd/ospf_vty.h b/ospfd/ospf_vty.h
index 7b888f439..ba7b24ed9 100644
--- a/ospfd/ospf_vty.h
+++ b/ospfd/ospf_vty.h
@@ -44,8 +44,8 @@
} \
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); \
} \
}
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index b90e28987..eb2d1a693 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2579,14 +2579,12 @@ DEFUN (show_ipv6_protocols,
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");
@@ -2766,14 +2764,11 @@ ripng_config_write (struct vty *vty)
}
#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);
diff --git a/zebra/debug.c b/zebra/debug.c
index 50c1f4dcb..5abd11142 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -48,20 +48,17 @@ DEFUN (show_debugging_zebra,
{
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" : "");
}
}
@@ -360,21 +357,18 @@ config_write_debug (struct vty *vty)
{
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++;
}
}
diff --git a/zebra/interface.c b/zebra/interface.c
index 171dcf69c..d7b2ebfe4 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1458,8 +1458,7 @@ DEFUN (show_interface_desc_vrf_all,
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);
}
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index a6d022dd5..d04aff2d3 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -1451,8 +1451,8 @@ zfpm_show_stats (struct vty *vty)
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.
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 7b0d7bd78..78ca4d5f6 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -1009,20 +1009,18 @@ print_rnh (struct route_node *rn, struct vty *vty)
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))
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 6e4c1b185..6aaf7c86f 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -656,9 +656,8 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast)
: " 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);