*: s/VTY_NEWLINE/VTYNL/g

Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2017-06-21 17:15:40 +00:00
parent 96ade3ed77
commit 1318e7c841
47 changed files with 1032 additions and 1041 deletions

View File

@ -387,15 +387,15 @@ show_babel_main_configuration (struct vty *vty)
"vty port = %d%s"
"id = %s%s"
"kernel_metric = %d",
state_file, VTY_NEWLINE,
state_file, VTYNL,
babel_config_file ? babel_config_file : babel_config_default,
VTY_NEWLINE,
VTY_NEWLINE,
format_address(protocol_group), VTY_NEWLINE,
protocol_port, VTY_NEWLINE,
VTYNL,
VTYNL,
format_address(protocol_group), VTYNL,
protocol_port, VTYNL,
babel_vty_addr ? babel_vty_addr : "None",
VTY_NEWLINE,
babel_vty_port, VTY_NEWLINE,
format_eui64(myid), VTY_NEWLINE,
VTYNL,
babel_vty_port, VTYNL,
format_eui64(myid), VTYNL,
kernel_metric);
}

View File

@ -147,7 +147,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal");
vty_outln (vty,
"Origin codes: i - IGP, e - EGP, ? - incomplete%s",
VTY_NEWLINE);
VTYNL);
vty_outln(vty, V4_HEADER);
}
}
@ -257,7 +257,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
total_count);
else
vty_outln (vty, "%sDisplayed %ld out of %ld total prefixes",
VTY_NEWLINE, output_count, total_count);
VTYNL, output_count, total_count);
return CMD_SUCCESS;
}

View File

@ -638,7 +638,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
vty_outln (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal");
vty_outln (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s",
VTY_NEWLINE);
VTYNL);
vty_outln (vty, V4_HEADER);
}
}
@ -746,7 +746,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
vty_outln (vty, "No prefixes displayed, %ld exist", total_count);
else
vty_outln (vty, "%sDisplayed %ld routes and %ld total paths",
VTY_NEWLINE, output_count, total_count);
VTYNL, output_count, total_count);
}
return CMD_SUCCESS;

View File

@ -479,7 +479,7 @@ bgp_show_all_instances_nexthops_vty (struct vty *vty)
for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
vty_outln (vty, "%sInstance %s:",
VTY_NEWLINE,
VTYNL,
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
bgp_show_nexthops (vty, bgp, 0);
}

View File

@ -6169,7 +6169,7 @@ route_vty_out_route (struct prefix *p, struct vty *vty)
len = 17 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 20, " ");
vty_out (vty, "%s%*s", VTYNL, 20, " ");
else
vty_out (vty, "%*s", len, " ");
}
@ -6393,7 +6393,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 7 - len; /* len of IPv6 addr + max len of def ifname */
if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 45, " ");
vty_out (vty, "%s%*s", VTYNL, 45, " ");
else
vty_out (vty, "%*s", len, " ");
}
@ -6406,7 +6406,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 16 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 36, " ");
vty_out (vty, "%s%*s", VTYNL, 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
@ -6420,7 +6420,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 16 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 36, " ");
vty_out (vty, "%s%*s", VTYNL, 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
@ -6608,7 +6608,7 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, struct attr *attr, safi_t
buf, BUFSIZ));
len = 16 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 36, " ");
vty_out (vty, "%s%*s", VTYNL, 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
@ -6861,7 +6861,7 @@ damp_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
if (len < 1)
{
if (!use_json)
vty_out (vty, "%s%*s", VTY_NEWLINE, 34, " ");
vty_out (vty, "%s%*s", VTYNL, 34, " ");
}
else
{
@ -6931,7 +6931,7 @@ flap_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
if (len < 1)
{
if (!use_json)
vty_out (vty, "%s%*s", VTY_NEWLINE, 33, " ");
vty_out (vty, "%s%*s", VTYNL, 33, " ");
}
else
{
@ -7964,8 +7964,8 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
{
vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
vty_outln (vty, BGP_SHOW_DAMP_HEADER);
@ -8020,7 +8020,7 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
}
else
vty_outln (vty, "%sDisplayed %ld routes and %ld total paths",
VTY_NEWLINE, output_count, total_count);
VTYNL, output_count, total_count);
}
return CMD_SUCCESS;
@ -8082,7 +8082,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,
else
{
vty_outln (vty, "%sInstance %s:",
VTY_NEWLINE,
VTYNL,
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
}
bgp_show (vty, bgp, afi, safi, bgp_show_type_normal, NULL, use_json);
@ -9169,7 +9169,7 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)
thread_execute (bm->master, bgp_table_stats_walker, &ts, 0);
vty_outln (vty, "BGP %s RIB statistics%s",
afi_safi_print (afi, safi), VTY_NEWLINE);
afi_safi_print (afi, safi), VTYNL);
for (i = 0; i < BGP_STATS_MAX; i++)
{
@ -9405,7 +9405,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c
vty_outln (vty, "PfxCt: %ld", peer->pcount[afi][safi]);
vty_outln (vty, "%sCounts from RIB table walk:%s",
VTY_NEWLINE, VTY_NEWLINE);
VTYNL, VTYNL);
for (i = 0; i < PCOUNT_MAX; i++)
vty_outln (vty, "%20s: %-10d", pcount_strs[i], pcounts.count[i]);
@ -9633,11 +9633,11 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
{
vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
vty_outln (vty, "Originating default network 0.0.0.0%s",
VTY_NEWLINE);
VTYNL);
}
header1 = 0;
}
@ -9664,8 +9664,8 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
{
vty_outln (vty, "BGP table version is 0, local router ID is %s",
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
}
header1 = 0;
}
@ -9708,8 +9708,8 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
{
vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
}
header1 = 0;
}
@ -9745,7 +9745,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
json_object_int_add(json, "totalPrefixCounter", output_count);
else
vty_outln (vty, "%sTotal number of prefixes %ld",
VTY_NEWLINE, output_count);
VTYNL, output_count);
}
if (use_json)
{

View File

@ -229,8 +229,8 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,
vty_outln (vty,
"BGP table version is %" PRIu64 ", local router ID is %s",
table->version,inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
header1 = 0;
}
if (header2)
@ -251,7 +251,7 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,
}
if (output_count != 0)
vty_outln (vty, "%sTotal number of prefixes %ld",
VTY_NEWLINE, output_count);
VTYNL, output_count);
}
static int

View File

@ -109,7 +109,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,
vty_outln (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal");
vty_outln (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s",
VTY_NEWLINE);
VTYNL);
vty_outln (vty, V4_HEADER);
}
header = 0;

File diff suppressed because it is too large Load Diff

View File

@ -6461,14 +6461,14 @@ bgp_config_write_filter (struct vty *vty, struct peer *peer,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s distribute-list %s in%s",
addr, filter->dlist[in].name, VTY_NEWLINE);
addr, filter->dlist[in].name, VTYNL);
}
if (filter->dlist[out].name && ! gfilter)
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s distribute-list %s out%s",
addr, filter->dlist[out].name, VTY_NEWLINE);
addr, filter->dlist[out].name, VTYNL);
}
/* prefix-list. */
@ -6478,14 +6478,14 @@ bgp_config_write_filter (struct vty *vty, struct peer *peer,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s prefix-list %s in%s",
addr, filter->plist[in].name, VTY_NEWLINE);
addr, filter->plist[in].name, VTYNL);
}
if (filter->plist[out].name && ! gfilter)
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s prefix-list %s out%s",
addr, filter->plist[out].name, VTY_NEWLINE);
addr, filter->plist[out].name, VTYNL);
}
/* route-map. */
@ -6495,7 +6495,7 @@ bgp_config_write_filter (struct vty *vty, struct peer *peer,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s route-map %s in%s",
addr, filter->map[RMAP_IN].name, VTY_NEWLINE);
addr, filter->map[RMAP_IN].name, VTYNL);
}
if (filter->map[RMAP_OUT].name)
@ -6504,7 +6504,7 @@ bgp_config_write_filter (struct vty *vty, struct peer *peer,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s route-map %s out%s",
addr, filter->map[RMAP_OUT].name, VTY_NEWLINE);
addr, filter->map[RMAP_OUT].name, VTYNL);
}
/* unsuppress-map */
@ -6512,7 +6512,7 @@ bgp_config_write_filter (struct vty *vty, struct peer *peer,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s unsuppress-map %s%s",
addr, filter->usmap.name, VTY_NEWLINE);
addr, filter->usmap.name, VTYNL);
}
/* filter-list. */
@ -6522,14 +6522,14 @@ bgp_config_write_filter (struct vty *vty, struct peer *peer,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s filter-list %s in%s",
addr, filter->aslist[in].name, VTY_NEWLINE);
addr, filter->aslist[in].name, VTYNL);
}
if (filter->aslist[out].name && ! gfilter)
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s filter-list %s out%s",
addr, filter->aslist[out].name, VTY_NEWLINE);
addr, filter->aslist[out].name, VTYNL);
}
}
@ -6901,7 +6901,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s activate%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* If the peer-group is not active but peer is, print an 'activate' */
@ -6909,7 +6909,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s activate%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
}
else
@ -6922,13 +6922,13 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out(vty, afi, safi, write,
" neighbor %s activate%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
}
else
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s activate%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else
{
@ -6938,7 +6938,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s activate%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
}
}
@ -6949,14 +6949,14 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s addpath-tx-all-paths%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s addpath-tx-bestpath-per-AS%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* ORF capability. */
@ -6982,7 +6982,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s route-reflector-client%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* next-hop-self force */
@ -6990,7 +6990,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s next-hop-self force%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* next-hop-self */
@ -6998,7 +6998,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s next-hop-self%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* remove-private-AS */
@ -7006,28 +7006,28 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s remove-private-AS all replace-AS%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s remove-private-AS replace-AS%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_REMOVE_PRIVATE_AS_ALL))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s remove-private-AS all%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_REMOVE_PRIVATE_AS))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s remove-private-AS%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* as-override */
@ -7035,7 +7035,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s as-override%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* send-community print. */
@ -7047,25 +7047,25 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s send-community all%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_LARGE_COMMUNITY))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s send-community large%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_EXT_COMMUNITY))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s send-community extended%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else if (peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_COMMUNITY))
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s send-community%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
}
else
@ -7079,7 +7079,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s send-community all%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else
{
@ -7088,7 +7088,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s send-community large%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_EXT_COMMUNITY) &&
@ -7096,7 +7096,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s send-community extended%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_COMMUNITY) &&
@ -7104,7 +7104,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s send-community%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
}
}
@ -7129,7 +7129,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s soft-reconfiguration inbound%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* maximum-prefix. */
@ -7157,7 +7157,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s route-server-client%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* Nexthop-local unchanged. */
@ -7165,7 +7165,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s nexthop-local unchanged%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
/* allowas-in <1-10> */
@ -7179,13 +7179,13 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s allowas-in%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s allowas-in %d%s",
addr, peer->allowas_in[afi][safi], VTY_NEWLINE);
addr, peer->allowas_in[afi][safi], VTYNL);
}
}
}
@ -7198,7 +7198,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s allowas-in origin%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
}
@ -7212,7 +7212,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s weight %lu%s",
addr, peer->weight[afi][safi], VTY_NEWLINE);
addr, peer->weight[afi][safi], VTYNL);
}
}
@ -7230,7 +7230,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
{
afi_header_vty_out (vty, afi, safi, write,
" neighbor %s attribute-unchanged%s",
addr, VTY_NEWLINE);
addr, VTYNL);
}
else
{
@ -7241,7 +7241,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_NEXTHOP_UNCHANGED) ?
" next-hop" : "",
peergroup_af_flag_check (peer, afi, safi, PEER_FLAG_MED_UNCHANGED) ?
" med" : "", VTY_NEWLINE);
" med" : "", VTYNL);
}
}
}
@ -7254,7 +7254,7 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi,
if (*write)
return;
vty_outln (vty, " !%s address-family ", VTY_NEWLINE);
vty_outln (vty, " !%s address-family ", VTYNL);
if (afi == AFI_IP)
{

View File

@ -2433,7 +2433,7 @@ DEFUN_NOSH (vnc_nve_group,
if (!rfg)
{
/* Error out of memory */
vty_out (vty, "Can't allocate memory for NVE group%s", VTY_NEWLINE);
vty_out (vty, "Can't allocate memory for NVE group%s", VTYNL);
return CMD_WARNING;
}
@ -3258,7 +3258,7 @@ DEFUN_NOSH (vnc_vrf_policy,
if (!bgp)
{
vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE);
vty_out (vty, "No BGP process is configured%s", VTYNL);
return CMD_WARNING;
}
@ -3271,7 +3271,7 @@ DEFUN_NOSH (vnc_vrf_policy,
if (!rfg)
{
/* Error out of memory */
vty_out (vty, "Can't allocate memory for NVE group%s", VTY_NEWLINE);
vty_out (vty, "Can't allocate memory for NVE group%s", VTYNL);
return CMD_WARNING;
}
}
@ -3401,7 +3401,7 @@ DEFUN (vnc_vrf_policy_nexthop,
if (!str2prefix (argv[1]->arg, &p) && p.family)
{
//vty_out (vty, "Nexthop set to self%s", VTY_NEWLINE);
//vty_out (vty, "Nexthop set to self%s", VTYNL);
SET_FLAG (rfg->flags, RFAPI_RFG_VPN_NH_SELF);
memset(&rfg->vn_prefix, 0, sizeof(struct prefix));
}
@ -3745,7 +3745,7 @@ DEFUN_NOSH (vnc_l2_group,
if (!bgp)
{
vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE);
vty_out (vty, "No BGP process is configured%s", VTYNL);
return CMD_WARNING;
}
@ -3758,7 +3758,7 @@ DEFUN_NOSH (vnc_l2_group,
if (!rfg)
{
/* Error out of memory */
vty_out (vty, "Can't allocate memory for L2 group%s", VTY_NEWLINE);
vty_out (vty, "Can't allocate memory for L2 group%s", VTYNL);
return CMD_WARNING;
}
rfg->name = strdup (argv[1]->arg);
@ -4300,7 +4300,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)
inet_ntop(rfg->vn_prefix.family, &rfg->vn_prefix.u.prefix, buf, sizeof(buf));
if (!buf[0] || buf[BUFSIZ - 1])
{
//vty_out (vty, "nexthop self%s", VTY_NEWLINE);
//vty_out (vty, "nexthop self%s", VTYNL);
}
else
{

View File

@ -3144,7 +3144,7 @@ test_nexthops_callback (
fp (out, "Nexthops Callback, Target=(");
//rfapiPrintRfapiIpAddr(stream, target);
fp (out, ")%s", VTY_NEWLINE);
fp (out, ")%s", VTYNL);
rfapiPrintNhl (stream, next_hops);
@ -3838,7 +3838,7 @@ DEFUN (debug_rfapi_show_import,
if (first_l2)
{
vty_outln (vty, "%sLNI-based Ethernet Tables:",
VTY_NEWLINE);
VTYNL);
first_l2 = 0;
}
snprintf (buf, BUFSIZ, "L2VPN LNI=%u", lni);

View File

@ -2294,7 +2294,7 @@ rfapiRibShowResponsesSummary (void *stream)
fp (out, "%-24s ", "Responses: (Prefixes)");
fp (out, "%-8s %-8u ", "Active:", bgp->rfapi->rib_prefix_count_total);
fp (out, "%-8s %-8u", "Maximum:", bgp->rfapi->rib_prefix_count_total_max);
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
fp (out, "%-24s ", " (Updated)");
fp (out, "%-8s %-8u ", "Update:",
@ -2304,7 +2304,7 @@ rfapiRibShowResponsesSummary (void *stream)
fp (out, "%-8s %-8u", "Total:",
bgp->rfapi->stat.count_updated_response_updates +
bgp->rfapi->stat.count_updated_response_deletes);
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
fp (out, "%-24s ", " (NVEs)");
for (ALL_LIST_ELEMENTS_RO (&bgp->rfapi->descriptors, node, rfd))
@ -2315,7 +2315,7 @@ rfapiRibShowResponsesSummary (void *stream)
}
fp (out, "%-8s %-8u ", "Active:", nves_with_nonempty_ribs);
fp (out, "%-8s %-8u", "Total:", nves);
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
}
@ -2388,7 +2388,7 @@ print_rib_sl (
fp (out, " %c %-20s %-15s %-15s %-4u %-8s %-8s%s%s",
deleted ? 'r' : ' ',
*printedprefix ? "" : str_pfx,
str_vn, str_un, ri->cost, str_lifetime, str_age, str_rd, VTY_NEWLINE);
str_vn, str_un, ri->cost, str_lifetime, str_age, str_rd, VTYNL);
if (!*printedprefix)
*printedprefix = 1;
@ -2501,10 +2501,10 @@ rfapiRibShowResponses (
++printedheader;
fp (out, "%s[%s]%s",
VTY_NEWLINE,
show_removed ? "Removed" : "Active", VTY_NEWLINE);
VTYNL,
show_removed ? "Removed" : "Active", VTYNL);
fp (out, "%-15s %-15s%s", "Querying VN", "Querying UN",
VTY_NEWLINE);
VTYNL);
fp (out, " %-20s %-15s %-15s %4s %-8s %-8s%s",
"Prefix", "Registered VN", "Registered UN", "Cost",
"Lifetime",
@ -2513,7 +2513,7 @@ rfapiRibShowResponses (
#else
"Remaining",
#endif
VTY_NEWLINE);
VTYNL);
}
if (!printednve)
{
@ -2526,11 +2526,11 @@ rfapiRibShowResponses (
fp (out, "%-15s %-15s%s",
rfapiRfapiIpAddr2Str (&rfd->vn_addr, str_vn, BUFSIZ),
rfapiRfapiIpAddr2Str (&rfd->un_addr, str_un, BUFSIZ),
VTY_NEWLINE);
VTYNL);
}
prefix2str (&rn->p, str_pfx, BUFSIZ);
//fp(out, " %s%s", buf, VTY_NEWLINE); /* prefix */
//fp(out, " %s%s", buf, VTYNL); /* prefix */
routes_displayed++;
nhs_displayed += print_rib_sl (fp, vty, out, sl,
@ -2542,12 +2542,12 @@ rfapiRibShowResponses (
if (routes_total)
{
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
fp (out, "Displayed %u NVEs, and %u out of %u %s prefixes",
nves_displayed, routes_displayed,
routes_total, show_removed ? "removed" : "active");
if (nhs_displayed != routes_displayed || nhs_total != routes_total)
fp (out, " with %u out of %u next hops", nhs_displayed, nhs_total);
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
}
}

View File

@ -385,14 +385,14 @@ rfapiStdioPrintf (void *stream, const char *format, ...)
/* Fake out for debug logging */
static struct vty vty_dummy_zlog;
static struct vty vty_dummy_stdio;
#define HVTY_NEWLINE ((vty == &vty_dummy_zlog)? "": VTY_NEWLINE)
#define HVTYNL ((vty == &vty_dummy_zlog)? "": VTYNL)
static const char *
str_vty_newline (struct vty *vty)
{
if (vty == &vty_dummy_zlog)
return "";
return VTY_NEWLINE;
return VTYNL;
}
int
@ -406,7 +406,7 @@ rfapiStream2Vty (
if (!stream)
{
vty_dummy_zlog.type = VTY_SHELL; /* for VTY_NEWLINE */
vty_dummy_zlog.type = VTY_SHELL; /* for VTYNL */
*vty = &vty_dummy_zlog;
*fp = (int (*)(void *, const char *,...)) rfapiDebugPrintf;
*outstream = NULL;
@ -418,7 +418,7 @@ rfapiStream2Vty (
((uintptr_t) stream == (uintptr_t) 2))
{
vty_dummy_stdio.type = VTY_SHELL; /* for VTY_NEWLINE */
vty_dummy_stdio.type = VTY_SHELL; /* for VTYNL */
*vty = &vty_dummy_stdio;
*fp = (int (*)(void *, const char *,...)) rfapiStdioPrintf;
*outstream = stream;
@ -428,7 +428,7 @@ rfapiStream2Vty (
if (stream)
{
*vty = stream; /* VTY_NEWLINE requires vty to be legit */
*vty = stream; /* VTYNL requires vty to be legit */
*fp = (int (*)(void *, const char *,...)) vty_out;
*outstream = stream;
*vty_newline = str_vty_newline (*vty);
@ -488,7 +488,7 @@ rfapi_vty_out_vncinfo (
vty_out (vty, " type=%s, subtype=%d",
zebra_route_string (bi->type), bi->sub_type);
vty_out (vty, "%s", HVTY_NEWLINE);
vty_out (vty, "%s", HVTYNL);
}
void
@ -505,27 +505,27 @@ rfapiPrintAttrPtrs (void *stream, struct attr *attr)
if (rfapiStream2Vty (stream, &fp, &vty, &out, &vty_newline) == 0)
return;
fp (out, "Attr[%p]:%s", attr, HVTY_NEWLINE);
fp (out, "Attr[%p]:%s", attr, HVTYNL);
if (!attr)
return;
/* IPv4 Nexthop */
inet_ntop (AF_INET, &attr->nexthop, buf, BUFSIZ);
fp (out, " nexthop=%s%s", buf, HVTY_NEWLINE);
fp (out, " nexthop=%s%s", buf, HVTYNL);
fp (out, " aspath=%p, refcnt=%d%s", attr->aspath,
(attr->aspath ? attr->aspath->refcnt : 0), HVTY_NEWLINE);
(attr->aspath ? attr->aspath->refcnt : 0), HVTYNL);
fp (out, " community=%p, refcnt=%d%s", attr->community,
(attr->community ? attr->community->refcnt : 0), HVTY_NEWLINE);
(attr->community ? attr->community->refcnt : 0), HVTYNL);
if ((ae = attr->extra))
{
fp (out, " ecommunity=%p, refcnt=%d%s", ae->ecommunity,
(ae->ecommunity ? ae->ecommunity->refcnt : 0), HVTY_NEWLINE);
(ae->ecommunity ? ae->ecommunity->refcnt : 0), HVTYNL);
fp (out, " cluster=%p, refcnt=%d%s", ae->cluster,
(ae->cluster ? ae->cluster->refcnt : 0), HVTY_NEWLINE);
(ae->cluster ? ae->cluster->refcnt : 0), HVTYNL);
fp (out, " transit=%p, refcnt=%d%s", ae->transit,
(ae->transit ? ae->transit->refcnt : 0), HVTY_NEWLINE);
(ae->transit ? ae->transit->refcnt : 0), HVTYNL);
}
}
@ -726,7 +726,7 @@ rfapiPrintBi (void *stream, struct bgp_info *bi)
snprintf (p, REMAIN, " %c:%u", zebra_route_char (bi->type), bi->sub_type);
INCP;
fp (out, "%s%s", line, HVTY_NEWLINE);
fp (out, "%s%s", line, HVTYNL);
if (has_macaddr)
{
@ -735,7 +735,7 @@ rfapiPrintBi (void *stream, struct bgp_info *bi)
macaddr.octet[0],
macaddr.octet[1],
macaddr.octet[2],
macaddr.octet[3], macaddr.octet[4], macaddr.octet[5], HVTY_NEWLINE);
macaddr.octet[3], macaddr.octet[4], macaddr.octet[5], HVTYNL);
}
if (!rfapiGetL2o (bi->attr, &l2o_buf))
@ -745,7 +745,7 @@ rfapiPrintBi (void *stream, struct bgp_info *bi)
l2o_buf.macaddr.octet[0], l2o_buf.macaddr.octet[1],
l2o_buf.macaddr.octet[2], l2o_buf.macaddr.octet[3],
l2o_buf.macaddr.octet[4], l2o_buf.macaddr.octet[5], l2o_buf.label,
l2o_buf.logical_net_id, l2o_buf.local_nve_id, HVTY_NEWLINE);
l2o_buf.logical_net_id, l2o_buf.local_nve_id, HVTYNL);
}
if (bi->extra && bi->extra->vnc.import.aux_prefix.family)
{
@ -758,7 +758,7 @@ rfapiPrintBi (void *stream, struct bgp_info *bi)
buf[BUFSIZ - 1] = 0;
if (sp)
{
fp (out, " IP: %s%s", sp, HVTY_NEWLINE);
fp (out, " IP: %s%s", sp, HVTYNL);
}
}
{
@ -807,7 +807,7 @@ rfapiDebugPrintMonitorVpn (void *stream, struct rfapi_monitor_vpn *m)
return;
rfapiMonitorVpn2Str (m, buf, BUFSIZ);
fp (out, " Mon %s%s", buf, HVTY_NEWLINE);
fp (out, " Mon %s%s", buf, HVTYNL);
}
static void
@ -822,7 +822,7 @@ rfapiDebugPrintMonitorEncap (void *stream, struct rfapi_monitor_encap *m)
return;
fp (out, " Mon m=%p, next=%p, node=%p, bi=%p%s",
m, m->next, m->node, m->bi, HVTY_NEWLINE);
m, m->next, m->node, m->bi, HVTYNL);
}
void
@ -841,7 +841,7 @@ rfapiShowItNode (void *stream, struct route_node *rn)
fp (out, "%s/%d @%p #%d%s",
rfapi_ntop (rn->p.family, &rn->p.u.prefix, buf, BUFSIZ),
rn->p.prefixlen, rn, rn->lock, HVTY_NEWLINE);
rn->p.prefixlen, rn, rn->lock, HVTYNL);
for (bi = rn->info; bi; bi = bi->next)
{
@ -869,7 +869,7 @@ rfapiShowImportTable (
if (rfapiStream2Vty (stream, &fp, &vty, &out, &vty_newline) == 0)
return;
fp (out, "Import Table [%s]%s", label, HVTY_NEWLINE);
fp (out, "Import Table [%s]%s", label, HVTYNL);
for (rn = route_top (rt); rn; rn = route_next (rn))
{
@ -885,7 +885,7 @@ rfapiShowImportTable (
}
fp (out, "%s/%d @%p #%d%s", buf, rn->p.prefixlen, rn, rn->lock - 1, /* account for loop iterator locking */
HVTY_NEWLINE);
HVTYNL);
for (bi = rn->info; bi; bi = bi->next)
{
@ -995,10 +995,10 @@ rfapiShowVncQueries (void *stream, struct prefix *pfx_match)
if (!printedheader)
{
++printedheader;
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
fp (out, "%-15s %-15s %-15s %-10s%s",
"VN Address", "UN Address",
"Target", "Remaining", VTY_NEWLINE);
"Target", "Remaining", VTYNL);
}
if (!printedquerier)
@ -1024,7 +1024,7 @@ rfapiShowVncQueries (void *stream, struct prefix *pfx_match)
}
fp (out, " %-15s %-10s%s",
inet_ntop (m->p.family, &m->p.u.prefix, buf_pfx, BUFSIZ),
buf_remain, VTY_NEWLINE);
buf_remain, VTYNL);
}
}
@ -1070,10 +1070,10 @@ rfapiShowVncQueries (void *stream, struct prefix *pfx_match)
if (!printedheader)
{
++printedheader;
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
fp (out, "%-15s %-15s %-17s %10s %-10s%s",
"VN Address", "UN Address",
"Target", "LNI", "Remaining", VTY_NEWLINE);
"Target", "LNI", "Remaining", VTYNL);
}
if (!printedquerier)
@ -1100,16 +1100,16 @@ rfapiShowVncQueries (void *stream, struct prefix *pfx_match)
fp (out, " %-17s %10d %-10s%s",
rfapi_ntop (pfx_mac.family, &pfx_mac.u.prefix, buf_pfx,
BUFSIZ), mon_eth->logical_net_id, buf_remain,
VTY_NEWLINE);
VTYNL);
}
}
}
if (queries_total)
{
fp (out, "%s", VTY_NEWLINE);
fp (out, "%s", VTYNL);
fp (out, "Displayed %d out of %d total queries%s",
queries_displayed, queries_total, VTY_NEWLINE);
queries_displayed, queries_total, VTYNL);
}
return CMD_SUCCESS;
}
@ -1277,7 +1277,7 @@ rfapiPrintRemoteRegBi (
}
fp (out, "%-10s ", buf_age);
}
fp (out, "%s", HVTY_NEWLINE);
fp (out, "%s", HVTYNL);
if (rn->p.family == AF_ETHERNET)
{
@ -1314,7 +1314,7 @@ rfapiPrintRemoteRegBi (
}
}
if (nlines > 1)
fp (out, "%s", HVTY_NEWLINE);
fp (out, "%s", HVTYNL);
return 1;
}
@ -1438,12 +1438,12 @@ rfapiShowRemoteRegistrationsIt (
if (pLni)
{
fp (out, "%s[%s] L2VPN Network 0x%x (%u) RT={%s}",
HVTY_NEWLINE, type, *pLni, (*pLni & 0xfff), s);
HVTYNL, type, *pLni, (*pLni & 0xfff), s);
}
else
{
fp (out, "%s[%s] Prefix RT={%s}",
HVTY_NEWLINE, type, s);
HVTYNL, type, s);
}
XFREE (MTYPE_ECOMMUNITY_STR, s);
@ -1454,7 +1454,7 @@ rfapiShowRemoteRegistrationsIt (
"VRF" : "NVE group"),
it->rfg->name);
}
fp (out, "%s", HVTY_NEWLINE);
fp (out, "%s", HVTYNL);
if (show_expiring)
{
#if RFAPI_REGISTRATIONS_REPORT_AGE
@ -1473,7 +1473,7 @@ rfapiShowRemoteRegistrationsIt (
fp (out, "%-20s %-15s %-15s %4s %-10s %-10s%s",
(pLni ? "L2 Address/IP" : "Prefix"),
"VN Address", "UN Address", "Cost",
"Lifetime", agetype, HVTY_NEWLINE);
"Lifetime", agetype, HVTYNL);
}
printed += rfapiPrintRemoteRegBi (bgp, stream, rn, bi);
}
@ -1509,9 +1509,9 @@ rfapiShowRemoteRegistrationsIt (
}
fp (out, "Displayed %d out of %d %s%s",
printed, total, type, HVTY_NEWLINE);
printed, total, type, HVTYNL);
#if DEBUG_SHOW_EXTRA
fp(out, "IT table above: it=%p%s", it, HVTY_NEWLINE);
fp(out, "IT table above: it=%p%s", it, HVTYNL);
#endif
}
return printed;
@ -1751,7 +1751,7 @@ rfapiPrintAdvertisedInfo (
}
bn = bgp_afi_node_get (bgp->rib[afi][safi], afi, safi, p, prd);
vty_out (vty, " bn=%p%s", bn, HVTY_NEWLINE);
vty_out (vty, " bn=%p%s", bn, HVTYNL);
for (bi = bn->info; bi; bi = bi->next)
{
@ -1768,7 +1768,7 @@ rfapiPrintAdvertisedInfo (
if (!printed)
{
vty_out (vty, " --?--%s", HVTY_NEWLINE);
vty_out (vty, " --?--%s", HVTYNL);
return;
}
@ -1798,9 +1798,9 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd)
rfapiPrintRd (vty, &rfd->rd);
vty_out (vty, " %d", rfd->response_lifetime);
vty_out (vty, " %s", (rfd->rfg ? rfd->rfg->name : "<orphaned>"));
vty_out (vty, "%s", HVTY_NEWLINE);
vty_out (vty, "%s", HVTYNL);
vty_out (vty, " Peer %p #%d%s", rfd->peer, rfd->peer->lock, HVTY_NEWLINE);
vty_out (vty, " Peer %p #%d%s", rfd->peer, rfd->peer->lock, HVTYNL);
/* export RT list */
if (rfd->rt_export_list)
@ -1808,12 +1808,12 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd)
s =
ecommunity_ecom2str (rfd->rt_export_list,
ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
vty_out (vty, " Export %s%s", s, HVTY_NEWLINE);
vty_out (vty, " Export %s%s", s, HVTYNL);
XFREE (MTYPE_ECOMMUNITY_STR, s);
}
else
{
vty_out (vty, " Export (nil)%s", HVTY_NEWLINE);
vty_out (vty, " Export (nil)%s", HVTYNL);
}
/* import RT list */
@ -1821,12 +1821,12 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd)
{
s = ecommunity_ecom2str (rfd->import_table->rt_import_list,
ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
vty_out (vty, " Import %s%s", s, HVTY_NEWLINE);
vty_out (vty, " Import %s%s", s, HVTYNL);
XFREE (MTYPE_ECOMMUNITY_STR, s);
}
else
{
vty_out (vty, " Import (nil)%s", HVTY_NEWLINE);
vty_out (vty, " Import (nil)%s", HVTYNL);
}
for (afi = AFI_IP; afi < AFI_MAX; ++afi)
@ -1853,7 +1853,7 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd)
prefix2str (&adb->u.s.prefix_ip, buf, BUFSIZ);
buf[BUFSIZ - 1] = 0; /* guarantee NUL-terminated */
vty_out (vty, " Adv Pfx: %s%s", buf, HVTY_NEWLINE);
vty_out (vty, " Adv Pfx: %s%s", buf, HVTYNL);
rfapiPrintAdvertisedInfo (vty, rfd, SAFI_MPLS_VPN, &adb->u.s.prefix_ip);
}
}
@ -1868,13 +1868,13 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd)
prefix2str (&adb->u.s.prefix_eth, buf, BUFSIZ);
buf[BUFSIZ - 1] = 0; /* guarantee NUL-terminated */
vty_out (vty, " Adv Pfx: %s%s", buf, HVTY_NEWLINE);
vty_out (vty, " Adv Pfx: %s%s", buf, HVTYNL);
/* TBD update the following function to print ethernet info */
/* Also need to pass/use rd */
rfapiPrintAdvertisedInfo (vty, rfd, SAFI_MPLS_VPN, &adb->u.s.prefix_ip);
}
vty_out (vty, "%s", HVTY_NEWLINE);
vty_out (vty, "%s", HVTYNL);
}
/*
@ -1925,7 +1925,7 @@ rfapiPrintMatchingDescriptors (struct vty *vty,
vty_out (vty,
"%s %s %s %s %s %s %s %s%s",
"descriptor", "un-addr", "vn-addr", "callback", "cookie",
"RD", "lifetime", "group", HVTY_NEWLINE);
"RD", "lifetime", "group", HVTYNL);
}
rfapiPrintDescriptor (vty, rfd);
printed = 1;
@ -1941,7 +1941,7 @@ rfapiCliGetPrefixAddr (struct vty *vty, const char *str, struct prefix *p)
{
if (!str2prefix (str, p))
{
vty_out (vty, "Malformed address \"%s\"%s", str, HVTY_NEWLINE);
vty_out (vty, "Malformed address \"%s\"%s", str, HVTYNL);
return CMD_WARNING;
}
switch (p->family)
@ -1949,19 +1949,19 @@ rfapiCliGetPrefixAddr (struct vty *vty, const char *str, struct prefix *p)
case AF_INET:
if (p->prefixlen != 32)
{
vty_out (vty, "Not a host address: \"%s\"%s", str, HVTY_NEWLINE);
vty_out (vty, "Not a host address: \"%s\"%s", str, HVTYNL);
return CMD_WARNING;
}
break;
case AF_INET6:
if (p->prefixlen != 128)
{
vty_out (vty, "Not a host address: \"%s\"%s", str, HVTY_NEWLINE);
vty_out (vty, "Not a host address: \"%s\"%s", str, HVTYNL);
return CMD_WARNING;
}
break;
default:
vty_out (vty, "Invalid address \"%s\"%s", str, HVTY_NEWLINE);
vty_out (vty, "Invalid address \"%s\"%s", str, HVTYNL);
return CMD_WARNING;
}
return 0;
@ -2066,7 +2066,7 @@ rfapiPrintNhl (void *stream, struct rfapi_next_hop_entry *next_hops)
truncate:
line[BUFSIZ - 1] = 0;
fp (out, "%s%s", line, HVTY_NEWLINE);
fp (out, "%s%s", line, HVTYNL);
/*
* options
@ -2088,18 +2088,18 @@ rfapiPrintNhl (void *stream, struct rfapi_next_hop_entry *next_hops)
fp (out, "%sL2 %s LBL=0x%06x NETID=0x%06x NVEID=%d%s",
offset, pbuf, (vo->v.l2addr.label & 0x00ffffff),
(vo->v.l2addr.logical_net_id & 0x00ffffff),
vo->v.l2addr.local_nve_id, HVTY_NEWLINE);
vo->v.l2addr.local_nve_id, HVTYNL);
break;
case RFAPI_VN_OPTION_TYPE_LOCAL_NEXTHOP:
prefix2str (&vo->v.local_nexthop.addr, pbuf, sizeof (pbuf));
fp (out, "%sLNH %s cost=%d%s",
offset, pbuf, vo->v.local_nexthop.cost, HVTY_NEWLINE);
offset, pbuf, vo->v.local_nexthop.cost, HVTYNL);
break;
default:
fp (out, "%svn option type %d (unknown)%s",
offset, vo->type, HVTY_NEWLINE);
offset, vo->type, HVTYNL);
break;
}
}
@ -3701,7 +3701,7 @@ clear_vnc_prefix (struct rfapi_local_reg_delete_arg *cda)
static void
print_cleared_stats (struct rfapi_local_reg_delete_arg *cda)
{
struct vty *vty = cda->vty; /* for benefit of VTY_NEWLINE */
struct vty *vty = cda->vty; /* for benefit of VTYNL */
/* Our special element-deleting function counts nves */
if (cda->nves)

View File

@ -211,11 +211,11 @@ show_ip_eigrp_interface_header (struct vty *vty, struct eigrp *eigrp)
{
vty_outln (vty, "%s%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s",
VTY_NEWLINE,
"EIGRP interfaces for AS(",eigrp->AS,")",VTY_NEWLINE,VTY_NEWLINE,
VTYNL,
"EIGRP interfaces for AS(",eigrp->AS,")",VTYNL,VTYNL,
"Interface", "Bandwidth", "Delay", "Peers", "Xmit Queue", "Mean",
"Pacing Time", "Multicast", "Pending", "Hello", "Holdtime",
VTY_NEWLINE,"","Un/Reliable","SRTT","Un/Reliable","Flow Timer",
VTYNL,"","Un/Reliable","SRTT","Un/Reliable","Flow Timer",
"Routes");
}
@ -258,10 +258,10 @@ void
show_ip_eigrp_neighbor_header (struct vty *vty, struct eigrp *eigrp)
{
vty_outln (vty, "%s%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s ",
VTY_NEWLINE,
"EIGRP neighbors for AS(",eigrp->AS,")",VTY_NEWLINE,VTY_NEWLINE,
VTYNL,
"EIGRP neighbors for AS(",eigrp->AS,")",VTYNL,VTYNL,
"H", "Address", "Interface", "Hold", "Uptime",
"SRTT", "RTO", "Q", "Seq", VTY_NEWLINE
"SRTT", "RTO", "Q", "Seq", VTYNL
,"","(sec)","","(ms)","","Cnt","Num");
}
@ -299,10 +299,10 @@ show_ip_eigrp_topology_header (struct vty *vty, struct eigrp *eigrp)
router_id.s_addr = eigrp->router_id;
vty_outln (vty, "%sEIGRP Topology Table for AS(%d)/ID(%s)%s",
VTY_NEWLINE, eigrp->AS, inet_ntoa(router_id), VTY_NEWLINE);
VTYNL, eigrp->AS, inet_ntoa(router_id), VTYNL);
vty_outln (vty, "Codes: P - Passive, A - Active, U - Update, Q - Query, "
"R - Reply%s r - reply Status, s - sia Status%s",
VTY_NEWLINE, VTY_NEWLINE);
VTYNL, VTYNL);
}
void
@ -380,7 +380,7 @@ DEFUN (show_debugging_eigrp,
lookup_msg(eigrp_packet_type_str, i + 1, NULL),
IS_DEBUG_EIGRP_PACKET (i, PACKET_DETAIL) ? " detail" : "");
if (IS_DEBUG_EIGRP_PACKET (i, RECV))
vty_outln (vty, " EIGRP packet %s receive%s debugging is on%s",
vty_outln (vty, " EIGRP packet %s receive%s debugging is on",
lookup_msg(eigrp_packet_type_str, i + 1, NULL),
IS_DEBUG_EIGRP_PACKET (i, PACKET_DETAIL) ? " detail" : "");
}

View File

@ -968,7 +968,7 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)
vty_out (vty, " %#.2x", v[i]);
if (rtn == 8)
{
vty_out (vty, "%s [%.2x]", VTY_NEWLINE, i + 1);
vty_out (vty, "%s [%.2x]", VTYNL, i + 1);
rtn = 1;
}
else
@ -1299,7 +1299,7 @@ show_mpls_te_sub (struct vty *vty, struct interface *ifp)
show_vty_subtlv_res_bw (vty, &mtc->res_bw);
show_vty_subtlv_ava_bw (vty, &mtc->ava_bw);
show_vty_subtlv_use_bw (vty, &mtc->use_bw);
vty_outln (vty, "---------------%s", VTY_NEWLINE);
vty_outln (vty, "---------------%s", VTYNL);
}
else
{

View File

@ -1561,7 +1561,7 @@ show_isis_database (struct vty *vty, const char *argv, int ui_level)
area->dynhostname);
vty_outln (vty, " %u LSPs%s",
lsp_count, VTY_NEWLINE);
lsp_count, VTYNL);
}
}
}

View File

@ -211,7 +211,7 @@ show_discovery_msg(struct vty *vty, struct imsg *imsg,
vty_out(vty, "%-8s %-15s ", "Targeted", addr);
if (strlen(addr) > 15)
vty_out(vty, "%s%46s", VTY_NEWLINE, " ");
vty_out(vty, "%s%46s", VTYNL, " ");
break;
}
vty_outln (vty, "%9u", adj->holdtime);
@ -232,23 +232,23 @@ show_discovery_detail_adj(struct vty *vty, char *buffer, struct ctl_adj *adj)
size_t buflen = strlen(buffer);
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" LSR Id: %s:0%s", inet_ntoa(adj->id), VTY_NEWLINE);
" LSR Id: %s:0%s", inet_ntoa(adj->id), VTYNL);
buflen = strlen(buffer);
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" Source address: %s%s",
log_addr(adj->af, &adj->src_addr), VTY_NEWLINE);
log_addr(adj->af, &adj->src_addr), VTYNL);
buflen = strlen(buffer);
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" Transport address: %s%s",
log_addr(adj->af, &adj->trans_addr), VTY_NEWLINE);
log_addr(adj->af, &adj->trans_addr), VTYNL);
buflen = strlen(buffer);
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" Hello hold time: %u secs (due in %u secs)%s",
adj->holdtime, adj->holdtime_remaining, VTY_NEWLINE);
adj->holdtime, adj->holdtime_remaining, VTYNL);
buflen = strlen(buffer);
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" Dual-stack capability TLV: %s%s",
(adj->ds_tlv) ? "yes" : "no", VTY_NEWLINE);
(adj->ds_tlv) ? "yes" : "no", VTYNL);
}
static int
@ -280,7 +280,7 @@ show_discovery_detail_msg(struct vty *vty, struct imsg *imsg,
buflen = strlen(ifaces_buffer);
snprintf(ifaces_buffer + buflen, LDPBUFSIZ - buflen,
" %s: %s%s", iface->name, (iface->no_adj) ?
"(no adjacencies)" : "", VTY_NEWLINE);
"(no adjacencies)" : "", VTYNL);
break;
case IMSG_CTL_SHOW_DISC_TNBR:
tnbr = imsg->data;
@ -294,7 +294,7 @@ show_discovery_detail_msg(struct vty *vty, struct imsg *imsg,
snprintf(tnbrs_buffer + buflen, LDPBUFSIZ - buflen,
" %s -> %s: %s%s", log_addr(tnbr->af, trans_addr),
log_addr(tnbr->af, &tnbr->addr), (tnbr->no_adj) ?
"(no adjacencies)" : "", VTY_NEWLINE);
"(no adjacencies)" : "", VTYNL);
break;
case IMSG_CTL_SHOW_DISC_ADJ:
adj = imsg->data;
@ -511,7 +511,7 @@ show_nbr_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
af_name(nbr->af), inet_ntoa(nbr->id),
nbr_state_name(nbr->nbr_state), addr);
if (strlen(addr) > 15)
vty_out(vty, "%s%48s", VTY_NEWLINE, " ");
vty_out(vty, "%s%48s", VTYNL, " ");
vty_outln (vty, " %8s", log_time(nbr->uptime));
break;
case IMSG_CTL_END:
@ -531,12 +531,12 @@ show_nbr_detail_adj(struct vty *vty, char *buffer, struct ctl_adj *adj)
switch (adj->type) {
case HELLO_LINK:
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" Interface: %s%s", adj->ifname, VTY_NEWLINE);
" Interface: %s%s", adj->ifname, VTYNL);
break;
case HELLO_TARGETED:
snprintf(buffer + buflen, LDPBUFSIZ - buflen,
" Targeted Hello: %s%s", log_addr(adj->af,
&adj->src_addr), VTY_NEWLINE);
&adj->src_addr), VTYNL);
break;
}
}
@ -873,7 +873,7 @@ show_nbr_capabilities(struct vty *vty, struct ctl_nbr *nbr)
" - Dynamic Announcement (0x0506)%s"
" - Typed Wildcard (0x050B)%s"
" - Unrecognized Notification (0x0603)",
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
VTYNL, VTYNL, VTYNL);
vty_outln (vty, " Capabilities Received:");
if (nbr->flags & F_NBR_CAP_DYNAMIC)
vty_outln (vty," - Dynamic Announcement (0x0506)");
@ -1021,7 +1021,7 @@ show_lib_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
vty_out(vty, "%-4s %-20s", af_name(rt->af), dstnet);
if (strlen(dstnet) > 20)
vty_out(vty, "%s%25s", VTY_NEWLINE, " ");
vty_out(vty, "%s%25s", VTYNL, " ");
vty_outln (vty, " %-15s %-11s %-13s %6s", inet_ntoa(rt->nexthop),
log_label(rt->local_label), log_label(rt->remote_label),
rt->in_use ? "yes" : "no");
@ -1077,7 +1077,7 @@ show_lib_detail_msg(struct vty *vty, struct imsg *imsg, struct show_params *para
upstream = 1;
buflen = strlen(sent_buffer);
snprintf(sent_buffer + buflen, LDPBUFSIZ - buflen,
"%12s%s:0%s", "", inet_ntoa(rt->nexthop), VTY_NEWLINE);
"%12s%s:0%s", "", inet_ntoa(rt->nexthop), VTYNL);
break;
case IMSG_CTL_SHOW_LIB_RCVD:
downstream = 1;
@ -1085,7 +1085,7 @@ show_lib_detail_msg(struct vty *vty, struct imsg *imsg, struct show_params *para
snprintf(rcvd_buffer + buflen, LDPBUFSIZ - buflen,
"%12s%s:0, label %s%s%s", "", inet_ntoa(rt->nexthop),
log_label(rt->remote_label),
rt->in_use ? " (in use)" : "", VTY_NEWLINE);
rt->in_use ? " (in use)" : "", VTYNL);
break;
case IMSG_CTL_SHOW_LIB_END:
if (upstream) {
@ -1698,8 +1698,8 @@ ldp_vty_show_capabilities(struct vty *vty, int json)
"Supported LDP Capabilities%s"
" * Dynamic Announcement (0x0506)%s"
" * Typed Wildcard (0x050B)%s"
" * Unrecognized Notification (0x0603)%s", VTY_NEWLINE,
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
" * Unrecognized Notification (0x0603)%s", VTYNL,
VTYNL, VTYNL, VTYNL);
return (0);
}

View File

@ -1349,7 +1349,7 @@ DEFUN (show_version,
vty_outln (vty, "%s %s (%s).", FRR_FULL_NAME, FRR_VERSION,
host.name ? host.name : "");
vty_outln (vty, "%s%s", FRR_COPYRIGHT, GIT_INFO);
vty_outln (vty, "configured with:%s %s", VTY_NEWLINE,
vty_outln (vty, "configured with:%s %s", VTYNL,
FRR_CONFIG_ARGS);
return CMD_SUCCESS;
@ -1385,9 +1385,9 @@ command argument (e.g. 'show ?') and describes each possible%s\
argument.%s\
2. Partial help is provided when an abbreviated argument is entered%s\
and you want to know what arguments match the input%s\
(e.g. 'show me?'.)%s", VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE,
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE,
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
(e.g. 'show me?'.)%s", VTYNL, VTYNL, VTYNL,
VTYNL, VTYNL, VTYNL, VTYNL, VTYNL,
VTYNL, VTYNL, VTYNL, VTYNL);
return CMD_SUCCESS;
}
@ -1488,7 +1488,7 @@ vty_write_config (struct vty *vty)
if (vty->type == VTY_TERM)
{
vty_outln (vty, "%sCurrent configuration:",VTY_NEWLINE);
vty_outln (vty, "%sCurrent configuration:",VTYNL);
vty_outln (vty, "!");
}

View File

@ -414,9 +414,9 @@ DEFUN (grammar_findambig,
if (same)
{
vty_outln (vty, "'%s' AMBIGUOUS:", cur->cmd);
vty_outln (vty, " %s%s '%s'", prev->el->name, VTY_NEWLINE,
vty_outln (vty, " %s%s '%s'", prev->el->name, VTYNL,
prev->el->string);
vty_outln (vty, " %s%s '%s'", cur->el->name, VTY_NEWLINE,
vty_outln (vty, " %s%s '%s'", cur->el->name, VTYNL,
cur->el->string);
vty_outln (vty, "");
ambig++;

View File

@ -743,14 +743,14 @@ DEFUN_NOSH (no_interface,
if (ifp == NULL)
{
vty_out (vty, "%% Interface %s does not exist%s", ifname, VTY_NEWLINE);
vty_out (vty, "%% Interface %s does not exist%s", ifname, VTYNL);
return CMD_WARNING;
}
if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
{
vty_out (vty, "%% Only inactive interfaces can be deleted%s",
VTY_NEWLINE);
VTYNL);
return CMD_WARNING;
}
@ -798,7 +798,7 @@ DEFUN (show_address,
if (p->family == AF_INET)
vty_out (vty, "%s/%d%s", inet_ntoa (p->u.prefix4), p->prefixlen,
VTY_NEWLINE);
VTYNL);
}
}
return CMD_SUCCESS;
@ -823,8 +823,8 @@ DEFUN (show_address_vrf_all,
if (!vrf->iflist || !listcount (vrf->iflist))
continue;
vty_out (vty, "%sVRF %u%s%s", VTY_NEWLINE, vrf->vrf_id, VTY_NEWLINE,
VTY_NEWLINE);
vty_out (vty, "%sVRF %u%s%s", VTYNL, vrf->vrf_id, VTYNL,
VTYNL);
for (ALL_LIST_ELEMENTS_RO (vrf->iflist, node, ifp))
{
@ -834,7 +834,7 @@ DEFUN (show_address_vrf_all,
if (p->family == AF_INET)
vty_out (vty, "%s/%d%s", inet_ntoa (p->u.prefix4), p->prefixlen,
VTY_NEWLINE);
VTYNL);
}
}
}

View File

@ -110,7 +110,7 @@ DEFUN (show_modules,
vty_outln (vty, "%-12s %-25s %s%s",
"Module Name", "Version", "Description",
VTY_NEWLINE);
VTYNL);
while (plug)
{
const struct frrmod_info *i = plug->info;

View File

@ -325,7 +325,7 @@ 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, VTY_NEWLINE);
ns->ns_id, ns->name, VTYNL);
return CMD_WARNING;
}
@ -335,7 +335,7 @@ 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, VTY_NEWLINE);
ns->ns_id, ns->name, VTYNL);
return CMD_WARNING;
}

View File

@ -1863,7 +1863,7 @@ config_write_prefix_afi (afi_t afi, struct vty *vty)
vty_outln (vty, "");
write++;
}
/* vty_out (vty, "!%s", VTY_NEWLINE); */
/* vty_out (vty, "!%s", VTYNL); */
}
for (plist = master->str.head; plist; plist = plist->next)

View File

@ -123,7 +123,7 @@ sub codelist {
push @lines, " \" > - selected route, * - FIB route%s%s\", \\\n";
my @nl = ();
for (my $c = 0; $c < @lines + 1; $c++) {
push @nl, "VTY_NEWLINE"
push @nl, "VTYNL"
}
return join("", @lines) ." ". join(", ", @nl);
}

View File

@ -1003,7 +1003,7 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map)
/* Description */
if (index->description)
vty_outln (vty, " Description:%s %s", VTY_NEWLINE,
vty_outln (vty, " Description:%s %s", VTYNL,
index->description);
/* Match clauses */

View File

@ -1278,7 +1278,7 @@ smux_peer_oid (struct vty *vty, const char *oid_str, const char *passwd_str)
ret = smux_str2oid (oid_str, oid, &oid_len);
if (ret != 0)
{
vty_out (vty, "object ID malformed%s", VTY_NEWLINE);
vty_out (vty, "object ID malformed%s", VTYNL);
return CMD_WARNING;
}

View File

@ -475,7 +475,7 @@ DEFUN_NOSH (vrf,
{
vty_out (vty, "%% VRF name %s is invalid: length exceeds "
"%d characters%s",
vrfname, VRF_NAMSIZ, VTY_NEWLINE);
vrfname, VRF_NAMSIZ, VTYNL);
return CMD_WARNING;
}
@ -501,14 +501,14 @@ DEFUN_NOSH (no_vrf,
if (vrfp == NULL)
{
vty_out (vty, "%% VRF %s does not exist%s", vrfname, VTY_NEWLINE);
vty_out (vty, "%% VRF %s does not exist%s", vrfname, VTYNL);
return CMD_WARNING;
}
if (CHECK_FLAG (vrfp->status, VRF_ACTIVE))
{
vty_out (vty, "%% Only inactive VRFs can be deleted%s",
VTY_NEWLINE);
VTYNL);
return CMD_WARNING;
}

View File

@ -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, VTY_NEWLINE);\
vty_out (vty, "%% VRF %s not found%s", NAME, VTYNL);\
return CMD_WARNING; \
} \
if (vrf->vrf_id == VRF_UNKNOWN) \
{ \
vty_out (vty, "%% VRF %s not active%s", NAME, VTY_NEWLINE);\
vty_out (vty, "%% VRF %s not active%s", NAME, VTYNL);\
return CMD_WARNING; \
} \
(V) = vrf->vrf_id; \

View File

@ -169,7 +169,7 @@ vty_outln (struct vty *vty, const char *format, ...)
len = vty_out_variadic (vty, format, args);
va_end (args);
return len + vty_out (vty, "%s", VTY_NEWLINE);
return len + vty_out (vty, "%s", VTYNL);
}
static int
@ -954,7 +954,7 @@ vty_complete_command (struct vty *vty)
vty_redraw_line (vty);
break;
case CMD_ERR_NO_MATCH:
/* vty_out (vty, "%% There is no matched command.%s", VTY_NEWLINE); */
/* vty_out (vty, "%% There is no matched command.%s", VTYNL); */
vty_prompt (vty);
vty_redraw_line (vty);
break;
@ -1148,7 +1148,7 @@ vty_describe_command (struct vty *vty)
#if 0
vty_out (vty, " %-*s %s%s", width
desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd,
desc->str ? desc->str : "", VTY_NEWLINE);
desc->str ? desc->str : "", VTYNL);
#endif /* 0 */
}
@ -1775,8 +1775,8 @@ vty_create (int vty_sock, union sockunion *su)
/* Say hello to the world. */
vty_hello (vty);
if (! no_password_check)
vty_outln (vty, "%sUser Access Verification%s", VTY_NEWLINE,
VTY_NEWLINE);
vty_outln (vty, "%sUser Access Verification%s", VTYNL,
VTYNL);
/* Setting up terminal. */
vty_will_echo (vty);
@ -2336,7 +2336,7 @@ vty_timeout (struct thread *thread)
/* Clear buffer*/
buffer_reset (vty->obuf);
vty_outln (vty, "%sVty connection is timed out.", VTY_NEWLINE);
vty_outln (vty, "%sVty connection is timed out.", VTYNL);
/* Close connection. */
vty->status = VTY_CLOSE;
@ -2719,7 +2719,7 @@ DEFUN_NOSH (config_who,
if ((v = vector_slot (vtyvec, i)) != NULL)
vty_out (vty, "%svty[%d] connected from %s.%s",
v->config ? "*" : " ",
i, v->address, VTY_NEWLINE);
i, v->address, VTYNL);
return CMD_SUCCESS;
}
@ -2961,7 +2961,7 @@ DEFUN_NOSH (show_history,
}
if (vty->hist[index] != NULL)
vty_out (vty, " %s%s", vty->hist[index], VTY_NEWLINE);
vty_out (vty, " %s%s", vty->hist[index], VTYNL);
index++;
}

View File

@ -156,7 +156,7 @@ static inline void vty_push_context(struct vty *vty,
#define VTY_CHECK_CONTEXT(ptr) \
if (!ptr) { \
vty_out (vty, "Current configuration object was deleted " \
"by another process.%s", VTY_NEWLINE); \
"by another process.%s", VTYNL); \
return CMD_WARNING; \
}
@ -180,7 +180,7 @@ struct vty_arg
#define INTEGRATE_DEFAULT_CONFIG "frr.conf"
/* Small macro to determine newline is newline only or linefeed needed. */
#define VTY_NEWLINE ((vty->type == VTY_TERM) ? "\r\n" : "\n")
#define VTYNL ((vty->type == VTY_TERM) ? "\r\n" : "\n")
/* Default time out value */
#define VTY_TIMEOUT_DEFAULT 600

View File

@ -682,10 +682,10 @@ static void show_ip_opennhrp_cache(struct nhrp_cache *c, void *pctx)
"Flags:%s%s%s"
"Protocol-Address: %s/%zu",
nhrp_cache_type_str[c->cur.type],
VTY_NEWLINE,
VTYNL,
(c->cur.peer && c->cur.peer->online) ? " up": "",
c->used ? " used": "",
VTY_NEWLINE,
VTYNL,
sockunion2str(&c->remote_addr, buf, sizeof buf),
8 * family2addrsize(sockunion_family(&c->remote_addr)));
@ -731,7 +731,7 @@ DEFUN(show_ip_nhrp, show_ip_nhrp_cmd,
} else if (argv[3]->text[0] == 's') {
nhrp_shortcut_foreach(ctx.afi, show_ip_nhrp_shortcut, &ctx);
} else {
vty_outln (vty, "Status: ok%s", VTY_NEWLINE);
vty_outln (vty, "Status: ok%s", VTYNL);
ctx.count++;
for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp))
nhrp_cache_foreach(ifp, show_ip_opennhrp_cache, &ctx);

View File

@ -90,11 +90,11 @@ extern struct thread_master *master;
#define OSPF6_ROUTER_ID_STR "Specify Router-ID\n"
#define OSPF6_LS_ID_STR "Specify Link State ID\n"
#define VNL VTY_NEWLINE
#define VNL VTYNL
#define OSPF6_CMD_CHECK_RUNNING() \
if (ospf6 == NULL) \
{ \
vty_out (vty, "OSPFv3 is not running%s", VTY_NEWLINE); \
vty_out (vty, "OSPFv3 is not running%s", VTYNL); \
return CMD_SUCCESS; \
}

View File

@ -1568,8 +1568,8 @@ show_debugging_ospf_common (struct vty *vty, struct ospf *ospf)
int i;
if (ospf->instance)
vty_outln (vty, "%sOSPF Instance: %d%s", VTY_NEWLINE, ospf->instance,
VTY_NEWLINE);
vty_outln (vty, "%sOSPF Instance: %d%s", VTYNL, ospf->instance,
VTYNL);
vty_outln (vty, "OSPF debugging status:");

View File

@ -2585,7 +2585,7 @@ show_mpls_te_link_sub (struct vty *vty, struct interface *ifp)
show_vty_link_subtlv_ava_bw (vty, &lp->ava_bw.header);
if (TLV_TYPE(lp->use_bw) != 0)
show_vty_link_subtlv_use_bw (vty, &lp->use_bw.header);
vty_outln (vty, "---------------%s", VTY_NEWLINE);
vty_outln (vty, "---------------%s", VTYNL);
}
else
{

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
retv = str2area_id ((STR), &(V), &(F)); \
if (retv < 0) \
{ \
vty_out (vty, "%% Invalid OSPF area ID%s", VTY_NEWLINE); \
vty_out (vty, "%% Invalid OSPF area ID%s", VTYNL); \
return CMD_WARNING; \
} \
}
@ -39,13 +39,13 @@
retv = str2area_id ((STR), &(V), &(F)); \
if (retv < 0) \
{ \
vty_out (vty, "%% Invalid OSPF area ID%s", VTY_NEWLINE); \
vty_out (vty, "%% Invalid OSPF area ID%s", VTYNL); \
return CMD_WARNING; \
} \
if (OSPF_IS_AREA_ID_BACKBONE ((V))) \
{ \
vty_out (vty, "%% You can't configure %s to backbone%s", \
NAME, VTY_NEWLINE); \
NAME, VTYNL); \
} \
}

View File

@ -225,7 +225,7 @@ static void pim_show_assert_internal(struct vty *vty)
"ECA: Evaluate CouldAssert%s"
"ATD: AssertTrackingDesired%s"
"eATD: Evaluate AssertTrackingDesired%s",
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
VTYNL, VTYNL, VTYNL, VTYNL);
vty_outln (vty,
"Interface Address Source Group CA eCA ATD eATD");
@ -1573,7 +1573,7 @@ pim_show_state(struct vty *vty, const char *src_or_group, const char *group, u_c
} else {
vty_out(vty, "Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G)");
vty_outln (vty, "%sInstalled Source Group IIF OIL",
VTY_NEWLINE);
VTYNL);
}
for (ALL_LIST_ELEMENTS_RO(pim_channel_oil_list, node, c_oil)) {
@ -2157,12 +2157,12 @@ static void show_rpf_refresh_stats(struct vty *vty, time_t now, json_object *jso
"RPF Cache Refresh Last: %s%s"
"Nexthop Lookups: %lld%s"
"Nexthop Lookups Avoided: %lld",
qpim_rpf_cache_refresh_delay_msec, VTY_NEWLINE,
pim_time_timer_remain_msec(qpim_rpf_cache_refresher), VTY_NEWLINE,
(long long)qpim_rpf_cache_refresh_requests, VTY_NEWLINE,
(long long)qpim_rpf_cache_refresh_events, VTY_NEWLINE,
refresh_uptime, VTY_NEWLINE,
(long long) qpim_nexthop_lookups, VTY_NEWLINE,
qpim_rpf_cache_refresh_delay_msec, VTYNL,
pim_time_timer_remain_msec(qpim_rpf_cache_refresher), VTYNL,
(long long)qpim_rpf_cache_refresh_requests, VTYNL,
(long long)qpim_rpf_cache_refresh_events, VTYNL,
refresh_uptime, VTYNL,
(long long) qpim_nexthop_lookups, VTYNL,
(long long)nexthop_lookups_avoided);
}
}
@ -2181,8 +2181,8 @@ static void show_scan_oil_stats(struct vty *vty, time_t now)
"Scan OIL - Last: %s Events: %lld%s"
"MFC Add - Last: %s Events: %lld%s"
"MFC Del - Last: %s Events: %lld",
uptime_scan_oil, (long long) qpim_scan_oil_events, VTY_NEWLINE,
uptime_mroute_add, (long long) qpim_mroute_add_events, VTY_NEWLINE,
uptime_scan_oil, (long long) qpim_scan_oil_events, VTYNL,
uptime_mroute_add, (long long) qpim_mroute_add_events, VTYNL,
uptime_mroute_del, (long long)qpim_mroute_del_events);
}
@ -3221,7 +3221,7 @@ static void show_multicast_interfaces(struct vty *vty)
pim_ifp->mroute_vif_index,
errno,
safe_strerror(errno),
VTY_NEWLINE);
VTYNL);
}
ifaddr = pim_ifp->primary_address;

View File

@ -3479,7 +3479,7 @@ DEFUN (show_ip_rip,
" (n) - normal, (s) - static, (d) - default, (r) - redistribute,%s"
" (i) - interface%s%s"
" Network Next Hop Metric From Tag Time",
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
VTYNL, VTYNL, VTYNL, VTYNL, VTYNL);
for (np = route_top (rip->table); np; np = route_next (np))
if ((list = np->info) != NULL)

View File

@ -194,7 +194,7 @@ ripng_peer_display (struct vty *vty)
for (ALL_LIST_ELEMENTS (peer_list, node, nnode, peer))
{
vty_outln (vty, " %s %s%14s %10d %10d %10d %s", inet6_ntoa (peer->addr),
VTY_NEWLINE, " ",
VTYNL, " ",
peer->recv_badpackets, peer->recv_badroutes,
ZEBRA_RIPNG_DISTANCE_DEFAULT,
ripng_peer_uptime(peer, timebuf, RIPNG_UPTIME_LEN));

View File

@ -2009,8 +2009,8 @@ DEFUN (show_ipv6_ripng,
" (n) - normal, (s) - static, (d) - default, (r) - redistribute,%s"
" (i) - interface, (a/S) - aggregated/Suppressed%s%s"
" Network Next Hop Via Metric Tag Time",
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE,
VTY_NEWLINE, VTY_NEWLINE);
VTYNL, VTYNL, VTYNL,
VTYNL, VTYNL);
for (rp = route_top (ripng->table); rp; rp = route_next (rp))
{
@ -2425,7 +2425,7 @@ DEFUN (ripng_update_timer,
update = strtoul (argv[0], &endptr, 10);
if (update == ULONG_MAX || *endptr != '\0')
{
vty_out (vty, "update timer value error%s", VTY_NEWLINE);
vty_out (vty, "update timer value error%s", VTYNL);
return CMD_WARNING;
}
@ -2460,7 +2460,7 @@ DEFUN (ripng_timeout_timer,
timeout = strtoul (argv[0], &endptr, 10);
if (timeout == ULONG_MAX || *endptr != '\0')
{
vty_out (vty, "timeout timer value error%s", VTY_NEWLINE);
vty_out (vty, "timeout timer value error%s", VTYNL);
return CMD_WARNING;
}
@ -2493,7 +2493,7 @@ DEFUN (ripng_garbage_timer,
garbage = strtoul (argv[0], &endptr, 10);
if (garbage == ULONG_MAX || *endptr != '\0')
{
vty_out (vty, "garbage timer value error%s", VTY_NEWLINE);
vty_out (vty, "garbage timer value error%s", VTYNL);
return CMD_WARNING;
}
@ -2577,16 +2577,16 @@ DEFUN (show_ipv6_protocols,
if (! ripng)
return CMD_SUCCESS;
vty_out (vty, "Routing Protocol is \"ripng\"%s", VTY_NEWLINE);
vty_out (vty, "Routing Protocol is \"ripng\"%s", VTYNL);
vty_out (vty, "Sending updates every %ld seconds, next due in %d seconds%s",
ripng->update_time, 0,
VTY_NEWLINE);
VTYNL);
vty_out (vty, "Timerout after %ld seconds, garbage correct %ld%s",
ripng->timeout_time,
ripng->garbage_time,
VTY_NEWLINE);
VTYNL);
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");
@ -2767,13 +2767,13 @@ 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,
VTY_NEWLINE);
VTYNL);
if (ripng->timeout_time != RIPNG_TIMEOUT_TIMER_DEFAULT)
vty_out (vty, " timeout-timer %d%s", ripng->timeout_time,
VTY_NEWLINE);
VTYNL);
if (ripng->garbage_time != RIPNG_GARBAGE_TIMER_DEFAULT)
vty_out (vty, " garbage-timer %d%s", ripng->garbage_time,
VTY_NEWLINE);
VTYNL);
#endif /* 0 */
write += config_write_distribute (vty);

View File

@ -63,7 +63,7 @@ slow_func (struct vty *vty, const char *str, const int i)
printf ("%s: hard error\n", __func__);
if ((i % ITERS_PRINT) == 0)
printf ("%s did %d, x = %g%s", str, i, x, VTY_NEWLINE);
printf ("%s did %d, x = %g%s", str, i, x, VTYNL);
}
static void

View File

@ -2503,7 +2503,7 @@ DEFUN (vtysh_write_terminal,
fp = stdout;
vty_outln (vty, "Building configuration...");
vty_outln (vty, "%sCurrent configuration:",VTY_NEWLINE);
vty_outln (vty, "%sCurrent configuration:",VTYNL);
vty_outln (vty, "!");
for (i = 0; i < array_size(vtysh_client); i++)

View File

@ -39,10 +39,10 @@ DEFUN (show_debugging_zebra,
"Debugging information\n"
"Zebra configuration\n")
{
vty_out (vty, "Zebra debugging status:%s", VTY_NEWLINE);
vty_out (vty, "Zebra debugging status:%s", VTYNL);
if (IS_ZEBRA_DEBUG_EVENT)
vty_out (vty, " Zebra event debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra event debugging is on%s", VTYNL);
if (IS_ZEBRA_DEBUG_PACKET)
{
@ -50,40 +50,40 @@ DEFUN (show_debugging_zebra,
{
vty_out (vty, " Zebra packet%s debugging is on%s",
IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
VTY_NEWLINE);
VTYNL);
}
else
{
if (IS_ZEBRA_DEBUG_SEND)
vty_out (vty, " Zebra packet send%s debugging is on%s",
IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
VTY_NEWLINE);
VTYNL);
else
vty_out (vty, " Zebra packet receive%s debugging is on%s",
IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
VTY_NEWLINE);
VTYNL);
}
}
if (IS_ZEBRA_DEBUG_KERNEL)
vty_out (vty, " Zebra kernel debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra kernel debugging is on%s", VTYNL);
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
vty_out (vty, " Zebra kernel netlink message dumps (send) are on%s", VTY_NEWLINE);
vty_out (vty, " Zebra kernel netlink message dumps (send) are on%s", VTYNL);
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
vty_out (vty, " Zebra kernel netlink message dumps (recv) are on%s", VTY_NEWLINE);
vty_out (vty, " Zebra kernel netlink message dumps (recv) are on%s", VTYNL);
/* Check here using flags as the 'macro' does an OR */
if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB))
vty_out (vty, " Zebra RIB debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra RIB debugging is on%s", VTYNL);
if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
vty_out (vty, " Zebra RIB detailed debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra RIB detailed debugging is on%s", VTYNL);
if (IS_ZEBRA_DEBUG_FPM)
vty_out (vty, " Zebra FPM debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra FPM debugging is on%s", VTYNL);
if (IS_ZEBRA_DEBUG_NHT)
vty_out (vty, " Zebra next-hop tracking debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra next-hop tracking debugging is on%s", VTYNL);
if (IS_ZEBRA_DEBUG_MPLS)
vty_out (vty, " Zebra MPLS debugging is on%s", VTY_NEWLINE);
vty_out (vty, " Zebra MPLS debugging is on%s", VTYNL);
return CMD_SUCCESS;
}
@ -353,7 +353,7 @@ config_write_debug (struct vty *vty)
if (IS_ZEBRA_DEBUG_EVENT)
{
vty_out (vty, "debug zebra events%s", VTY_NEWLINE);
vty_out (vty, "debug zebra events%s", VTYNL);
write++;
}
if (IS_ZEBRA_DEBUG_PACKET)
@ -362,7 +362,7 @@ config_write_debug (struct vty *vty)
{
vty_out (vty, "debug zebra packet%s%s",
IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
VTY_NEWLINE);
VTYNL);
write++;
}
else
@ -370,53 +370,53 @@ config_write_debug (struct vty *vty)
if (IS_ZEBRA_DEBUG_SEND)
vty_out (vty, "debug zebra packet send%s%s",
IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
VTY_NEWLINE);
VTYNL);
else
vty_out (vty, "debug zebra packet recv%s%s",
IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
VTY_NEWLINE);
VTYNL);
write++;
}
}
if (IS_ZEBRA_DEBUG_KERNEL)
{
vty_out (vty, "debug zebra kernel%s", VTY_NEWLINE);
vty_out (vty, "debug zebra kernel%s", VTYNL);
write++;
}
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
{
vty_out (vty, "debug zebra kernel msgdump recv%s", VTY_NEWLINE);
vty_out (vty, "debug zebra kernel msgdump recv%s", VTYNL);
write++;
}
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
{
vty_out (vty, "debug zebra kernel msgdump send%s", VTY_NEWLINE);
vty_out (vty, "debug zebra kernel msgdump send%s", VTYNL);
write++;
}
/* Check here using flags as the 'macro' does an OR */
if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB))
{
vty_out (vty, "debug zebra rib%s", VTY_NEWLINE);
vty_out (vty, "debug zebra rib%s", VTYNL);
write++;
}
if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
{
vty_out (vty, "debug zebra rib detailed%s", VTY_NEWLINE);
vty_out (vty, "debug zebra rib detailed%s", VTYNL);
write++;
}
if (IS_ZEBRA_DEBUG_FPM)
{
vty_out (vty, "debug zebra fpm%s", VTY_NEWLINE);
vty_out (vty, "debug zebra fpm%s", VTYNL);
write++;
}
if (IS_ZEBRA_DEBUG_NHT)
{
vty_out (vty, "debug zebra nht%s", VTY_NEWLINE);
vty_out (vty, "debug zebra nht%s", VTYNL);
write++;
}
if (IS_ZEBRA_DEBUG_MPLS)
{
vty_out (vty, "debug zebra mpls%s", VTY_NEWLINE);
vty_out (vty, "debug zebra mpls%s", VTYNL);
write++;
}
return write;

View File

@ -1077,7 +1077,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp)
ifp->ifindex, ifp->metric, ifp->mtu, ifp->speed);
if (ifp->mtu6 != ifp->mtu)
vty_out (vty, "mtu6 %d ", ifp->mtu6);
vty_outln (vty, "%s flags: %s", VTY_NEWLINE,
vty_outln (vty, "%s flags: %s", VTYNL,
if_flag_dump(ifp->flags));
/* Hardware address. */
@ -1458,8 +1458,8 @@ DEFUN (show_interface_desc_vrf_all,
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
if (!list_isempty (vrf->iflist))
{
vty_outln (vty, "%s\tVRF %u%s", VTY_NEWLINE, vrf->vrf_id,
VTY_NEWLINE);
vty_outln (vty, "%s\tVRF %u%s", VTYNL, vrf->vrf_id,
VTYNL);
if_show_description (vty, vrf->vrf_id);
}

View File

@ -1451,8 +1451,8 @@ zfpm_show_stats (struct vty *vty)
zfpm_stats_t total_stats;
time_t elapsed;
vty_outln (vty, "%s%-40s %10s Last %2d secs%s", VTY_NEWLINE, "Counter",
"Total", ZFPM_STATS_IVL_SECS, VTY_NEWLINE);
vty_outln (vty, "%s%-40s %10s Last %2d secs%s", VTYNL, "Counter",
"Total", ZFPM_STATS_IVL_SECS, VTYNL);
/*
* Compute the total stats up to this instant.
@ -1490,7 +1490,7 @@ zfpm_show_stats (struct vty *vty)
elapsed = zfpm_get_elapsed_time (zfpm_g->last_stats_clear_time);
vty_outln (vty, "%sStats were cleared %lu seconds ago", VTY_NEWLINE,
vty_outln (vty, "%sStats were cleared %lu seconds ago", VTYNL,
(unsigned long)elapsed);
}

View File

@ -996,7 +996,7 @@ print_nh (struct nexthop *nexthop, struct vty *vty)
default:
break;
}
vty_out(vty, "%s", VTY_NEWLINE);
vty_out(vty, "%s", VTYNL);
}
static void
@ -1011,18 +1011,18 @@ print_rnh (struct route_node *rn, struct vty *vty)
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)" : "",
VTY_NEWLINE);
VTYNL);
if (rnh->state)
{
vty_out(vty, " resolved via %s%s",
zebra_route_string(rnh->state->type), VTY_NEWLINE);
zebra_route_string(rnh->state->type), VTYNL);
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)" : "",
VTY_NEWLINE);
VTYNL);
vty_out(vty, " Client list:");
for (ALL_LIST_ELEMENTS_RO(rnh->client_list, node, client))
@ -1030,5 +1030,5 @@ print_rnh (struct route_node *rn, struct vty *vty)
client->sock, rnh->filtered[client->proto] ? "(filtered)" : "");
if (!list_isempty(rnh->zebra_static_route_list))
vty_out(vty, " zebra%s", rnh->filtered[ZEBRA_ROUTE_STATIC] ? "(filtered)" : "");
vty_out(vty, "%s", VTY_NEWLINE);
vty_out(vty, "%s", VTYNL);
}

View File

@ -665,7 +665,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast)
vty_out (vty, "Routing entry for %s%s%s",
srcdest_rnode2str(rn, buf, sizeof(buf)), mcast_info,
VTY_NEWLINE);
VTYNL);
vty_out (vty, " Known via \"%s", zebra_route_string (re->type));
if (re->instance)
vty_out (vty, "[%d]", re->instance);
@ -688,7 +688,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast)
vty_out (vty, ", blackhole");
if (CHECK_FLAG (re->flags, ZEBRA_FLAG_REJECT))
vty_out (vty, ", reject");
vty_out (vty, "%s", VTY_NEWLINE);
vty_out (vty, "%s", VTYNL);
if (re->type == ZEBRA_ROUTE_RIP
|| re->type == ZEBRA_ROUTE_OSPF
@ -716,7 +716,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast)
vty_out (vty, "%02dw%dd%02dh",
tm->tm_yday/7,
tm->tm_yday - ((tm->tm_yday/7) * 7), tm->tm_hour);
vty_out (vty, " ago%s", VTY_NEWLINE);
vty_out (vty, " ago%s", VTYNL);
}
for (ALL_NEXTHOPS_RO(re->nexthop, nexthop, tnexthop, recursing))
@ -795,9 +795,9 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast)
nexthop->nh_label->label, buf, sizeof buf, 1));
}
vty_out (vty, "%s", VTY_NEWLINE);
vty_out (vty, "%s", VTYNL);
}
vty_out (vty, "%s", VTY_NEWLINE);
vty_out (vty, "%s", VTYNL);
}
}
@ -1085,7 +1085,7 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct route_entry *r
tm->tm_yday/7,
tm->tm_yday - ((tm->tm_yday/7) * 7), tm->tm_hour);
}
vty_out (vty, "%s", VTY_NEWLINE);
vty_out (vty, "%s", VTYNL);
}
}
@ -1190,7 +1190,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi,
vty_out (vty, SHOW_ROUTE_V6_HEADER);
if (zvrf_id (zvrf) != VRF_DEFAULT)
vty_outln (vty, "%sVRF %s:", VTY_NEWLINE,
vty_outln (vty, "%sVRF %s:", VTYNL,
zvrf_name(zvrf));
first = 0;
@ -1251,7 +1251,7 @@ DEFUN (show_ip_nht_vrf_all,
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
if ((zvrf = vrf->info) != NULL)
{
vty_outln (vty, "%sVRF %s:", VTY_NEWLINE, zvrf_name(zvrf));
vty_outln (vty, "%sVRF %s:", VTYNL, zvrf_name(zvrf));
zebra_print_rnh_table(zvrf_id (zvrf), AF_INET, vty, RNH_NEXTHOP_TYPE);
}
@ -1291,7 +1291,7 @@ DEFUN (show_ipv6_nht_vrf_all,
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
if ((zvrf = vrf->info) != NULL)
{
vty_outln (vty, "%sVRF %s:", VTY_NEWLINE, zvrf_name(zvrf));
vty_outln (vty, "%sVRF %s:", VTYNL, zvrf_name(zvrf));
zebra_print_rnh_table(zvrf_id (zvrf), AF_INET6, vty, RNH_NEXTHOP_TYPE);
}