}
babel_ifp = babel_get_if_nfo (ifp);
vty_out (vty, " Babel protocol is running on this interface\n");
- vty_outln (vty, " Operating mode is \"%s\"",
+ vty_out (vty, " Operating mode is \"%s\"\n",
CHECK_FLAG(babel_ifp->flags, BABEL_IF_WIRED) ? "wired" : "wireless");
vty_out (vty, " Split horizon mode is %s\n",
CHECK_FLAG(babel_ifp->flags, BABEL_IF_SPLIT_HORIZON) ? "On" : "Off");
static void
show_babel_neighbour_sub (struct vty *vty, struct neighbour *neigh)
{
- vty_outln (vty,
+ vty_out (vty,
"Neighbour %s dev %s reach %04x rxcost %d txcost %d "
- "rtt %s rttcost %d%s.",
+ "rtt %s rttcost %d%s.\n",
format_address(neigh->address),
neigh->ifp->name,
neigh->reach,
channels[0] = '\0';
}
- vty_outln (vty,
+ vty_out (vty,
"%s metric %d refmetric %d id %s seqno %d%s age %d "
- "via %s neigh %s%s%s%s",
+ "via %s neigh %s%s%s%s\n",
format_prefix(route->src->prefix, route->src->plen),
route_metric(route), route->refmetric,
format_eui64(route->src->id),
void
show_babel_main_configuration (struct vty *vty)
{
- vty_outln (vty,
+ vty_out (vty,
"state file = %s%s"
"configuration file = %s%s"
"protocol informations:%s"
"vty address = %s%s"
"vty port = %d%s"
"id = %s%s"
- "kernel_metric = %d",
+ "kernel_metric = %d\n",
state_file, VTYNL,
babel_config_file ? babel_config_file : babel_config_default,
VTYNL,
} else {
if (option ==
SHOW_DISPLAY_TAGS)
- vty_outln(vty, V4_HEADER_TAG);
+ vty_out(vty, V4_HEADER_TAG);
else if (option ==
SHOW_DISPLAY_OVERLAY)
- vty_outln(vty, V4_HEADER_OVERLAY);
+ vty_out(vty, V4_HEADER_OVERLAY);
else {
vty_out (vty,
"BGP table version is 0, local router ID is %s\n",
vty_out (vty,
"Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
VTYNL);
- vty_outln(vty, V4_HEADER);
+ vty_out(vty, V4_HEADER);
}
}
header = 0;
ip),
rd_ip.
val);
- vty_outln (vty, VTYNL);
+ vty_out (vty, "\n\n");
}
rd_header = 0;
}
else
{
if (tags)
- vty_outln (vty, V4_HEADER_TAG);
+ vty_out (vty, V4_HEADER_TAG);
else
{
vty_out (vty, "BGP table version is 0, local router ID is %s\n",
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
VTYNL);
- vty_outln (vty, V4_HEADER);
+ vty_out (vty, V4_HEADER);
}
}
header = 0;
"Address Family\n"
#define V4_HEADER \
- " Network Next Hop Metric LocPrf Weight Path"
+ " Network Next Hop Metric LocPrf Weight Path\n"
#define V4_HEADER_TAG \
- " Network Next Hop In tag/Out tag"
+ " Network Next Hop In tag/Out tag\n"
#define V4_HEADER_OVERLAY \
- " Network Next Hop EthTag Overlay Index RouterMac"
+ " Network Next Hop EthTag Overlay Index RouterMac\n"
struct rd_as
{
}
#define BGP_SHOW_HEADER_CSV "Flags, Network, Next Hop, Metric, LocPrf, Weight, Path"
-#define BGP_SHOW_DAMP_HEADER " Network From Reuse Path"
-#define BGP_SHOW_FLAP_HEADER " Network From Flaps Duration Reuse Path"
+#define BGP_SHOW_DAMP_HEADER " Network From Reuse Path\n"
+#define BGP_SHOW_FLAP_HEADER " Network From Flaps Duration Reuse Path\n"
static int
bgp_show_prefix_list (struct vty *vty, struct bgp *bgp,
if (!use_json && header)
{
- vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
+ vty_out (vty, "BGP table version is %" PRIu64 ", local router ID is %s\n", table->version,
inet_ntoa(bgp->router_id));
- vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
- vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
+ vty_out (vty, BGP_SHOW_SCODE_HEADER);
+ vty_out (vty, BGP_SHOW_OCODE_HEADER);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
- vty_outln (vty, BGP_SHOW_DAMP_HEADER);
+ vty_out (vty, BGP_SHOW_DAMP_HEADER);
else if (type == bgp_show_type_flap_statistics
|| type == bgp_show_type_flap_neighbor)
- vty_outln (vty, BGP_SHOW_FLAP_HEADER);
+ vty_out (vty, BGP_SHOW_FLAP_HEADER);
else
- vty_outln (vty, BGP_SHOW_HEADER);
+ vty_out (vty, BGP_SHOW_HEADER);
header = 0;
}
}
else
{
- vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
+ vty_out (vty, "BGP table version is %" PRIu64 ", local router ID is %s\n", table->version,
inet_ntoa(bgp->router_id));
- vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
- vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
+ vty_out (vty, BGP_SHOW_SCODE_HEADER);
+ vty_out (vty, BGP_SHOW_OCODE_HEADER);
vty_out (vty, "Originating default network 0.0.0.0%s\n",
VTYNL);
{
vty_out (vty, "BGP table version is 0, local router ID is %s\n",
inet_ntoa(bgp->router_id));
- vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
- vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
+ vty_out (vty, BGP_SHOW_SCODE_HEADER);
+ vty_out (vty, BGP_SHOW_OCODE_HEADER);
}
header1 = 0;
}
if (header2)
{
if (!use_json)
- vty_outln (vty, BGP_SHOW_HEADER);
+ vty_out (vty, BGP_SHOW_HEADER);
header2 = 0;
}
if (ain->attr)
}
else
{
- vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
+ vty_out (vty, "BGP table version is %" PRIu64 ", local router ID is %s\n", table->version,
inet_ntoa(bgp->router_id));
- vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
- vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
+ vty_out (vty, BGP_SHOW_SCODE_HEADER);
+ vty_out (vty, BGP_SHOW_OCODE_HEADER);
}
header1 = 0;
}
if (header2)
{
if (!use_json)
- vty_outln (vty, BGP_SHOW_HEADER);
+ vty_out (vty, BGP_SHOW_HEADER);
header2 = 0;
}
#define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, "\
- "h history, * valid, > best, = multipath,%s"\
- " i internal, r RIB-failure, S Stale, R Removed"
-#define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete%s"
-#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path"
+ "h history, * valid, > best, = multipath,\n"\
+ " i internal, r RIB-failure, S Stale, R Removed\n"
+#define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete\n\n"
+#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path\n"
/* Ancillary information to struct bgp_info,
* used for uncommonly used data (aggregation, MPLS, etc.)
vty = ctx->vty;
- vty_outln (vty, "Update-group %" PRIu64 ":", updgrp->id);
+ vty_out (vty, "Update-group %" PRIu64 ":\n", updgrp->id);
vty_out (vty, " Created: %s", timestamp_string (updgrp->uptime));
filter = &updgrp->conf->filter[updgrp->afi][updgrp->safi];
if (filter->map[RMAP_OUT].name)
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
vty_out (vty, VTYNL);
- vty_outln (vty, " Update-subgroup %" PRIu64 ":", subgrp->id);
+ vty_out (vty, " Update-subgroup %" PRIu64 ":\n", subgrp->id);
vty_out (vty, " Created: %s", timestamp_string (subgrp->uptime));
if (subgrp->split_from.update_group_id || subgrp->split_from.subgroup_id)
{
- vty_outln (vty, " Split from group id: %" PRIu64 "",
+ vty_out (vty, " Split from group id: %" PRIu64 "\n",
subgrp->split_from.update_group_id);
- vty_outln (vty, " Split from subgroup id: %" PRIu64 "",
+ vty_out (vty, " Split from subgroup id: %" PRIu64 "\n",
subgrp->split_from.subgroup_id);
}
subgrp->peer_refreshes_combined);
vty_out (vty, " Merge checks triggered: %u\n",
subgrp->merge_checks_triggered);
- vty_outln (vty, " Version: %" PRIu64 "", subgrp->version);
+ vty_out (vty, " Version: %" PRIu64 "\n", subgrp->version);
vty_out (vty, " Packet queue length: %d\n",
bpacket_queue_length(SUBGRP_PKTQ(subgrp)));
vty_out (vty, " Total packets enqueued: %u\n",
{
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
- vty_outln (vty, "update group %" PRIu64 ", subgroup %" PRIu64 "", updgrp->id,
+ vty_out (vty, "update group %" PRIu64 ", subgroup %" PRIu64 "\n", updgrp->id,
subgrp->id);
bpacket_queue_show_vty (SUBGRP_PKTQ (subgrp), vty);
}
{
if (header1)
{
- vty_outln (vty,
- "BGP table version is %" PRIu64 ", local router ID is %s",
+ vty_out (vty,
+ "BGP table version is %" PRIu64 ", local router ID is %s\n",
table->version,inet_ntoa(bgp->router_id));
- vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
- vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
+ vty_out (vty, BGP_SHOW_SCODE_HEADER);
+ vty_out (vty, BGP_SHOW_OCODE_HEADER);
header1 = 0;
}
if (header2)
{
- vty_outln (vty, BGP_SHOW_HEADER);
+ vty_out (vty, BGP_SHOW_HEADER);
header2 = 0;
}
if ((flags & UPDWALK_FLAGS_ADVQUEUE) && adj->adv && adj->adv->baa)
{
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
- vty_outln (vty, "update group %" PRIu64 ", subgroup %" PRIu64 "", updgrp->id,
+ vty_out (vty, "update group %" PRIu64 ", subgroup %" PRIu64 "\n", updgrp->id,
subgrp->id);
subgrp_show_adjq_vty (subgrp, vty, ctx->flags);
}
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
VTYNL);
- vty_outln (vty, V4_HEADER);
+ vty_out (vty, V4_HEADER);
}
header = 0;
}
value = value_l & 0xff;
if (!argv[1]->arg[0] || *end)
{
- vty_outln (vty, "%% Malformed l2 nve ID \"%s\"",argv[1]->arg);
+ vty_out (vty, "%% Malformed l2 nve ID \"%s\"\n",argv[1]->arg);
return CMD_WARNING;
}
if ((value_l < 1) || (value_l > 0xff))
vty_out (vty, " un=");
rfapiPrintRfapiIpAddr (vty, &rfd->un_addr);
if (vty)
- vty_outln (vty, " to new group \"%s\"",rfd->rfg->name);
+ vty_out (vty, " to new group \"%s\"\n",rfd->rfg->name);
}
}
if (!rfg)
{
if (vty)
- vty_outln (vty, "No NVE group named \"%s\"",rfg_name);
+ vty_out (vty, "No NVE group named \"%s\"\n",rfg_name);
return CMD_WARNING;
}
}
if (!str2prefix (argv[2]->arg, &p))
{
- vty_outln (vty, "Malformed prefix \"%s\"", argv[2]->arg);
+ vty_out (vty, "Malformed prefix \"%s\"\n", argv[2]->arg);
return CMD_WARNING;
}
/*
* different group name: fail
*/
- vty_outln (vty, "nve group \"%s\" already has \"%s\" prefix %s",
+ vty_out (vty, "nve group \"%s\" already has \"%s\" prefix %s\n",
((struct rfapi_nve_group_cfg *) (rn->info))->name,
argv[1]->arg, argv[2]->arg);
return CMD_WARNING;
if (!argv[1]->arg[0] || *end)
{
- vty_outln (vty, "%% Malformed l2 nve ID \"%s\"",argv[1]->arg);
+ vty_out (vty, "%% Malformed l2 nve ID \"%s\"\n",argv[1]->arg);
return CMD_WARNING;
}
if ((value_l < 1) || (value_l > 0xff))
if (!rfg)
{
if (vty)
- vty_outln (vty, "No L2 group named \"%s\"",rfg_name);
+ vty_out (vty, "No L2 group named \"%s\"\n",rfg_name);
return CMD_WARNING;
}
}
if (!str2prefix (argv[5]->arg, &pfx))
{
- vty_outln (vty, "Malformed address \"%s\"", argv[5]->arg);
+ vty_out (vty, "Malformed address \"%s\"\n", argv[5]->arg);
return CMD_WARNING;
}
if (pfx.family != AF_INET && pfx.family != AF_INET6)
{
- vty_outln (vty, "Invalid address \"%s\"", argv[5]->arg);
+ vty_out (vty, "Invalid address \"%s\"\n", argv[5]->arg);
return CMD_WARNING;
}
*/
if (!str2prefix (argv[8]->arg, &pfx))
{
- vty_outln (vty, "Malformed prefix \"%s\"", argv[8]->arg);
+ vty_out (vty, "Malformed prefix \"%s\"\n", argv[8]->arg);
return CMD_WARNING;
}
if (pfx.family != AF_INET && pfx.family != AF_INET6)
{
- vty_outln (vty, "Bad family for prefix \"%s\"", argv[8]->arg);
+ vty_out (vty, "Bad family for prefix \"%s\"\n", argv[8]->arg);
return CMD_WARNING;
}
rfapiQprefix2Rprefix (&pfx, &hpfx);
*/
if (!str2prefix (argv[8]->arg, &pfx))
{
- vty_outln (vty, "Malformed prefix \"%s\"", argv[8]->arg);
+ vty_out (vty, "Malformed prefix \"%s\"\n", argv[8]->arg);
return CMD_WARNING;
}
if (pfx.family != AF_INET && pfx.family != AF_INET6)
{
- vty_outln (vty, "Bad family for prefix \"%s\"", argv[8]->arg);
+ vty_out (vty, "Bad family for prefix \"%s\"\n", argv[8]->arg);
return CMD_WARNING;
}
rfapiQprefix2Rprefix (&pfx, &hpfx);
optary[opt_next].v.l2addr.logical_net_id = strtoul(argv[14]->arg, NULL, 10);
if ((rc = rfapiStr2EthAddr (argv[12]->arg, &optary[opt_next].v.l2addr.macaddr)))
{
- vty_outln (vty, "Bad mac address \"%s\"", argv[12]->arg);
+ vty_out (vty, "Bad mac address \"%s\"\n", argv[12]->arg);
return CMD_WARNING;
}
optary[opt_next].type = RFAPI_VN_OPTION_TYPE_L2ADDR;
*/
if (!str2prefix (argv[8]->arg, &pfx))
{
- vty_outln (vty, "Malformed prefix \"%s\"", argv[8]->arg);
+ vty_out (vty, "Malformed prefix \"%s\"\n", argv[8]->arg);
return CMD_WARNING;
}
if (pfx.family != AF_INET && pfx.family != AF_INET6)
{
- vty_outln (vty, "Bad family for prefix \"%s\"", argv[8]->arg);
+ vty_out (vty, "Bad family for prefix \"%s\"\n", argv[8]->arg);
return CMD_WARNING;
}
rfapiQprefix2Rprefix (&pfx, &hpfx);
memset (&l2o_buf, 0, sizeof (l2o_buf));
if (rfapiStr2EthAddr (argv[10]->arg, &l2o_buf.macaddr))
{
- vty_outln (vty, "Bad mac address \"%s\"", argv[10]->arg);
+ vty_out (vty, "Bad mac address \"%s\"\n", argv[10]->arg);
return CMD_WARNING;
}
if (!str2prefix (arg_prefix, &pfx))
{
- vty_outln (vty, "Malformed prefix \"%s\"",arg_prefix);
+ vty_out (vty, "Malformed prefix \"%s\"\n",arg_prefix);
goto fail;
}
if (pfx.family != AF_INET
&& pfx.family != AF_INET6)
{
- vty_outln (vty, "prefix \"%s\" has invalid address family",
+ vty_out (vty, "prefix \"%s\" has invalid address family\n",
arg_prefix);
goto fail;
}
{
if (!arg_vni)
{
- vty_outln (vty,
- "Missing \"vni\" parameter (mandatory with mac)");
+ vty_out (vty,
+ "Missing \"vni\" parameter (mandatory with mac)\n");
return CMD_WARNING;
}
optary[opt_next].v.l2addr.logical_net_id = strtoul(arg_vni, NULL,
if (!str2prefix (arg_prefix, &rcdarg->prefix))
{
- vty_outln (vty, "Malformed prefix \"%s\"", arg_prefix);
+ vty_out (vty, "Malformed prefix \"%s\"\n", arg_prefix);
return rc;
}
}
{
if ((rc = rfapiStr2EthAddr (arg_l2addr, &rcdarg->l2o.o.macaddr)))
{
- vty_outln (vty, "Malformed L2 Address \"%s\"",
+ vty_out (vty, "Malformed L2 Address \"%s\"\n",
arg_l2addr);
return rc;
}
{
if (!str2prefix_rd (arg_rd, &rcdarg->rd))
{
- vty_outln (vty, "Malformed RD \"%s\"",
+ vty_out (vty, "Malformed RD \"%s\"\n",
arg_rd);
return rc;
}
if (!printed)
{
/* print out a header */
- vty_outln (vty,
- " " "Active Next Hops");
+ vty_out (vty,
+ " Active Next Hops\n");
vty_out (vty, "%-15s %-15s %-5s %-5s %-6s %-6s %s\n",
"VN Address",
"UN Address",
if (!str2prefix (argv[4]->arg, &pfx))
{
- vty_outln (vty, "Malformed address \"%s\"", argv[4]->arg);
+ vty_out (vty, "Malformed address \"%s\"\n", argv[4]->arg);
return CMD_WARNING;
}
if (pfx.family != AF_INET && pfx.family != AF_INET6)
{
- vty_outln (vty, "Invalid address \"%s\"", argv[4]->arg);
+ vty_out (vty, "Invalid address \"%s\"\n", argv[4]->arg);
return CMD_WARNING;
}
/* arg checks */
if (!rfg)
{
- vty_outln (vty, "VRF \"%s\" appears not to be configured.",
+ vty_out (vty, "VRF \"%s\" appears not to be configured.\n",
arg_vrf);
return CMD_WARNING;
}
if (!rfg->rt_export_list || !rfg->rfapi_import_table)
{
- vty_outln (vty, "VRF \"%s\" is missing RT import/export RT configuration.",
+ vty_out (vty, "VRF \"%s\" is missing RT import/export RT configuration.\n",
arg_vrf);
return CMD_WARNING;
}
if (!rfg->rd.family && !arg_rd)
{
- vty_outln (vty, "VRF \"%s\" isn't configured with an RD, so RD must be provided.",
+ vty_out (vty, "VRF \"%s\" isn't configured with an RD, so RD must be provided.\n",
arg_vrf);
return CMD_WARNING;
}
if (rfg->label > MPLS_LABEL_MAX && !arg_label)
{
- vty_outln (vty, "VRF \"%s\" isn't configured with a default labels, so a label must be provided.",
+ vty_out (vty, "VRF \"%s\" isn't configured with a default labels, so a label must be provided.\n",
arg_vrf);
return CMD_WARNING;
}
if (!str2prefix (arg_prefix, &pfx))
{
- vty_outln (vty, "Malformed prefix \"%s\"",
+ vty_out (vty, "Malformed prefix \"%s\"\n",
arg_prefix);
return CMD_WARNING;
}
opt->type = RFAPI_VN_OPTION_TYPE_INTERNAL_RD;
if (!str2prefix_rd (arg_rd, &opt->v.internal_rd))
{
- vty_outln (vty, "Malformed RD \"%s\"",
+ vty_out (vty, "Malformed RD \"%s\"\n",
arg_rd);
return CMD_WARNING;
}
pref = strtoul (arg_pref, &endptr, 10);
if (*endptr != '\0')
{
- vty_outln (vty, "%% Invalid local-preference value \"%s\"",
+ vty_out (vty, "%% Invalid local-preference value \"%s\"\n",
arg_pref);
return CMD_WARNING;
}
/* arg checks */
if (!rfg)
{
- vty_outln (vty, "VRF \"%s\" appears not to be configured.",
+ vty_out (vty, "VRF \"%s\" appears not to be configured.\n",
arg_vrf);
return CMD_WARNING;
}
vty_out (vty, "%sEIGRP Topology Table for AS(%d)/ID(%s)%s\n",
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_out (vty, "Codes: P - Passive, A - Active, U - Update, Q - Query, "
+ "R - Reply%s r - reply Status, s - sia Status%s\n",
VTYNL, VTYNL);
}
vty_out (vty, "%s/%u, ",
inet_ntoa (tn->destination_ipv4->prefix), tn->destination_ipv4->prefixlen);
vty_out (vty, "%u successors, ", successors->count);
- vty_outln (vty, "FD is %u, serno: %" PRIu64 " ", tn->fdistance, tn->serno);
+ vty_out (vty, "FD is %u, serno: %" PRIu64 " \n", tn->fdistance, tn->serno);
list_delete(successors);
}
{
vty_out (vty, ", Active neighbors: %u\n",
circuit->upadjcount[0]);
- vty_outln (vty, " Hello interval: %u, "
- "Holddown count: %u %s",
+ vty_out (vty, " Hello interval: %u, "
+ "Holddown count: %u %s\n",
circuit->hello_interval[0],
circuit->hello_multiplier[0],
(circuit->pad_hellos ? "(pad)" : "(no-pad)"));
- vty_outln (vty, " CNSP interval: %u, "
- "PSNP interval: %u",
+ vty_out (vty, " CNSP interval: %u, "
+ "PSNP interval: %u\n",
circuit->csnp_interval[0],
circuit->psnp_interval[0]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST)
{
vty_out (vty, ", Active neighbors: %u\n",
circuit->upadjcount[1]);
- vty_outln (vty, " Hello interval: %u, "
- "Holddown count: %u %s",
+ vty_out (vty, " Hello interval: %u, "
+ "Holddown count: %u %s\n",
circuit->hello_interval[1],
circuit->hello_multiplier[1],
(circuit->pad_hellos ? "(pad)" : "(no-pad)"));
- vty_outln (vty, " CNSP interval: %u, "
- "PSNP interval: %u",
+ vty_out (vty, " CNSP interval: %u, "
+ "PSNP interval: %u\n",
circuit->csnp_interval[1],
circuit->psnp_interval[1]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST)
{
if ((ipv6_reach->control_info &
CTRL_INFO_DISTRIBUTION) == DISTRIBUTION_INTERNAL)
- vty_outln (vty, " Metric : %-8" PRIu32 " IPv6-Internal : %s/%d",
+ vty_out (vty, " Metric : %-8" PRIu32 " IPv6-Internal : %s/%d\n",
ntohl (ipv6_reach->metric),
buff, ipv6_reach->prefix_len);
else
- vty_outln (vty, " Metric : %-8" PRIu32 " IPv6-External : %s/%d",
+ vty_out (vty, " Metric : %-8" PRIu32 " IPv6-External : %s/%d\n",
ntohl (ipv6_reach->metric),
buff, ipv6_reach->prefix_len);
}
{
if ((ipv6_reach->control_info &
CTRL_INFO_DISTRIBUTION) == DISTRIBUTION_INTERNAL)
- vty_outln (vty, " Metric : %-8" PRIu32 " IPv6-MT-Int : %s/%d %s",
+ vty_out (vty, " Metric : %-8" PRIu32 " IPv6-MT-Int : %s/%d %s\n",
ntohl (ipv6_reach->metric),
buff, ipv6_reach->prefix_len,
isis_mtid2str(mtid));
else
- vty_outln (vty, " Metric : %-8" PRIu32 " IPv6-MT-Ext : %s/%d %s",
+ vty_out (vty, " Metric : %-8" PRIu32 " IPv6-MT-Ext : %s/%d %s\n",
ntohl (ipv6_reach->metric),
buff, ipv6_reach->prefix_len,
isis_mtid2str(mtid));
if (mtid == ISIS_MT_IPV4_UNICAST)
{
/* FIXME: There should be better way to output this stuff. */
- vty_outln (vty, " Metric : %-8" PRIu32 " IPv4-Extended : %s/%d",
+ vty_out (vty, " Metric : %-8" PRIu32 " IPv4-Extended : %s/%d\n",
ntohl (te_ipv4_reach->te_metric),
inet_ntoa (newprefix2inaddr (&te_ipv4_reach->prefix_start,
te_ipv4_reach->control)),
else
{
/* FIXME: There should be better way to output this stuff. */
- vty_outln (vty, " Metric : %-8" PRIu32 " IPv4-MT : %s/%d %s",
+ vty_out (vty, " Metric : %-8" PRIu32 " IPv4-MT : %s/%d %s\n",
ntohl (te_ipv4_reach->te_metric),
inet_ntoa (newprefix2inaddr (&te_ipv4_reach->prefix_start,
te_ipv4_reach->control)),
for (ALL_LIST_ELEMENTS_RO (lsp->tlv_data.is_neighs, lnode, is_neigh))
{
lspid_print (is_neigh->neigh_id, LSPid, dynhost, 0);
- vty_outln (vty, " Metric : %-8" PRIu8 " IS : %s",
+ vty_out (vty, " Metric : %-8" PRIu8 " IS : %s\n",
is_neigh->metrics.metric_default, LSPid);
}
sizeof (ipv4_reach_prefix));
memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask),
sizeof (ipv4_reach_mask));
- vty_outln (vty, " Metric : %-8" PRIu8 " IPv4-Internal : %s %s",
+ vty_out (vty, " Metric : %-8" PRIu8 " IPv4-Internal : %s %s\n",
ipv4_reach->metrics.metric_default, ipv4_reach_prefix,
ipv4_reach_mask);
}
sizeof (ipv4_reach_prefix));
memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask),
sizeof (ipv4_reach_mask));
- vty_outln (vty, " Metric : %-8" PRIu8 " IPv4-External : %s %s",
+ vty_out (vty, " Metric : %-8" PRIu8 " IPv4-External : %s %s\n",
ipv4_reach->metrics.metric_default, ipv4_reach_prefix,
ipv4_reach_mask);
}
struct isis_adjacency *adj;
char buff[PREFIX2STR_BUFFER];
- vty_outln (vty,
- "Vertex Type Metric " "Next-Hop Interface Parent");
+ vty_out (vty,
+ "Vertex Type Metric Next-Hop Interface Parent\n");
for (ALL_LIST_ELEMENTS_RO (paths, node, vertex)) {
if (memcmp (vertex->N.id, root_sysid, ISIS_SYS_ID_LEN) == 0) {
if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_P2P))
{
- vty_outln (vty,
- "isis network point-to-point " "is valid only on broadcast interfaces");
+ vty_out (vty,
+ "isis network point-to-point is valid only on broadcast interfaces\n");
return CMD_ERR_AMBIGUOUS;
}
if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_BROADCAST))
{
- vty_outln (vty,
- "isis network point-to-point " "is valid only on broadcast interfaces");
+ vty_out (vty,
+ "isis network point-to-point is valid only on broadcast interfaces\n");
return CMD_ERR_AMBIGUOUS;
}
if (circuit->area && circuit->area->oldmetric == 1 &&
met > MAX_NARROW_LINK_METRIC)
{
- vty_outln (vty, "Invalid metric %d - should be <0-63> "
- "when narrow metric type enabled",
+ vty_out (vty, "Invalid metric %d - should be <0-63> "
+ "when narrow metric type enabled\n",
met);
return CMD_ERR_AMBIGUOUS;
}
if (circuit->area && circuit->area->newmetric == 1 &&
met > MAX_WIDE_LINK_METRIC)
{
- vty_outln (vty, "Invalid metric %d - should be <0-16777215> "
- "when wide metric type enabled",
+ vty_out (vty, "Invalid metric %d - should be <0-16777215> "
+ "when wide metric type enabled\n",
met);
return CMD_ERR_AMBIGUOUS;
}
if (circuit->area && circuit->area->oldmetric == 1 &&
met > MAX_NARROW_LINK_METRIC)
{
- vty_outln (vty, "Invalid metric %d - should be <0-63> "
- "when narrow metric type enabled",
+ vty_out (vty, "Invalid metric %d - should be <0-63> "
+ "when narrow metric type enabled\n",
met);
return CMD_ERR_AMBIGUOUS;
}
if (circuit->area && circuit->area->newmetric == 1 &&
met > MAX_WIDE_LINK_METRIC)
{
- vty_outln (vty, "Invalid metric %d - should be <0-16777215> "
- "when wide metric type enabled",
+ vty_out (vty, "Invalid metric %d - should be <0-16777215> "
+ "when wide metric type enabled\n",
met);
return CMD_ERR_AMBIGUOUS;
}
if (circuit->area && circuit->area->oldmetric == 1 &&
met > MAX_NARROW_LINK_METRIC)
{
- vty_outln (vty, "Invalid metric %d - should be <0-63> "
- "when narrow metric type enabled",
+ vty_out (vty, "Invalid metric %d - should be <0-63> "
+ "when narrow metric type enabled\n",
met);
return CMD_ERR_AMBIGUOUS;
}
if (circuit->area && circuit->area->newmetric == 1 &&
met > MAX_WIDE_LINK_METRIC)
{
- vty_outln (vty, "Invalid metric %d - should be <0-16777215> "
- "when wide metric type enabled",
+ vty_out (vty, "Invalid metric %d - should be <0-16777215> "
+ "when wide metric type enabled\n",
met);
return CMD_ERR_AMBIGUOUS;
}
if (interval >= area->lsp_refresh[lvl-1])
{
- vty_outln (vty, "LSP gen interval %us must be less than "
- "the LSP refresh interval %us",
+ vty_out (vty, "LSP gen interval %us must be less than "
+ "the LSP refresh interval %us\n",
interval, area->lsp_refresh[lvl - 1]);
return CMD_ERR_AMBIGUOUS;
}
if (refresh_interval < area->lsp_refresh[lvl-1])
{
- vty_outln (vty, "Level %d Max LSP lifetime %us must be 300s greater than "
- "the configured LSP refresh interval %us",
+ vty_out (vty, "Level %d Max LSP lifetime %us must be 300s greater than "
+ "the configured LSP refresh interval %us\n",
lvl, interval, area->lsp_refresh[lvl - 1]);
- vty_outln (vty, "Automatically reducing level %d LSP refresh interval "
- "to %us", lvl, refresh_interval);
+ vty_out (vty, "Automatically reducing level %d LSP refresh interval "
+ "to %us\n", lvl, refresh_interval);
set_refresh_interval[lvl-1] = 1;
if (refresh_interval <= area->lsp_gen_interval[lvl-1])
{
- vty_outln (vty, "LSP refresh interval %us must be greater than "
- "the configured LSP gen interval %us",
+ vty_out (vty, "LSP refresh interval %us must be greater than "
+ "the configured LSP gen interval %us\n",
refresh_interval,area->lsp_gen_interval[lvl - 1]);
return CMD_ERR_AMBIGUOUS;
}
continue;
if (interval <= area->lsp_gen_interval[lvl-1])
{
- vty_outln (vty, "LSP refresh interval %us must be greater than "
- "the configured LSP gen interval %us",
+ vty_out (vty, "LSP refresh interval %us must be greater than "
+ "the configured LSP gen interval %us\n",
interval,area->lsp_gen_interval[lvl - 1]);
return CMD_ERR_AMBIGUOUS;
}
if (interval > (area->max_lsp_lifetime[lvl-1] - 300))
{
- vty_outln (vty, "LSP refresh interval %us must be less than "
- "the configured LSP lifetime %us less 300",
+ vty_out (vty, "LSP refresh interval %us must be less than "
+ "the configured LSP lifetime %us less 300\n",
interval,area->max_lsp_lifetime[lvl - 1]);
return CMD_ERR_AMBIGUOUS;
}
*/
if (memcmp (isis->sysid, GETSYSID (addr), ISIS_SYS_ID_LEN))
{
- vty_outln (vty,
- "System ID must not change when defining additional area" " addresses");
+ vty_out (vty,
+ "System ID must not change when defining additional area addresses\n");
XFREE (MTYPE_ISIS_AREA_ADDR, addr);
return CMD_ERR_AMBIGUOUS;
}
vty_out (vty, "Area %s:\n", area->area_tag);
if (detail == ISIS_UI_LEVEL_BRIEF)
- vty_outln (vty,
- " System Id Interface L State" " Holdtime SNPA");
+ vty_out (vty,
+ " System Id Interface L State Holdtime SNPA\n");
for (ALL_LIST_ELEMENTS_RO (area->circuit_list, cnode, circuit))
{
level + 1);
/* print the title in all cases */
- vty_outln (vty,
- "LSP ID PduLen " "SeqNumber Chksum Holdtime ATT/P/OL");
+ vty_out (vty,
+ "LSP ID PduLen SeqNumber Chksum Holdtime ATT/P/OL\n");
}
if (lsp)
if (LDP_DEBUG(event, EVENT))
vty_out (vty, " LDP events debugging is on\n");
if (LDP_DEBUG(msg, MSG_RECV_ALL))
- vty_outln (vty,
- " LDP detailed messages debugging is on " "(inbound)");
+ vty_out (vty,
+ " LDP detailed messages debugging is on (inbound)\n");
else if (LDP_DEBUG(msg, MSG_RECV))
vty_out (vty," LDP messages debugging is on (inbound)\n");
if (LDP_DEBUG(msg, MSG_SEND_ALL))
- vty_outln (vty,
- " LDP detailed messages debugging is on " "(outbound)");
+ vty_out (vty,
+ " LDP detailed messages debugging is on (outbound)\n");
else if (LDP_DEBUG(msg, MSG_SEND))
vty_out (vty," LDP messages debugging is on (outbound)\n");
if (LDP_DEBUG(zebra, ZEBRA))
vty_out (vty, " discovery transport-address %s\n",
log_addr(af, &af_conf->trans_addr));
else
- vty_outln (vty,
- " ! Incomplete config, specify a discovery " "transport-address");
+ vty_out (vty,
+ " ! Incomplete config, specify a discovery transport-address\n");
if ((af_conf->flags & F_LDPD_AF_ALLOCHOSTONLY) ||
af_conf->acl_label_allocate_for[0] != '\0') {
if (nbrp->flags & F_NBRP_GTSM) {
if (nbrp->gtsm_enabled)
- vty_outln (vty, " neighbor %s ttl-security hops "
- "%u", inet_ntoa(nbrp->lsr_id),
+ vty_out (vty, " neighbor %s ttl-security hops "
+ "%u\n", inet_ntoa(nbrp->lsr_id),
nbrp->gtsm_hops);
else
- vty_outln (vty, " neighbor %s ttl-security "
- "disable",inet_ntoa(nbrp->lsr_id));
+ vty_out (vty, " neighbor %s ttl-security "
+ "disable\n",inet_ntoa(nbrp->lsr_id));
}
if (nbrp->auth.method == AUTH_MD5SIG)
vty_out (vty, " pw-status disable\n");
if (missing_lsrid)
- vty_outln (vty,
- " ! Incomplete config, specify a neighbor " "lsr-id");
+ vty_out (vty,
+ " ! Incomplete config, specify a neighbor lsr-id\n");
if (missing_pwid)
vty_out (vty," ! Incomplete config, specify a pw-id\n");
}
log_addr(nbr->af, &nbr->raddr),ntohs(nbr->rport));
vty_out (vty, " Authentication: %s\n",
(nbr->auth_method == AUTH_MD5SIG) ? "TCP MD5 Signature" : "none");
- vty_outln(vty, " Session Holdtime: %u secs; "
- "KeepAlive interval: %u secs", nbr->holdtime,
+ vty_out(vty, " Session Holdtime: %u secs; "
+ "KeepAlive interval: %u secs\n", nbr->holdtime,
nbr->holdtime / KEEPALIVE_PER_PERIOD);
vty_out(vty, " State: %s; Downstream-Unsolicited\n",
nbr_state_name(nbr->nbr_state));
void
show_nbr_capabilities(struct vty *vty, struct ctl_nbr *nbr)
{
- vty_outln (vty, " Capabilities Sent:%s"
+ vty_out (vty, " Capabilities Sent:%s"
" - Dynamic Announcement (0x0506)%s"
" - Typed Wildcard (0x050B)%s"
- " - Unrecognized Notification (0x0603)",
+ " - Unrecognized Notification (0x0603)\n",
VTYNL, VTYNL, VTYNL);
vty_out (vty, " Capabilities Received:\n");
if (nbr->flags & F_NBR_CAP_DYNAMIC)
if (pw->local_label != NO_LABEL) {
vty_out (vty, " Local Label: %u\n",
pw->local_label);
- vty_outln (vty, "%-8sCbit: %u, VC Type: %s, "
- "GroupID: %u", "", pw->local_cword,
+ vty_out (vty, "%-8sCbit: %u, VC Type: %s, "
+ "GroupID: %u\n", "", pw->local_cword,
pw_type_name(pw->type),pw->local_gid);
vty_out (vty, "%-8sMTU: %u\n", "",pw->local_ifmtu);
} else
if (pw->remote_label != NO_LABEL) {
vty_out (vty, " Remote Label: %u\n",
pw->remote_label);
- vty_outln (vty, "%-8sCbit: %u, VC Type: %s, "
- "GroupID: %u", "", pw->remote_cword,
+ vty_out (vty, "%-8sCbit: %u, VC Type: %s, "
+ "GroupID: %u\n", "", pw->remote_cword,
pw_type_name(pw->type),pw->remote_gid);
vty_out (vty, "%-8sMTU: %u\n", "",pw->remote_ifmtu);
} else
return (0);
}
- vty_outln (vty,
+ vty_out (vty,
"Supported LDP Capabilities%s"
" * Dynamic Announcement (0x0506)%s"
" * Typed Wildcard (0x050B)%s"
- " * Unrecognized Notification (0x0603)%s", VTYNL,
+ " * Unrecognized Notification (0x0603)%s\n", VTYNL,
VTYNL, VTYNL, VTYNL);
return (0);
}
else
{
- vty_outln (vty, " %s%sDetect Mul: %d, Min Rx interval: %d,"
- " Min Tx interval: %d",
+ vty_out (vty, " %s%sDetect Mul: %d, Min Rx interval: %d,"
+ " Min Tx interval: %d\n",
(extra_space) ? " ": "", (bfd_tag) ? "BFD: " : " ",
bfd_info->detect_mult, bfd_info->required_min_rx,
bfd_info->desired_min_tx);
if (strlen(name_str) > ACL_NAMSIZ)
{
- vty_outln (vty, "%% ACL name %s is invalid: length exceeds "
- "%d characters",
+ vty_out (vty, "%% ACL name %s is invalid: length exceeds "
+ "%d characters\n",
name_str, ACL_NAMSIZ);
return CMD_WARNING;
}
if ((sl = strlen(ifname)) > INTERFACE_NAMSIZ)
{
- vty_outln (vty, "%% Interface name %s is invalid: length exceeds "
- "%d characters",
+ vty_out (vty, "%% Interface name %s is invalid: length exceeds "
+ "%d characters\n",
ifname, INTERFACE_NAMSIZ);
return CMD_WARNING;
}
if (su.sin.sin_addr.s_addr == 0 ||
IPV4_CLASS_DE(su.sin.sin_addr.s_addr))
{
- vty_outln (vty,
- "%% nexthop address cannot be 0.0.0.0, multicast " "or reserved");
+ vty_out (vty,
+ "%% nexthop address cannot be 0.0.0.0, multicast or reserved\n");
return CMD_WARNING;
}
if (argv_find (argv, argc, "FILTER", &idx)) {
filter = parse_filter (argv[idx]->arg);
if (!filter) {
- vty_outln(vty, "Invalid filter \"%s\" specified; must contain at least"
- "one of 'RWTEXB'", argv[idx]->arg);
+ vty_out(vty, "Invalid filter \"%s\" specified; must contain at least"
+ "one of 'RWTEXB'\n", argv[idx]->arg);
return CMD_WARNING;
}
}
if (argv_find (argv, argc, "FILTER", &idx)) {
filter = parse_filter (argv[idx]->arg);
if (!filter) {
- vty_outln(vty, "Invalid filter \"%s\" specified; must contain at least"
- "one of 'RWTEXB'", argv[idx]->arg);
+ vty_out(vty, "Invalid filter \"%s\" specified; must contain at least"
+ "one of 'RWTEXB'\n", argv[idx]->arg);
return CMD_WARNING;
}
}
vty->width = ((vty->sb_buf[1] << 8)|vty->sb_buf[2]);
vty->height = ((vty->sb_buf[3] << 8)|vty->sb_buf[4]);
#ifdef TELNET_OPTION_DEBUG
- vty_outln (vty, "TELNET NAWS window size negotiation completed: "
- "width %d, height %d",
+ vty_out (vty, "TELNET NAWS window size negotiation completed: "
+ "width %d, height %d\n",
vty->width, vty->height);
#endif
}
CPP_WARN("VTY_GET_IPV4_PREFIX is no longer useful, use str2prefix_ipv4() or DEFPY.")
#define vty_outln(vty, str, ...) \
vty_out(vty, str "\n", ## __VA_ARGS__) \
-/* CPP_WARN("vty_outln is no longer useful, use vty_out(...\\n...)") */
+ CPP_WARN("vty_outln is no longer useful, use vty_out(...\\n...)")
/* Default time out value */
#define VTY_TIMEOUT_DEFAULT 600
if (ctx->afi != family2afi(sockunion_family(&c->remote_addr)))
return;
- vty_outln(ctx->vty,
+ vty_out(ctx->vty,
"Type: %s%s"
"Flags:%s%s%s"
- "Protocol-Address: %s/%zu",
+ "Protocol-Address: %s/%zu\n",
nhrp_cache_type_str[c->cur.type],
VTYNL,
(c->cur.peer && c->cur.peer->online) ? " up": "",
sockunion2str(&c->cur.remote_nbma_natoa, buf, sizeof buf));
}
- vty_outln(ctx->vty, VTYNL);
+ vty_out(ctx->vty, "\n\n");
}
DEFUN(show_ip_nhrp, show_ip_nhrp_cmd,
struct pim_ifchannel *ch;
struct in_addr ifaddr;
- vty_outln (vty,
+ vty_out (vty,
"CA: CouldAssert%s"
"ECA: Evaluate CouldAssert%s"
"ATD: AssertTrackingDesired%s"
- "eATD: Evaluate AssertTrackingDesired%s",
+ "eATD: Evaluate AssertTrackingDesired%s\n",
VTYNL, VTYNL, VTYNL, VTYNL);
vty_out (vty,
json_object_int_add(json, "nexthopLookups", qpim_nexthop_lookups);
json_object_int_add(json, "nexthopLookupsAvoided", nexthop_lookups_avoided);
} else {
- vty_outln (vty,
+ vty_out (vty,
"RPF Cache Refresh Delay: %ld msecs%s"
"RPF Cache Refresh Timer: %ld msecs%s"
"RPF Cache Refresh Requests: %lld%s"
"RPF Cache Refresh Events: %lld%s"
"RPF Cache Refresh Last: %s%s"
"Nexthop Lookups: %lld%s"
- "Nexthop Lookups Avoided: %lld",
+ "Nexthop Lookups Avoided: %lld\n",
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,
pim_time_uptime_begin(uptime_mroute_add, sizeof(uptime_mroute_add), now, qpim_mroute_add_last);
pim_time_uptime_begin(uptime_mroute_del, sizeof(uptime_mroute_del), now, qpim_mroute_del_last);
- vty_outln (vty,
+ vty_out (vty,
"Scan OIL - Last: %s Events: %lld%s"
"MFC Add - Last: %s Events: %lld%s"
- "MFC Del - Last: %s Events: %lld",
+ "MFC Del - Last: %s Events: %lld\n",
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);
return CMD_WARNING;
}
- vty_outln(vty, "WARN: Enabled PIM SM on interface; configure PIM SSM "
- "range if needed");
+ vty_out(vty, "WARN: Enabled PIM SM on interface; configure PIM SSM "
+ "range if needed\n");
return CMD_SUCCESS;
}
if (! rip)
return CMD_SUCCESS;
- vty_outln (vty, "Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP%s"
+ vty_out (vty, "Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP%s"
"Sub-codes:%s"
" (n) - normal, (s) - static, (d) - default, (r) - redistribute,%s"
" (i) - interface%s%s"
- " Network Next Hop Metric From Tag Time",
+ " Network Next Hop Metric From Tag Time\n",
VTYNL, VTYNL, VTYNL, VTYNL, VTYNL);
for (np = route_top (rip->table); np; np = route_next (np))
if (! rip)
return CMD_SUCCESS;
- vty_outln (vty, "Routing Protocol is \"rip\"");
+ vty_out (vty, "Routing Protocol is \"rip\"\n");
vty_out (vty, " Sending updates every %ld seconds with +/-50%%,",
rip->update_time);
vty_out (vty, " next due in %lu seconds\n",
return CMD_SUCCESS;
/* Header of display. */
- vty_outln (vty, "Codes: R - RIPng, C - connected, S - Static, O - OSPF, B - BGP%s"
+ vty_out (vty, "Codes: R - RIPng, C - connected, S - Static, O - OSPF, B - BGP%s"
"Sub-codes:%s"
" (n) - normal, (s) - static, (d) - default, (r) - redistribute,%s"
" (i) - interface, (a/S) - aggregated/Suppressed%s%s"
- " Network Next Hop Via Metric Tag Time",
+ " Network Next Hop Via Metric Tag Time\n",
VTYNL, VTYNL, VTYNL,
VTYNL, VTYNL);
vty_out (vty, "%*s", 18, " ");
vty_out (vty, "%*s", 28, " ");
- vty_outln (vty, "self %2d %3"ROUTE_TAG_PRI"", aggregate->metric,
+ vty_out (vty, "self %2d %3"ROUTE_TAG_PRI"\n", aggregate->metric,
(route_tag_t)aggregate->tag);
}
if (! ripng)
return CMD_SUCCESS;
- vty_outln (vty, "Routing Protocol is \"RIPng\"");
+ vty_out (vty, "Routing Protocol is \"RIPng\"\n");
vty_out (vty, " Sending updates every %ld seconds with +/-50%%,",
ripng->update_time);
vty_out (vty, " next due in %lu seconds\n",
zif->ra_sent, zif->ra_rcvd);
interval = rtadv->MaxRtrAdvInterval;
if (interval % 1000)
- vty_outln (vty, " ND router advertisements are sent every "
- "%d milliseconds",interval);
+ vty_out (vty, " ND router advertisements are sent every "
+ "%d milliseconds\n",interval);
else
- vty_outln (vty, " ND router advertisements are sent every "
- "%d seconds",interval / 1000);
+ vty_out (vty, " ND router advertisements are sent every "
+ "%d seconds\n",interval / 1000);
if (rtadv->AdvDefaultLifetime != -1)
vty_out (vty, " ND router advertisements live for %d seconds\n",
rtadv->AdvDefaultLifetime);
else
vty_out (vty,
" ND router advertisements lifetime tracks ra-interval\n");
- vty_outln (vty, " ND router advertisement default router preference is "
- "%s",rtadv_pref_strs[rtadv->DefaultPreference]);
+ vty_out (vty, " ND router advertisement default router preference is "
+ "%s\n",rtadv_pref_strs[rtadv->DefaultPreference]);
if (rtadv->AdvManagedFlag)
vty_out (vty," Hosts use DHCP to obtain routable addresses.\n");
else
vty_out (vty," Hosts use stateless autoconfig for addresses.\n");
if (rtadv->AdvHomeAgentFlag)
{
- vty_outln (vty,
- " ND router advertisements with " "Home Agent flag bit set.");
+ vty_out (vty,
+ " ND router advertisements with Home Agent flag bit set.\n");
if (rtadv->HomeAgentLifetime != -1)
vty_out (vty, " Home Agent lifetime is %u seconds\n",
rtadv->HomeAgentLifetime);
#ifdef HAVE_PROC_NET_DEV
/* Statistics print out using proc file system. */
- vty_outln (vty, " %lu input packets (%lu multicast), %lu bytes, "
- "%lu dropped",
+ vty_out (vty, " %lu input packets (%lu multicast), %lu bytes, "
+ "%lu dropped\n",
ifp->stats.rx_packets, ifp->stats.rx_multicast,
ifp->stats.rx_bytes, ifp->stats.rx_dropped);
- vty_outln (vty, " %lu input errors, %lu length, %lu overrun,"
- " %lu CRC, %lu frame",
+ vty_out (vty, " %lu input errors, %lu length, %lu overrun,"
+ " %lu CRC, %lu frame\n",
ifp->stats.rx_errors, ifp->stats.rx_length_errors,
ifp->stats.rx_over_errors, ifp->stats.rx_crc_errors,
ifp->stats.rx_frame_errors);
ifp->stats.tx_packets, ifp->stats.tx_bytes,
ifp->stats.tx_dropped);
- vty_outln (vty, " %lu output errors, %lu aborted, %lu carrier,"
- " %lu fifo, %lu heartbeat",
+ vty_out (vty, " %lu output errors, %lu aborted, %lu carrier,"
+ " %lu fifo, %lu heartbeat\n",
ifp->stats.tx_errors, ifp->stats.tx_aborted_errors,
ifp->stats.tx_carrier_errors, ifp->stats.tx_fifo_errors,
ifp->stats.tx_heartbeat_errors);
#ifdef HAVE_NET_RT_IFLIST
#if defined (__bsdi__) || defined (__NetBSD__)
/* Statistics print out using sysctl (). */
- vty_outln (vty, " input packets %llu, bytes %llu, dropped %llu,"
- " multicast packets %llu",
+ vty_out (vty, " input packets %llu, bytes %llu, dropped %llu,"
+ " multicast packets %llu\n",
(unsigned long long)ifp->stats.ifi_ipackets,
(unsigned long long)ifp->stats.ifi_ibytes,
(unsigned long long)ifp->stats.ifi_iqdrops,
vty_out (vty, " input errors %llu\n",
(unsigned long long)ifp->stats.ifi_ierrors);
- vty_outln (vty, " output packets %llu, bytes %llu,"
- " multicast packets %llu",
+ vty_out (vty, " output packets %llu, bytes %llu,"
+ " multicast packets %llu\n",
(unsigned long long)ifp->stats.ifi_opackets,
(unsigned long long)ifp->stats.ifi_obytes,
(unsigned long long)ifp->stats.ifi_omcasts);
(unsigned long long)ifp->stats.ifi_collisions);
#else
/* Statistics print out using sysctl (). */
- vty_outln (vty, " input packets %lu, bytes %lu, dropped %lu,"
- " multicast packets %lu",
+ vty_out (vty, " input packets %lu, bytes %lu, dropped %lu,"
+ " multicast packets %lu\n",
ifp->stats.ifi_ipackets, ifp->stats.ifi_ibytes,
ifp->stats.ifi_iqdrops,ifp->stats.ifi_imcasts);
return CMD_SUCCESS;
}
else {
- vty_outln (vty, "%% MinAdvertInterval must be less than or equal to "
- "MaxAdvertInterval");
+ vty_out (vty, "%% MinAdvertInterval must be less than or equal to "
+ "MaxAdvertInterval\n");
return CMD_WARNING;
}
}
return CMD_SUCCESS;
}
else {
- vty_outln (vty, "%% MaxAdvertInterval must be greater than or equal to "
- "MinAdvertInterval");
+ vty_out (vty, "%% MaxAdvertInterval must be greater than or equal to "
+ "MinAdvertInterval\n");
return CMD_WARNING;
}
}
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
return zebra_route_match_add (vty, "source-protocol", proto, RMAP_EVENT_MATCH_ADDED);
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
if (proto_rm[AFI_IP][i])
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
if (proto_rm[AFI_IP6][i])
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
if (!proto_rm[AFI_IP6][i])
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
if (nht_rm[AFI_IP][i])
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
if (nht_rm[AFI_IP6][i])
i = proto_name2num(proto);
if (i < 0)
{
- vty_outln (vty, "invalid protocol name \"%s\"", proto);
+ vty_out (vty, "invalid protocol name \"%s\"\n", proto);
return CMD_WARNING;
}
if (nht_rm[AFI_IP6][i] && rmap && strcmp(rmap, nht_rm[AFI_IP6][i]))
{
- vty_outln (vty, "invalid route-map \"%s\"", rmap);
+ vty_out (vty, "invalid route-map \"%s\"\n", rmap);
return CMD_WARNING;
}
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
{
struct zebra_vrf *zvrf = vrf->info;
- vty_outln (vty,"%-25s %10" PRIu64 " %10" PRIu64 " %10" PRIu64 " %10" PRIu64 " %10" PRIu64 "",
+ vty_out (vty,"%-25s %10" PRIu64 " %10" PRIu64 " %10" PRIu64 " %10" PRIu64 " %10" PRIu64 "\n",
vrf->name, zvrf->installs, zvrf->removals,
zvrf->neigh_updates, zvrf->lsp_installs,zvrf->lsp_removals);
}