*bgp = bgp_get_default ();
if (!*bgp)
{
- vty_out (vty, "Unable to find default BGP instance%s", VTYNL);
+ vty_out (vty, "Unable to find default BGP instance\n");
*idx = 0;
return 0;
}
peer = peer_lookup (bgp, &su);
if (! peer)
{
- vty_out (vty, "%% Specify remote-as or peer-group commands first%s",
- VTYNL);
+ vty_out (vty, "%% Specify remote-as or peer-group commands first\n");
return NULL;
}
if (peer_dynamic_neighbor (peer))
{
- vty_out (vty, "%% Operation not allowed on a dynamic neighbor%s",
- VTYNL);
+ vty_out (vty, "%% Operation not allowed on a dynamic neighbor\n");
return NULL;
}
{
if (peer_dynamic_neighbor (peer))
{
- vty_out (vty, "%% Operation not allowed on a dynamic neighbor%s",
- VTYNL);
+ vty_out (vty, "%% Operation not allowed on a dynamic neighbor\n");
return NULL;
}
if (group)
return group->conf;
- vty_out (vty, "%% Specify remote-as or peer-group commands first%s",
- VTYNL);
+ vty_out (vty, "%% Specify remote-as or peer-group commands first\n");
return NULL;
}
bgp = bgp_get_default ();
if (bgp == NULL)
{
- vty_out (vty, "No BGP process is configured%s", VTYNL);
+ vty_out (vty, "No BGP process is configured\n");
return CMD_WARNING;
}
}
ret = bgp_option_unset (BGP_OPT_MULTIPLE_INSTANCE);
if (ret < 0)
{
- vty_out (vty, "%% There are more than two BGP instances%s", VTYNL);
+ vty_out (vty, "%% There are more than two BGP instances\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
if (bgp == NULL)
{
- vty_out (vty, "%% No BGP process is configured%s", VTYNL);
+ vty_out (vty, "%% No BGP process is configured\n");
return CMD_WARNING;
}
if (listcount(bm->bgp) > 1)
{
- vty_out (vty, "%% Multiple BGP processes are configured%s", VTYNL);
+ vty_out (vty, "%% Multiple BGP processes are configured\n");
return CMD_WARNING;
}
}
switch (ret)
{
case BGP_ERR_MULTIPLE_INSTANCE_NOT_SET:
- vty_out (vty, "Please specify 'bgp multiple-instance' first%s",
- VTYNL);
+ 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);
return CMD_WARNING;
case BGP_ERR_INSTANCE_MISMATCH:
- vty_out (vty, "BGP instance name and AS number mismatch%s", VTYNL);
+ 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);
return CMD_WARNING;
if (bgp == NULL)
{
- vty_out (vty, "%% No BGP process is configured%s", VTYNL);
+ vty_out (vty, "%% No BGP process is configured\n");
return CMD_WARNING;
}
if (listcount(bm->bgp) > 1)
{
- vty_out (vty, "%% Multiple BGP processes are configured%s", VTYNL);
+ vty_out (vty, "%% Multiple BGP processes are configured\n");
return CMD_WARNING;
}
}
bgp = bgp_lookup (as, name);
if (! bgp)
{
- vty_out (vty, "%% Can't find BGP instance%s", VTYNL);
+ vty_out (vty, "%% Can't find BGP instance\n");
return CMD_WARNING;
}
}
ret = inet_aton (argv[idx_ipv4]->arg, &cluster);
if (! ret)
{
- vty_out (vty, "%% Malformed bgp cluster identifier%s", VTYNL);
+ vty_out (vty, "%% Malformed bgp cluster identifier\n");
return CMD_WARNING;
}
if (bgp->as == as)
{
- vty_out (vty, "%% Local member-AS not allowed in confed peer list%s",
- VTYNL);
+ vty_out (vty, "%% Local member-AS not allowed in confed peer list\n");
continue;
}
establish_wait = atoi (wait);
if (update_delay < establish_wait)
{
- vty_out (vty, "%%Failed: update-delay less than the establish-wait!%s",
- VTYNL);
+ vty_out (vty, "%%Failed: update-delay less than the establish-wait!\n");
return CMD_WARNING;
}
vty_out (vty, " update-delay %d", bgp->v_update_delay);
if (bgp->v_update_delay != bgp->v_establish_wait)
vty_out (vty, " %d", bgp->v_establish_wait);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
if (CHECK_FLAG (bgp->maxpaths[afi][safi].ibgp_flags,
BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN))
vty_out (vty, " equal-cluster-length");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
/* Holdtime value check. */
if (holdtime < 3 && holdtime != 0)
{
- vty_out (vty, "%% hold time value must be either 0 or greater than 3%s",
- VTYNL);
+ vty_out (vty, "%% hold time value must be either 0 or greater than 3\n");
return CMD_WARNING;
}
if (bestpath_per_as_used)
{
- vty_out (vty, "bgp deterministic-med cannot be disabled while addpath-tx-bestpath-per-AS is in use%s",
- VTYNL);
+ vty_out (vty, "bgp deterministic-med cannot be disabled while addpath-tx-bestpath-per-AS is in use\n");
return CMD_WARNING;
}
else
ret = str2prefix (prefix, &range);
if (! ret)
{
- vty_out (vty, "%% Malformed listen range%s", VTYNL);
+ vty_out (vty, "%% Malformed listen range\n");
return CMD_WARNING;
}
if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6))
{
- vty_out (vty, "%% Malformed listen range (link-local address)%s",
- VTYNL);
+ vty_out (vty, "%% Malformed listen range (link-local address)\n");
return CMD_WARNING;
}
/* Check if an overlapping listen range exists. */
if (listen_range_exists (bgp, &range, 0))
{
- vty_out (vty, "%% Listen range overlaps with existing listen range%s",
- VTYNL);
+ vty_out (vty, "%% Listen range overlaps with existing listen range\n");
return CMD_WARNING;
}
group = peer_group_lookup (bgp, peergroup);
if (! group)
{
- vty_out (vty, "%% Configure the peer-group first%s", VTYNL);
+ vty_out (vty, "%% Configure the peer-group first\n");
return CMD_WARNING;
}
ret = str2prefix (prefix, &range);
if (! ret)
{
- vty_out (vty, "%% Malformed listen range%s", VTYNL);
+ vty_out (vty, "%% Malformed listen range\n");
return CMD_WARNING;
}
if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6))
{
- vty_out (vty, "%% Malformed listen range (link-local address)%s",
- VTYNL);
+ vty_out (vty, "%% Malformed listen range (link-local address)\n");
return CMD_WARNING;
}
group = peer_group_lookup (bgp, peergroup);
if (! group)
{
- vty_out (vty, "%% Peer-group does not exist%s", VTYNL);
+ vty_out (vty, "%% Peer-group does not exist\n");
return CMD_WARNING;
}
ret = peer_group_remote_as (bgp, peer_str, &as, as_type);
if (ret < 0)
{
- vty_out (vty, "%% Create the peer-group or interface first%s",
- VTYNL);
+ vty_out (vty, "%% Create the peer-group or interface first\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
{
if (peer_address_self_check (bgp, &su))
{
- vty_out (vty, "%% Can not configure the local system as neighbor%s",
- VTYNL);
+ vty_out (vty, "%% Can not configure the local system as neighbor\n");
return CMD_WARNING;
}
ret = peer_remote_as (bgp, &su, NULL, &as, as_type, afi, safi);
if (group)
{
- vty_out (vty, "%% Name conflict with peer-group %s", VTYNL);
+ vty_out (vty, "%% Name conflict with peer-group \n");
return CMD_WARNING;
}
group = peer_group_lookup (bgp, peer_group_name);
if (! group)
{
- vty_out (vty, "%% Configure the peer-group first%s", VTYNL);
+ vty_out (vty, "%% Configure the peer-group first\n");
return CMD_WARNING;
}
peer = peer_lookup_by_conf_if (bgp, argv[idx_word]->arg);
if (peer)
{
- vty_out (vty, "%% Name conflict with interface: %s", VTYNL);
+ vty_out (vty, "%% Name conflict with interface: \n");
return CMD_WARNING;
}
peer_group_delete (group);
else
{
- vty_out (vty, "%% Create the peer-group first%s", VTYNL);
+ vty_out (vty, "%% Create the peer-group first\n");
return CMD_WARNING;
}
}
{
if (peer_dynamic_neighbor (peer))
{
- vty_out (vty, "%% Operation not allowed on a dynamic neighbor%s",
- VTYNL);
+ vty_out (vty, "%% Operation not allowed on a dynamic neighbor\n");
return CMD_WARNING;
}
}
else
{
- vty_out (vty, "%% Create the bgp interface first%s", VTYNL);
+ vty_out (vty, "%% Create the bgp interface first\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
peer_group_delete (group);
else
{
- vty_out (vty, "%% Create the peer-group first%s", VTYNL);
+ vty_out (vty, "%% Create the peer-group first\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
peer_group_remote_as_delete (group);
else
{
- vty_out (vty, "%% Create the peer-group or interface first%s", VTYNL);
+ vty_out (vty, "%% Create the peer-group or interface first\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
{
if (peer_address_self_check (bgp, &su))
{
- vty_out (vty, "%% Can not configure the local system as neighbor%s",
- VTYNL);
+ vty_out (vty, "%% Can not configure the local system as neighbor\n");
return CMD_WARNING;
}
peer = peer_lookup (bgp, &su);
if (peer && peer_dynamic_neighbor (peer))
{
- vty_out (vty, "%% Operation not allowed on a dynamic neighbor%s",
- VTYNL);
+ vty_out (vty, "%% Operation not allowed on a dynamic neighbor\n");
return CMD_WARNING;
}
}
group = peer_group_lookup (bgp, argv[idx_word]->arg);
if (! group)
{
- vty_out (vty, "%% Configure the peer-group first%s", VTYNL);
+ vty_out (vty, "%% Configure the peer-group first\n");
return CMD_WARNING;
}
group = peer_group_lookup (bgp, argv[idx_word]->arg);
if (! group)
{
- vty_out (vty, "%% Configure the peer-group first%s", VTYNL);
+ vty_out (vty, "%% Configure the peer-group first\n");
return CMD_WARNING;
}
{
if (str2prefix (source_str, &p))
{
- vty_out (vty, "%% Invalid update-source, remove prefix length %s",
- VTYNL);
+ vty_out (vty, "%% Invalid update-source, remove prefix length \n");
return CMD_WARNING;
}
else
bgp = bgp_get_default ();
if (bgp == NULL)
{
- vty_out (vty, "%% No BGP process is configured%s", VTYNL);
+ vty_out (vty, "%% No BGP process is configured\n");
return CMD_WARNING;
}
}
ret = str2prefix (ip_str, &match);
if (! ret)
{
- vty_out (vty, "%% address is malformed%s", VTYNL);
+ vty_out (vty, "%% address is malformed\n");
return CMD_WARNING;
}
if (!bgp_option_check (BGP_OPT_MULTIPLE_INSTANCE))
{
- vty_out (vty, "BGP Multiple Instance is not enabled%s", VTYNL);
+ vty_out (vty, "BGP Multiple Instance is not enabled\n");
return CMD_WARNING;
}
- vty_out (vty, "Defined BGP views:%s", VTYNL);
+ vty_out (vty, "Defined BGP views:\n");
for (ALL_LIST_ELEMENTS_RO(inst, node, bgp))
{
/* Skip VRFs. */
if (!bgp_option_check (BGP_OPT_MULTIPLE_INSTANCE))
{
- vty_out (vty, "BGP Multiple Instance is not enabled%s", VTYNL);
+ vty_out (vty, "BGP Multiple Instance is not enabled\n");
return CMD_WARNING;
}
vty_out (vty,
"BGP router identifier %s, local AS number %u vrf-id %d",
inet_ntoa (bgp->router_id), bgp->as, vrf_id_ui);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (bgp_update_delay_configured(bgp))
{
vty_out (vty, " First neighbor established: %s%s",
bgp->update_delay_begin_time, VTYNL);
- vty_out (vty, " Delay in progress%s", VTYNL);
+ vty_out (vty, " Delay in progress\n");
}
else
{
else
{
if (bgp_maxmed_onstartup_configured(bgp) && bgp->maxmed_active)
- vty_out (vty, "Max-med on-startup active%s", VTYNL);
+ vty_out (vty, "Max-med on-startup active\n");
if (bgp->v_maxmed_admin)
- vty_out (vty, "Max-med administrative active%s", VTYNL);
+ vty_out (vty, "Max-med administrative active\n");
vty_out(vty, "BGP table version %" PRIu64 "%s",
bgp_table_version(bgp->rib[afi][safi]), VTYNL);
VTYNL);
if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
- vty_out (vty, "Dampening enabled.%s", VTYNL);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "Dampening enabled.\n");
+ vty_out (vty, "\n");
/* Subtract 8 here because 'Neighbor' is 8 characters */
vty_out (vty, "Neighbor");
vty_out (vty, "%*s", max_neighbor_width - 8, " ");
- vty_out (vty, "V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd%s", VTYNL);
+ vty_out (vty, "V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd\n");
}
}
else
vty_out (vty, " %12s", lookup_msg(bgp_status_msg, peer->status, NULL));
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
if (dn_count && ! use_json)
{
- vty_out(vty, "* - dynamic neighbor%s", VTYNL);
+ vty_out(vty, "* - dynamic neighbor\n");
vty_out(vty,
"%d dynamic neighbor(s), limit %d%s",
dn_count, bgp->dynamic_neighbors_limit, VTYNL);
bool json_output = false;
if (use_json && is_wildcard)
- vty_out (vty, "{%s", VTYNL);
+ vty_out (vty, "{\n");
if (afi_wildcard)
afi = 1; /* AFI_IP */
while (afi < AFI_MAX)
json = json_object_new_object();
if (! is_first)
- vty_out (vty, ",%s", VTYNL);
+ vty_out (vty, ",\n");
else
is_first = 0;
}
if (use_json && is_wildcard)
- vty_out (vty, "}%s", VTYNL);
+ vty_out (vty, "}\n");
else if (use_json && !json_output)
- vty_out (vty, "{}%s", VTYNL);
+ vty_out (vty, "{}\n");
}
static void
int is_first = 1;
if (use_json)
- vty_out (vty, "{%s", VTYNL);
+ vty_out (vty, "{\n");
for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
json = json_object_new_object();
if (! is_first)
- vty_out (vty, ",%s", VTYNL);
+ vty_out (vty, ",\n");
else
is_first = 0;
}
if (use_json)
- vty_out (vty, "}%s", VTYNL);
+ vty_out (vty, "}\n");
}
if (! bgp)
{
if (use_json)
- vty_out (vty, "{}%s", VTYNL);
+ vty_out (vty, "{}\n");
else
- vty_out (vty, "%% No such BGP instance exist%s", VTYNL);
+ vty_out (vty, "%% No such BGP instance exist\n");
return CMD_WARNING;
}
vty_out (vty, "%sreceived",
CHECK_FLAG (p->af_cap[afi][safi], adv_smcap) ?
", " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
vty_out (vty, "%sreceived",
CHECK_FLAG (p->af_cap[afi][safi], adv_rmcap) ?
", " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
}
else
{
- vty_out(vty, " Not part of any update group%s", VTYNL);
+ vty_out(vty, " Not part of any update group\n");
}
if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_ADV)
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_RCV)
|| 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)
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_OLD_RCV))
- vty_out (vty, " AF-dependant capabilities:%s", VTYNL);
+ vty_out (vty, " AF-dependant capabilities:\n");
if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_ADV)
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_RCV)
vty_out (vty, " sent;");
if (orf_pfx_count)
vty_out (vty, " received (%d entries)", orf_pfx_count);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (CHECK_FLAG (p->af_sflags[afi][safi], PEER_STATUS_ORF_WAIT_REFRESH))
- vty_out (vty, " First update is deferred until ORF or ROUTE-REFRESH is received%s", VTYNL);
+ vty_out (vty, " First update is deferred until ORF or ROUTE-REFRESH is received\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REFLECTOR_CLIENT))
- vty_out (vty, " Route-Reflector Client%s", VTYNL);
+ vty_out (vty, " Route-Reflector Client\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT))
- vty_out (vty, " Route-Server Client%s", VTYNL);
+ vty_out (vty, " Route-Server Client\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG))
- vty_out (vty, " Inbound soft reconfiguration allowed%s", VTYNL);
+ vty_out (vty, " Inbound soft reconfiguration allowed\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE))
- vty_out (vty, " Private AS numbers (all) replaced in updates to this neighbor%s", VTYNL);
+ vty_out (vty, " Private AS numbers (all) replaced in updates to this neighbor\n");
else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE))
- vty_out (vty, " Private AS numbers replaced in updates to this neighbor%s", VTYNL);
+ vty_out (vty, " Private AS numbers replaced in updates to this neighbor\n");
else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REMOVE_PRIVATE_AS_ALL))
- vty_out (vty, " Private AS numbers (all) removed in updates to this neighbor%s", VTYNL);
+ vty_out (vty, " Private AS numbers (all) removed in updates to this neighbor\n");
else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REMOVE_PRIVATE_AS))
- vty_out (vty, " Private AS numbers removed in updates to this neighbor%s", VTYNL);
+ vty_out (vty, " Private AS numbers removed in updates to this neighbor\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_ADDPATH_TX_ALL_PATHS))
- vty_out (vty, " Advertise all paths via addpath%s", VTYNL);
+ vty_out (vty, " Advertise all paths via addpath\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS))
- vty_out (vty, " Advertise bestpath per AS via addpath%s", VTYNL);
+ vty_out (vty, " Advertise bestpath per AS via addpath\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_AS_OVERRIDE))
- vty_out (vty, " Override ASNs in outbound updates if aspath equals remote-as%s", VTYNL);
+ vty_out (vty, " Override ASNs in outbound updates if aspath equals remote-as\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_NEXTHOP_SELF) ||
CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_FORCE_NEXTHOP_SELF))
- vty_out (vty, " NEXT_HOP is always this router%s", VTYNL);
+ vty_out (vty, " NEXT_HOP is always this router\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_AS_PATH_UNCHANGED))
- vty_out (vty, " AS_PATH is propagated unchanged to this neighbor%s", VTYNL);
+ vty_out (vty, " AS_PATH is propagated unchanged to this neighbor\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_NEXTHOP_UNCHANGED))
- vty_out (vty, " NEXT_HOP is propagated unchanged to this neighbor%s", VTYNL);
+ vty_out (vty, " NEXT_HOP is propagated unchanged to this neighbor\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_MED_UNCHANGED))
- vty_out (vty, " MED is propagated unchanged to this neighbor%s", VTYNL);
+ vty_out (vty, " MED is propagated unchanged to this neighbor\n");
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_COMMUNITY)
|| CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY)
|| CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_LARGE_COMMUNITY))
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_COMMUNITY)
&& CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY)
&& CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_LARGE_COMMUNITY))
- vty_out (vty, "(all)%s", VTYNL);
+ vty_out (vty, "(all)\n");
else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_LARGE_COMMUNITY))
- vty_out (vty, "(large)%s", VTYNL);
+ vty_out (vty, "(large)\n");
else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY))
- vty_out (vty, "(extended)%s", VTYNL);
+ vty_out (vty, "(extended)\n");
else
- vty_out (vty, "(standard)%s", VTYNL);
+ vty_out (vty, "(standard)\n");
}
if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_DEFAULT_ORIGINATE))
{
p->default_rmap[afi][safi].map ? "*" : "",
p->default_rmap[afi][safi].name);
if (paf && PAF_SUBGRP(paf) && CHECK_FLAG(PAF_SUBGRP(paf)->sflags, SUBGRP_STATUS_DEFAULT_ORIGINATE))
- vty_out (vty, " default sent%s", VTYNL);
+ vty_out (vty, " default sent\n");
else
- vty_out (vty, " default not sent%s", VTYNL);
+ vty_out (vty, " default not sent\n");
}
if (filter->plist[FILTER_IN].name
|| filter->dlist[FILTER_IN].name
|| filter->aslist[FILTER_IN].name
|| filter->map[RMAP_IN].name)
- vty_out (vty, " Inbound path policy configured%s", VTYNL);
+ vty_out (vty, " Inbound path policy configured\n");
if (filter->plist[FILTER_OUT].name
|| filter->dlist[FILTER_OUT].name
|| filter->aslist[FILTER_OUT].name
|| filter->map[RMAP_OUT].name
|| filter->usmap.name)
- vty_out (vty, " Outbound path policy configured%s", VTYNL);
+ vty_out (vty, " Outbound path policy configured\n");
/* prefix-list */
if (filter->plist[FILTER_IN].name)
p->pmax_threshold[afi][safi]);
if (p->pmax_restart[afi][safi])
vty_out (vty, ", restart interval %d min", p->pmax_restart[afi][safi]);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
else
{
if (CHECK_FLAG(bgp->config, BGP_CONFIG_CONFEDERATION))
- vty_out (vty, "confed-internal link%s", VTYNL);
+ vty_out (vty, "confed-internal link\n");
else
- vty_out (vty, "internal link%s", VTYNL);
+ vty_out (vty, "internal link\n");
}
}
else
else
{
if (bgp_confederation_peers_check(bgp, p->as))
- vty_out (vty, "confed-external link%s", VTYNL);
+ vty_out (vty, "confed-external link\n");
else
- vty_out (vty, "external link%s", VTYNL);
+ vty_out (vty, "external link\n");
}
}
{
/* Administrative shutdown. */
if (CHECK_FLAG (p->flags, PEER_FLAG_SHUTDOWN))
- vty_out (vty, " Administratively shut down%s", VTYNL);
+ vty_out (vty, " Administratively shut down\n");
/* BGP Version. */
vty_out (vty, " BGP version 4");
/* Confederation */
if (CHECK_FLAG (bgp->config, BGP_CONFIG_CONFEDERATION)
&& bgp_confederation_peers_check (bgp, p->as))
- vty_out (vty, " Neighbor under common administration%s", VTYNL);
+ vty_out (vty, " Neighbor under common administration\n");
/* Status. */
vty_out (vty, " BGP state = %s", lookup_msg(bgp_status_msg, p->status, NULL));
else if (CHECK_FLAG (p->sflags, PEER_STATUS_NSF_WAIT))
vty_out (vty, " (NSF passive)");
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
/* read timer */
vty_out (vty, " Last read %s", peer_uptime (p->readtime, timebuf, BGP_UPTIME_LEN, 0, NULL));
}
else
{
- vty_out (vty, " Neighbor capabilities:%s", VTYNL);
+ vty_out (vty, " Neighbor capabilities:\n");
/* AS4 */
if (CHECK_FLAG (p->cap, PEER_CAP_AS4_RCV)
if (CHECK_FLAG (p->cap, PEER_CAP_AS4_RCV))
vty_out (vty, " %sreceived",
CHECK_FLAG (p->cap, PEER_CAP_AS4_ADV) ? "and " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* AddPath */
if (CHECK_FLAG (p->cap, PEER_CAP_ADDPATH_RCV)
|| CHECK_FLAG (p->cap, PEER_CAP_ADDPATH_ADV))
{
- vty_out (vty, " AddPath:%s", VTYNL);
+ vty_out (vty, " AddPath:\n");
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_TX_RCV))
vty_out (vty, "%sreceived", CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_TX_ADV) ? " and " : "" );
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_ADV) ||
if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_RCV))
vty_out (vty, "%sreceived", CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_ADV) ? " and " : "" );
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
if (CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_RCV))
vty_out (vty, " %sreceived",
CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_ADV) ? "and " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Extended nexthop */
if (CHECK_FLAG (p->cap, PEER_CAP_ENHE_RCV))
vty_out (vty, " %sreceived",
CHECK_FLAG (p->cap, PEER_CAP_ENHE_ADV) ? "and " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
if (CHECK_FLAG (p->cap, PEER_CAP_ENHE_RCV))
{
&& CHECK_FLAG (p->cap, PEER_CAP_REFRESH_NEW_RCV)) ?
"old & new" : CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV) ? "old" : "new");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Multiprotocol Extensions */
vty_out (vty, " advertised");
if (p->afc_recv[afi][safi])
vty_out (vty, " %sreceived", p->afc_adv[afi][safi] ? "and " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Hostname capability */
if (CHECK_FLAG (p->cap, PEER_CAP_HOSTNAME_RCV))
vty_out (vty, " %sreceived",
CHECK_FLAG (p->cap, PEER_CAP_HOSTNAME_ADV) ? "and " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Gracefull Restart */
if (CHECK_FLAG (p->cap, PEER_CAP_RESTART_RCV))
vty_out (vty, " %sreceived",
CHECK_FLAG (p->cap, PEER_CAP_RESTART_ADV) ? "and " : "");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
if (CHECK_FLAG (p->cap, PEER_CAP_RESTART_RCV))
{
}
if (! restart_af_count)
vty_out (vty, "none");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
}
else
{
- vty_out (vty, " Graceful restart informations:%s", VTYNL);
+ vty_out (vty, " Graceful restart informations:\n");
if (p->status == Established)
{
vty_out (vty, " End-of-RIB send: ");
}
}
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
vty_out (vty, " End-of-RIB received: ");
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
{
}
}
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (p->t_gr_restart)
else
{
/* Packet counts. */
- vty_out (vty, " Message statistics:%s", VTYNL);
- vty_out (vty, " Inq depth is 0%s", VTYNL);
+ 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, " Sent Rcvd%s", VTYNL);
+ 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, "%s", p->update_if);
else if (p->update_source)
vty_out (vty, "%s", sockunion2str (p->update_source, buf1, SU_ADDRSTRLEN));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Address Family Information */
if (use_json)
json_object_string_add(json_neigh, "lastReset", "never");
else
- vty_out (vty, " Last reset never%s", VTYNL);
+ vty_out (vty, " Last reset never\n");
}
else
{
}
}
}
- vty_out(vty, "%s", VTYNL);
+ vty_out(vty, "\n");
}
}
}
if (use_json)
json_object_boolean_true_add(json_neigh, "prefixesConfigExceedMax");
else
- vty_out (vty, " Peer had exceeded the max. no. of prefixes configured.%s", VTYNL);
+ vty_out (vty, " Peer had exceeded the max. no. of prefixes configured.\n");
if (p->t_pmax_restart)
{
p->v_routeadv, thread_timer_remain_second (p->t_routeadv),
VTYNL);
if (p->password)
- vty_out (vty, "Peer Authentication Enabled%s", VTYNL);
+ vty_out (vty, "Peer Authentication Enabled\n");
vty_out (vty, "Read thread: %s Write thread: %s%s",
p->t_read ? "on" : "off",
bgp_capability_vty_out (vty, p, use_json, json_neigh);
if (!use_json)
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
/* BFD information. */
bgp_bfd_show_info(vty, p, use_json, json_neigh);
if (use_json)
json_object_boolean_true_add(json, "bgpNoSuchNeighbor");
else
- vty_out (vty, "%% No such neighbor%s", VTYNL);
+ vty_out (vty, "%% No such neighbor\n");
}
if (use_json)
}
else
{
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return CMD_SUCCESS;
int is_first = 1;
if (use_json)
- vty_out (vty, "{%s", VTYNL);
+ vty_out (vty, "{\n");
for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
? "Default" : bgp->name);
if (! is_first)
- vty_out (vty, ",%s", VTYNL);
+ vty_out (vty, ",\n");
else
is_first = 0;
}
if (use_json)
- vty_out (vty, "}%s", VTYNL);
+ vty_out (vty, "}\n");
}
static int
json_object_free(json);
}
else
- vty_out (vty, "%% No such BGP instance exist%s", VTYNL);
+ vty_out (vty, "%% No such BGP instance exist\n");
return CMD_WARNING;
}
BGP_SAFI_HELP_STR
"Path information\n")
{
- vty_out (vty, "Address Refcnt Path%s", VTYNL);
+ vty_out (vty, "Address Refcnt Path\n");
aspath_print_all_vty (vty);
return CMD_SUCCESS;
}
BGP_STR
"List all bgp community information\n")
{
- vty_out (vty, "Address Refcnt Community%s", VTYNL);
+ vty_out (vty, "Address Refcnt Community\n");
hash_iterate (community_hash (),
(void (*) (struct hash_backet *, void *))
BGP_STR
"List all bgp large-community information\n")
{
- vty_out (vty, "Address Refcnt Large-community%s", VTYNL);
+ vty_out (vty, "Address Refcnt Large-community\n");
hash_iterate (lcommunity_hash (),
(void (*) (struct hash_backet *, void *))
}
if ((group->bgp->as == conf->as) || (conf->as_type == AS_INTERNAL))
- vty_out (vty, " Peer-group type is internal%s", VTYNL);
+ vty_out (vty, " Peer-group type is internal\n");
else
- vty_out (vty, " Peer-group type is external%s", VTYNL);
+ vty_out (vty, " Peer-group type is external\n");
/* Display AFs configured. */
vty_out (vty, " Configured address-families:");
}
}
if (!af_cfgd)
- vty_out (vty, " none%s", VTYNL);
+ vty_out (vty, " none\n");
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
/* Display listen ranges (for dynamic neighbors), if any */
for (afi = AFI_IP; afi < AFI_MAX; afi++)
/* Display group members and their status */
if (listcount(group->peer))
{
- vty_out (vty, " Peer-group members:%s", VTYNL);
+ vty_out (vty, " Peer-group members:\n");
for (ALL_LIST_ELEMENTS (group->peer, node, nnode, peer))
{
if (CHECK_FLAG (peer->flags, PEER_FLAG_SHUTDOWN))
}
if (type == show_peer_group && ! find)
- vty_out (vty, "%% No such peer-group%s", VTYNL);
+ vty_out (vty, "%% No such peer-group\n");
return CMD_SUCCESS;
}
if (! bgp)
{
- vty_out (vty, "%% No such BGP instance exist%s", VTYNL);
+ vty_out (vty, "%% No such BGP instance exist\n");
return CMD_WARNING;
}
type = proto_redistnum (AFI_IP, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
bgp_redist_add(bgp, AFI_IP, type, 0);
type = proto_redistnum (AFI_IP, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
type = proto_redistnum (AFI_IP, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
metric = strtoul(argv[idx_number]->arg, NULL, 10);
type = proto_redistnum (AFI_IP, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
metric = strtoul(argv[idx_number]->arg, NULL, 10);
type = proto_redistnum (AFI_IP, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
metric = strtoul(argv[idx_number]->arg, NULL, 10);
type = proto_redistnum (AFI_IP, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
return bgp_redistribute_unset (bgp, AFI_IP, type, 0);
type = proto_redistnum (AFI_IP6, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
type = proto_redistnum (AFI_IP6, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
type = proto_redistnum (AFI_IP6, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
metric = strtoul(argv[idx_number]->arg, NULL, 10);
type = proto_redistnum (AFI_IP6, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
metric = strtoul(argv[idx_number]->arg, NULL, 10);
type = proto_redistnum (AFI_IP6, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
metric = strtoul(argv[idx_number]->arg, NULL, 10);
type = proto_redistnum (AFI_IP6, argv[idx_protocol]->text);
if (type < 0)
{
- vty_out (vty, "%% Invalid route type%s", VTYNL);
+ vty_out (vty, "%% Invalid route type\n");
return CMD_WARNING;
}
vty_out (vty, " metric %u", red->redist_metric);
if (red->rmap.name)
vty_out (vty, " route-map %s", red->rmap.name);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
switch (ret)
{
case COMMUNITY_LIST_ERR_CANT_FIND_LIST:
- vty_out (vty, "%% Can't find community-list%s", VTYNL);
+ vty_out (vty, "%% Can't find community-list\n");
break;
case COMMUNITY_LIST_ERR_MALFORMED_VAL:
- vty_out (vty, "%% Malformed community-list value%s", VTYNL);
+ vty_out (vty, "%% Malformed community-list value\n");
break;
case COMMUNITY_LIST_ERR_STANDARD_CONFLICT:
- vty_out (vty, "%% Community name conflict, previously defined as standard community%s", VTYNL);
+ vty_out (vty, "%% Community name conflict, previously defined as standard community\n");
break;
case COMMUNITY_LIST_ERR_EXPANDED_CONFLICT:
- vty_out (vty, "%% Community name conflict, previously defined as expanded community%s", VTYNL);
+ vty_out (vty, "%% Community name conflict, previously defined as expanded community\n");
break;
}
}
list = community_list_lookup (bgp_clist, argv[idx_comm_list]->arg, COMMUNITY_LIST_MASTER);
if (! list)
{
- vty_out (vty, "%% Can't find community-list%s", VTYNL);
+ vty_out (vty, "%% Can't find community-list\n");
return CMD_WARNING;
}
cl_name = argv[idx]->arg;
if (reject_all_digit_name && all_digit (cl_name))
{
- vty_out (vty, "%% Community name cannot have all digits%s", VTYNL);
+ vty_out (vty, "%% Community name cannot have all digits\n");
return CMD_WARNING;
}
list = community_list_lookup (bgp_clist, argv[3]->arg, LARGE_COMMUNITY_LIST_MASTER);
if (! list)
{
- vty_out (vty, "%% Can't find extcommunity-list%s", VTYNL);
+ vty_out (vty, "%% Can't find extcommunity-list\n");
return CMD_WARNING;
}
list = community_list_lookup (bgp_clist, argv[idx_comm_list]->arg, EXTCOMMUNITY_LIST_MASTER);
if (! list)
{
- vty_out (vty, "%% Can't find extcommunity-list%s", VTYNL);
+ vty_out (vty, "%% Can't find extcommunity-list\n");
return CMD_WARNING;
}
if (!rfg)
{
/* Error out of memory */
- vty_out (vty, "Can't allocate memory for NVE group%s", VTYNL);
+ vty_out (vty, "Can't allocate memory for NVE group\n");
return CMD_WARNING;
}
if (!bgp)
{
- vty_out (vty, "No BGP process is configured%s", VTYNL);
+ vty_out (vty, "No BGP process is configured\n");
return CMD_WARNING;
}
if (!rfg)
{
/* Error out of memory */
- vty_out (vty, "Can't allocate memory for NVE group%s", VTYNL);
+ vty_out (vty, "Can't allocate memory for NVE group\n");
return CMD_WARNING;
}
}
if (!str2prefix (argv[1]->arg, &p) && p.family)
{
- //vty_out (vty, "Nexthop set to self%s", VTYNL);
+ //vty_out (vty, "Nexthop set to self\n");
SET_FLAG (rfg->flags, RFAPI_RFG_VPN_NH_SELF);
memset(&rfg->vn_prefix, 0, sizeof(struct prefix));
}
if (!bgp)
{
- vty_out (vty, "No BGP process is configured%s", VTYNL);
+ vty_out (vty, "No BGP process is configured\n");
return CMD_WARNING;
}
if (!rfg)
{
/* Error out of memory */
- vty_out (vty, "Can't allocate memory for L2 group%s", VTYNL);
+ vty_out (vty, "Can't allocate memory for L2 group\n");
return CMD_WARNING;
}
rfg->name = strdup (argv[1]->arg);
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", VTYNL);
+ //vty_out (vty, "nexthop self\n");
}
else
{
if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
{
- vty_out (vty, "%% Only inactive interfaces can be deleted%s",
- VTYNL);
+ vty_out (vty, "%% Only inactive interfaces can be deleted\n");
return CMD_WARNING;
}
vty_out (vty, "\n");
write++;
}
- /* vty_out (vty, "!%s", VTYNL); */
+ /* vty_out (vty, "!\n"); */
}
for (plist = master->str.head; plist; plist = plist->next)
ret = smux_str2oid (oid_str, oid, &oid_len);
if (ret != 0)
{
- vty_out (vty, "object ID malformed%s", VTYNL);
+ vty_out (vty, "object ID malformed\n");
return CMD_WARNING;
}
if (CHECK_FLAG (vrfp->status, VRF_ACTIVE))
{
- vty_out (vty, "%% Only inactive VRFs can be deleted%s",
- VTYNL);
+ vty_out (vty, "%% Only inactive VRFs can be deleted\n");
return CMD_WARNING;
}
vty_redraw_line (vty);
break;
case CMD_ERR_NO_MATCH:
- /* vty_out (vty, "%% There is no matched command.%s", VTYNL); */
+ /* vty_out (vty, "%% There is no matched command.\n"); */
vty_prompt (vty);
vty_redraw_line (vty);
break;
config_write_ospf6_debug_abr (struct vty *vty)
{
if (IS_OSPF6_DEBUG_ABR)
- vty_out (vty, "debug ospf6 abr%s", VTYNL);
+ vty_out (vty, "debug ospf6 abr\n");
return 0;
}
vty_out (vty, " Interface attached to this area:");
for (ALL_LIST_ELEMENTS_RO (oa->if_list, i, oi))
vty_out (vty, " %s", oi->interface->name);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
if (oa->ts_spf.tv_sec || oa->ts_spf.tv_usec)
{
if (range->path.u.cost_config != OSPF_AREA_RANGE_COST_UNSPEC)
vty_out (vty, " cost %d", range->path.u.cost_config);
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (IS_AREA_STUB (oa))
total++;
}
- vty_out (vty, "Redistributing External Routes from:%s", VTYNL);
+ vty_out (vty, "Redistributing External Routes from:\n");
for (type = 0; type < ZEBRA_ROUTE_MAX; type++)
{
if (type == ZEBRA_ROUTE_OSPF6)
switch (ret)
{
case RMAP_RULE_MISSING:
- vty_out (vty, "OSPF6 Can't find rule.%s", VTYNL);
+ vty_out (vty, "OSPF6 Can't find rule.\n");
break;
case RMAP_COMPILE_ERROR:
- vty_out (vty, "OSPF6 Argument is malformed.%s", VTYNL);
+ vty_out (vty, "OSPF6 Argument is malformed.\n");
break;
default:
- vty_out (vty, "OSPF6 route-map add set failed.%s", VTYNL);
+ vty_out (vty, "OSPF6 route-map add set failed.\n");
break;
}
return CMD_WARNING;
config_write_ospf6_debug_asbr (struct vty *vty)
{
if (IS_OSPF6_DEBUG_ASBR)
- vty_out (vty, "debug ospf6 asbr%s", VTYNL);
+ vty_out (vty, "debug ospf6 asbr\n");
return 0;
}
config_write_ospf6_debug_flood (struct vty *vty)
{
if (IS_OSPF6_DEBUG_FLOODING)
- vty_out (vty, "debug ospf6 flooding%s", VTYNL);
+ vty_out (vty, "debug ospf6 flooding\n");
return 0;
}
if (ifp->info == NULL)
{
- vty_out (vty, " OSPF not enabled on this interface%s", VTYNL);
+ vty_out (vty, " OSPF not enabled on this interface\n");
return 0;
}
else
oi = (struct ospf6_interface *) ifp->info;
- vty_out (vty, " Internet Address:%s", VTYNL);
+ vty_out (vty, " Internet Address:\n");
for (ALL_LIST_ELEMENTS_RO (ifp->connected, i, c))
{
VTYNL);
}
else
- vty_out (vty, " Not Attached to Area%s", VTYNL);
+ vty_out (vty, " Not Attached to Area\n");
vty_out (vty, " State %s, Transmit Delay %d sec, Priority %d%s",
ospf6_interface_state_str[oi->state],
oi->transdelay, oi->priority,
VTYNL);
- vty_out (vty, " Timer intervals configured:%s", VTYNL);
+ 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);
oi->plist_name, VTYNL);
if (CHECK_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE))
- vty_out (vty, " ipv6 ospf6 passive%s", VTYNL);
+ vty_out (vty, " ipv6 ospf6 passive\n");
if (oi->mtu_ignore)
- vty_out (vty, " ipv6 ospf6 mtu-ignore%s", VTYNL);
+ vty_out (vty, " ipv6 ospf6 mtu-ignore\n");
if (oi->type != ospf6_default_iftype(ifp))
{
if (oi->type == OSPF_IFTYPE_POINTOPOINT)
- vty_out (vty, " ipv6 ospf6 network point-to-point%s", VTYNL);
+ vty_out (vty, " ipv6 ospf6 network point-to-point\n");
else if (oi->type == OSPF_IFTYPE_BROADCAST)
- vty_out (vty, " ipv6 ospf6 network broadcast%s", VTYNL);
+ vty_out (vty, " ipv6 ospf6 network broadcast\n");
}
ospf6_bfd_write_config(vty, oi);
- vty_out (vty, "!%s", VTYNL);
+ vty_out (vty, "!\n");
}
return 0;
}
config_write_ospf6_debug_interface (struct vty *vty)
{
if (IS_OSPF6_DEBUG_INTERFACE)
- vty_out (vty, "debug ospf6 interface%s", VTYNL);
+ vty_out (vty, "debug ospf6 interface\n");
return 0;
}
{
char buf[16];
if (IS_OSPF6_DEBUG_BROUTER)
- vty_out (vty, "debug ospf6 border-routers%s", VTYNL);
+ vty_out (vty, "debug ospf6 border-routers\n");
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER)
{
inet_ntop (AF_INET, &conf_debug_ospf6_brouter_specific_router_id,
start = (u_char *) lsa->header + sizeof (struct ospf6_lsa_header);
end = (u_char *) lsa->header + ntohs (lsa->header->length);
- vty_out (vty, " Unknown contents:%s", VTYNL);
+ vty_out (vty, " Unknown contents:\n");
for (current = start; current < end; current ++)
{
if ((current - start) % 16 == 0)
start = (u_char *) lsa->header;
end = (u_char *) lsa->header + ntohs (lsa->header->length);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
vty_out (vty, "%s:%s", lsa->name, VTYNL);
for (current = start; current < end; current ++)
inet_ntop (AF_INET, &lsa->header->adv_router,
adv_router, sizeof (adv_router));
- vty_out (vty, "%s", VTYNL);
+ 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, "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);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return;
}
handler = &unknown_handler;
(*handler->show) (vty, lsa);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* OSPFv3 LSA creation/deletion function */
if (s == 0x3f && r == 0x3f)
{
- vty_out (vty, "debug ospf6 message all%s", VTYNL);
+ vty_out (vty, "debug ospf6 message all\n");
return 0;
}
if (s == 0x3f && r == 0)
{
- vty_out (vty, "debug ospf6 message all send%s", VTYNL);
+ vty_out (vty, "debug ospf6 message all send\n");
return 0;
}
else if (s == 0 && r == 0x3f)
{
- vty_out (vty, "debug ospf6 message all recv%s", VTYNL);
+ vty_out (vty, "debug ospf6 message all recv\n");
return 0;
}
/* Unknown message is logged by default */
if (! IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, SEND) &&
! IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
- vty_out (vty, "no debug ospf6 message unknown%s", VTYNL);
+ vty_out (vty, "no debug ospf6 message unknown\n");
else if (! IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, SEND))
- vty_out (vty, "no debug ospf6 message unknown send%s", VTYNL);
+ vty_out (vty, "no debug ospf6 message unknown send\n");
else if (! IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
- vty_out (vty, "no debug ospf6 message unknown recv%s", VTYNL);
+ vty_out (vty, "no debug ospf6 message unknown recv\n");
for (i = 1; i < 6; i++)
{
{
if (IS_OSPF6_DEBUG_NEIGHBOR (STATE) &&
IS_OSPF6_DEBUG_NEIGHBOR (EVENT))
- vty_out (vty, "debug ospf6 neighbor%s", VTYNL);
+ vty_out (vty, "debug ospf6 neighbor\n");
else if (IS_OSPF6_DEBUG_NEIGHBOR (STATE))
- vty_out (vty, "debug ospf6 neighbor state%s", VTYNL);
+ vty_out (vty, "debug ospf6 neighbor state\n");
else if (IS_OSPF6_DEBUG_NEIGHBOR (EVENT))
- vty_out (vty, "debug ospf6 neighbor event%s", VTYNL);
+ vty_out (vty, "debug ospf6 neighbor event\n");
return 0;
}
vty_out (vty, "Router Bits: %s%s", capa, VTYNL);
/* Prefix Options */
- vty_out (vty, "Prefix Options: xxx%s", VTYNL);
+ vty_out (vty, "Prefix Options: xxx\n");
/* Metrics */
vty_out (vty, "Metric Type: %d%s", route->path.metric_type,
route->path.cost, route->path.u.cost_e2, VTYNL);
/* Nexthops */
- vty_out (vty, "Nexthop:%s", VTYNL);
+ vty_out (vty, "Nexthop:\n");
for (ALL_LIST_ELEMENTS_RO (route->nh_list, node, nh))
{
/* nexthop */
ifname = ifindex2ifname (nh->ifindex, VRF_DEFAULT);
vty_out (vty, " %s %.*s%s", nexthop, IFNAMSIZ, ifname, VTYNL);
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
static void
config_write_ospf6_debug_route (struct vty *vty)
{
if (IS_OSPF6_DEBUG_ROUTE (TABLE))
- vty_out (vty, "debug ospf6 route table%s", VTYNL);
+ vty_out (vty, "debug ospf6 route table\n");
if (IS_OSPF6_DEBUG_ROUTE (INTRA))
- vty_out (vty, "debug ospf6 route intra-area%s", VTYNL);
+ vty_out (vty, "debug ospf6 route intra-area\n");
if (IS_OSPF6_DEBUG_ROUTE (INTER))
- vty_out (vty, "debug ospf6 route inter-area%s", VTYNL);
+ vty_out (vty, "debug ospf6 route inter-area\n");
return 0;
}
next_prefix = (char *) malloc (len);
if (next_prefix == NULL)
{
- vty_out (vty, "malloc failed%s", VTYNL);
+ vty_out (vty, "malloc failed\n");
return;
}
snprintf (next_prefix, len, "%s%s", prefix, (rest ? "| " : " "));
config_write_ospf6_debug_spf (struct vty *vty)
{
if (IS_OSPF6_DEBUG_SPF (PROCESS))
- vty_out (vty, "debug ospf6 spf process%s", VTYNL);
+ vty_out (vty, "debug ospf6 spf process\n");
if (IS_OSPF6_DEBUG_SPF (TIME))
- vty_out (vty, "debug ospf6 spf time%s", VTYNL);
+ vty_out (vty, "debug ospf6 spf time\n");
if (IS_OSPF6_DEBUG_SPF (DATABASE))
- vty_out (vty, "debug ospf6 spf database%s", VTYNL);
+ vty_out (vty, "debug ospf6 spf database\n");
return 0;
}
OSPF6_STR)
{
if (ospf6 == NULL)
- vty_out (vty, "OSPFv3 is not configured%s", VTYNL);
+ vty_out (vty, "OSPFv3 is not configured\n");
else
{
ospf6_delete (ospf6);
(long long)o->ts_spf_duration.tv_usec, VTYNL);
}
else
- vty_out(vty, "has not been run$%s", VTYNL);
+ 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);
if (CHECK_FLAG (o->flag, OSPF6_STUB_ROUTER))
- vty_out (vty, " Router Is Stub Router%s", VTYNL);
+ vty_out (vty, " Router Is Stub Router\n");
/* LSAs */
vty_out (vty, " Number of AS scoped LSAs is %u%s",
{
if (CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER))
{
- vty_out (vty, " stub-router administrative%s", VTYNL);
+ vty_out (vty, " stub-router administrative\n");
}
return;
}
return CMD_SUCCESS;
inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id));
- vty_out (vty, "router ospf6%s", VTYNL);
+ 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, " interface %s area %s%s",
oi->interface->name, oa->name, VTYNL);
}
- vty_out (vty, "!%s", VTYNL);
+ vty_out (vty, "!\n");
return 0;
}
int i;
if (zclient == NULL)
{
- vty_out (vty, "Not connected to zebra%s", VTYNL);
+ vty_out (vty, "Not connected to zebra\n");
return CMD_SUCCESS;
}
- vty_out (vty, "Zebra Infomation%s", VTYNL);
+ 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",
if (vrf_bitmap_check (zclient->redist[AFI_IP6][i], VRF_DEFAULT))
vty_out (vty, " %s", zebra_route_string(i));
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
{
if (! zclient->enable)
{
- vty_out (vty, "no router zebra%s", VTYNL);
- vty_out (vty, "!%s", VTYNL);
+ vty_out (vty, "no router zebra\n");
+ vty_out (vty, "!\n");
}
else if (! vrf_bitmap_check (zclient->redist[AFI_IP6][ZEBRA_ROUTE_OSPF6],
VRF_DEFAULT))
{
- vty_out (vty, "router zebra%s", VTYNL);
- vty_out (vty, " no redistribute ospf6%s", VTYNL);
- vty_out (vty, "!%s", VTYNL);
+ vty_out (vty, "router zebra\n");
+ vty_out (vty, " no redistribute ospf6\n");
+ vty_out (vty, "!\n");
}
return 0;
}
config_write_ospf6_debug_zebra (struct vty *vty)
{
if (IS_OSPF6_DEBUG_ZEBRA (SEND) && IS_OSPF6_DEBUG_ZEBRA (RECV))
- vty_out (vty, "debug ospf6 zebra%s", VTYNL);
+ vty_out (vty, "debug ospf6 zebra\n");
else
{
if (IS_OSPF6_DEBUG_ZEBRA (SEND))
- vty_out (vty, "debug ospf6 zebra send%s", VTYNL);
+ vty_out (vty, "debug ospf6 zebra send\n");
if (IS_OSPF6_DEBUG_ZEBRA (RECV))
- vty_out (vty, "debug ospf6 zebra recv%s", VTYNL);
+ vty_out (vty, "debug ospf6 zebra recv\n");
}
return 0;
}
config_write_ospf6_debug_asbr (vty);
config_write_ospf6_debug_abr (vty);
config_write_ospf6_debug_flood (vty);
- vty_out (vty, "!%s", VTYNL);
+ vty_out (vty, "!\n");
return 0;
}
vty_out (vty, AS_LSDB_TITLE_FORMAT, VTYNL, VTYNL, VTYNL);
ospf6_lsdb_show (vty, level, NULL, NULL, NULL, o->lsdb);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
vty_out (vty, AS_LSDB_TITLE_FORMAT, VTYNL, VTYNL, VTYNL);
ospf6_lsdb_show (vty, level, NULL, &id, NULL, o->lsdb);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
vty_out (vty, AS_LSDB_TITLE_FORMAT, VTYNL, VTYNL, VTYNL);
ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
vty_out (vty, AS_LSDB_TITLE_FORMAT, VTYNL, VTYNL, VTYNL);
ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
vty_out (vty, AS_LSDB_TITLE_FORMAT, VTYNL, VTYNL, VTYNL);
ospf6_lsdb_show (vty, level, NULL, &id, &adv_router, o->lsdb);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
vty_out (vty, AS_LSDB_TITLE_FORMAT, VTYNL, VTYNL, VTYNL);
ospf6_lsdb_show (vty, level, NULL, NULL, &adv_router, o->lsdb);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
break;
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
ospf6_linkstate_table_show (vty, idx_ipv4, argc, argv, oa->spf_table);
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
ospf6_linkstate_table_show (vty, idx_detail, argc, argv, oa->spf_table);
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
#define OSPF6_CMD_CHECK_RUNNING() \
if (ospf6 == NULL) \
{ \
- vty_out (vty, "OSPFv3 is not running%s", VTYNL); \
+ vty_out (vty, "OSPFv3 is not running\n"); \
return CMD_SUCCESS; \
}
*metric = strtol (str, NULL, 10);
if (*metric < 0 && *metric > 16777214)
{
- /* vty_out (vty, "OSPF metric value is invalid%s", VTYNL); */
+ /* vty_out (vty, "OSPF metric value is invalid\n"); */
return 0;
}
ospf = ospf_lookup();
if (!ospf)
{
- vty_out (vty, "There isn't active ospf instance %s", VTYNL);
+ vty_out (vty, "There isn't active ospf instance \n");
return CMD_WARNING;
}
ret = inet_aton (argv[idx_ipv4]->arg, &router_id);
if (!ret)
{
- vty_out (vty, "Please specify Router ID by A.B.C.D%s", VTYNL);
+ vty_out (vty, "Please specify Router ID by A.B.C.D\n");
return CMD_WARNING;
}
ret = inet_aton (argv[idx_ipv4]->arg, &router_id);
if (!ret)
{
- vty_out (vty, "Please specify Router ID by A.B.C.D%s", VTYNL);
+ vty_out (vty, "Please specify Router ID by A.B.C.D\n");
return CMD_WARNING;
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
if (ospf->instance)
{
- vty_out (vty, "The network command is not supported in multi-instance ospf%s",
- VTYNL);
+ vty_out (vty, "The network command is not supported in multi-instance ospf\n");
return CMD_WARNING;
}
if (ospf->if_ospf_cli_count > 0)
{
- vty_out (vty, "Please remove all ip ospf area x.x.x.x commands first.%s",
- VTYNL);
+ vty_out (vty, "Please remove all ip ospf area x.x.x.x commands first.\n");
return CMD_WARNING;
}
ret = ospf_network_set (ospf, &p, area_id, format);
if (ret == 0)
{
- vty_out (vty, "There is already same network statement.%s", VTYNL);
+ vty_out (vty, "There is already same network statement.\n");
return CMD_WARNING;
}
if (ospf->instance)
{
- vty_out (vty, "The network command is not supported in multi-instance ospf%s",
- VTYNL);
+ vty_out (vty, "The network command is not supported in multi-instance ospf\n");
return CMD_WARNING;
}
ret = ospf_network_unset (ospf, &p, area_id);
if (ret == 0)
{
- vty_out (vty, "Can't find specified network area configuration.%s",
- VTYNL);
+ vty_out (vty, "Can't find specified network area configuration.\n");
return CMD_WARNING;
}
&vl_config.area_id_fmt);
if (ret < 0)
{
- vty_out (vty, "OSPF area ID is invalid%s", VTYNL);
+ vty_out (vty, "OSPF area ID is invalid\n");
return CMD_WARNING;
}
ret = inet_aton (argv[idx_ipv4]->arg, &vl_config.vl_peer);
if (! ret)
{
- vty_out (vty, "Please specify valid Router ID as a.b.c.d%s",
- VTYNL);
+ vty_out (vty, "Please specify valid Router ID as a.b.c.d\n");
return CMD_WARNING;
}
ret = str2area_id (argv[idx_ipv4_number]->arg, &vl_config.area_id, &format);
if (ret < 0)
{
- vty_out (vty, "OSPF area ID is invalid%s", VTYNL);
+ vty_out (vty, "OSPF area ID is invalid\n");
return CMD_WARNING;
}
area = ospf_area_lookup_by_area_id (ospf, vl_config.area_id);
if (!area)
{
- vty_out (vty, "Area does not exist%s", VTYNL);
+ vty_out (vty, "Area does not exist\n");
return CMD_WARNING;
}
ret = inet_aton (argv[idx_ipv4]->arg, &vl_config.vl_peer);
if (! ret)
{
- vty_out (vty, "Please specify valid Router ID as a.b.c.d%s",
- VTYNL);
+ vty_out (vty, "Please specify valid Router ID as a.b.c.d\n");
return CMD_WARNING;
}
ret = str2area_id (area_id, &vl_config.area_id, &vl_config.area_id_fmt);
if (ret < 0)
{
- vty_out (vty, "OSPF area ID is invalid%s", VTYNL);
+ vty_out (vty, "OSPF area ID is invalid\n");
return CMD_WARNING;
}
ret = inet_aton (router_id, &vl_config.vl_peer);
if (! ret)
{
- vty_out (vty, "Please specify valid Router ID as a.b.c.d%s", VTYNL);
+ vty_out (vty, "Please specify valid Router ID as a.b.c.d\n");
return CMD_WARNING;
}
ret = str2area_id (area_id, &vl_config.area_id, &vl_config.area_id_fmt);
if (ret < 0)
{
- vty_out (vty, "OSPF area ID is invalid%s", VTYNL);
+ vty_out (vty, "OSPF area ID is invalid\n");
return CMD_WARNING;
}
ret = inet_aton (router_id, &vl_config.vl_peer);
if (! ret)
{
- vty_out (vty, "Please specify valid Router ID as a.b.c.d%s", VTYNL);
+ vty_out (vty, "Please specify valid Router ID as a.b.c.d\n");
return CMD_WARNING;
}
ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format);
if (ret == 0)
{
- vty_out (vty, "First deconfigure all virtual link through this area%s",
- VTYNL);
+ vty_out (vty, "First deconfigure all virtual link through this area\n");
return CMD_WARNING;
}
ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format);
if (ret == 0)
{
- vty_out (vty, "%% Area cannot be stub as it contains a virtual link%s",
- VTYNL);
+ vty_out (vty, "%% Area cannot be stub as it contains a virtual link\n");
return CMD_WARNING;
}
ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format);
if (ret == 0)
{
- vty_out (vty, "%% Area cannot be nssa as it contains a virtual link%s",
- VTYNL);
+ vty_out (vty, "%% Area cannot be nssa as it contains a virtual link\n");
return CMD_WARNING;
}
if (area->external_routing == OSPF_AREA_DEFAULT)
{
- vty_out (vty, "The area is neither stub, nor NSSA%s", VTYNL);
+ vty_out (vty, "The area is neither stub, nor NSSA\n");
return CMD_WARNING;
}
if (area->external_routing == OSPF_AREA_DEFAULT)
{
- vty_out (vty, "The area is neither stub, nor NSSA%s", VTYNL);
+ vty_out (vty, "The area is neither stub, nor NSSA\n");
return CMD_WARNING;
}
if (argc < 5)
{
- vty_out (vty, "Insufficient arguments%s", VTYNL);
+ vty_out (vty, "Insufficient arguments\n");
return CMD_WARNING;
}
if (argc < 4)
{
- vty_out (vty, "Insufficient arguments%s", VTYNL);
+ vty_out (vty, "Insufficient arguments\n");
return CMD_WARNING;
}
if (argc < 6)
{
- vty_out (vty, "Insufficient arguments%s", VTYNL);
+ vty_out (vty, "Insufficient arguments\n");
return CMD_WARNING;
}
if (argc < 4)
{
- vty_out (vty, "Insufficient number of arguments%s", VTYNL);
+ vty_out (vty, "Insufficient number of arguments\n");
return CMD_WARNING;
}
refbw = strtol (argv[idx_number]->arg, NULL, 10);
if (refbw < 1 || refbw > 4294967)
{
- vty_out (vty, "reference-bandwidth value is invalid%s", VTYNL);
+ vty_out (vty, "reference-bandwidth value is invalid\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
ospf->ref_bandwidth = OSPF_DEFAULT_REF_BANDWIDTH;
- vty_out (vty, "%% OSPF: Reference bandwidth is changed.%s", VTYNL);
- vty_out (vty, " Please ensure reference bandwidth is consistent across all routers%s", VTYNL);
+ vty_out (vty, "%% OSPF: Reference bandwidth is changed.\n");
+ vty_out (vty, " Please ensure reference bandwidth is consistent across all routers\n");
for (ALL_LIST_ELEMENTS (om->iflist, node, nnode, ifp))
ospf_if_recalculate_output_cost (ifp);
write_oi_count = strtol (argv[idx_number]->arg, NULL, 10);
if (write_oi_count < 1 || write_oi_count > 100)
{
- vty_out (vty, "write-multiplier value is invalid%s", VTYNL);
+ vty_out (vty, "write-multiplier value is invalid\n");
return CMD_WARNING;
}
if (use_json)
json_object_boolean_true_add(json_area, "backbone");
else
- vty_out (vty, " (Backbone)%s", VTYNL);
+ vty_out (vty, " (Backbone)\n");
}
else
{
area->no_summary ? ", no summary" : "",
area->shortcut_configured ? "; " : "");
- vty_out (vty, "%s", VTYNL);
+ 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",
{
vty_out (vty, " It is an NSSA configuration. %s Elected NSSA/ABR performs type-7/type-5 LSA translation. %s", VTYNL, VTYNL);
if (! IS_OSPF_ABR (area->ospf))
- vty_out (vty, " It is not ABR, therefore not Translator. %s",
- VTYNL);
+ vty_out (vty, " It is not ABR, therefore not Translator. \n");
else if (area->NSSATranslatorState)
{
vty_out (vty, " We are an ABR and ");
if (area->NSSATranslatorRole == OSPF_NSSA_ROLE_CANDIDATE)
- vty_out (vty, "the NSSA Elected Translator. %s",
- VTYNL);
+ vty_out (vty, "the NSSA Elected Translator. \n");
else if (area->NSSATranslatorRole == OSPF_NSSA_ROLE_ALWAYS)
- vty_out (vty, "always an NSSA Translator. %s",
- VTYNL);
+ vty_out (vty, "always an NSSA Translator. \n");
}
else
{
vty_out (vty, " We are an ABR, but ");
if (area->NSSATranslatorRole == OSPF_NSSA_ROLE_CANDIDATE)
- vty_out (vty, "not the NSSA Elected Translator. %s",
- VTYNL);
+ vty_out (vty, "not the NSSA Elected Translator. \n");
else
- vty_out (vty, "never an NSSA Translator. %s",
- VTYNL);
+ vty_out (vty, "never an NSSA Translator. \n");
}
}
}
}
else
{
- vty_out (vty, " Originating stub / maximum-distance Router-LSA%s",
- VTYNL);
+ vty_out (vty, " Originating stub / maximum-distance Router-LSA\n");
if (CHECK_FLAG(area->stub_router_state, OSPF_AREA_ADMIN_STUB_ROUTED))
- vty_out (vty, " Administratively activated (indefinitely)%s",
- VTYNL);
+ vty_out (vty, " Administratively activated (indefinitely)\n");
if (area->t_stub_router)
vty_out (vty, " Active from startup, %s remaining%s",
ospf_timer_dump (area->t_stub_router, timebuf,
/* Show authentication type. */
vty_out (vty, " Area has ");
if (area->auth_type == OSPF_AUTH_NULL)
- vty_out (vty, "no authentication%s", VTYNL);
+ vty_out (vty, "no authentication\n");
else if (area->auth_type == OSPF_AUTH_SIMPLE)
- vty_out (vty, "simple password authentication%s", VTYNL);
+ vty_out (vty, "simple password authentication\n");
else if (area->auth_type == OSPF_AUTH_CRYPTOGRAPHIC)
- vty_out (vty, "message digest authentication%s", VTYNL);
+ vty_out (vty, "message digest authentication\n");
if (!OSPF_IS_AREA_BACKBONE (area))
vty_out (vty, " Number of full virtual adjacencies going through"
if (use_json)
json_object_object_add(json_areas, inet_ntoa (area->area_id), json_area);
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
static int
}
else
{
- vty_out (vty, " Supports only single TOS (TOS0) routes%s", VTYNL);
- vty_out (vty, " This implementation conforms to RFC2328%s", VTYNL);
+ 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",
CHECK_FLAG (ospf->config, OSPF_RFC1583_COMPATIBLE) ?
"enabled" : "disabled", VTYNL);
}
else
{
- vty_out (vty, " Stub router advertisement is configured%s",
- VTYNL);
+ 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);
VTYNL);
}
else
- vty_out (vty, "has not been run%s", VTYNL);
+ vty_out (vty, "has not been run\n");
}
if (use_json)
if (use_json)
json_object_boolean_true_add(json, "adjacencyChangesLoggedAll");
else
- vty_out(vty, " All adjacency changes are logged%s",VTYNL);
+ vty_out(vty, " All adjacency changes are logged\n");
}
else
{
if (use_json)
json_object_boolean_true_add(json, "adjacencyChangesLogged");
else
- vty_out(vty, " Adjacency changes are logged%s",VTYNL);
+ vty_out(vty, " Adjacency changes are logged\n");
}
}
/* Show each area status. */
json_object_free(json);
}
else
- vty_out (vty, "%s",VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
{
if (ospf_oi_count(ifp) == 0)
{
- vty_out (vty, " OSPF not enabled on this interface%s", VTYNL);
+ vty_out (vty, " OSPF not enabled on this interface\n");
return;
}
else if (!is_up)
{
- vty_out (vty, " OSPF is enabled, but not running on this interface%s",
- VTYNL);
+ vty_out (vty, " OSPF is enabled, but not running on this interface\n");
return;
}
}
}
else
vty_out (vty, " <None>");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (use_json)
if (use_json)
json_object_boolean_true_add(json_interface_sub, "timerPassiveIface");
else
- vty_out (vty, " No Hellos (Passive interface)%s", VTYNL);
+ vty_out (vty, " No Hellos (Passive interface)\n");
}
if (use_json)
if (use_json)
json_object_boolean_true_add(json, "noSuchIface");
else
- vty_out (vty, "No such interface name%s", VTYNL);
+ vty_out (vty, "No such interface name\n");
}
else
{
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
if (use_json)
json_object_boolean_true_add(json, "noSuchIface");
else
- vty_out (vty, "No such interface.%s", VTYNL);
+ vty_out (vty, "No such interface.\n");
return CMD_WARNING;
}
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
}
else
{
- vty_out (vty, " Most recent state change statistics:%s",
- VTYNL);
+ 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);
if (!ret)
{
if (!use_json)
- vty_out (vty, "Please specify Neighbor ID by A.B.C.D%s", VTYNL);
+ vty_out (vty, "Please specify Neighbor ID by A.B.C.D\n");
return CMD_WARNING;
}
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
}
else
{
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return CMD_SUCCESS;
if (!ifp)
{
if (!use_json)
- vty_out (vty, "No such interface.%s", VTYNL);
+ vty_out (vty, "No such interface.\n");
return CMD_WARNING;
}
json_object_free(json);
}
else
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
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, " Number of TOS metrics: 0%s", VTYNL);
+ 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, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
VTYNL, VTYNL);
show_ip_ospf_database_router_links (vty, rl);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
vty_out (vty, " Attached Router: %s%s",
inet_ntoa (nl->routers[i]), VTYNL);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
VTYNL);
vty_out (vty, " TOS: 0 Metric: %d%s", GET_METRIC (sl->metric),
VTYNL);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
ip_masklen (sl->mask), VTYNL);
vty_out (vty, " TOS: 0 Metric: %d%s", GET_METRIC (sl->metric),
VTYNL);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
vty_out (vty, " Metric Type: %s%s",
IS_EXTERNAL_METRIC (al->e[0].tos) ?
"2 (Larger than any link state path)" : "1", VTYNL);
- vty_out (vty, " TOS: 0%s", VTYNL);
+ 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",
vty_out (vty, " Metric Type: %s%s",
IS_EXTERNAL_METRIC (al->e[0].tos) ?
"2 (Larger than any link state path)" : "1", VTYNL);
- vty_out (vty, " TOS: 0%s", VTYNL);
+ 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",
show_ip_ospf_database_header (vty, lsa);
show_opaque_info_detail (vty, lsa);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
}
LSDB_LOOP (AREA_LSDB (area, type), rn, lsa)
show_lsa_summary (vty, lsa, self);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
LSDB_LOOP (AS_LSDB (ospf, type), rn, lsa)
show_lsa_summary (vty, lsa, self);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
static void
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, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
return CMD_SUCCESS;
}
- vty_out (vty, "You shouldn't get here!%s", VTYNL);
+ vty_out (vty, "You shouldn't get here!\n");
return CMD_WARNING;
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
params = ospf_lookup_if_params (ifp, addr);
if (params == NULL)
{
- vty_out (vty, "Ip Address specified is unknown%s", VTYNL);
+ vty_out (vty, "Ip Address specified is unknown\n");
return CMD_WARNING;
}
params->auth_type = OSPF_AUTH_NOTSET;
}
else
{
- vty_out (vty, "Unexpected input encountered%s", VTYNL);
+ vty_out (vty, "Unexpected input encountered\n");
return CMD_WARNING;
}
/*
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
params = ospf_lookup_if_params (ifp, addr);
if (params == NULL)
{
- vty_out (vty, "Ip Address specified is unknown%s", VTYNL);
+ vty_out (vty, "Ip Address specified is unknown\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if(!inet_aton(ifaddr, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(ifaddr, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
ret = inet_aton(nbr_str, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
}
else
{
- vty_out (vty, "Please specify dead-interval or hello-multiplier%s",
- VTYNL);
+ vty_out (vty, "Please specify dead-interval or hello-multiplier\n");
return CMD_WARNING;
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if(!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if(!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
if (old_type == OSPF_IFTYPE_LOOPBACK)
{
- vty_out (vty, "This is a loopback interface. Can't set network type.%s", VTYNL);
+ vty_out (vty, "This is a loopback interface. Can't set network type.\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
{
if (!inet_aton(argv[idx]->arg, &addr))
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
ret = str2area_id (areaid, &area_id, &format);
if (ret < 0)
{
- vty_out (vty, "Please specify area by A.B.C.D|<0-4294967295>%s",
- VTYNL);
+ vty_out (vty, "Please specify area by A.B.C.D|<0-4294967295>\n");
return CMD_WARNING;
}
if (memcmp (ifp->name, "VLINK", 5) == 0)
{
- vty_out (vty, "Cannot enable OSPF on a virtual link.%s", VTYNL);
+ vty_out (vty, "Cannot enable OSPF on a virtual link.\n");
return CMD_WARNING;
}
{
if (rn->info != NULL)
{
- vty_out (vty, "Please remove all network commands first.%s", VTYNL);
+ vty_out (vty, "Please remove all network commands first.\n");
return CMD_WARNING;
}
}
if ((source == ZEBRA_ROUTE_OSPF) && !ospf->instance)
{
- vty_out (vty, "Instance redistribution in non-instanced OSPF not allowed%s",
- VTYNL);
+ vty_out (vty, "Instance redistribution in non-instanced OSPF not allowed\n");
return CMD_WARNING;
}
if ((source == ZEBRA_ROUTE_OSPF) && (ospf->instance == instance))
{
- vty_out (vty, "Same instance OSPF redistribution not allowed%s",
- VTYNL);
+ vty_out (vty, "Same instance OSPF redistribution not allowed\n");
return CMD_WARNING;
}
if ((source == ZEBRA_ROUTE_OSPF) && !ospf->instance)
{
- vty_out (vty, "Instance redistribution in non-instanced OSPF not allowed%s",
- VTYNL);
+ vty_out (vty, "Instance redistribution in non-instanced OSPF not allowed\n");
return CMD_WARNING;
}
if ((source == ZEBRA_ROUTE_OSPF) && (ospf->instance == instance))
{
- vty_out (vty, "Same instance OSPF redistribution not allowed%s",
- VTYNL);
+ vty_out (vty, "Same instance OSPF redistribution not allowed\n");
return CMD_WARNING;
}
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
params = ospf_get_if_params (ifp, addr);
ret = inet_aton(argv[idx_ipv4]->arg, &addr);
if (!ret)
{
- vty_out (vty, "Please specify interface address by A.B.C.D%s",
- VTYNL);
+ vty_out (vty, "Please specify interface address by A.B.C.D\n");
return CMD_WARNING;
}
params = ospf_get_if_params (ifp, addr);
{
if (CHECK_FLAG (area->stub_router_state, OSPF_AREA_ADMIN_STUB_ROUTED))
{
- vty_out (vty, " max-metric router-lsa administrative%s",
- VTYNL);
+ vty_out (vty, " max-metric router-lsa administrative\n");
break;
}
}
struct listnode *pnode, *pnnode;
struct ospf_path *path;
- vty_out (vty, "============ OSPF network routing table ============%s",
- VTYNL);
+ vty_out (vty, "============ OSPF network routing table ============\n");
for (rn = route_top (rt); rn; rn = route_next (rn))
if ((or = rn->info) != NULL)
}
}
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
static void
struct listnode *node;
struct ospf_path *path;
- vty_out (vty, "============ OSPF router routing table =============%s",
- VTYNL);
+ vty_out (vty, "============ OSPF router routing table =============\n");
for (rn = route_top (rtrs); rn; rn = route_next (rn))
if (rn->info)
{
}
}
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
static void
struct listnode *pnode, *pnnode;
struct ospf_path *path;
- vty_out (vty, "============ OSPF external routing table ===========%s",
- VTYNL);
+ vty_out (vty, "============ OSPF external routing table ===========\n");
for (rn = route_top (rt); rn; rn = route_next (rn))
if ((er = rn->info) != NULL)
{
}
}
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
static int
if (ospf->new_table == NULL)
{
- vty_out (vty, "No OSPF routing information exist%s", VTYNL);
+ vty_out (vty, "No OSPF routing information exist\n");
return CMD_SUCCESS;
}
/* Show Router routes. */
show_ip_ospf_route_router (vty, ospf->new_rtrs);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
if (ospf->new_table == NULL)
{
- vty_out (vty, "No OSPF routing information exist%s", VTYNL);
+ vty_out (vty, "No OSPF routing information exist\n");
return CMD_SUCCESS;
}
/* Show AS External routes. */
show_ip_ospf_route_external (vty, ospf->old_external_route);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
return CMD_SUCCESS;
}
if (ifp->ifindex == IFINDEX_DELETED)
continue;
- vty_out (vty, "!%s", VTYNL);
+ vty_out (vty, "!\n");
vty_out (vty, "interface %s%s", ifp->name,
VTYNL);
if (ifp->desc)
ospf_int_type_str[params->type]);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
vty_out (vty, " ip ospf authentication%s", auth_str);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Simple Authentication Password print. */
params->auth_simple);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Cryptographic Authentication Key print. */
ck->key_id, ck->auth_key);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Interface Output Cost print. */
vty_out (vty, " ip ospf cost %u", params->output_cost_cmd);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Hello Interval print. */
vty_out (vty, " ip ospf hello-interval %u", params->v_hello);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Router Priority print. */
vty_out (vty, " ip ospf priority %u", params->priority);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Retransmit Interval print. */
params->retransmit_interval);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Transmit Delay print. */
vty_out (vty, " ip ospf transmit-delay %u", params->transmit_delay);
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
/* Area print. */
vty_out (vty, " ip ospf mtu-ignore");
if (params != IF_DEF_PARAMS (ifp))
vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (area->no_summary)
vty_out (vty, " no-summary");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
if (area->default_cost != 1)
vty_out (vty, " area %s default-cost %d%s", buf,
vty_out (vty, " substitute %s/%d",
inet_ntoa (range->subst_addr), range->subst_masklen);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
if (EXPORT_NAME (area))
if (nbr_nbma->v_poll != OSPF_POLL_INTERVAL_DEFAULT)
vty_out (vty, " poll-interval %d", nbr_nbma->v_poll);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
return 0;
if (ROUTEMAP_NAME (red))
vty_out (vty, " route-map %s", ROUTEMAP_NAME (red));
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
ROUTEMAP_NAME (red));
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
if (ospf->distance_external)
vty_out (vty, " external %d", ospf->distance_external);
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
for (rn = route_top (ospf->distance_table); rn; rn = route_next (rn))
if (ospf->instance)
vty_out (vty, "router ospf %d%s", ospf->instance, VTYNL);
else
- vty_out (vty, "router ospf%s", VTYNL);
+ vty_out (vty, "router ospf\n");
write++;
if (CHECK_FLAG(ospf->config, OSPF_LOG_ADJACENCY_CHANGES))
{
if (CHECK_FLAG(ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
- vty_out(vty, " log-adjacency-changes detail%s", VTYNL);
+ vty_out(vty, " log-adjacency-changes detail\n");
else if (!DFLT_OSPF_LOG_ADJACENCY_CHANGES)
- vty_out(vty, " log-adjacency-changes%s", VTYNL);
+ vty_out(vty, " log-adjacency-changes\n");
}
else if (DFLT_OSPF_LOG_ADJACENCY_CHANGES)
{
- vty_out(vty, " no log-adjacency-changes%s", VTYNL);
+ vty_out(vty, " no log-adjacency-changes\n");
}
/* RFC1583 compatibility flag print -- Compatible with CISCO 12.1. */
if (CHECK_FLAG (ospf->config, OSPF_RFC1583_COMPATIBLE))
- vty_out (vty, " compatible rfc1583%s", VTYNL);
+ vty_out (vty, " compatible rfc1583\n");
/* auto-cost reference-bandwidth configuration. */
if (ospf->ref_bandwidth != OSPF_DEFAULT_REF_BANDWIDTH)
/* passive-interface print. */
if (ospf->passive_interface_default == OSPF_IF_PASSIVE)
- vty_out (vty, " passive-interface default%s", VTYNL);
+ vty_out (vty, " passive-interface default\n");
for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
if (OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (ifp), passive_interface)
else /* Interface name is specified. */
{
if ((ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT)) == NULL)
- vty_out (vty, "No such interface name%s", VTYNL);
+ vty_out (vty, "No such interface name\n");
else
ospf_interface_clear(ifp);
}
retv = str2area_id ((STR), &(V), &(F)); \
if (retv < 0) \
{ \
- vty_out (vty, "%% Invalid OSPF area ID%s", VTYNL); \
+ vty_out (vty, "%% Invalid OSPF area ID\n"); \
return CMD_WARNING; \
} \
}
retv = str2area_id ((STR), &(V), &(F)); \
if (retv < 0) \
{ \
- vty_out (vty, "%% Invalid OSPF area ID%s", VTYNL); \
+ vty_out (vty, "%% Invalid OSPF area ID\n"); \
return CMD_WARNING; \
} \
if (OSPF_IS_AREA_ID_BACKBONE ((V))) \
update = strtoul (argv[0], &endptr, 10);
if (update == ULONG_MAX || *endptr != '\0')
{
- vty_out (vty, "update timer value error%s", VTYNL);
+ vty_out (vty, "update timer value error\n");
return CMD_WARNING;
}
timeout = strtoul (argv[0], &endptr, 10);
if (timeout == ULONG_MAX || *endptr != '\0')
{
- vty_out (vty, "timeout timer value error%s", VTYNL);
+ vty_out (vty, "timeout timer value error\n");
return CMD_WARNING;
}
garbage = strtoul (argv[0], &endptr, 10);
if (garbage == ULONG_MAX || *endptr != '\0')
{
- vty_out (vty, "garbage timer value error%s", VTYNL);
+ vty_out (vty, "garbage timer value error\n");
return CMD_WARNING;
}
if (! ripng)
return CMD_SUCCESS;
- vty_out (vty, "Routing Protocol is \"ripng\"%s", VTYNL);
+ 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,
"Debugging information\n"
"Zebra configuration\n")
{
- vty_out (vty, "Zebra debugging status:%s", VTYNL);
+ vty_out (vty, "Zebra debugging status:\n");
if (IS_ZEBRA_DEBUG_EVENT)
- vty_out (vty, " Zebra event debugging is on%s", VTYNL);
+ vty_out (vty, " Zebra event debugging is on\n");
if (IS_ZEBRA_DEBUG_PACKET)
{
}
if (IS_ZEBRA_DEBUG_KERNEL)
- vty_out (vty, " Zebra kernel debugging is on%s", VTYNL);
+ vty_out (vty, " Zebra kernel debugging is on\n");
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
- vty_out (vty, " Zebra kernel netlink message dumps (send) are on%s", VTYNL);
+ vty_out (vty, " Zebra kernel netlink message dumps (send) are on\n");
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
- vty_out (vty, " Zebra kernel netlink message dumps (recv) are on%s", VTYNL);
+ vty_out (vty, " Zebra kernel netlink message dumps (recv) are on\n");
/* 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", VTYNL);
+ vty_out (vty, " Zebra RIB debugging is on\n");
if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
- vty_out (vty, " Zebra RIB detailed debugging is on%s", VTYNL);
+ vty_out (vty, " Zebra RIB detailed debugging is on\n");
if (IS_ZEBRA_DEBUG_FPM)
- vty_out (vty, " Zebra FPM debugging is on%s", VTYNL);
+ vty_out (vty, " Zebra FPM debugging is on\n");
if (IS_ZEBRA_DEBUG_NHT)
- vty_out (vty, " Zebra next-hop tracking debugging is on%s", VTYNL);
+ vty_out (vty, " Zebra next-hop tracking debugging is on\n");
if (IS_ZEBRA_DEBUG_MPLS)
- vty_out (vty, " Zebra MPLS debugging is on%s", VTYNL);
+ vty_out (vty, " Zebra MPLS debugging is on\n");
return CMD_SUCCESS;
}
if (IS_ZEBRA_DEBUG_EVENT)
{
- vty_out (vty, "debug zebra events%s", VTYNL);
+ vty_out (vty, "debug zebra events\n");
write++;
}
if (IS_ZEBRA_DEBUG_PACKET)
}
if (IS_ZEBRA_DEBUG_KERNEL)
{
- vty_out (vty, "debug zebra kernel%s", VTYNL);
+ vty_out (vty, "debug zebra kernel\n");
write++;
}
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
{
- vty_out (vty, "debug zebra kernel msgdump recv%s", VTYNL);
+ vty_out (vty, "debug zebra kernel msgdump recv\n");
write++;
}
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
{
- vty_out (vty, "debug zebra kernel msgdump send%s", VTYNL);
+ vty_out (vty, "debug zebra kernel msgdump send\n");
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", VTYNL);
+ vty_out (vty, "debug zebra rib\n");
write++;
}
if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
{
- vty_out (vty, "debug zebra rib detailed%s", VTYNL);
+ vty_out (vty, "debug zebra rib detailed\n");
write++;
}
if (IS_ZEBRA_DEBUG_FPM)
{
- vty_out (vty, "debug zebra fpm%s", VTYNL);
+ vty_out (vty, "debug zebra fpm\n");
write++;
}
if (IS_ZEBRA_DEBUG_NHT)
{
- vty_out (vty, "debug zebra nht%s", VTYNL);
+ vty_out (vty, "debug zebra nht\n");
write++;
}
if (IS_ZEBRA_DEBUG_MPLS)
{
- vty_out (vty, "debug zebra mpls%s", VTYNL);
+ vty_out (vty, "debug zebra mpls\n");
write++;
}
return write;
default:
break;
}
- vty_out(vty, "%s", VTYNL);
+ vty_out(vty, "\n");
}
static void
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", VTYNL);
+ vty_out(vty, "\n");
}
vty_out (vty, ", blackhole");
if (CHECK_FLAG (re->flags, ZEBRA_FLAG_REJECT))
vty_out (vty, ", reject");
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
if (re->type == ZEBRA_ROUTE_RIP
|| re->type == ZEBRA_ROUTE_OSPF
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", VTYNL);
+ vty_out (vty, " ago\n");
}
for (ALL_NEXTHOPS_RO(re->nexthop, nexthop, tnexthop, recursing))
nexthop->nh_label->label, buf, sizeof buf, 1));
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}
tm->tm_yday/7,
tm->tm_yday - ((tm->tm_yday/7) * 7), tm->tm_hour);
}
- vty_out (vty, "%s", VTYNL);
+ vty_out (vty, "\n");
}
}