diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 19:12:39 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-07-14 10:20:02 +0200 |
commit | 26a429fe8e49c67a375886a99a3687417379d19e (patch) | |
tree | c244b1a42b7eb8a402fff1a80b165a618cf7b19f | |
parent | *: remove VTYNL, part 1 of 6 (diff) | |
download | frr-26a429fe8e49c67a375886a99a3687417379d19e.tar.xz frr-26a429fe8e49c67a375886a99a3687417379d19e.zip |
*: remove VTYNL, part 2 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | bgpd/bgp_vty.c | 348 | ||||
-rw-r--r-- | bgpd/rfapi/bgp_rfapi_cfg.c | 14 | ||||
-rw-r--r-- | lib/if.c | 3 | ||||
-rw-r--r-- | lib/plist.c | 2 | ||||
-rw-r--r-- | lib/smux.c | 2 | ||||
-rw-r--r-- | lib/vrf.c | 3 | ||||
-rw-r--r-- | lib/vty.c | 2 | ||||
-rw-r--r-- | ospf6d/ospf6_abr.c | 2 | ||||
-rw-r--r-- | ospf6d/ospf6_area.c | 4 | ||||
-rw-r--r-- | ospf6d/ospf6_asbr.c | 10 | ||||
-rw-r--r-- | ospf6d/ospf6_flood.c | 2 | ||||
-rw-r--r-- | ospf6d/ospf6_interface.c | 20 | ||||
-rw-r--r-- | ospf6d/ospf6_intra.c | 2 | ||||
-rw-r--r-- | ospf6d/ospf6_lsa.c | 10 | ||||
-rw-r--r-- | ospf6d/ospf6_message.c | 12 | ||||
-rw-r--r-- | ospf6d/ospf6_neighbor.c | 6 | ||||
-rw-r--r-- | ospf6d/ospf6_route.c | 12 | ||||
-rw-r--r-- | ospf6d/ospf6_spf.c | 8 | ||||
-rw-r--r-- | ospf6d/ospf6_top.c | 12 | ||||
-rw-r--r-- | ospf6d/ospf6_zebra.c | 22 | ||||
-rw-r--r-- | ospf6d/ospf6d.c | 34 | ||||
-rw-r--r-- | ospf6d/ospf6d.h | 2 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 361 | ||||
-rw-r--r-- | ospfd/ospf_vty.h | 4 | ||||
-rw-r--r-- | ripngd/ripngd.c | 8 | ||||
-rw-r--r-- | zebra/debug.c | 38 | ||||
-rw-r--r-- | zebra/zebra_rnh.c | 4 | ||||
-rw-r--r-- | zebra/zebra_vty.c | 10 |
28 files changed, 442 insertions, 515 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4aa9922ba..59fec7fb8 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -319,7 +319,7 @@ bgp_vty_find_and_parse_afi_safi_bgp (struct vty *vty, struct cmd_token **argv, i *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; } @@ -383,14 +383,12 @@ peer_lookup_vty (struct vty *vty, const char *ip_str) 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; } @@ -433,8 +431,7 @@ peer_and_group_lookup_vty (struct vty *vty, const char *peer_str) { 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; } @@ -444,8 +441,7 @@ peer_and_group_lookup_vty (struct vty *vty, const char *peer_str) 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; } @@ -737,7 +733,7 @@ bgp_clear_vty (struct vty *vty, const char *name, afi_t afi, safi_t safi, 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; } } @@ -794,7 +790,7 @@ DEFUN (no_bgp_multiple_instance, 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; @@ -875,13 +871,13 @@ DEFUN_NOSH (router_bgp, 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; } } @@ -906,14 +902,13 @@ DEFUN_NOSH (router_bgp, 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; @@ -951,13 +946,13 @@ DEFUN (no_router_bgp, 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; } } @@ -972,7 +967,7 @@ DEFUN (no_router_bgp, 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; } } @@ -1041,7 +1036,7 @@ DEFUN (bgp_cluster_id, 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; } @@ -1120,8 +1115,7 @@ DEFUN (bgp_confederation_peers, 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; } @@ -1326,8 +1320,7 @@ bgp_update_delay_config_vty (struct vty *vty, const char *delay, 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; } @@ -1356,7 +1349,7 @@ bgp_config_write_update_delay (struct vty *vty, struct bgp *bgp) 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; @@ -1597,7 +1590,7 @@ bgp_config_write_maxpaths (struct vty *vty, struct bgp *bgp, afi_t afi, 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; @@ -1625,8 +1618,7 @@ DEFUN (bgp_timers, /* 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; } @@ -1760,8 +1752,7 @@ DEFUN (no_bgp_deterministic_med, 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 @@ -2454,7 +2445,7 @@ DEFUN (bgp_listen_range, ret = str2prefix (prefix, &range); if (! ret) { - vty_out (vty, "%% Malformed listen range%s", VTYNL); + vty_out (vty, "%% Malformed listen range\n"); return CMD_WARNING; } @@ -2462,8 +2453,7 @@ DEFUN (bgp_listen_range, 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; } @@ -2486,15 +2476,14 @@ DEFUN (bgp_listen_range, /* 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; } @@ -2530,7 +2519,7 @@ DEFUN (no_bgp_listen_range, ret = str2prefix (prefix, &range); if (! ret) { - vty_out (vty, "%% Malformed listen range%s", VTYNL); + vty_out (vty, "%% Malformed listen range\n"); return CMD_WARNING; } @@ -2538,8 +2527,7 @@ DEFUN (no_bgp_listen_range, 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; } @@ -2548,7 +2536,7 @@ DEFUN (no_bgp_listen_range, 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; } @@ -2651,8 +2639,7 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str, 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; @@ -2662,8 +2649,7 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str, { 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); @@ -2714,7 +2700,7 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, if (group) { - vty_out (vty, "%% Name conflict with peer-group %s", VTYNL); + vty_out (vty, "%% Name conflict with peer-group \n"); return CMD_WARNING; } @@ -2794,7 +2780,7 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, 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; } @@ -2896,7 +2882,7 @@ DEFUN (neighbor_peer_group, 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; } @@ -2945,7 +2931,7 @@ DEFUN (no_neighbor, 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; } } @@ -2956,8 +2942,7 @@ DEFUN (no_neighbor, { 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; } @@ -3001,7 +2986,7 @@ DEFUN (no_neighbor_interface_config, } 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; @@ -3024,7 +3009,7 @@ DEFUN (no_neighbor_peer_group, 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; @@ -3059,7 +3044,7 @@ DEFUN (no_neighbor_interface_peer_group_remote_as, 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; @@ -3333,8 +3318,7 @@ DEFUN (neighbor_set_peer_group, { 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; } @@ -3342,8 +3326,7 @@ DEFUN (neighbor_set_peer_group, 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; } } @@ -3351,7 +3334,7 @@ DEFUN (neighbor_set_peer_group, 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; } @@ -3397,7 +3380,7 @@ DEFUN (no_neighbor_set_peer_group, 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; } @@ -4637,8 +4620,7 @@ peer_update_source_vty (struct vty *vty, const char *peer_str, { 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 @@ -6291,7 +6273,7 @@ bgp_clear_prefix (struct vty *vty, const char *view_name, const char *ip_str, 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; } } @@ -6300,7 +6282,7 @@ bgp_clear_prefix (struct vty *vty, const char *view_name, const char *ip_str, 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; } @@ -6526,11 +6508,11 @@ DEFUN (show_bgp_views, 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. */ @@ -6564,7 +6546,7 @@ DEFUN (show_bgp_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; } @@ -6890,7 +6872,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, 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)) @@ -6934,7 +6916,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, { 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 { @@ -6982,9 +6964,9 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, 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); @@ -7010,13 +6992,13 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, 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"); } } @@ -7111,7 +7093,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, else vty_out (vty, " %12s", lookup_msg(bgp_status_msg, peer->status, NULL)); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } } @@ -7143,7 +7125,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, 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); @@ -7185,7 +7167,7 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi, 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) @@ -7208,7 +7190,7 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi, json = json_object_new_object(); if (! is_first) - vty_out (vty, ",%s", VTYNL); + vty_out (vty, ",\n"); else is_first = 0; @@ -7236,9 +7218,9 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi, } 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 @@ -7251,7 +7233,7 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi, 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)) { @@ -7260,7 +7242,7 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi, json = json_object_new_object(); if (! is_first) - vty_out (vty, ",%s", VTYNL); + vty_out (vty, ",\n"); else is_first = 0; @@ -7278,7 +7260,7 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi, } if (use_json) - vty_out (vty, "}%s", VTYNL); + vty_out (vty, "}\n"); } @@ -7302,9 +7284,9 @@ bgp_show_summary_vty (struct vty *vty, const char *name, 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; } @@ -7455,7 +7437,7 @@ bgp_show_peer_afi_orf_cap (struct vty *vty, struct peer *p, afi_t afi, safi_t sa vty_out (vty, "%sreceived", CHECK_FLAG (p->af_cap[afi][safi], adv_smcap) ? ", " : ""); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } @@ -7481,7 +7463,7 @@ bgp_show_peer_afi_orf_cap (struct vty *vty, struct peer *p, afi_t afi, safi_t sa vty_out (vty, "%sreceived", CHECK_FLAG (p->af_cap[afi][safi], adv_rmcap) ? ", " : ""); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } } @@ -7702,7 +7684,7 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi, } 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) @@ -7710,7 +7692,7 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi, || CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_ADV) || CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_RCV) || 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) @@ -7750,45 +7732,45 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi, 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)) @@ -7797,13 +7779,13 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi, 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)) { @@ -7814,22 +7796,22 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi, 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) @@ -7898,10 +7880,10 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi, 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"); } } @@ -7988,9 +7970,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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 @@ -8005,9 +7987,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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"); } } @@ -8158,7 +8140,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js { /* 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"); @@ -8169,7 +8151,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js /* 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)); @@ -8184,7 +8166,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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)); @@ -8430,7 +8412,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js } else { - vty_out (vty, " Neighbor capabilities:%s", VTYNL); + vty_out (vty, " Neighbor capabilities:\n"); /* AS4 */ if (CHECK_FLAG (p->cap, PEER_CAP_AS4_RCV) @@ -8442,14 +8424,14 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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++) @@ -8465,7 +8447,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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) || @@ -8479,7 +8461,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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"); } } } @@ -8494,7 +8476,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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 */ @@ -8507,7 +8489,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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)) { @@ -8535,7 +8517,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js && 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 */ @@ -8548,7 +8530,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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 */ @@ -8561,7 +8543,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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 */ @@ -8574,7 +8556,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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)) { @@ -8596,7 +8578,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js } if (! restart_af_count) vty_out (vty, "none"); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } } @@ -8659,7 +8641,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js } 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: "); @@ -8675,7 +8657,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js } } } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); vty_out (vty, " End-of-RIB received: "); for (afi = AFI_IP ; afi < AFI_MAX ; afi++) { @@ -8689,7 +8671,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js } } } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } if (p->t_gr_restart) @@ -8727,10 +8709,10 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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); @@ -8771,10 +8753,10 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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 */ @@ -8803,7 +8785,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js if (use_json) json_object_string_add(json_neigh, "lastReset", "never"); else - vty_out (vty, " Last reset never%s", VTYNL); + vty_out (vty, " Last reset never\n"); } else { @@ -8900,7 +8882,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js } } } - vty_out(vty, "%s", VTYNL); + vty_out(vty, "\n"); } } } @@ -8910,7 +8892,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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) { @@ -9074,7 +9056,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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", @@ -9087,7 +9069,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js 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); @@ -9146,7 +9128,7 @@ bgp_show_neighbor (struct vty *vty, struct bgp *bgp, enum show_type type, 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) @@ -9156,7 +9138,7 @@ bgp_show_neighbor (struct vty *vty, struct bgp *bgp, enum show_type type, } else { - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } return CMD_SUCCESS; @@ -9171,7 +9153,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) 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)) { @@ -9194,7 +9176,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) ? "Default" : bgp->name); if (! is_first) - vty_out (vty, ",%s", VTYNL); + vty_out (vty, ",\n"); else is_first = 0; @@ -9213,7 +9195,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) } if (use_json) - vty_out (vty, "}%s", VTYNL); + vty_out (vty, "}\n"); } static int @@ -9245,7 +9227,7 @@ bgp_show_neighbor_vty (struct vty *vty, const char *name, 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; } @@ -9335,7 +9317,7 @@ DEFUN (show_ip_bgp_paths, 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; } @@ -9361,7 +9343,7 @@ DEFUN (show_ip_bgp_community_info, 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 *)) @@ -9390,7 +9372,7 @@ DEFUN (show_ip_bgp_lcommunity_info, 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 *)) @@ -9818,9 +9800,9 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group) } 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:"); @@ -9834,9 +9816,9 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group) } } 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++) @@ -9867,7 +9849,7 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group) /* 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)) @@ -9920,7 +9902,7 @@ bgp_show_peer_group (struct vty *vty, struct bgp *bgp, } 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; } @@ -9939,7 +9921,7 @@ bgp_show_peer_group_vty (struct vty *vty, const char *name, if (! bgp) { - vty_out (vty, "%% No such BGP instance exist%s", VTYNL); + vty_out (vty, "%% No such BGP instance exist\n"); return CMD_WARNING; } @@ -9984,7 +9966,7 @@ DEFUN (bgp_redistribute_ipv4, 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); @@ -10014,7 +9996,7 @@ DEFUN (bgp_redistribute_ipv4_rmap, 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; } @@ -10049,7 +10031,7 @@ DEFUN (bgp_redistribute_ipv4_metric, 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); @@ -10088,7 +10070,7 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric, 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); @@ -10130,7 +10112,7 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap, 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); @@ -10420,7 +10402,7 @@ DEFUN (no_bgp_redistribute_ipv4, 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); @@ -10450,7 +10432,7 @@ DEFUN (bgp_redistribute_ipv6, 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; } @@ -10475,7 +10457,7 @@ DEFUN (bgp_redistribute_ipv6_rmap, 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; } @@ -10502,7 +10484,7 @@ DEFUN (bgp_redistribute_ipv6_metric, 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); @@ -10533,7 +10515,7 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric, 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); @@ -10565,7 +10547,7 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap, 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); @@ -10594,7 +10576,7 @@ DEFUN (no_bgp_redistribute_ipv6, 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; } @@ -10637,7 +10619,7 @@ bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi, 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"); } } } @@ -11801,16 +11783,16 @@ community_list_perror (struct vty *vty, int ret) 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; } } @@ -12047,7 +12029,7 @@ DEFUN (show_ip_community_list_arg, 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; } @@ -12079,7 +12061,7 @@ lcommunity_list_set_vty (struct vty *vty, int argc, struct cmd_token **argv, 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; } @@ -12391,7 +12373,7 @@ DEFUN (show_ip_lcommunity_list_arg, 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; } @@ -12628,7 +12610,7 @@ DEFUN (show_ip_extcommunity_list_arg, 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; } diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 495765ba6..90d195d50 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -2430,7 +2430,7 @@ DEFUN_NOSH (vnc_nve_group, 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; } @@ -3255,7 +3255,7 @@ DEFUN_NOSH (vnc_vrf_policy, if (!bgp) { - vty_out (vty, "No BGP process is configured%s", VTYNL); + vty_out (vty, "No BGP process is configured\n"); return CMD_WARNING; } @@ -3268,7 +3268,7 @@ DEFUN_NOSH (vnc_vrf_policy, 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; } } @@ -3398,7 +3398,7 @@ DEFUN (vnc_vrf_policy_nexthop, 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)); } @@ -3742,7 +3742,7 @@ DEFUN_NOSH (vnc_l2_group, if (!bgp) { - vty_out (vty, "No BGP process is configured%s", VTYNL); + vty_out (vty, "No BGP process is configured\n"); return CMD_WARNING; } @@ -3755,7 +3755,7 @@ DEFUN_NOSH (vnc_l2_group, 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); @@ -4296,7 +4296,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp) inet_ntop(rfg->vn_prefix.family, &rfg->vn_prefix.u.prefix, buf, sizeof(buf)); if (!buf[0] || buf[BUFSIZ - 1]) { - //vty_out (vty, "nexthop self%s", VTYNL); + //vty_out (vty, "nexthop self\n"); } else { @@ -745,8 +745,7 @@ DEFUN_NOSH (no_interface, 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; } diff --git a/lib/plist.c b/lib/plist.c index 3a9d26064..0c04b6247 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1861,7 +1861,7 @@ config_write_prefix_afi (afi_t afi, struct vty *vty) vty_out (vty, "\n"); write++; } - /* vty_out (vty, "!%s", VTYNL); */ + /* vty_out (vty, "!\n"); */ } for (plist = master->str.head; plist; plist = plist->next) diff --git a/lib/smux.c b/lib/smux.c index f8bf01e28..64b406bd6 100644 --- a/lib/smux.c +++ b/lib/smux.c @@ -1278,7 +1278,7 @@ smux_peer_oid (struct vty *vty, const char *oid_str, const char *passwd_str) ret = smux_str2oid (oid_str, oid, &oid_len); if (ret != 0) { - vty_out (vty, "object ID malformed%s", VTYNL); + vty_out (vty, "object ID malformed\n"); return CMD_WARNING; } @@ -507,8 +507,7 @@ DEFUN_NOSH (no_vrf, 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; } @@ -938,7 +938,7 @@ vty_complete_command (struct vty *vty) vty_redraw_line (vty); break; case CMD_ERR_NO_MATCH: - /* vty_out (vty, "%% There is no matched command.%s", VTYNL); */ + /* vty_out (vty, "%% There is no matched command.\n"); */ vty_prompt (vty); vty_redraw_line (vty); break; diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 4048acbd6..b1f2401d5 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -1149,7 +1149,7 @@ int 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; } diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index c1222a2c2..7ee5c9b6e 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -389,7 +389,7 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) 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) { @@ -583,7 +583,7 @@ ospf6_area_config_write (struct vty *vty) 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)) diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 6c50f7040..57b1e9481 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -789,7 +789,7 @@ ospf6_redistribute_show_config (struct vty *vty) 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) @@ -1082,13 +1082,13 @@ route_map_command_status (struct vty *vty, int ret) 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; @@ -1399,7 +1399,7 @@ int 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; } diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 843479525..f816c6f48 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -1032,7 +1032,7 @@ int 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; } diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 29cfe12c7..c5026e2f7 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -924,13 +924,13 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp) 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)) { @@ -965,13 +965,13 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp) 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); @@ -1810,22 +1810,22 @@ config_write_ospf6_interface (struct vty *vty) 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; } @@ -1966,7 +1966,7 @@ int 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; } diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index a693e8bd0..2f4e06e1e 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1793,7 +1793,7 @@ config_write_ospf6_debug_brouter (struct vty *vty) { 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, diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 401d29c57..90ba0dc74 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -54,7 +54,7 @@ ospf6_unknown_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) 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) @@ -445,7 +445,7 @@ ospf6_lsa_show_dump (struct vty *vty, struct ospf6_lsa *lsa) 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 ++) @@ -474,7 +474,7 @@ ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa) 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); @@ -489,7 +489,7 @@ ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa) 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; } @@ -527,7 +527,7 @@ ospf6_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) handler = &unknown_handler; (*handler->show) (vty, lsa); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } /* OSPFv3 LSA creation/deletion function */ diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index adf39de82..b087802b3 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2459,29 +2459,29 @@ config_write_ospf6_debug_message (struct vty *vty) 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++) { diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 7e691f091..99f5830bf 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -1016,11 +1016,11 @@ config_write_ospf6_debug_neighbor (struct vty *vty) { 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; } diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 3784565a9..1befbe248 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -1131,7 +1131,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route) 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, @@ -1140,7 +1140,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route) 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 */ @@ -1148,7 +1148,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route) 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 @@ -1619,11 +1619,11 @@ int 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; } diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 6338b06f6..c9f1740a9 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -748,7 +748,7 @@ ospf6_spf_display_subtree (struct vty *vty, const char *prefix, int rest, 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 ? "| " : " ")); @@ -914,11 +914,11 @@ int 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; } diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index fd91410fa..9040e4ab9 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -315,7 +315,7 @@ DEFUN (no_router_ospf6, 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); @@ -835,13 +835,13 @@ ospf6_show (struct vty *vty, struct ospf6 *o) (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", @@ -963,7 +963,7 @@ ospf6_stub_router_config_write (struct vty *vty) { if (CHECK_FLAG (ospf6->flag, OSPF6_STUB_ROUTER)) { - vty_out (vty, " stub-router administrative%s", VTYNL); + vty_out (vty, " stub-router administrative\n"); } return; } @@ -1019,7 +1019,7 @@ config_write_ospf6 (struct vty *vty) 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); @@ -1056,7 +1056,7 @@ config_write_ospf6 (struct vty *vty) 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; } diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 9a1866139..3ca9182f0 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -315,11 +315,11 @@ DEFUN (show_zebra, 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", @@ -331,7 +331,7 @@ DEFUN (show_zebra, 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; } @@ -341,15 +341,15 @@ config_write_ospf6_zebra (struct vty *vty) { 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; } @@ -905,13 +905,13 @@ int 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; } diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index ce03322f7..a7153893c 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -110,7 +110,7 @@ config_write_ospf6_debug (struct vty *vty) 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; } @@ -206,7 +206,7 @@ DEFUN (show_ipv6_ospf6_database, 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; } @@ -277,7 +277,7 @@ DEFUN (show_ipv6_ospf6_database_type, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -330,7 +330,7 @@ DEFUN (show_ipv6_ospf6_database_id, 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; } @@ -381,7 +381,7 @@ DEFUN (show_ipv6_ospf6_database_router, 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; } @@ -457,7 +457,7 @@ DEFUN (show_ipv6_ospf6_database_type_id, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -534,7 +534,7 @@ DEFUN (show_ipv6_ospf6_database_type_router, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -589,7 +589,7 @@ DEFUN (show_ipv6_ospf6_database_id_router, 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; } @@ -644,7 +644,7 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, 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; } @@ -721,7 +721,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -801,7 +801,7 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -848,7 +848,7 @@ DEFUN (show_ipv6_ospf6_database_self_originated, 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; } @@ -923,7 +923,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -1001,7 +1001,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -1078,7 +1078,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, break; } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -1162,7 +1162,7 @@ DEFUN (show_ipv6_ospf6_linkstate, ospf6_linkstate_table_show (vty, idx_ipv4, argc, argv, oa->spf_table); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -1190,7 +1190,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail, ospf6_linkstate_table_show (vty, idx_detail, argc, argv, oa->spf_table); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h index 347ad3487..2da11d0ab 100644 --- a/ospf6d/ospf6d.h +++ b/ospf6d/ospf6d.h @@ -93,7 +93,7 @@ extern struct thread_master *master; #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; \ } diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index b0405f098..60fb352b9 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -100,7 +100,7 @@ str2metric (const char *str, int *metric) *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; } @@ -150,7 +150,7 @@ DEFUN_NOSH (router_ospf, 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; } @@ -213,7 +213,7 @@ DEFUN (ospf_router_id, 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; } @@ -248,7 +248,7 @@ DEFUN_HIDDEN (ospf_router_id_old, 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; } @@ -389,8 +389,7 @@ DEFUN (ospf_passive_interface, 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; } @@ -459,8 +458,7 @@ DEFUN (no_ospf_passive_interface, 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; } @@ -510,15 +508,13 @@ DEFUN (ospf_network_area, 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; } @@ -529,7 +525,7 @@ DEFUN (ospf_network_area, 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; } @@ -555,8 +551,7 @@ DEFUN (no_ospf_network_area, 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; } @@ -567,8 +562,7 @@ DEFUN (no_ospf_network_area, 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; } @@ -1037,15 +1031,14 @@ DEFUN (ospf_area_vlink, &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; } @@ -1157,22 +1150,21 @@ DEFUN (no_ospf_area_vlink, 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; } @@ -1257,14 +1249,14 @@ DEFUN (ospf_area_vlink_intervals, 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; } @@ -1303,14 +1295,14 @@ DEFUN (no_ospf_area_vlink_intervals, 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; } @@ -1421,8 +1413,7 @@ DEFUN (ospf_area_stub, 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; } @@ -1451,8 +1442,7 @@ DEFUN (ospf_area_stub_no_summary, 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; } @@ -1518,8 +1508,7 @@ ospf_area_nssa_cmd_handler (struct vty *vty, int argc, struct cmd_token **argv, 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; } @@ -1658,7 +1647,7 @@ DEFUN (ospf_area_default_cost, 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; } @@ -1701,7 +1690,7 @@ DEFUN (no_ospf_area_default_cost, 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; } @@ -2205,7 +2194,7 @@ DEFUN (ospf_timers_min_ls_interval, if (argc < 5) { - vty_out (vty, "Insufficient arguments%s", VTYNL); + vty_out (vty, "Insufficient arguments\n"); return CMD_WARNING; } @@ -2247,7 +2236,7 @@ DEFUN (ospf_timers_min_ls_arrival, if (argc < 4) { - vty_out (vty, "Insufficient arguments%s", VTYNL); + vty_out (vty, "Insufficient arguments\n"); return CMD_WARNING; } @@ -2292,7 +2281,7 @@ DEFUN (ospf_timers_throttle_spf, if (argc < 6) { - vty_out (vty, "Insufficient arguments%s", VTYNL); + vty_out (vty, "Insufficient arguments\n"); return CMD_WARNING; } @@ -2335,7 +2324,7 @@ DEFUN (ospf_timers_lsa, if (argc < 4) { - vty_out (vty, "Insufficient number of arguments%s", VTYNL); + vty_out (vty, "Insufficient number of arguments\n"); return CMD_WARNING; } @@ -2549,7 +2538,7 @@ DEFUN (ospf_auto_cost_reference_bandwidth, 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; } @@ -2580,8 +2569,8 @@ DEFUN (no_ospf_auto_cost_reference_bandwidth, 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); @@ -2608,7 +2597,7 @@ DEFUN (ospf_write_multiplier, 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; } @@ -2677,7 +2666,7 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar if (use_json) json_object_boolean_true_add(json_area, "backbone"); else - vty_out (vty, " (Backbone)%s", VTYNL); + vty_out (vty, " (Backbone)\n"); } else { @@ -2714,7 +2703,7 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar 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", @@ -2761,27 +2750,22 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar { 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"); } } } @@ -2805,11 +2789,9 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar } 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, @@ -2856,11 +2838,11 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar /* 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" @@ -2909,7 +2891,7 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar 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 @@ -2982,8 +2964,8 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json) } 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); @@ -3017,8 +2999,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json) } 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); @@ -3077,7 +3058,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json) VTYNL); } else - vty_out (vty, "has not been run%s", VTYNL); + vty_out (vty, "has not been run\n"); } if (use_json) @@ -3178,14 +3159,14 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char 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. */ @@ -3199,7 +3180,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json) json_object_free(json); } else - vty_out (vty, "%s",VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -3293,13 +3274,12 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface { 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; } } @@ -3454,7 +3434,7 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface } else vty_out (vty, " <None>"); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } if (use_json) @@ -3502,7 +3482,7 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface 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) @@ -3566,7 +3546,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc, 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 { @@ -3586,7 +3566,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc, json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -3748,7 +3728,7 @@ show_ip_ospf_neighbor_common (struct vty *vty, struct ospf *ospf, u_char use_jso json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -3860,7 +3840,7 @@ show_ip_ospf_neighbor_all_common (struct vty *vty, struct ospf *ospf, u_char use json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -3935,7 +3915,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba 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; } @@ -3955,7 +3935,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -4142,8 +4122,7 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi, } 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); @@ -4309,7 +4288,7 @@ show_ip_ospf_neighbor_id_common (struct vty *vty, struct ospf *ospf, 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; } @@ -4327,7 +4306,7 @@ show_ip_ospf_neighbor_id_common (struct vty *vty, struct ospf *ospf, json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -4419,7 +4398,7 @@ show_ip_ospf_neighbor_detail_common (struct vty *vty, struct ospf *ospf, u_char json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -4516,7 +4495,7 @@ show_ip_ospf_neighbor_detail_all_common (struct vty *vty, struct ospf *ospf, u_c } else { - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } return CMD_SUCCESS; @@ -4592,7 +4571,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf, if (!ifp) { if (!use_json) - vty_out (vty, "No such interface.%s", VTYNL); + vty_out (vty, "No such interface.\n"); return CMD_WARNING; } @@ -4620,7 +4599,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf, json_object_free(json); } else - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -4846,10 +4825,10 @@ show_ip_ospf_database_router_links (struct vty *vty, 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"); } } @@ -4867,7 +4846,7 @@ show_router_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) VTYNL, VTYNL); show_ip_ospf_database_router_links (vty, rl); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } return 0; @@ -4894,7 +4873,7 @@ show_network_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) vty_out (vty, " Attached Router: %s%s", inet_ntoa (nl->routers[i]), VTYNL); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } return 0; @@ -4914,7 +4893,7 @@ show_summary_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) 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; @@ -4934,7 +4913,7 @@ show_summary_asbr_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) 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; @@ -4955,7 +4934,7 @@ show_as_external_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) 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", @@ -5007,7 +4986,7 @@ show_as_nssa_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) 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", @@ -5034,7 +5013,7 @@ show_opaque_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) show_ip_ospf_database_header (vty, lsa); show_opaque_info_detail (vty, lsa); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } return 0; } @@ -5211,7 +5190,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self) LSDB_LOOP (AREA_LSDB (area, type), rn, lsa) show_lsa_summary (vty, lsa, self); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } } @@ -5238,11 +5217,11 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self) 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 @@ -5265,7 +5244,7 @@ show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf) 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"); } } } @@ -5555,8 +5534,7 @@ DEFUN (ip_ospf_authentication_args, 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; } @@ -5580,7 +5558,7 @@ DEFUN (ip_ospf_authentication_args, 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; } @@ -5605,8 +5583,7 @@ DEFUN (ip_ospf_authentication, 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; } @@ -5647,15 +5624,14 @@ DEFUN (no_ip_ospf_authentication_args, 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; @@ -5678,7 +5654,7 @@ DEFUN (no_ip_ospf_authentication_args, } else { - vty_out (vty, "Unexpected input encountered%s", VTYNL); + vty_out (vty, "Unexpected input encountered\n"); return CMD_WARNING; } /* @@ -5737,15 +5713,14 @@ DEFUN (no_ip_ospf_authentication, 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; } @@ -5817,8 +5792,7 @@ DEFUN (ip_ospf_authentication_key, { 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; } @@ -5863,8 +5837,7 @@ DEFUN (no_ip_ospf_authentication_key, { 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; } @@ -5925,8 +5898,7 @@ DEFUN (ip_ospf_message_digest_key, { 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; } @@ -5992,8 +5964,7 @@ DEFUN (no_ip_ospf_message_digest_key, { 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; } @@ -6060,8 +6031,7 @@ DEFUN (ip_ospf_cost, { 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; } @@ -6115,8 +6085,7 @@ DEFUN (no_ip_ospf_cost, { 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; } @@ -6187,8 +6156,7 @@ ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str, 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; } @@ -6214,8 +6182,7 @@ ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str, } 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; } @@ -6314,8 +6281,7 @@ DEFUN (no_ip_ospf_dead_interval, 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; } @@ -6393,8 +6359,7 @@ DEFUN (ip_ospf_hello_interval, { 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; } @@ -6440,8 +6405,7 @@ DEFUN (no_ip_ospf_hello_interval, { 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; } @@ -6492,7 +6456,7 @@ DEFUN (ip_ospf_network, 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; } @@ -6620,8 +6584,7 @@ DEFUN (ip_ospf_priority, { 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; } @@ -6682,8 +6645,7 @@ DEFUN (no_ip_ospf_priority, { 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; } @@ -6753,8 +6715,7 @@ DEFUN (ip_ospf_retransmit_interval, { 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; } @@ -6800,8 +6761,7 @@ DEFUN (no_ip_ospf_retransmit_interval, { 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; } @@ -6857,8 +6817,7 @@ DEFUN (ip_ospf_transmit_delay, { 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; } @@ -6903,8 +6862,7 @@ DEFUN (no_ip_ospf_transmit_delay, { 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; } @@ -6981,13 +6939,12 @@ DEFUN (ip_ospf_area, 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; } @@ -7018,7 +6975,7 @@ DEFUN (ip_ospf_area, { 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; } } @@ -7203,15 +7160,13 @@ DEFUN (ospf_redistribute_instance_source, 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; } @@ -7268,15 +7223,13 @@ DEFUN (no_ospf_redistribute_instance_source, 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; } @@ -7638,8 +7591,7 @@ DEFUN (ip_ospf_mtu_ignore, 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); @@ -7681,8 +7633,7 @@ DEFUN (no_ip_ospf_mtu_ignore, 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); @@ -7870,8 +7821,7 @@ config_write_stub_router (struct vty *vty, struct ospf *ospf) { 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; } } @@ -7886,8 +7836,7 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt) 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) @@ -7928,7 +7877,7 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt) } } } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } static void @@ -7940,8 +7889,7 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs) 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) { @@ -7981,7 +7929,7 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs) } } } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } static void @@ -7992,8 +7940,7 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt) 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) { @@ -8028,7 +7975,7 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt) } } } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } static int @@ -8040,7 +7987,7 @@ show_ip_ospf_border_routers_common (struct vty *vty, struct ospf *ospf) 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; } @@ -8050,7 +7997,7 @@ show_ip_ospf_border_routers_common (struct vty *vty, struct ospf *ospf) /* Show Router routes. */ show_ip_ospf_route_router (vty, ospf->new_rtrs); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); return CMD_SUCCESS; } @@ -8100,7 +8047,7 @@ show_ip_ospf_route_common (struct vty *vty, struct ospf *ospf) 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; } @@ -8113,7 +8060,7 @@ show_ip_ospf_route_common (struct vty *vty, struct ospf *ospf) /* 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; } @@ -8201,7 +8148,7 @@ config_write_interface (struct vty *vty) 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) @@ -8223,7 +8170,7 @@ config_write_interface (struct vty *vty) 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"); } } @@ -8258,7 +8205,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8269,7 +8216,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8279,7 +8226,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8288,7 +8235,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8298,7 +8245,7 @@ config_write_interface (struct vty *vty) 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"); } @@ -8317,7 +8264,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8327,7 +8274,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8338,7 +8285,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8348,7 +8295,7 @@ config_write_interface (struct vty *vty) 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. */ @@ -8378,7 +8325,7 @@ config_write_interface (struct vty *vty) 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"); } @@ -8488,7 +8435,7 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf) 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, @@ -8513,7 +8460,7 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf) 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)) @@ -8554,7 +8501,7 @@ config_write_ospf_nbr_nbma (struct vty *vty, struct ospf *ospf) 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; @@ -8651,7 +8598,7 @@ config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf) if (ROUTEMAP_NAME (red)) vty_out (vty, " route-map %s", ROUTEMAP_NAME (red)); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } @@ -8703,7 +8650,7 @@ config_write_ospf_distribute (struct vty *vty, struct ospf *ospf) ROUTEMAP_NAME (red)); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } @@ -8733,7 +8680,7 @@ config_write_ospf_distance (struct vty *vty, struct ospf *ospf) 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)) @@ -8764,7 +8711,7 @@ ospf_config_write (struct vty *vty) 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++; @@ -8785,18 +8732,18 @@ ospf_config_write (struct vty *vty) 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) @@ -8841,7 +8788,7 @@ ospf_config_write (struct vty *vty) /* 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) @@ -9098,7 +9045,7 @@ DEFUN (clear_ip_ospf_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); } diff --git a/ospfd/ospf_vty.h b/ospfd/ospf_vty.h index 0bb5b6f3f..7b888f439 100644 --- a/ospfd/ospf_vty.h +++ b/ospfd/ospf_vty.h @@ -28,7 +28,7 @@ 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; \ } \ } @@ -39,7 +39,7 @@ 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))) \ diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 4b5567f77..b90e28987 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -2425,7 +2425,7 @@ DEFUN (ripng_update_timer, update = strtoul (argv[0], &endptr, 10); if (update == ULONG_MAX || *endptr != '\0') { - vty_out (vty, "update timer value error%s", VTYNL); + vty_out (vty, "update timer value error\n"); return CMD_WARNING; } @@ -2460,7 +2460,7 @@ DEFUN (ripng_timeout_timer, timeout = strtoul (argv[0], &endptr, 10); if (timeout == ULONG_MAX || *endptr != '\0') { - vty_out (vty, "timeout timer value error%s", VTYNL); + vty_out (vty, "timeout timer value error\n"); return CMD_WARNING; } @@ -2493,7 +2493,7 @@ DEFUN (ripng_garbage_timer, garbage = strtoul (argv[0], &endptr, 10); if (garbage == ULONG_MAX || *endptr != '\0') { - vty_out (vty, "garbage timer value error%s", VTYNL); + vty_out (vty, "garbage timer value error\n"); return CMD_WARNING; } @@ -2577,7 +2577,7 @@ DEFUN (show_ipv6_protocols, 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, diff --git a/zebra/debug.c b/zebra/debug.c index ba2a9ad2a..50c1f4dcb 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -39,10 +39,10 @@ DEFUN (show_debugging_zebra, "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) { @@ -66,24 +66,24 @@ DEFUN (show_debugging_zebra, } 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; } @@ -353,7 +353,7 @@ config_write_debug (struct vty *vty) 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) @@ -380,43 +380,43 @@ config_write_debug (struct vty *vty) } 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; diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 5dc504b41..7b0d7bd78 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -996,7 +996,7 @@ print_nh (struct nexthop *nexthop, struct vty *vty) default: break; } - vty_out(vty, "%s", VTYNL); + vty_out(vty, "\n"); } static void @@ -1030,5 +1030,5 @@ print_rnh (struct route_node *rn, struct vty *vty) client->sock, rnh->filtered[client->proto] ? "(filtered)" : ""); if (!list_isempty(rnh->zebra_static_route_list)) vty_out(vty, " zebra%s", rnh->filtered[ZEBRA_ROUTE_STATIC] ? "(filtered)" : ""); - vty_out(vty, "%s", VTYNL); + vty_out(vty, "\n"); } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 3810cc8dd..0dad125d1 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -681,7 +681,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast) vty_out (vty, ", blackhole"); if (CHECK_FLAG (re->flags, ZEBRA_FLAG_REJECT)) vty_out (vty, ", reject"); - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); if (re->type == ZEBRA_ROUTE_RIP || re->type == ZEBRA_ROUTE_OSPF @@ -709,7 +709,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast) vty_out (vty, "%02dw%dd%02dh", tm->tm_yday/7, tm->tm_yday - ((tm->tm_yday/7) * 7), tm->tm_hour); - vty_out (vty, " ago%s", VTYNL); + vty_out (vty, " ago\n"); } for (ALL_NEXTHOPS_RO(re->nexthop, nexthop, tnexthop, recursing)) @@ -788,9 +788,9 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast) nexthop->nh_label->label, buf, sizeof buf, 1)); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } @@ -1078,7 +1078,7 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct route_entry *r tm->tm_yday/7, tm->tm_yday - ((tm->tm_yday/7) * 7), tm->tm_hour); } - vty_out (vty, "%s", VTYNL); + vty_out (vty, "\n"); } } |