diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 17:49:13 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 20:29:22 +0200 | 
| commit | 5c7571d43f57317b0827ac82fbebc4cdc6865be0 (patch) | |
| tree | 2bc63ccbd805abc9689e9f3345e34871558d5c26 | |
| parent | 83eba583d7be5afaf2eba35ce4d391f645af4bfa (diff) | |
*: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
119 files changed, 2685 insertions, 2685 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index fe8fde92e6..5d60f41939 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -290,7 +290,7 @@ DEFUN (babel_network,          ret = babel_enable_if_add (argv[1]->arg);      if (ret < 0) { -        vty_outln (vty, "There is same network configuration %s", +        vty_out (vty, "There is same network configuration %s\n",                     argv[1]->arg);          return CMD_WARNING;      } @@ -318,7 +318,7 @@ DEFUN (no_babel_network,          ret = babel_enable_if_delete (argv[2]->arg);      if (ret < 0) { -        vty_outln (vty, "can't find network %s",argv[2]->arg); +        vty_out (vty, "can't find network %s\n",argv[2]->arg);          return CMD_WARNING;      } @@ -861,31 +861,31 @@ show_babel_interface_sub (struct vty *vty, struct interface *ifp)    int is_up;    babel_interface_nfo *babel_ifp; -  vty_outln (vty, "%s is %s", ifp->name, +  vty_out (vty, "%s is %s\n", ifp->name,      ((is_up = if_is_operative(ifp)) ? "up" : "down")); -  vty_outln (vty, "  ifindex %u, MTU %u bytes %s", +  vty_out (vty, "  ifindex %u, MTU %u bytes %s\n",      ifp->ifindex, MIN(ifp->mtu, ifp->mtu6), if_flag_dump(ifp->flags));    if (!IS_ENABLE(ifp))    { -    vty_outln (vty, "  Babel protocol is not enabled on this interface"); +    vty_out (vty, "  Babel protocol is not enabled on this interface\n");      return;    }    if (!is_up)    { -    vty_outln (vty, -               "  Babel protocol is enabled, but not running on this interface"); +    vty_out (vty, +               "  Babel protocol is enabled, but not running on this interface\n");      return;    }    babel_ifp = babel_get_if_nfo (ifp); -  vty_outln (vty, "  Babel protocol is running on this interface"); +  vty_out (vty, "  Babel protocol is running on this interface\n");    vty_outln (vty, "  Operating mode is \"%s\"",             CHECK_FLAG(babel_ifp->flags, BABEL_IF_WIRED) ? "wired" : "wireless"); -  vty_outln (vty, "  Split horizon mode is %s", +  vty_out (vty, "  Split horizon mode is %s\n",             CHECK_FLAG(babel_ifp->flags, BABEL_IF_SPLIT_HORIZON) ? "On" : "Off"); -  vty_outln (vty, "  Hello interval is %u ms", babel_ifp->hello_interval); -  vty_outln (vty, "  Update interval is %u ms", babel_ifp->update_interval); -  vty_outln (vty, "  Rxcost multiplier is %u", babel_ifp->cost); +  vty_out (vty, "  Hello interval is %u ms\n", babel_ifp->hello_interval); +  vty_out (vty, "  Update interval is %u ms\n", babel_ifp->update_interval); +  vty_out (vty, "  Rxcost multiplier is %u\n", babel_ifp->cost);  }  DEFUN (show_babel_interface, @@ -907,7 +907,7 @@ DEFUN (show_babel_interface,    }    if ((ifp = if_lookup_by_name (argv[3]->arg, VRF_DEFAULT)) == NULL)    { -    vty_outln (vty, "No such interface name"); +    vty_out (vty, "No such interface name\n");      return CMD_WARNING;    }    show_babel_interface_sub (vty, ifp); @@ -949,7 +949,7 @@ DEFUN (show_babel_neighbour,      }      if ((ifp = if_lookup_by_name (argv[3]->arg, VRF_DEFAULT)) == NULL)      { -        vty_outln (vty, "No such interface name"); +        vty_out (vty, "No such interface name\n");          return CMD_WARNING;      }      FOR_ALL_NEIGHBOURS(neigh) { @@ -1032,7 +1032,7 @@ show_babel_xroutes_sub (struct xroute *xroute, struct vty *vty,      if(prefix && !babel_prefix_eq(prefix, xroute->prefix, xroute->plen))          return; -    vty_outln (vty, "%s metric %d (exported)", +    vty_out (vty, "%s metric %d (exported)\n",              format_prefix(xroute->prefix, xroute->plen),              xroute->metric);  } @@ -1089,7 +1089,7 @@ DEFUN (show_babel_route_prefix,      ret = str2prefix(argv[3]->arg, &prefix);      if(ret == 0) { -      vty_outln (vty, "%% Malformed address"); +      vty_out (vty, "%% Malformed address\n");        return CMD_WARNING;      } @@ -1138,7 +1138,7 @@ DEFUN (show_babel_route_addr,      ret = inet_aton (argv[3]->arg, &addr);      if (ret <= 0) { -        vty_outln (vty, "%% Malformed address"); +        vty_out (vty, "%% Malformed address\n");          return CMD_WARNING;      } @@ -1147,7 +1147,7 @@ DEFUN (show_babel_route_addr,      ret = str2prefix(buf, &prefix);      if (ret == 0) { -        vty_outln (vty, "%% Parse error -- this shouldn't happen"); +        vty_out (vty, "%% Parse error -- this shouldn't happen\n");          return CMD_WARNING;      } @@ -1196,7 +1196,7 @@ DEFUN (show_babel_route_addr6,      ret = inet_pton (AF_INET6, argv[3]->arg, &addr);      if (ret <= 0) { -        vty_outln (vty, "%% Malformed address"); +        vty_out (vty, "%% Malformed address\n");          return CMD_WARNING;      } @@ -1206,7 +1206,7 @@ DEFUN (show_babel_route_addr6,      ret = str2prefix(buf, &prefix);      if (ret == 0) { -        vty_outln (vty, "%% Parse error -- this shouldn't happen"); +        vty_out (vty, "%% Parse error -- this shouldn't happen\n");          return CMD_WARNING;      } @@ -1244,9 +1244,9 @@ DEFUN (show_babel_parameters,         "Babel information\n"         "Configuration information\n")  { -    vty_outln (vty, "    -- Babel running configuration --"); +    vty_out (vty, "    -- Babel running configuration --\n");      show_babel_main_configuration(vty); -    vty_outln (vty, "    -- distribution lists --"); +    vty_out (vty, "    -- distribution lists --\n");      config_show_distribute(vty);      return CMD_SUCCESS; @@ -1321,63 +1321,63 @@ interface_config_write (struct vty *vty)      int write = 0;      for (ALL_LIST_ELEMENTS_RO (vrf_iflist(VRF_DEFAULT), node, ifp)) { -        vty_outln (vty, "interface %s",ifp->name); +        vty_out (vty, "interface %s\n",ifp->name);          if (ifp->desc) -            vty_outln (vty, " description %s",ifp->desc); +            vty_out (vty, " description %s\n",ifp->desc);          babel_interface_nfo *babel_ifp = babel_get_if_nfo (ifp);          /* wireless is the default*/          if (CHECK_FLAG (babel_ifp->flags, BABEL_IF_WIRED))          { -            vty_outln (vty, " babel wired"); +            vty_out (vty, " babel wired\n");              write++;          }          if (babel_ifp->hello_interval != BABEL_DEFAULT_HELLO_INTERVAL)          { -            vty_outln (vty, " babel hello-interval %u", +            vty_out (vty, " babel hello-interval %u\n",                         babel_ifp->hello_interval);              write++;          }          if (babel_ifp->update_interval != BABEL_DEFAULT_UPDATE_INTERVAL)          { -            vty_outln (vty, " babel update-interval %u", +            vty_out (vty, " babel update-interval %u\n",                         babel_ifp->update_interval);              write++;          }          /* Some parameters have different defaults for wired/wireless. */          if (CHECK_FLAG (babel_ifp->flags, BABEL_IF_WIRED)) {              if (!CHECK_FLAG (babel_ifp->flags, BABEL_IF_SPLIT_HORIZON)) { -                vty_outln (vty, " no babel split-horizon"); +                vty_out (vty, " no babel split-horizon\n");                  write++;              }              if (babel_ifp->cost != BABEL_DEFAULT_RXCOST_WIRED) { -                vty_outln (vty, " babel rxcost %u", babel_ifp->cost); +                vty_out (vty, " babel rxcost %u\n", babel_ifp->cost);                  write++;              }              if (babel_ifp->channel == BABEL_IF_CHANNEL_INTERFERING) { -                vty_outln (vty, " babel channel interfering"); +                vty_out (vty, " babel channel interfering\n");                  write++;              } else if(babel_ifp->channel != BABEL_IF_CHANNEL_NONINTERFERING) { -                vty_outln (vty, " babel channel %d",babel_ifp->channel); +                vty_out (vty, " babel channel %d\n",babel_ifp->channel);                  write++;              }          } else {              if (CHECK_FLAG (babel_ifp->flags, BABEL_IF_SPLIT_HORIZON)) { -                vty_outln (vty, " babel split-horizon"); +                vty_out (vty, " babel split-horizon\n");                  write++;              }              if (babel_ifp->cost != BABEL_DEFAULT_RXCOST_WIRELESS) { -                vty_outln (vty, " babel rxcost %u", babel_ifp->cost); +                vty_out (vty, " babel rxcost %u\n", babel_ifp->cost);                  write++;              }              if (babel_ifp->channel == BABEL_IF_CHANNEL_NONINTERFERING) { -                vty_outln (vty, " babel channel noninterfering"); +                vty_out (vty, " babel channel noninterfering\n");                  write++;              } else if(babel_ifp->channel != BABEL_IF_CHANNEL_INTERFERING) { -                vty_outln (vty, " babel channel %d",babel_ifp->channel); +                vty_out (vty, " babel channel %d\n",babel_ifp->channel);                  write++;              }          } -        vty_outln (vty, "!"); +        vty_out (vty, "!\n");          write++;      }      return write; @@ -1393,7 +1393,7 @@ babel_enable_if_config_write (struct vty * vty)      for (i = 0; i < vector_active (babel_enable_if); i++)          if ((str = vector_slot (babel_enable_if, i)) != NULL)          { -            vty_outln (vty, " network %s", str); +            vty_out (vty, " network %s\n", str);              lines++;          }      return lines; diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c index 3a7a52ccca..a41908285b 100644 --- a/babeld/babel_zebra.c +++ b/babeld/babel_zebra.c @@ -222,7 +222,7 @@ DEFUN (babel_redistribute_type,      type = babel_proto_redistnum(argv[1]->arg);      if (type < 0) { -        vty_outln (vty, "Invalid type %s", argv[1]->arg); +        vty_out (vty, "Invalid type %s\n", argv[1]->arg);          return CMD_WARNING;      } @@ -243,7 +243,7 @@ DEFUN (no_babel_redistribute_type,      type = babel_proto_redistnum(argv[2]->arg);      if (type < 0) { -        vty_outln (vty, "Invalid type %s", argv[2]->arg); +        vty_out (vty, "Invalid type %s\n", argv[2]->arg);          return CMD_WARNING;      } @@ -277,7 +277,7 @@ DEFUN (debug_babel,          }      } -    vty_outln (vty, "Invalid type %s", argv[2]->arg); +    vty_out (vty, "Invalid type %s\n", argv[2]->arg);      return CMD_WARNING;  } @@ -307,7 +307,7 @@ DEFUN (no_debug_babel,          }      } -    vty_outln (vty, "Invalid type %s", argv[3]->arg); +    vty_out (vty, "Invalid type %s\n", argv[3]->arg);      return CMD_WARNING;  } @@ -324,7 +324,7 @@ debug_babel_config_write (struct vty * vty)      if (debug == BABEL_DEBUG_ALL)      { -        vty_outln (vty, "debug babel all"); +        vty_out (vty, "debug babel all\n");          lines++;      }      else @@ -335,12 +335,12 @@ debug_babel_config_write (struct vty * vty)                  && CHECK_FLAG (debug, debug_type[i].type)              )              { -                vty_outln (vty, "debug babel %s", debug_type[i].str); +                vty_out (vty, "debug babel %s\n", debug_type[i].str);                  lines++;              }      if (lines)      { -        vty_outln (vty, "!"); +        vty_out (vty, "!\n");          lines++;      }      return lines; @@ -384,13 +384,13 @@ zebra_config_write (struct vty *vty)  {      if (! zclient->enable)      { -        vty_outln (vty, "no router zebra"); +        vty_out (vty, "no router zebra\n");          return 1;      }      else if (! vrf_bitmap_check (zclient->redist[AFI_IP][ZEBRA_ROUTE_BABEL], VRF_DEFAULT))      { -        vty_outln (vty, "router zebra"); -        vty_outln (vty, " no redistribute babel"); +        vty_out (vty, "router zebra\n"); +        vty_out (vty, " no redistribute babel\n");          return 1;      }      return 0; diff --git a/babeld/babeld.c b/babeld/babeld.c index e17e00ca56..b2f8176aab 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -83,25 +83,25 @@ babel_config_write (struct vty *vty)      if (!babel_routing_process)          return lines; -    vty_outln (vty, "router babel"); +    vty_out (vty, "router babel\n");      if (diversity_kind != DIVERSITY_NONE)      { -        vty_outln (vty, " babel diversity"); +        vty_out (vty, " babel diversity\n");          lines++;      }      if (diversity_factor != BABEL_DEFAULT_DIVERSITY_FACTOR)      { -        vty_outln (vty, " babel diversity-factor %d",diversity_factor); +        vty_out (vty, " babel diversity-factor %d\n",diversity_factor);          lines++;      }      if (resend_delay != BABEL_DEFAULT_RESEND_DELAY)      { -        vty_outln (vty, " babel resend-delay %u", resend_delay); +        vty_out (vty, " babel resend-delay %u\n", resend_delay);          lines++;      }      if (smoothing_half_life != BABEL_DEFAULT_SMOOTHING_HALF_LIFE)      { -        vty_outln (vty, " babel smoothing-half-life %u", +        vty_out (vty, " babel smoothing-half-life %u\n",                   smoothing_half_life);          lines++;      } @@ -112,7 +112,7 @@ babel_config_write (struct vty *vty)          if (i != zclient->redist_default &&  	    vrf_bitmap_check (zclient->redist[AFI_IP][i], VRF_DEFAULT))          { -            vty_outln (vty, " redistribute %s", zebra_route_string(i)); +            vty_out (vty, " redistribute %s\n", zebra_route_string(i));              lines++;          } diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index f304b3a1b7..95257493b5 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -2176,7 +2176,7 @@ aspath_show_all_iterator (struct hash_backet *backet, struct vty *vty)    as = (struct aspath *) backet->data;    vty_out (vty, "[%p:%u] (%ld) ", (void *)backet, backet->key, as->refcnt); -  vty_outln (vty, "%s", as->str); +  vty_out (vty, "%s\n", as->str);  }  /* Print all aspath and hash information.  This function is used from diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 439469d61e..0114834c57 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -797,7 +797,7 @@ attr_show_all_iterator (struct hash_backet *backet, struct vty *vty)  {    struct attr *attr = backet->data; -  vty_outln (vty, "attr[%ld] nexthop %s", attr->refcnt,  +  vty_out (vty, "attr[%ld] nexthop %s\n", attr->refcnt,   	   inet_ntoa(attr->nexthop));  } diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 890acb3a47..546fbdeb9b 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -526,17 +526,17 @@ bgp_bfd_peer_config_write(struct vty *vty, struct peer *peer, char *addr)    bfd_info = (struct bfd_info *)peer->bfd_info;    if (CHECK_FLAG (bfd_info->flags, BFD_FLAG_PARAM_CFG)) -    vty_outln (vty, " neighbor %s bfd %d %d %d", addr, +    vty_out (vty, " neighbor %s bfd %d %d %d\n", addr,        bfd_info->detect_mult, bfd_info->required_min_rx,        bfd_info->desired_min_tx);    if (bfd_info->type != BFD_TYPE_NOT_CONFIGURED) -    vty_outln (vty, " neighbor %s bfd %s", addr, +    vty_out (vty, " neighbor %s bfd %s\n", addr,        (bfd_info->type == BFD_TYPE_MULTIHOP) ? "multihop" : "singlehop");    if (!CHECK_FLAG (bfd_info->flags, BFD_FLAG_PARAM_CFG) &&          (bfd_info->type == BFD_TYPE_NOT_CONFIGURED)) -    vty_outln (vty, " neighbor %s bfd", addr); +    vty_out (vty, " neighbor %s bfd\n", addr);  }  /* diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index d5a89c1ff5..80cd770451 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -525,15 +525,15 @@ bgp_config_write_damp (struct vty *vty)        && bgp_damp_cfg.reuse_limit == DEFAULT_REUSE        && bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS        && bgp_damp_cfg.max_suppress_time == bgp_damp_cfg.half_life*4) -    vty_outln (vty, " bgp dampening"); +    vty_out (vty, " bgp dampening\n");    else if (bgp_damp_cfg.half_life != DEFAULT_HALF_LIFE*60  	   && bgp_damp_cfg.reuse_limit == DEFAULT_REUSE  	   && bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS  	   && bgp_damp_cfg.max_suppress_time == bgp_damp_cfg.half_life*4) -    vty_outln (vty, " bgp dampening %lld", +    vty_out (vty, " bgp dampening %lld\n",  	     bgp_damp_cfg.half_life / 60LL);    else -    vty_outln (vty, " bgp dampening %lld %d %d %lld", +    vty_out (vty, " bgp dampening %lld %d %d %lld\n",  	     bgp_damp_cfg.half_life/60LL,  	     bgp_damp_cfg.reuse_limit,  	     bgp_damp_cfg.suppress_value, @@ -691,26 +691,26 @@ bgp_show_dampening_parameters (struct vty *vty, afi_t afi, safi_t safi)    if (bgp == NULL)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))      { -      vty_outln (vty, "Half-life time: %lld min", +      vty_out (vty, "Half-life time: %lld min\n",                 (long long)damp->half_life / 60); -      vty_outln (vty, "Reuse penalty: %d", +      vty_out (vty, "Reuse penalty: %d\n",                 damp->reuse_limit); -      vty_outln (vty, "Suppress penalty: %d", +      vty_out (vty, "Suppress penalty: %d\n",                 damp->suppress_value); -      vty_outln (vty, "Max suppress time: %lld min", +      vty_out (vty, "Max suppress time: %lld min\n",                 (long long)damp->max_suppress_time / 60); -      vty_outln (vty, "Max supress penalty: %u", +      vty_out (vty, "Max supress penalty: %u\n",                 damp->ceiling);        vty_out (vty, VTYNL);      }    else -    vty_outln (vty, "dampening not enabled for %s", +    vty_out (vty, "dampening not enabled for %s\n",                    afi == AFI_IP ? "IPv4" : "IPv6");    return CMD_SUCCESS; diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 5538402070..23f49f2c70 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -274,14 +274,14 @@ bgp_debug_list_conf_print (struct vty *vty, const char *desc, struct list *list)          {            if (filter->host)              { -              vty_outln (vty, "%s %s", desc, filter->host); +              vty_out (vty, "%s %s\n", desc, filter->host);                write++;              }            if (filter->p)              { -              vty_outln (vty, "%s %s/%d", desc, +              vty_out (vty, "%s %s/%d\n", desc,                         inet_ntop (filter->p->family, &filter->p->u.prefix, buf, INET6_ADDRSTRLEN),                         filter->p->prefixlen);                write++; @@ -291,7 +291,7 @@ bgp_debug_list_conf_print (struct vty *vty, const char *desc, struct list *list)      if (!write)        { -        vty_outln (vty, "%s", desc); +        vty_out (vty, "%s\n", desc);          write++;        } @@ -583,7 +583,7 @@ DEFUN (debug_bgp_as4,    else      {        TERM_DEBUG_ON (as4, AS4); -      vty_outln (vty, "BGP as4 debugging is on"); +      vty_out (vty, "BGP as4 debugging is on\n");      }    return CMD_SUCCESS;  } @@ -601,7 +601,7 @@ DEFUN (no_debug_bgp_as4,    else      {        TERM_DEBUG_OFF (as4, AS4); -      vty_outln (vty, "BGP as4 debugging is off"); +      vty_out (vty, "BGP as4 debugging is off\n");      }    return CMD_SUCCESS;  } @@ -619,7 +619,7 @@ DEFUN (debug_bgp_as4_segment,    else      {        TERM_DEBUG_ON (as4, AS4_SEGMENT); -      vty_outln (vty, "BGP as4 segment debugging is on"); +      vty_out (vty, "BGP as4 segment debugging is on\n");      }    return CMD_SUCCESS;  } @@ -638,7 +638,7 @@ DEFUN (no_debug_bgp_as4_segment,    else      {        TERM_DEBUG_OFF (as4, AS4_SEGMENT); -      vty_outln (vty, "BGP as4 segment debugging is off"); +      vty_out (vty, "BGP as4 segment debugging is off\n");      }    return CMD_SUCCESS;  } @@ -658,7 +658,7 @@ DEFUN (debug_bgp_neighbor_events,    else      {        TERM_DEBUG_ON (neighbor_events, NEIGHBOR_EVENTS); -      vty_outln (vty, "BGP neighbor-events debugging is on"); +      vty_out (vty, "BGP neighbor-events debugging is on\n");      }    return CMD_SUCCESS;  } @@ -681,7 +681,7 @@ DEFUN (debug_bgp_neighbor_events_peer,    if (bgp_debug_list_has_entry(bgp_debug_neighbor_events_peers, host, NULL))      { -      vty_outln (vty, "BGP neighbor-events debugging is already enabled for %s", +      vty_out (vty, "BGP neighbor-events debugging is already enabled for %s\n",                   host);        return CMD_SUCCESS;      } @@ -693,7 +693,7 @@ DEFUN (debug_bgp_neighbor_events_peer,    else      {        TERM_DEBUG_ON (neighbor_events, NEIGHBOR_EVENTS); -      vty_outln (vty, "BGP neighbor-events debugging is on for %s", host); +      vty_out (vty, "BGP neighbor-events debugging is on for %s\n", host);      }    return CMD_SUCCESS;  } @@ -713,7 +713,7 @@ DEFUN (no_debug_bgp_neighbor_events,    else      {        TERM_DEBUG_OFF (neighbor_events, NEIGHBOR_EVENTS); -      vty_outln (vty, "BGP neighbor-events debugging is off"); +      vty_out (vty, "BGP neighbor-events debugging is off\n");      }    return CMD_SUCCESS;  } @@ -747,9 +747,9 @@ DEFUN (no_debug_bgp_neighbor_events_peer,      }    if (found_peer) -    vty_outln (vty, "BGP neighbor-events debugging is off for %s", host); +    vty_out (vty, "BGP neighbor-events debugging is off for %s\n", host);    else -    vty_outln (vty, "BGP neighbor-events debugging was not enabled for %s", +    vty_out (vty, "BGP neighbor-events debugging was not enabled for %s\n",                 host);    return CMD_SUCCESS; @@ -768,7 +768,7 @@ DEFUN (debug_bgp_nht,    else      {        TERM_DEBUG_ON (nht, NHT); -      vty_outln (vty, "BGP nexthop tracking debugging is on"); +      vty_out (vty, "BGP nexthop tracking debugging is on\n");      }    return CMD_SUCCESS;  } @@ -786,7 +786,7 @@ DEFUN (no_debug_bgp_nht,    else      {        TERM_DEBUG_OFF (nht, NHT); -      vty_outln (vty, "BGP nexthop tracking debugging is off"); +      vty_out (vty, "BGP nexthop tracking debugging is off\n");      }    return CMD_SUCCESS;  } @@ -806,7 +806,7 @@ DEFUN (debug_bgp_keepalive,    else      {        TERM_DEBUG_ON (keepalive, KEEPALIVE); -      vty_outln (vty, "BGP keepalives debugging is on"); +      vty_out (vty, "BGP keepalives debugging is on\n");      }    return CMD_SUCCESS;  } @@ -829,7 +829,7 @@ DEFUN (debug_bgp_keepalive_peer,    if (bgp_debug_list_has_entry(bgp_debug_keepalive_peers, host, NULL))      { -      vty_outln (vty, "BGP keepalive debugging is already enabled for %s", +      vty_out (vty, "BGP keepalive debugging is already enabled for %s\n",                   host);        return CMD_SUCCESS;      } @@ -841,7 +841,7 @@ DEFUN (debug_bgp_keepalive_peer,    else      {        TERM_DEBUG_ON (keepalive, KEEPALIVE); -      vty_outln (vty, "BGP keepalives debugging is on for %s", host); +      vty_out (vty, "BGP keepalives debugging is on for %s\n", host);      }    return CMD_SUCCESS;  } @@ -861,7 +861,7 @@ DEFUN (no_debug_bgp_keepalive,    else      {        TERM_DEBUG_OFF (keepalive, KEEPALIVE); -      vty_outln (vty, "BGP keepalives debugging is off"); +      vty_out (vty, "BGP keepalives debugging is off\n");      }    return CMD_SUCCESS;  } @@ -895,9 +895,9 @@ DEFUN (no_debug_bgp_keepalive_peer,      }    if (found_peer) -    vty_outln (vty, "BGP keepalives debugging is off for %s", host); +    vty_out (vty, "BGP keepalives debugging is off for %s\n", host);    else -    vty_outln (vty, "BGP keepalives debugging was not enabled for %s", host); +    vty_out (vty, "BGP keepalives debugging was not enabled for %s\n", host);    return CMD_SUCCESS;  } @@ -922,7 +922,7 @@ DEFPY (debug_bgp_bestpath_prefix,    if (bgp_debug_list_has_entry(bgp_debug_bestpath_prefixes, NULL, bestpath))      { -      vty_outln (vty, "BGP bestpath debugging is already enabled for %s", bestpath_str); +      vty_out (vty, "BGP bestpath debugging is already enabled for %s\n", bestpath_str);        return CMD_SUCCESS;      } @@ -935,7 +935,7 @@ DEFPY (debug_bgp_bestpath_prefix,    else      {        TERM_DEBUG_ON (bestpath, BESTPATH); -      vty_outln (vty, "BGP bestpath debugging is on for %s", bestpath_str); +      vty_out (vty, "BGP bestpath debugging is on for %s\n", bestpath_str);      }    return CMD_SUCCESS; @@ -962,7 +962,7 @@ DEFUN (no_debug_bgp_bestpath_prefix,    if (!ret)      {        prefix_free(argv_p); -      vty_outln (vty, "%% Malformed Prefix"); +      vty_out (vty, "%% Malformed Prefix\n");        return CMD_WARNING;      } @@ -979,16 +979,16 @@ DEFUN (no_debug_bgp_bestpath_prefix,            else              {                TERM_DEBUG_OFF (bestpath, BESTPATH); -              vty_outln (vty, "BGP bestpath debugging (per prefix) is off"); +              vty_out (vty, "BGP bestpath debugging (per prefix) is off\n");              }          }      }    if (found_prefix) -    vty_outln (vty, "BGP bestpath debugging is off for %s", +    vty_out (vty, "BGP bestpath debugging is off for %s\n",                 argv[idx_ipv4_ipv6_prefixlen]->arg);    else -    vty_outln (vty, "BGP bestpath debugging was not enabled for %s", +    vty_out (vty, "BGP bestpath debugging was not enabled for %s\n",                 argv[idx_ipv4_ipv6_prefixlen]->arg);    return CMD_SUCCESS; @@ -1009,7 +1009,7 @@ DEFUN (no_debug_bgp_bestpath,    else      {        TERM_DEBUG_OFF (bestpath, BESTPATH); -      vty_outln (vty, "BGP bestpath debugging is off"); +      vty_out (vty, "BGP bestpath debugging is off\n");      }    return CMD_SUCCESS;  } @@ -1035,7 +1035,7 @@ DEFUN (debug_bgp_update,      {        TERM_DEBUG_ON (update, UPDATE_IN);        TERM_DEBUG_ON (update, UPDATE_OUT); -      vty_outln (vty, "BGP updates debugging is on"); +      vty_out (vty, "BGP updates debugging is on\n");      }    return CMD_SUCCESS;  } @@ -1068,12 +1068,12 @@ DEFUN (debug_bgp_update_direct,        if (strncmp ("i", argv[idx_in_out]->arg, 1) == 0)  	{  	  TERM_DEBUG_ON (update, UPDATE_IN); -	  vty_outln (vty, "BGP updates debugging is on (inbound)"); +	  vty_out (vty, "BGP updates debugging is on (inbound)\n");  	}        else  	{  	  TERM_DEBUG_ON (update, UPDATE_OUT); -	  vty_outln (vty, "BGP updates debugging is on (outbound)"); +	  vty_out (vty, "BGP updates debugging is on (outbound)\n");  	}      }    return CMD_SUCCESS; @@ -1111,7 +1111,7 @@ DEFUN (debug_bgp_update_direct_peer,      {        if (bgp_debug_list_has_entry(bgp_debug_update_in_peers, host, NULL))          { -          vty_outln (vty, "BGP inbound update debugging is already enabled for %s", +          vty_out (vty, "BGP inbound update debugging is already enabled for %s\n",                       host);            return CMD_SUCCESS;          } @@ -1121,7 +1121,7 @@ DEFUN (debug_bgp_update_direct_peer,      {        if (bgp_debug_list_has_entry(bgp_debug_update_out_peers, host, NULL))          { -          vty_outln (vty, "BGP outbound update debugging is already enabled for %s", +          vty_out (vty, "BGP outbound update debugging is already enabled for %s\n",                       host);            return CMD_SUCCESS;          } @@ -1166,13 +1166,13 @@ DEFUN (debug_bgp_update_direct_peer,        if (inbound)  	{  	  TERM_DEBUG_ON (update, UPDATE_IN); -	  vty_outln (vty, "BGP updates debugging is on (inbound) for %s", +	  vty_out (vty, "BGP updates debugging is on (inbound) for %s\n",                       argv[idx_peer]->arg);  	}        else  	{  	  TERM_DEBUG_ON (update, UPDATE_OUT); -	  vty_outln (vty, "BGP updates debugging is on (outbound) for %s", +	  vty_out (vty, "BGP updates debugging is on (outbound) for %s\n",                       argv[idx_peer]->arg);  	}      } @@ -1201,7 +1201,7 @@ DEFUN (no_debug_bgp_update_direct,        else          {            TERM_DEBUG_OFF (update, UPDATE_IN); -          vty_outln (vty, "BGP updates debugging is off (inbound)"); +          vty_out (vty, "BGP updates debugging is off (inbound)\n");          }      }    else @@ -1215,7 +1215,7 @@ DEFUN (no_debug_bgp_update_direct,        else          {            TERM_DEBUG_OFF (update, UPDATE_OUT); -          vty_outln (vty, "BGP updates debugging is off (outbound)"); +          vty_out (vty, "BGP updates debugging is off (outbound)\n");          }      } @@ -1258,7 +1258,7 @@ DEFUN (no_debug_bgp_update_direct_peer,            else              {                TERM_DEBUG_OFF (update, UPDATE_IN); -              vty_outln (vty, "BGP updates debugging (inbound) is off"); +              vty_out (vty, "BGP updates debugging (inbound) is off\n");              }          }      } @@ -1275,7 +1275,7 @@ DEFUN (no_debug_bgp_update_direct_peer,            else              {                TERM_DEBUG_OFF (update, UPDATE_OUT); -              vty_outln (vty, "BGP updates debugging (outbound) is off"); +              vty_out (vty, "BGP updates debugging (outbound) is off\n");              }          } @@ -1302,16 +1302,16 @@ DEFUN (no_debug_bgp_update_direct_peer,    if (found_peer)      if (inbound) -      vty_outln (vty, "BGP updates debugging (inbound) is off for %s", host); +      vty_out (vty, "BGP updates debugging (inbound) is off for %s\n", host);      else -      vty_outln (vty, "BGP updates debugging (outbound) is off for %s", +      vty_out (vty, "BGP updates debugging (outbound) is off for %s\n",                   host);    else      if (inbound) -      vty_outln (vty, "BGP updates debugging (inbound) was not enabled for %s", +      vty_out (vty, "BGP updates debugging (inbound) was not enabled for %s\n",                   host);      else -      vty_outln (vty, "BGP updates debugging (outbound) was not enabled for %s", +      vty_out (vty, "BGP updates debugging (outbound) was not enabled for %s\n",                   host);    return CMD_SUCCESS; @@ -1337,7 +1337,7 @@ DEFUN (debug_bgp_update_prefix,    if (!ret)      {        prefix_free(argv_p); -      vty_outln (vty, "%% Malformed Prefix"); +      vty_out (vty, "%% Malformed Prefix\n");        return CMD_WARNING;      } @@ -1347,7 +1347,7 @@ DEFUN (debug_bgp_update_prefix,    if (bgp_debug_list_has_entry(bgp_debug_update_prefixes, NULL, argv_p))      { -      vty_outln (vty, "BGP updates debugging is already enabled for %s", +      vty_out (vty, "BGP updates debugging is already enabled for %s\n",                   argv[idx_ipv4_ipv6_prefixlen]->arg);        return CMD_SUCCESS;      } @@ -1361,7 +1361,7 @@ DEFUN (debug_bgp_update_prefix,    else      {        TERM_DEBUG_ON (update, UPDATE_PREFIX); -      vty_outln (vty, "BGP updates debugging is on for %s", +      vty_out (vty, "BGP updates debugging is on for %s\n",                   argv[idx_ipv4_ipv6_prefixlen]->arg);      } @@ -1390,7 +1390,7 @@ DEFUN (no_debug_bgp_update_prefix,    if (!ret)      {        prefix_free(argv_p); -      vty_outln (vty, "%% Malformed Prefix"); +      vty_out (vty, "%% Malformed Prefix\n");        return CMD_WARNING;      } @@ -1407,16 +1407,16 @@ DEFUN (no_debug_bgp_update_prefix,            else              {                TERM_DEBUG_OFF (update, UPDATE_PREFIX); -              vty_outln (vty, "BGP updates debugging (per prefix) is off"); +              vty_out (vty, "BGP updates debugging (per prefix) is off\n");              }          }      }    if (found_prefix) -    vty_outln (vty, "BGP updates debugging is off for %s", +    vty_out (vty, "BGP updates debugging is off for %s\n",                 argv[idx_ipv4_ipv6_prefixlen]->arg);    else -    vty_outln (vty, "BGP updates debugging was not enabled for %s", +    vty_out (vty, "BGP updates debugging was not enabled for %s\n",                 argv[idx_ipv4_ipv6_prefixlen]->arg);    return CMD_SUCCESS; @@ -1448,7 +1448,7 @@ DEFUN (no_debug_bgp_update,        TERM_DEBUG_OFF (update, UPDATE_IN);        TERM_DEBUG_OFF (update, UPDATE_OUT);        TERM_DEBUG_OFF (update, UPDATE_PREFIX); -      vty_outln (vty, "BGP updates debugging is off"); +      vty_out (vty, "BGP updates debugging is off\n");      }    return CMD_SUCCESS;  } @@ -1466,7 +1466,7 @@ DEFUN (debug_bgp_zebra,    else      {        TERM_DEBUG_ON (zebra, ZEBRA); -      vty_outln (vty, "BGP zebra debugging is on"); +      vty_out (vty, "BGP zebra debugging is on\n");      }    return CMD_SUCCESS;  } @@ -1491,7 +1491,7 @@ DEFUN (debug_bgp_zebra_prefix,    if (!ret)      {        prefix_free(argv_p); -      vty_outln (vty, "%% Malformed Prefix"); +      vty_out (vty, "%% Malformed Prefix\n");        return CMD_WARNING;      } @@ -1500,7 +1500,7 @@ DEFUN (debug_bgp_zebra_prefix,    if (bgp_debug_list_has_entry(bgp_debug_zebra_prefixes, NULL, argv_p))      { -      vty_outln (vty, "BGP zebra debugging is already enabled for %s", +      vty_out (vty, "BGP zebra debugging is already enabled for %s\n",                   argv[idx_ipv4_ipv6_prefixlen]->arg);        return CMD_SUCCESS;      } @@ -1512,7 +1512,7 @@ DEFUN (debug_bgp_zebra_prefix,    else      {        TERM_DEBUG_ON (zebra, ZEBRA); -      vty_outln (vty, "BGP zebra debugging is on for %s", +      vty_out (vty, "BGP zebra debugging is on for %s\n",                   argv[idx_ipv4_ipv6_prefixlen]->arg);      } @@ -1534,7 +1534,7 @@ DEFUN (no_debug_bgp_zebra,    else      {        TERM_DEBUG_OFF (zebra, ZEBRA); -      vty_outln (vty, "BGP zebra debugging is off"); +      vty_out (vty, "BGP zebra debugging is off\n");      }    return CMD_SUCCESS;  } @@ -1561,7 +1561,7 @@ DEFUN (no_debug_bgp_zebra_prefix,    if (!ret)      {        prefix_free(argv_p); -      vty_outln (vty, "%% Malformed Prefix"); +      vty_out (vty, "%% Malformed Prefix\n");        return CMD_WARNING;      } @@ -1576,16 +1576,16 @@ DEFUN (no_debug_bgp_zebra_prefix,            else              {                TERM_DEBUG_OFF (zebra, ZEBRA); -              vty_outln (vty, "BGP zebra debugging is off"); +              vty_out (vty, "BGP zebra debugging is off\n");              }          }      }    if (found_prefix) -    vty_outln (vty, "BGP zebra debugging is off for %s", +    vty_out (vty, "BGP zebra debugging is off for %s\n",                 argv[idx_ipv4_ipv6_prefixlen]->arg);    else -    vty_outln (vty, "BGP zebra debugging was not enabled for %s", +    vty_out (vty, "BGP zebra debugging was not enabled for %s\n",                 argv[idx_ipv4_ipv6_prefixlen]->arg);    return CMD_SUCCESS; @@ -1603,7 +1603,7 @@ DEFUN (debug_bgp_allow_martians,    else      {        TERM_DEBUG_ON (allow_martians, ALLOW_MARTIANS); -      vty_outln (vty, "BGP allow_martian next hop debugging is on"); +      vty_out (vty, "BGP allow_martian next hop debugging is on\n");      }    return CMD_SUCCESS;  } @@ -1621,7 +1621,7 @@ DEFUN (no_debug_bgp_allow_martians,    else      {        TERM_DEBUG_OFF (allow_martians, ALLOW_MARTIANS); -      vty_outln (vty, "BGP allow martian next hop debugging is off"); +      vty_out (vty, "BGP allow martian next hop debugging is off\n");      }    return CMD_SUCCESS;  } @@ -1640,7 +1640,7 @@ DEFUN (debug_bgp_update_groups,    else      {        TERM_DEBUG_ON (update_groups, UPDATE_GROUPS); -      vty_outln (vty, "BGP update-groups debugging is on"); +      vty_out (vty, "BGP update-groups debugging is on\n");      }    return CMD_SUCCESS;  } @@ -1658,7 +1658,7 @@ DEFUN (no_debug_bgp_update_groups,    else      {        TERM_DEBUG_OFF (update_groups, UPDATE_GROUPS); -      vty_outln (vty, "BGP update-groups debugging is off"); +      vty_out (vty, "BGP update-groups debugging is off\n");      }    return CMD_SUCCESS;  } @@ -1691,7 +1691,7 @@ DEFUN (no_debug_bgp,    TERM_DEBUG_OFF (neighbor_events, NEIGHBOR_EVENTS);    TERM_DEBUG_OFF (zebra, ZEBRA);    TERM_DEBUG_OFF (allow_martians, ALLOW_MARTIANS); -  vty_outln (vty, "All possible debugging has been turned off"); +  vty_out (vty, "All possible debugging has been turned off\n");    return CMD_SUCCESS;  } @@ -1703,13 +1703,13 @@ DEFUN (show_debugging_bgp,         DEBUG_STR         BGP_STR)  { -  vty_outln (vty, "BGP debugging status:"); +  vty_out (vty, "BGP debugging status:\n");    if (BGP_DEBUG (as4, AS4)) -    vty_outln (vty, "  BGP as4 debugging is on"); +    vty_out (vty, "  BGP as4 debugging is on\n");    if (BGP_DEBUG (as4, AS4_SEGMENT)) -    vty_outln (vty, "  BGP as4 aspath segment debugging is on"); +    vty_out (vty, "  BGP as4 aspath segment debugging is on\n");    if (BGP_DEBUG (bestpath, BESTPATH))      bgp_debug_list_print (vty, "  BGP bestpath debugging is on", @@ -1724,10 +1724,10 @@ DEFUN (show_debugging_bgp,                            bgp_debug_neighbor_events_peers);    if (BGP_DEBUG (nht, NHT)) -    vty_outln (vty, "  BGP next-hop tracking debugging is on"); +    vty_out (vty, "  BGP next-hop tracking debugging is on\n");    if (BGP_DEBUG (update_groups, UPDATE_GROUPS)) -    vty_outln (vty, "  BGP update-groups debugging is on"); +    vty_out (vty, "  BGP update-groups debugging is on\n");    if (BGP_DEBUG (update, UPDATE_PREFIX))      bgp_debug_list_print (vty, "  BGP updates debugging is on", @@ -1746,7 +1746,7 @@ DEFUN (show_debugging_bgp,                            bgp_debug_zebra_prefixes);    if (BGP_DEBUG (allow_martians, ALLOW_MARTIANS)) -    vty_outln (vty, "  BGP allow martian next hop debugging is on"); +    vty_out (vty, "  BGP allow martian next hop debugging is on\n");    vty_out (vty, VTYNL);    return CMD_SUCCESS;  } @@ -1802,13 +1802,13 @@ bgp_config_write_debug (struct vty *vty)    if (CONF_BGP_DEBUG (as4, AS4))      { -      vty_outln (vty, "debug bgp as4"); +      vty_out (vty, "debug bgp as4\n");        write++;      }    if (CONF_BGP_DEBUG (as4, AS4_SEGMENT))      { -      vty_outln (vty, "debug bgp as4 segment"); +      vty_out (vty, "debug bgp as4 segment\n");        write++;      } @@ -1832,13 +1832,13 @@ bgp_config_write_debug (struct vty *vty)    if (CONF_BGP_DEBUG (nht, NHT))      { -      vty_outln (vty, "debug bgp nht"); +      vty_out (vty, "debug bgp nht\n");        write++;      }    if (CONF_BGP_DEBUG (update_groups, UPDATE_GROUPS))      { -      vty_outln (vty, "debug bgp update-groups"); +      vty_out (vty, "debug bgp update-groups\n");        write++;      } @@ -1864,7 +1864,7 @@ bgp_config_write_debug (struct vty *vty)      {        if (!bgp_debug_zebra_prefixes || list_isempty(bgp_debug_zebra_prefixes))          { -          vty_outln (vty, "debug bgp zebra"); +          vty_out (vty, "debug bgp zebra\n");            write++;          }        else @@ -1876,7 +1876,7 @@ bgp_config_write_debug (struct vty *vty)    if (CONF_BGP_DEBUG (allow_martians, ALLOW_MARTIANS))      { -      vty_outln (vty, "debug bgp allow-martians"); +      vty_out (vty, "debug bgp allow-martians\n");        write++;      } diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index eca29a3518..c35da4db76 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -667,7 +667,7 @@ bgp_dump_set (struct vty *vty, struct bgp_dump *bgp_dump,        interval = bgp_dump_parse_time (interval_str);        if (interval == 0)  	{ -	  vty_outln (vty, "Malformed interval string"); +	  vty_out (vty, "Malformed interval string\n");  	  return CMD_WARNING;  	} @@ -866,10 +866,10 @@ config_write_bgp_dump (struct vty *vty)            type_str = "all-et";        if (bgp_dump_all.interval_str) -	vty_outln (vty, "dump bgp %s %s %s", type_str, +	vty_out (vty, "dump bgp %s %s %s\n", type_str,  		 bgp_dump_all.filename,bgp_dump_all.interval_str);        else -	vty_outln (vty, "dump bgp %s %s", type_str, +	vty_out (vty, "dump bgp %s %s\n", type_str,  		 bgp_dump_all.filename);      }    if (bgp_dump_updates.filename) @@ -879,19 +879,19 @@ config_write_bgp_dump (struct vty *vty)          type_str = "updates-et";        if (bgp_dump_updates.interval_str) -	vty_outln (vty, "dump bgp %s %s %s", type_str, +	vty_out (vty, "dump bgp %s %s %s\n", type_str,  		 bgp_dump_updates.filename,bgp_dump_updates.interval_str);        else -	vty_outln (vty, "dump bgp %s %s", type_str, +	vty_out (vty, "dump bgp %s %s\n", type_str,  		 bgp_dump_updates.filename);      }    if (bgp_dump_routes.filename)      {        if (bgp_dump_routes.interval_str) -	vty_outln (vty, "dump bgp routes-mrt %s %s",  +	vty_out (vty, "dump bgp routes-mrt %s %s\n",  		 bgp_dump_routes.filename,bgp_dump_routes.interval_str);        else -        vty_outln (vty, "dump bgp routes-mrt %s", +        vty_out (vty, "dump bgp routes-mrt %s\n",                   bgp_dump_routes.filename);      } diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index d22a07ed31..7a8ef12c77 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -61,7 +61,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,  	bgp = bgp_get_default();  	if (bgp == NULL) {  		if (!use_json) -			vty_outln (vty,"No BGP process is configured"); +			vty_out (vty,"No BGP process is configured\n");  		return CMD_WARNING;  	} @@ -140,13 +140,13 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,  								 SHOW_DISPLAY_OVERLAY)  								vty_outln(vty, V4_HEADER_OVERLAY);  							else { -								vty_outln (vty, -									"BGP table version is 0, local router ID is %s", +								vty_out (vty, +									"BGP table version is 0, local router ID is %s\n",  									inet_ntoa(bgp->router_id)); -								vty_outln (vty, -									"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal"); -								vty_outln (vty, -									"Origin codes: i - IGP, e - EGP, ? - incomplete%s", +								vty_out (vty, +									"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n"); +								vty_out (vty, +									"Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",  									VTYNL);  								vty_outln(vty, V4_HEADER);  							} @@ -253,10 +253,10 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,  		}  	}  	if (output_count == 0) -		vty_outln (vty, "No prefixes displayed, %ld exist", +		vty_out (vty, "No prefixes displayed, %ld exist\n",  			  total_count);  	else -		vty_outln (vty, "%sDisplayed %ld out of %ld total prefixes", +		vty_out (vty, "%sDisplayed %ld out of %ld total prefixes\n",  			VTYNL, output_count, total_count);  	return CMD_SUCCESS;  } @@ -289,7 +289,7 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd,  	ret = str2prefix_rd(argv[idx_ext_community]->arg, &prd);  	if (!ret) { -		vty_outln (vty, "%% Malformed Route Distinguisher"); +		vty_out (vty, "%% Malformed Route Distinguisher\n");  		return CMD_WARNING;  	}  	return bgp_show_ethernet_vpn(vty, &prd, bgp_show_type_normal, NULL, 0, @@ -330,7 +330,7 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_tags,  	ret = str2prefix_rd(argv[idx_ext_community]->arg, &prd);  	if (!ret) { -		vty_outln (vty, "%% Malformed Route Distinguisher"); +		vty_out (vty, "%% Malformed Route Distinguisher\n");  		return CMD_WARNING;  	}  	return bgp_show_ethernet_vpn(vty, &prd, bgp_show_type_normal, NULL, 1, @@ -365,11 +365,11 @@ DEFUN(show_ip_bgp_l2vpn_evpn_all_neighbor_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "Malformed address"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, "Malformed address: %s", +			vty_out (vty, "Malformed address: %s\n",  				argv[idx_ipv4]->arg);  		return CMD_WARNING;  	} @@ -381,12 +381,12 @@ DEFUN(show_ip_bgp_l2vpn_evpn_all_neighbor_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "No such neighbor or address family"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, -				  "%% No such neighbor or address family"); +			vty_out (vty, +				  "%% No such neighbor or address family\n");  		return CMD_WARNING;  	} @@ -426,11 +426,11 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_neighbor_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "Malformed Route Distinguisher"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty,"%% Malformed Route Distinguisher"); +			vty_out (vty,"%% Malformed Route Distinguisher\n");  		return CMD_WARNING;  	} @@ -441,11 +441,11 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_neighbor_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "Malformed address"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, "Malformed address: %s", +			vty_out (vty, "Malformed address: %s\n",  				argv[idx_ext_community]->arg);  		return CMD_WARNING;  	} @@ -457,12 +457,12 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_neighbor_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "No such neighbor or address family"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, -				  "%% No such neighbor or address family"); +			vty_out (vty, +				  "%% No such neighbor or address family\n");  		return CMD_WARNING;  	} @@ -498,11 +498,11 @@ DEFUN(show_ip_bgp_l2vpn_evpn_all_neighbor_advertised_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "Malformed address"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, "Malformed address: %s", +			vty_out (vty, "Malformed address: %s\n",  				argv[idx_ipv4]->arg);  		return CMD_WARNING;  	} @@ -513,12 +513,12 @@ DEFUN(show_ip_bgp_l2vpn_evpn_all_neighbor_advertised_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "No such neighbor or address family"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, -				  "%% No such neighbor or address family"); +			vty_out (vty, +				  "%% No such neighbor or address family\n");  		return CMD_WARNING;  	} @@ -557,11 +557,11 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_neighbor_advertised_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "Malformed address"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, "Malformed address: %s", +			vty_out (vty, "Malformed address: %s\n",  				argv[idx_ext_community]->arg);  		return CMD_WARNING;  	} @@ -572,12 +572,12 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_neighbor_advertised_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "No such neighbor or address family"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty, -				  "%% No such neighbor or address family"); +			vty_out (vty, +				  "%% No such neighbor or address family\n");  		return CMD_WARNING;  	} @@ -588,11 +588,11 @@ DEFUN(show_ip_bgp_l2vpn_evpn_rd_neighbor_advertised_routes,  			json_no = json_object_new_object();  			json_object_string_add(json_no, "warning",  					       "Malformed Route Distinguisher"); -			vty_outln (vty, "%s", +			vty_out (vty, "%s\n",  				json_object_to_json_string(json_no));  			json_object_free(json_no);  		} else -			vty_outln (vty,"%% Malformed Route Distinguisher"); +			vty_out (vty,"%% Malformed Route Distinguisher\n");  		return CMD_WARNING;  	} @@ -635,7 +635,7 @@ DEFUN(show_ip_bgp_evpn_rd_overlay,  	ret = str2prefix_rd(argv[idx_ext_community]->arg, &prd);  	if (!ret) { -		vty_outln (vty, "%% Malformed Route Distinguisher"); +		vty_out (vty, "%% Malformed Route Distinguisher\n");  		return CMD_WARNING;  	}  	return bgp_show_ethernet_vpn(vty, &prd, bgp_show_type_normal, NULL, diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index b2f0c3ee25..9b11cd58b2 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -457,7 +457,7 @@ DEFUN (ip_as_path,    regex = bgp_regcomp (regstr);    if (!regex)      { -      vty_outln (vty, "can't compile regexp %s", regstr); +      vty_out (vty, "can't compile regexp %s\n", regstr);        XFREE (MTYPE_TMP, regstr);        return CMD_WARNING;      } @@ -503,7 +503,7 @@ DEFUN (no_ip_as_path,    aslist = as_list_lookup (aslistname);    if (aslist == NULL)      { -      vty_outln (vty, "ip as-path access-list %s doesn't exist",aslistname); +      vty_out (vty, "ip as-path access-list %s doesn't exist\n",aslistname);        return CMD_WARNING;      } @@ -514,7 +514,7 @@ DEFUN (no_ip_as_path,      type = AS_FILTER_DENY;    else      { -      vty_outln (vty, "filter type must be [permit|deny]"); +      vty_out (vty, "filter type must be [permit|deny]\n");        return CMD_WARNING;      } @@ -525,7 +525,7 @@ DEFUN (no_ip_as_path,    regex = bgp_regcomp (regstr);    if (!regex)      { -      vty_outln (vty, "can't compile regexp %s", regstr); +      vty_out (vty, "can't compile regexp %s\n", regstr);        XFREE (MTYPE_TMP, regstr);        return CMD_WARNING;      } @@ -562,7 +562,7 @@ DEFUN (no_ip_as_path_all,    aslist = as_list_lookup (argv[idx_word]->arg);    if (aslist == NULL)      { -      vty_outln (vty, "ip as-path access-list %s doesn't exist", +      vty_out (vty, "ip as-path access-list %s doesn't exist\n",                   argv[idx_word]->arg);        return CMD_WARNING;      } @@ -581,11 +581,11 @@ as_list_show (struct vty *vty, struct as_list *aslist)  {    struct as_filter *asfilter; -  vty_outln (vty, "AS path access list %s", aslist->name); +  vty_out (vty, "AS path access list %s\n", aslist->name);    for (asfilter = aslist->head; asfilter; asfilter = asfilter->next)      { -      vty_outln (vty, "    %s %s", filter_type_str (asfilter->type), +      vty_out (vty, "    %s %s\n", filter_type_str (asfilter->type),  	       asfilter->reg_str);      }  } @@ -598,22 +598,22 @@ as_list_show_all (struct vty *vty)    for (aslist = as_list_master.num.head; aslist; aslist = aslist->next)      { -      vty_outln (vty, "AS path access list %s", aslist->name); +      vty_out (vty, "AS path access list %s\n", aslist->name);        for (asfilter = aslist->head; asfilter; asfilter = asfilter->next)  	{ -	  vty_outln (vty, "    %s %s", filter_type_str (asfilter->type), +	  vty_out (vty, "    %s %s\n", filter_type_str (asfilter->type),  		   asfilter->reg_str);  	}      }    for (aslist = as_list_master.str.head; aslist; aslist = aslist->next)      { -      vty_outln (vty, "AS path access list %s", aslist->name); +      vty_out (vty, "AS path access list %s\n", aslist->name);        for (asfilter = aslist->head; asfilter; asfilter = asfilter->next)  	{ -	  vty_outln (vty, "    %s %s", filter_type_str (asfilter->type), +	  vty_out (vty, "    %s %s\n", filter_type_str (asfilter->type),  		   asfilter->reg_str);  	}      } @@ -658,7 +658,7 @@ config_write_as_list (struct vty *vty)    for (aslist = as_list_master.num.head; aslist; aslist = aslist->next)      for (asfilter = aslist->head; asfilter; asfilter = asfilter->next)        { -	vty_outln (vty, "ip as-path access-list %s %s %s", +	vty_out (vty, "ip as-path access-list %s %s %s\n",  		 aslist->name, filter_type_str (asfilter->type),   		 asfilter->reg_str);  	write++; @@ -667,7 +667,7 @@ config_write_as_list (struct vty *vty)    for (aslist = as_list_master.str.head; aslist; aslist = aslist->next)      for (asfilter = aslist->head; asfilter; asfilter = asfilter->next)        { -	vty_outln (vty, "ip as-path access-list %s %s %s", +	vty_out (vty, "ip as-path access-list %s %s %s\n",  		 aslist->name, filter_type_str (asfilter->type),   		 asfilter->reg_str);  	write++; diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index b5fbfd8bb6..3efbeb8b49 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -563,7 +563,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,    if (bgp == NULL)      {        if (!use_json) -        vty_outln (vty, "No BGP process is configured"); +        vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -589,7 +589,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,    if ((afi != AFI_IP) && (afi != AFI_IP6))      { -      vty_outln (vty, "Afi %d not supported", afi); +      vty_out (vty, "Afi %d not supported\n", afi);        return CMD_WARNING;      } @@ -637,11 +637,11 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,  		            vty_outln (vty, V4_HEADER_TAG);  		          else  		            { -		              vty_outln (vty, "BGP table version is 0, local router ID is %s", +		              vty_out (vty, "BGP table version is 0, local router ID is %s\n",  		                       inet_ntoa(bgp->router_id)); -		              vty_outln (vty, -                                         "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal"); -		              vty_outln (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s", +		              vty_out (vty, +                                         "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n"); +		              vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",  		                       VTYNL);  		              vty_outln (vty, V4_HEADER);  		            } @@ -740,16 +740,16 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,    if (use_json)      {        json_object_object_add(json, "routes", json_nroute); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      }    else      {        if (output_count == 0) -	vty_outln (vty, "No prefixes displayed, %ld exist", total_count); +	vty_out (vty, "No prefixes displayed, %ld exist\n", total_count);        else -	vty_outln (vty, "%sDisplayed %ld routes and %ld total paths", +	vty_out (vty, "%sDisplayed %ld routes and %ld total paths\n",  		 VTYNL, output_count, total_count);      } @@ -781,7 +781,7 @@ DEFUN (show_bgp_ip_vpn_all_rd,            ret = str2prefix_rd (argv[idx_rd]->arg, &prd);            if (! ret)              { -              vty_outln (vty, "%% Malformed Route Distinguisher"); +              vty_out (vty, "%% Malformed Route Distinguisher\n");                return CMD_WARNING;              }            return bgp_show_mpls_vpn (vty, afi, &prd, bgp_show_type_normal, NULL, 0, use_json (argc, argv)); @@ -816,7 +816,7 @@ DEFUN (show_ip_bgp_vpn_rd,        ret = str2prefix_rd (argv[idx_ext_community]->arg, &prd);        if (! ret)          { -          vty_outln (vty, "%% Malformed Route Distinguisher"); +          vty_out (vty, "%% Malformed Route Distinguisher\n");            return CMD_WARNING;          }        return bgp_show_mpls_vpn (vty, afi, &prd, bgp_show_type_normal, NULL, 0, 0); @@ -881,7 +881,7 @@ DEFUN (show_ip_bgp_vpn_rd_tags,        ret = str2prefix_rd (argv[idx_ext_community]->arg, &prd);        if (! ret)          { -          vty_outln (vty, "%% Malformed Route Distinguisher"); +          vty_out (vty, "%% Malformed Route Distinguisher\n");            return CMD_WARNING;          }        return bgp_show_mpls_vpn (vty, afi, &prd, bgp_show_type_normal, NULL, 1, 0); @@ -920,11 +920,11 @@ DEFUN (show_ip_bgp_vpn_all_neighbor_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "Malformed address"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "Malformed address: %s", argv[idx_ipv4]->arg); +            vty_out (vty, "Malformed address: %s\n", argv[idx_ipv4]->arg);            return CMD_WARNING;          } @@ -936,11 +936,11 @@ DEFUN (show_ip_bgp_vpn_all_neighbor_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "No such neighbor or address family"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "%% No such neighbor or address family"); +            vty_out (vty, "%% No such neighbor or address family\n");            return CMD_WARNING;          } @@ -983,11 +983,11 @@ DEFUN (show_ip_bgp_vpn_rd_neighbor_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "Malformed Route Distinguisher"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "%% Malformed Route Distinguisher"); +            vty_out (vty, "%% Malformed Route Distinguisher\n");            return CMD_WARNING;          } @@ -999,11 +999,11 @@ DEFUN (show_ip_bgp_vpn_rd_neighbor_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "Malformed address"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "Malformed address: %s", +            vty_out (vty, "Malformed address: %s\n",                         argv[idx_ext_community]->arg);            return CMD_WARNING;          } @@ -1016,11 +1016,11 @@ DEFUN (show_ip_bgp_vpn_rd_neighbor_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "No such neighbor or address family"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "%% No such neighbor or address family"); +            vty_out (vty, "%% No such neighbor or address family\n");            return CMD_WARNING;          } @@ -1060,11 +1060,11 @@ DEFUN (show_ip_bgp_vpn_all_neighbor_advertised_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "Malformed address"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "Malformed address: %s", argv[idx_ipv4]->arg); +            vty_out (vty, "Malformed address: %s\n", argv[idx_ipv4]->arg);            return CMD_WARNING;          }        peer = peer_lookup (NULL, &su); @@ -1075,11 +1075,11 @@ DEFUN (show_ip_bgp_vpn_all_neighbor_advertised_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "No such neighbor or address family"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "%% No such neighbor or address family"); +            vty_out (vty, "%% No such neighbor or address family\n");            return CMD_WARNING;          }        return show_adj_route_vpn (vty, peer, NULL, AFI_IP, SAFI_MPLS_VPN, uj); @@ -1121,11 +1121,11 @@ DEFUN (show_ip_bgp_vpn_rd_neighbor_advertised_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "Malformed address"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "Malformed address: %s", +            vty_out (vty, "Malformed address: %s\n",                         argv[idx_ext_community]->arg);            return CMD_WARNING;          } @@ -1137,11 +1137,11 @@ DEFUN (show_ip_bgp_vpn_rd_neighbor_advertised_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "No such neighbor or address family"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "%% No such neighbor or address family"); +            vty_out (vty, "%% No such neighbor or address family\n");            return CMD_WARNING;          } @@ -1153,11 +1153,11 @@ DEFUN (show_ip_bgp_vpn_rd_neighbor_advertised_routes,                json_object *json_no = NULL;                json_no = json_object_new_object();                json_object_string_add(json_no, "warning", "Malformed Route Distinguisher"); -              vty_outln (vty, "%s", json_object_to_json_string(json_no)); +              vty_out (vty, "%s\n", json_object_to_json_string(json_no));                json_object_free(json_no);              }            else -            vty_outln (vty, "%% Malformed Route Distinguisher"); +            vty_out (vty, "%% Malformed Route Distinguisher\n");            return CMD_WARNING;          } diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index d0c4d2c945..3b7f2e2fc7 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -387,7 +387,7 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail)    time_t tbuf;    afi_t afi; -  vty_outln (vty, "Current BGP nexthop cache:"); +  vty_out (vty, "Current BGP nexthop cache:\n");    for (afi = AFI_IP ; afi < AFI_MAX ; afi++)      {        if (!bgp->nexthop_cache_table[afi]) @@ -399,7 +399,7 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail)  	    {  	      if (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_VALID))  		{ -		  vty_outln (vty, " %s valid [IGP metric %d], #paths %d", +		  vty_out (vty, " %s valid [IGP metric %d], #paths %d\n",  			   inet_ntop (rn->p.family, &rn->p.u.prefix, buf, sizeof (buf)),  			   bnc->metric, bnc->path_count);  		  if (detail) @@ -407,40 +407,40 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail)  		      switch (nexthop->type)  			{  			case NEXTHOP_TYPE_IPV6: -			  vty_outln (vty, "  gate %s", +			  vty_out (vty, "  gate %s\n",  				   inet_ntop(AF_INET6, &nexthop->gate.ipv6, buf, sizeof(buf)));  			  break;  			case NEXTHOP_TYPE_IPV6_IFINDEX: -			  vty_outln (vty, "  gate %s, if %s", +			  vty_out (vty, "  gate %s, if %s\n",  				  inet_ntop(AF_INET6, &nexthop->gate.ipv6, buf,  					    sizeof (buf)),  				  ifindex2ifname(nexthop->ifindex, bgp->vrf_id));  			  break;  			case NEXTHOP_TYPE_IPV4: -			  vty_outln (vty, "  gate %s", +			  vty_out (vty, "  gate %s\n",  				   inet_ntop(AF_INET, &nexthop->gate.ipv4, buf, sizeof(buf)));  			  break;  			case NEXTHOP_TYPE_IFINDEX: -			  vty_outln (vty, "  if %s", +			  vty_out (vty, "  if %s\n",  				   ifindex2ifname(nexthop->ifindex, bgp->vrf_id));  			  break;  			case NEXTHOP_TYPE_IPV4_IFINDEX: -			  vty_outln (vty, "  gate %s, if %s", +			  vty_out (vty, "  gate %s, if %s\n",  				   inet_ntop(AF_INET, &nexthop->gate.ipv4, buf,  					     sizeof (buf)),  				   ifindex2ifname(nexthop->ifindex, bgp->vrf_id));  			  break;  			default: -			  vty_outln (vty, "  invalid nexthop type %u", +			  vty_out (vty, "  invalid nexthop type %u\n",  				   nexthop->type);  			}  		}  	      else  		{ -		  vty_outln (vty, " %s invalid", +		  vty_out (vty, " %s invalid\n",  			   inet_ntop(rn->p.family, &rn->p.u.prefix, buf, sizeof(buf)));  		  if (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED)) -		    vty_outln (vty, "  Must be Connected"); +		    vty_out (vty, "  Must be Connected\n");  		}  	      tbuf = time(NULL) - (bgp_clock() - bnc->last_update);  	      vty_out (vty, "  Last update: %s", ctime(&tbuf)); @@ -461,7 +461,7 @@ show_ip_bgp_nexthop_table (struct vty *vty, const char *name, int detail)      bgp = bgp_get_default ();    if (!bgp)      { -      vty_outln (vty, "%% No such BGP instance exist"); +      vty_out (vty, "%% No such BGP instance exist\n");        return CMD_WARNING;      } @@ -478,7 +478,7 @@ bgp_show_all_instances_nexthops_vty (struct vty *vty)    for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))      { -      vty_outln (vty, "%sInstance %s:", +      vty_out (vty, "%sInstance %s:\n",                 VTYNL,                 (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);        bgp_show_nexthops (vty, bgp, 0); diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 12ad65883e..156c0aa359 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4273,12 +4273,12 @@ bgp_static_set (struct vty *vty, const char *ip_str,    ret = str2prefix (ip_str, &p);    if (! ret)      { -      vty_outln (vty, "%% Malformed prefix"); +      vty_out (vty, "%% Malformed prefix\n");        return CMD_WARNING;      }    if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&p.u.prefix6))      { -      vty_outln (vty,"%% Malformed prefix (link-local address)"); +      vty_out (vty,"%% Malformed prefix (link-local address)\n");        return CMD_WARNING;      } @@ -4295,7 +4295,7 @@ bgp_static_set (struct vty *vty, const char *ip_str,        /* Label index cannot be changed. */        if (bgp_static->label_index != label_index)          { -          vty_outln (vty, "%% Label index cannot be changed"); +          vty_out (vty, "%% Label index cannot be changed\n");            return CMD_WARNING;          } @@ -4367,12 +4367,12 @@ bgp_static_unset (struct vty *vty, const char *ip_str,    ret = str2prefix (ip_str, &p);    if (! ret)      { -      vty_outln (vty, "%% Malformed prefix"); +      vty_out (vty, "%% Malformed prefix\n");        return CMD_WARNING;      }    if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&p.u.prefix6))      { -      vty_outln (vty,"%% Malformed prefix (link-local address)"); +      vty_out (vty,"%% Malformed prefix (link-local address)\n");        return CMD_WARNING;      } @@ -4381,7 +4381,7 @@ bgp_static_unset (struct vty *vty, const char *ip_str,    rn = bgp_node_lookup (bgp->route[afi][safi], &p);    if (! rn)      { -      vty_outln (vty,"%% Can't find specified static route configuration."); +      vty_out (vty,"%% Can't find specified static route configuration.\n");        return CMD_WARNING;      } @@ -4579,21 +4579,21 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str    ret = str2prefix (ip_str, &p);    if (! ret)      { -      vty_outln (vty, "%% Malformed prefix"); +      vty_out (vty, "%% Malformed prefix\n");        return CMD_WARNING;      }    apply_mask (&p);    if ( (afi == AFI_L2VPN) &&         (bgp_build_evpn_prefix ( evpn_type, ethtag!=NULL?atol(ethtag):0, &p)))      { -      vty_outln (vty, "%% L2VPN prefix could not be forged"); +      vty_out (vty, "%% L2VPN prefix could not be forged\n");        return CMD_WARNING;      }    ret = str2prefix_rd (rd_str, &prd);    if (! ret)      { -      vty_outln (vty, "%% Malformed rd"); +      vty_out (vty, "%% Malformed rd\n");        return CMD_WARNING;      } @@ -4608,12 +4608,12 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str      {        if( esi && str2esi (esi, NULL) == 0)          { -          vty_outln (vty, "%% Malformed ESI"); +          vty_out (vty, "%% Malformed ESI\n");            return CMD_WARNING;          }        if( routermac && prefix_str2mac (routermac, NULL) == 0)          { -          vty_outln (vty, "%% Malformed Router MAC"); +          vty_out (vty, "%% Malformed Router MAC\n");            return CMD_WARNING;          }        if (gwip) @@ -4622,7 +4622,7 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str            ret = str2prefix (gwip, &gw_ip);            if (! ret)              { -              vty_outln (vty, "%% Malformed GatewayIp"); +              vty_out (vty, "%% Malformed GatewayIp\n");                return CMD_WARNING;              }            if((gw_ip.family == AF_INET && @@ -4630,7 +4630,7 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str               (gw_ip.family == AF_INET6 &&                IS_EVPN_PREFIX_IPADDR_V4((struct prefix_evpn *)&p)))              { -              vty_outln (vty, "%% GatewayIp family differs with IP prefix"); +              vty_out (vty, "%% GatewayIp family differs with IP prefix\n");                return CMD_WARNING;              }          } @@ -4647,7 +4647,7 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str    if (rn->info)      { -      vty_outln (vty, "%% Same network configuration exists"); +      vty_out (vty, "%% Same network configuration exists\n");        bgp_unlock_node (rn);      }    else @@ -4713,20 +4713,20 @@ bgp_static_unset_safi(afi_t afi, safi_t safi, struct vty *vty, const char *ip_st    ret = str2prefix (ip_str, &p);    if (! ret)      { -      vty_outln (vty, "%% Malformed prefix"); +      vty_out (vty, "%% Malformed prefix\n");        return CMD_WARNING;      }    apply_mask (&p);    if ( (afi == AFI_L2VPN) &&         (bgp_build_evpn_prefix ( evpn_type, ethtag!=NULL?atol(ethtag):0, &p)))      { -      vty_outln (vty, "%% L2VPN prefix could not be forged"); +      vty_out (vty, "%% L2VPN prefix could not be forged\n");        return CMD_WARNING;      }    ret = str2prefix_rd (rd_str, &prd);    if (! ret)      { -      vty_outln (vty, "%% Malformed rd"); +      vty_out (vty, "%% Malformed rd\n");        return CMD_WARNING;      } @@ -4758,7 +4758,7 @@ bgp_static_unset_safi(afi_t afi, safi_t safi, struct vty *vty, const char *ip_st        bgp_unlock_node (rn);      }    else -    vty_outln (vty, "%% Can't find the route"); +    vty_out (vty, "%% Can't find the route\n");    return CMD_SUCCESS;  } @@ -4816,7 +4816,7 @@ bgp_config_write_table_map (struct vty *vty, struct bgp *bgp, afi_t afi,    if (bgp->table_map[afi][safi].name)      {        bgp_config_write_family_header (vty, afi, safi, write); -      vty_outln (vty, "  table-map %s", +      vty_out (vty, "  table-map %s\n",  	       bgp->table_map[afi][safi].name);      } @@ -4900,7 +4900,7 @@ DEFUN (bgp_network_mask,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -4927,7 +4927,7 @@ DEFUN (bgp_network_mask_route_map,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -4952,7 +4952,7 @@ DEFUN (bgp_network_mask_backdoor,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -4974,7 +4974,7 @@ DEFUN (bgp_network_mask_natural,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, NULL, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -4999,7 +4999,7 @@ DEFUN (bgp_network_mask_natural_route_map,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, NULL, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -5022,7 +5022,7 @@ DEFUN (bgp_network_mask_natural_backdoor,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, NULL, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -5097,7 +5097,7 @@ DEFUN (no_bgp_network_mask,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -5122,7 +5122,7 @@ DEFUN (no_bgp_network_mask_natural,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, NULL, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -5756,7 +5756,7 @@ bgp_aggregate_unset (struct vty *vty, const char *prefix_str,    ret = str2prefix (prefix_str, &p);    if (!ret)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      }    apply_mask (&p); @@ -5765,7 +5765,7 @@ bgp_aggregate_unset (struct vty *vty, const char *prefix_str,    rn = bgp_node_lookup (bgp->aggregate[afi][safi], &p);    if (! rn)      { -      vty_outln (vty,"%% There is no aggregate-address configuration."); +      vty_out (vty,"%% There is no aggregate-address configuration.\n");        return CMD_WARNING;      } @@ -5801,7 +5801,7 @@ bgp_aggregate_set (struct vty *vty, const char *prefix_str,    ret = str2prefix (prefix_str, &p);    if (!ret)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      }    apply_mask (&p); @@ -5811,12 +5811,12 @@ bgp_aggregate_set (struct vty *vty, const char *prefix_str,    if (rn->info)      { -      vty_outln (vty, "There is already same aggregate network."); +      vty_out (vty, "There is already same aggregate network.\n");        /* try to remove the old entry */        ret = bgp_aggregate_unset (vty, prefix_str, afi, safi);        if (ret)          { -          vty_outln (vty, "Error deleting aggregate."); +          vty_out (vty, "Error deleting aggregate.\n");  	  bgp_unlock_node (rn);  	  return CMD_WARNING;          } @@ -5884,7 +5884,7 @@ DEFUN (aggregate_address_mask,    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -5930,7 +5930,7 @@ DEFUN (no_aggregate_address_mask,    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -6504,7 +6504,7 @@ route_vty_out (struct vty *vty, struct prefix *p,        if (json_paths)          json_object_string_add(json_path, "alert", "No attributes");        else -        vty_outln (vty, "No attributes to print"); +        vty_out (vty, "No attributes to print\n");      }    if (json_paths) @@ -7366,7 +7366,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,              }            else              { -	      vty_outln (vty, "    (%s) %s", +	      vty_out (vty, "    (%s) %s\n",                         inet_ntop (AF_INET6, &attr->extra->mp_nexthop_local,  			          buf, INET6_ADDRSTRLEN),                         attr->extra->mp_nexthop_prefer_global ? "(prefer-global)" : "(used)"); @@ -7574,7 +7574,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,              }            else              { -	      vty_outln (vty, "      Community: %s",attr->community->str); +	      vty_out (vty, "      Community: %s\n",attr->community->str);              }          } @@ -7589,14 +7589,14 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,              }            else              { -	       vty_outln (vty, "      Extended Community: %s", +	       vty_out (vty, "      Extended Community: %s\n",  	                attr->extra->ecommunity->str);              }          }        /* Line 6 display Large community */        if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES)) -        vty_outln (vty, "      Large Community: %s", +        vty_out (vty, "      Large Community: %s\n",                   attr->extra->lcommunity->str);        /* Line 7 display Originator, Cluster-id */ @@ -7662,7 +7662,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,            if (json_paths)              json_object_int_add(json_path, "remoteLabel", label);            else -            vty_outln (vty, "      Remote label: %d", label); +            vty_out (vty, "      Remote label: %d\n", label);          }        /* Label Index */ @@ -7671,7 +7671,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,            if (json_paths)              json_object_int_add(json_path, "labelIndex", attr->extra->label_index);            else -            vty_outln (vty, "      Label Index: %d", +            vty_out (vty, "      Label Index: %d\n",                        attr->extra->label_index);          } @@ -7685,7 +7685,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,              }            else              { -              vty_outln (vty, "      AddPath ID: RX %u, TX %u", +              vty_out (vty, "      AddPath ID: RX %u, TX %u\n",                         binfo->addpath_rx_id,binfo->addpath_tx_id);              }          } @@ -8031,7 +8031,7 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,    if (use_json)      {        json_object_free (json_paths); -      vty_outln (vty, " } }"); +      vty_out (vty, " } }\n");      }    else      { @@ -8039,11 +8039,11 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,        if (output_count == 0)          {            if (type == bgp_show_type_normal) -            vty_outln (vty, "No BGP prefixes displayed, %ld exist", +            vty_out (vty, "No BGP prefixes displayed, %ld exist\n",                         total_count);          }        else -        vty_outln (vty, "%sDisplayed  %ld routes and %ld total paths", +        vty_out (vty, "%sDisplayed  %ld routes and %ld total paths\n",                   VTYNL, output_count, total_count);      } @@ -8064,7 +8064,7 @@ bgp_show (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,    if (bgp == NULL)      {        if (!use_json) -        vty_outln (vty, "No BGP process is configured"); +        vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    /* use MPLS and ENCAP specific shows until they are merged */ @@ -8089,14 +8089,14 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,    int is_first = 1;    if (use_json) -    vty_outln (vty, "{"); +    vty_out (vty, "{\n");    for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))      {        if (use_json)          {            if (! is_first) -            vty_outln (vty, ","); +            vty_out (vty, ",\n");            else              is_first = 0; @@ -8105,7 +8105,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,          }        else          { -          vty_outln (vty, "%sInstance %s:", +          vty_out (vty, "%sInstance %s:\n",                     VTYNL,                     (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);          } @@ -8114,7 +8114,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,      }    if (use_json) -    vty_outln (vty, "}"); +    vty_out (vty, "}\n");  }  /* Header of detailed BGP route information */ @@ -8161,7 +8161,7 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,          prefix2str (p, buf2, INET6_ADDRSTRLEN);        else          inet_ntop (p->family, &p->u.prefix, buf2, INET6_ADDRSTRLEN); -      vty_outln (vty, "BGP routing table entry for %s%s%s/%d", +      vty_out (vty, "BGP routing table entry for %s%s%s/%d\n",  	       ((safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP || safi == SAFI_EVPN) ?  	       prefix_rd2str (prd, buf1, RD_ADDRSTRLEN) : ""),  	       ((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN)) ? ":" : "", @@ -8169,9 +8169,9 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,  	       p->prefixlen);        if (has_valid_label) -        vty_outln (vty, "Local label: %d", label); +        vty_out (vty, "Local label: %d\n", label);        else if (bgp_labeled_safi(safi)) -        vty_outln (vty, "Local label: not allocated"); +        vty_out (vty, "Local label: not allocated\n");      }    for (ri = rn->info; ri; ri = ri->next) @@ -8217,7 +8217,7 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,        if (suppress)          vty_out (vty, ", Advertisements suppressed by an aggregate."); -      vty_outln (vty, ")"); +      vty_out (vty, ")\n");      }    /* If we are not using addpath then we can display Advertised to and that will @@ -8277,7 +8277,7 @@ bgp_show_route_in_table (struct vty *vty, struct bgp *bgp,    ret = str2prefix (ip_str, &match);    if (! ret)      { -      vty_outln (vty, "address is malformed"); +      vty_out (vty, "address is malformed\n");        return CMD_WARNING;      } @@ -8364,7 +8364,7 @@ bgp_show_route_in_table (struct vty *vty, struct bgp *bgp,        if (display)          json_object_object_add(json, "paths", json_paths); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      } @@ -8372,7 +8372,7 @@ bgp_show_route_in_table (struct vty *vty, struct bgp *bgp,      {        if (!display)          { -          vty_outln (vty, "%% Network not in table"); +          vty_out (vty, "%% Network not in table\n");            return CMD_WARNING;          }      } @@ -8428,7 +8428,7 @@ bgp_show_lcommunity (struct vty *vty, struct bgp *bgp, int argc,    XFREE (MTYPE_TMP, str);    if (! lcom)      { -      vty_outln (vty, "%% Large-community malformed"); +      vty_out (vty, "%% Large-community malformed\n");        return CMD_WARNING;      } @@ -8444,7 +8444,7 @@ bgp_show_lcommunity_list (struct vty *vty, struct bgp *bgp, const char *lcom,    list = community_list_lookup (bgp_clist, lcom, LARGE_COMMUNITY_LIST_MASTER);    if (list == NULL)      { -      vty_outln (vty, "%% %s is not a valid large-community-list name",lcom); +      vty_out (vty, "%% %s is not a valid large-community-list name\n",lcom);        return CMD_WARNING;      } @@ -8486,7 +8486,7 @@ DEFUN (show_ip_bgp_large_community_list,      struct bgp *bgp = bgp_lookup_by_name (vrf);    if (bgp == NULL)     { -     vty_outln (vty, "Can't find BGP instance %s", vrf); +     vty_out (vty, "Can't find BGP instance %s\n", vrf);       return CMD_WARNING;     } @@ -8527,7 +8527,7 @@ DEFUN (show_ip_bgp_large_community,    struct bgp *bgp = bgp_lookup_by_name (vrf);    if (bgp == NULL)     { -     vty_outln (vty, "Can't find BGP instance %s", vrf); +     vty_out (vty, "Can't find BGP instance %s\n", vrf);       return CMD_WARNING;     } @@ -8696,8 +8696,8 @@ DEFUN (show_ip_bgp_route,    if (!bgp)      { -      vty_outln (vty, -                 "Specified 'all' vrf's but this command currently only works per view/vrf"); +      vty_out (vty, +                 "Specified 'all' vrf's but this command currently only works per view/vrf\n");        return CMD_WARNING;      } @@ -8709,14 +8709,14 @@ DEFUN (show_ip_bgp_route,    if ((argv[idx]->type == IPV6_TKN || argv[idx]->type == IPV6_PREFIX_TKN) && afi != AFI_IP6)    { -    vty_outln (vty, -               "%% Cannot specify IPv6 address or prefix with IPv4 AFI"); +    vty_out (vty, +               "%% Cannot specify IPv6 address or prefix with IPv4 AFI\n");      return CMD_WARNING;    }    if ((argv[idx]->type == IPV4_TKN || argv[idx]->type == IPV4_PREFIX_TKN) && afi != AFI_IP)    { -    vty_outln (vty, -               "%% Cannot specify IPv4 address or prefix with IPv6 AFI"); +    vty_out (vty, +               "%% Cannot specify IPv4 address or prefix with IPv6 AFI\n");      return CMD_WARNING;    } @@ -8801,7 +8801,7 @@ bgp_show_regexp (struct vty *vty, const char *regstr, afi_t afi,    regex = bgp_regcomp (regstr);    if (! regex)      { -      vty_outln (vty, "Can't compile regexp %s", regstr); +      vty_out (vty, "Can't compile regexp %s\n", regstr);        return CMD_WARNING;      } @@ -8820,7 +8820,7 @@ bgp_show_prefix_list (struct vty *vty, struct bgp *bgp,    plist = prefix_list_lookup (afi, prefix_list_str);    if (plist == NULL)      { -      vty_outln (vty, "%% %s is not a valid prefix-list name", +      vty_out (vty, "%% %s is not a valid prefix-list name\n",                 prefix_list_str);	            return CMD_WARNING;      } @@ -8838,7 +8838,7 @@ bgp_show_filter_list (struct vty *vty, struct bgp *bgp,    as_list = as_list_lookup (filter);    if (as_list == NULL)      { -      vty_outln (vty, "%% %s is not a valid AS-path access-list name", +      vty_out (vty, "%% %s is not a valid AS-path access-list name\n",                   filter);	            return CMD_WARNING;      } @@ -8856,7 +8856,7 @@ bgp_show_route_map (struct vty *vty, struct bgp *bgp,    rmap = route_map_lookup_by_name (rmap_str);    if (! rmap)      { -      vty_outln (vty, "%% %s is not a valid route-map name", +      vty_out (vty, "%% %s is not a valid route-map name\n",  	       rmap_str);	            return CMD_WARNING;      } @@ -8898,7 +8898,7 @@ bgp_show_community (struct vty *vty, struct bgp *bgp, int argc,    XFREE (MTYPE_TMP, str);    if (! com)      { -      vty_outln (vty, "%% Community malformed: "); +      vty_out (vty, "%% Community malformed: \n");        return CMD_WARNING;      } @@ -8920,7 +8920,7 @@ bgp_show_community_list (struct vty *vty, struct bgp *bgp,    list = community_list_lookup (bgp_clist, com, COMMUNITY_LIST_MASTER);    if (list == NULL)      { -      vty_outln (vty, "%% %s is not a valid community-list name",com); +      vty_out (vty, "%% %s is not a valid community-list name\n",com);        return CMD_WARNING;      } @@ -8942,7 +8942,7 @@ bgp_show_prefix_longer (struct vty *vty, struct bgp *bgp,    ret = str2prefix (prefix, p);    if (! ret)      { -      vty_outln (vty, "%% Malformed Prefix"); +      vty_out (vty, "%% Malformed Prefix\n");        return CMD_WARNING;      } @@ -8975,11 +8975,11 @@ peer_lookup_in_view (struct vty *vty, struct bgp *bgp,                    json_object *json_no = NULL;                    json_no = json_object_new_object();                    json_object_string_add(json_no, "malformedAddressOrName", ip_str); -                  vty_outln (vty, "%s", json_object_to_json_string(json_no)); +                  vty_out (vty, "%s\n", json_object_to_json_string(json_no));                    json_object_free(json_no);                  }                else -                vty_outln (vty, "%% Malformed address or name: %s", ip_str); +                vty_out (vty, "%% Malformed address or name: %s\n", ip_str);                return NULL;              }          } @@ -8995,11 +8995,11 @@ peer_lookup_in_view (struct vty *vty, struct bgp *bgp,            json_object *json_no = NULL;            json_no = json_object_new_object();            json_object_string_add(json_no, "warning","No such neighbor"); -          vty_outln (vty, "%s", json_object_to_json_string(json_no)); +          vty_out (vty, "%s\n", json_object_to_json_string(json_no));            json_object_free(json_no);          }        else -        vty_outln (vty, "No such neighbor"); +        vty_out (vty, "No such neighbor\n");        return NULL;      } @@ -9177,7 +9177,7 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)    if (!bgp->rib[afi][safi])      { -      vty_outln (vty, "%% No RIB exist's for the AFI(%d)/SAFI(%d)", +      vty_out (vty, "%% No RIB exist's for the AFI(%d)/SAFI(%d)\n",  	       afi, safi);        return CMD_WARNING;      } @@ -9186,7 +9186,7 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)    ts.table = bgp->rib[afi][safi];    thread_execute (bm->master, bgp_table_stats_walker, &ts, 0); -  vty_outln (vty, "BGP %s RIB statistics%s", +  vty_out (vty, "BGP %s RIB statistics%s\n",             afi_safi_print (afi, safi), VTYNL);    for (i = 0; i < BGP_STATS_MAX; i++) @@ -9224,14 +9224,14 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)              break;            case BGP_STATS_SPACE:              vty_out (vty, "%-30s: ", table_stats_strs[i]); -            vty_outln (vty, "%12llu", ts.counts[i]); +            vty_out (vty, "%12llu\n", ts.counts[i]);              if (ts.counts[BGP_STATS_MAXBITLEN] < 9)                break;              vty_out (vty, "%30s: ", "%% announced "); -            vty_outln (vty, "%12.2f",  +            vty_out (vty, "%12.2f\n",                        100 * (float)ts.counts[BGP_STATS_SPACE] / (float)((uint64_t)1UL << ts.counts[BGP_STATS_MAXBITLEN]));              vty_out (vty, "%30s: ", "/8 equivalent "); -            vty_outln (vty, "%12.2f",  +            vty_out (vty, "%12.2f\n",                        (float)ts.counts[BGP_STATS_SPACE] / (float)(1UL << (ts.counts[BGP_STATS_MAXBITLEN] - 8)));              if (ts.counts[BGP_STATS_MAXBITLEN] < 25)                break; @@ -9369,11 +9369,11 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c        if (use_json)          {            json_object_string_add(json, "warning", "No such neighbor or address family"); -          vty_outln (vty, "%s", json_object_to_json_string(json)); +          vty_out (vty, "%s\n", json_object_to_json_string(json));            json_object_free(json);          }        else -        vty_outln (vty, "%% No such neighbor or address family"); +        vty_out (vty, "%% No such neighbor or address family\n");        return CMD_WARNING;      } @@ -9404,7 +9404,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c            json_object_string_add(json, "pfxctDriftFor", peer->host);            json_object_string_add(json, "recommended", "Please report this bug, with the above command output");          } -      vty_outln (vty, "%s", json_object_to_json_string(json)); +      vty_out (vty, "%s\n", json_object_to_json_string(json));        json_object_free(json);      }    else @@ -9412,28 +9412,28 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c        if (peer->hostname && bgp_flag_check(peer->bgp, BGP_FLAG_SHOW_HOSTNAME))          { -          vty_outln (vty, "Prefix counts for %s/%s, %s", +          vty_out (vty, "Prefix counts for %s/%s, %s\n",                     peer->hostname, peer->host,afi_safi_print(afi, safi));          }        else          { -          vty_outln (vty, "Prefix counts for %s, %s", +          vty_out (vty, "Prefix counts for %s, %s\n",                     peer->host, afi_safi_print(afi, safi));          } -      vty_outln (vty, "PfxCt: %ld", peer->pcount[afi][safi]); -      vty_outln (vty, "%sCounts from RIB table walk:%s", +      vty_out (vty, "PfxCt: %ld\n", peer->pcount[afi][safi]); +      vty_out (vty, "%sCounts from RIB table walk:%s\n",                 VTYNL, VTYNL);        for (i = 0; i < PCOUNT_MAX; i++) -        vty_outln (vty, "%20s: %-10d", pcount_strs[i], pcounts.count[i]); +        vty_out (vty, "%20s: %-10d\n", pcount_strs[i], pcounts.count[i]);        if (pcounts.count[PCOUNT_PFCNT] != peer->pcount[afi][safi])          { -          vty_outln (vty, "%s [pcount] PfxCt drift!", +          vty_out (vty, "%s [pcount] PfxCt drift!\n",                     peer->host); -          vty_outln (vty, -                     "Please report this bug, with the above command output"); +          vty_out (vty, +                     "Please report this bug, with the above command output\n");          }      } @@ -9522,7 +9522,7 @@ DEFUN (show_ip_bgp_vpn_all_route_prefix,    struct bgp *bgp = bgp_get_default();    if (!bgp)      { -      vty_outln (vty, "Can't find default instance"); +      vty_out (vty, "Can't find default instance\n");        return CMD_WARNING;      } @@ -9532,7 +9532,7 @@ DEFUN (show_ip_bgp_vpn_all_route_prefix,      network = argv[idx]->arg;    else      { -      vty_outln (vty, "Unable to figure out Network"); +      vty_out (vty, "Unable to figure out Network\n");        return CMD_WARNING;      } @@ -9562,7 +9562,7 @@ DEFUN (show_ip_bgp_l2vpn_evpn_all_route_prefix,      network = argv[idx]->arg;    else      { -      vty_outln (vty, "Unable to figure out Network"); +      vty_out (vty, "Unable to figure out Network\n");        return CMD_WARNING;      }    return bgp_show_route (vty, NULL, network, AFI_L2VPN, SAFI_EVPN, NULL, 0, BGP_PATH_ALL, use_json(argc, argv)); @@ -9619,11 +9619,11 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,        if (use_json)          {            json_object_string_add(json, "alert", "no BGP"); -          vty_outln (vty, "%s", json_object_to_json_string(json)); +          vty_out (vty, "%s\n", json_object_to_json_string(json));            json_object_free(json);          }        else -        vty_outln (vty, "%% No bgp"); +        vty_out (vty, "%% No bgp\n");        return;      } @@ -9649,7 +9649,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,            vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);            vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL); -          vty_outln (vty, "Originating default network 0.0.0.0%s", +          vty_out (vty, "Originating default network 0.0.0.0%s\n",                     VTYNL);          }        header1 = 0; @@ -9675,7 +9675,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,                          }                        else                          { -                          vty_outln (vty, "BGP table version is 0, local router ID is %s", +                          vty_out (vty, "BGP table version is 0, local router ID is %s\n",                                       inet_ntoa(bgp->router_id));                            vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);                            vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL); @@ -9757,12 +9757,12 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,        if (use_json)          json_object_int_add(json, "totalPrefixCounter", output_count);        else -        vty_outln (vty, "%sTotal number of prefixes %ld", +        vty_out (vty, "%sTotal number of prefixes %ld\n",                   VTYNL, output_count);      }    if (use_json)      { -      vty_outln (vty, "%s", json_object_to_json_string(json)); +      vty_out (vty, "%s\n", json_object_to_json_string(json));        json_object_free(json);      } @@ -9782,11 +9782,11 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,        if (use_json)          {            json_object_string_add(json, "warning", "No such neighbor or address family"); -          vty_outln (vty, "%s", json_object_to_json_string(json)); +          vty_out (vty, "%s\n", json_object_to_json_string(json));            json_object_free(json);          }        else -        vty_outln (vty, "%% No such neighbor or address family"); +        vty_out (vty, "%% No such neighbor or address family\n");        return CMD_WARNING;      } @@ -9796,11 +9796,11 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,        if (use_json)          {            json_object_string_add(json, "warning", "Inbound soft reconfiguration not enabled"); -          vty_outln (vty, "%s", json_object_to_json_string(json)); +          vty_out (vty, "%s\n", json_object_to_json_string(json));            json_object_free(json);          }        else -        vty_outln (vty, "%% Inbound soft reconfiguration not enabled"); +        vty_out (vty, "%% Inbound soft reconfiguration not enabled\n");        return CMD_WARNING;      } @@ -9914,9 +9914,9 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter,        if (! peer)          {            if (uj) -            vty_outln (vty, "{}"); +            vty_out (vty, "{}\n");            else -            vty_outln (vty, "%% Malformed address or name: %s", peerstr); +            vty_out (vty, "%% Malformed address or name: %s\n", peerstr);            return CMD_WARNING;          }      } @@ -9926,9 +9926,9 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter,        if (! peer)          {            if (uj) -            vty_outln (vty, "{}"); +            vty_out (vty, "{}\n");            else -            vty_outln (vty, "No peer"); +            vty_out (vty, "No peer\n");            return CMD_WARNING;          }      } @@ -9938,15 +9938,15 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter,    if (count)      {        if (!uj) -        vty_outln (vty, "Address Family: %s", afi_safi_print(afi, safi)); +        vty_out (vty, "Address Family: %s\n", afi_safi_print(afi, safi));        prefix_bgp_show_prefix_list (vty, afi, name, uj);      }    else      {        if (uj) -        vty_outln (vty, "{}"); +        vty_out (vty, "{}\n");        else -        vty_outln (vty, "No functional output"); +        vty_out (vty, "No functional output\n");      }    return CMD_SUCCESS; @@ -9963,11 +9963,11 @@ bgp_show_neighbor_route (struct vty *vty, struct peer *peer, afi_t afi,            json_object *json_no = NULL;            json_no = json_object_new_object();            json_object_string_add(json_no, "warning", "No such neighbor or address family"); -          vty_outln (vty, "%s", json_object_to_json_string(json_no)); +          vty_out (vty, "%s\n", json_object_to_json_string(json_no));            json_object_free(json_no);          }        else -        vty_outln (vty, "%% No such neighbor or address family"); +        vty_out (vty, "%% No such neighbor or address family\n");        return CMD_WARNING;      } @@ -10016,7 +10016,7 @@ DEFUN (show_ip_bgp_neighbor_routes,    peer = peer_lookup_in_view (vty, bgp, peerstr, uj);    if (! peer)      { -      vty_outln (vty, "No such neighbor"); +      vty_out (vty, "No such neighbor\n");        return CMD_WARNING;      } @@ -10063,7 +10063,7 @@ DEFUN (show_bgp_afi_vpn_rd_route,    ret = str2prefix_rd (argv[5]->arg, &prd);    if (! ret)      { -      vty_outln (vty, "%% Malformed Route Distinguisher"); +      vty_out (vty, "%% Malformed Route Distinguisher\n");        return CMD_WARNING;      }    return bgp_show_route (vty, NULL, argv[6]->arg, afi, SAFI_MPLS_VPN, &prd, 0, BGP_PATH_ALL, use_json (argc, argv)); @@ -10099,7 +10099,7 @@ bgp_distance_set (struct vty *vty, const char *distance_str,    ret = str2prefix (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      } @@ -10151,14 +10151,14 @@ bgp_distance_unset (struct vty *vty, const char *distance_str,    ret = str2prefix (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      }    rn = bgp_node_lookup (bgp_distance_table[afi][safi], (struct prefix *)&p);    if (! rn)      { -      vty_outln (vty, "Can't find specified prefix"); +      vty_out (vty, "Can't find specified prefix\n");        return CMD_WARNING;      } @@ -10167,7 +10167,7 @@ bgp_distance_unset (struct vty *vty, const char *distance_str,    if (bdistance->distance != distance)      { -       vty_outln (vty, "Distance does not match configured"); +       vty_out (vty, "Distance does not match configured\n");         return CMD_WARNING;      } @@ -10437,7 +10437,7 @@ DEFUN (bgp_damp_set,    if (suppress < reuse)      { -      vty_outln (vty,"Suppress value cannot be less than reuse value "); +      vty_out (vty,"Suppress value cannot be less than reuse value \n");        return 0;      } @@ -10481,7 +10481,7 @@ bgp_clear_damp_route (struct vty *vty, const char *view_name,        bgp = bgp_lookup_by_name (view_name);        if (bgp == NULL)  	{ -	  vty_outln (vty, "%% Can't find BGP instance %s", view_name); +	  vty_out (vty, "%% Can't find BGP instance %s\n", view_name);  	  return CMD_WARNING;  	}      } @@ -10490,7 +10490,7 @@ bgp_clear_damp_route (struct vty *vty, const char *view_name,        bgp = bgp_get_default ();        if (bgp == NULL)  	{ -	  vty_outln (vty, "%% No BGP process is configured"); +	  vty_out (vty, "%% No BGP process is configured\n");  	  return CMD_WARNING;  	}      } @@ -10499,7 +10499,7 @@ bgp_clear_damp_route (struct vty *vty, const char *view_name,    ret = str2prefix (ip_str, &match);    if (! ret)      { -      vty_outln (vty, "%% address is malformed"); +      vty_out (vty, "%% address is malformed\n");        return CMD_WARNING;      } @@ -10620,7 +10620,7 @@ DEFUN (clear_ip_bgp_dampening_address_mask,    ret = netmask_str2prefix_str (argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, prefix_str);    if (! ret)      { -      vty_outln (vty, "%% Inconsistent address and mask"); +      vty_out (vty, "%% Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -10850,7 +10850,7 @@ bgp_config_write_distance (struct vty *vty, struct bgp *bgp, afi_t afi,  	  || bgp->distance_local[afi][safi] != ZEBRA_IBGP_DISTANCE_DEFAULT))      {        bgp_config_write_family_header (vty, afi, safi, write); -      vty_outln (vty, "  distance bgp %d %d %d", +      vty_out (vty, "  distance bgp %d %d %d\n",  	       bgp->distance_ebgp[afi][safi], bgp->distance_ibgp[afi][safi],  	       bgp->distance_local[afi][safi]);      } @@ -10862,7 +10862,7 @@ bgp_config_write_distance (struct vty *vty, struct bgp *bgp, afi_t afi,  	char buf[PREFIX_STRLEN];  	bgp_config_write_family_header (vty, afi, safi, write); -	vty_outln (vty, "  distance %d %s %s", bdistance->distance, +	vty_out (vty, "  distance %d %s %s\n", bdistance->distance,  		 prefix2str (&rn->p, buf, sizeof (buf)),  		 bdistance->access_list ? bdistance->access_list : "");        } diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index f2c94371a4..7f535388bb 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -2851,10 +2851,10 @@ bgp_route_match_add (struct vty *vty,        switch (ret)  	{  	case RMAP_RULE_MISSING: -	  vty_outln (vty, "%% BGP Can't find rule."); +	  vty_out (vty, "%% BGP Can't find rule.\n");  	  return CMD_WARNING;  	case RMAP_COMPILE_ERROR: -	  vty_outln (vty, "%% BGP Argument is malformed."); +	  vty_out (vty, "%% BGP Argument is malformed.\n");  	  return CMD_WARNING;  	}      } @@ -2900,10 +2900,10 @@ bgp_route_match_delete (struct vty *vty,        switch (ret)  	{  	case RMAP_RULE_MISSING: -	  vty_outln (vty, "%% BGP Can't find rule."); +	  vty_out (vty, "%% BGP Can't find rule.\n");  	  break;  	case RMAP_COMPILE_ERROR: -	  vty_outln (vty, "%% BGP Argument is malformed."); +	  vty_out (vty, "%% BGP Argument is malformed.\n");  	  break;  	}        if (dep_name) @@ -3886,7 +3886,7 @@ DEFUN (set_community,    /* Can't compile user input into communities attribute.  */    if (! com)      { -      vty_outln (vty, "%% Malformed communities attribute"); +      vty_out (vty, "%% Malformed communities attribute\n");        return CMD_WARNING;      } @@ -4210,7 +4210,7 @@ DEFUN (set_aggregator_as,    ret = inet_aton (argv[idx_ipv4]->arg, &address);    if (ret == 0)      { -      vty_outln (vty, "Aggregator IP address is invalid"); +      vty_out (vty, "Aggregator IP address is invalid\n");        return CMD_WARNING;      } @@ -4251,7 +4251,7 @@ DEFUN (no_set_aggregator_as,    ret = inet_aton (argv[idx_ip]->arg, &address);    if (ret == 0)      { -      vty_outln (vty, "Aggregator IP address is invalid"); +      vty_out (vty, "Aggregator IP address is invalid\n");        return CMD_WARNING;      } @@ -4362,7 +4362,7 @@ DEFUN (set_ipv6_nexthop_global,    ret = inet_pton (AF_INET6, argv[idx_ipv6]->arg, &addr);    if (!ret)      { -      vty_outln (vty, "%% Malformed nexthop address"); +      vty_out (vty, "%% Malformed nexthop address\n");        return CMD_WARNING;      }    if (IN6_IS_ADDR_UNSPECIFIED(&addr) || @@ -4370,7 +4370,7 @@ DEFUN (set_ipv6_nexthop_global,        IN6_IS_ADDR_MULTICAST(&addr)   ||        IN6_IS_ADDR_LINKLOCAL(&addr))      { -      vty_outln (vty, "%% Invalid global nexthop address"); +      vty_out (vty, "%% Invalid global nexthop address\n");        return CMD_WARNING;      } diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 722eed91c0..78e5b86be5 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -568,13 +568,13 @@ update_group_show_walkcb (struct update_group *updgrp, void *arg)    vty_out (vty, "  Created: %s", timestamp_string (updgrp->uptime));    filter = &updgrp->conf->filter[updgrp->afi][updgrp->safi];    if (filter->map[RMAP_OUT].name) -    vty_outln (vty, "  Outgoing route map: %s%s", +    vty_out (vty, "  Outgoing route map: %s%s\n",  	     filter->map[RMAP_OUT].map ? "X" : "",  	     filter->map[RMAP_OUT].name); -  vty_outln (vty, "  MRAI value (seconds): %d", +  vty_out (vty, "  MRAI value (seconds): %d\n",  	   updgrp->conf->v_routeadv);    if (updgrp->conf->change_local_as) -    vty_outln (vty, "  Local AS %u%s%s", +    vty_out (vty, "  Local AS %u%s%s\n",               updgrp->conf->change_local_as,               CHECK_FLAG (updgrp->conf->flags,                       PEER_FLAG_LOCAL_AS_NO_PREPEND) ?  " no-prepend" : "", @@ -596,37 +596,37 @@ update_group_show_walkcb (struct update_group *updgrp, void *arg)  		 subgrp->split_from.subgroup_id);        } -    vty_outln (vty, "    Join events: %u", subgrp->join_events); -    vty_outln (vty, "    Prune events: %u", +    vty_out (vty, "    Join events: %u\n", subgrp->join_events); +    vty_out (vty, "    Prune events: %u\n",  	     subgrp->prune_events); -    vty_outln (vty, "    Merge events: %u", +    vty_out (vty, "    Merge events: %u\n",  	     subgrp->merge_events); -    vty_outln (vty, "    Split events: %u", +    vty_out (vty, "    Split events: %u\n",  	     subgrp->split_events); -    vty_outln (vty, "    Update group switch events: %u", +    vty_out (vty, "    Update group switch events: %u\n",  	     subgrp->updgrp_switch_events); -    vty_outln (vty, "    Peer refreshes combined: %u", +    vty_out (vty, "    Peer refreshes combined: %u\n",  	     subgrp->peer_refreshes_combined); -    vty_outln (vty, "    Merge checks triggered: %u", +    vty_out (vty, "    Merge checks triggered: %u\n",  	     subgrp->merge_checks_triggered);      vty_outln (vty, "    Version: %" PRIu64 "", subgrp->version); -    vty_outln (vty, "    Packet queue length: %d", +    vty_out (vty, "    Packet queue length: %d\n",  	     bpacket_queue_length(SUBGRP_PKTQ(subgrp))); -    vty_outln (vty, "    Total packets enqueued: %u", +    vty_out (vty, "    Total packets enqueued: %u\n",  	     subgroup_total_packets_enqueued(subgrp)); -    vty_outln (vty, "    Packet queue high watermark: %d", +    vty_out (vty, "    Packet queue high watermark: %d\n",  	     bpacket_queue_hwm_length(SUBGRP_PKTQ(subgrp))); -    vty_outln (vty, "    Adj-out list count: %u", +    vty_out (vty, "    Adj-out list count: %u\n",  	     subgrp->adj_count); -    vty_outln (vty, "    Advertise list: %s", +    vty_out (vty, "    Advertise list: %s\n",  	     advertise_list_is_empty(subgrp) ? "empty" : "not empty"); -    vty_outln (vty, "    Flags: %s", +    vty_out (vty, "    Flags: %s\n",  	     CHECK_FLAG(subgrp->flags, SUBGRP_FLAG_NEEDS_REFRESH) ? "R" : "");      if (subgrp->peer_count > 0)        { -	vty_outln (vty, "    Peers:"); +	vty_out (vty, "    Peers:\n");  	SUBGRP_FOREACH_PEER (subgrp, paf) -	  vty_outln (vty, "      - %s", paf->peer->host); +	  vty_out (vty, "      - %s\n", paf->peer->host);        }    }    return UPDWALK_CONTINUE; @@ -1597,27 +1597,27 @@ update_group_show (struct bgp *bgp, afi_t afi, safi_t safi, struct vty *vty,  void  update_group_show_stats (struct bgp *bgp, struct vty *vty)  { -  vty_outln (vty, "Update groups created: %u", +  vty_out (vty, "Update groups created: %u\n",  	   bgp->update_group_stats.updgrps_created); -  vty_outln (vty, "Update groups deleted: %u", +  vty_out (vty, "Update groups deleted: %u\n",  	   bgp->update_group_stats.updgrps_deleted); -  vty_outln (vty, "Update subgroups created: %u", +  vty_out (vty, "Update subgroups created: %u\n",  	   bgp->update_group_stats.subgrps_created); -  vty_outln (vty, "Update subgroups deleted: %u", +  vty_out (vty, "Update subgroups deleted: %u\n",  	   bgp->update_group_stats.subgrps_deleted); -  vty_outln (vty, "Join events: %u", +  vty_out (vty, "Join events: %u\n",  	   bgp->update_group_stats.join_events); -  vty_outln (vty, "Prune events: %u", +  vty_out (vty, "Prune events: %u\n",  	   bgp->update_group_stats.prune_events); -  vty_outln (vty, "Merge events: %u", +  vty_out (vty, "Merge events: %u\n",  	   bgp->update_group_stats.merge_events); -  vty_outln (vty, "Split events: %u", +  vty_out (vty, "Split events: %u\n",  	   bgp->update_group_stats.split_events); -  vty_outln (vty, "Update group switch events: %u", +  vty_out (vty, "Update group switch events: %u\n",  	   bgp->update_group_stats.updgrp_switch_events); -  vty_outln (vty, "Peer route refreshes combined: %u", +  vty_out (vty, "Peer route refreshes combined: %u\n",  	   bgp->update_group_stats.peer_refreshes_combined); -  vty_outln (vty, "Merge checks triggered: %u", +  vty_out (vty, "Merge checks triggered: %u\n",  	   bgp->update_group_stats.merge_checks_triggered);  } diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c index c4cb8ae1b3..02de6a1c1c 100644 --- a/bgpd/bgp_updgrp_adv.c +++ b/bgpd/bgp_updgrp_adv.c @@ -250,7 +250,7 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,  	    }  	}    if (output_count != 0) -    vty_outln (vty, "%sTotal number of prefixes %ld", +    vty_out (vty, "%sTotal number of prefixes %ld\n",  	     VTYNL, output_count);  } diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index dff46a9466..69debf7a41 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -392,12 +392,12 @@ bpacket_queue_show_vty (struct bpacket_queue *q, struct vty *vty)    pkt = bpacket_queue_first (q);    while (pkt)      { -      vty_outln (vty, "  Packet %p ver %u buffer %p", pkt, pkt->ver, +      vty_out (vty, "  Packet %p ver %u buffer %p\n", pkt, pkt->ver,  	       pkt->buffer);        LIST_FOREACH (paf, &(pkt->peers), pkt_train)        { -	vty_outln (vty, "      - %s", paf->peer->host); +	vty_out (vty, "      - %s\n", paf->peer->host);        }        pkt = bpacket_next (pkt);      } diff --git a/bgpd/bgp_vpn.c b/bgpd/bgp_vpn.c index 3e62243957..a2665b67b9 100644 --- a/bgpd/bgp_vpn.c +++ b/bgpd/bgp_vpn.c @@ -51,7 +51,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,    if (bgp == NULL)      {        if (!use_json) -        vty_outln (vty, "No BGP process is configured"); +        vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -104,11 +104,11 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,                          }                        else                          { -                          vty_outln (vty, "BGP table version is 0, local router ID is %s", +                          vty_out (vty, "BGP table version is 0, local router ID is %s\n",                                     inet_ntoa(bgp->router_id)); -                          vty_outln (vty, -                                     "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal"); -                          vty_outln (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s", +                          vty_out (vty, +                                     "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n"); +                          vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",                                     VTYNL);                            vty_outln (vty, V4_HEADER);                          } @@ -191,7 +191,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,    if (use_json)      {        json_object_object_add(json, "routes", json_routes); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      } diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 83135fb5dc..4aa9922bab 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1012,7 +1012,7 @@ DEFPY (no_bgp_router_id,      {        if (! IPV4_ADDR_SAME (&bgp->router_id_static, &router_id))  	{ -	  vty_outln (vty, "%% BGP router-id doesn't match"); +	  vty_out (vty, "%% BGP router-id doesn't match\n");  	  return CMD_WARNING;  	}      } diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index d7ddd5db8a..ca948b2f17 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -6639,22 +6639,22 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,          {            if (peer->as_type == AS_SPECIFIED)              { -              vty_outln (vty, " neighbor %s remote-as %u", addr,peer->as); +              vty_out (vty, " neighbor %s remote-as %u\n", addr,peer->as);              }            else if (peer->as_type == AS_INTERNAL)              { -              vty_outln (vty, " neighbor %s remote-as internal", addr); +              vty_out (vty, " neighbor %s remote-as internal\n", addr);              }            else if (peer->as_type == AS_EXTERNAL)              { -              vty_outln (vty, " neighbor %s remote-as external", addr); +              vty_out (vty, " neighbor %s remote-as external\n", addr);              }          }        /* For swpX peers we displayed the peer-group         * via 'neighbor swpX interface peer-group WORD' */        if (!if_pg_printed) -          vty_outln (vty, " neighbor %s peer-group %s", addr, +          vty_out (vty, " neighbor %s peer-group %s\n", addr,                     peer->group->name);      } @@ -6664,22 +6664,22 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        /* peer is a peer-group, declare the peer-group */        if (CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP))          { -          vty_outln (vty, " neighbor %s peer-group",addr); +          vty_out (vty, " neighbor %s peer-group\n",addr);          }        if (!if_ras_printed)          {            if (peer->as_type == AS_SPECIFIED)              { -              vty_outln (vty, " neighbor %s remote-as %u", addr,peer->as); +              vty_out (vty, " neighbor %s remote-as %u\n", addr,peer->as);              }            else if (peer->as_type == AS_INTERNAL)              { -              vty_outln (vty, " neighbor %s remote-as internal", addr); +              vty_out (vty, " neighbor %s remote-as internal\n", addr);              }            else if (peer->as_type == AS_EXTERNAL)              { -              vty_outln (vty, " neighbor %s remote-as external", addr); +              vty_out (vty, " neighbor %s remote-as external\n", addr);              }          }      } @@ -6694,7 +6694,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,            || (CHECK_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_REPLACE_AS) !=                CHECK_FLAG (g_peer->flags, PEER_FLAG_LOCAL_AS_REPLACE_AS)))          { -          vty_outln (vty, " neighbor %s local-as %u%s%s", addr, +          vty_out (vty, " neighbor %s local-as %u%s%s\n", addr,                     peer->change_local_as,                     CHECK_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_NO_PREPEND) ?                     " no-prepend" : "", @@ -6705,7 +6705,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,    /* description */    if (peer->desc)      { -      vty_outln (vty, " neighbor %s description %s", addr,peer->desc); +      vty_out (vty, " neighbor %s description %s\n", addr,peer->desc);      }    /* shutdown */ @@ -6716,10 +6716,10 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,            peer->tx_shutdown_message)          {            if (peer->tx_shutdown_message) -            vty_outln (vty, " neighbor %s shutdown message %s", addr, +            vty_out (vty, " neighbor %s shutdown message %s\n", addr,                       peer->tx_shutdown_message);            else -            vty_outln (vty, " neighbor %s shutdown", addr); +            vty_out (vty, " neighbor %s shutdown\n", addr);          }      } @@ -6739,7 +6739,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,            || ! g_peer->password            || strcmp (peer->password, g_peer->password) != 0)          { -          vty_outln (vty, " neighbor %s password %s", addr,peer->password); +          vty_out (vty, " neighbor %s password %s\n", addr,peer->password);          }      } @@ -6748,20 +6748,20 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,      {        if (!peer_group_active (peer))          { -          vty_outln (vty, " neighbor %s solo", addr); +          vty_out (vty, " neighbor %s solo\n", addr);          }      }    /* BGP port */    if (peer->port != BGP_PORT_DEFAULT)      { -      vty_outln (vty, " neighbor %s port %d", addr,peer->port); +      vty_out (vty, " neighbor %s port %d\n", addr,peer->port);      }    /* Local interface name */    if (peer->ifname)      { -      vty_outln (vty, " neighbor %s interface %s", addr,peer->ifname); +      vty_out (vty, " neighbor %s interface %s\n", addr,peer->ifname);      }    /* passive */ @@ -6770,7 +6770,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_PASSIVE))          { -          vty_outln (vty, " neighbor %s passive", addr); +          vty_out (vty, " neighbor %s passive\n", addr);          }      } @@ -6780,7 +6780,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,      {        if (! peer_group_active (peer) || g_peer->ttl != peer->ttl)          { -          vty_outln (vty, " neighbor %s ebgp-multihop %d", addr,peer->ttl); +          vty_out (vty, " neighbor %s ebgp-multihop %d\n", addr,peer->ttl);          }      } @@ -6789,7 +6789,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,      {        if (! peer_group_active (peer) || g_peer->gtsm_hops != peer->gtsm_hops)          { -          vty_outln (vty, " neighbor %s ttl-security hops %d", addr, +          vty_out (vty, " neighbor %s ttl-security hops %d\n", addr,                     peer->gtsm_hops);          }      } @@ -6800,7 +6800,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))          { -          vty_outln (vty, " neighbor %s disable-connected-check", addr); +          vty_out (vty, " neighbor %s disable-connected-check\n", addr);          }      } @@ -6810,7 +6810,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) || ! g_peer->update_if            || strcmp (g_peer->update_if, peer->update_if) != 0)          { -          vty_outln (vty, " neighbor %s update-source %s", addr, +          vty_out (vty, " neighbor %s update-source %s\n", addr,                     peer->update_if);          }      } @@ -6820,7 +6820,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,            || sockunion_cmp (g_peer->update_source,                              peer->update_source) != 0)          { -          vty_outln (vty, " neighbor %s update-source %s", addr, +          vty_out (vty, " neighbor %s update-source %s\n", addr,                     sockunion2str(peer->update_source, buf, SU_ADDRSTRLEN));          }      } @@ -6830,7 +6830,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        ((! peer_group_active (peer) && peer->v_routeadv != BGP_DEFAULT_EBGP_ROUTEADV) ||         (peer_group_active (peer) && peer->v_routeadv != g_peer->v_routeadv)))      { -      vty_outln (vty, " neighbor %s advertisement-interval %u", +      vty_out (vty, " neighbor %s advertisement-interval %u\n",                 addr, peer->v_routeadv);      } @@ -6839,7 +6839,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        ((! peer_group_active (peer) && (peer->keepalive != BGP_DEFAULT_KEEPALIVE || peer->holdtime != BGP_DEFAULT_HOLDTIME)) ||         (peer_group_active (peer) && (peer->keepalive != g_peer->keepalive || peer->holdtime != g_peer->holdtime))))      { -      vty_outln (vty, " neighbor %s timers %u %u", addr, +      vty_out (vty, " neighbor %s timers %u %u\n", addr,                 peer->keepalive, peer->holdtime);      } @@ -6848,7 +6848,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,         (peer_group_active (peer) && peer->connect != g_peer->connect)))      { -      vty_outln (vty, " neighbor %s timers connect %u", addr, +      vty_out (vty, " neighbor %s timers connect %u\n", addr,                 peer->connect);      } @@ -6858,7 +6858,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_DYNAMIC_CAPABILITY))          { -          vty_outln (vty, " neighbor %s capability dynamic",addr); +          vty_out (vty, " neighbor %s capability dynamic\n",addr);          }      } @@ -6868,7 +6868,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_CAPABILITY_ENHE))          { -          vty_outln (vty, " no neighbor %s capability extended-nexthop", +          vty_out (vty, " no neighbor %s capability extended-nexthop\n",                       addr);          }      } @@ -6878,7 +6878,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_CAPABILITY_ENHE))          { -          vty_outln (vty, " neighbor %s capability extended-nexthop",addr); +          vty_out (vty, " neighbor %s capability extended-nexthop\n",addr);          }      } @@ -6888,7 +6888,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_DONT_CAPABILITY))          { -          vty_outln (vty, " neighbor %s dont-capability-negotiate",addr); +          vty_out (vty, " neighbor %s dont-capability-negotiate\n",addr);          }      } @@ -6898,7 +6898,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_OVERRIDE_CAPABILITY))          { -          vty_outln (vty, " neighbor %s override-capability",addr); +          vty_out (vty, " neighbor %s override-capability\n",addr);          }      } @@ -6908,7 +6908,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,        if (! peer_group_active (peer) ||            ! CHECK_FLAG (g_peer->flags, PEER_FLAG_STRICT_CAP_MATCH))          { -          vty_outln (vty, " neighbor %s strict-capability-match",addr); +          vty_out (vty, " neighbor %s strict-capability-match\n",addr);          }      }  } @@ -7368,7 +7368,7 @@ bgp_config_write_family (struct vty *vty, struct bgp *bgp, afi_t afi,    bgp_config_write_table_map (vty, bgp, afi, safi, &write);    if (write) -    vty_outln (vty, " exit-address-family"); +    vty_out (vty, " exit-address-family\n");    return write;  } @@ -7386,25 +7386,25 @@ bgp_config_write (struct vty *vty)    /* BGP Multiple instance. */    if (!bgp_option_check (BGP_OPT_MULTIPLE_INSTANCE))      {     -      vty_outln (vty, "no bgp multiple-instance"); +      vty_out (vty, "no bgp multiple-instance\n");        write++;      }    /* BGP Config type. */    if (bgp_option_check (BGP_OPT_CONFIG_CISCO))      {     -      vty_outln (vty, "bgp config-type cisco"); +      vty_out (vty, "bgp config-type cisco\n");        write++;      }    if (bm->rmap_update_timer != RMAP_DEFAULT_UPDATE_TIMER) -    vty_outln (vty, "bgp route-map delay-timer %u",bm->rmap_update_timer); +    vty_out (vty, "bgp route-map delay-timer %u\n",bm->rmap_update_timer);    /* BGP configuration. */    for (ALL_LIST_ELEMENTS (bm->bgp, mnode, mnnode, bgp))      {        if (write) -	vty_outln (vty, "!"); +	vty_out (vty, "!\n");        /* Router bgp ASN */        vty_out (vty, "router bgp %u", bgp->as); @@ -7420,62 +7420,62 @@ bgp_config_write (struct vty *vty)        /* No Synchronization */        if (bgp_option_check (BGP_OPT_CONFIG_CISCO)) -	vty_outln (vty, " no synchronization"); +	vty_out (vty, " no synchronization\n");        /* BGP fast-external-failover. */        if (CHECK_FLAG (bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) -	vty_outln (vty, " no bgp fast-external-failover");  +	vty_out (vty, " no bgp fast-external-failover\n");         /* BGP router ID. */        if (bgp->router_id_static.s_addr != 0) -	vty_outln (vty, " bgp router-id %s", +	vty_out (vty, " bgp router-id %s\n",                   inet_ntoa(bgp->router_id_static));        /* BGP log-neighbor-changes. */        if (!!bgp_flag_check (bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)            != DFLT_BGP_LOG_NEIGHBOR_CHANGES) -        vty_outln (vty, " %sbgp log-neighbor-changes", +        vty_out (vty, " %sbgp log-neighbor-changes\n",                   bgp_flag_check(bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES) ? "" : "no ");        /* BGP configuration. */        if (bgp_flag_check (bgp, BGP_FLAG_ALWAYS_COMPARE_MED)) -	vty_outln (vty, " bgp always-compare-med"); +	vty_out (vty, " bgp always-compare-med\n");        /* BGP default ipv4-unicast. */        if (bgp_flag_check (bgp, BGP_FLAG_NO_DEFAULT_IPV4)) -	vty_outln (vty, " no bgp default ipv4-unicast"); +	vty_out (vty, " no bgp default ipv4-unicast\n");        /* BGP default local-preference. */        if (bgp->default_local_pref != BGP_DEFAULT_LOCAL_PREF) -	vty_outln (vty, " bgp default local-preference %u", +	vty_out (vty, " bgp default local-preference %u\n",  		 bgp->default_local_pref);        /* BGP default show-hostname */        if (!!bgp_flag_check(bgp, BGP_FLAG_SHOW_HOSTNAME)            != DFLT_BGP_SHOW_HOSTNAME) -        vty_outln (vty, " %sbgp default show-hostname", +        vty_out (vty, " %sbgp default show-hostname\n",                   bgp_flag_check(bgp, BGP_FLAG_SHOW_HOSTNAME) ? "" : "no ");        /* BGP default subgroup-pkt-queue-max. */        if (bgp->default_subgroup_pkt_queue_max != BGP_DEFAULT_SUBGROUP_PKT_QUEUE_MAX) -	vty_outln (vty, " bgp default subgroup-pkt-queue-max %u", +	vty_out (vty, " bgp default subgroup-pkt-queue-max %u\n",  		 bgp->default_subgroup_pkt_queue_max);        /* BGP client-to-client reflection. */        if (bgp_flag_check (bgp, BGP_FLAG_NO_CLIENT_TO_CLIENT)) -	vty_outln (vty, " no bgp client-to-client reflection"); +	vty_out (vty, " no bgp client-to-client reflection\n");        /* BGP cluster ID. */        if (CHECK_FLAG (bgp->config, BGP_CONFIG_CLUSTER_ID)) -	vty_outln (vty, " bgp cluster-id %s",inet_ntoa(bgp->cluster_id)); +	vty_out (vty, " bgp cluster-id %s\n",inet_ntoa(bgp->cluster_id));        /* Disable ebgp connected nexthop check */        if (bgp_flag_check (bgp, BGP_FLAG_DISABLE_NH_CONNECTED_CHK)) -	vty_outln (vty, " bgp disable-ebgp-connected-route-check"); +	vty_out (vty, " bgp disable-ebgp-connected-route-check\n");        /* Confederation identifier*/        if (CHECK_FLAG (bgp->config, BGP_CONFIG_CONFEDERATION)) -       vty_outln (vty, " bgp confederation identifier %i",bgp->confed_id); +       vty_out (vty, " bgp confederation identifier %i\n",bgp->confed_id);        /* Confederation peer */        if (bgp->confed_peers_cnt > 0) @@ -7492,12 +7492,12 @@ bgp_config_write (struct vty *vty)        /* BGP enforce-first-as. */        if (bgp_flag_check (bgp, BGP_FLAG_ENFORCE_FIRST_AS)) -	vty_outln (vty, " bgp enforce-first-as"); +	vty_out (vty, " bgp enforce-first-as\n");        /* BGP deterministic-med. */        if (!!bgp_flag_check (bgp, BGP_FLAG_DETERMINISTIC_MED)            != DFLT_BGP_DETERMINISTIC_MED) -        vty_outln (vty, " %sbgp deterministic-med", +        vty_out (vty, " %sbgp deterministic-med\n",                   bgp_flag_check(bgp, BGP_FLAG_DETERMINISTIC_MED) ? "" : "no ");        /* BGP update-delay. */ @@ -7526,42 +7526,42 @@ bgp_config_write (struct vty *vty)        /* BGP graceful-restart. */        if (bgp->stalepath_time != BGP_DEFAULT_STALEPATH_TIME) -	vty_outln (vty, " bgp graceful-restart stalepath-time %u", +	vty_out (vty, " bgp graceful-restart stalepath-time %u\n",  		 bgp->stalepath_time);        if (bgp->restart_time != BGP_DEFAULT_RESTART_TIME) -	vty_outln (vty, " bgp graceful-restart restart-time %u", +	vty_out (vty, " bgp graceful-restart restart-time %u\n",  		 bgp->restart_time);        if (bgp_flag_check (bgp, BGP_FLAG_GRACEFUL_RESTART)) -       vty_outln (vty, " bgp graceful-restart"); +       vty_out (vty, " bgp graceful-restart\n");        /* BGP graceful-restart Preserve State F bit. */        if (bgp_flag_check (bgp, BGP_FLAG_GR_PRESERVE_FWD)) -       vty_outln (vty, " bgp graceful-restart preserve-fw-state"); +       vty_out (vty, " bgp graceful-restart preserve-fw-state\n");        /* BGP bestpath method. */        if (bgp_flag_check (bgp, BGP_FLAG_ASPATH_IGNORE)) -	vty_outln (vty, " bgp bestpath as-path ignore"); +	vty_out (vty, " bgp bestpath as-path ignore\n");        if (bgp_flag_check (bgp, BGP_FLAG_ASPATH_CONFED)) -	vty_outln (vty, " bgp bestpath as-path confed"); +	vty_out (vty, " bgp bestpath as-path confed\n");        if (bgp_flag_check (bgp, BGP_FLAG_ASPATH_MULTIPATH_RELAX))          {            if (bgp_flag_check (bgp, BGP_FLAG_MULTIPATH_RELAX_AS_SET))              { -              vty_outln (vty, -                         " bgp bestpath as-path multipath-relax as-set"); +              vty_out (vty, +                         " bgp bestpath as-path multipath-relax as-set\n");              }            else              { -              vty_outln (vty, " bgp bestpath as-path multipath-relax"); +              vty_out (vty, " bgp bestpath as-path multipath-relax\n");              }          }        if (bgp_flag_check (bgp, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY)) { -	vty_outln (vty," bgp route-reflector allow-outbound-policy"); +	vty_out (vty," bgp route-reflector allow-outbound-policy\n");        }        if (bgp_flag_check (bgp, BGP_FLAG_COMPARE_ROUTER_ID)) -	vty_outln (vty, " bgp bestpath compare-routerid"); +	vty_out (vty, " bgp bestpath compare-routerid\n");        if (bgp_flag_check (bgp, BGP_FLAG_MED_CONFED)  	  || bgp_flag_check (bgp, BGP_FLAG_MED_MISSING_AS_WORST))  	{ @@ -7576,7 +7576,7 @@ bgp_config_write (struct vty *vty)        /* BGP network import check. */        if (!!bgp_flag_check (bgp, BGP_FLAG_IMPORT_CHECK)            != DFLT_BGP_IMPORT_CHECK) -        vty_outln (vty, " %sbgp network import-check", +        vty_out (vty, " %sbgp network import-check\n",                   bgp_flag_check(bgp, BGP_FLAG_IMPORT_CHECK) ? "" : "no ");        /* BGP flag dampening. */ @@ -7587,7 +7587,7 @@ bgp_config_write (struct vty *vty)        /* BGP timers configuration. */        if (bgp->default_keepalive != BGP_DEFAULT_KEEPALIVE  	  && bgp->default_holdtime != BGP_DEFAULT_HOLDTIME) -	vty_outln (vty, " timers bgp %u %u", bgp->default_keepalive, +	vty_out (vty, " timers bgp %u %u\n", bgp->default_keepalive,  		 bgp->default_holdtime);        /* peer-group */ @@ -7608,7 +7608,7 @@ bgp_config_write (struct vty *vty)        /* No auto-summary */        if (bgp_option_check (BGP_OPT_CONFIG_CISCO)) -	vty_outln (vty, " no auto-summary"); +	vty_out (vty, " no auto-summary\n");        /* IPv4 unicast configuration.  */        write += bgp_config_write_family (vty, bgp, AFI_IP, SAFI_UNICAST); diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 14cce2d606..ef8ae1a094 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -299,7 +299,7 @@ DEFUN (vnc_advertise_un_method,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "VNC not configured"); +      vty_out (vty, "VNC not configured\n");        return CMD_WARNING;      } @@ -345,7 +345,7 @@ set_ecom_list (        ecomadd = ecommunity_str2com (argv[0]->arg, ECOMMUNITY_ROUTE_TARGET, 0);        if (!ecomadd)          { -          vty_outln (vty, "Malformed community-list value"); +          vty_out (vty, "Malformed community-list value\n");            if (ecom)              ecommunity_free (&ecom);            return CMD_WARNING; @@ -435,12 +435,12 @@ DEFUN (vnc_defaults_rd,        if (!argv[1]->arg[8] || *end)          { -          vty_outln (vty, "%% Malformed rd"); +          vty_out (vty, "%% Malformed rd\n");            return CMD_WARNING;          }        if (value32 > 0xffff)          { -          vty_outln (vty, "%% Malformed rd (must be less than %u", +          vty_out (vty, "%% Malformed rd (must be less than %u\n",                     0x0ffff);            return CMD_WARNING;          } @@ -460,7 +460,7 @@ DEFUN (vnc_defaults_rd,        ret = str2prefix_rd (argv[1]->arg, &prd);        if (!ret)          { -          vty_outln (vty, "%% Malformed rd"); +          vty_out (vty, "%% Malformed rd\n");            return CMD_WARNING;          }      } @@ -496,8 +496,8 @@ DEFUN (vnc_defaults_l2rd,          }        if ((value_l < 1) || (value_l > 0xff))          { -          vty_outln (vty, -                   "%% Malformed l2 nve id (must be greater than 0 and less than %u", +          vty_out (vty, +                   "%% Malformed l2 nve id (must be greater than 0 and less than %u\n",                     0x100);            return CMD_WARNING;          } @@ -800,20 +800,20 @@ DEFUN (vnc_redistribute_rh_roo_localadmin,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "RFAPI not configured"); +      vty_out (vty, "RFAPI not configured\n");        return CMD_WARNING;      }    localadmin = strtoul (argv[4]->arg, &endptr, 0);    if (!argv[4]->arg[0] || *endptr)      { -      vty_outln (vty, "%% Malformed value"); +      vty_out (vty, "%% Malformed value\n");        return CMD_WARNING;      }    if (localadmin > 0xffff)      { -      vty_outln (vty, "%% Value out of range (0-%d)", 0xffff); +      vty_out (vty, "%% Value out of range (0-%d)\n", 0xffff);        return CMD_WARNING;      } @@ -856,7 +856,7 @@ DEFUN (vnc_redistribute_mode,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "RFAPI not configured"); +      vty_out (vty, "RFAPI not configured\n");        return CMD_WARNING;      } @@ -876,7 +876,7 @@ DEFUN (vnc_redistribute_mode,        break;      default: -      vty_outln (vty, "unknown redistribute mode"); +      vty_out (vty, "unknown redistribute mode\n");        return CMD_WARNING;      } @@ -911,13 +911,13 @@ DEFUN (vnc_redistribute_protocol,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "RFAPI not configured"); +      vty_out (vty, "RFAPI not configured\n");        return CMD_WARNING;      }    if (rfapi_str2route_type (argv[2]->arg, argv[3]->arg, &afi, &type))      { -      vty_outln (vty, "%% Invalid route type"); +      vty_out (vty, "%% Invalid route type\n");        return CMD_WARNING;      } @@ -959,13 +959,13 @@ DEFUN (vnc_no_redistribute_protocol,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "RFAPI not configured"); +      vty_out (vty, "RFAPI not configured\n");        return CMD_WARNING;      }    if (rfapi_str2route_type (argv[3]->arg, argv[4]->arg, &afi, &type))      { -      vty_outln (vty, "%% Invalid route type"); +      vty_out (vty, "%% Invalid route type\n");        return CMD_WARNING;      } @@ -1000,13 +1000,13 @@ DEFUN (vnc_redistribute_bgp_exterior,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "RFAPI not configured"); +      vty_out (vty, "RFAPI not configured\n");        return CMD_WARNING;      }    if (rfapi_str2route_type (argv[2]->arg, "bgp-direct-to-nve-groups", &afi, &type))      { -      vty_outln (vty, "%% Invalid route type"); +      vty_out (vty, "%% Invalid route type\n");        return CMD_WARNING;      } @@ -1032,7 +1032,7 @@ DEFUN (vnc_redistribute_nvegroup,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1065,7 +1065,7 @@ DEFUN (vnc_redistribute_no_nvegroup,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1095,7 +1095,7 @@ DEFUN (vnc_redistribute_lifetime,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1135,7 +1135,7 @@ DEFUN (vnc_redist_bgpdirect_no_prefixlist,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1188,7 +1188,7 @@ DEFUN (vnc_redist_bgpdirect_prefixlist,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1238,7 +1238,7 @@ DEFUN (vnc_redist_bgpdirect_no_routemap,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1278,7 +1278,7 @@ DEFUN (vnc_redist_bgpdirect_routemap,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1323,7 +1323,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_no_prefixlist,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1331,7 +1331,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_no_prefixlist,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1372,7 +1372,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_prefixlist,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1380,7 +1380,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_prefixlist,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1419,7 +1419,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_no_routemap,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1427,7 +1427,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_no_routemap,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1455,7 +1455,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_routemap,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1463,7 +1463,7 @@ DEFUN (vnc_nve_group_redist_bgpdirect_routemap,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1504,7 +1504,7 @@ DEFUN (vnc_export_mode,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "VNC not configured"); +      vty_out (vty, "VNC not configured\n");        return CMD_WARNING;      } @@ -1526,13 +1526,13 @@ DEFUN (vnc_export_mode,            newmode = BGP_VNC_CONFIG_EXPORT_BGP_MODE_RH;            break;          default: -          vty_outln (vty, "Invalid mode specified"); +          vty_out (vty, "Invalid mode specified\n");            return CMD_WARNING;          }        if (newmode == oldmode)          { -          vty_outln (vty, "Mode unchanged"); +          vty_out (vty, "Mode unchanged\n");            return CMD_SUCCESS;          } @@ -1550,7 +1550,7 @@ DEFUN (vnc_export_mode,        /*         * export to zebra with RH mode is not yet implemented         */ -      vty_outln (vty,"Changing modes for zebra export not implemented yet"); +      vty_out (vty,"Changing modes for zebra export not implemented yet\n");        return CMD_WARNING;        oldmode = bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_ZEBRA_MODE_BITS; @@ -1590,7 +1590,7 @@ DEFUN (vnc_export_mode,              }            break;          default: -          vty_outln (vty, "Invalid mode"); +          vty_out (vty, "Invalid mode\n");            return CMD_WARNING;          }      } @@ -1625,7 +1625,7 @@ DEFUN (vnc_export_nvegroup,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1727,7 +1727,7 @@ DEFUN (vnc_no_export_nvegroup,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1788,7 +1788,7 @@ DEFUN (vnc_nve_group_export_no_prefixlist,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1796,7 +1796,7 @@ DEFUN (vnc_nve_group_export_no_prefixlist,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1857,7 +1857,7 @@ DEFUN (vnc_nve_group_export_prefixlist,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1865,7 +1865,7 @@ DEFUN (vnc_nve_group_export_prefixlist,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1914,7 +1914,7 @@ DEFUN (vnc_nve_group_export_no_routemap,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1922,7 +1922,7 @@ DEFUN (vnc_nve_group_export_no_routemap,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -1973,7 +1973,7 @@ DEFUN (vnc_nve_group_export_routemap,    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -1981,7 +1981,7 @@ DEFUN (vnc_nve_group_export_routemap,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -2024,7 +2024,7 @@ DEFUN (vnc_nve_export_no_prefixlist,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -2085,7 +2085,7 @@ DEFUN (vnc_nve_export_prefixlist,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -2132,7 +2132,7 @@ DEFUN (vnc_nve_export_no_routemap,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -2183,7 +2183,7 @@ DEFUN (vnc_nve_export_routemap,    if (!(hc = bgp->rfapi_cfg))      { -      vty_outln (vty, "rfapi not configured"); +      vty_out (vty, "rfapi not configured\n");        return CMD_WARNING;      } @@ -2734,7 +2734,7 @@ DEFUN (vnc_nve_group_prefix,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -2747,7 +2747,7 @@ DEFUN (vnc_nve_group_prefix,    afi = family2afi (p.family);    if (!afi)      { -      vty_outln (vty, "Unsupported address family"); +      vty_out (vty, "Unsupported address family\n");        return CMD_WARNING;      } @@ -2853,7 +2853,7 @@ DEFUN (vnc_nve_group_rt_import,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -2919,7 +2919,7 @@ DEFUN (vnc_nve_group_rt_export,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -2957,7 +2957,7 @@ DEFUN (vnc_nve_group_rt_both,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3038,7 +3038,7 @@ DEFUN (vnc_nve_group_l2rd,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3059,8 +3059,8 @@ DEFUN (vnc_nve_group_l2rd,          }        if ((value_l < 1) || (value_l > 0xff))          { -          vty_outln (vty, -                   "%% Malformed l2 nve id (must be greater than 0 and less than %u", +          vty_out (vty, +                   "%% Malformed l2 nve id (must be greater than 0 and less than %u\n",                     0x100);            return CMD_WARNING;          } @@ -3085,7 +3085,7 @@ DEFUN (vnc_nve_group_no_l2rd,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3110,7 +3110,7 @@ DEFUN (vnc_nve_group_rd,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3126,12 +3126,12 @@ DEFUN (vnc_nve_group_rd,        if (!argv[1]->arg[8] || *end)          { -          vty_outln (vty, "%% Malformed rd"); +          vty_out (vty, "%% Malformed rd\n");            return CMD_WARNING;          }        if (value32 > 0xffff)          { -          vty_outln (vty, "%% Malformed rd (must be less than %u", +          vty_out (vty, "%% Malformed rd (must be less than %u\n",                     0x0ffff);            return CMD_WARNING;          } @@ -3151,7 +3151,7 @@ DEFUN (vnc_nve_group_rd,        ret = str2prefix_rd (argv[1]->arg, &prd);        if (!ret)          { -          vty_outln (vty, "%% Malformed rd"); +          vty_out (vty, "%% Malformed rd\n");            return CMD_WARNING;          }      } @@ -3186,7 +3186,7 @@ DEFUN (vnc_nve_group_responselifetime,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3292,7 +3292,7 @@ DEFUN (vnc_no_vrf_policy,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    return bgp_rfapi_delete_named_nve_group (vty, bgp, argv[2]->arg, RFAPI_GROUP_CFG_VRF); @@ -3311,7 +3311,7 @@ DEFUN (vnc_vrf_policy_label,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3319,7 +3319,7 @@ DEFUN (vnc_vrf_policy_label,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3352,7 +3352,7 @@ DEFUN (vnc_vrf_policy_no_label,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current VRF group no longer exists"); +      vty_out (vty, "Current VRF group no longer exists\n");        return CMD_WARNING;      } @@ -3387,7 +3387,7 @@ DEFUN (vnc_vrf_policy_nexthop,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current VRF no longer exists"); +      vty_out (vty, "Current VRF no longer exists\n");        return CMD_WARNING;      } @@ -3437,7 +3437,7 @@ DEFUN (vnc_vrf_policy_rt_import,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3445,7 +3445,7 @@ DEFUN (vnc_vrf_policy_rt_import,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3509,7 +3509,7 @@ DEFUN (vnc_vrf_policy_rt_export,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3517,7 +3517,7 @@ DEFUN (vnc_vrf_policy_rt_export,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3553,7 +3553,7 @@ DEFUN (vnc_vrf_policy_rt_both,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3561,7 +3561,7 @@ DEFUN (vnc_vrf_policy_rt_both,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3641,7 +3641,7 @@ DEFUN (vnc_vrf_policy_rd,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3649,7 +3649,7 @@ DEFUN (vnc_vrf_policy_rd,    if (!listnode_lookup (bgp->rfapi_cfg->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return CMD_WARNING;      } @@ -3665,12 +3665,12 @@ DEFUN (vnc_vrf_policy_rd,        if (!*(argv[1]->arg + 5) || *end)          { -          vty_outln (vty, "%% Malformed rd"); +          vty_out (vty, "%% Malformed rd\n");            return CMD_WARNING;          }        if (value32 > 0xffff)          { -          vty_outln (vty, "%% Malformed rd (must be less than %u", +          vty_out (vty, "%% Malformed rd (must be less than %u\n",                     0x0ffff);            return CMD_WARNING;          } @@ -3690,7 +3690,7 @@ DEFUN (vnc_vrf_policy_rd,        ret = str2prefix_rd (argv[1]->arg, &prd);        if (!ret)          { -          vty_outln (vty, "%% Malformed rd"); +          vty_out (vty, "%% Malformed rd\n");            return CMD_WARNING;          }      } @@ -3833,7 +3833,7 @@ DEFUN (vnc_no_l2_group,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    return bgp_rfapi_delete_named_l2_group (vty, bgp, argv[3]->arg); @@ -3851,7 +3851,7 @@ DEFUN (vnc_l2_group_lni,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3859,7 +3859,7 @@ DEFUN (vnc_l2_group_lni,    if (!listnode_lookup (bgp->rfapi_cfg->l2_groups, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current L2 group no longer exists"); +      vty_out (vty, "Current L2 group no longer exists\n");        return CMD_WARNING;      } @@ -3880,7 +3880,7 @@ DEFUN (vnc_l2_group_labels,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3888,7 +3888,7 @@ DEFUN (vnc_l2_group_labels,    if (!listnode_lookup (bgp->rfapi_cfg->l2_groups, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current L2 group no longer exists"); +      vty_out (vty, "Current L2 group no longer exists\n");        return CMD_WARNING;      } @@ -3924,7 +3924,7 @@ DEFUN (vnc_l2_group_no_labels,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3932,14 +3932,14 @@ DEFUN (vnc_l2_group_no_labels,    if (!listnode_lookup (bgp->rfapi_cfg->l2_groups, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current L2 group no longer exists"); +      vty_out (vty, "Current L2 group no longer exists\n");        return CMD_WARNING;      }    ll = rfg->labels;    if (ll == NULL)      { -      vty_outln (vty, "Label no longer associated with group"); +      vty_out (vty, "Label no longer associated with group\n");        return CMD_WARNING;      } @@ -3981,13 +3981,13 @@ DEFUN (vnc_l2_group_rt,        do_export = 1;        break;      default: -      vty_outln (vty, "Unknown option, %s", argv[1]->arg); +      vty_out (vty, "Unknown option, %s\n", argv[1]->arg);        return CMD_ERR_NO_MATCH;      }    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      } @@ -3995,7 +3995,7 @@ DEFUN (vnc_l2_group_rt,    if (!listnode_lookup (bgp->rfapi_cfg->l2_groups, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current L2 group no longer exists"); +      vty_out (vty, "Current L2 group no longer exists\n");        return CMD_WARNING;      } @@ -4271,20 +4271,20 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)    if (bgp->rfapi == NULL || hc == NULL)      return write; -  vty_outln (vty, "!"); +  vty_out (vty, "!\n");    for (ALL_LIST_ELEMENTS (hc->nve_groups_sequential, node, nnode, rfg))      if (rfg->type == RFAPI_GROUP_CFG_VRF)        {          ++write; -        vty_outln (vty, " vrf-policy %s", rfg->name); +        vty_out (vty, " vrf-policy %s\n", rfg->name);          if (rfg->label <= MPLS_LABEL_MAX)            { -            vty_outln (vty, "  label %u", rfg->label); +            vty_out (vty, "  label %u\n", rfg->label);            }          if (CHECK_FLAG (rfg->flags, RFAPI_RFG_VPN_NH_SELF))            { -            vty_outln (vty, "  nexthop self"); +            vty_out (vty, "  nexthop self\n");            }          else  @@ -4300,7 +4300,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                    }                  else                    { -                    vty_outln (vty, "  nexthop %s", buf); +                    vty_out (vty, "  nexthop %s\n", buf);                    }                }            } @@ -4318,7 +4318,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                  value = ((rfg->rd.val[6] << 8) & 0x0ff00) |                    (rfg->rd.val[7] & 0x0ff); -                vty_outln (vty, "  rd auto:nh:%d", value); +                vty_out (vty, "  rd auto:nh:%d\n", value);                }              else @@ -4328,11 +4328,11 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                      !buf[0] || buf[BUFSIZ - 1])                    { -                    vty_outln (vty, "!Error: Can't convert rd"); +                    vty_out (vty, "!Error: Can't convert rd\n");                    }                  else                    { -                    vty_outln (vty, "  rd %s", buf); +                    vty_out (vty, "  rd %s\n", buf);                    }                }            } @@ -4342,7 +4342,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)            {              char *b = ecommunity_ecom2str (rfg->rt_import_list,                                             ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -            vty_outln (vty, "  rt both %s", b); +            vty_out (vty, "  rt both %s\n", b);              XFREE (MTYPE_ECOMMUNITY_STR, b);            }          else @@ -4351,14 +4351,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                {                  char *b = ecommunity_ecom2str (rfg->rt_import_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "  rt import %s", b); +                vty_out (vty, "  rt import %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }              if (rfg->rt_export_list)                {                  char *b = ecommunity_ecom2str (rfg->rt_export_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "  rt export %s", b); +                vty_out (vty, "  rt export %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }            } @@ -4373,12 +4373,12 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)              if (rfg->plist_export_bgp_name[afi])                { -                vty_outln (vty, "  export bgp %s prefix-list %s", +                vty_out (vty, "  export bgp %s prefix-list %s\n",                           afistr,rfg->plist_export_bgp_name[afi]);                }              if (rfg->plist_export_zebra_name[afi])                { -                vty_outln (vty, "  export zebra %s prefix-list %s", +                vty_out (vty, "  export zebra %s prefix-list %s\n",                           afistr,rfg->plist_export_zebra_name[afi]);                }              /* @@ -4388,14 +4388,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)               */              if (rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT][afi])                { -                vty_outln (vty, "  redistribute bgp-direct %s prefix-list %s", +                vty_out (vty, "  redistribute bgp-direct %s prefix-list %s\n",                           afistr,                           rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT][afi]);                }              if (rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT][afi])                { -                vty_outln (vty, -                         "  redistribute bgp-direct-to-nve-groups %s prefix-list %s", +                vty_out (vty, +                         "  redistribute bgp-direct-to-nve-groups %s prefix-list %s\n",                           afistr,                           rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT][afi]);                } @@ -4403,31 +4403,31 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)          if (rfg->routemap_export_bgp_name)            { -            vty_outln (vty, "  export bgp route-map %s", +            vty_out (vty, "  export bgp route-map %s\n",                       rfg->routemap_export_bgp_name);            }          if (rfg->routemap_export_zebra_name)            { -            vty_outln (vty, "  export zebra route-map %s", +            vty_out (vty, "  export zebra route-map %s\n",                       rfg->routemap_export_zebra_name);            }          if (rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT])            { -            vty_outln (vty, "  redistribute bgp-direct route-map %s", +            vty_out (vty, "  redistribute bgp-direct route-map %s\n",                       rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT]);            }          if (rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT])            { -            vty_outln (vty, -                     "  redistribute bgp-direct-to-nve-groups route-map %s", +            vty_out (vty, +                     "  redistribute bgp-direct-to-nve-groups route-map %s\n",                       rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT]);            } -        vty_outln (vty, "  exit-vrf-policy"); -        vty_outln (vty, "!"); +        vty_out (vty, "  exit-vrf-policy\n"); +        vty_out (vty, "!\n");        }    if (hc->flags & BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP)      { -      vty_outln (vty, " vnc advertise-un-method encap-safi"); +      vty_out (vty, " vnc advertise-un-method encap-safi\n");        write++;      } @@ -4437,7 +4437,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)        write += (bgp->rfapi->rfp_methods.cfg_cb) (vty, bgp->rfapi->rfp);      if (write) -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      if (hc->l2_groups)        { @@ -4448,9 +4448,9 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)              struct listnode *lnode;              void *data;              ++write; -            vty_outln (vty, " vnc l2-group %s", rfg->name); +            vty_out (vty, " vnc l2-group %s\n", rfg->name);              if (rfg->logical_net_id != 0) -              vty_outln (vty, "   logical-network-id %u", +              vty_out (vty, "   logical-network-id %u\n",                           rfg->logical_net_id);              if (rfg->labels != NULL && listhead (rfg->labels) != NULL)                { @@ -4467,7 +4467,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                {                  char *b = ecommunity_ecom2str (rfg->rt_import_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "   rt both %s", b); +                vty_out (vty, "   rt both %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }              else @@ -4476,14 +4476,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                    {                      char *b = ecommunity_ecom2str (rfg->rt_import_list,                                                     ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                    vty_outln (vty, "  rt import %s", b); +                    vty_out (vty, "  rt import %s\n", b);                      XFREE (MTYPE_ECOMMUNITY_STR, b);                    }                  if (rfg->rt_export_list)                    {                      char *b = ecommunity_ecom2str (rfg->rt_export_list,                                                     ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                    vty_outln (vty, "  rt export %s", b); +                    vty_out (vty, "  rt export %s\n", b);                      XFREE (MTYPE_ECOMMUNITY_STR, b);                    }                } @@ -4494,8 +4494,8 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                                                          RFAPI_RFP_CFG_GROUP_L2,                                                          rfg->name,                                                          rfg->rfp_cfg); -            vty_outln (vty, "   exit-vnc"); -            vty_outln (vty, "!"); +            vty_out (vty, "   exit-vnc\n"); +            vty_out (vty, "!\n");            }        } @@ -4507,7 +4507,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)          ++write; -        vty_outln (vty, " vnc defaults"); +        vty_out (vty, " vnc defaults\n");          if (hc->default_rd.prefixlen)            { @@ -4521,7 +4521,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                  value = ((hc->default_rd.val[6] << 8) & 0x0ff00) |                    (hc->default_rd.val[7] & 0x0ff); -                vty_outln (vty, "  rd auto:vn:%d", value); +                vty_out (vty, "  rd auto:vn:%d\n", value);                }              else @@ -4531,11 +4531,11 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                      !buf[0] || buf[BUFSIZ - 1])                    { -                    vty_outln (vty, "!Error: Can't convert rd"); +                    vty_out (vty, "!Error: Can't convert rd\n");                    }                  else                    { -                    vty_outln (vty, "  rd %s", buf); +                    vty_out (vty, "  rd %s\n", buf);                    }                }            } @@ -4554,7 +4554,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)            {              char *b = ecommunity_ecom2str (hc->default_rt_import_list,                                             ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -            vty_outln (vty, "  rt both %s", b); +            vty_out (vty, "  rt both %s\n", b);              XFREE (MTYPE_ECOMMUNITY_STR, b);            }          else @@ -4563,14 +4563,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                {                  char *b = ecommunity_ecom2str (hc->default_rt_import_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "  rt import %s", b); +                vty_out (vty, "  rt import %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }              if (hc->default_rt_export_list)                {                  char *b = ecommunity_ecom2str (hc->default_rt_export_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "  rt export %s", b); +                vty_out (vty, "  rt export %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }            } @@ -4581,15 +4581,15 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                                                      RFAPI_RFP_CFG_GROUP_DEFAULT,                                                      NULL,                                                      bgp->rfapi_cfg->default_rfp_cfg); -        vty_outln (vty, "  exit-vnc"); -        vty_outln (vty, "!"); +        vty_out (vty, "  exit-vnc\n"); +        vty_out (vty, "!\n");        }      for (ALL_LIST_ELEMENTS (hc->nve_groups_sequential, node, nnode, rfg))        if (rfg->type == RFAPI_GROUP_CFG_NVE)        {          ++write; -        vty_outln (vty, " vnc nve-group %s", rfg->name); +        vty_out (vty, " vnc nve-group %s\n", rfg->name);          if (rfg->vn_prefix.family && rfg->vn_node)            { @@ -4599,11 +4599,11 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)              prefix2str (&rfg->vn_prefix, buf, BUFSIZ);              if (!buf[0] || buf[BUFSIZ - 1])                { -                vty_outln (vty, "!Error: Can't convert prefix"); +                vty_out (vty, "!Error: Can't convert prefix\n");                }              else                { -                vty_outln (vty, "  prefix %s %s", "vn", buf); +                vty_out (vty, "  prefix %s %s\n", "vn", buf);                }            } @@ -4614,11 +4614,11 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)              prefix2str (&rfg->un_prefix, buf, BUFSIZ);              if (!buf[0] || buf[BUFSIZ - 1])                { -                vty_outln (vty, "!Error: Can't convert prefix"); +                vty_out (vty, "!Error: Can't convert prefix\n");                }              else                { -                vty_outln (vty, "  prefix %s %s", "un", buf); +                vty_out (vty, "  prefix %s %s\n", "un", buf);                }            } @@ -4636,7 +4636,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                  value = ((rfg->rd.val[6] << 8) & 0x0ff00) |                    (rfg->rd.val[7] & 0x0ff); -                vty_outln (vty, "  rd auto:vn:%d", value); +                vty_out (vty, "  rd auto:vn:%d\n", value);                }              else @@ -4646,11 +4646,11 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                      !buf[0] || buf[BUFSIZ - 1])                    { -                    vty_outln (vty, "!Error: Can't convert rd"); +                    vty_out (vty, "!Error: Can't convert rd\n");                    }                  else                    { -                    vty_outln (vty, "  rd %s", buf); +                    vty_out (vty, "  rd %s\n", buf);                    }                }            } @@ -4670,7 +4670,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)              char *b = ecommunity_ecom2str (rfg->rt_import_list,                                             ECOMMUNITY_FORMAT_ROUTE_MAP,                                             ECOMMUNITY_ROUTE_TARGET); -            vty_outln (vty, "  rt both %s", b); +            vty_out (vty, "  rt both %s\n", b);              XFREE (MTYPE_ECOMMUNITY_STR, b);            }          else @@ -4680,14 +4680,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                  char *b = ecommunity_ecom2str (rfg->rt_import_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP,                                                 ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "  rt import %s", b); +                vty_out (vty, "  rt import %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }              if (rfg->rt_export_list)                {                  char *b = ecommunity_ecom2str (rfg->rt_export_list,                                                 ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); -                vty_outln (vty, "  rt export %s", b); +                vty_out (vty, "  rt export %s\n", b);                  XFREE (MTYPE_ECOMMUNITY_STR, b);                }            } @@ -4702,12 +4702,12 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)              if (rfg->plist_export_bgp_name[afi])                { -                vty_outln (vty, "  export bgp %s prefix-list %s", +                vty_out (vty, "  export bgp %s prefix-list %s\n",                           afistr,rfg->plist_export_bgp_name[afi]);                }              if (rfg->plist_export_zebra_name[afi])                { -                vty_outln (vty, "  export zebra %s prefix-list %s", +                vty_out (vty, "  export zebra %s prefix-list %s\n",                           afistr,rfg->plist_export_zebra_name[afi]);                }              /* @@ -4717,14 +4717,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)               */              if (rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT][afi])                { -                vty_outln (vty, "  redistribute bgp-direct %s prefix-list %s", +                vty_out (vty, "  redistribute bgp-direct %s prefix-list %s\n",                           afistr,                           rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT][afi]);                }              if (rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT][afi])                { -                vty_outln (vty, -                         "  redistribute bgp-direct-to-nve-groups %s prefix-list %s", +                vty_out (vty, +                         "  redistribute bgp-direct-to-nve-groups %s prefix-list %s\n",                           afistr,                           rfg->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT][afi]);                } @@ -4732,23 +4732,23 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)          if (rfg->routemap_export_bgp_name)            { -            vty_outln (vty, "  export bgp route-map %s", +            vty_out (vty, "  export bgp route-map %s\n",                       rfg->routemap_export_bgp_name);            }          if (rfg->routemap_export_zebra_name)            { -            vty_outln (vty, "  export zebra route-map %s", +            vty_out (vty, "  export zebra route-map %s\n",                       rfg->routemap_export_zebra_name);            }          if (rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT])            { -            vty_outln (vty, "  redistribute bgp-direct route-map %s", +            vty_out (vty, "  redistribute bgp-direct route-map %s\n",                       rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT]);            }          if (rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT])            { -            vty_outln (vty, -                     "  redistribute bgp-direct-to-nve-groups route-map %s", +            vty_out (vty, +                     "  redistribute bgp-direct-to-nve-groups route-map %s\n",                       rfg->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT_EXT]);            }          if (bgp->rfapi->rfp_methods.cfg_group_cb) @@ -4757,8 +4757,8 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                                                      bgp->rfapi->rfp,                                                      RFAPI_RFP_CFG_GROUP_NVE,                                                      rfg->name, rfg->rfp_cfg); -        vty_outln (vty, "  exit-vnc"); -        vty_outln (vty, "!"); +        vty_out (vty, "  exit-vnc\n"); +        vty_out (vty, "!\n");        }    }                             /* have listen ports */ @@ -4767,24 +4767,24 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)     */    if (VNC_EXPORT_BGP_GRP_ENABLED (hc))      { -      vty_outln (vty, " vnc export bgp mode group-nve"); +      vty_out (vty, " vnc export bgp mode group-nve\n");      }    else if (VNC_EXPORT_BGP_RH_ENABLED (hc))      { -      vty_outln (vty, " vnc export bgp mode registering-nve"); +      vty_out (vty, " vnc export bgp mode registering-nve\n");      }    else if (VNC_EXPORT_BGP_CE_ENABLED (hc))      { -      vty_outln (vty, " vnc export bgp mode ce"); +      vty_out (vty, " vnc export bgp mode ce\n");      }    if (VNC_EXPORT_ZEBRA_GRP_ENABLED (hc))      { -      vty_outln (vty, " vnc export zebra mode group-nve"); +      vty_out (vty, " vnc export zebra mode group-nve\n");      }    else if (VNC_EXPORT_ZEBRA_RH_ENABLED (hc))      { -      vty_outln (vty, " vnc export zebra mode registering-nve"); +      vty_out (vty, " vnc export zebra mode registering-nve\n");      }    if (hc->rfg_export_direct_bgp_l) @@ -4792,7 +4792,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)        for (ALL_LIST_ELEMENTS (hc->rfg_export_direct_bgp_l, node, nnode, rfgn))          { -          vty_outln (vty, " vnc export bgp group-nve group %s", +          vty_out (vty, " vnc export bgp group-nve group %s\n",                     rfgn->name);          }      } @@ -4802,7 +4802,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)        for (ALL_LIST_ELEMENTS (hc->rfg_export_zebra_l, node, nnode, rfgn))          { -          vty_outln (vty, " vnc export zebra group-nve group %s", +          vty_out (vty, " vnc export zebra group-nve group %s\n",                     rfgn->name);          }      } @@ -4810,19 +4810,19 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)    if (hc->rfg_redist_name)      { -      vty_outln (vty, " vnc redistribute nve-group %s", +      vty_out (vty, " vnc redistribute nve-group %s\n",                 hc->rfg_redist_name);      }    if (hc->redist_lifetime)      { -      vty_outln (vty, " vnc redistribute lifetime %d", +      vty_out (vty, " vnc redistribute lifetime %d\n",                 hc->redist_lifetime);      }    if (hc->resolve_nve_roo_local_admin !=        BGP_VNC_CONFIG_RESOLVE_NVE_ROO_LOCAL_ADMIN_DEFAULT)      { -      vty_outln (vty, " vnc redistribute resolve-nve roo-ec-local-admin %d", +      vty_out (vty, " vnc redistribute resolve-nve roo-ec-local-admin %d\n",                 hc->resolve_nve_roo_local_admin);      } @@ -4844,7 +4844,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)          }        if (s)          { -          vty_outln (vty, " vnc redistribute mode %s", s); +          vty_out (vty, " vnc redistribute mode %s\n", s);          }      } @@ -4858,34 +4858,34 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)        if (hc->plist_export_bgp_name[afi])          { -          vty_outln (vty, " vnc export bgp %s prefix-list %s", +          vty_out (vty, " vnc export bgp %s prefix-list %s\n",                     afistr, hc->plist_export_bgp_name[afi]);          }        if (hc->plist_export_zebra_name[afi])          { -          vty_outln (vty, " vnc export zebra %s prefix-list %s", +          vty_out (vty, " vnc export zebra %s prefix-list %s\n",                     afistr, hc->plist_export_zebra_name[afi]);          }        if (hc->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT][afi])          { -          vty_outln (vty, " vnc redistribute bgp-direct %s prefix-list %s", +          vty_out (vty, " vnc redistribute bgp-direct %s prefix-list %s\n",                     afistr,hc->plist_redist_name[ZEBRA_ROUTE_BGP_DIRECT][afi]);          }      }    if (hc->routemap_export_bgp_name)      { -      vty_outln (vty, " vnc export bgp route-map %s", +      vty_out (vty, " vnc export bgp route-map %s\n",                 hc->routemap_export_bgp_name);      }    if (hc->routemap_export_zebra_name)      { -      vty_outln (vty, " vnc export zebra route-map %s", +      vty_out (vty, " vnc export zebra route-map %s\n",                 hc->routemap_export_zebra_name);      }    if (hc->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT])      { -      vty_outln (vty, " vnc redistribute bgp-direct route-map %s", +      vty_out (vty, " vnc redistribute bgp-direct route-map %s\n",                 hc->routemap_redist_name[ZEBRA_ROUTE_BGP_DIRECT]);      } @@ -4898,14 +4898,14 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)                if (type == ZEBRA_ROUTE_BGP_DIRECT_EXT &&                    hc->redist_bgp_exterior_view_name)                  { -                  vty_outln (vty, " vnc redistribute %s %s view %s", +                  vty_out (vty, " vnc redistribute %s %s view %s\n",                             ((afi == AFI_IP) ? "ipv4" : "ipv6"),                             zebra_route_string (type),                             hc->redist_bgp_exterior_view_name);                  }                else                  { -                  vty_outln (vty, " vnc redistribute %s %s", +                  vty_out (vty, " vnc redistribute %s %s\n",                             ((afi == AFI_IP) ? "ipv4" : "ipv6"),                             zebra_route_string(type));                  } @@ -4924,7 +4924,7 @@ bgp_rfapi_show_summary (struct bgp *bgp, struct vty *vty)    if (hc == NULL)      return; -  vty_outln (vty, "%-39s %-19s %s", "VNC Advertise method:", +  vty_out (vty, "%-39s %-19s %s\n", "VNC Advertise method:",             (hc->flags & BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP              ? "Encapsulation SAFI" : "Tunnel Encap attribute"),             ((hc->flags & BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP) == (BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP & BGP_VNC_CONFIG_FLAGS_DEFAULT) ? "(default)" : "")); @@ -4991,7 +4991,7 @@ bgp_rfapi_show_summary (struct bgp *bgp, struct vty *vty)        vty_out (vty, "%sToZebra {Registering NVE}", (redist == 1 ? "" : " "));        /* note filters, route-maps not shown */      } -  vty_outln (vty, "%-19s %s", (redist ? "" : "Off"), +  vty_out (vty, "%-19s %s\n", (redist ? "" : "Off"),             (redist ? "" : "(default)"));    /* Redistribution */ @@ -5010,26 +5010,26 @@ bgp_rfapi_show_summary (struct bgp *bgp, struct vty *vty)              }          }      } -  vty_outln (vty, "%-19s %s", (redist ? "" : "Off"), +  vty_out (vty, "%-19s %s\n", (redist ? "" : "Off"),             (redist ? "" : "(default)")); -  vty_outln (vty, "%-39s %3u%-16s %s", "RFP Registration Hold-Down Factor:", +  vty_out (vty, "%-39s %3u%-16s %s\n", "RFP Registration Hold-Down Factor:",             hc->rfp_cfg.holddown_factor, "%",             (hc->rfp_cfg.holddown_factor == RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR ? "(default)" : "")); -  vty_outln (vty, "%-39s %-19s %s", "RFP Updated responses:", +  vty_out (vty, "%-39s %-19s %s\n", "RFP Updated responses:",             (hc->rfp_cfg.use_updated_response == 0 ? "Off" : "On"),             (hc->rfp_cfg.use_updated_response == 0 ? "(default)" : "")); -  vty_outln (vty, "%-39s %-19s %s", "RFP Removal responses:", +  vty_out (vty, "%-39s %-19s %s\n", "RFP Removal responses:",             (hc->rfp_cfg.use_removes == 0 ? "Off" : "On"),             (hc->rfp_cfg.use_removes == 0 ? "(default)" : "")); -  vty_outln (vty, "%-39s %-19s %s", "RFP Full table download:", +  vty_out (vty, "%-39s %-19s %s\n", "RFP Full table download:",             (hc->rfp_cfg.download_type ==              RFAPI_RFP_DOWNLOAD_FULL ? "On" : "Off"),             (hc->rfp_cfg.download_type == RFAPI_RFP_DOWNLOAD_PARTIAL ? "(default)" : ""));    sprintf (tmp, "%u seconds", hc->rfp_cfg.ftd_advertisement_interval); -  vty_outln (vty, "%-39s %-19s %s", "    Advertisement Interval:", tmp, +  vty_out (vty, "%-39s %-19s %s\n", "    Advertisement Interval:", tmp,             (hc->rfp_cfg.ftd_advertisement_interval == RFAPI_RFP_CFG_DEFAULT_FTD_ADVERTISEMENT_INTERVAL ? "(default)" : "")); -  vty_outln (vty, "%-39s %d seconds", "Default RFP response lifetime:", +  vty_out (vty, "%-39s %d seconds\n", "Default RFP response lifetime:",             hc->default_response_lifetime);    vty_out (vty, VTYNL);    return; diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index ffd4e3e323..f9156863bf 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -3185,12 +3185,12 @@ DEFUN (debug_rfapi_open,    rc = rfapi_open (rfapi_get_rfp_start_val_by_bgp (bgp_get_default ()),                     &vn, &un, /*&uo */ NULL, &lifetime, NULL, &handle); -  vty_outln (vty, "rfapi_open: status %d, handle %p, lifetime %d", +  vty_out (vty, "rfapi_open: status %d, handle %p, lifetime %d\n",             rc, handle, lifetime);    rc = rfapi_set_response_cb (handle, test_nexthops_callback); -  vty_outln (vty, "rfapi_set_response_cb: status %d", rc); +  vty_out (vty, "rfapi_set_response_cb: status %d\n", rc);    return CMD_SUCCESS;  } @@ -3230,14 +3230,14 @@ DEFUN (debug_rfapi_close_vn_un,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[4]->arg, argv[6]->arg);        return CMD_WARNING;      }    rc = rfapi_close (handle); -  vty_outln (vty, "rfapi_close(handle=%p): status %d", handle,rc); +  vty_out (vty, "rfapi_close(handle=%p): status %d\n", handle,rc);    return CMD_SUCCESS;  } @@ -3258,13 +3258,13 @@ DEFUN (debug_rfapi_close_rfd,    if (*endptr != '\0' || (uintptr_t) handle == UINTPTR_MAX)      { -      vty_outln (vty, "Invalid value: %s", argv[4]->arg); +      vty_out (vty, "Invalid value: %s\n", argv[4]->arg);        return CMD_WARNING;      }    rc = rfapi_close (handle); -  vty_outln (vty, "rfapi_close(handle=%p): status %d", handle,rc); +  vty_out (vty, "rfapi_close(handle=%p): status %d\n", handle,rc);    return CMD_SUCCESS;  } @@ -3311,7 +3311,7 @@ DEFUN (debug_rfapi_register_vn_un,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[4]->arg, argv[6]->arg);        return CMD_WARNING;      } @@ -3344,7 +3344,7 @@ DEFUN (debug_rfapi_register_vn_un,    rc = rfapi_register (handle, &hpfx, lifetime, NULL, NULL, 0);    if (rc)      { -      vty_outln (vty, "rfapi_register failed with rc=%d (%s)", rc, +      vty_out (vty, "rfapi_register failed with rc=%d (%s)\n", rc,                 strerror(rc));      } @@ -3400,7 +3400,7 @@ DEFUN (debug_rfapi_register_vn_un_l2o,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[4]->arg, argv[6]->arg);        return CMD_WARNING;      } @@ -3453,7 +3453,7 @@ DEFUN (debug_rfapi_register_vn_un_l2o,    rc = rfapi_register (handle, &hpfx, lifetime, NULL /* &uo */ , opt, 0);    if (rc)      { -      vty_outln (vty, "rfapi_register failed with rc=%d (%s)", rc, +      vty_out (vty, "rfapi_register failed with rc=%d (%s)\n", rc,                 strerror(rc));      } @@ -3496,7 +3496,7 @@ DEFUN (debug_rfapi_unregister_vn_un,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[4]->arg, argv[6]->arg);        return CMD_WARNING;      } @@ -3567,7 +3567,7 @@ DEFUN (debug_rfapi_query_vn_un,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[4]->arg, argv[6]->arg);        return CMD_WARNING;      } @@ -3579,7 +3579,7 @@ DEFUN (debug_rfapi_query_vn_un,    if (rc)      { -      vty_outln (vty, "rfapi_query failed with rc=%d (%s)", rc, +      vty_out (vty, "rfapi_query failed with rc=%d (%s)\n", rc,                 strerror(rc));      }    else @@ -3642,13 +3642,13 @@ DEFUN (debug_rfapi_query_vn_un_l2o,    if ((rc = rfapiCliGetRfapiIpAddr (vty, argv[2], &target)))      return rc;  #else -  vty_outln (vty, "%% This command is broken."); +  vty_out (vty, "%% This command is broken.\n");    return CMD_WARNING;  #endif    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[4]->arg, argv[6]->arg);        return CMD_WARNING;      } @@ -3688,7 +3688,7 @@ DEFUN (debug_rfapi_query_vn_un_l2o,    if (rc)      { -      vty_outln (vty, "rfapi_query failed with rc=%d (%s)", rc, +      vty_out (vty, "rfapi_query failed with rc=%d (%s)\n", rc,                 strerror(rc));      }    else @@ -3750,7 +3750,7 @@ DEFUN (debug_rfapi_query_done_vn_un,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[5]->arg, argv[7]->arg);        return CMD_WARNING;      } @@ -3760,7 +3760,7 @@ DEFUN (debug_rfapi_query_done_vn_un,     */    rc = rfapi_query_done (handle, &target); -  vty_outln (vty, "rfapi_query_done returned %d", rc); +  vty_out (vty, "rfapi_query_done returned %d\n", rc);    return CMD_SUCCESS;  } @@ -3786,14 +3786,14 @@ DEFUN (debug_rfapi_show_import,    bgp = bgp_get_default ();     /* assume 1 instance for now */    if (!bgp)      { -      vty_outln (vty, "No BGP instance"); +      vty_out (vty, "No BGP instance\n");        return CMD_WARNING;      }    h = bgp->rfapi;    if (!h)      { -      vty_outln (vty, "No RFAPI instance"); +      vty_out (vty, "No RFAPI instance\n");        return CMD_WARNING;      } @@ -3807,7 +3807,7 @@ DEFUN (debug_rfapi_show_import,      {        s = ecommunity_ecom2str (it->rt_import_list,                                 ECOMMUNITY_FORMAT_ROUTE_MAP, 0); -      vty_outln (vty, "Import Table %p, RTs: %s", it, s); +      vty_out (vty, "Import Table %p, RTs: %s\n", it, s);        XFREE (MTYPE_ECOMMUNITY_STR, s);        rfapiShowImportTable (vty, "IP VPN", it->imported_vpn[AFI_IP], 1); @@ -3837,7 +3837,7 @@ DEFUN (debug_rfapi_show_import,                lni = lni_as_ptr;                if (first_l2)                  { -                  vty_outln (vty, "%sLNI-based Ethernet Tables:", +                  vty_out (vty, "%sLNI-based Ethernet Tables:\n",                             VTYNL);                    first_l2 = 0;                  } @@ -3889,7 +3889,7 @@ DEFUN (debug_rfapi_show_import_vn_un,    if (rfapi_find_handle_vty (vty, &vn, &un, &handle))      { -      vty_outln (vty, "can't locate handle matching vn=%s, un=%s", +      vty_out (vty, "can't locate handle matching vn=%s, un=%s\n",                 argv[5]->arg, argv[7]->arg);        return CMD_WARNING;      } @@ -3920,12 +3920,12 @@ DEFUN (debug_rfapi_response_omit_self,    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    if (!bgp->rfapi_cfg)      { -      vty_outln (vty, "VNC not configured"); +      vty_out (vty, "VNC not configured\n");        return CMD_WARNING;      } @@ -4191,7 +4191,7 @@ rfapi_rfp_get_or_init_group_config_nve (    if (!rfg || !listnode_lookup (rfc->nve_groups_sequential, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current NVE group no longer exists"); +      vty_out (vty, "Current NVE group no longer exists\n");        return NULL;      } @@ -4216,7 +4216,7 @@ rfapi_rfp_get_or_init_group_config_l2 (    if (!rfg || !listnode_lookup (rfc->l2_groups, rfg))      {        /* Not in list anymore */ -      vty_outln (vty, "Current L2 group no longer exists"); +      vty_out (vty, "Current L2 group no longer exists\n");        return NULL;      }    if (rfg->rfp_cfg == NULL && size > 0) diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index d12958a600..dfbffadf36 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -939,14 +939,14 @@ rfapiShowVncQueries (void *stream, struct prefix *pfx_match)    bgp = bgp_get_default ();     /* assume 1 instance for now */    if (!bgp)      { -      vty_outln (vty, "No BGP instance"); +      vty_out (vty, "No BGP instance\n");        return CMD_WARNING;      }    h = bgp->rfapi;    if (!h)      { -      vty_outln (vty, "No RFAPI instance"); +      vty_out (vty, "No RFAPI instance\n");        return CMD_WARNING;      } @@ -2221,7 +2221,7 @@ register_add (         if (!bgp)           {             if (vty) -             vty_outln (vty, "BGP not configured"); +             vty_out (vty, "BGP not configured\n");             return CMD_WARNING;           } @@ -2230,7 +2230,7 @@ register_add (         if (!h || !rfapi_cfg)           {             if (vty) -             vty_outln (vty, "RFAPI not configured"); +             vty_out (vty, "RFAPI not configured\n");             return CMD_WARNING;           } @@ -2240,12 +2240,12 @@ register_add (               {                 if (arg_lnh)                   { -                   vty_outln (vty,"local-next-hop specified more than once"); +                   vty_out (vty,"local-next-hop specified more than once\n");                     return CMD_WARNING;                   }                 if (argc <= 1)                   { -                   vty_outln (vty,"Missing parameter for local-next-hop"); +                   vty_out (vty,"Missing parameter for local-next-hop\n");                     return CMD_WARNING;                   }                 ++argv, --argc; @@ -2255,12 +2255,12 @@ register_add (               {                 if (arg_lnh_cost)                   { -                   vty_outln (vty,"local-cost specified more than once"); +                   vty_out (vty,"local-cost specified more than once\n");                     return CMD_WARNING;                   }                 if (argc <= 1)                   { -                   vty_outln (vty,"Missing parameter for local-cost"); +                   vty_out (vty,"Missing parameter for local-cost\n");                     return CMD_WARNING;                   }                 ++argv, --argc; @@ -2288,7 +2288,7 @@ register_add (                 arg_prefix = "0::0/128";                 break;               default: -               vty_outln (vty,"Internal error, unknown VN address family"); +               vty_out (vty,"Internal error, unknown VN address family\n");                 return CMD_WARNING;               } @@ -2316,7 +2316,7 @@ register_add (             cost = strtoul (arg_cost, &endptr, 10);             if (*endptr != '\0' || cost > 255)               { -               vty_outln (vty, "%% Invalid %s value", "cost"); +               vty_out (vty, "%% Invalid %s value\n", "cost");                 goto fail;               }           } @@ -2337,7 +2337,7 @@ register_add (                 lifetime = strtoul (arg_lifetime, &endptr, 10);                 if (*endptr != '\0')                   { -                   vty_outln (vty, "%% Invalid %s value","lifetime"); +                   vty_out (vty, "%% Invalid %s value\n","lifetime");                     goto fail;                   }               } @@ -2351,8 +2351,8 @@ register_add (           {             if (!arg_lnh)               { -               vty_outln (vty, -                        "%% %s may only be specified with local-next-hop", +               vty_out (vty, +                        "%% %s may only be specified with local-next-hop\n",                          "local-cost");                 goto fail;               } @@ -2360,7 +2360,7 @@ register_add (             lnh_cost = strtoul (arg_lnh_cost, &endptr, 10);             if (*endptr != '\0' || lnh_cost > 255)               { -               vty_outln (vty, "%% Invalid %s value","local-cost"); +               vty_out (vty, "%% Invalid %s value\n","local-cost");                 goto fail;               }           } @@ -2373,7 +2373,7 @@ register_add (           {             if (!arg_prefix)               { -               vty_outln (vty, "%% %s may only be specified with prefix", +               vty_out (vty, "%% %s may only be specified with prefix\n",                          "local-next-hop");                 goto fail;               } @@ -2401,7 +2401,7 @@ register_add (         if (arg_vni && !arg_macaddr)           { -           vty_outln (vty, "%% %s may only be specified with mac address", +           vty_out (vty, "%% %s may only be specified with mac address\n",                      "virtual-network-identifier");             goto fail;           } @@ -2420,7 +2420,7 @@ register_add (             if ((rc = rfapiStr2EthAddr (arg_macaddr,                                         &optary[opt_next].v.l2addr.macaddr)))               { -               vty_outln (vty, "Invalid %s value","mac address"); +               vty_out (vty, "Invalid %s value\n","mac address");                 goto fail;               }             /* TBD label, NVE ID */ @@ -2472,7 +2472,7 @@ register_add (                                  &rfd);                 if (rc)                   { -                   vty_outln (vty, "Can't open session for this NVE: %s", +                   vty_out (vty, "Can't open session for this NVE: %s\n",                              rfapi_error_str(rc));                     rc = CMD_WARNING;                     goto fail; @@ -2480,7 +2480,7 @@ register_add (               }             else               { -               vty_outln (vty, "Can't find session for this NVE: %s", +               vty_out (vty, "Can't find session for this NVE: %s\n",                          rfapi_error_str(rc));                 goto fail;               } @@ -2517,9 +2517,9 @@ register_add (         vnc_zlog_debug_verbose ("%s: rfapi_register failed", __func__);         vty_out (vty, VTYNL); -       vty_outln (vty, "Registration failed."); -       vty_outln (vty, -                "Confirm that either the VN or UN address matches a configured NVE group."); +       vty_out (vty, "Registration failed.\n"); +       vty_out (vty, +                "Confirm that either the VN or UN address matches a configured NVE group.\n");         return CMD_WARNING;       fail: @@ -3138,7 +3138,7 @@ parse_deleter_args (      {        if (!arg_vni)          { -          vty_outln (vty, "Missing VNI"); +          vty_out (vty, "Missing VNI\n");            return rc;          }        if (strcmp (arg_l2addr, "*")) @@ -3705,12 +3705,12 @@ print_cleared_stats (struct rfapi_local_reg_delete_arg *cda)        cda->nves = NULL;      }    if (cda->failed_pfx_count) -      vty_outln (vty, "Failed to delete %d prefixes", +      vty_out (vty, "Failed to delete %d prefixes\n",                 cda->failed_pfx_count);    /* left as "prefixes" even in single case for ease of machine parsing */ -  vty_outln (vty, -           "[Local] Cleared %u registrations, %u prefixes, %u responses from %d NVEs", +  vty_out (vty, +           "[Local] Cleared %u registrations, %u prefixes, %u responses from %d NVEs\n",             cda->reg_count, cda->pfx_count, cda->query_count,cda->nve_count);  /* @@ -3718,7 +3718,7 @@ print_cleared_stats (struct rfapi_local_reg_delete_arg *cda)   * the command line   */ -  vty_outln (vty, "[Holddown] Cleared %u prefixes from %u NVEs", +  vty_out (vty, "[Holddown] Cleared %u prefixes from %u NVEs\n",             cda->remote_holddown_pfx_count,cda->remote_holddown_nve_count);  } @@ -4395,8 +4395,8 @@ check_and_display_is_vnc_running (struct vty *vty)    if (vty)      { -      vty_outln (vty, -               "VNC is not configured. (There are no configured BGP VPN SAFI peers.)"); +      vty_out (vty, +               "VNC is not configured. (There are no configured BGP VPN SAFI peers.)\n");      }    return 0;                     /* not running */  } @@ -4507,7 +4507,7 @@ rfapi_vty_show_nve_summary (struct vty *vty, show_nve_summary_t show_type)    return 0;  notcfg: -  vty_outln (vty, "VNC is not configured."); +  vty_out (vty, "VNC is not configured.\n");    return CMD_WARNING;  } @@ -4576,7 +4576,7 @@ rfapi_show_nves (            /* print out a header */            vty_outln (vty,                       "                                " "Active      Next Hops"); -          vty_outln (vty, "%-15s %-15s %-5s %-5s %-6s %-6s %s", +          vty_out (vty, "%-15s %-15s %-5s %-5s %-6s %-6s %s\n",                     "VN Address",                     "UN Address",                     "Regis", "Resps", "Reach", "Remove", "Age"); @@ -4584,7 +4584,7 @@ rfapi_show_nves (        ++printed; -      vty_outln (vty, "%-15s %-15s %-5u %-5u %-6u %-6u %s", +      vty_out (vty, "%-15s %-15s %-5u %-5u %-6u %-6u %s\n",                 vn_addr_buf,                 un_addr_buf,                 rfapiApCount (rfd), @@ -4595,13 +4595,13 @@ rfapi_show_nves (      }    if (printed > 0 || vn_prefix || un_prefix) -    vty_outln (vty, "Displayed %d out of %d active NVEs", +    vty_out (vty, "Displayed %d out of %d active NVEs\n",               printed, total);    return 0;  notcfg: -  vty_outln (vty, "VNC is not configured."); +  vty_out (vty, "VNC is not configured.\n");    return CMD_WARNING;  } @@ -4734,7 +4734,7 @@ DEFUN (vnc_show_registrations_pfx,      {        if (!str2prefix (argv[3]->arg, &p))          { -          vty_outln (vty, "Invalid prefix: %s", argv[3]->arg); +          vty_out (vty, "Invalid prefix: %s\n", argv[3]->arg);            return CMD_SUCCESS;          }        else @@ -4774,7 +4774,7 @@ DEFUN (vnc_show_registrations_some_pfx,      {        if (!str2prefix (argv[4]->arg, &p))          { -          vty_outln (vty, "Invalid prefix: %s", argv[4]->arg); +          vty_out (vty, "Invalid prefix: %s\n", argv[4]->arg);            return CMD_SUCCESS;          }        else @@ -4831,7 +4831,7 @@ DEFUN (vnc_show_responses_pfx,      {        if (!str2prefix (argv[3]->arg, &p))          { -          vty_outln (vty, "Invalid prefix: %s", argv[3]->arg); +          vty_out (vty, "Invalid prefix: %s\n", argv[3]->arg);            return CMD_SUCCESS;          }        else @@ -4874,7 +4874,7 @@ DEFUN (vnc_show_responses_some_pfx,      {        if (!str2prefix (argv[4]->arg, &p))          { -          vty_outln (vty, "Invalid prefix: %s", argv[4]->arg); +          vty_out (vty, "Invalid prefix: %s\n", argv[4]->arg);            return CMD_SUCCESS;          }        else @@ -4923,7 +4923,7 @@ DEFUN (show_vnc_queries_pfx,      {        if (!str2prefix (argv[3]->arg, &pfx))          { -          vty_outln (vty, "Invalid prefix: %s", argv[3]->arg); +          vty_out (vty, "Invalid prefix: %s\n", argv[3]->arg);            return CMD_WARNING;          }        p = &pfx; @@ -4976,7 +4976,7 @@ DEFUN (vnc_clear_counters,    return CMD_SUCCESS;  notcfg: -  vty_outln (vty, "VNC is not configured."); +  vty_out (vty, "VNC is not configured.\n");    return CMD_WARNING;  } @@ -5006,12 +5006,12 @@ vnc_add_vrf_prefix (struct vty *vty,    bgp = bgp_get_default (); /* assume main instance for now */    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    if (!bgp->rfapi || !bgp->rfapi_cfg)      { -      vty_outln (vty, "VRF support not configured"); +      vty_out (vty, "VRF support not configured\n");        return CMD_WARNING;      } @@ -5150,7 +5150,7 @@ vnc_add_vrf_prefix (struct vty *vty,      }    vnc_zlog_debug_verbose ("%s: rfapi_register failed", __func__); -  vty_outln (vty, "Add failed."); +  vty_out (vty, "Add failed.\n");    return CMD_WARNING;  } @@ -5260,12 +5260,12 @@ vnc_clear_vrf (struct vty *vty,      bgp = bgp_get_default (); /* assume main instance for now */    if (!bgp)      { -      vty_outln (vty, "No BGP process is configured"); +      vty_out (vty, "No BGP process is configured\n");        return CMD_WARNING;      }    if (!bgp->rfapi || !bgp->rfapi_cfg)      { -      vty_outln (vty, "VRF support not configured"); +      vty_out (vty, "VRF support not configured\n");        return CMD_WARNING;      }    rfg = bgp_rfapi_cfg_match_byname (bgp,  arg_vrf, RFAPI_GROUP_CFG_VRF); @@ -5284,7 +5284,7 @@ vnc_clear_vrf (struct vty *vty,    start_count = rfapi_cfg_group_it_count(rfg);    clear_vnc_prefix (&cda);    clear_vnc_vrf_closer (rfg); -  vty_outln (vty, "Cleared %u out of %d prefixes.",  +  vty_out (vty, "Cleared %u out of %d prefixes.\n",              cda.pfx_count, start_count);    return CMD_SUCCESS;  } diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c index e43b152e50..58b762a637 100644 --- a/bgpd/rfapi/vnc_debug.c +++ b/bgpd/rfapi/vnc_debug.c @@ -79,13 +79,13 @@ DEFUN (debug_bgp_vnc,  	  else  	    {  	      term_vnc_debug |= vncdebug[i].bit; -	      vty_outln (vty, "BGP vnc %s debugging is on", +	      vty_out (vty, "BGP vnc %s debugging is on\n",  		vncdebug[i].name);  	    }  	  return CMD_SUCCESS;  	}      } -  vty_outln (vty, "Unknown debug flag: %s", argv[3]->arg); +  vty_out (vty, "Unknown debug flag: %s\n", argv[3]->arg);    return CMD_WARNING;  } @@ -118,13 +118,13 @@ DEFUN (no_debug_bgp_vnc,  	  else  	    {  	      term_vnc_debug &= ~vncdebug[i].bit; -	      vty_outln (vty, "BGP vnc %s debugging is off", +	      vty_out (vty, "BGP vnc %s debugging is off\n",  		vncdebug[i].name);  	    }  	  return CMD_SUCCESS;  	}      } -  vty_outln (vty, "Unknown debug flag: %s", argv[3]->arg); +  vty_out (vty, "Unknown debug flag: %s\n", argv[3]->arg);    return CMD_WARNING;  } @@ -144,7 +144,7 @@ DEFUN (no_debug_bgp_vnc_all,         VNC_STR)  {    term_vnc_debug = 0; -  vty_outln (vty, "All possible VNC debugging has been turned off"); +  vty_out (vty, "All possible VNC debugging has been turned off\n");    return CMD_SUCCESS;  } @@ -163,13 +163,13 @@ DEFUN (show_debugging_bgp_vnc,  {    size_t	i; -  vty_outln (vty, "BGP VNC debugging status:"); +  vty_out (vty, "BGP VNC debugging status:\n");    for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i)      {        if (term_vnc_debug & vncdebug[i].bit)  	{ -	  vty_outln (vty, "  BGP VNC %s debugging is on", +	  vty_out (vty, "  BGP VNC %s debugging is on\n",  	    vncdebug[i].name);  	}      } @@ -187,7 +187,7 @@ bgp_vnc_config_write_debug (struct vty *vty)      {        if (conf_vnc_debug & vncdebug[i].bit)  	{ -	  vty_outln (vty, "debug bgp vnc %s", vncdebug[i].name); +	  vty_out (vty, "debug bgp vnc %s\n", vncdebug[i].name);  	  write++;  	}      } diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index a32ccb58b0..b57e7f1bcf 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -84,7 +84,7 @@ config_write_debug (struct vty *vty)      if (conf_debug_eigrp_packet[i] == 0 && term_debug_eigrp_packet[i] == 0 )        continue; -    vty_outln (vty, "debug eigrp packet %s%s", +    vty_out (vty, "debug eigrp packet %s%s\n",               type_str[i],detail_str[conf_debug_eigrp_packet[i]]);      write = 1;    } @@ -210,7 +210,7 @@ void  show_ip_eigrp_interface_header (struct vty *vty, struct eigrp *eigrp)  { -  vty_outln (vty, "%s%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s", +  vty_out (vty, "%s%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s\n",             VTYNL,             "EIGRP interfaces for AS(",eigrp->AS,")",VTYNL,VTYNL,             "Interface", "Bandwidth", "Delay", "Peers", "Xmit Queue", "Mean", @@ -229,7 +229,7 @@ show_ip_eigrp_interface_sub (struct vty *vty, struct eigrp *eigrp,    vty_out (vty, "%-7u", ei->nbrs->count);    vty_out (vty, "%u %c %-10u",0,'/', eigrp_neighbor_packet_queue_sum (ei));    vty_out (vty, "%-7u %-14u %-12u %-8u", 0, 0, 0, 0); -  vty_outln (vty, "%-8u %-8u ", +  vty_out (vty, "%-8u %-8u \n",             IF_DEF_PARAMS (ei->ifp)->v_hello,             IF_DEF_PARAMS(ei->ifp)->v_wait);  } @@ -238,26 +238,26 @@ void  show_ip_eigrp_interface_detail (struct vty *vty, struct eigrp *eigrp,                                  struct eigrp_interface *ei)  { -  vty_outln (vty, "%-2s %s %d %-3s ","","Hello interval is ", 0, " sec"); -  vty_outln (vty, "%-2s %s %s ","", "Next xmit serial","<none>"); -  vty_outln (vty, "%-2s %s %d %s %d %s %d %s %d ", +  vty_out (vty, "%-2s %s %d %-3s \n","","Hello interval is ", 0, " sec"); +  vty_out (vty, "%-2s %s %s \n","", "Next xmit serial","<none>"); +  vty_out (vty, "%-2s %s %d %s %d %s %d %s %d \n",             "", "Un/reliable mcasts: ", 0, "/", 0, "Un/reliable ucasts: ",             0, "/", 0); -  vty_outln (vty, "%-2s %s %d %s %d %s %d ", +  vty_out (vty, "%-2s %s %d %s %d %s %d \n",             "", "Mcast exceptions: ", 0, "  CR packets: ",             0, "  ACKs supressed: ", 0); -  vty_outln (vty, "%-2s %s %d %s %d ", +  vty_out (vty, "%-2s %s %d %s %d \n",             "", "Retransmissions sent: ", 0, "Out-of-sequence rcvd: ",             0); -  vty_outln (vty, "%-2s %s %s %s ", +  vty_out (vty, "%-2s %s %s %s \n",             "", "Authentication mode is ", "not","set"); -  vty_outln (vty, "%-2s %s ", "", "Use multicast"); +  vty_out (vty, "%-2s %s \n", "", "Use multicast");  }  void  show_ip_eigrp_neighbor_header (struct vty *vty, struct eigrp *eigrp)  { -  vty_outln (vty, "%s%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s ", +  vty_out (vty, "%s%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s \n",             VTYNL,             "EIGRP neighbors for AS(",eigrp->AS,")",VTYNL,VTYNL,             "H", "Address", "Interface", "Hold", "Uptime", @@ -275,7 +275,7 @@ show_ip_eigrp_neighbor_sub (struct vty *vty, struct eigrp_neighbor *nbr,    vty_out (vty,"%-7lu", thread_timer_remain_second (nbr->t_holddown));    vty_out (vty,"%-8u %-6u %-5u", 0, 0, EIGRP_PACKET_RETRANS_TIME);    vty_out (vty,"%-7lu", nbr->retrans_queue->count); -  vty_outln (vty,"%u", nbr->recv_sequence_number); +  vty_out (vty,"%u\n", nbr->recv_sequence_number);    if (detail) @@ -285,7 +285,7 @@ show_ip_eigrp_neighbor_sub (struct vty *vty, struct eigrp_neighbor *nbr,                nbr->tlv_rel_major, nbr->tlv_rel_minor);        vty_out(vty,", Retrans: %lu, Retries: %lu",                nbr->retrans_queue->count, 0UL); -      vty_outln (vty,", %s", eigrp_nbr_state_str(nbr)); +      vty_out (vty,", %s\n", eigrp_nbr_state_str(nbr));      }  } @@ -298,7 +298,7 @@ show_ip_eigrp_topology_header (struct vty *vty, struct eigrp *eigrp)    struct in_addr router_id;    router_id.s_addr = eigrp->router_id; -  vty_outln (vty, "%sEIGRP Topology Table for AS(%d)/ID(%s)%s", +  vty_out (vty, "%sEIGRP Topology Table for AS(%d)/ID(%s)%s\n",             VTYNL, eigrp->AS, inet_ntoa(router_id), VTYNL);    vty_outln (vty, "Codes: P - Passive, A - Active, U - Update, Q - Query, "             "R - Reply%s       r - reply Status, s - sia Status%s", @@ -334,11 +334,11 @@ show_ip_eigrp_neighbor_entry (struct vty *vty, struct eigrp *eigrp,      }    if (te->adv_router == eigrp->neighbor_self) -    vty_outln (vty, "%-7s%s, %s", " ", "via Connected", +    vty_out (vty, "%-7s%s, %s\n", " ", "via Connected",               eigrp_if_name_string(te->ei));        else        { -        vty_outln (vty, "%-7s%s%s (%u/%u), %s", +        vty_out (vty, "%-7s%s%s (%u/%u), %s\n",  	               " ", "via ", inet_ntoa (te->adv_router->src),  	               te->distance, te->reported_distance,  	               eigrp_if_name_string(te->ei)); @@ -355,11 +355,11 @@ DEFUN (show_debugging_eigrp,  {    int i; -  vty_outln (vty, "EIGRP debugging status:"); +  vty_out (vty, "EIGRP debugging status:\n");    /* Show debug status for events. */    if (IS_DEBUG_EIGRP(event,EVENT)) -    vty_outln (vty, "  EIGRP event debugging is on"); +    vty_out (vty, "  EIGRP event debugging is on\n");    /* Show debug status for EIGRP Packets. */    for (i = 0; i < 11 ; i++) @@ -369,18 +369,18 @@ DEFUN (show_debugging_eigrp,        if (IS_DEBUG_EIGRP_PACKET (i, SEND) && IS_DEBUG_EIGRP_PACKET (i, RECV))          { -          vty_outln (vty, "  EIGRP packet %s%s debugging is on", +          vty_out (vty, "  EIGRP packet %s%s debugging is on\n",                       lookup_msg(eigrp_packet_type_str, i + 1, NULL),                       IS_DEBUG_EIGRP_PACKET (i, PACKET_DETAIL) ? " detail" : "");          }        else          {            if (IS_DEBUG_EIGRP_PACKET (i, SEND)) -            vty_outln (vty, "  EIGRP packet %s send%s debugging is on", +            vty_out (vty, "  EIGRP packet %s send%s debugging is on\n",                         lookup_msg(eigrp_packet_type_str, i + 1, NULL),                         IS_DEBUG_EIGRP_PACKET (i, PACKET_DETAIL) ? " detail" : "");            if (IS_DEBUG_EIGRP_PACKET (i, RECV)) -            vty_outln (vty, "  EIGRP packet %s receive%s debugging is on", +            vty_out (vty, "  EIGRP packet %s receive%s debugging is on\n",                         lookup_msg(eigrp_packet_type_str, i + 1, NULL),                         IS_DEBUG_EIGRP_PACKET (i, PACKET_DETAIL) ? " detail" : "");          } diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c index c0bb2afaf5..bf3fc216c0 100644 --- a/eigrpd/eigrp_neighbor.c +++ b/eigrpd/eigrp_neighbor.c @@ -366,7 +366,7 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)    if(vty != NULL)      {        vty_time_print (vty, 0); -      vty_outln (vty, "Neighbor %s (%s) is down: manually cleared", +      vty_out (vty, "Neighbor %s (%s) is down: manually cleared\n",                 inet_ntoa (nbr->src),                 ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));      } diff --git a/eigrpd/eigrp_routemap.c b/eigrpd/eigrp_routemap.c index 01fc970732..6714569140 100644 --- a/eigrpd/eigrp_routemap.c +++ b/eigrpd/eigrp_routemap.c @@ -154,10 +154,10 @@ eigrp_route_match_add (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% Can't find rule."); +          vty_out (vty, "%% Can't find rule.\n");            return CMD_WARNING;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% Argument is malformed."); +          vty_out (vty, "%% Argument is malformed.\n");            return CMD_WARNING;          }      } @@ -176,10 +176,10 @@ eigrp_route_match_delete (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% Can't find rule."); +          vty_out (vty, "%% Can't find rule.\n");            return CMD_WARNING;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% Argument is malformed."); +          vty_out (vty, "%% Argument is malformed.\n");            return CMD_WARNING;          }      } @@ -199,7 +199,7 @@ eigrp_route_set_add (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% Can't find rule."); +          vty_out (vty, "%% Can't find rule.\n");            return CMD_WARNING;          case RMAP_COMPILE_ERROR:            /* rip, ripng and other protocols share the set metric command @@ -207,7 +207,7 @@ eigrp_route_set_add (struct vty *vty, struct route_map_index *index,               if metric is out of range for rip and ripng, it is not for               other protocols. Do not return an error */            if (strcmp(command, "metric")) { -            vty_outln (vty, "%% Argument is malformed."); +            vty_out (vty, "%% Argument is malformed.\n");              return CMD_WARNING;            }          } @@ -228,10 +228,10 @@ eigrp_route_set_delete (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% Can't find rule."); +          vty_out (vty, "%% Can't find rule.\n");            return CMD_WARNING;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% Argument is malformed."); +          vty_out (vty, "%% Argument is malformed.\n");            return CMD_WARNING;          }      } @@ -1124,7 +1124,7 @@ DEFUN (set_ip_nexthop,    ret = str2sockunion (argv[0], &su);    if (ret < 0)      { -      vty_outln (vty, "%% Malformed next-hop address"); +      vty_out (vty, "%% Malformed next-hop address\n");        return CMD_WARNING;      } diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 24fd7074fa..93b2ceb9df 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -1047,7 +1047,7 @@ eigrp_update_send_GR (struct eigrp_neighbor *nbr, enum GR_type gr_type, struct v        if(vty != NULL)          {            vty_time_print (vty, 0); -          vty_outln (vty, "Neighbor %s (%s) is resync: manually cleared", +          vty_out (vty, "Neighbor %s (%s) is resync: manually cleared\n",                     inet_ntoa (nbr->src),                     ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));          } diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index e283c73653..5fceb85146 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -65,18 +65,18 @@ config_write_network (struct vty *vty, struct eigrp *eigrp)      if (rn->info)        {          /* Network print. */ -        vty_outln (vty, " network %s/%d ", +        vty_out (vty, " network %s/%d \n",                   inet_ntoa (rn->p.u.prefix4), rn->p.prefixlen);        }    if (eigrp->max_paths != EIGRP_MAX_PATHS_DEFAULT) -    vty_outln (vty, " maximum-paths %d", eigrp->max_paths); +    vty_out (vty, " maximum-paths %d\n", eigrp->max_paths);    if (eigrp->variance != EIGRP_VARIANCE_DEFAULT) -    vty_outln (vty, " variance %d", eigrp->variance); +    vty_out (vty, " variance %d\n", eigrp->variance);    /*Separate EIGRP configuration from the rest of the config*/ -  vty_outln (vty, "!"); +  vty_out (vty, "!\n");    return 0;  } @@ -89,39 +89,39 @@ config_write_interfaces (struct vty *vty, struct eigrp *eigrp)    for (ALL_LIST_ELEMENTS_RO (eigrp->eiflist, node, ei))      { -      vty_outln (vty, "interface %s", ei->ifp->name); +      vty_out (vty, "interface %s\n", ei->ifp->name);        if ((IF_DEF_PARAMS (ei->ifp)->auth_type) == EIGRP_AUTH_TYPE_MD5)          { -          vty_outln (vty, " ip authentication mode eigrp %d md5", eigrp->AS); +          vty_out (vty, " ip authentication mode eigrp %d md5\n", eigrp->AS);          }        if ((IF_DEF_PARAMS (ei->ifp)->auth_type) == EIGRP_AUTH_TYPE_SHA256)          { -          vty_outln (vty, " ip authentication mode eigrp %d hmac-sha-256", +          vty_out (vty, " ip authentication mode eigrp %d hmac-sha-256\n",                       eigrp->AS);          }        if(IF_DEF_PARAMS (ei->ifp)->auth_keychain)          { -          vty_outln (vty, " ip authentication key-chain eigrp %d %s",eigrp->AS, +          vty_out (vty, " ip authentication key-chain eigrp %d %s\n",eigrp->AS,                       IF_DEF_PARAMS(ei->ifp)->auth_keychain);          }        if ((IF_DEF_PARAMS (ei->ifp)->v_hello) != EIGRP_HELLO_INTERVAL_DEFAULT)          { -          vty_outln (vty, " ip hello-interval eigrp %d", +          vty_out (vty, " ip hello-interval eigrp %d\n",                       IF_DEF_PARAMS(ei->ifp)->v_hello);          }        if ((IF_DEF_PARAMS (ei->ifp)->v_wait) != EIGRP_HOLD_INTERVAL_DEFAULT)          { -          vty_outln (vty, " ip hold-time eigrp %d", +          vty_out (vty, " ip hold-time eigrp %d\n",                       IF_DEF_PARAMS(ei->ifp)->v_wait);          }        /*Separate this EIGRP interface configuration from the others*/ -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      }    return 0; @@ -134,23 +134,23 @@ eigrp_write_interface (struct vty *vty)    struct interface *ifp;    for (ALL_LIST_ELEMENTS_RO (vrf_iflist(VRF_DEFAULT), node, ifp)) { -    vty_outln (vty, "interface %s",ifp->name); +    vty_out (vty, "interface %s\n",ifp->name);      if (ifp->desc) -      vty_outln (vty, " description %s",ifp->desc); +      vty_out (vty, " description %s\n",ifp->desc);      if (IF_DEF_PARAMS (ifp)->bandwidth != EIGRP_BANDWIDTH_DEFAULT) -      vty_outln (vty, " bandwidth %u",IF_DEF_PARAMS(ifp)->bandwidth); +      vty_out (vty, " bandwidth %u\n",IF_DEF_PARAMS(ifp)->bandwidth);      if (IF_DEF_PARAMS (ifp)->delay != EIGRP_DELAY_DEFAULT) -      vty_outln (vty, " delay %u", IF_DEF_PARAMS(ifp)->delay); +      vty_out (vty, " delay %u\n", IF_DEF_PARAMS(ifp)->delay);      if (IF_DEF_PARAMS (ifp)->v_hello != EIGRP_HELLO_INTERVAL_DEFAULT) -      vty_outln (vty, " ip hello-interval eigrp %u", +      vty_out (vty, " ip hello-interval eigrp %u\n",                 IF_DEF_PARAMS(ifp)->v_hello);      if (IF_DEF_PARAMS (ifp)->v_wait != EIGRP_HOLD_INTERVAL_DEFAULT) -      vty_outln (vty, " ip hold-time eigrp %u", +      vty_out (vty, " ip hold-time eigrp %u\n",                 IF_DEF_PARAMS(ifp)->v_wait); -    vty_outln (vty, "!"); +    vty_out (vty, "!\n");    }    return 0; @@ -179,7 +179,7 @@ config_write_eigrp_router (struct vty *vty, struct eigrp *eigrp)    int write=0;    /* `router eigrp' print. */ -  vty_outln (vty, "router eigrp %d", eigrp->AS); +  vty_out (vty, "router eigrp %d\n", eigrp->AS);    write++; @@ -191,7 +191,7 @@ config_write_eigrp_router (struct vty *vty, struct eigrp *eigrp)      {        struct in_addr router_id_static;        router_id_static.s_addr = htonl(eigrp->router_id_static); -      vty_outln (vty, " eigrp router-id %s", +      vty_out (vty, " eigrp router-id %s\n",                 inet_ntoa(router_id_static));      } @@ -202,7 +202,7 @@ config_write_eigrp_router (struct vty *vty, struct eigrp *eigrp)    config_write_eigrp_distribute (vty, eigrp);    /*Separate EIGRP configuration from the rest of the config*/ -  vty_outln (vty, "!"); +  vty_out (vty, "!\n");    return write;  } @@ -235,7 +235,7 @@ DEFUN (no_router_eigrp,    eigrp = eigrp_lookup ();    if (eigrp->AS != atoi (argv[3]->arg))      { -      vty_outln (vty,"%% Attempting to deconfigure non-existent AS"); +      vty_out (vty,"%% Attempting to deconfigure non-existent AS\n");        return CMD_WARNING;      } @@ -393,7 +393,7 @@ DEFUN (eigrp_network,    if (ret == 0)      { -      vty_outln (vty, "There is already same network statement."); +      vty_out (vty, "There is already same network statement.\n");        return CMD_WARNING;      } @@ -417,7 +417,7 @@ DEFUN (no_eigrp_network,    if (ret == 0)    { -    vty_outln (vty,"Can't find specified network configuration."); +    vty_out (vty,"Can't find specified network configuration.\n");      return CMD_WARNING;    } @@ -465,7 +465,7 @@ DEFUN (show_ip_eigrp_topology,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -521,7 +521,7 @@ DEFUN (show_ip_eigrp_interfaces,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -568,7 +568,7 @@ DEFUN (show_ip_eigrp_neighbors,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -607,7 +607,7 @@ DEFUN (eigrp_if_delay,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -633,7 +633,7 @@ DEFUN (no_eigrp_if_delay,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -658,7 +658,7 @@ DEFUN (eigrp_if_bandwidth,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -684,7 +684,7 @@ DEFUN (no_eigrp_if_bandwidth,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -709,7 +709,7 @@ DEFUN (eigrp_if_ip_hellointerval,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -737,7 +737,7 @@ DEFUN (no_eigrp_if_ip_hellointerval,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -771,7 +771,7 @@ DEFUN (eigrp_if_ip_holdinterval,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -798,7 +798,7 @@ DEFUN (eigrp_ip_summary_address,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -826,7 +826,7 @@ DEFUN (no_eigrp_ip_summary_address,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -852,7 +852,7 @@ DEFUN (no_eigrp_if_ip_holdinterval,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -899,7 +899,7 @@ DEFUN (eigrp_authentication_mode,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -929,7 +929,7 @@ DEFUN (no_eigrp_authentication_mode,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -955,7 +955,7 @@ DEFUN (eigrp_authentication_keychain,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -971,7 +971,7 @@ DEFUN (eigrp_authentication_keychain,          IF_DEF_PARAMS (ifp)->auth_keychain = strdup(keychain->name);      }    else -    vty_outln (vty,"Key chain with specified name not found"); +    vty_out (vty,"Key chain with specified name not found\n");    return CMD_SUCCESS;  } @@ -993,7 +993,7 @@ DEFUN (no_eigrp_authentication_keychain,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1004,8 +1004,8 @@ DEFUN (no_eigrp_authentication_keychain,        IF_DEF_PARAMS (ifp)->auth_keychain = NULL;      }    else -    vty_outln (vty, -              "Key chain with specified name not configured on interface"); +    vty_out (vty, +              "Key chain with specified name not configured on interface\n");    return CMD_SUCCESS;  } @@ -1080,7 +1080,7 @@ DEFUN (eigrp_variance,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      }    variance = atoi(argv[1]->arg); @@ -1103,7 +1103,7 @@ DEFUN (no_eigrp_variance,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1126,7 +1126,7 @@ DEFUN (eigrp_maximum_paths,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1151,7 +1151,7 @@ DEFUN (no_eigrp_maximum_paths,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, "EIGRP Routing Process not enabled"); +      vty_out (vty, "EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1182,7 +1182,7 @@ DEFUN (clear_ip_eigrp_neighbors,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1201,7 +1201,7 @@ DEFUN (clear_ip_eigrp_neighbors,                            inet_ntoa (nbr->src),                            ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));                vty_time_print (vty, 0); -              vty_outln (vty, "Neighbor %s (%s) is down: manually cleared", +              vty_out (vty, "Neighbor %s (%s) is down: manually cleared\n",                         inet_ntoa (nbr->src),                         ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); @@ -1238,7 +1238,7 @@ DEFUN (clear_ip_eigrp_neighbors_int,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1247,7 +1247,7 @@ DEFUN (clear_ip_eigrp_neighbors_int,    ei = eigrp_if_lookup_by_name(eigrp, argv[idx]->arg);    if(ei == NULL)      { -      vty_outln (vty, " Interface (%s) doesn't exist", argv[idx]->arg); +      vty_out (vty, " Interface (%s) doesn't exist\n", argv[idx]->arg);        return CMD_WARNING;      } @@ -1263,7 +1263,7 @@ DEFUN (clear_ip_eigrp_neighbors_int,                        inet_ntoa (nbr->src),                        ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));            vty_time_print (vty, 0); -          vty_outln (vty, "Neighbor %s (%s) is down: manually cleared", +          vty_out (vty, "Neighbor %s (%s) is down: manually cleared\n",                     inet_ntoa (nbr->src),                     ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); @@ -1299,7 +1299,7 @@ DEFUN (clear_ip_eigrp_neighbors_IP,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1309,7 +1309,7 @@ DEFUN (clear_ip_eigrp_neighbors_IP,    /* if neighbor doesn't exists, notify user and exit */    if(nbr == NULL)      { -      vty_outln (vty, "Neighbor with entered address doesn't exists."); +      vty_out (vty, "Neighbor with entered address doesn't exists.\n");        return CMD_WARNING;      } @@ -1337,7 +1337,7 @@ DEFUN (clear_ip_eigrp_neighbors_soft,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1367,7 +1367,7 @@ DEFUN (clear_ip_eigrp_neighbors_int_soft,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1375,7 +1375,7 @@ DEFUN (clear_ip_eigrp_neighbors_int_soft,    ei = eigrp_if_lookup_by_name(eigrp, argv[4]->arg);    if(ei == NULL)      { -      vty_outln (vty, " Interface (%s) doesn't exist", argv[4]->arg); +      vty_out (vty, " Interface (%s) doesn't exist\n", argv[4]->arg);        return CMD_WARNING;      } @@ -1407,7 +1407,7 @@ DEFUN (clear_ip_eigrp_neighbors_IP_soft,    eigrp = eigrp_lookup ();    if (eigrp == NULL)      { -      vty_outln (vty, " EIGRP Routing Process not enabled"); +      vty_out (vty, " EIGRP Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -1417,7 +1417,7 @@ DEFUN (clear_ip_eigrp_neighbors_IP_soft,    /* if neighbor doesn't exists, notify user and exit */    if(nbr == NULL)      { -      vty_outln (vty, "Neighbor with entered address doesn't exists."); +      vty_out (vty, "Neighbor with entered address doesn't exists.\n");        return CMD_WARNING;      } diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c index efe5e6721b..513a3871ca 100644 --- a/isisd/isis_adjacency.c +++ b/isisd/isis_adjacency.c @@ -430,9 +430,9 @@ isis_adj_print_vty (struct isis_adjacency *adj, struct vty *vty, char detail)        vty_out (vty, VTYNL);        if (adj->mt_count != 1 || adj->mt_set[0] != ISIS_MT_IPV4_UNICAST)          { -          vty_outln (vty, "    Topologies:"); +          vty_out (vty, "    Topologies:\n");            for (unsigned int i = 0; i < adj->mt_count; i++) -            vty_outln (vty, "      %s", isis_mtid2str(adj->mt_set[i])); +            vty_out (vty, "      %s\n", isis_mtid2str(adj->mt_set[i]));          }        vty_out (vty, "    SNPA: %s", snpa_print (adj->snpa));        if (adj->circuit && (adj->circuit->circ_type == CIRCUIT_T_BROADCAST)) @@ -460,24 +460,24 @@ isis_adj_print_vty (struct isis_adjacency *adj, struct vty *vty, char detail)        if (adj->area_addrs && listcount (adj->area_addrs) > 0)          {            struct area_addr *area_addr; -          vty_outln (vty, "    Area Address(es):"); +          vty_out (vty, "    Area Address(es):\n");            for (ALL_LIST_ELEMENTS_RO (adj->area_addrs, node, area_addr)) -            vty_outln (vty, "      %s", +            vty_out (vty, "      %s\n",                         isonet_print(area_addr->area_addr, area_addr->addr_len));          }        if (adj->ipv4_addrs && listcount (adj->ipv4_addrs) > 0)  	{ -	  vty_outln (vty, "    IPv4 Address(es):"); +	  vty_out (vty, "    IPv4 Address(es):\n");  	  for (ALL_LIST_ELEMENTS_RO (adj->ipv4_addrs, node, ip_addr)) -            vty_outln (vty, "      %s", inet_ntoa(*ip_addr)); +            vty_out (vty, "      %s\n", inet_ntoa(*ip_addr));  	}        if (adj->ipv6_addrs && listcount (adj->ipv6_addrs) > 0)  	{ -	  vty_outln (vty, "    IPv6 Address(es):"); +	  vty_out (vty, "    IPv6 Address(es):\n");  	  for (ALL_LIST_ELEMENTS_RO (adj->ipv6_addrs, node, ipv6_addr))  	    {  	      inet_ntop (AF_INET6, ipv6_addr, (char *)ip6, INET6_ADDRSTRLEN); -	      vty_outln (vty, "      %s", ip6); +	      vty_out (vty, "      %s\n", ip6);  	    }  	}        vty_out (vty, VTYNL); diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index 73affa91dc..fae8cb0d87 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -902,7 +902,7 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,        vty_out (vty, VTYNL);        if (circuit->is_type & IS_LEVEL_1)          { -          vty_outln (vty, "    Level-1 Information:"); +          vty_out (vty, "    Level-1 Information:\n");            if (circuit->area->newmetric)              vty_out (vty, "      Metric: %d", circuit->te_metric[0]);            else @@ -910,7 +910,7 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,                       circuit->metric[0]);            if (!circuit->is_passive)              { -              vty_outln (vty, ", Active neighbors: %u", +              vty_out (vty, ", Active neighbors: %u\n",                         circuit->upadjcount[0]);                vty_outln (vty, "      Hello interval: %u, "                              "Holddown count: %u %s", @@ -922,7 +922,7 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,                         circuit->csnp_interval[0],                         circuit->psnp_interval[0]);                if (circuit->circ_type == CIRCUIT_T_BROADCAST) -                vty_outln (vty, "      LAN Priority: %u, %s", +                vty_out (vty, "      LAN Priority: %u, %s\n",                           circuit->priority[0],                           (circuit->u.bc.is_dr[0] ? "is DIS" : "is not DIS"));              } @@ -933,7 +933,7 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,          }        if (circuit->is_type & IS_LEVEL_2)          { -          vty_outln (vty, "    Level-2 Information:"); +          vty_out (vty, "    Level-2 Information:\n");            if (circuit->area->newmetric)              vty_out (vty, "      Metric: %d", circuit->te_metric[1]);            else @@ -941,7 +941,7 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,                       circuit->metric[1]);            if (!circuit->is_passive)              { -              vty_outln (vty, ", Active neighbors: %u", +              vty_out (vty, ", Active neighbors: %u\n",                         circuit->upadjcount[1]);                vty_outln (vty, "      Hello interval: %u, "                              "Holddown count: %u %s", @@ -953,7 +953,7 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,                         circuit->csnp_interval[1],                         circuit->psnp_interval[1]);                if (circuit->circ_type == CIRCUIT_T_BROADCAST) -                vty_outln (vty, "      LAN Priority: %u, %s", +                vty_out (vty, "      LAN Priority: %u, %s\n",                           circuit->priority[1],                           (circuit->u.bc.is_dr[1] ? "is DIS" : "is not DIS"));              } @@ -964,29 +964,29 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty,          }        if (circuit->ip_addrs && listcount (circuit->ip_addrs) > 0)          { -          vty_outln (vty, "    IP Prefix(es):"); +          vty_out (vty, "    IP Prefix(es):\n");            for (ALL_LIST_ELEMENTS_RO (circuit->ip_addrs, node, ip_addr))              {                prefix2str (ip_addr, buf, sizeof (buf)), -              vty_outln (vty, "      %s", buf); +              vty_out (vty, "      %s\n", buf);              }          }        if (circuit->ipv6_link && listcount(circuit->ipv6_link) > 0)          { -          vty_outln (vty, "    IPv6 Link-Locals:"); +          vty_out (vty, "    IPv6 Link-Locals:\n");            for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node, ip_addr))              {                prefix2str(ip_addr, (char*)buf, BUFSIZ), -              vty_outln (vty, "      %s", buf); +              vty_out (vty, "      %s\n", buf);              }          }        if (circuit->ipv6_non_link && listcount(circuit->ipv6_non_link) > 0)          { -          vty_outln (vty, "    IPv6 Prefixes:"); +          vty_out (vty, "    IPv6 Prefixes:\n");            for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node, ip_addr))              {                prefix2str(ip_addr, (char*)buf, BUFSIZ), -              vty_outln (vty, "      %s", buf); +              vty_out (vty, "      %s\n", buf);              }          } @@ -1011,12 +1011,12 @@ isis_interface_config_write (struct vty *vty)          continue;        /* IF name */ -      vty_outln (vty, "interface %s", ifp->name); +      vty_out (vty, "interface %s\n", ifp->name);        write++;        /* IF desc */        if (ifp->desc)          { -          vty_outln (vty, " description %s", ifp->desc); +          vty_out (vty, " description %s\n", ifp->desc);            write++;          }        /* ISIS Circuit */ @@ -1027,36 +1027,36 @@ isis_interface_config_write (struct vty *vty)              continue;            if (circuit->ip_router)              { -              vty_outln (vty, " ip router isis %s",area->area_tag); +              vty_out (vty, " ip router isis %s\n",area->area_tag);                write++;              }            if (circuit->is_passive)              { -              vty_outln (vty, " isis passive"); +              vty_out (vty, " isis passive\n");                write++;              }            if (circuit->circ_type_config == CIRCUIT_T_P2P)              { -              vty_outln (vty, " isis network point-to-point"); +              vty_out (vty, " isis network point-to-point\n");                write++;              }            if (circuit->ipv6_router)              { -              vty_outln (vty, " ipv6 router isis %s",area->area_tag); +              vty_out (vty, " ipv6 router isis %s\n",area->area_tag);                write++;              }            /* ISIS - circuit type */            if (circuit->is_type == IS_LEVEL_1)              { -              vty_outln (vty, " isis circuit-type level-1"); +              vty_out (vty, " isis circuit-type level-1\n");                write++;              }            else              {                if (circuit->is_type == IS_LEVEL_2)                  { -                  vty_outln (vty," isis circuit-type level-2-only"); +                  vty_out (vty," isis circuit-type level-2-only\n");                    write++;                  }              } @@ -1066,7 +1066,7 @@ isis_interface_config_write (struct vty *vty)              {                if (circuit->csnp_interval[0] != DEFAULT_CSNP_INTERVAL)                  { -                  vty_outln (vty, " isis csnp-interval %d", +                  vty_out (vty, " isis csnp-interval %d\n",                             circuit->csnp_interval[0]);                    write++;                  } @@ -1077,7 +1077,7 @@ isis_interface_config_write (struct vty *vty)                {                  if (circuit->csnp_interval[i] != DEFAULT_CSNP_INTERVAL)                    { -                    vty_outln (vty, " isis csnp-interval %d level-%d", +                    vty_out (vty, " isis csnp-interval %d level-%d\n",                               circuit->csnp_interval[i], i + 1);                      write++;                    } @@ -1089,7 +1089,7 @@ isis_interface_config_write (struct vty *vty)              {                if (circuit->psnp_interval[0] != DEFAULT_PSNP_INTERVAL)                  { -                  vty_outln (vty, " isis psnp-interval %d", +                  vty_out (vty, " isis psnp-interval %d\n",                             circuit->psnp_interval[0]);                    write++;                  } @@ -1100,7 +1100,7 @@ isis_interface_config_write (struct vty *vty)                  {                    if (circuit->psnp_interval[i] != DEFAULT_PSNP_INTERVAL)                    { -                    vty_outln (vty, " isis psnp-interval %d level-%d", +                    vty_out (vty, " isis psnp-interval %d level-%d\n",                               circuit->psnp_interval[i], i + 1);                      write++;                    } @@ -1110,7 +1110,7 @@ isis_interface_config_write (struct vty *vty)            /* ISIS - Hello padding - Defaults to true so only display if false */            if (circuit->pad_hellos == 0)              { -              vty_outln (vty, " no isis hello padding"); +              vty_out (vty, " no isis hello padding\n");                write++;              } @@ -1119,7 +1119,7 @@ isis_interface_config_write (struct vty *vty)              {                if (circuit->hello_interval[0] != DEFAULT_HELLO_INTERVAL)                  { -                  vty_outln (vty, " isis hello-interval %d", +                  vty_out (vty, " isis hello-interval %d\n",                             circuit->hello_interval[0]);                    write++;                  } @@ -1130,7 +1130,7 @@ isis_interface_config_write (struct vty *vty)                  {                    if (circuit->hello_interval[i] != DEFAULT_HELLO_INTERVAL)                      { -                      vty_outln (vty, " isis hello-interval %d level-%d", +                      vty_out (vty, " isis hello-interval %d level-%d\n",                                 circuit->hello_interval[i], i + 1);                        write++;                      } @@ -1142,7 +1142,7 @@ isis_interface_config_write (struct vty *vty)              {                if (circuit->hello_multiplier[0] != DEFAULT_HELLO_MULTIPLIER)                  { -                  vty_outln (vty, " isis hello-multiplier %d", +                  vty_out (vty, " isis hello-multiplier %d\n",                             circuit->hello_multiplier[0]);                    write++;                  } @@ -1153,7 +1153,7 @@ isis_interface_config_write (struct vty *vty)                  {                    if (circuit->hello_multiplier[i] != DEFAULT_HELLO_MULTIPLIER)                      { -                      vty_outln (vty, " isis hello-multiplier %d level-%d", +                      vty_out (vty, " isis hello-multiplier %d level-%d\n",                                 circuit->hello_multiplier[i],i + 1);                        write++;                      } @@ -1165,7 +1165,7 @@ isis_interface_config_write (struct vty *vty)              {                if (circuit->priority[0] != DEFAULT_PRIORITY)                  { -                  vty_outln (vty, " isis priority %d", +                  vty_out (vty, " isis priority %d\n",                             circuit->priority[0]);                    write++;                  } @@ -1176,7 +1176,7 @@ isis_interface_config_write (struct vty *vty)                  {                    if (circuit->priority[i] != DEFAULT_PRIORITY)                      { -                      vty_outln (vty, " isis priority %d level-%d", +                      vty_out (vty, " isis priority %d level-%d\n",                                 circuit->priority[i], i + 1);                        write++;                      } @@ -1188,7 +1188,7 @@ isis_interface_config_write (struct vty *vty)              {                if (circuit->te_metric[0] != DEFAULT_CIRCUIT_METRIC)                  { -                  vty_outln (vty, " isis metric %d",circuit->te_metric[0]); +                  vty_out (vty, " isis metric %d\n",circuit->te_metric[0]);                    write++;                  }              } @@ -1198,7 +1198,7 @@ isis_interface_config_write (struct vty *vty)                  {                    if (circuit->te_metric[i] != DEFAULT_CIRCUIT_METRIC)                      { -                      vty_outln (vty, " isis metric %d level-%d", +                      vty_out (vty, " isis metric %d level-%d\n",                                 circuit->te_metric[i], i + 1);                        write++;                      } @@ -1206,19 +1206,19 @@ isis_interface_config_write (struct vty *vty)              }            if (circuit->passwd.type == ISIS_PASSWD_TYPE_HMAC_MD5)              { -              vty_outln (vty, " isis password md5 %s", +              vty_out (vty, " isis password md5 %s\n",                           circuit->passwd.passwd);                write++;              }            else if (circuit->passwd.type == ISIS_PASSWD_TYPE_CLEARTXT)              { -              vty_outln (vty, " isis password clear %s", +              vty_out (vty, " isis password clear %s\n",                           circuit->passwd.passwd);                write++;              }            write += circuit_write_mt_settings(circuit, vty);          } -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      }    return write; diff --git a/isisd/isis_dynhn.c b/isisd/isis_dynhn.c index e124bb4675..35d573d30a 100644 --- a/isisd/isis_dynhn.c +++ b/isisd/isis_dynhn.c @@ -159,13 +159,13 @@ dynhn_print_all (struct vty *vty)    struct listnode *node;    struct isis_dynhn *dyn; -  vty_outln (vty, "Level  System ID      Dynamic Hostname"); +  vty_out (vty, "Level  System ID      Dynamic Hostname\n");    for (ALL_LIST_ELEMENTS_RO (dyn_cache, node, dyn))      {        vty_out (vty, "%-7d", dyn->level); -      vty_outln (vty, "%-15s%-15s", sysid_print (dyn->id),dyn->name.name); +      vty_out (vty, "%-15s%-15s\n", sysid_print (dyn->id),dyn->name.name);      } -  vty_outln (vty, "     * %s %s", sysid_print (isis->sysid),unix_hostname()); +  vty_out (vty, "     * %s %s\n", sysid_print (isis->sysid),unix_hostname());    return;  } diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index d0c4ccc306..2434229aca 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -824,7 +824,7 @@ lsp_print (struct isis_lsp *lsp, struct vty *vty, char dynhost)      }    else      vty_out (vty, " %5u    ", ntohs (lsp->lsp_header->rem_lifetime)); -  vty_outln (vty, "%s", +  vty_out (vty, "%s\n",             lsp_bits2string(&lsp->lsp_header->lsp_bits));  } @@ -842,12 +842,12 @@ lsp_print_mt_reach(struct list *list, struct vty *vty,        lspid_print(neigh->neigh_id, lspid, dynhost, 0);        if (mtid == ISIS_MT_IPV4_UNICAST)          { -          vty_outln(vty, "  Metric      : %-8u IS-Extended   : %s", +          vty_out(vty, "  Metric      : %-8u IS-Extended   : %s\n",                      GET_TE_METRIC(neigh), lspid);          }        else          { -          vty_outln(vty, "  Metric      : %-8u MT-Reach      : %s %s", +          vty_out(vty, "  Metric      : %-8u MT-Reach      : %s %s\n",                      GET_TE_METRIC(neigh), lspid,                      isis_mtid2str(mtid));          } @@ -955,7 +955,7 @@ lsp_print_detail (struct isis_lsp *lsp, struct vty *vty, char dynhost)    if (lsp->tlv_data.area_addrs)      for (ALL_LIST_ELEMENTS_RO (lsp->tlv_data.area_addrs, lnode, area_addr))        { -	vty_outln (vty, "  Area Address: %s", +	vty_out (vty, "  Area Address: %s\n",  		 isonet_print(area_addr->area_addr, area_addr->addr_len));        } @@ -968,11 +968,11 @@ lsp_print_detail (struct isis_lsp *lsp, struct vty *vty, char dynhost)  	    {  	    case NLPID_IP:  	    case NLPID_IPV6: -	      vty_outln (vty, "  NLPID       : 0x%X", +	      vty_out (vty, "  NLPID       : 0x%X\n",  		       lsp->tlv_data.nlpids->nlpids[i]);  	      break;  	    default: -	      vty_outln (vty, "  NLPID       : %s", "unknown"); +	      vty_out (vty, "  NLPID       : %s\n", "unknown");  	      break;  	    }  	} @@ -980,7 +980,7 @@ lsp_print_detail (struct isis_lsp *lsp, struct vty *vty, char dynhost)    for (ALL_LIST_ELEMENTS_RO(lsp->tlv_data.mt_router_info, lnode, mt_router_info))      { -      vty_outln (vty, "  MT          : %s%s", +      vty_out (vty, "  MT          : %s%s\n",                 isis_mtid2str(mt_router_info->mtid),                 mt_router_info->overload ? " (overload)" : "");      } @@ -991,16 +991,16 @@ lsp_print_detail (struct isis_lsp *lsp, struct vty *vty, char dynhost)        bzero (hostname, sizeof (hostname));        memcpy (hostname, lsp->tlv_data.hostname->name,  	      lsp->tlv_data.hostname->namelen); -      vty_outln (vty, "  Hostname    : %s", hostname); +      vty_out (vty, "  Hostname    : %s\n", hostname);      }    /* authentication tlv */    if (lsp->tlv_data.auth_info.type != ISIS_PASSWD_TYPE_UNUSED)      {        if (lsp->tlv_data.auth_info.type == ISIS_PASSWD_TYPE_HMAC_MD5) -        vty_outln (vty, "  Auth type   : md5"); +        vty_out (vty, "  Auth type   : md5\n");        else if (lsp->tlv_data.auth_info.type == ISIS_PASSWD_TYPE_CLEARTXT) -        vty_outln (vty, "  Auth type   : clear text"); +        vty_out (vty, "  Auth type   : clear text\n");      }    /* TE router id */ @@ -1008,14 +1008,14 @@ lsp_print_detail (struct isis_lsp *lsp, struct vty *vty, char dynhost)      {        memcpy (ipv4_address, inet_ntoa (lsp->tlv_data.router_id->id),  	      sizeof (ipv4_address)); -      vty_outln (vty, "  Router ID   : %s", ipv4_address); +      vty_out (vty, "  Router ID   : %s\n", ipv4_address);      }    if (lsp->tlv_data.ipv4_addrs)      for (ALL_LIST_ELEMENTS_RO (lsp->tlv_data.ipv4_addrs, lnode, ipv4_addr))        {          memcpy (ipv4_address, inet_ntoa (*ipv4_addr), sizeof (ipv4_address)); -        vty_outln (vty, "  IPv4 Address: %s", ipv4_address); +        vty_out (vty, "  IPv4 Address: %s\n", ipv4_address);        }    /* for the IS neighbor tlv */ diff --git a/isisd/isis_mt.c b/isisd/isis_mt.c index 9c3bc1fe6a..26e02498ba 100644 --- a/isisd/isis_mt.c +++ b/isisd/isis_mt.c @@ -193,7 +193,7 @@ area_write_mt_settings(struct isis_area *area, struct vty *vty)          {            if (setting->mtid == ISIS_MT_IPV4_UNICAST)              continue; /* always enabled, no need to write out config */ -          vty_outln (vty, " topology %s%s", name, +          vty_out (vty, " topology %s%s\n", name,                     setting->overload ? " overload" : "");            written++;          } @@ -325,7 +325,7 @@ circuit_write_mt_settings(struct isis_circuit *circuit, struct vty *vty)        const char *name = isis_mtid2str(setting->mtid);        if (name && !setting->enabled)          { -          vty_outln (vty, " no isis topology %s", name); +          vty_out (vty, " no isis topology %s\n", name);            written++;          }      } diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index 25fdf717b0..f4af3aef21 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -600,7 +600,7 @@ DEFUN (isis_redistribute,    if ((area->is_type & level) != level)      { -      vty_outln (vty, "Node is not a level-%d IS", level); +      vty_out (vty, "Node is not a level-%d IS\n", level);        return CMD_WARNING;      } @@ -702,7 +702,7 @@ DEFUN (isis_default_originate,    if ((area->is_type & level) != level)      { -      vty_outln (vty, "Node is not a level-%d IS", level); +      vty_out (vty, "Node is not a level-%d IS\n", level);        return CMD_WARNING;      } @@ -722,9 +722,9 @@ DEFUN (isis_default_originate,    if (family == AF_INET6 && originate_type != DEFAULT_ORIGINATE_ALWAYS)      { -      vty_outln (vty, -                "Zebra doesn't implement default-originate for IPv6 yet"); -      vty_outln (vty, "so use with care or use default-originate always."); +      vty_out (vty, +                "Zebra doesn't implement default-originate for IPv6 yet\n"); +      vty_out (vty, "so use with care or use default-originate always.\n");      }    isis_redist_set(area, level, family, DEFAULT_ROUTE, metric, routemap, originate_type); diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index f19c813360..ac6ba59a7a 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1396,7 +1396,7 @@ DEFUN (show_isis_topology,    for (ALL_LIST_ELEMENTS_RO (isis->area_list, node, area))      { -      vty_outln (vty, "Area %s:",area->area_tag ? area->area_tag : "null"); +      vty_out (vty, "Area %s:\n",area->area_tag ? area->area_tag : "null");        for (int level = ISIS_LEVEL1; level <= ISIS_LEVELS; level++)  	{ @@ -1406,7 +1406,7 @@ DEFUN (show_isis_topology,  	  if (area->ip_circuits > 0 && area->spftree[level-1]  	      && area->spftree[level-1]->paths->count > 0)  	    { -	      vty_outln (vty, "IS-IS paths to level-%d routers that speak IP", +	      vty_out (vty, "IS-IS paths to level-%d routers that speak IP\n",  		       level);  	      isis_print_paths (vty, area->spftree[level-1]->paths, isis->sysid);  	      vty_out (vty, VTYNL); @@ -1414,8 +1414,8 @@ DEFUN (show_isis_topology,  	  if (area->ipv6_circuits > 0 && area->spftree6[level-1]  	      && area->spftree6[level-1]->paths->count > 0)  	    { -	      vty_outln (vty, -		       "IS-IS paths to level-%d routers that speak IPv6", +	      vty_out (vty, +		       "IS-IS paths to level-%d routers that speak IPv6\n",  		       level);  	      isis_print_paths (vty, area->spftree6[level-1]->paths, isis->sysid);  	      vty_out (vty, VTYNL); diff --git a/isisd/isis_te.c b/isisd/isis_te.c index c4a0b9230b..613fe8e4f0 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -685,7 +685,7 @@ show_vty_subtlv_admin_grp (struct vty *vty, struct te_subtlv_admin_grp *tlv)  {    if (vty != NULL) -    vty_outln (vty, "    Administrative Group: 0x%x", +    vty_out (vty, "    Administrative Group: 0x%x\n",               (u_int32_t)ntohl(tlv->value));        else          zlog_debug ("      Administrative Group: 0x%x", @@ -699,8 +699,8 @@ show_vty_subtlv_llri (struct vty *vty, struct te_subtlv_llri *tlv)  {    if (vty != NULL)      { -      vty_outln (vty, "    Link Local  ID: %d",(u_int32_t)ntohl(tlv->local)); -      vty_outln (vty, "    Link Remote ID: %d", +      vty_out (vty, "    Link Local  ID: %d\n",(u_int32_t)ntohl(tlv->local)); +      vty_out (vty, "    Link Remote ID: %d\n",                   (u_int32_t)ntohl(tlv->remote));      }    else @@ -716,7 +716,7 @@ static u_char  show_vty_subtlv_local_ipaddr (struct vty *vty, struct te_subtlv_local_ipaddr *tlv)  {    if (vty != NULL) -    vty_outln (vty, "    Local Interface IP Address(es): %s", +    vty_out (vty, "    Local Interface IP Address(es): %s\n",                 inet_ntoa(tlv->value));      else        zlog_debug ("      Local Interface IP Address(es): %s", inet_ntoa (tlv->value)); @@ -728,7 +728,7 @@ static u_char  show_vty_subtlv_rmt_ipaddr (struct vty *vty, struct te_subtlv_rmt_ipaddr *tlv)  {    if (vty != NULL) -    vty_outln (vty, "    Remote Interface IP Address(es): %s", +    vty_out (vty, "    Remote Interface IP Address(es): %s\n",                 inet_ntoa(tlv->value));      else        zlog_debug ("      Remote Interface IP Address(es): %s", inet_ntoa (tlv->value)); @@ -744,7 +744,7 @@ show_vty_subtlv_max_bw (struct vty *vty, struct te_subtlv_max_bw *tlv)    fval = ntohf (tlv->value);    if (vty != NULL) -    vty_outln (vty, "    Maximum Bandwidth: %g (Bytes/sec)", fval); +    vty_out (vty, "    Maximum Bandwidth: %g (Bytes/sec)\n", fval);    else      zlog_debug ("      Maximum Bandwidth: %g (Bytes/sec)", fval); @@ -759,7 +759,7 @@ show_vty_subtlv_max_rsv_bw (struct vty *vty, struct te_subtlv_max_rsv_bw *tlv)    fval = ntohf (tlv->value);    if (vty != NULL) -    vty_outln (vty, "    Maximum Reservable Bandwidth: %g (Bytes/sec)",fval); +    vty_out (vty, "    Maximum Reservable Bandwidth: %g (Bytes/sec)\n",fval);    else      zlog_debug ("      Maximum Reservable Bandwidth: %g (Bytes/sec)", fval); @@ -773,7 +773,7 @@ show_vty_subtlv_unrsv_bw (struct vty *vty, struct te_subtlv_unrsv_bw *tlv)    int i;    if (vty != NULL) -    vty_outln (vty, "    Unreserved Bandwidth:"); +    vty_out (vty, "    Unreserved Bandwidth:\n");    else      zlog_debug ("      Unreserved Bandwidth:"); @@ -782,7 +782,7 @@ show_vty_subtlv_unrsv_bw (struct vty *vty, struct te_subtlv_unrsv_bw *tlv)        fval1 = ntohf (tlv->value[i]);        fval2 = ntohf (tlv->value[i+1]);        if (vty != NULL) -        vty_outln (vty, "      [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)", i, fval1, i+1, +        vty_out (vty, "      [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)\n", i, fval1, i+1,                     fval2);        else          zlog_debug ("        [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)", i, fval1, i+1, fval2); @@ -798,7 +798,7 @@ show_vty_subtlv_te_metric (struct vty *vty, struct te_subtlv_te_metric *tlv)    te_metric = tlv->value[2] | tlv->value[1] << 8 | tlv->value[0] << 16;    if (vty != NULL) -    vty_outln (vty, "    Traffic Engineering Metric: %u", te_metric); +    vty_out (vty, "    Traffic Engineering Metric: %u\n", te_metric);    else      zlog_debug ("      Traffic Engineering Metric: %u", te_metric); @@ -809,7 +809,7 @@ static u_char  show_vty_subtlv_ras (struct vty *vty, struct te_subtlv_ras *tlv)  {    if (vty != NULL) -    vty_outln (vty, "    Inter-AS TE Remote AS number: %u", +    vty_out (vty, "    Inter-AS TE Remote AS number: %u\n",                 ntohl(tlv->value));      else        zlog_debug ("      Inter-AS TE Remote AS number: %u", ntohl (tlv->value)); @@ -821,7 +821,7 @@ static u_char  show_vty_subtlv_rip (struct vty *vty, struct te_subtlv_rip *tlv)  {    if (vty != NULL) -    vty_outln (vty, "    Inter-AS TE Remote ASBR IP address: %s", +    vty_out (vty, "    Inter-AS TE Remote ASBR IP address: %s\n",                 inet_ntoa(tlv->value));      else        zlog_debug ("      Inter-AS TE Remote ASBR IP address: %s", inet_ntoa (tlv->value)); @@ -839,7 +839,7 @@ show_vty_subtlv_av_delay (struct vty *vty, struct te_subtlv_av_delay *tlv)    A = (u_int32_t) ntohl (tlv->value) & TE_EXT_ANORMAL;    if (vty != NULL) -    vty_outln (vty, "    %s Average Link Delay: %d (micro-sec)", A ? "Anomalous" : "Normal", +    vty_out (vty, "    %s Average Link Delay: %d (micro-sec)\n", A ? "Anomalous" : "Normal",                 delay);    else      zlog_debug ("      %s Average Link Delay: %d (micro-sec)", A ? "Anomalous" : "Normal", delay); @@ -858,7 +858,7 @@ show_vty_subtlv_mm_delay (struct vty *vty, struct te_subtlv_mm_delay *tlv)    high = (u_int32_t) ntohl (tlv->high) & TE_EXT_MASK;    if (vty != NULL) -    vty_outln (vty, "    %s Min/Max Link Delay: %d / %d (micro-sec)", A ? "Anomalous" : "Normal", low, +    vty_out (vty, "    %s Min/Max Link Delay: %d / %d (micro-sec)\n", A ? "Anomalous" : "Normal", low,                 high);    else      zlog_debug ("      %s Min/Max Link Delay: %d / %d (micro-sec)", A ? "Anomalous" : "Normal", low, high); @@ -874,7 +874,7 @@ show_vty_subtlv_delay_var (struct vty *vty, struct te_subtlv_delay_var *tlv)    jitter = (u_int32_t) ntohl (tlv->value) & TE_EXT_MASK;    if (vty != NULL) -    vty_outln (vty, "    Delay Variation: %d (micro-sec)", jitter); +    vty_out (vty, "    Delay Variation: %d (micro-sec)\n", jitter);    else      zlog_debug ("      Delay Variation: %d (micro-sec)", jitter); @@ -893,7 +893,7 @@ show_vty_subtlv_pkt_loss (struct vty *vty, struct te_subtlv_pkt_loss *tlv)    A = (u_int32_t) ntohl (tlv->value) & TE_EXT_ANORMAL;    if (vty != NULL) -    vty_outln (vty, "    %s Link Packet Loss: %g (%%)", A ? "Anomalous" : "Normal", +    vty_out (vty, "    %s Link Packet Loss: %g (%%)\n", A ? "Anomalous" : "Normal",                 fval);    else      zlog_debug ("      %s Link Packet Loss: %g (%%)", A ? "Anomalous" : "Normal", fval); @@ -909,7 +909,7 @@ show_vty_subtlv_res_bw (struct vty *vty, struct te_subtlv_res_bw *tlv)    fval = ntohf(tlv->value);    if (vty != NULL) -    vty_outln (vty, "    Unidirectional Residual Bandwidth: %g (Bytes/sec)", +    vty_out (vty, "    Unidirectional Residual Bandwidth: %g (Bytes/sec)\n",                 fval);    else      zlog_debug ("      Unidirectional Residual Bandwidth: %g (Bytes/sec)", fval); @@ -925,7 +925,7 @@ show_vty_subtlv_ava_bw (struct vty *vty, struct te_subtlv_ava_bw *tlv)    fval = ntohf (tlv->value);    if (vty != NULL) -    vty_outln (vty, "    Unidirectional Available Bandwidth: %g (Bytes/sec)", +    vty_out (vty, "    Unidirectional Available Bandwidth: %g (Bytes/sec)\n",                 fval);    else      zlog_debug ("      Unidirectional Available Bandwidth: %g (Bytes/sec)", fval); @@ -941,7 +941,7 @@ show_vty_subtlv_use_bw (struct vty *vty, struct te_subtlv_use_bw *tlv)    fval = ntohf (tlv->value);    if (vty != NULL) -    vty_outln (vty, "    Unidirectional Utilized Bandwidth: %g (Bytes/sec)", +    vty_out (vty, "    Unidirectional Utilized Bandwidth: %g (Bytes/sec)\n",                 fval);    else      zlog_debug ("      Unidirectional Utilized Bandwidth: %g (Bytes/sec)", fval); @@ -959,7 +959,7 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)      {        if (tlvh->length != 0)          { -          vty_outln (vty, "    Unknown TLV: [type(%#.2x), length(%#.2x)]", +          vty_out (vty, "    Unknown TLV: [type(%#.2x), length(%#.2x)]\n",                tlvh->type, tlvh->length);            vty_out(vty, "       Dump: [00]");            rtn = 1;          /* initialize end of line counter */ @@ -977,7 +977,7 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)            vty_out (vty, VTYNL);          }        else -        vty_outln (vty, "    Unknown TLV: [type(%#.2x), length(%#.2x)]", +        vty_out (vty, "    Unknown TLV: [type(%#.2x), length(%#.2x)]\n",              tlvh->type, tlvh->length);      }    else @@ -1069,8 +1069,8 @@ isis_mpls_te_config_write_router (struct vty *vty)  {    if (IS_MPLS_TE(isisMplsTE))      { -      vty_outln (vty, "  mpls-te on"); -      vty_outln (vty, "  mpls-te router-address %s", +      vty_out (vty, "  mpls-te on\n"); +      vty_out (vty, "  mpls-te router-address %s\n",                 inet_ntoa(isisMplsTE.router_id));      } @@ -1173,7 +1173,7 @@ DEFUN (isis_mpls_te_router_addr,    if (! inet_aton (argv[idx_ipv4]->arg, &value))      { -      vty_outln (vty, "Please specify Router-Addr by A.B.C.D"); +      vty_out (vty, "Please specify Router-Addr by A.B.C.D\n");        return CMD_WARNING;      } @@ -1201,7 +1201,7 @@ DEFUN (isis_mpls_te_inter_as,         "AREA native mode self originate INTER-AS LSP with L1 and L2 flooding scope)\n"         "AS native mode self originate INTER-AS LSP with L2 only flooding scope\n")  { -  vty_outln (vty, "Not yet supported"); +  vty_out (vty, "Not yet supported\n");    return CMD_SUCCESS;  } @@ -1213,7 +1213,7 @@ DEFUN (no_isis_mpls_te_inter_as,         "Disable MPLS-TE Inter-AS support\n")  { -  vty_outln (vty, "Not yet supported"); +  vty_out (vty, "Not yet supported\n");    return CMD_SUCCESS;  } @@ -1227,16 +1227,16 @@ DEFUN (show_isis_mpls_te_router,  {    if (IS_MPLS_TE(isisMplsTE))      { -      vty_outln (vty, "--- MPLS-TE router parameters ---"); +      vty_out (vty, "--- MPLS-TE router parameters ---\n");        if (ntohs (isisMplsTE.router_id.s_addr) != 0) -        vty_outln (vty, "  Router-Address: %s", +        vty_out (vty, "  Router-Address: %s\n",                     inet_ntoa(isisMplsTE.router_id));          else -          vty_outln (vty, "  N/A"); +          vty_out (vty, "  N/A\n");      }    else -    vty_outln (vty, "  MPLS-TE is disable on this router"); +    vty_out (vty, "  MPLS-TE is disable on this router\n");    return CMD_SUCCESS;  } @@ -1254,21 +1254,21 @@ show_mpls_te_sub (struct vty *vty, struct interface *ifp)          {            if (IS_INTER_AS(mtc->type))              { -              vty_outln (vty, "-- Inter-AS TEv2 link parameters for %s --", +              vty_out (vty, "-- Inter-AS TEv2 link parameters for %s --\n",                         ifp->name);              }            else              {                /* MPLS-TE is not activate on this interface */                /* or this interface is passive and Inter-AS TEv2 is not activate */ -              vty_outln (vty, "  %s: MPLS-TE is disabled on this interface", +              vty_out (vty, "  %s: MPLS-TE is disabled on this interface\n",                         ifp->name);                return;              }          }        else          { -          vty_outln (vty, "-- MPLS-TE link parameters for %s --", +          vty_out (vty, "-- MPLS-TE link parameters for %s --\n",                     ifp->name);          } @@ -1299,11 +1299,11 @@ show_mpls_te_sub (struct vty *vty, struct interface *ifp)        show_vty_subtlv_res_bw (vty, &mtc->res_bw);        show_vty_subtlv_ava_bw (vty, &mtc->ava_bw);        show_vty_subtlv_use_bw (vty, &mtc->use_bw); -      vty_outln (vty, "---------------%s", VTYNL); +      vty_out (vty, "---------------%s\n", VTYNL);      }    else      { -      vty_outln (vty, "  %s: MPLS-TE is disabled on this interface", +      vty_out (vty, "  %s: MPLS-TE is disabled on this interface\n",                 ifp->name);      } @@ -1333,7 +1333,7 @@ DEFUN (show_isis_mpls_te_interface,    else      {        if ((ifp = if_lookup_by_name (argv[idx_interface]->arg, VRF_DEFAULT)) == NULL) -        vty_outln (vty, "No such interface name"); +        vty_out (vty, "No such interface name\n");        else          show_mpls_te_sub (vty, ifp);      } diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index f0e2831bff..bccf8d428f 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -40,14 +40,14 @@ isis_circuit_lookup (struct vty *vty)    if (!ifp)      { -      vty_outln (vty, "Invalid interface "); +      vty_out (vty, "Invalid interface \n");        return NULL;      }    circuit = circuit_scan_by_ifp (ifp);    if (!circuit)      { -      vty_outln (vty, "ISIS is not enabled on circuit %s", +      vty_out (vty, "ISIS is not enabled on circuit %s\n",                 ifp->name);        return NULL;      } @@ -77,7 +77,7 @@ DEFUN (ip_router_isis,      {        if (strcmp (circuit->area->area_tag, area_tag))          { -          vty_outln (vty, "ISIS circuit is already defined on %s", +          vty_out (vty, "ISIS circuit is already defined on %s\n",                     circuit->area->area_tag);            return CMD_ERR_NOTHING_TODO;          } @@ -92,7 +92,7 @@ DEFUN (ip_router_isis,      if (circuit->state != C_STATE_CONF && circuit->state != C_STATE_UP)        { -        vty_outln (vty, "Couldn't bring up interface, please check log."); +        vty_out (vty, "Couldn't bring up interface, please check log.\n");          return CMD_WARNING;        }    } @@ -139,7 +139,7 @@ DEFUN (no_ip_router_isis,    area = isis_area_lookup (area_tag);    if (!area)      { -      vty_outln (vty, "Can't find ISIS instance %s", +      vty_out (vty, "Can't find ISIS instance %s\n",                 argv[idx_afi]->arg);        return CMD_ERR_NO_MATCH;      } @@ -147,7 +147,7 @@ DEFUN (no_ip_router_isis,    circuit = circuit_lookup_by_ifp (ifp, area->circuit_list);    if (!circuit)      { -      vty_outln (vty, "ISIS is not enabled on circuit %s", +      vty_out (vty, "ISIS is not enabled on circuit %s\n",                 ifp->name);        return CMD_ERR_NO_MATCH;      } @@ -189,7 +189,7 @@ DEFUN (no_isis_passive,    if (if_is_loopback (circuit->interface))      { -      vty_outln (vty,"Can't set no passive for loopback interface"); +      vty_out (vty,"Can't set no passive for loopback interface\n");        return CMD_ERR_AMBIGUOUS;      } @@ -215,7 +215,7 @@ DEFUN (isis_circuit_type,    is_type = string2circuit_t (argv[idx_level]->arg);    if (!is_type)      { -      vty_outln (vty, "Unknown circuit-type "); +      vty_out (vty, "Unknown circuit-type \n");        return CMD_ERR_AMBIGUOUS;      } @@ -223,7 +223,7 @@ DEFUN (isis_circuit_type,        circuit->area->is_type != IS_LEVEL_1_AND_2 &&        circuit->area->is_type != is_type)      { -      vty_outln (vty, "Invalid circuit level for area %s.", +      vty_out (vty, "Invalid circuit level for area %s.\n",                 circuit->area->area_tag);        return CMD_ERR_AMBIGUOUS;      } @@ -324,7 +324,7 @@ DEFUN (isis_passwd,      rv = isis_circuit_passwd_cleartext_set(circuit, argv[idx_word]->arg);    if (rv)      { -      vty_outln (vty, "Too long circuit password (>254)"); +      vty_out (vty, "Too long circuit password (>254)\n");        return CMD_ERR_AMBIGUOUS;      } @@ -367,7 +367,7 @@ DEFUN (isis_priority,    prio = atoi (argv[idx_number]->arg);    if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)      { -      vty_outln (vty, "Invalid priority %d - should be <0-127>", +      vty_out (vty, "Invalid priority %d - should be <0-127>\n",                 prio);        return CMD_ERR_AMBIGUOUS;      } @@ -414,7 +414,7 @@ DEFUN (isis_priority_l1,    prio = atoi (argv[idx_number]->arg);    if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)      { -      vty_outln (vty, "Invalid priority %d - should be <0-127>", +      vty_out (vty, "Invalid priority %d - should be <0-127>\n",                 prio);        return CMD_ERR_AMBIGUOUS;      } @@ -460,7 +460,7 @@ DEFUN (isis_priority_l2,    prio = atoi (argv[idx_number]->arg);    if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)      { -      vty_outln (vty, "Invalid priority %d - should be <0-127>", +      vty_out (vty, "Invalid priority %d - should be <0-127>\n",                 prio);        return CMD_ERR_AMBIGUOUS;      } @@ -684,7 +684,7 @@ DEFUN (isis_hello_interval,    interval = atoi (argv[idx_number]->arg);    if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)      { -      vty_outln (vty, "Invalid hello-interval %d - should be <1-600>", +      vty_out (vty, "Invalid hello-interval %d - should be <1-600>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -732,7 +732,7 @@ DEFUN (isis_hello_interval_l1,    interval = atoi (argv[idx_number]->arg);    if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)      { -      vty_outln (vty, "Invalid hello-interval %ld - should be <1-600>", +      vty_out (vty, "Invalid hello-interval %ld - should be <1-600>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -779,7 +779,7 @@ DEFUN (isis_hello_interval_l2,    interval = atoi (argv[idx_number]->arg);    if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)      { -      vty_outln (vty, "Invalid hello-interval %ld - should be <1-600>", +      vty_out (vty, "Invalid hello-interval %ld - should be <1-600>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -825,7 +825,7 @@ DEFUN (isis_hello_multiplier,    mult = atoi (argv[idx_number]->arg);    if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)      { -      vty_outln (vty, "Invalid hello-multiplier %d - should be <2-100>", +      vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>\n",                 mult);        return CMD_ERR_AMBIGUOUS;      } @@ -873,7 +873,7 @@ DEFUN (isis_hello_multiplier_l1,    mult = atoi (argv[idx_number]->arg);    if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)      { -      vty_outln (vty, "Invalid hello-multiplier %d - should be <2-100>", +      vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>\n",                 mult);        return CMD_ERR_AMBIGUOUS;      } @@ -920,7 +920,7 @@ DEFUN (isis_hello_multiplier_l2,    mult = atoi (argv[idx_number]->arg);    if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)      { -      vty_outln (vty, "Invalid hello-multiplier %d - should be <2-100>", +      vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>\n",                 mult);        return CMD_ERR_AMBIGUOUS;      } @@ -999,7 +999,7 @@ DEFUN (csnp_interval,    interval = atol (argv[idx_number]->arg);    if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)      { -      vty_outln (vty, "Invalid csnp-interval %lu - should be <1-600>", +      vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -1047,7 +1047,7 @@ DEFUN (csnp_interval_l1,    interval = atol (argv[idx_number]->arg);    if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)      { -      vty_outln (vty, "Invalid csnp-interval %lu - should be <1-600>", +      vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -1094,7 +1094,7 @@ DEFUN (csnp_interval_l2,    interval = atol (argv[idx_number]->arg);    if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)      { -      vty_outln (vty, "Invalid csnp-interval %lu - should be <1-600>", +      vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -1140,7 +1140,7 @@ DEFUN (psnp_interval,    interval = atol (argv[idx_number]->arg);    if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)      { -      vty_outln (vty, "Invalid psnp-interval %lu - should be <1-120>", +      vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -1188,7 +1188,7 @@ DEFUN (psnp_interval_l1,    interval = atol (argv[idx_number]->arg);    if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)      { -      vty_outln (vty, "Invalid psnp-interval %lu - should be <1-120>", +      vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -1235,7 +1235,7 @@ DEFUN (psnp_interval_l2,    interval = atol (argv[idx_number]->arg);    if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)      { -      vty_outln (vty, "Invalid psnp-interval %lu - should be <1-120>", +      vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>\n",                 interval);        return CMD_ERR_AMBIGUOUS;      } @@ -1279,14 +1279,14 @@ DEFUN (circuit_topology,    if (circuit->area && circuit->area->oldmetric)      { -      vty_outln (vty, -                 "Multi topology IS-IS can only be used with wide metrics"); +      vty_out (vty, +                 "Multi topology IS-IS can only be used with wide metrics\n");        return CMD_ERR_AMBIGUOUS;      }    if (mtid == (uint16_t)-1)      { -      vty_outln (vty, "Don't know topology '%s'", arg); +      vty_out (vty, "Don't know topology '%s'\n", arg);        return CMD_ERR_AMBIGUOUS;      } @@ -1309,14 +1309,14 @@ DEFUN (no_circuit_topology,    if (circuit->area && circuit->area->oldmetric)      { -      vty_outln (vty, -                 "Multi topology IS-IS can only be used with wide metrics"); +      vty_out (vty, +                 "Multi topology IS-IS can only be used with wide metrics\n");        return CMD_ERR_AMBIGUOUS;      }    if (mtid == (uint16_t)-1)      { -      vty_outln (vty, "Don't know topology '%s'", arg); +      vty_out (vty, "Don't know topology '%s'\n", arg);        return CMD_ERR_AMBIGUOUS;      } @@ -1334,7 +1334,7 @@ validate_metric_style_narrow (struct vty *vty, struct isis_area *area)    if (! area)      { -      vty_outln (vty, "ISIS area is invalid"); +      vty_out (vty, "ISIS area is invalid\n");        return CMD_ERR_AMBIGUOUS;      } @@ -1344,7 +1344,7 @@ validate_metric_style_narrow (struct vty *vty, struct isis_area *area)            (circuit->is_type & IS_LEVEL_1) &&            (circuit->te_metric[0] > MAX_NARROW_LINK_METRIC))          { -          vty_outln (vty, "ISIS circuit %s metric is invalid", +          vty_out (vty, "ISIS circuit %s metric is invalid\n",                     circuit->interface->name);            return CMD_ERR_AMBIGUOUS;          } @@ -1352,7 +1352,7 @@ validate_metric_style_narrow (struct vty *vty, struct isis_area *area)            (circuit->is_type & IS_LEVEL_2) &&            (circuit->te_metric[1] > MAX_NARROW_LINK_METRIC))          { -          vty_outln (vty, "ISIS circuit %s metric is invalid", +          vty_out (vty, "ISIS circuit %s metric is invalid\n",                     circuit->interface->name);            return CMD_ERR_AMBIGUOUS;          } @@ -1381,8 +1381,8 @@ DEFUN (metric_style,    if (area_is_mt(area))      { -      vty_outln (vty, -                 "Narrow metrics cannot be used while multi topology IS-IS is active"); +      vty_out (vty, +                 "Narrow metrics cannot be used while multi topology IS-IS is active\n");        return CMD_ERR_AMBIGUOUS;      } @@ -1410,8 +1410,8 @@ DEFUN (no_metric_style,    if (area_is_mt(area))      { -      vty_outln (vty, -                 "Narrow metrics cannot be used while multi topology IS-IS is active"); +      vty_out (vty, +                 "Narrow metrics cannot be used while multi topology IS-IS is active\n");        return CMD_ERR_AMBIGUOUS;      } @@ -1506,7 +1506,7 @@ static int area_lsp_mtu_set(struct vty *vty, unsigned int lsp_mtu)          continue;        if(lsp_mtu > isis_circuit_pdu_size(circuit))          { -          vty_outln (vty, "ISIS area contains circuit %s, which has a maximum PDU size of %zu.", +          vty_out (vty, "ISIS area contains circuit %s, which has a maximum PDU size of %zu.\n",                    circuit->interface->name,isis_circuit_pdu_size(circuit));            return CMD_ERR_AMBIGUOUS;          } @@ -1557,7 +1557,7 @@ DEFUN (is_type,    type = string2circuit_t (argv[idx_level]->arg);    if (!type)      { -      vty_outln (vty, "Unknown IS level "); +      vty_out (vty, "Unknown IS level \n");        return CMD_SUCCESS;      } @@ -2004,7 +2004,7 @@ area_passwd_set(struct vty *vty, int level,    if (passwd && strlen(passwd) > 254)      { -      vty_outln (vty, "Too long area password (>254)"); +      vty_out (vty, "Too long area password (>254)\n");        return CMD_ERR_AMBIGUOUS;      } diff --git a/isisd/isisd.c b/isisd/isisd.c index cf3b325131..c089450cc5 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -218,7 +218,7 @@ isis_area_destroy (struct vty *vty, const char *area_tag)    if (area == NULL)      { -      vty_outln (vty, "Can't find ISIS instance "); +      vty_out (vty, "Can't find ISIS instance \n");        return CMD_ERR_NO_MATCH;      } @@ -352,7 +352,7 @@ area_net_title (struct vty *vty, const char *net_title)    /* We check that we are not over the maximal number of addresses */    if (listcount (area->area_addrs) >= isis->max_area_addrs)      { -      vty_outln (vty, "Maximum of area addresses (%d) already reached ", +      vty_out (vty, "Maximum of area addresses (%d) already reached \n",  	       isis->max_area_addrs);        return CMD_ERR_NOTHING_TODO;      } @@ -366,7 +366,7 @@ area_net_title (struct vty *vty, const char *net_title)  #endif /* EXTREME_DEBUG */    if (addr->addr_len < 8 || addr->addr_len > 20)      { -      vty_outln (vty, "area address must be at least 8..20 octets long (%d)", +      vty_out (vty, "area address must be at least 8..20 octets long (%d)\n",                 addr->addr_len);        XFREE (MTYPE_ISIS_AREA_ADDR, addr);        return CMD_ERR_AMBIGUOUS; @@ -374,7 +374,7 @@ area_net_title (struct vty *vty, const char *net_title)    if (addr->area_addr[addr->addr_len-1] != 0)      { -      vty_outln (vty,"nsel byte (last byte) in area address must be 0"); +      vty_out (vty,"nsel byte (last byte) in area address must be 0\n");        XFREE (MTYPE_ISIS_AREA_ADDR, addr);        return CMD_ERR_AMBIGUOUS;      } @@ -444,7 +444,7 @@ area_clear_net_title (struct vty *vty, const char *net_title)    addr.addr_len = dotformat2buff (buff, net_title);    if (addr.addr_len < 8 || addr.addr_len > 20)      { -      vty_outln (vty, "Unsupported area address length %d, should be 8...20 ", +      vty_out (vty, "Unsupported area address length %d, should be 8...20 \n",  	       addr.addr_len);        return CMD_ERR_AMBIGUOUS;      } @@ -458,7 +458,7 @@ area_clear_net_title (struct vty *vty, const char *net_title)    if (!addrp)      { -      vty_outln (vty, "No area address %s for area %s ", net_title, +      vty_out (vty, "No area address %s for area %s \n", net_title,  	       area->area_tag);        return CMD_ERR_NO_MATCH;      } @@ -493,16 +493,16 @@ show_isis_interface_common (struct vty *vty, const char *ifname, char detail)    if (!isis)      { -      vty_outln (vty, "IS-IS Routing Process not enabled"); +      vty_out (vty, "IS-IS Routing Process not enabled\n");        return CMD_SUCCESS;      }    for (ALL_LIST_ELEMENTS_RO (isis->area_list, anode, area))      { -      vty_outln (vty, "Area %s:", area->area_tag); +      vty_out (vty, "Area %s:\n", area->area_tag);        if (detail == ISIS_UI_LEVEL_BRIEF) -        vty_outln (vty,"  Interface   CircId   State    Type     Level"); +        vty_out (vty,"  Interface   CircId   State    Type     Level\n");        for (ALL_LIST_ELEMENTS_RO (area->circuit_list, cnode, circuit))          if (!ifname) @@ -565,7 +565,7 @@ show_isis_neighbor_common (struct vty *vty, const char *id, char detail)    if (!isis)      { -      vty_outln (vty, "IS-IS Routing Process not enabled"); +      vty_out (vty, "IS-IS Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -577,7 +577,7 @@ show_isis_neighbor_common (struct vty *vty, const char *id, char detail)            dynhn = dynhn_find_by_name (id);            if (dynhn == NULL)              { -              vty_outln (vty, "Invalid system id %s", id); +              vty_out (vty, "Invalid system id %s\n", id);                return CMD_SUCCESS;              }            memcpy (sysid, dynhn->id, ISIS_SYS_ID_LEN); @@ -586,7 +586,7 @@ show_isis_neighbor_common (struct vty *vty, const char *id, char detail)    for (ALL_LIST_ELEMENTS_RO (isis->area_list, anode, area))      { -      vty_outln (vty, "Area %s:", area->area_tag); +      vty_out (vty, "Area %s:\n", area->area_tag);        if (detail == ISIS_UI_LEVEL_BRIEF)          vty_outln (vty, @@ -638,7 +638,7 @@ clear_isis_neighbor_common (struct vty *vty, const char *id)    if (!isis)      { -      vty_outln (vty, "IS-IS Routing Process not enabled"); +      vty_out (vty, "IS-IS Routing Process not enabled\n");        return CMD_SUCCESS;      } @@ -650,7 +650,7 @@ clear_isis_neighbor_common (struct vty *vty, const char *id)            dynhn = dynhn_find_by_name (id);            if (dynhn == NULL)              { -              vty_outln (vty, "Invalid system id %s", id); +              vty_out (vty, "Invalid system id %s\n", id);                return CMD_SUCCESS;              }            memcpy (sysid, dynhn->id, ISIS_SYS_ID_LEN); @@ -757,35 +757,35 @@ print_debug (struct vty *vty, int flags, int onoff)      strcpy (onoffs, "off");    if (flags & DEBUG_ADJ_PACKETS) -    vty_outln (vty, "IS-IS Adjacency related packets debugging is %s", +    vty_out (vty, "IS-IS Adjacency related packets debugging is %s\n",                 onoffs);    if (flags & DEBUG_CHECKSUM_ERRORS) -    vty_outln (vty, "IS-IS checksum errors debugging is %s",onoffs); +    vty_out (vty, "IS-IS checksum errors debugging is %s\n",onoffs);    if (flags & DEBUG_LOCAL_UPDATES) -    vty_outln (vty, "IS-IS local updates debugging is %s",onoffs); +    vty_out (vty, "IS-IS local updates debugging is %s\n",onoffs);    if (flags & DEBUG_PROTOCOL_ERRORS) -    vty_outln (vty, "IS-IS protocol errors debugging is %s",onoffs); +    vty_out (vty, "IS-IS protocol errors debugging is %s\n",onoffs);    if (flags & DEBUG_SNP_PACKETS) -    vty_outln (vty, "IS-IS CSNP/PSNP packets debugging is %s",onoffs); +    vty_out (vty, "IS-IS CSNP/PSNP packets debugging is %s\n",onoffs);    if (flags & DEBUG_SPF_EVENTS) -    vty_outln (vty, "IS-IS SPF events debugging is %s", onoffs); +    vty_out (vty, "IS-IS SPF events debugging is %s\n", onoffs);    if (flags & DEBUG_SPF_STATS) -    vty_outln (vty, "IS-IS SPF Timing and Statistics Data debugging is %s", +    vty_out (vty, "IS-IS SPF Timing and Statistics Data debugging is %s\n",  	     onoffs);    if (flags & DEBUG_SPF_TRIGGERS) -    vty_outln (vty, "IS-IS SPF triggering events debugging is %s",onoffs); +    vty_out (vty, "IS-IS SPF triggering events debugging is %s\n",onoffs);    if (flags & DEBUG_UPDATE_PACKETS) -    vty_outln (vty, "IS-IS Update related packet debugging is %s",onoffs); +    vty_out (vty, "IS-IS Update related packet debugging is %s\n",onoffs);    if (flags & DEBUG_RTE_EVENTS) -    vty_outln (vty, "IS-IS Route related debuggin is %s",onoffs); +    vty_out (vty, "IS-IS Route related debuggin is %s\n",onoffs);    if (flags & DEBUG_EVENTS) -    vty_outln (vty, "IS-IS Event debugging is %s", onoffs); +    vty_out (vty, "IS-IS Event debugging is %s\n", onoffs);    if (flags & DEBUG_PACKET_DUMP) -    vty_outln (vty, "IS-IS Packet dump debugging is %s", onoffs); +    vty_out (vty, "IS-IS Packet dump debugging is %s\n", onoffs);    if (flags & DEBUG_LSP_GEN) -    vty_outln (vty, "IS-IS LSP generation debugging is %s", onoffs); +    vty_out (vty, "IS-IS LSP generation debugging is %s\n", onoffs);    if (flags & DEBUG_LSP_SCHED) -    vty_outln (vty, "IS-IS LSP scheduling debugging is %s", onoffs); +    vty_out (vty, "IS-IS LSP scheduling debugging is %s\n", onoffs);  }  DEFUN (show_debugging, @@ -796,7 +796,7 @@ DEFUN (show_debugging,         ISIS_STR)  {    if (isis->debugs) { -      vty_outln (vty, "IS-IS:"); +      vty_out (vty, "IS-IS:\n");        print_debug (vty, isis->debugs, 1);    }    return CMD_SUCCESS; @@ -817,72 +817,72 @@ config_write_debug (struct vty *vty)    if (flags & DEBUG_ADJ_PACKETS)      { -      vty_outln (vty, "debug isis adj-packets"); +      vty_out (vty, "debug isis adj-packets\n");        write++;      }    if (flags & DEBUG_CHECKSUM_ERRORS)      { -      vty_outln (vty, "debug isis checksum-errors"); +      vty_out (vty, "debug isis checksum-errors\n");        write++;      }    if (flags & DEBUG_LOCAL_UPDATES)      { -      vty_outln (vty, "debug isis local-updates"); +      vty_out (vty, "debug isis local-updates\n");        write++;      }    if (flags & DEBUG_PROTOCOL_ERRORS)      { -      vty_outln (vty, "debug isis protocol-errors"); +      vty_out (vty, "debug isis protocol-errors\n");        write++;      }    if (flags & DEBUG_SNP_PACKETS)      { -      vty_outln (vty, "debug isis snp-packets"); +      vty_out (vty, "debug isis snp-packets\n");        write++;      }    if (flags & DEBUG_SPF_EVENTS)      { -      vty_outln (vty, "debug isis spf-events"); +      vty_out (vty, "debug isis spf-events\n");        write++;      }    if (flags & DEBUG_SPF_STATS)      { -      vty_outln (vty, "debug isis spf-statistics"); +      vty_out (vty, "debug isis spf-statistics\n");        write++;      }    if (flags & DEBUG_SPF_TRIGGERS)      { -      vty_outln (vty, "debug isis spf-triggers"); +      vty_out (vty, "debug isis spf-triggers\n");        write++;      }    if (flags & DEBUG_UPDATE_PACKETS)      { -      vty_outln (vty, "debug isis update-packets"); +      vty_out (vty, "debug isis update-packets\n");        write++;      }    if (flags & DEBUG_RTE_EVENTS)      { -      vty_outln (vty, "debug isis route-events"); +      vty_out (vty, "debug isis route-events\n");        write++;      }    if (flags & DEBUG_EVENTS)      { -      vty_outln (vty, "debug isis events"); +      vty_out (vty, "debug isis events\n");        write++;      }    if (flags & DEBUG_PACKET_DUMP)      { -      vty_outln (vty, "debug isis packet-dump"); +      vty_out (vty, "debug isis packet-dump\n");        write++;      }    if (flags & DEBUG_LSP_GEN)      { -      vty_outln (vty, "debug isis lsp-gen"); +      vty_out (vty, "debug isis lsp-gen\n");        write++;      }    if (flags & DEBUG_LSP_SCHED)      { -      vty_outln (vty, "debug isis lsp-sched"); +      vty_out (vty, "debug isis lsp-sched\n");        write++;      }    write += spf_backoff_write_config(vty); @@ -1312,7 +1312,7 @@ DEFUN (show_isis_spf_ietf,  {    if (!isis)      { -      vty_outln (vty, "ISIS is not running"); +      vty_out (vty, "ISIS is not running\n");        return CMD_SUCCESS;      } @@ -1321,31 +1321,31 @@ DEFUN (show_isis_spf_ietf,    for (ALL_LIST_ELEMENTS_RO (isis->area_list, node, area))      { -      vty_outln (vty, "Area %s:",area->area_tag ? area->area_tag : "null"); +      vty_out (vty, "Area %s:\n",area->area_tag ? area->area_tag : "null");        for (int level = ISIS_LEVEL1; level <= ISIS_LEVELS; level++)          {            if ((area->is_type & level) == 0)              continue; -          vty_outln (vty, "  Level-%d:", level); +          vty_out (vty, "  Level-%d:\n", level);            vty_out (vty, "    SPF delay status: ");            if (area->spf_timer[level -1])              {                struct timeval remain = thread_timer_remain(area->spf_timer[level - 1]); -              vty_outln (vty, "Pending, due in %ld msec", +              vty_out (vty, "Pending, due in %ld msec\n",                        remain.tv_sec * 1000 + remain.tv_usec / 1000);              }            else              { -              vty_outln (vty, "Not scheduled"); +              vty_out (vty, "Not scheduled\n");              }            if (area->spf_delay_ietf[level - 1]) { -            vty_outln (vty,  "    Using draft-ietf-rtgwg-backoff-algo-04"); +            vty_out (vty,  "    Using draft-ietf-rtgwg-backoff-algo-04\n");              spf_backoff_show(area->spf_delay_ietf[level - 1], vty, "    ");            } else { -            vty_outln (vty,  "    Using legacy backoff algo"); +            vty_out (vty,  "    Using legacy backoff algo\n");            }          }      } @@ -1364,31 +1364,31 @@ DEFUN (show_isis_summary,    if (isis == NULL)    { -    vty_outln (vty, "ISIS is not running"); +    vty_out (vty, "ISIS is not running\n");      return CMD_SUCCESS;    } -  vty_outln (vty, "Process Id      : %ld",isis->process_id); +  vty_out (vty, "Process Id      : %ld\n",isis->process_id);    if (isis->sysid_set) -    vty_outln (vty, "System Id       : %s",sysid_print(isis->sysid)); +    vty_out (vty, "System Id       : %s\n",sysid_print(isis->sysid));    vty_out (vty, "Up time         : ");    vty_out_timestr(vty, isis->uptime);    vty_out (vty, VTYNL);    if (isis->area_list) -    vty_outln (vty, "Number of areas : %d",isis->area_list->count); +    vty_out (vty, "Number of areas : %d\n",isis->area_list->count);    for (ALL_LIST_ELEMENTS_RO (isis->area_list, node, area))    { -    vty_outln (vty, "Area %s:",area->area_tag ? area->area_tag : "null"); +    vty_out (vty, "Area %s:\n",area->area_tag ? area->area_tag : "null");      if (listcount (area->area_addrs) > 0)      {        struct area_addr *area_addr;        for (ALL_LIST_ELEMENTS_RO (area->area_addrs, node2, area_addr))        { -        vty_outln (vty, "  Net: %s", +        vty_out (vty, "  Net: %s\n",              isonet_print(area_addr->area_addr, area_addr->addr_len + ISIS_SYS_ID_LEN + 1));        }      } @@ -1398,12 +1398,12 @@ DEFUN (show_isis_summary,        if ((area->is_type & level) == 0)          continue; -      vty_outln (vty, "  Level-%d:", level); +      vty_out (vty, "  Level-%d:\n", level);        spftree = area->spftree[level - 1];        if (area->spf_timer[level - 1]) -        vty_outln (vty, "    SPF: (pending)"); +        vty_out (vty, "    SPF: (pending)\n");        else -        vty_outln (vty, "    SPF:"); +        vty_out (vty, "    SPF:\n");        vty_out (vty, "      minimum interval  : %d",            area->min_spf_interval[level - 1]); @@ -1411,28 +1411,28 @@ DEFUN (show_isis_summary,           vty_out (vty, " (not used, IETF SPF delay activated)");        vty_out (vty, VTYNL); -      vty_outln (vty, "    IPv4 route computation:"); +      vty_out (vty, "    IPv4 route computation:\n");        vty_out (vty, "      last run elapsed  : ");        vty_out_timestr(vty, spftree->last_run_timestamp);        vty_out (vty, VTYNL); -      vty_outln (vty, "      last run duration : %u usec", +      vty_out (vty, "      last run duration : %u usec\n",                 (u_int32_t)spftree->last_run_duration); -      vty_outln (vty, "      run count         : %d", +      vty_out (vty, "      run count         : %d\n",            spftree->runcount);        spftree = area->spftree6[level - 1]; -      vty_outln (vty, "    IPv6 route computation:"); +      vty_out (vty, "    IPv6 route computation:\n");        vty_out (vty, "      last run elapsed  : ");        vty_out_timestr(vty, spftree->last_run_timestamp);        vty_out (vty, VTYNL); -      vty_outln (vty, "      last run duration : %llu msec", +      vty_out (vty, "      last run duration : %llu msec\n",                 (unsigned long long)spftree->last_run_duration); -      vty_outln (vty, "      run count         : %d", +      vty_out (vty, "      run count         : %d\n",            spftree->runcount);      }    } @@ -1508,7 +1508,7 @@ show_isis_database (struct vty *vty, const char *argv, int ui_level)    for (ALL_LIST_ELEMENTS_RO (isis->area_list, node, area))      { -      vty_outln (vty, "Area %s:",area->area_tag ? area->area_tag : "null"); +      vty_out (vty, "Area %s:\n",area->area_tag ? area->area_tag : "null");        for (level = 0; level < ISIS_LEVELS; level++)          { @@ -1539,7 +1539,7 @@ show_isis_database (struct vty *vty, const char *argv, int ui_level)                if (lsp != NULL || argv == NULL)                  { -                  vty_outln (vty, "IS-IS Level-%d link-state database:", +                  vty_out (vty, "IS-IS Level-%d link-state database:\n",                             level + 1);                    /* print the title in all cases */ @@ -1560,7 +1560,7 @@ show_isis_database (struct vty *vty, const char *argv, int ui_level)                                               ui_level,                                               area->dynhostname); -                  vty_outln (vty, "    %u LSPs%s", +                  vty_out (vty, "    %u LSPs%s\n",                             lsp_count, VTYNL);                  }              } @@ -1652,19 +1652,19 @@ DEFUN (isis_topology,    if (area->oldmetric)      { -      vty_outln (vty, -                 "Multi topology IS-IS can only be used with wide metrics"); +      vty_out (vty, +                 "Multi topology IS-IS can only be used with wide metrics\n");        return CMD_ERR_AMBIGUOUS;      }    if (mtid == (uint16_t)-1)      { -      vty_outln (vty, "Don't know topology '%s'", arg); +      vty_out (vty, "Don't know topology '%s'\n", arg);        return CMD_ERR_AMBIGUOUS;      }    if (mtid == ISIS_MT_IPV4_UNICAST)      { -      vty_outln (vty, "Cannot configure IPv4 unicast topology"); +      vty_out (vty, "Cannot configure IPv4 unicast topology\n");        return CMD_ERR_AMBIGUOUS;      } @@ -1688,19 +1688,19 @@ DEFUN (no_isis_topology,    if (area->oldmetric)      { -      vty_outln (vty, -                 "Multi topology IS-IS can only be used with wide metrics"); +      vty_out (vty, +                 "Multi topology IS-IS can only be used with wide metrics\n");        return CMD_ERR_AMBIGUOUS;      }    if (mtid == (uint16_t)-1)      { -      vty_outln (vty, "Don't know topology '%s'", arg); +      vty_out (vty, "Don't know topology '%s'\n", arg);        return CMD_ERR_AMBIGUOUS;      }    if (mtid == ISIS_MT_IPV4_UNICAST)      { -      vty_outln (vty, "Cannot configure IPv4 unicast topology"); +      vty_out (vty, "Cannot configure IPv4 unicast topology\n");        return CMD_ERR_AMBIGUOUS;      } @@ -1990,7 +1990,7 @@ isis_config_write (struct vty *vty)        for (ALL_LIST_ELEMENTS_RO (isis->area_list, node, area))        {  	/* ISIS - Area name */ -	vty_outln (vty, "router isis %s", area->area_tag); +	vty_out (vty, "router isis %s\n", area->area_tag);  	write++;  	/* ISIS - Net */  	if (listcount (area->area_addrs) > 0) @@ -1998,7 +1998,7 @@ isis_config_write (struct vty *vty)  	    struct area_addr *area_addr;  	    for (ALL_LIST_ELEMENTS_RO (area->area_addrs, node2, area_addr))  	      { -		vty_outln (vty, " net %s", +		vty_out (vty, " net %s\n",  			 isonet_print(area_addr->area_addr, area_addr->addr_len + ISIS_SYS_ID_LEN + 1));  		write++;  	      } @@ -2007,38 +2007,38 @@ isis_config_write (struct vty *vty)  	 * false. */  	if (!area->dynhostname)  	  { -	    vty_outln (vty, " no hostname dynamic"); +	    vty_out (vty, " no hostname dynamic\n");  	    write++;  	  }  	/* ISIS - Metric-Style - when true displays wide */  	if (area->newmetric)  	  {  	    if (!area->oldmetric) -	      vty_outln (vty, " metric-style wide"); +	      vty_out (vty, " metric-style wide\n");  	    else -	      vty_outln (vty, " metric-style transition"); +	      vty_out (vty, " metric-style transition\n");  	    write++;  	  }  	else  	  { -	    vty_outln (vty, " metric-style narrow"); +	    vty_out (vty, " metric-style narrow\n");  	    write++;  	  }  	/* ISIS - overload-bit */  	if (area->overload_bit)  	  { -	    vty_outln (vty, " set-overload-bit"); +	    vty_out (vty, " set-overload-bit\n");  	    write++;  	  }  	/* ISIS - Area is-type (level-1-2 is default) */  	if (area->is_type == IS_LEVEL_1)  	  { -	    vty_outln (vty, " is-type level-1"); +	    vty_out (vty, " is-type level-1\n");  	    write++;  	  }  	else if (area->is_type == IS_LEVEL_2)  	  { -	    vty_outln (vty, " is-type level-2-only"); +	    vty_out (vty, " is-type level-2-only\n");  	    write++;  	  }  	write += isis_redist_config_write(vty, area, AF_INET); @@ -2048,7 +2048,7 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->lsp_gen_interval[0] != DEFAULT_MIN_LSP_GEN_INTERVAL)  	      { -		vty_outln (vty, " lsp-gen-interval %d", +		vty_out (vty, " lsp-gen-interval %d\n",  			 area->lsp_gen_interval[0]);  		write++;  	      } @@ -2057,13 +2057,13 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->lsp_gen_interval[0] != DEFAULT_MIN_LSP_GEN_INTERVAL)  	      { -		vty_outln (vty, " lsp-gen-interval level-1 %d", +		vty_out (vty, " lsp-gen-interval level-1 %d\n",  			 area->lsp_gen_interval[0]);  		write++;  	      }  	    if (area->lsp_gen_interval[1] != DEFAULT_MIN_LSP_GEN_INTERVAL)  	      { -		vty_outln (vty, " lsp-gen-interval level-2 %d", +		vty_out (vty, " lsp-gen-interval level-2 %d\n",  			 area->lsp_gen_interval[1]);  		write++;  	      } @@ -2073,7 +2073,7 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->max_lsp_lifetime[0] != DEFAULT_LSP_LIFETIME)  	      { -		vty_outln (vty, " max-lsp-lifetime %u", +		vty_out (vty, " max-lsp-lifetime %u\n",                             area->max_lsp_lifetime[0]);  		write++;  	      } @@ -2082,13 +2082,13 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->max_lsp_lifetime[0] != DEFAULT_LSP_LIFETIME)  	      { -		vty_outln (vty, " max-lsp-lifetime level-1 %u", +		vty_out (vty, " max-lsp-lifetime level-1 %u\n",  			 area->max_lsp_lifetime[0]);  		write++;  	      }  	    if (area->max_lsp_lifetime[1] != DEFAULT_LSP_LIFETIME)  	      { -		vty_outln (vty, " max-lsp-lifetime level-2 %u", +		vty_out (vty, " max-lsp-lifetime level-2 %u\n",  			 area->max_lsp_lifetime[1]);  		write++;  	      } @@ -2098,7 +2098,7 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->lsp_refresh[0] != DEFAULT_MAX_LSP_GEN_INTERVAL)  	      { -		vty_outln (vty, " lsp-refresh-interval %u", +		vty_out (vty, " lsp-refresh-interval %u\n",                             area->lsp_refresh[0]);  		write++;  	      } @@ -2107,20 +2107,20 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->lsp_refresh[0] != DEFAULT_MAX_LSP_GEN_INTERVAL)  	      { -		vty_outln (vty, " lsp-refresh-interval level-1 %u", +		vty_out (vty, " lsp-refresh-interval level-1 %u\n",  			 area->lsp_refresh[0]);  		write++;  	      }  	    if (area->lsp_refresh[1] != DEFAULT_MAX_LSP_GEN_INTERVAL)  	      { -		vty_outln (vty, " lsp-refresh-interval level-2 %u", +		vty_out (vty, " lsp-refresh-interval level-2 %u\n",  			 area->lsp_refresh[1]);  		write++;  	      }  	  }  	if (area->lsp_mtu != DEFAULT_LSP_MTU)  	  { -	    vty_outln (vty, " lsp-mtu %u", area->lsp_mtu); +	    vty_out (vty, " lsp-mtu %u\n", area->lsp_mtu);  	    write++;  	  } @@ -2129,7 +2129,7 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->min_spf_interval[0] != MINIMUM_SPF_INTERVAL)  	      { -		vty_outln (vty, " spf-interval %d", +		vty_out (vty, " spf-interval %d\n",  			 area->min_spf_interval[0]);  		write++;  	      } @@ -2138,13 +2138,13 @@ isis_config_write (struct vty *vty)  	  {  	    if (area->min_spf_interval[0] != MINIMUM_SPF_INTERVAL)  	      { -		vty_outln (vty, " spf-interval level-1 %d", +		vty_out (vty, " spf-interval level-1 %d\n",  			 area->min_spf_interval[0]);  		write++;  	      }  	    if (area->min_spf_interval[1] != MINIMUM_SPF_INTERVAL)  	      { -		vty_outln (vty, " spf-interval level-2 %d", +		vty_out (vty, " spf-interval level-2 %d\n",  			 area->min_spf_interval[1]);  		write++;  	      } @@ -2153,7 +2153,7 @@ isis_config_write (struct vty *vty)  	/* IETF SPF interval */  	if (area->spf_delay_ietf[0])  	  { -	    vty_outln (vty, " spf-delay-ietf init-delay %ld short-delay %ld long-delay %ld holddown %ld time-to-learn %ld", +	    vty_out (vty, " spf-delay-ietf init-delay %ld short-delay %ld long-delay %ld holddown %ld time-to-learn %ld\n",  	             spf_backoff_init_delay(area->spf_delay_ietf[0]),  	             spf_backoff_short_delay(area->spf_delay_ietf[0]),  	             spf_backoff_long_delay(area->spf_delay_ietf[0]), @@ -2224,7 +2224,7 @@ isis_config_write (struct vty *vty)  	if (area->log_adj_changes)  	  { -	    vty_outln (vty, " log-adjacency-changes"); +	    vty_out (vty, " log-adjacency-changes\n");  	    write++;  	  } diff --git a/ldpd/ldp_debug.c b/ldpd/ldp_debug.c index 466b6af8b2..c5f444ecd3 100644 --- a/ldpd/ldp_debug.c +++ b/ldpd/ldp_debug.c @@ -105,28 +105,28 @@ ldp_vty_debug(struct vty *vty, int disable, const char *type_str,  int  ldp_vty_show_debugging(struct vty *vty)  { -	vty_outln (vty, "LDP debugging status:"); +	vty_out (vty, "LDP debugging status:\n");  	if (LDP_DEBUG(hello, HELLO_RECV)) -		vty_outln (vty,"  LDP discovery debugging is on (inbound)"); +		vty_out (vty,"  LDP discovery debugging is on (inbound)\n");  	if (LDP_DEBUG(hello, HELLO_SEND)) -		vty_outln (vty,"  LDP discovery debugging is on (outbound)"); +		vty_out (vty,"  LDP discovery debugging is on (outbound)\n");  	if (LDP_DEBUG(errors, ERRORS)) -		vty_outln (vty, "  LDP errors debugging is on"); +		vty_out (vty, "  LDP errors debugging is on\n");  	if (LDP_DEBUG(event, EVENT)) -		vty_outln (vty, "  LDP events debugging is on"); +		vty_out (vty, "  LDP events debugging is on\n");  	if (LDP_DEBUG(msg, MSG_RECV_ALL))  		vty_outln (vty,  			  "  LDP detailed messages debugging is on " "(inbound)");  	else if (LDP_DEBUG(msg, MSG_RECV)) -		vty_outln (vty,"  LDP messages debugging is on (inbound)"); +		vty_out (vty,"  LDP messages debugging is on (inbound)\n");  	if (LDP_DEBUG(msg, MSG_SEND_ALL))  		vty_outln (vty,  			  "  LDP detailed messages debugging is on " "(outbound)");  	else if (LDP_DEBUG(msg, MSG_SEND)) -		vty_outln (vty,"  LDP messages debugging is on (outbound)"); +		vty_out (vty,"  LDP messages debugging is on (outbound)\n");  	if (LDP_DEBUG(zebra, ZEBRA)) -		vty_outln (vty, "  LDP zebra debugging is on"); +		vty_out (vty, "  LDP zebra debugging is on\n");  	vty_out (vty, VTYNL);  	return (CMD_SUCCESS); @@ -138,43 +138,43 @@ ldp_debug_config_write(struct vty *vty)  	int write = 0;  	if (CONF_LDP_DEBUG(hello, HELLO_RECV)) { -		vty_outln (vty,"debug mpls ldp discovery hello recv"); +		vty_out (vty,"debug mpls ldp discovery hello recv\n");  		write = 1;  	}  	if (CONF_LDP_DEBUG(hello, HELLO_SEND)) { -		vty_outln (vty,"debug mpls ldp discovery hello sent"); +		vty_out (vty,"debug mpls ldp discovery hello sent\n");  		write = 1;  	}  	if (CONF_LDP_DEBUG(errors, ERRORS)) { -		vty_outln (vty, "debug mpls ldp errors"); +		vty_out (vty, "debug mpls ldp errors\n");  		write = 1;  	}  	if (CONF_LDP_DEBUG(event, EVENT)) { -		vty_outln (vty, "debug mpls ldp event"); +		vty_out (vty, "debug mpls ldp event\n");  		write = 1;  	}  	if (CONF_LDP_DEBUG(msg, MSG_RECV_ALL)) { -		vty_outln (vty, "debug mpls ldp messages recv all"); +		vty_out (vty, "debug mpls ldp messages recv all\n");  		write = 1;  	} else if (CONF_LDP_DEBUG(msg, MSG_RECV)) { -		vty_outln (vty, "debug mpls ldp messages recv"); +		vty_out (vty, "debug mpls ldp messages recv\n");  		write = 1;  	}  	if (CONF_LDP_DEBUG(msg, MSG_SEND_ALL)) { -		vty_outln (vty, "debug mpls ldp messages sent all"); +		vty_out (vty, "debug mpls ldp messages sent all\n");  		write = 1;  	} else if (CONF_LDP_DEBUG(msg, MSG_SEND)) { -		vty_outln (vty, "debug mpls ldp messages sent"); +		vty_out (vty, "debug mpls ldp messages sent\n");  		write = 1;  	}  	if (CONF_LDP_DEBUG(zebra, ZEBRA)) { -		vty_outln (vty, "debug mpls ldp zebra"); +		vty_out (vty, "debug mpls ldp zebra\n");  		write = 1;  	} diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c index 900be046ea..0f86e24a37 100644 --- a/ldpd/ldp_vty_conf.c +++ b/ldpd/ldp_vty_conf.c @@ -115,16 +115,16 @@ ldp_af_iface_config_write(struct vty *vty, int af)  		if (!ia->enabled)  			continue; -		vty_outln (vty, "  !"); -		vty_outln (vty, "  interface %s", iface->name); +		vty_out (vty, "  !\n"); +		vty_out (vty, "  interface %s\n", iface->name);  		if (ia->hello_holdtime != LINK_DFLT_HOLDTIME &&  		    ia->hello_holdtime != 0) -			vty_outln (vty, "   discovery hello holdtime %u", +			vty_out (vty, "   discovery hello holdtime %u\n",  			    ia->hello_holdtime);  		if (ia->hello_interval != DEFAULT_HELLO_INTERVAL &&  		    ia->hello_interval != 0) -			vty_outln (vty, "   discovery hello interval %u", +			vty_out (vty, "   discovery hello interval %u\n",  			    ia->hello_interval);  	}  } @@ -138,16 +138,16 @@ ldp_af_config_write(struct vty *vty, int af, struct ldpd_conf *conf,  	if (!(af_conf->flags & F_LDPD_AF_ENABLED))  		return; -	vty_outln (vty, " !"); -	vty_outln (vty, " address-family %s", af_name(af)); +	vty_out (vty, " !\n"); +	vty_out (vty, " address-family %s\n", af_name(af));  	if (af_conf->lhello_holdtime != LINK_DFLT_HOLDTIME &&  	    af_conf->lhello_holdtime != 0 ) -		vty_outln (vty, "  discovery hello holdtime %u", +		vty_out (vty, "  discovery hello holdtime %u\n",  		    af_conf->lhello_holdtime);  	if (af_conf->lhello_interval != DEFAULT_HELLO_INTERVAL &&  	    af_conf->lhello_interval != 0) -		vty_outln (vty, "  discovery hello interval %u", +		vty_out (vty, "  discovery hello interval %u\n",  		    af_conf->lhello_interval);  	if (af_conf->flags & F_LDPD_AF_THELLO_ACCEPT) { @@ -160,15 +160,15 @@ ldp_af_config_write(struct vty *vty, int af, struct ldpd_conf *conf,  	if (af_conf->thello_holdtime != TARGETED_DFLT_HOLDTIME &&  	    af_conf->thello_holdtime != 0) -		vty_outln (vty, "  discovery targeted-hello holdtime %u", +		vty_out (vty, "  discovery targeted-hello holdtime %u\n",  		    af_conf->thello_holdtime);  	if (af_conf->thello_interval != DEFAULT_HELLO_INTERVAL &&  	    af_conf->thello_interval != 0) -		vty_outln (vty, "  discovery targeted-hello interval %u", +		vty_out (vty, "  discovery targeted-hello interval %u\n",  		    af_conf->thello_interval);  	if (ldp_addrisset(af, &af_conf->trans_addr)) -		vty_outln (vty, "  discovery transport-address %s", +		vty_out (vty, "  discovery transport-address %s\n",  		    log_addr(af, &af_conf->trans_addr));  		else  			vty_outln (vty, @@ -218,22 +218,22 @@ ldp_af_config_write(struct vty *vty, int af, struct ldpd_conf *conf,  	}  	if (af_conf->flags & F_LDPD_AF_NO_GTSM) -		vty_outln (vty, "  ttl-security disable"); +		vty_out (vty, "  ttl-security disable\n");  	if (af_conf->keepalive != DEFAULT_KEEPALIVE) -		vty_outln (vty, "  session holdtime %u",af_conf->keepalive); +		vty_out (vty, "  session holdtime %u\n",af_conf->keepalive);  	RB_FOREACH(tnbr, tnbr_head, &ldpd_conf->tnbr_tree) {  		if (tnbr->af == af) { -			vty_outln (vty, "  !"); -			vty_outln (vty, "  neighbor %s targeted", +			vty_out (vty, "  !\n"); +			vty_out (vty, "  neighbor %s targeted\n",  			    log_addr(tnbr->af, &tnbr->addr));  		}  	}  	ldp_af_iface_config_write(vty, af); -	vty_outln (vty, "  !"); +	vty_out (vty, "  !\n");  }  int @@ -244,40 +244,40 @@ ldp_config_write(struct vty *vty)  	if (!(ldpd_conf->flags & F_LDPD_ENABLED))  		return (0); -	vty_outln (vty, "mpls ldp"); +	vty_out (vty, "mpls ldp\n");  	if (ldpd_conf->rtr_id.s_addr != 0) -		vty_outln (vty, " router-id %s", +		vty_out (vty, " router-id %s\n",  		    inet_ntoa(ldpd_conf->rtr_id));  	if (ldpd_conf->lhello_holdtime != LINK_DFLT_HOLDTIME &&  	    ldpd_conf->lhello_holdtime != 0) -		vty_outln (vty, " discovery hello holdtime %u", +		vty_out (vty, " discovery hello holdtime %u\n",  		    ldpd_conf->lhello_holdtime);  	if (ldpd_conf->lhello_interval != DEFAULT_HELLO_INTERVAL &&  	    ldpd_conf->lhello_interval != 0) -		vty_outln (vty, " discovery hello interval %u", +		vty_out (vty, " discovery hello interval %u\n",  		    ldpd_conf->lhello_interval);  	if (ldpd_conf->thello_holdtime != TARGETED_DFLT_HOLDTIME &&  	    ldpd_conf->thello_holdtime != 0) -		vty_outln (vty, " discovery targeted-hello holdtime %u", +		vty_out (vty, " discovery targeted-hello holdtime %u\n",  		    ldpd_conf->thello_holdtime);  	if (ldpd_conf->thello_interval != DEFAULT_HELLO_INTERVAL &&  	    ldpd_conf->thello_interval != 0) -		vty_outln (vty, " discovery targeted-hello interval %u", +		vty_out (vty, " discovery targeted-hello interval %u\n",  		    ldpd_conf->thello_interval);  	if (ldpd_conf->trans_pref == DUAL_STACK_LDPOV4) -		vty_outln (vty, -			  " dual-stack transport-connection prefer ipv4"); +		vty_out (vty, +			  " dual-stack transport-connection prefer ipv4\n");  	if (ldpd_conf->flags & F_LDPD_DS_CISCO_INTEROP) -		vty_outln (vty, " dual-stack cisco-interop"); +		vty_out (vty, " dual-stack cisco-interop\n");  	RB_FOREACH(nbrp, nbrp_head, &ldpd_conf->nbrp_tree) {  		if (nbrp->flags & F_NBRP_KEEPALIVE) -			vty_outln (vty, " neighbor %s session holdtime %u", +			vty_out (vty, " neighbor %s session holdtime %u\n",  			    inet_ntoa(nbrp->lsr_id),nbrp->keepalive);  		if (nbrp->flags & F_NBRP_GTSM) { @@ -291,14 +291,14 @@ ldp_config_write(struct vty *vty)  		}  		if (nbrp->auth.method == AUTH_MD5SIG) -			vty_outln (vty, " neighbor %s password %s", +			vty_out (vty, " neighbor %s password %s\n",  			    inet_ntoa(nbrp->lsr_id),nbrp->auth.md5key);  	}  	ldp_af_config_write(vty, AF_INET, ldpd_conf, &ldpd_conf->ipv4);  	ldp_af_config_write(vty, AF_INET6, ldpd_conf, &ldpd_conf->ipv6); -	vty_outln (vty, " !"); -	vty_outln (vty, "!"); +	vty_out (vty, " !\n"); +	vty_out (vty, "!\n");  	return (1);  } @@ -309,34 +309,34 @@ ldp_l2vpn_pw_config_write(struct vty *vty, struct l2vpn_pw *pw)  	int	 missing_lsrid = 0;  	int	 missing_pwid = 0; -	vty_outln (vty, " !"); -	vty_outln (vty, " member pseudowire %s", pw->ifname); +	vty_out (vty, " !\n"); +	vty_out (vty, " member pseudowire %s\n", pw->ifname);  	if (pw->lsr_id.s_addr != INADDR_ANY) -		vty_outln (vty, "  neighbor lsr-id %s",inet_ntoa(pw->lsr_id)); +		vty_out (vty, "  neighbor lsr-id %s\n",inet_ntoa(pw->lsr_id));  		else  			missing_lsrid = 1;  	if (pw->flags & F_PW_STATIC_NBR_ADDR) -		vty_outln (vty, "  neighbor address %s", +		vty_out (vty, "  neighbor address %s\n",  		          log_addr(pw->af, &pw->addr));  	if (pw->pwid != 0) -		vty_outln (vty, "  pw-id %u", pw->pwid); +		vty_out (vty, "  pw-id %u\n", pw->pwid);  	else  		missing_pwid = 1;  	if (!(pw->flags & F_PW_CWORD_CONF)) -		vty_outln (vty, "  control-word exclude"); +		vty_out (vty, "  control-word exclude\n");  	if (!(pw->flags & F_PW_STATUSTLV_CONF)) -		vty_outln (vty, "  pw-status disable"); +		vty_out (vty, "  pw-status disable\n");  	if (missing_lsrid)  		vty_outln (vty,  		          "  ! Incomplete config, specify a neighbor " "lsr-id");  	if (missing_pwid) -		vty_outln (vty,"  ! Incomplete config, specify a pw-id"); +		vty_out (vty,"  ! Incomplete config, specify a pw-id\n");  }  int @@ -347,27 +347,27 @@ ldp_l2vpn_config_write(struct vty *vty)  	struct l2vpn_pw		*pw;  	RB_FOREACH(l2vpn, l2vpn_head, &ldpd_conf->l2vpn_tree) { -		vty_outln (vty, "l2vpn %s type vpls", l2vpn->name); +		vty_out (vty, "l2vpn %s type vpls\n", l2vpn->name);  		if (l2vpn->pw_type != DEFAULT_PW_TYPE) -			vty_outln (vty, " vc type ethernet-tagged"); +			vty_out (vty, " vc type ethernet-tagged\n");  		if (l2vpn->mtu != DEFAULT_L2VPN_MTU) -			vty_outln (vty, " mtu %u", l2vpn->mtu); +			vty_out (vty, " mtu %u\n", l2vpn->mtu);  		if (l2vpn->br_ifname[0] != '\0') -			vty_outln (vty, " bridge %s",l2vpn->br_ifname); +			vty_out (vty, " bridge %s\n",l2vpn->br_ifname);  		RB_FOREACH(lif, l2vpn_if_head, &l2vpn->if_tree) -			vty_outln (vty, " member interface %s",lif->ifname); +			vty_out (vty, " member interface %s\n",lif->ifname);  		RB_FOREACH(pw, l2vpn_pw_head, &l2vpn->pw_tree)  			ldp_l2vpn_pw_config_write(vty, pw);  		RB_FOREACH(pw, l2vpn_pw_head, &l2vpn->pw_inactive_tree)  			ldp_l2vpn_pw_config_write(vty, pw); -		vty_outln (vty, " !"); -		vty_outln (vty, "!"); +		vty_out (vty, " !\n"); +		vty_out (vty, "!\n");  	}  	return (0); @@ -473,7 +473,7 @@ ldp_vty_disc_holdtime(struct vty *vty, int disable, const char *hello_type_str,  	secs = strtol(seconds_str, &ep, 10);  	if (*ep != '\0' || secs < MIN_HOLDTIME || secs > MAX_HOLDTIME) { -		vty_outln (vty, "%% Invalid holdtime"); +		vty_out (vty, "%% Invalid holdtime\n");  		return (CMD_WARNING);  	} @@ -568,7 +568,7 @@ ldp_vty_disc_interval(struct vty *vty, int disable, const char *hello_type_str,  	secs = strtol(seconds_str, &ep, 10);  	if (*ep != '\0' || secs < MIN_HELLO_INTERVAL ||  	    secs > MAX_HELLO_INTERVAL) { -		vty_outln (vty, "%% Invalid interval"); +		vty_out (vty, "%% Invalid interval\n");  		return (CMD_WARNING);  	} @@ -686,13 +686,13 @@ ldp_vty_nbr_session_holdtime(struct vty *vty, int disable,  	if (inet_pton(AF_INET, lsr_id_str, &lsr_id) != 1 ||  	    bad_addr_v4(lsr_id)) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	}  	secs = strtol(seconds_str, &ep, 10);  	if (*ep != '\0' || secs < MIN_KEEPALIVE || secs > MAX_KEEPALIVE) { -		vty_outln (vty, "%% Invalid holdtime"); +		vty_out (vty, "%% Invalid holdtime\n");  		return (CMD_SUCCESS);  	} @@ -732,7 +732,7 @@ ldp_vty_af_session_holdtime(struct vty *vty, int disable,  	secs = strtol(seconds_str, &ep, 10);  	if (*ep != '\0' || secs < MIN_KEEPALIVE || secs > MAX_KEEPALIVE) { -		vty_outln (vty, "%% Invalid holdtime"); +		vty_out (vty, "%% Invalid holdtime\n");  		return (CMD_SUCCESS);  	} @@ -778,7 +778,7 @@ ldp_vty_interface(struct vty *vty, int disable, const char *ifname)  	if (iface == NULL) {  		if (ldp_iface_is_configured(vty_conf, ifname)) { -			vty_outln (vty,"%% Interface is already in use"); +			vty_out (vty,"%% Interface is already in use\n");  			return (CMD_SUCCESS);  		} @@ -825,7 +825,7 @@ ldp_vty_trans_addr(struct vty *vty, int disable, const char *addr_str)  	else {  		if (inet_pton(af, addr_str, &af_conf->trans_addr) != 1 ||  		    bad_addr(af, &af_conf->trans_addr)) { -			vty_outln (vty, "%% Malformed address"); +			vty_out (vty, "%% Malformed address\n");  			return (CMD_SUCCESS);  		}  	} @@ -846,11 +846,11 @@ ldp_vty_neighbor_targeted(struct vty *vty, int disable, const char *addr_str)  	if (inet_pton(af, addr_str, &addr) != 1 ||  	    bad_addr(af, &addr)) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	}  	if (af == AF_INET6 && IN6_IS_SCOPE_EMBED(&addr.v6)) { -		vty_outln (vty, "%% Address can not be link-local"); +		vty_out (vty, "%% Address can not be link-local\n");  		return (CMD_WARNING);  	} @@ -1022,7 +1022,7 @@ ldp_vty_router_id(struct vty *vty, int disable, const char *addr_str)  	else {  		if (inet_pton(AF_INET, addr_str, &vty_conf->rtr_id) != 1 ||  		    bad_addr_v4(vty_conf->rtr_id)) { -			vty_outln (vty, "%% Malformed address"); +			vty_out (vty, "%% Malformed address\n");  			return (CMD_SUCCESS);  		}  	} @@ -1068,7 +1068,7 @@ ldp_vty_neighbor_password(struct vty *vty, int disable, const char *lsr_id_str,  	if (inet_pton(AF_INET, lsr_id_str, &lsr_id) != 1 ||  	    bad_addr_v4(lsr_id)) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	} @@ -1114,14 +1114,14 @@ ldp_vty_neighbor_ttl_security(struct vty *vty, int disable,  	if (inet_pton(AF_INET, lsr_id_str, &lsr_id) != 1 ||  	    bad_addr_v4(lsr_id)) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	}  	if (hops_str) {  		hops = strtol(hops_str, &ep, 10);  		if (*ep != '\0' || hops < 1 || hops > 254) { -			vty_outln (vty, "%% Invalid hop count"); +			vty_out (vty, "%% Invalid hop count\n");  			return (CMD_SUCCESS);  		}  	} @@ -1226,7 +1226,7 @@ ldp_vty_l2vpn_mtu(struct vty *vty, int disable, const char *mtu_str)  	mtu = strtol(mtu_str, &ep, 10);  	if (*ep != '\0' || mtu < MIN_L2VPN_MTU || mtu > MAX_L2VPN_MTU) { -		vty_outln (vty, "%% Invalid MTU"); +		vty_out (vty, "%% Invalid MTU\n");  		return (CMD_WARNING);  	} @@ -1286,7 +1286,7 @@ ldp_vty_l2vpn_interface(struct vty *vty, int disable, const char *ifname)  		return (CMD_SUCCESS);  	if (ldp_iface_is_configured(vty_conf, ifname)) { -		vty_outln (vty, "%% Interface is already in use"); +		vty_out (vty, "%% Interface is already in use\n");  		return (CMD_SUCCESS);  	} @@ -1329,7 +1329,7 @@ ldp_vty_l2vpn_pseudowire(struct vty *vty, int disable, const char *ifname)  	}  	if (ldp_iface_is_configured(vty_conf, ifname)) { -		vty_outln (vty, "%% Interface is already in use"); +		vty_out (vty, "%% Interface is already in use\n");  		return (CMD_SUCCESS);  	} @@ -1373,7 +1373,7 @@ ldp_vty_l2vpn_pw_nbr_addr(struct vty *vty, int disable, const char *addr_str)  	if (ldp_get_address(addr_str, &af, &addr) == -1 ||  	    bad_addr(af, &addr)) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	} @@ -1400,7 +1400,7 @@ ldp_vty_l2vpn_pw_nbr_id(struct vty *vty, int disable, const char *lsr_id_str)  	if (inet_pton(AF_INET, lsr_id_str, &lsr_id) != 1 ||  	    bad_addr_v4(lsr_id)) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	} @@ -1423,7 +1423,7 @@ ldp_vty_l2vpn_pw_pwid(struct vty *vty, int disable, const char *pwid_str)  	pwid = strtol(pwid_str, &ep, 10);  	if (*ep != '\0' || pwid < MIN_PWID_ID || pwid > MAX_PWID_ID) { -		vty_outln (vty, "%% Invalid pw-id"); +		vty_out (vty, "%% Invalid pw-id\n");  		return (CMD_WARNING);  	} diff --git a/ldpd/ldp_vty_exec.c b/ldpd/ldp_vty_exec.c index c956067023..45c5fedb2e 100644 --- a/ldpd/ldp_vty_exec.c +++ b/ldpd/ldp_vty_exec.c @@ -128,7 +128,7 @@ show_interface_msg(struct vty *vty, struct imsg *imsg,  		snprintf(timers, sizeof(timers), "%u/%u",  		    iface->hello_interval, iface->hello_holdtime); -		vty_outln (vty, "%-4s %-11s %-6s %-8s %-12s %3u", +		vty_out (vty, "%-4s %-11s %-6s %-8s %-12s %3u\n",  		    af_name(iface->af), iface->name,  		    if_state_name(iface->state), iface->uptime == 0 ?  		    "00:00:00" : log_time(iface->uptime), timers, @@ -214,7 +214,7 @@ show_discovery_msg(struct vty *vty, struct imsg *imsg,  				vty_out(vty, "%s%46s", VTYNL, " ");  			break;  		} -		vty_outln (vty, "%9u", adj->holdtime); +		vty_out (vty, "%9u\n", adj->holdtime);  		break;  	case IMSG_CTL_END:  		vty_out (vty, VTYNL); @@ -313,18 +313,18 @@ show_discovery_detail_msg(struct vty *vty, struct imsg *imsg,  		break;  	case IMSG_CTL_END:  		rtr_id.s_addr = ldp_rtr_id_get(ldpd_conf); -		vty_outln (vty, "Local:"); -		vty_outln (vty, "  LSR Id: %s:0",inet_ntoa(rtr_id)); +		vty_out (vty, "Local:\n"); +		vty_out (vty, "  LSR Id: %s:0\n",inet_ntoa(rtr_id));  		if (ldpd_conf->ipv4.flags & F_LDPD_AF_ENABLED) -			vty_outln (vty, "  Transport Address (IPv4): %s", +			vty_out (vty, "  Transport Address (IPv4): %s\n",  			    log_addr(AF_INET, &ldpd_conf->ipv4.trans_addr));  		if (ldpd_conf->ipv6.flags & F_LDPD_AF_ENABLED) -			vty_outln (vty, "  Transport Address (IPv6): %s", +			vty_out (vty, "  Transport Address (IPv6): %s\n",  			    log_addr(AF_INET6, &ldpd_conf->ipv6.trans_addr)); -		vty_outln (vty, "Discovery Sources:"); -		vty_outln (vty, "  Interfaces:"); +		vty_out (vty, "Discovery Sources:\n"); +		vty_out (vty, "  Interfaces:\n");  		vty_out(vty, "%s", ifaces_buffer); -		vty_outln (vty, "  Targeted Hellos:"); +		vty_out (vty, "  Targeted Hellos:\n");  		vty_out(vty, "%s", tnbrs_buffer);  		vty_out (vty, VTYNL);  		return (1); @@ -512,7 +512,7 @@ show_nbr_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)  		    nbr_state_name(nbr->nbr_state), addr);  		if (strlen(addr) > 15)  			vty_out(vty, "%s%48s", VTYNL, " "); -		vty_outln (vty, " %8s", log_time(nbr->uptime)); +		vty_out (vty, " %8s\n", log_time(nbr->uptime));  		break;  	case IMSG_CTL_END:  		return (1); @@ -557,41 +557,41 @@ show_nbr_detail_msg(struct vty *vty, struct imsg *imsg,  		v4adjs_buffer[0] = '\0';  		v6adjs_buffer[0] = '\0'; -		vty_outln (vty, "Peer LDP Identifier: %s:0", +		vty_out (vty, "Peer LDP Identifier: %s:0\n",  			  inet_ntoa(nbr->id)); -		vty_outln (vty, "  TCP connection: %s:%u - %s:%u", +		vty_out (vty, "  TCP connection: %s:%u - %s:%u\n",  		    log_addr(nbr->af, &nbr->laddr), ntohs(nbr->lport),  		    log_addr(nbr->af, &nbr->raddr),ntohs(nbr->rport)); -		vty_outln (vty, "  Authentication: %s", +		vty_out (vty, "  Authentication: %s\n",  		    (nbr->auth_method == AUTH_MD5SIG) ? "TCP MD5 Signature" : "none");  		vty_outln(vty, "  Session Holdtime: %u secs; "  		    "KeepAlive interval: %u secs", nbr->holdtime,  		    nbr->holdtime / KEEPALIVE_PER_PERIOD); -		vty_outln(vty, "  State: %s; Downstream-Unsolicited", +		vty_out(vty, "  State: %s; Downstream-Unsolicited\n",  		    nbr_state_name(nbr->nbr_state)); -		vty_outln (vty, "  Up time: %s",log_time(nbr->uptime)); +		vty_out (vty, "  Up time: %s\n",log_time(nbr->uptime));  		stats = &nbr->stats; -		vty_outln (vty, "  Messages sent/rcvd:"); -		vty_outln (vty, "   - Keepalive Messages: %u/%u", +		vty_out (vty, "  Messages sent/rcvd:\n"); +		vty_out (vty, "   - Keepalive Messages: %u/%u\n",  		    stats->kalive_sent, stats->kalive_rcvd); -		vty_outln (vty, "   - Address Messages: %u/%u", +		vty_out (vty, "   - Address Messages: %u/%u\n",  		    stats->addr_sent, stats->addr_rcvd); -		vty_outln (vty, "   - Address Withdraw Messages: %u/%u", +		vty_out (vty, "   - Address Withdraw Messages: %u/%u\n",  		    stats->addrwdraw_sent, stats->addrwdraw_rcvd); -		vty_outln (vty, "   - Notification Messages: %u/%u", +		vty_out (vty, "   - Notification Messages: %u/%u\n",  		    stats->notif_sent, stats->notif_rcvd); -		vty_outln (vty, "   - Capability Messages: %u/%u", +		vty_out (vty, "   - Capability Messages: %u/%u\n",  		    stats->capability_sent, stats->capability_rcvd); -		vty_outln (vty, "   - Label Mapping Messages: %u/%u", +		vty_out (vty, "   - Label Mapping Messages: %u/%u\n",  		    stats->labelmap_sent, stats->labelmap_rcvd); -		vty_outln (vty, "   - Label Request Messages: %u/%u", +		vty_out (vty, "   - Label Request Messages: %u/%u\n",  		    stats->labelreq_sent, stats->labelreq_rcvd); -		vty_outln (vty, "   - Label Withdraw Messages: %u/%u", +		vty_out (vty, "   - Label Withdraw Messages: %u/%u\n",  		    stats->labelwdraw_sent, stats->labelwdraw_rcvd); -		vty_outln (vty, "   - Label Release Messages: %u/%u", +		vty_out (vty, "   - Label Release Messages: %u/%u\n",  		    stats->labelrel_sent, stats->labelrel_rcvd); -		vty_outln (vty, "   - Label Abort Request Messages: %u/%u", +		vty_out (vty, "   - Label Abort Request Messages: %u/%u\n",  		    stats->labelabreq_sent, stats->labelabreq_rcvd);  		show_nbr_capabilities(vty, nbr); @@ -611,13 +611,13 @@ show_nbr_detail_msg(struct vty *vty, struct imsg *imsg,  		}  		break;  	case IMSG_CTL_SHOW_NBR_END: -		vty_outln (vty, "  LDP Discovery Sources:"); +		vty_out (vty, "  LDP Discovery Sources:\n");  		if (v4adjs_buffer[0] != '\0') { -			vty_outln (vty, "    IPv4:"); +			vty_out (vty, "    IPv4:\n");  			vty_out(vty, "%s", v4adjs_buffer);  		}  		if (v6adjs_buffer[0] != '\0') { -			vty_outln (vty, "    IPv6:"); +			vty_out (vty, "    IPv6:\n");  			vty_out(vty, "%s", v6adjs_buffer);  		}  		vty_out (vty, VTYNL); @@ -874,13 +874,13 @@ show_nbr_capabilities(struct vty *vty, struct ctl_nbr *nbr)  	    "   - Typed Wildcard (0x050B)%s"  	    "   - Unrecognized Notification (0x0603)",  	    VTYNL, VTYNL, VTYNL); -	vty_outln (vty, "  Capabilities Received:"); +	vty_out (vty, "  Capabilities Received:\n");  	if (nbr->flags & F_NBR_CAP_DYNAMIC) -		vty_outln (vty,"   - Dynamic Announcement (0x0506)"); +		vty_out (vty,"   - Dynamic Announcement (0x0506)\n");  	if (nbr->flags & F_NBR_CAP_TWCARD) -		vty_outln (vty, "   - Typed Wildcard (0x050B)"); +		vty_out (vty, "   - Typed Wildcard (0x050B)\n");  	if (nbr->flags & F_NBR_CAP_UNOTIF) -		vty_outln (vty,"   - Unrecognized Notification (0x0603)"); +		vty_out (vty,"   - Unrecognized Notification (0x0603)\n");  }  static int @@ -895,7 +895,7 @@ show_nbr_capabilities_msg(struct vty *vty, struct imsg *imsg, struct show_params  		if (nbr->nbr_state != NBR_STA_OPER)  			break; -		vty_outln (vty, "Peer LDP Identifier: %s:0", +		vty_out (vty, "Peer LDP Identifier: %s:0\n",  			  inet_ntoa(nbr->id));  		show_nbr_capabilities(vty, nbr);  		vty_out (vty, VTYNL); @@ -1022,7 +1022,7 @@ show_lib_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)  		vty_out(vty, "%-4s %-20s", af_name(rt->af), dstnet);  		if (strlen(dstnet) > 20)  			vty_out(vty, "%s%25s", VTYNL, " "); -		vty_outln (vty, " %-15s %-11s %-13s %6s", inet_ntoa(rt->nexthop), +		vty_out (vty, " %-15s %-11s %-13s %6s\n", inet_ntoa(rt->nexthop),  		    log_label(rt->local_label), log_label(rt->remote_label),  		    rt->in_use ? "yes" : "no");  		break; @@ -1069,8 +1069,8 @@ show_lib_detail_msg(struct vty *vty, struct imsg *imsg, struct show_params *para  		snprintf(dstnet, sizeof(dstnet), "%s/%d",  		    log_addr(rt->af, &rt->prefix), rt->prefixlen); -		vty_outln (vty, "%s", dstnet); -		vty_outln (vty, "%-8sLocal binding: label: %s", "", +		vty_out (vty, "%s\n", dstnet); +		vty_out (vty, "%-8sLocal binding: label: %s\n", "",  		    log_label(rt->local_label));  		break;  	case IMSG_CTL_SHOW_LIB_SENT: @@ -1089,14 +1089,14 @@ show_lib_detail_msg(struct vty *vty, struct imsg *imsg, struct show_params *para  		break;  	case IMSG_CTL_SHOW_LIB_END:  		if (upstream) { -			vty_outln (vty, "%-8sAdvertised to:", ""); +			vty_out (vty, "%-8sAdvertised to:\n", "");  			vty_out(vty, "%s", sent_buffer);  		}  		if (downstream) { -			vty_outln (vty, "%-8sRemote bindings:", ""); +			vty_out (vty, "%-8sRemote bindings:\n", "");  			vty_out(vty, "%s", rcvd_buffer);  		} else -			vty_outln (vty, "%-8sNo remote bindings",""); +			vty_out (vty, "%-8sNo remote bindings\n","");  		break;  	case IMSG_CTL_END:  		vty_out (vty, VTYNL); @@ -1235,30 +1235,30 @@ show_l2vpn_binding_msg(struct vty *vty, struct imsg *imsg,  	case IMSG_CTL_SHOW_L2VPN_BINDING:  		pw = imsg->data; -		vty_outln (vty, "  Destination Address: %s, VC ID: %u", +		vty_out (vty, "  Destination Address: %s, VC ID: %u\n",  		    inet_ntoa(pw->lsr_id), pw->pwid);  		/* local binding */  		if (pw->local_label != NO_LABEL) { -			vty_outln (vty, "    Local Label:  %u", +			vty_out (vty, "    Local Label:  %u\n",  				  pw->local_label);  			vty_outln (vty, "%-8sCbit: %u,    VC Type: %s,    "  			    "GroupID: %u", "", pw->local_cword,  			    pw_type_name(pw->type),pw->local_gid); -			vty_outln (vty, "%-8sMTU: %u", "",pw->local_ifmtu); +			vty_out (vty, "%-8sMTU: %u\n", "",pw->local_ifmtu);  		} else -			vty_outln (vty,"    Local Label: unassigned"); +			vty_out (vty,"    Local Label: unassigned\n");  		/* remote binding */  		if (pw->remote_label != NO_LABEL) { -			vty_outln (vty, "    Remote Label: %u", +			vty_out (vty, "    Remote Label: %u\n",  			    pw->remote_label);  			vty_outln (vty, "%-8sCbit: %u,    VC Type: %s,    "  			    "GroupID: %u", "", pw->remote_cword,  			    pw_type_name(pw->type),pw->remote_gid); -			vty_outln (vty, "%-8sMTU: %u", "",pw->remote_ifmtu); +			vty_out (vty, "%-8sMTU: %u\n", "",pw->remote_ifmtu);  		} else -			vty_outln (vty,"    Remote Label: unassigned"); +			vty_out (vty,"    Remote Label: unassigned\n");  		break;  	case IMSG_CTL_END:  		vty_out (vty, VTYNL); @@ -1340,7 +1340,7 @@ show_l2vpn_pw_msg(struct vty *vty, struct imsg *imsg, struct show_params *params  	case IMSG_CTL_SHOW_L2VPN_PW:  		pw = imsg->data; -		vty_outln (vty, "%-9s %-15s %-10u %-16s %-10s", pw->ifname, +		vty_out (vty, "%-9s %-15s %-10u %-16s %-10s\n", pw->ifname,  		    inet_ntoa(pw->lsr_id), pw->pwid, pw->l2vpn_name,  		    (pw->status ? "UP" : "DOWN"));  		break; @@ -1540,7 +1540,7 @@ ldp_vty_dispatch(struct vty *vty, struct imsgbuf *ibuf, enum show_command cmd,   done:  	close(ibuf->fd);  	if (json) { -		vty_outln (vty, "%s", +		vty_out (vty, "%s\n",  			  json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));  		json_object_free(json);  	} @@ -1584,7 +1584,7 @@ ldp_vty_show_binding(struct vty *vty, const char *af_str, int detail, int json)  	params.json = json;  	if (!params.detail && !params.json) -		vty_outln (vty, "%-4s %-20s %-15s %-11s %-13s %6s", "AF", +		vty_out (vty, "%-4s %-20s %-15s %-11s %-13s %6s\n", "AF",  		    "Destination", "Nexthop", "Local Label", "Remote Label",  		    "In Use"); @@ -1612,7 +1612,7 @@ ldp_vty_show_discovery(struct vty *vty, const char *af_str, int detail,  	params.json = json;  	if (!params.detail && !params.json) -		vty_outln (vty, "%-4s %-15s %-8s %-15s %9s", +		vty_out (vty, "%-4s %-15s %-8s %-15s %9s\n",  		    "AF", "ID", "Type", "Source", "Holdtime");  	if (params.detail) @@ -1643,7 +1643,7 @@ ldp_vty_show_interface(struct vty *vty, const char *af_str, int json)  	/* header */  	if (!params.json) { -		vty_outln (vty, "%-4s %-11s %-6s %-8s %-12s %3s", "AF", +		vty_out (vty, "%-4s %-11s %-6s %-8s %-12s %3s\n", "AF",  		    "Interface", "State", "Uptime", "Hello Timers","ac");  	} @@ -1688,7 +1688,7 @@ ldp_vty_show_capabilities(struct vty *vty, int json)  		    "0x0603");  		json_object_array_add(json_array, json_cap); -		vty_outln (vty, "%s", +		vty_out (vty, "%s\n",  			  json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));  		json_object_free(json);  		return (0); @@ -1722,7 +1722,7 @@ ldp_vty_show_neighbor(struct vty *vty, int capabilities, int detail, int json)  		params.detail = 1;  	if (!params.detail && !params.json) -		vty_outln (vty, "%-4s %-15s %-11s %-15s %8s", +		vty_out (vty, "%-4s %-15s %-11s %-15s %8s\n",  		    "AF", "ID", "State", "Remote Address","Uptime");  	imsg_compose(&ibuf, IMSG_CTL_SHOW_NBR, 0, 0, -1, NULL, 0); @@ -1759,9 +1759,9 @@ ldp_vty_show_atom_vc(struct vty *vty, int json)  	if (!params.json) {  		/* header */ -		vty_outln (vty, "%-9s %-15s %-10s %-16s %-10s", +		vty_out (vty, "%-9s %-15s %-10s %-16s %-10s\n",  		    "Interface", "Peer ID", "VC ID", "Name","Status"); -		vty_outln (vty, "%-9s %-15s %-10s %-16s %-10s", +		vty_out (vty, "%-9s %-15s %-10s %-16s %-10s\n",  		    "---------", "---------------", "----------",  		    "----------------", "----------");  	} @@ -1780,7 +1780,7 @@ ldp_vty_clear_nbr(struct vty *vty, const char *addr_str)  	if (addr_str &&  	    (ldp_get_address(addr_str, &nbr.af, &nbr.raddr) == -1 ||  	    bad_addr(nbr.af, &nbr.raddr))) { -		vty_outln (vty, "%% Malformed address"); +		vty_out (vty, "%% Malformed address\n");  		return (CMD_WARNING);  	} diff --git a/lib/agentx.c b/lib/agentx.c index d058779aff..a2e737fed0 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -168,7 +168,7 @@ static int  config_write_agentx (struct vty *vty)  {    if (agentx_enabled) -      vty_outln (vty, "agentx"); +      vty_out (vty, "agentx\n");    return 1;  } @@ -185,7 +185,7 @@ DEFUN (agentx_enable,        agentx_enabled = 1;        return CMD_SUCCESS;      } -  vty_outln (vty, "SNMP AgentX already enabled"); +  vty_out (vty, "SNMP AgentX already enabled\n");    return CMD_SUCCESS;  } @@ -196,7 +196,7 @@ DEFUN (no_agentx,         "SNMP AgentX protocol settings\n")  {    if (!agentx_enabled) return CMD_SUCCESS; -  vty_outln (vty, "SNMP AgentX support cannot be disabled once enabled"); +  vty_out (vty, "SNMP AgentX support cannot be disabled once enabled\n");    return CMD_WARNING;  } @@ -423,7 +423,7 @@ bfd_show_status(struct vty *vty, struct bfd_info *bfd_info, int bfd_tag,      }    else      { -      vty_outln (vty, "  %s%sStatus: %s, Last update: %s", +      vty_out (vty, "  %s%sStatus: %s, Last update: %s\n",                    (extra_space) ? "  ": "", (bfd_tag) ? "BFD: " : "  ",                    bfd_get_status_str(bfd_info->status), time_buf);      } @@ -451,7 +451,7 @@ bfd_show_info(struct vty *vty, struct bfd_info *bfd_info, int multihop,      }    else      { -      vty_outln (vty, "  %sBFD: Type: %s", (extra_space) ? "  " : "", +      vty_out (vty, "  %sBFD: Type: %s\n", (extra_space) ? "  " : "",                (multihop) ? "multi hop" : "single hop");      } diff --git a/lib/command.c b/lib/command.c index 5ca4a0fda9..fb560cb614 100644 --- a/lib/command.c +++ b/lib/command.c @@ -433,27 +433,27 @@ static int  config_write_host (struct vty *vty)  {    if (host.name) -    vty_outln (vty, "hostname %s", host.name); +    vty_out (vty, "hostname %s\n", host.name);    if (host.encrypt)      {        if (host.password_encrypt) -        vty_outln (vty, "password 8 %s", host.password_encrypt); +        vty_out (vty, "password 8 %s\n", host.password_encrypt);        if (host.enable_encrypt) -        vty_outln (vty, "enable password 8 %s", host.enable_encrypt); +        vty_out (vty, "enable password 8 %s\n", host.enable_encrypt);      }    else      {        if (host.password) -        vty_outln (vty, "password %s", host.password); +        vty_out (vty, "password %s\n", host.password);        if (host.enable) -        vty_outln (vty, "enable password %s", host.enable); +        vty_out (vty, "enable password %s\n", host.enable);      }    if (zlog_default->default_lvl != LOG_DEBUG)      { -      vty_outln (vty,"! N.B. The 'log trap' command is deprecated."); -      vty_outln (vty, "log trap %s", +      vty_out (vty,"! N.B. The 'log trap' command is deprecated.\n"); +      vty_out (vty, "log trap %s\n",                 zlog_priority[zlog_default->default_lvl]);      } @@ -476,9 +476,9 @@ config_write_host (struct vty *vty)      }    if (zlog_default->maxlvl[ZLOG_DEST_MONITOR] == ZLOG_DISABLED) -    vty_outln (vty,"no log monitor"); +    vty_out (vty,"no log monitor\n");    else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR] != zlog_default->default_lvl) -    vty_outln (vty,"log monitor %s", +    vty_out (vty,"log monitor %s\n",              zlog_priority[zlog_default->maxlvl[ZLOG_DEST_MONITOR]]);    if (zlog_default->maxlvl[ZLOG_DEST_SYSLOG] != ZLOG_DISABLED) @@ -491,29 +491,29 @@ config_write_host (struct vty *vty)      }    if (zlog_default->facility != LOG_DAEMON) -    vty_outln (vty, "log facility %s", +    vty_out (vty, "log facility %s\n",               facility_name(zlog_default->facility));    if (zlog_default->record_priority == 1) -    vty_outln (vty, "log record-priority"); +    vty_out (vty, "log record-priority\n");    if (zlog_default->timestamp_precision > 0) -    vty_outln (vty, "log timestamp precision %d", +    vty_out (vty, "log timestamp precision %d\n",               zlog_default->timestamp_precision);    if (host.advanced) -    vty_outln (vty, "service advanced-vty"); +    vty_out (vty, "service advanced-vty\n");    if (host.encrypt) -    vty_outln (vty, "service password-encryption"); +    vty_out (vty, "service password-encryption\n");    if (host.lines >= 0) -    vty_outln (vty, "service terminal-length %d",host.lines); +    vty_out (vty, "service terminal-length %d\n",host.lines);    if (host.motdfile) -    vty_outln (vty, "banner motd file %s", host.motdfile); +    vty_out (vty, "banner motd file %s\n", host.motdfile);    else if (! host.motd) -    vty_outln (vty, "no banner motd"); +    vty_out (vty, "no banner motd\n");    return 1;  } @@ -1149,7 +1149,7 @@ DEFUN (config_terminal,      vty->node = CONFIG_NODE;    else      { -      vty_outln (vty, "VTY configuration is locked by other VTY"); +      vty_out (vty, "VTY configuration is locked by other VTY\n");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -1346,10 +1346,10 @@ DEFUN (show_version,         SHOW_STR         "Displays zebra version\n")  { -  vty_outln (vty, "%s %s (%s).", FRR_FULL_NAME, FRR_VERSION, +  vty_out (vty, "%s %s (%s).\n", FRR_FULL_NAME, FRR_VERSION,  	   host.name ? host.name : ""); -  vty_outln (vty, "%s%s", FRR_COPYRIGHT, GIT_INFO); -  vty_outln (vty, "configured with:%s    %s", VTYNL, +  vty_out (vty, "%s%s\n", FRR_COPYRIGHT, GIT_INFO); +  vty_out (vty, "configured with:%s    %s\n", VTYNL,             FRR_CONFIG_ARGS);    return CMD_SUCCESS; @@ -1373,7 +1373,7 @@ DEFUN (config_help,         "help",         "Description of the interactive help system\n")  { -  vty_outln (vty, +  vty_out (vty,             "Quagga VTY provides advanced help feature.  When you need help,%s\  anytime at the command line please press '?'.%s\  %s\ @@ -1385,7 +1385,7 @@ command argument (e.g. 'show ?') and describes each possible%s\  argument.%s\  2. Partial help is provided when an abbreviated argument is entered%s\     and you want to know what arguments match the input%s\ -   (e.g. 'show me?'.)%s", VTYNL, VTYNL, VTYNL, +   (e.g. 'show me?'.)%s\n", VTYNL, VTYNL, VTYNL,             VTYNL, VTYNL, VTYNL, VTYNL, VTYNL,             VTYNL, VTYNL, VTYNL, VTYNL);    return CMD_SUCCESS; @@ -1455,7 +1455,7 @@ cmd_list_cmds (struct vty *vty, int do_permute)          if ((element = vector_slot (node->cmd_vector, i)) &&               element->attr != CMD_ATTR_DEPRECATED &&               element->attr != CMD_ATTR_HIDDEN) -          vty_outln (vty, "    %s", element->string); +          vty_out (vty, "    %s\n", element->string);    }    return CMD_SUCCESS;  } @@ -1488,25 +1488,25 @@ vty_write_config (struct vty *vty)    if (vty->type == VTY_TERM)      { -      vty_outln (vty, "%sCurrent configuration:",VTYNL); -      vty_outln (vty, "!"); +      vty_out (vty, "%sCurrent configuration:\n",VTYNL); +      vty_out (vty, "!\n");      } -  vty_outln (vty, "frr version %s", FRR_VER_SHORT); -  vty_outln (vty, "frr defaults %s", DFLT_NAME); -  vty_outln (vty, "!"); +  vty_out (vty, "frr version %s\n", FRR_VER_SHORT); +  vty_out (vty, "frr defaults %s\n", DFLT_NAME); +  vty_out (vty, "!\n");    for (i = 0; i < vector_active (cmdvec); i++)      if ((node = vector_slot (cmdvec, i)) && node->func          && (node->vtysh || vty->type != VTY_SHELL))        {          if ((*node->func) (vty)) -          vty_outln (vty, "!"); +          vty_out (vty, "!\n");        }    if (vty->type == VTY_TERM)      { -      vty_outln (vty, "end"); +      vty_out (vty, "end\n");      }  } @@ -1543,7 +1543,7 @@ DEFUN (config_write,    /* Check and see if we are operating under vtysh configuration */    if (host.config == NULL)      { -      vty_outln (vty,"Can't save to configuration file, using vtysh."); +      vty_out (vty,"Can't save to configuration file, using vtysh.\n");        return CMD_WARNING;      } @@ -1578,12 +1578,12 @@ DEFUN (config_write,    fd = mkstemp (config_file_tmp);    if (fd < 0)      { -      vty_outln (vty, "Can't open configuration file %s.",config_file_tmp); +      vty_out (vty, "Can't open configuration file %s.\n",config_file_tmp);        goto finished;      }    if (fchmod (fd, CONFIGFILE_MASK) != 0)      { -      vty_outln (vty, "Can't chmod configuration file %s: %s (%d).", +      vty_out (vty, "Can't chmod configuration file %s: %s (%d).\n",          config_file_tmp, safe_strerror(errno), errno);        goto finished;      } @@ -1605,13 +1605,13 @@ DEFUN (config_write,        if (unlink (config_file_sav) != 0)          if (errno != ENOENT)            { -            vty_outln (vty, "Can't unlink backup configuration file %s.", +            vty_out (vty, "Can't unlink backup configuration file %s.\n",                         config_file_sav);              goto finished;            }        if (link (config_file, config_file_sav) != 0)          { -          vty_outln (vty, "Can't backup old configuration file %s.", +          vty_out (vty, "Can't backup old configuration file %s.\n",                       config_file_sav);            goto finished;          } @@ -1620,13 +1620,13 @@ DEFUN (config_write,      }    if (rename (config_file_tmp, config_file) != 0)      { -      vty_outln (vty, "Can't save configuration file %s.",config_file); +      vty_out (vty, "Can't save configuration file %s.\n",config_file);        goto finished;      }    if (dirfd >= 0)      fsync (dirfd); -  vty_outln (vty, "Configuration saved to %s",config_file); +  vty_out (vty, "Configuration saved to %s\n",config_file);    ret = CMD_SUCCESS;  finished: @@ -1681,7 +1681,7 @@ DEFUN (show_startup_config,    confp = fopen (host.config, "r");    if (confp == NULL)      { -      vty_outln (vty, "Can't open configuration file [%s] due to '%s'", +      vty_out (vty, "Can't open configuration file [%s] due to '%s'\n",                 host.config, safe_strerror(errno));        return CMD_WARNING;      } @@ -1694,7 +1694,7 @@ DEFUN (show_startup_config,          cp++;        *cp = '\0'; -      vty_outln (vty, "%s", buf); +      vty_out (vty, "%s\n", buf);      }    fclose (confp); @@ -1721,7 +1721,7 @@ DEFUN (config_hostname,    if (!isalpha((int) word->arg[0]))      { -      vty_outln (vty, "Please specify string starting with alphabet"); +      vty_out (vty, "Please specify string starting with alphabet\n");        return CMD_WARNING;      } @@ -1761,8 +1761,8 @@ DEFUN (config_password,    if (!isalnum (argv[idx_8]->arg[0]))      { -      vty_outln (vty, -               "Please specify string starting with alphanumeric"); +      vty_out (vty, +               "Please specify string starting with alphanumeric\n");        return CMD_WARNING;      } @@ -1811,15 +1811,15 @@ DEFUN (config_enable_password,          }        else          { -          vty_outln (vty, "Unknown encryption type."); +          vty_out (vty, "Unknown encryption type.\n");            return CMD_WARNING;          }      }    if (!isalnum (argv[idx_8]->arg[0]))      { -      vty_outln (vty, -               "Please specify string starting with alphanumeric"); +      vty_out (vty, +               "Please specify string starting with alphanumeric\n");        return CMD_WARNING;      } @@ -1968,7 +1968,7 @@ DEFUN_HIDDEN (do_echo,  {    char *message; -  vty_outln (vty, "%s", +  vty_out (vty, "%s\n",               ((message = argv_concat(argv, argc, 1)) ? message : ""));    if (message)      XFREE(MTYPE_TMP, message); @@ -2040,11 +2040,11 @@ DEFUN (show_logging,               zl->filename);    vty_out (vty, VTYNL); -  vty_outln (vty, "Protocol name: %s", +  vty_out (vty, "Protocol name: %s\n",             zl->protoname); -  vty_outln (vty, "Record priority: %s", +  vty_out (vty, "Record priority: %s\n",             (zl->record_priority ? "enabled" : "disabled")); -  vty_outln (vty, "Timestamp precision: %d", +  vty_out (vty, "Timestamp precision: %d\n",             zl->timestamp_precision);    return CMD_SUCCESS; diff --git a/lib/distribute.c b/lib/distribute.c index 79d7b18ff5..8bf961e97e 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -349,7 +349,7 @@ DEFUN (no_distribute_list,    if (! ret)      { -      vty_outln (vty, "distribute list doesn't exist"); +      vty_out (vty, "distribute list doesn't exist\n");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -395,7 +395,7 @@ config_show_distribute (struct vty *vty)    if (has_print)      vty_out (vty, VTYNL);    else -    vty_outln (vty, " not set"); +    vty_out (vty, " not set\n");    for (i = 0; i < disthash->size; i++)      for (mp = disthash->index[i]; mp; mp = mp->next) @@ -416,7 +416,7 @@ config_show_distribute (struct vty *vty)              if (has_print)  	      vty_out (vty, VTYNL);              else -              vty_outln (vty, " nothing"); +              vty_out (vty, " nothing\n");  	    }        } @@ -439,7 +439,7 @@ config_show_distribute (struct vty *vty)    if (has_print)      vty_out (vty, VTYNL);    else -    vty_outln (vty, " not set"); +    vty_out (vty, " not set\n");    for (i = 0; i < disthash->size; i++)      for (mp = disthash->index[i]; mp; mp = mp->next) @@ -460,7 +460,7 @@ config_show_distribute (struct vty *vty)              if (has_print)  	      vty_out (vty, VTYNL);              else -              vty_outln (vty, " nothing"); +              vty_out (vty, " nothing\n");  	    }        }    return 0; @@ -487,7 +487,7 @@ config_write_distribute (struct vty *vty)  	  if (dist->list[j]) {  	    output = j == DISTRIBUTE_V4_OUT || j == DISTRIBUTE_V6_OUT;              v6 = j == DISTRIBUTE_V6_IN || j == DISTRIBUTE_V6_OUT; -	    vty_outln (vty, " %sdistribute-list %s %s %s", +	    vty_out (vty, " %sdistribute-list %s %s %s\n",                       v6 ? "ipv6 " : "",  		     dist->list[j],  		     output ? "out" : "in", @@ -499,7 +499,7 @@ config_write_distribute (struct vty *vty)  	  if (dist->prefix[j]) {  	    output = j == DISTRIBUTE_V4_OUT || j == DISTRIBUTE_V6_OUT;              v6 = j == DISTRIBUTE_V6_IN || j == DISTRIBUTE_V6_OUT; -	    vty_outln (vty, " %sdistribute-list prefix %s %s %s", +	    vty_out (vty, " %sdistribute-list prefix %s %s %s\n",                       v6 ? "ipv6 " : "",  		     dist->prefix[j],  		     output ? "out" : "in", diff --git a/lib/filter.c b/lib/filter.c index 3cef49b2da..b619b8a47d 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -576,7 +576,7 @@ vty_access_list_remark_unset (struct vty *vty, afi_t afi, const char *name)    access = access_list_lookup (afi, name);    if (! access)      { -      vty_outln (vty, "%% access-list %s doesn't exist",name); +      vty_out (vty, "%% access-list %s doesn't exist\n",name);        return CMD_WARNING;      } @@ -615,21 +615,21 @@ filter_set_cisco (struct vty *vty, const char *name_str, const char *type_str,      type = FILTER_DENY;    else      { -      vty_outln (vty, "%% filter type must be permit or deny"); +      vty_out (vty, "%% filter type must be permit or deny\n");        return CMD_WARNING;      }    ret = inet_aton (addr_str, &addr);    if (ret <= 0)      { -      vty_outln (vty,"%%Inconsistent address and mask"); +      vty_out (vty,"%%Inconsistent address and mask\n");        return CMD_WARNING;      }    ret = inet_aton (addr_mask_str, &addr_mask);    if (ret <= 0)      { -      vty_outln (vty,"%%Inconsistent address and mask"); +      vty_out (vty,"%%Inconsistent address and mask\n");        return CMD_WARNING;      } @@ -638,14 +638,14 @@ filter_set_cisco (struct vty *vty, const char *name_str, const char *type_str,        ret = inet_aton (mask_str, &mask);        if (ret <= 0)  	{ -	  vty_outln (vty,"%%Inconsistent address and mask"); +	  vty_out (vty,"%%Inconsistent address and mask\n");  	  return CMD_WARNING;  	}        ret = inet_aton (mask_mask_str, &mask_mask);        if (ret <= 0)  	{ -	  vty_outln (vty,"%%Inconsistent address and mask"); +	  vty_out (vty,"%%Inconsistent address and mask\n");  	  return CMD_WARNING;  	}      } @@ -1269,7 +1269,7 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,      type = FILTER_DENY;    else      { -      vty_outln (vty, "filter type must be [permit|deny]"); +      vty_out (vty, "filter type must be [permit|deny]\n");        return CMD_WARNING;      } @@ -1279,7 +1279,7 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,        ret = str2prefix_ipv4 (prefix_str, (struct prefix_ipv4 *)&p);        if (ret <= 0)  	{ -	  vty_outln (vty,"IP address prefix/prefixlen is malformed"); +	  vty_out (vty,"IP address prefix/prefixlen is malformed\n");  	  return CMD_WARNING;  	}      } @@ -1288,7 +1288,7 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,        ret = str2prefix_ipv6 (prefix_str, (struct prefix_ipv6 *) &p);        if (ret <= 0)  	{ -	  vty_outln (vty,"IPv6 address prefix/prefixlen is malformed"); +	  vty_out (vty,"IPv6 address prefix/prefixlen is malformed\n");  		   return CMD_WARNING;  	}      } @@ -1424,7 +1424,7 @@ DEFUN (no_access_list_all,    access = access_list_lookup (AFI_IP, argv[idx_acl]->arg);    if (access == NULL)      { -      vty_outln (vty, "%% access-list %s doesn't exist",argv[idx_acl]->arg); +      vty_out (vty, "%% access-list %s doesn't exist\n",argv[idx_acl]->arg);        return CMD_WARNING;      } @@ -1601,7 +1601,7 @@ DEFUN (no_ipv6_access_list_all,    access = access_list_lookup (AFI_IP6, argv[idx_word]->arg);    if (access == NULL)      { -      vty_outln (vty, "%% access-list %s doesn't exist",argv[idx_word]->arg); +      vty_out (vty, "%% access-list %s doesn't exist\n",argv[idx_word]->arg);        return CMD_WARNING;      } @@ -1688,7 +1688,7 @@ filter_show (struct vty *vty, const char *name, afi_t afi)      return 0;    /* Print the name of the protocol */ -  vty_outln (vty, "%s:", frr_protoname); +  vty_out (vty, "%s:\n", frr_protoname);    for (access = master->num.head; access; access = access->next)      { @@ -1703,7 +1703,7 @@ filter_show (struct vty *vty, const char *name, afi_t afi)  	  if (write)  	    { -	      vty_outln (vty, "%s IP%s access list %s", +	      vty_out (vty, "%s IP%s access list %s\n",  		       mfilter->cisco ?   		       (filter->extended ? "Extended" : "Standard") : "Zebra",  		       afi == AFI_IP6 ? "v6" : "", @@ -1721,7 +1721,7 @@ filter_show (struct vty *vty, const char *name, afi_t afi)  	  else  	    {  	      if (filter->addr_mask.s_addr == 0xffffffff) -		vty_outln (vty, " any"); +		vty_out (vty, " any\n");  	      else  		{  		  vty_out (vty, " %s", inet_ntoa (filter->addr)); @@ -1746,7 +1746,7 @@ filter_show (struct vty *vty, const char *name, afi_t afi)  	  if (write)  	    { -	      vty_outln (vty, "%s IP%s access list %s", +	      vty_out (vty, "%s IP%s access list %s\n",  		       mfilter->cisco ?   		       (filter->extended ? "Extended" : "Standard") : "Zebra",  		       afi == AFI_IP6 ? "v6" : "", @@ -1764,7 +1764,7 @@ filter_show (struct vty *vty, const char *name, afi_t afi)  	  else  	    {  	      if (filter->addr_mask.s_addr == 0xffffffff) -		vty_outln (vty, " any"); +		vty_out (vty, " any\n");  	      else  		{  		  vty_out (vty, " %s", inet_ntoa (filter->addr)); @@ -1860,7 +1860,7 @@ config_write_access_cisco (struct vty *vty, struct filter *mfilter)    else      {        if (filter->addr_mask.s_addr == 0xffffffff) -	vty_outln (vty, " any"); +	vty_out (vty, " any\n");        else  	{  	  vty_out (vty, " %s", inet_ntoa (filter->addr)); @@ -1908,7 +1908,7 @@ config_write_access (struct vty *vty, afi_t afi)      {        if (access->remark)  	{ -	  vty_outln (vty, "%saccess-list %s remark %s", +	  vty_out (vty, "%saccess-list %s remark %s\n",  		   afi == AFI_IP ? "" : "ipv6 ",  		   access->name,access->remark);  	  write++; @@ -1934,7 +1934,7 @@ config_write_access (struct vty *vty, afi_t afi)      {        if (access->remark)  	{ -	  vty_outln (vty, "%saccess-list %s remark %s", +	  vty_out (vty, "%saccess-list %s remark %s\n",  		   afi == AFI_IP ? "" : "ipv6 ",  		   access->name,access->remark);  	  write++; diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 9bb672dc53..c3e1898f10 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -118,7 +118,7 @@ DEFUN (grammar_test_complete,        // print completions        for (i = 0; i < vector_active (comps); i++) {          tkn = vector_slot (comps, i); -        vty_outln (vty, "  %-*s  %s", width, tkn->text, tkn->desc); +        vty_out (vty, "  %-*s  %s\n", width, tkn->text, tkn->desc);        }        for (i = 0; i < vector_active (comps); i++) @@ -126,7 +126,7 @@ DEFUN (grammar_test_complete,        vector_free (comps);      }    else -    vty_outln (vty, "%% No match"); +    vty_out (vty, "%% No match\n");    // free resources    list_delete (completions); @@ -164,13 +164,13 @@ DEFUN (grammar_test_match,    // print completions or relevant error message    if (element)      { -      vty_outln (vty, "Matched: %s", element->string); +      vty_out (vty, "Matched: %s\n", element->string);        struct listnode *ln;        struct cmd_token *token;        for (ALL_LIST_ELEMENTS_RO(argvv,ln,token)) -        vty_outln (vty, "%s -- %s", token->text, token->arg); +        vty_out (vty, "%s -- %s\n", token->text, token->arg); -      vty_outln (vty, "func: %p", element->func); +      vty_out (vty, "func: %p\n", element->func);        list_delete (argvv);      } @@ -178,16 +178,16 @@ DEFUN (grammar_test_match,       assert(MATCHER_ERROR(result));       switch (result) {         case MATCHER_NO_MATCH: -          vty_outln (vty, "%% Unknown command"); +          vty_out (vty, "%% Unknown command\n");            break;         case MATCHER_INCOMPLETE: -          vty_outln (vty, "%% Incomplete command"); +          vty_out (vty, "%% Incomplete command\n");            break;         case MATCHER_AMBIGUOUS: -          vty_outln (vty, "%% Ambiguous command"); +          vty_out (vty, "%% Ambiguous command\n");            break;         default: -          vty_outln (vty, "%% Unknown error"); +          vty_out (vty, "%% Unknown error\n");            break;       }    } @@ -401,7 +401,7 @@ DEFUN (grammar_findambig,          nodegraph = cnode->cmdgraph;          if (!nodegraph)            continue; -        vty_outln (vty, "scanning node %d", scannode - 1); +        vty_out (vty, "scanning node %d\n", scannode - 1);        }      commands = cmd_graph_permutations (nodegraph); @@ -410,13 +410,13 @@ DEFUN (grammar_findambig,        {          int same = prev && !strcmp (prev->cmd, cur->cmd);          if (printall && !same) -          vty_outln (vty, "'%s' [%x]", cur->cmd, cur->el->daemon); +          vty_out (vty, "'%s' [%x]\n", cur->cmd, cur->el->daemon);          if (same)            { -            vty_outln (vty, "'%s' AMBIGUOUS:", cur->cmd); -            vty_outln (vty, "  %s%s   '%s'", prev->el->name, VTYNL, +            vty_out (vty, "'%s' AMBIGUOUS:\n", cur->cmd); +            vty_out (vty, "  %s%s   '%s'\n", prev->el->name, VTYNL,                         prev->el->string); -            vty_outln (vty, "  %s%s   '%s'", cur->el->name,  VTYNL, +            vty_out (vty, "  %s%s   '%s'\n", cur->el->name,  VTYNL,                         cur->el->string);              vty_out (vty, VTYNL);              ambig++; @@ -428,7 +428,7 @@ DEFUN (grammar_findambig,      vty_out (vty, VTYNL);    } while (scan && scannode < LINK_PARAMS_NODE); -  vty_outln (vty, "%d ambiguous commands found.", ambig); +  vty_out (vty, "%d ambiguous commands found.\n", ambig);    if (scan)      nodegraph = NULL; @@ -465,11 +465,11 @@ DEFUN (grammar_access,    cnode = vector_slot (cmdvec, atoi (argv[2]->arg));    if (!cnode)      { -      vty_outln (vty, "%% no such node"); +      vty_out (vty, "%% no such node\n");        return CMD_WARNING;      } -  vty_outln (vty, "node %d", (int)cnode->node); +  vty_out (vty, "node %d\n", (int)cnode->node);    nodegraph = cnode->cmdgraph;    return CMD_SUCCESS;  } @@ -534,7 +534,7 @@ pretty_print_graph (struct vty *vty, struct graph_node *start, int level,    if (stackpos == MAXDEPTH)      { -      vty_outln (vty, " -aborting! (depth limit)"); +      vty_out (vty, " -aborting! (depth limit)\n");        return;      }    stack[stackpos++] = start; @@ -555,12 +555,12 @@ pretty_print_graph (struct vty *vty, struct graph_node *start, int level,            if (adj == start)              vty_out(vty, "*");            else if (((struct cmd_token *)adj->data)->type == END_TKN) -            vty_outln (vty, "--END"); +            vty_out (vty, "--END\n");            else {              size_t k;              for (k = 0; k < stackpos; k++)                if (stack[k] == adj) { -                vty_outln (vty, "<<loop@%zu ", k); +                vty_out (vty, "<<loop@%zu \n", k);                  break;                }              if (k == stackpos) @@ -652,5 +652,5 @@ init_cmdgraph (struct vty *vty, struct graph **graph)    struct cmd_token *token = cmd_token_new (START_TKN, 0, NULL, NULL);    graph_new_node (*graph, token, (void (*)(void *)) &cmd_token_del);    if (vty) -    vty_outln (vty, "initialized graph"); +    vty_out (vty, "initialized graph\n");  } diff --git a/lib/hash.c b/lib/hash.c index 95643bbae0..fb6d96ca76 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -458,11 +458,11 @@ DEFUN(show_hash_stats,    char underln[sizeof(header) + strlen(frr_protonameinst)];    memset (underln, '-', sizeof(underln));    underln[sizeof(underln) - 1] = '\0'; -  vty_outln (vty, "%s%s", header, frr_protonameinst); -  vty_outln (vty, "%s", underln); +  vty_out (vty, "%s%s\n", header, frr_protonameinst); +  vty_out (vty, "%s\n", underln); -  vty_outln (vty, "# allocated: %d", _hashes->count); -  vty_outln (vty, "# named:     %d%s", tt->nrows - 1, VTYNL); +  vty_out (vty, "# allocated: %d\n", _hashes->count); +  vty_out (vty, "# named:     %d%s\n", tt->nrows - 1, VTYNL);    if (tt->nrows > 1)      { @@ -472,7 +472,7 @@ DEFUN(show_hash_stats,        XFREE (MTYPE_TMP, table);      }    else -    vty_outln (vty, "No named hash tables to display."); +    vty_out (vty, "No named hash tables to display.\n");    ttable_del (tt); @@ -709,7 +709,7 @@ DEFUN (interface,    if (!ifp)      { -      vty_outln (vty, "%% interface %s not in %s", ifname, vrfname); +      vty_out (vty, "%% interface %s not in %s\n", ifname, vrfname);        return CMD_WARNING;      }    VTY_PUSH_CONTEXT (INTERFACE_NODE, ifp); diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 32bebd67ff..49f9da5249 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -228,7 +228,7 @@ DEFUN (if_rmap,      type = IF_RMAP_OUT;    else      { -      vty_outln (vty, "route-map direction must be [in|out]"); +      vty_out (vty, "route-map direction must be [in|out]\n");        return CMD_WARNING;      } @@ -259,14 +259,14 @@ DEFUN (no_if_rmap,      type = IF_RMAP_OUT;    else      { -      vty_outln (vty, "route-map direction must be [in|out]"); +      vty_out (vty, "route-map direction must be [in|out]\n");        return CMD_WARNING;      }    ret = if_rmap_unset (argv[idx_ifname]->arg, type, argv[idx_routemap_name]->arg);    if (! ret)      { -      vty_outln (vty, "route-map doesn't exist"); +      vty_out (vty, "route-map doesn't exist\n");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -290,7 +290,7 @@ config_write_if_rmap (struct vty *vty)  	if (if_rmap->routemap[IF_RMAP_IN])  	  { -	    vty_outln (vty, " route-map %s in %s",  +	    vty_out (vty, " route-map %s in %s\n",   		     if_rmap->routemap[IF_RMAP_IN],  		     if_rmap->ifname);  	    write++; @@ -298,7 +298,7 @@ config_write_if_rmap (struct vty *vty)  	if (if_rmap->routemap[IF_RMAP_OUT])  	  { -	    vty_outln (vty, " route-map %s out %s",  +	    vty_out (vty, " route-map %s out %s\n",   		     if_rmap->routemap[IF_RMAP_OUT],  		     if_rmap->ifname);  	    write++; diff --git a/lib/keychain.c b/lib/keychain.c index 9fe887c2c0..aaa8178c88 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -271,7 +271,7 @@ DEFUN (no_key_chain,    if (! keychain)      { -      vty_outln (vty, "Can't find keychain %s", argv[idx_word]->arg); +      vty_out (vty, "Can't find keychain %s\n", argv[idx_word]->arg);        return CMD_WARNING;      } @@ -314,7 +314,7 @@ DEFUN (no_key,    key = key_lookup (keychain, index);    if (! key)      { -      vty_outln (vty, "Can't find key %d", index); +      vty_out (vty, "Can't find key %d\n", index);        return CMD_WARNING;      } @@ -477,20 +477,20 @@ key_lifetime_set (struct vty *vty, struct key_range *krange,    time_start = key_str2time (stime_str, sday_str, smonth_str, syear_str);    if (time_start < 0)      { -      vty_outln (vty, "Malformed time value"); +      vty_out (vty, "Malformed time value\n");        return CMD_WARNING;      }    time_end = key_str2time (etime_str, eday_str, emonth_str, eyear_str);    if (time_end < 0)      { -      vty_outln (vty, "Malformed time value"); +      vty_out (vty, "Malformed time value\n");        return CMD_WARNING;      }    if (time_end <= time_start)      { -      vty_outln (vty, "Expire time is not later than start time"); +      vty_out (vty, "Expire time is not later than start time\n");        return CMD_WARNING;      } @@ -512,7 +512,7 @@ key_lifetime_duration_set (struct vty *vty, struct key_range *krange,    time_start = key_str2time (stime_str, sday_str, smonth_str, syear_str);    if (time_start < 0)      { -      vty_outln (vty, "Malformed time value"); +      vty_out (vty, "Malformed time value\n");        return CMD_WARNING;      }    krange->start = time_start; @@ -534,7 +534,7 @@ key_lifetime_infinite_set (struct vty *vty, struct key_range *krange,    time_start = key_str2time (stime_str, sday_str, smonth_str, syear_str);    if (time_start < 0)      { -      vty_outln (vty, "Malformed time value"); +      vty_out (vty, "Malformed time value\n");        return CMD_WARNING;      }    krange->start = time_start; @@ -966,14 +966,14 @@ keychain_config_write (struct vty *vty)    for (ALL_LIST_ELEMENTS_RO (keychain_list, node, keychain))      { -      vty_outln (vty, "key chain %s", keychain->name); +      vty_out (vty, "key chain %s\n", keychain->name);        for (ALL_LIST_ELEMENTS_RO (keychain->key, knode, key))  	{ -	  vty_outln (vty, " key %d", key->index); +	  vty_out (vty, " key %d\n", key->index);  	  if (key->string) -	    vty_outln (vty, "  key-string %s", key->string); +	    vty_out (vty, "  key-string %s\n", key->string);  	  if (key->accept.start)  	    { @@ -1010,7 +1010,7 @@ keychain_config_write (struct vty *vty)  	      vty_out (vty, VTYNL);  	    }  	} -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      }    return 0; diff --git a/lib/memory_vty.c b/lib/memory_vty.c index 5983efbdcc..04909d633a 100644 --- a/lib/memory_vty.c +++ b/lib/memory_vty.c @@ -44,26 +44,26 @@ show_memory_mallinfo (struct vty *vty)    struct mallinfo minfo = mallinfo();    char buf[MTYPE_MEMSTR_LEN]; -  vty_outln (vty, "System allocator statistics:"); -  vty_outln (vty, "  Total heap allocated:  %s", +  vty_out (vty, "System allocator statistics:\n"); +  vty_out (vty, "  Total heap allocated:  %s\n",             mtype_memstr(buf, MTYPE_MEMSTR_LEN, minfo.arena)); -  vty_outln (vty, "  Holding block headers: %s", +  vty_out (vty, "  Holding block headers: %s\n",             mtype_memstr(buf, MTYPE_MEMSTR_LEN, minfo.hblkhd)); -  vty_outln (vty, "  Used small blocks:     %s", +  vty_out (vty, "  Used small blocks:     %s\n",             mtype_memstr(buf, MTYPE_MEMSTR_LEN, minfo.usmblks)); -  vty_outln (vty, "  Used ordinary blocks:  %s", +  vty_out (vty, "  Used ordinary blocks:  %s\n",             mtype_memstr(buf, MTYPE_MEMSTR_LEN, minfo.uordblks)); -  vty_outln (vty, "  Free small blocks:     %s", +  vty_out (vty, "  Free small blocks:     %s\n",             mtype_memstr(buf, MTYPE_MEMSTR_LEN, minfo.fsmblks)); -  vty_outln (vty, "  Free ordinary blocks:  %s", +  vty_out (vty, "  Free ordinary blocks:  %s\n",             mtype_memstr(buf, MTYPE_MEMSTR_LEN, minfo.fordblks)); -  vty_outln (vty, "  Ordinary blocks:       %ld", +  vty_out (vty, "  Ordinary blocks:       %ld\n",             (unsigned long)minfo.ordblks); -  vty_outln (vty, "  Small blocks:          %ld", +  vty_out (vty, "  Small blocks:          %ld\n",             (unsigned long)minfo.smblks); -  vty_outln (vty, "  Holding blocks:        %ld", +  vty_out (vty, "  Holding blocks:        %ld\n",             (unsigned long)minfo.hblks); -  vty_outln (vty,"(see system documentation for 'mallinfo' for meaning)"); +  vty_out (vty,"(see system documentation for 'mallinfo' for meaning)\n");    return 1;  }  #endif /* HAVE_MALLINFO */ @@ -72,12 +72,12 @@ static int qmem_walker(void *arg, struct memgroup *mg, struct memtype *mt)  {  	struct vty *vty = arg;  	if (!mt) -		vty_outln (vty, "--- qmem %s ---", mg->name); +		vty_out (vty, "--- qmem %s ---\n", mg->name);  	else {  		if (mt->n_alloc != 0) {  			char size[32];  			snprintf(size, sizeof(size), "%6zu", mt->size); -			vty_outln (vty, "%-30s: %10zu  %s", +			vty_out (vty, "%-30s: %10zu  %s\n",  				 mt->name, mt->n_alloc,  				 mt->size == 0 ? "" : mt->size == SIZE_VAR ? "(variably sized)" : size);  		} @@ -108,14 +108,14 @@ DEFUN (show_modules,  {    struct frrmod_runtime *plug = frrmod_list; -  vty_outln (vty, "%-12s %-25s %s%s", +  vty_out (vty, "%-12s %-25s %s%s\n",                  "Module Name", "Version", "Description",                  VTYNL);    while (plug)      {        const struct frrmod_info *i = plug->info; -      vty_outln (vty, "%-12s %-25s %s", i->name, i->version,i->description); +      vty_out (vty, "%-12s %-25s %s\n", i->name, i->version,i->description);        if (plug->dl_handle)          {  #ifdef HAVE_DLINFO_ORIGIN @@ -129,13 +129,13 @@ DEFUN (show_modules,              {                name = strrchr(lm->l_name, '/');                name = name ? name + 1 : lm->l_name; -              vty_outln (vty, "\tfrom: %s/%s", origin, name); +              vty_out (vty, "\tfrom: %s/%s\n", origin, name);              }  # else -          vty_outln (vty, "\tfrom: %s ", origin, plug->load_name); +          vty_out (vty, "\tfrom: %s \n", origin, plug->load_name);  # endif  #else -          vty_outln (vty, "\tfrom: %s", plug->load_name); +          vty_out (vty, "\tfrom: %s\n", plug->load_name);  #endif          }        plug = plug->next; @@ -296,7 +296,7 @@ ns_netns_pathname (struct vty *vty, const char *name)    if (! result)      { -      vty_outln (vty, "Invalid pathname: %s",safe_strerror(errno)); +      vty_out (vty, "Invalid pathname: %s\n",safe_strerror(errno));        return NULL;      }    return pathname; @@ -365,13 +365,13 @@ DEFUN (no_ns_netns,    if (!ns)      { -      vty_outln (vty, "NS %u is not found", ns_id); +      vty_out (vty, "NS %u is not found\n", ns_id);        return CMD_SUCCESS;      }    if (ns->name && strcmp (ns->name, pathname) != 0)      { -      vty_outln (vty, "Incorrect NETNS file name"); +      vty_out (vty, "Incorrect NETNS file name\n");        return CMD_WARNING;      } @@ -405,7 +405,7 @@ ns_config_write (struct vty *vty)        if (ns->ns_id == NS_DEFAULT || ns->name == NULL)  	continue; -      vty_outln (vty, "logical-router %u netns %s", ns->ns_id,ns->name); +      vty_out (vty, "logical-router %u netns %s\n", ns->ns_id,ns->name);        write = 1;    } diff --git a/lib/plist.c b/lib/plist.c index 339540a2b5..9f20a412e9 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -882,7 +882,7 @@ prefix_entry_dup_check (struct prefix_list *plist,  static int  vty_invalid_prefix_range (struct vty *vty, const char *prefix)  { -  vty_outln (vty, "%% Invalid prefix range for %s, make sure: len < ge-value <= le-value", +  vty_out (vty, "%% Invalid prefix range for %s, make sure: len < ge-value <= le-value\n",             prefix);    return CMD_WARNING;  } @@ -920,7 +920,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,      type = PREFIX_DENY;    else      { -      vty_outln (vty, "%% prefix type must be permit or deny"); +      vty_out (vty, "%% prefix type must be permit or deny\n");        return CMD_WARNING;      } @@ -940,7 +940,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,        if (ret <= 0)  	{ -	  vty_outln (vty, "%% Malformed IPv4 prefix"); +	  vty_out (vty, "%% Malformed IPv4 prefix\n");  	  return CMD_WARNING;  	} @@ -962,7 +962,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,        if (ret <= 0)  	{ -	  vty_outln (vty, "%% Malformed IPv6 prefix"); +	  vty_out (vty, "%% Malformed IPv6 prefix\n");  	  return CMD_WARNING;  	} @@ -973,7 +973,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,        break;      case AFI_L2VPN:      default: -      vty_outln (vty, "%% Unrecognized AFI (%d)", afi); +      vty_out (vty, "%% Unrecognized AFI (%d)\n", afi);        return CMD_WARNING;        break;      } @@ -1042,7 +1042,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,    plist = prefix_list_lookup (afi, name);    if (! plist)      { -      vty_outln (vty, "%% Can't find specified prefix-list"); +      vty_out (vty, "%% Can't find specified prefix-list\n");        return CMD_WARNING;      } @@ -1057,7 +1057,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,    /* We must have, at a minimum, both the type and prefix here */    if ((typestr == NULL) || (prefix == NULL))      { -      vty_outln (vty, "%% Both prefix and type required"); +      vty_out (vty, "%% Both prefix and type required\n");        return CMD_WARNING;      } @@ -1078,7 +1078,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,      type = PREFIX_DENY;    else      { -      vty_outln (vty, "%% prefix type must be permit or deny"); +      vty_out (vty, "%% prefix type must be permit or deny\n");        return CMD_WARNING;      } @@ -1096,7 +1096,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,        if (ret <= 0)  	{ -	  vty_outln (vty, "%% Malformed IPv4 prefix"); +	  vty_out (vty, "%% Malformed IPv4 prefix\n");  	  return CMD_WARNING;  	}      } @@ -1113,7 +1113,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,        if (ret <= 0)  	{ -	  vty_outln (vty, "%% Malformed IPv6 prefix"); +	  vty_out (vty, "%% Malformed IPv6 prefix\n");  	  return CMD_WARNING;  	}      } @@ -1123,7 +1123,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,    if (pentry == NULL)      { -      vty_outln (vty, "%% Can't find specified prefix-list"); +      vty_out (vty, "%% Can't find specified prefix-list\n");        return CMD_WARNING;      } @@ -1141,7 +1141,7 @@ vty_prefix_list_desc_unset (struct vty *vty, afi_t afi, const char *name)    plist = prefix_list_lookup (afi, name);    if (! plist)      { -      vty_outln (vty, "%% Can't find specified prefix-list"); +      vty_out (vty, "%% Can't find specified prefix-list\n");        return CMD_WARNING;      } @@ -1179,21 +1179,21 @@ vty_show_prefix_entry (struct vty *vty, afi_t afi, struct prefix_list *plist,    if (dtype == normal_display)      { -      vty_outln (vty, "ip%s prefix-list %s: %d entries", +      vty_out (vty, "ip%s prefix-list %s: %d entries\n",  	       afi == AFI_IP ? "" : "v6",  	       plist->name, plist->count);        if (plist->desc) -	vty_outln (vty, "   Description: %s", plist->desc); +	vty_out (vty, "   Description: %s\n", plist->desc);      }    else if (dtype == summary_display || dtype == detail_display)      { -      vty_outln (vty, "ip%s prefix-list %s:", +      vty_out (vty, "ip%s prefix-list %s:\n",  	       afi == AFI_IP ? "" : "v6", plist->name);        if (plist->desc) -	vty_outln (vty, "   Description: %s", plist->desc); +	vty_out (vty, "   Description: %s\n", plist->desc); -      vty_outln (vty, "   count: %d, range entries: %d, sequences: %u - %u", +      vty_out (vty, "   count: %d, range entries: %d, sequences: %u - %u\n",  	       plist->count, plist->rangecount,   	       plist->head ? plist->head->seq : 0,   	       plist->tail ? plist->tail->seq : 0); @@ -1259,7 +1259,7 @@ vty_show_prefix_list (struct vty *vty, afi_t afi, const char *name,        plist = prefix_list_lookup (afi, name);        if (! plist)  	{ -	  vty_outln (vty, "%% Can't find specified prefix-list"); +	  vty_out (vty, "%% Can't find specified prefix-list\n");  	  return CMD_WARNING;  	}        vty_show_prefix_entry (vty, afi, plist, master, dtype, seqnum); @@ -1269,7 +1269,7 @@ vty_show_prefix_list (struct vty *vty, afi_t afi, const char *name,        if (dtype == detail_display || dtype == summary_display)  	{  	  if (master->recent) -	    vty_outln (vty, "Prefix-list with the last deletion/insertion: %s", +	    vty_out (vty, "Prefix-list with the last deletion/insertion: %s\n",  		     master->recent->name);  	} @@ -1296,14 +1296,14 @@ vty_show_prefix_list_prefix (struct vty *vty, afi_t afi, const char *name,    plist = prefix_list_lookup (afi, name);    if (! plist)      { -      vty_outln (vty, "%% Can't find specified prefix-list"); +      vty_out (vty, "%% Can't find specified prefix-list\n");        return CMD_WARNING;      }    ret = str2prefix (prefix, &p);    if (ret <= 0)      { -      vty_outln (vty, "%% prefix is malformed"); +      vty_out (vty, "%% prefix is malformed\n");        return CMD_WARNING;      } @@ -1384,7 +1384,7 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name,        plist = prefix_list_lookup (afi, name);        if (! plist)  	{ -	  vty_outln (vty, "%% Can't find specified prefix-list"); +	  vty_out (vty, "%% Can't find specified prefix-list\n");  	  return CMD_WARNING;  	} @@ -1393,7 +1393,7 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name,  	  ret = str2prefix (prefix, &p);  	  if (ret <= 0)  	    { -	      vty_outln (vty, "%% prefix is malformed"); +	      vty_out (vty, "%% prefix is malformed\n");  	      return CMD_WARNING;  	    }  	} @@ -1816,16 +1816,16 @@ config_write_prefix_afi (afi_t afi, struct vty *vty)    if (! master->seqnum)      { -      vty_outln (vty, "no ip%s prefix-list sequence-number",  +      vty_out (vty, "no ip%s prefix-list sequence-number\n",   	       afi == AFI_IP ? "" : "v6"); -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      }    for (plist = master->num.head; plist; plist = plist->next)      {        if (plist->desc)  	{ -	  vty_outln (vty, "ip%s prefix-list %s description %s", +	  vty_out (vty, "ip%s prefix-list %s description %s\n",  		   afi == AFI_IP ? "" : "v6",  		   plist->name, plist->desc);  	  write++; @@ -1868,7 +1868,7 @@ config_write_prefix_afi (afi_t afi, struct vty *vty)      {        if (plist->desc)  	{ -	  vty_outln (vty, "ip%s prefix-list %s description %s", +	  vty_out (vty, "ip%s prefix-list %s description %s\n",  		   afi == AFI_IP ? "" : "v6",  		   plist->name, plist->desc);  	  write++; @@ -2046,13 +2046,13 @@ prefix_bgp_show_prefix_list (struct vty *vty, afi_t afi, char *name, u_char use_        else          json_object_object_add(json, "ipv6PrefixList", json_prefix); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      }    else      { -      vty_outln (vty, "ip%s prefix-list %s: %d entries", +      vty_out (vty, "ip%s prefix-list %s: %d entries\n",                 afi == AFI_IP ? "" : "v6",                 plist->name, plist->count); diff --git a/lib/routemap.c b/lib/routemap.c index caba8afd71..fe14a70452 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -521,10 +521,10 @@ generic_match_add (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); +          vty_out (vty, "%% [%s] Can't find rule.\n", frr_protonameinst);            return CMD_WARNING;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", +          vty_out (vty, "%% [%s] Argument form is unsupported or malformed.\n",                       frr_protonameinst);            return CMD_WARNING;          } @@ -568,10 +568,10 @@ generic_match_delete (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); +          vty_out (vty, "%% [%s] Can't find rule.\n", frr_protonameinst);            break;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", +          vty_out (vty, "%% [%s] Argument form is unsupported or malformed.\n",                       frr_protonameinst);            break;          } @@ -605,10 +605,10 @@ generic_set_add (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); +          vty_out (vty, "%% [%s] Can't find rule.\n", frr_protonameinst);            return CMD_WARNING;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", +          vty_out (vty, "%% [%s] Argument form is unsupported or malformed.\n",                       frr_protonameinst);            return CMD_WARNING;          } @@ -628,10 +628,10 @@ generic_set_delete (struct vty *vty, struct route_map_index *index,        switch (ret)          {          case RMAP_RULE_MISSING: -          vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); +          vty_out (vty, "%% [%s] Can't find rule.\n", frr_protonameinst);            return CMD_WARNING;          case RMAP_COMPILE_ERROR: -          vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", +          vty_out (vty, "%% [%s] Argument form is unsupported or malformed.\n",                       frr_protonameinst);            return CMD_WARNING;          } @@ -993,43 +993,43 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map)    struct route_map_index *index;    struct route_map_rule *rule; -  vty_outln (vty, "%s:", frr_protonameinst); +  vty_out (vty, "%s:\n", frr_protonameinst);    for (index = map->head; index; index = index->next)      { -      vty_outln (vty, "route-map %s, %s, sequence %d", +      vty_out (vty, "route-map %s, %s, sequence %d\n",                 map->name, route_map_type_str (index->type),                 index->pref);        /* Description */        if (index->description) -	vty_outln (vty, "  Description:%s    %s", VTYNL, +	vty_out (vty, "  Description:%s    %s\n", VTYNL,  		 index->description);        /* Match clauses */ -      vty_outln (vty, "  Match clauses:"); +      vty_out (vty, "  Match clauses:\n");        for (rule = index->match_list.head; rule; rule = rule->next) -        vty_outln (vty, "    %s %s",  +        vty_out (vty, "    %s %s\n",                    rule->cmd->str, rule->rule_str); -      vty_outln (vty, "  Set clauses:"); +      vty_out (vty, "  Set clauses:\n");        for (rule = index->set_list.head; rule; rule = rule->next) -        vty_outln (vty, "    %s %s", +        vty_out (vty, "    %s %s\n",                   rule->cmd->str, rule->rule_str);        /* Call clause */ -      vty_outln (vty, "  Call clause:"); +      vty_out (vty, "  Call clause:\n");        if (index->nextrm) -        vty_outln (vty, "    Call %s", index->nextrm); +        vty_out (vty, "    Call %s\n", index->nextrm);        /* Exit Policy */ -      vty_outln (vty, "  Action:"); +      vty_out (vty, "  Action:\n");        if (index->exitpolicy == RMAP_GOTO) -        vty_outln (vty, "    Goto %d", index->nextpref); +        vty_out (vty, "    Goto %d\n", index->nextpref);        else if (index->exitpolicy == RMAP_NEXT) -        vty_outln (vty, "    Continue to next entry"); +        vty_out (vty, "    Continue to next entry\n");        else if (index->exitpolicy == RMAP_EXIT) -        vty_outln (vty, "    Exit routemap"); +        vty_out (vty, "    Exit routemap\n");      }  } @@ -1049,7 +1049,7 @@ vty_show_route_map (struct vty *vty, const char *name)          }        else          { -          vty_outln (vty, "%s: 'route-map %s' not found", frr_protonameinst, +          vty_out (vty, "%s: 'route-map %s' not found\n", frr_protonameinst,                     name);            return CMD_SUCCESS;          } @@ -2359,7 +2359,7 @@ DEFUN (set_ip_nexthop,    ret = str2sockunion (argv[idx_ipv4]->arg, &su);    if (ret < 0)      { -      vty_outln (vty, "%% Malformed nexthop address"); +      vty_out (vty, "%% Malformed nexthop address\n");        return CMD_WARNING;      }    if (su.sin.sin_addr.s_addr == 0 || @@ -2416,12 +2416,12 @@ DEFUN (set_ipv6_nexthop_local,    ret = inet_pton (AF_INET6, argv[idx_ipv6]->arg, &addr);    if (!ret)      { -      vty_outln (vty, "%% Malformed nexthop address"); +      vty_out (vty, "%% Malformed nexthop address\n");        return CMD_WARNING;      }    if (!IN6_IS_ADDR_LINKLOCAL(&addr))      { -      vty_outln (vty, "%% Invalid link-local nexthop address"); +      vty_out (vty, "%% Invalid link-local nexthop address\n");        return CMD_WARNING;      } @@ -2577,7 +2577,7 @@ DEFUN (no_route_map_all,    map = route_map_lookup_by_name (mapname);    if (map == NULL)      { -      vty_outln (vty, "%% Could not find route-map %s", mapname); +      vty_out (vty, "%% Could not find route-map %s\n", mapname);        return CMD_WARNING;      } @@ -2612,7 +2612,7 @@ DEFUN (no_route_map,    map = route_map_lookup_by_name (mapname);    if (map == NULL)      { -      vty_outln (vty, "%% Could not find route-map %s", mapname); +      vty_out (vty, "%% Could not find route-map %s\n", mapname);        return CMD_WARNING;      } @@ -2620,7 +2620,7 @@ DEFUN (no_route_map,    index = route_map_index_lookup (map, permit, pref);    if (index == NULL)      { -      vty_outln (vty, "%% Could not find route-map entry %s %s",  +      vty_out (vty, "%% Could not find route-map entry %s %s\n",   	       mapname, prefstr);        return CMD_WARNING;      } @@ -2648,7 +2648,7 @@ DEFUN (rmap_onmatch_next,        if (index->type == RMAP_DENY)          {  	  /* Under a deny clause, match means it's finished. No need to set next */ -	  vty_outln (vty,"on-match next not supported under route-map deny"); +	  vty_out (vty,"on-match next not supported under route-map deny\n");  	  return CMD_WARNING;          }        index->exitpolicy = RMAP_NEXT; @@ -2689,7 +2689,7 @@ DEFUN (rmap_onmatch_goto,        if (index->type == RMAP_DENY)          {  	  /* Under a deny clause, match means it's finished. No need to go anywhere */ -	  vty_outln (vty,"on-match goto not supported under route-map deny"); +	  vty_out (vty,"on-match goto not supported under route-map deny\n");  	  return CMD_WARNING;          } @@ -2701,7 +2701,7 @@ DEFUN (rmap_onmatch_goto,        if (d <= index->pref)  	{  	  /* Can't allow you to do that, Dave */ -	  vty_outln (vty, "can't jump backwards in route-maps"); +	  vty_out (vty, "can't jump backwards in route-maps\n");  	  return CMD_WARNING;  	}        else @@ -2860,31 +2860,31 @@ route_map_config_write (struct vty *vty)      for (index = map->head; index; index = index->next)        {  	if (!first) -	  vty_outln (vty, "!"); +	  vty_out (vty, "!\n");  	else  	  first = 0; -	vty_outln (vty, "route-map %s %s %d",  +	vty_out (vty, "route-map %s %s %d\n",   		 map->name,  		 route_map_type_str (index->type),  		 index->pref);  	if (index->description) -	  vty_outln (vty, " description %s", index->description); +	  vty_out (vty, " description %s\n", index->description);  	for (rule = index->match_list.head; rule; rule = rule->next) -	  vty_outln (vty, " match %s %s", rule->cmd->str,  +	  vty_out (vty, " match %s %s\n", rule->cmd->str,   		   rule->rule_str ? rule->rule_str : "");  	for (rule = index->set_list.head; rule; rule = rule->next) -	  vty_outln (vty, " set %s %s", rule->cmd->str, +	  vty_out (vty, " set %s %s\n", rule->cmd->str,  		   rule->rule_str ? rule->rule_str : "");     if (index->nextrm) -     vty_outln (vty, " call %s", index->nextrm); +     vty_out (vty, " call %s\n", index->nextrm);  	if (index->exitpolicy == RMAP_GOTO) -      vty_outln (vty, " on-match goto %d", index->nextpref); +      vty_out (vty, " on-match goto %d\n", index->nextpref);  	if (index->exitpolicy == RMAP_NEXT) -	  vty_outln (vty," on-match next"); +	  vty_out (vty," on-match next\n");  	write++;        } diff --git a/lib/skiplist.c b/lib/skiplist.c index 5ba1c80e45..fd772b64c8 100644 --- a/lib/skiplist.c +++ b/lib/skiplist.c @@ -602,9 +602,9 @@ skiplist_debug(struct vty *vty, struct skiplist *l)      if (!l)  	l = skiplist_last_created; -    vty_outln (vty, "Skiplist %p has max level %d", l, l->level); +    vty_out (vty, "Skiplist %p has max level %d\n", l, l->level);      for (i = l->level; i >= 0; --i) -	vty_outln (vty, "  @%d: %ld", +	vty_out (vty, "  @%d: %ld\n",  	    i,(long)((l->stats->forward[i]) - (struct skiplistnode *)NULL));  } diff --git a/lib/smux.c b/lib/smux.c index 6f4b45f9a3..f8bf01e289 100644 --- a/lib/smux.c +++ b/lib/smux.c @@ -1387,7 +1387,7 @@ config_write_smux (struct vty *vty)  	  vty_out (vty, "%s%d", first ? "" : ".", (int) smux_oid[i]);  	  first = 0;  	} -      vty_outln (vty, " %s", smux_passwd); +      vty_out (vty, " %s\n", smux_passwd);      }    return 0;  } diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c index 7cbb300c5f..10f00426cf 100644 --- a/lib/spf_backoff.c +++ b/lib/spf_backoff.c @@ -223,43 +223,43 @@ void  spf_backoff_show(struct spf_backoff *backoff, struct vty *vty,                   const char *prefix)  { -  vty_outln (vty, "%sCurrent state:     %s", prefix, +  vty_out (vty, "%sCurrent state:     %s\n", prefix,            spf_backoff_state2str(backoff->state)); -  vty_outln (vty, "%sInit timer:        %ld msec", prefix, +  vty_out (vty, "%sInit timer:        %ld msec\n", prefix,            backoff->init_delay); -  vty_outln (vty, "%sShort timer:       %ld msec", prefix, +  vty_out (vty, "%sShort timer:       %ld msec\n", prefix,            backoff->short_delay); -  vty_outln (vty, "%sLong timer:        %ld msec", prefix, +  vty_out (vty, "%sLong timer:        %ld msec\n", prefix,            backoff->long_delay); -  vty_outln (vty, "%sHolddown timer:    %ld msec", prefix, +  vty_out (vty, "%sHolddown timer:    %ld msec\n", prefix,            backoff->holddown);    if (backoff->t_holddown)      {        struct timeval remain = thread_timer_remain(backoff->t_holddown); -      vty_outln (vty, "%s                   Still runs for %ld msec", +      vty_out (vty, "%s                   Still runs for %ld msec\n",                prefix, remain.tv_sec * 1000 + remain.tv_usec / 1000);      }    else      { -      vty_outln (vty, "%s                   Inactive", prefix); +      vty_out (vty, "%s                   Inactive\n", prefix);      } -  vty_outln (vty, "%sTimeToLearn timer: %ld msec", prefix, +  vty_out (vty, "%sTimeToLearn timer: %ld msec\n", prefix,            backoff->timetolearn);    if (backoff->t_timetolearn)      {        struct timeval remain = thread_timer_remain(backoff->t_timetolearn); -      vty_outln (vty, "%s                   Still runs for %ld msec", +      vty_out (vty, "%s                   Still runs for %ld msec\n",                prefix, remain.tv_sec * 1000 + remain.tv_usec / 1000);      }    else      { -      vty_outln (vty, "%s                   Inactive", prefix); +      vty_out (vty, "%s                   Inactive\n", prefix);      } -  vty_outln (vty, "%sFirst event:       %s", prefix, +  vty_out (vty, "%sFirst event:       %s\n", prefix,            timeval_format(&backoff->first_event_time)); -  vty_outln (vty, "%sLast event:        %s", prefix, +  vty_out (vty, "%sLast event:        %s\n", prefix,            timeval_format(&backoff->last_event_time));  } @@ -291,7 +291,7 @@ spf_backoff_write_config(struct vty *vty)    if (debug_spf_backoff)      { -      vty_outln (vty, "debug spf-delay-ietf"); +      vty_out (vty, "debug spf-delay-ietf\n");        written++;      } diff --git a/lib/thread.c b/lib/thread.c index 4e72d4c96f..e59d68b0e0 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -95,7 +95,7 @@ vty_out_cpu_thread_history(struct vty* vty,  	  a->total_active, a->cpu.total/1000, a->cpu.total%1000, a->total_calls,  	  a->cpu.total/a->total_calls, a->cpu.max,  	  a->real.total/a->total_calls, a->real.max); -  vty_outln (vty, " %c%c%c%c%c %s", +  vty_out (vty, " %c%c%c%c%c %s\n",  	  a->types & (1 << THREAD_READ) ? 'R':' ',  	  a->types & (1 << THREAD_WRITE) ? 'W':' ',  	  a->types & (1 << THREAD_TIMER) ? 'T':' ', @@ -148,12 +148,12 @@ cpu_record_print(struct vty *vty, thread_type filter)        underline[sizeof(underline)] = '\0';        vty_out (vty, VTYNL); -      vty_outln(vty, "Showing statistics for pthread %s", name); -      vty_outln(vty, "-------------------------------%s", underline); -      vty_outln(vty, "%21s %18s %18s", "", "CPU (user+system):", "Real (wall-clock):"); +      vty_out(vty, "Showing statistics for pthread %s\n", name); +      vty_out(vty, "-------------------------------%s\n", underline); +      vty_out(vty, "%21s %18s %18s\n", "", "CPU (user+system):", "Real (wall-clock):");        vty_out(vty, "Active   Runtime(ms)   Invoked Avg uSec Max uSecs");        vty_out(vty, " Avg uSec Max uSecs"); -      vty_outln(vty, "  Type  Thread"); +      vty_out(vty, "  Type  Thread\n");        if (m->cpu_record->count)          hash_iterate(m->cpu_record, @@ -161,7 +161,7 @@ cpu_record_print(struct vty *vty, thread_type filter)                       cpu_record_hash_print,                       args);        else -        vty_outln(vty, "No data to display yet."); +        vty_out(vty, "No data to display yet.\n");        vty_out(vty, VTYNL);      } @@ -169,12 +169,12 @@ cpu_record_print(struct vty *vty, thread_type filter)    pthread_mutex_unlock (&masters_mtx);    vty_out(vty, VTYNL); -  vty_outln(vty, "Total thread statistics"); -  vty_outln(vty, "-------------------------"); -  vty_outln(vty, "%21s %18s %18s", "", "CPU (user+system):", "Real (wall-clock):"); +  vty_out(vty, "Total thread statistics\n"); +  vty_out(vty, "-------------------------\n"); +  vty_out(vty, "%21s %18s %18s\n", "", "CPU (user+system):", "Real (wall-clock):");    vty_out(vty, "Active   Runtime(ms)   Invoked Avg uSec Max uSecs");    vty_out(vty, " Avg uSec Max uSecs"); -  vty_outln(vty, "  Type  Thread"); +  vty_out(vty, "  Type  Thread\n");    if (tmp.total_calls > 0)      vty_out_cpu_thread_history(vty, &tmp); @@ -555,7 +555,7 @@ static int  vrf_write_host (struct vty *vty)  {    if (debug_vrf) -    vty_outln (vty, "debug vrf"); +    vty_out (vty, "debug vrf\n");    return 1;  } @@ -247,12 +247,12 @@ vty_hello (struct vty *vty)                for (s = buf + strlen (buf); (s > buf) && isspace ((int)*(s - 1));                     s--);                *s = '\0'; -              vty_outln (vty, "%s", buf); +              vty_out (vty, "%s\n", buf);              }            fclose (f);          }        else -        vty_outln (vty, "MOTD file not found"); +        vty_out (vty, "MOTD file not found\n");      }    else if (host.motd)      vty_out (vty, "%s", host.motd); @@ -385,14 +385,14 @@ vty_auth (struct vty *vty, char *buf)          {            if (vty->node == AUTH_NODE)              { -              vty_outln (vty, "%% Bad passwords, too many failures!"); +              vty_out (vty, "%% Bad passwords, too many failures!\n");                vty->status = VTY_CLOSE;              }            else              {                /* AUTH_ENABLE_NODE */                vty->fail = 0; -              vty_outln (vty, "%% Bad enable passwords, too many failures!"); +              vty_out (vty, "%% Bad enable passwords, too many failures!\n");  	      vty->status = VTY_CLOSE;              }          } @@ -477,16 +477,16 @@ vty_command (struct vty *vty, char *buf)        {        case CMD_WARNING:          if (vty->type == VTY_FILE) -          vty_outln (vty, "Warning..."); +          vty_out (vty, "Warning...\n");          break;        case CMD_ERR_AMBIGUOUS: -        vty_outln (vty, "%% Ambiguous command."); +        vty_out (vty, "%% Ambiguous command.\n");          break;        case CMD_ERR_NO_MATCH: -        vty_outln (vty, "%% [%s] Unknown command: %s", protocolname, buf); +        vty_out (vty, "%% [%s] Unknown command: %s\n", protocolname, buf);          break;        case CMD_ERR_INCOMPLETE: -        vty_outln (vty, "%% Command incomplete."); +        vty_out (vty, "%% Command incomplete.\n");          break;        }    cmd_free_strvec (vline); @@ -933,7 +933,7 @@ vty_complete_command (struct vty *vty)    switch (ret)      {      case CMD_ERR_AMBIGUOUS: -      vty_outln (vty, "%% Ambiguous command."); +      vty_out (vty, "%% Ambiguous command.\n");        vty_prompt (vty);        vty_redraw_line (vty);        break; @@ -946,7 +946,7 @@ vty_complete_command (struct vty *vty)        if (!matched[0])          {            /* 2016-11-28 equinox -- need to debug, SEGV here */ -          vty_outln (vty, "%% CLI BUG: FULL_MATCH with NULL str"); +          vty_out (vty, "%% CLI BUG: FULL_MATCH with NULL str\n");            vty_prompt (vty);            vty_redraw_line (vty);            break; @@ -1001,7 +1001,7 @@ vty_describe_fold (struct vty *vty, int cmd_width,    if (desc_width <= 0)      { -      vty_outln (vty, "  %-*s  %s", cmd_width, cmd, token->desc); +      vty_out (vty, "  %-*s  %s\n", cmd_width, cmd, token->desc);        return;      } @@ -1018,12 +1018,12 @@ vty_describe_fold (struct vty *vty, int cmd_width,        strncpy (buf, p, pos);        buf[pos] = '\0'; -      vty_outln (vty, "  %-*s  %s", cmd_width, cmd, buf); +      vty_out (vty, "  %-*s  %s\n", cmd_width, cmd, buf);        cmd = "";      } -  vty_outln (vty, "  %-*s  %s", cmd_width, cmd, p); +  vty_out (vty, "  %-*s  %s\n", cmd_width, cmd, p);    XFREE (MTYPE_TMP, buf);  } @@ -1058,11 +1058,11 @@ vty_describe_command (struct vty *vty)    switch (ret)      {      case CMD_ERR_AMBIGUOUS: -      vty_outln (vty, "%% Ambiguous command."); +      vty_out (vty, "%% Ambiguous command.\n");        goto out;        break;      case CMD_ERR_NO_MATCH: -      vty_outln (vty, "%% There is no matched command."); +      vty_out (vty, "%% There is no matched command.\n");        goto out;        break;      } @@ -1100,10 +1100,10 @@ vty_describe_command (struct vty *vty)            }          if (!token->desc) -          vty_outln (vty, "  %-s", +          vty_out (vty, "  %-s\n",                     token->text);          else if (desc_width >= strlen (token->desc)) -          vty_outln (vty, "  %-*s  %s", width, +          vty_out (vty, "  %-*s  %s\n", width,                     token->text,                     token->desc);          else @@ -1139,10 +1139,10 @@ vty_describe_command (struct vty *vty)    if ((token = token_cr))      {        if (!token->desc) -        vty_outln (vty, "  %-s", +        vty_out (vty, "  %-s\n",                   token->text);        else if (desc_width >= strlen (token->desc)) -        vty_outln (vty, "  %-*s  %s", width, +        vty_out (vty, "  %-*s  %s\n", width,                   token->text,                   token->desc);        else @@ -1281,13 +1281,13 @@ vty_telnet_option (struct vty *vty, unsigned char *buf, int nbytes)            vty_out (vty, "SE ");            break;          case TELOPT_ECHO: -          vty_outln (vty, "TELOPT_ECHO "); +          vty_out (vty, "TELOPT_ECHO \n");            break;          case TELOPT_SGA: -          vty_outln (vty, "TELOPT_SGA "); +          vty_out (vty, "TELOPT_SGA \n");            break;          case TELOPT_NAWS: -          vty_outln (vty, "TELOPT_NAWS "); +          vty_out (vty, "TELOPT_NAWS \n");            break;          default:            vty_out (vty, "%x ", buf[i]); @@ -1749,7 +1749,7 @@ vty_create (int vty_sock, union sockunion *su)        /* Vty is not available if password isn't set. */        if (host.password == NULL && host.password_encrypt == NULL)          { -          vty_outln (vty, "Vty password is not set."); +          vty_out (vty, "Vty password is not set.\n");            vty->status = VTY_CLOSE;            vty_close (vty);            return NULL; @@ -1759,7 +1759,7 @@ vty_create (int vty_sock, union sockunion *su)    /* Say hello to the world. */    vty_hello (vty);    if (! no_password_check) -    vty_outln (vty, "%sUser Access Verification%s", VTYNL, +    vty_out (vty, "%sUser Access Verification%s\n", VTYNL,                 VTYNL);    /* Setting up terminal. */ @@ -2177,7 +2177,7 @@ vtysh_read (struct thread *thread)        /* Clear command line buffer. */        vty->cp = vty->length = 0;        vty_clear_buf (vty); -      vty_outln (vty, "%% Command is too long."); +      vty_out (vty, "%% Command is too long.\n");      }    else      { @@ -2320,7 +2320,7 @@ vty_timeout (struct thread *thread)    /* Clear buffer*/    buffer_reset (vty->obuf); -  vty_outln (vty, "%sVty connection is timed out.", VTYNL); +  vty_out (vty, "%sVty connection is timed out.\n", VTYNL);    /* Close connection. */    vty->status = VTY_CLOSE; @@ -2801,7 +2801,7 @@ DEFUN (no_vty_access_class,    const char *accesslist = (argc == 3) ? argv[idx_word]->arg : NULL;    if (! vty_accesslist_name || (argc == 3 && strcmp(vty_accesslist_name, accesslist)))      { -      vty_outln (vty,"Access-class is not currently applied to vty"); +      vty_out (vty,"Access-class is not currently applied to vty\n");        return CMD_WARNING;      } @@ -2844,7 +2844,7 @@ DEFUN (no_vty_ipv6_access_class,    if (! vty_ipv6_accesslist_name ||        (argc == 4 && strcmp(vty_ipv6_accesslist_name, accesslist)))      { -      vty_outln (vty,"IPv6 access-class is not currently applied to vty"); +      vty_out (vty,"IPv6 access-class is not currently applied to vty\n");        return CMD_WARNING;      } @@ -2968,30 +2968,30 @@ DEFUN (log_commands,  static int  vty_config_write (struct vty *vty)  { -  vty_outln (vty, "line vty"); +  vty_out (vty, "line vty\n");    if (vty_accesslist_name) -    vty_outln (vty, " access-class %s", +    vty_out (vty, " access-class %s\n",               vty_accesslist_name);    if (vty_ipv6_accesslist_name) -    vty_outln (vty, " ipv6 access-class %s", +    vty_out (vty, " ipv6 access-class %s\n",               vty_ipv6_accesslist_name);    /* exec-timeout */    if (vty_timeout_val != VTY_TIMEOUT_DEFAULT) -    vty_outln (vty, " exec-timeout %ld %ld", +    vty_out (vty, " exec-timeout %ld %ld\n",               vty_timeout_val / 60,               vty_timeout_val % 60);    /* login */    if (no_password_check) -    vty_outln (vty, " no login"); +    vty_out (vty, " no login\n");    if (do_log_commands) -    vty_outln (vty, "log commands"); +    vty_out (vty, "log commands\n"); -  vty_outln (vty, "!"); +  vty_out (vty, "!\n");    return CMD_SUCCESS;  } diff --git a/lib/workqueue.c b/lib/workqueue.c index 3749344196..3600df2f23 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -191,11 +191,11 @@ DEFUN (show_work_queues,    struct listnode *node;    struct work_queue *wq; -  vty_outln (vty,  -           "%c %8s %5s %8s %8s %21s", +  vty_out (vty,  +           "%c %8s %5s %8s %8s %21s\n",             ' ', "List","(ms) ","Q. Runs","Yields","Cycle Counts   "); -  vty_outln (vty, -           "%c %8s %5s %8s %8s %7s %6s %8s %6s %s", +  vty_out (vty, +           "%c %8s %5s %8s %8s %7s %6s %8s %6s %s\n",             'P',             "Items",             "Hold", @@ -205,7 +205,7 @@ DEFUN (show_work_queues,    for (ALL_LIST_ELEMENTS_RO (work_queues, node, wq))      { -      vty_outln (vty,"%c %8d %5d %8ld %8ld %7d %6d %8ld %6u %s", +      vty_out (vty,"%c %8d %5d %8ld %8ld %7d %6d %8ld %6u %s\n",                 (CHECK_FLAG (wq->flags, WQ_UNPLUGGED) ? ' ' : 'P'),                 listcount (wq->items),                 wq->spec.hold, diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index 5410027e70..b126f5d6f6 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -83,7 +83,7 @@ static int nhrp_vty_return(struct vty *vty, int ret)  		snprintf(buf, sizeof(buf), "Unknown error %d", ret);  	} -	vty_outln (vty, "%% %s", str); +	vty_out (vty, "%% %s\n", str);  	return CMD_WARNING;  } @@ -104,7 +104,7 @@ static int toggle_flag(  		return CMD_SUCCESS;  	} -	vty_outln (vty, "%% Invalid value %s", name); +	vty_out (vty, "%% Invalid value %s\n", name);  	return CMD_WARNING;  } @@ -118,7 +118,7 @@ DEFUN(show_debugging_nhrp, show_debugging_nhrp_cmd,  {  	int i; -	vty_outln (vty, "NHRP debugging status:"); +	vty_out (vty, "NHRP debugging status:\n");  	for (i = 0; debug_flags_desc[i].str != NULL; i++) {  		if (debug_flags_desc[i].key == NHRP_DEBUG_ALL) @@ -126,7 +126,7 @@ DEFUN(show_debugging_nhrp, show_debugging_nhrp_cmd,  		if (!(debug_flags_desc[i].key & debug_flags))  			continue; -		vty_outln (vty, "  NHRP %s debugging is on", +		vty_out (vty, "  NHRP %s debugging is on\n",  			debug_flags_desc[i].str);  	} @@ -158,7 +158,7 @@ static int nhrp_config_write(struct vty *vty)  {  #ifndef NO_DEBUG  	if (debug_flags == NHRP_DEBUG_ALL) { -		vty_outln (vty, "debug nhrp all"); +		vty_out (vty, "debug nhrp all\n");  	} else {  		int i; @@ -167,19 +167,19 @@ static int nhrp_config_write(struct vty *vty)  				continue;  			if (!(debug_flags & debug_flags_desc[i].key))  				continue; -			vty_outln (vty, "debug nhrp %s", +			vty_out (vty, "debug nhrp %s\n",  				  debug_flags_desc[i].str);  		}  	} -	vty_outln (vty, "!"); +	vty_out (vty, "!\n");  #endif /* NO_DEBUG */  	if (nhrp_event_socket_path) { -		vty_outln (vty, "nhrp event socket %s", +		vty_out (vty, "nhrp event socket %s\n",  			nhrp_event_socket_path);  	}  	if (netlink_nflog_group) { -		vty_outln (vty, "nhrp nflog-group %d", +		vty_out (vty, "nhrp nflog-group %d\n",  			netlink_nflog_group);  	} @@ -598,7 +598,7 @@ static void show_ip_nhrp_cache(struct nhrp_cache *c, void *pctx)  		return;  	if (!ctx->count) { -		vty_outln (vty, "%-8s %-8s %-24s %-24s %-6s %s", +		vty_out (vty, "%-8s %-8s %-24s %-24s %-6s %s\n",  			"Iface",  			"Type",  			"Protocol", @@ -608,7 +608,7 @@ static void show_ip_nhrp_cache(struct nhrp_cache *c, void *pctx)  	}  	ctx->count++; -	vty_outln(ctx->vty, "%-8s %-8s %-24s %-24s %c%c%c    %s", +	vty_out(ctx->vty, "%-8s %-8s %-24s %-24s %c%c%c    %s\n",  		c->ifp->name,  		nhrp_cache_type_str[c->cur.type],  		sockunion2str(&c->remote_addr, buf[0], sizeof buf[0]), @@ -626,7 +626,7 @@ static void show_ip_nhrp_nhs(struct nhrp_nhs *n, struct nhrp_registration *reg,  	char buf[2][SU_ADDRSTRLEN];  	if (!ctx->count) { -		vty_outln (vty, "%-8s %-24s %-16s %-16s", +		vty_out (vty, "%-8s %-24s %-16s %-16s\n",  			"Iface",  			"FQDN",  			"NBMA", @@ -634,7 +634,7 @@ static void show_ip_nhrp_nhs(struct nhrp_nhs *n, struct nhrp_registration *reg,  	}  	ctx->count++; -	vty_outln (vty, "%-8s %-24s %-16s %-16s", +	vty_out (vty, "%-8s %-24s %-16s %-16s\n",  		   n->ifp->name,  		   n->nbma_fqdn,  		   (reg && reg->peer) ? sockunion2str(®->peer->vc->remote.nbma, @@ -652,7 +652,7 @@ static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)  	char buf1[PREFIX_STRLEN], buf2[SU_ADDRSTRLEN];  	if (!ctx->count) { -		vty_outln (vty, "%-8s %-24s %-24s %s", +		vty_out (vty, "%-8s %-24s %-24s %s\n",  			"Type",  			"Prefix",  			"Via", @@ -661,7 +661,7 @@ static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)  	ctx->count++;  	c = s->cache; -	vty_outln(ctx->vty, "%-8s %-24s %-24s %s", +	vty_out(ctx->vty, "%-8s %-24s %-24s %s\n",  		nhrp_cache_type_str[s->type],  		prefix2str(s->p, buf1, sizeof buf1),  		c ? sockunion2str(&c->remote_addr, buf2, sizeof buf2) : "", @@ -690,15 +690,15 @@ static void show_ip_opennhrp_cache(struct nhrp_cache *c, void *pctx)  		  8 * family2addrsize(sockunion_family(&c->remote_addr)));  	if (c->cur.peer) { -		vty_outln(ctx->vty, -			  "NBMA-Address: %s", +		vty_out(ctx->vty, +			  "NBMA-Address: %s\n",  			  sockunion2str(&c->cur.peer->vc->remote.nbma,  			    		buf, sizeof buf));  	}  	if (sockunion_family(&c->cur.remote_nbma_natoa) != AF_UNSPEC) { -		vty_outln(ctx->vty, -			"NBMA-NAT-OA-Address: %s", +		vty_out(ctx->vty, +			"NBMA-NAT-OA-Address: %s\n",  			sockunion2str(&c->cur.remote_nbma_natoa, buf, sizeof buf));  	} @@ -731,14 +731,14 @@ DEFUN(show_ip_nhrp, show_ip_nhrp_cmd,  	} else if (argv[3]->text[0] == 's') {  		nhrp_shortcut_foreach(ctx.afi, show_ip_nhrp_shortcut, &ctx);  	} else { -		vty_outln (vty, "Status: ok%s", VTYNL); +		vty_out (vty, "Status: ok%s\n", VTYNL);  		ctx.count++;  		for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp))  			nhrp_cache_foreach(ifp, show_ip_opennhrp_cache, &ctx);  	}  	if (!ctx.count) { -		vty_outln (vty, "%% No entries"); +		vty_out (vty, "%% No entries\n");  		return CMD_WARNING;  	} @@ -750,7 +750,7 @@ static void show_dmvpn_entry(struct nhrp_vc *vc, void *ctx)  	struct vty *vty = ctx;  	char buf[2][SU_ADDRSTRLEN]; -	vty_outln (vty, "%-24s %-24s %c      %-4d %-24s", +	vty_out (vty, "%-24s %-24s %c      %-4d %-24s\n",  		sockunion2str(&vc->local.nbma, buf[0], sizeof buf[0]),  		sockunion2str(&vc->remote.nbma, buf[1], sizeof buf[1]),  		notifier_active(&vc->notifier_list) ? 'n' : ' ', @@ -763,7 +763,7 @@ DEFUN(show_dmvpn, show_dmvpn_cmd,  	SHOW_STR  	"DMVPN information\n")  { -	vty_outln (vty, "%-24s %-24s %-6s %-4s %-24s", +	vty_out (vty, "%-24s %-24s %-6s %-4s %-24s\n",  		"Src",  		"Dst",  		"Flags", @@ -815,11 +815,11 @@ DEFUN(clear_nhrp, clear_nhrp_cmd,  	}  	if (!ctx.count) { -		vty_outln (vty, "%% No entries"); +		vty_out (vty, "%% No entries\n");  		return CMD_WARNING;  	} -	vty_outln (vty, "%% %d entries cleared", ctx.count); +	vty_out (vty, "%% %d entries cleared\n", ctx.count);  	return CMD_SUCCESS;  } @@ -838,7 +838,7 @@ static void interface_config_write_nhrp_map(struct nhrp_cache *c, void *data)  	if (!c->map) return;  	if (sockunion_family(&c->remote_addr) != ctx->family) return; -	vty_outln (vty, " %s nhrp map %s %s", +	vty_out (vty, " %s nhrp map %s %s\n",  		ctx->aficmd,  		sockunion2str(&c->remote_addr, buf[0], sizeof buf[0]),  		c->cur.type == NHRP_CACHE_LOCAL ? "local" : sockunion2str(&c->cur.peer->vc->remote.nbma, buf[1], sizeof buf[1])); @@ -857,9 +857,9 @@ static int interface_config_write(struct vty *vty)  	int i;  	for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp)) { -		vty_outln (vty, "interface %s", ifp->name); +		vty_out (vty, "interface %s\n", ifp->name);  		if (ifp->desc) -			vty_outln (vty, " description %s", ifp->desc); +			vty_out (vty, " description %s\n", ifp->desc);  		nifp = ifp->info;  		if (nifp->ipsec_profile) { @@ -871,7 +871,7 @@ static int interface_config_write(struct vty *vty)  			vty_out (vty, VTYNL);  		}  		if (nifp->source) -			vty_outln (vty, " tunnel source %s", +			vty_out (vty, " tunnel source %s\n",  				nifp->source);  		for (afi = 0; afi < AFI_MAX; afi++) { @@ -880,24 +880,24 @@ static int interface_config_write(struct vty *vty)  			aficmd = afi_to_cmd(afi);  			if (ad->network_id) -				vty_outln (vty, " %s nhrp network-id %u", +				vty_out (vty, " %s nhrp network-id %u\n",  					aficmd,ad->network_id);  			if (ad->holdtime != NHRPD_DEFAULT_HOLDTIME) -				vty_outln (vty, " %s nhrp holdtime %u", +				vty_out (vty, " %s nhrp holdtime %u\n",  					aficmd,ad->holdtime);  			if (ad->configured_mtu < 0) -				vty_outln (vty, " %s nhrp mtu opennhrp", +				vty_out (vty, " %s nhrp mtu opennhrp\n",  					aficmd);  			else if (ad->configured_mtu) -				vty_outln (vty, " %s nhrp mtu %u", +				vty_out (vty, " %s nhrp mtu %u\n",  					aficmd,ad->configured_mtu);  			for (i = 0; interface_flags_desc[i].str != NULL; i++) {  				if (!(ad->flags & interface_flags_desc[i].key))  					continue; -				vty_outln (vty, " %s nhrp %s", +				vty_out (vty, " %s nhrp %s\n",  					aficmd, interface_flags_desc[i].str);  			} @@ -909,14 +909,14 @@ static int interface_config_write(struct vty *vty)  			nhrp_cache_foreach(ifp, interface_config_write_nhrp_map, &mapctx);  			list_for_each_entry(nhs, &ad->nhslist_head, nhslist_entry) { -				vty_outln (vty, " %s nhrp nhs %s nbma %s", +				vty_out (vty, " %s nhrp nhs %s nbma %s\n",  					aficmd,  					sockunion_family(&nhs->proto_addr) == AF_UNSPEC ? "dynamic" : sockunion2str(&nhs->proto_addr, buf, sizeof buf),  					nhs->nbma_fqdn);  			}  		} -		vty_outln (vty, "!"); +		vty_out (vty, "!\n");  	}  	return 0; diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 826a66ccc6..ee4d7559ee 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -396,18 +396,18 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa)        result = monotime_since(&oa->ts_spf, NULL);        if (result/TIMER_SECOND_MICRO > 0)  	{ -	  vty_outln (vty, "SPF last executed %ld.%lds ago", +	  vty_out (vty, "SPF last executed %ld.%lds ago\n",  		   result/TIMER_SECOND_MICRO,  		   result % TIMER_SECOND_MICRO);  	}        else  	{ -	  vty_outln (vty, "SPF last executed %ldus ago", +	  vty_out (vty, "SPF last executed %ldus ago\n",  		   result);  	}      }    else -    vty_outln (vty, "SPF has not been run"); +    vty_out (vty, "SPF has not been run\n");  } @@ -968,7 +968,7 @@ DEFUN (ospf6_area_stub,    if (!ospf6_area_stub_set (ospf6, area))      { -      vty_outln (vty,"First deconfigure all virtual link through this area"); +      vty_out (vty,"First deconfigure all virtual link through this area\n");        return CMD_WARNING;      } @@ -993,7 +993,7 @@ DEFUN (ospf6_area_stub_no_summary,    if (!ospf6_area_stub_set (ospf6, area))      { -      vty_outln (vty,"First deconfigure all virtual link through this area"); +      vty_out (vty,"First deconfigure all virtual link through this area\n");        return CMD_WARNING;      } diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c index 6ca56869d5..f460bf0653 100644 --- a/ospf6d/ospf6_bfd.c +++ b/ospf6d/ospf6_bfd.c @@ -295,11 +295,11 @@ ospf6_bfd_write_config(struct vty *vty, struct ospf6_interface *oi)    bfd_info = (struct bfd_info *)oi->bfd_info;    if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG)) -    vty_outln (vty, " ipv6 ospf6 bfd %d %d %d", +    vty_out (vty, " ipv6 ospf6 bfd %d %d %d\n",                bfd_info->detect_mult, bfd_info->required_min_rx,                bfd_info->desired_min_tx);    else -    vty_outln (vty, " ipv6 ospf6 bfd"); +    vty_out (vty, " ipv6 ospf6 bfd\n");  }  /* diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index e91c249845..16784ad64a 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1307,7 +1307,7 @@ DEFUN (auto_cost_reference_bandwidth,    refbw = strtol (argv[idx_number]->arg, NULL, 10);    if (refbw < 1 || refbw > 4294967)      { -      vty_outln (vty, "reference-bandwidth value is invalid"); +      vty_out (vty, "reference-bandwidth value is invalid\n");        return CMD_WARNING;      } diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 0b8a5e4767..35b90f2803 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -929,7 +929,7 @@ ospf6_spf_config_write (struct vty *vty)    if (ospf6->spf_delay != OSPF_SPF_DELAY_DEFAULT ||        ospf6->spf_holdtime != OSPF_SPF_HOLDTIME_DEFAULT ||        ospf6->spf_max_holdtime != OSPF_SPF_MAX_HOLDTIME_DEFAULT) -    vty_outln (vty, " timers throttle spf %d %d %d", +    vty_out (vty, " timers throttle spf %d %d %d\n",  	     ospf6->spf_delay, ospf6->spf_holdtime,  	     ospf6->spf_max_holdtime); diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 268b7a60a2..34af891f12 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -811,7 +811,7 @@ ospf6_show (struct vty *vty, struct ospf6 *o)    /* Redistribute configuration */    /* XXX */ -  vty_outln (vty, " LSA minimum arrival %d msecs",o->lsa_minarrival); +  vty_out (vty, " LSA minimum arrival %d msecs\n",o->lsa_minarrival);    /* Show SPF parameters */    vty_out(vty, " Initial SPF scheduling delay %d millisec(s)%s" @@ -854,9 +854,9 @@ ospf6_show (struct vty *vty, struct ospf6 *o)    if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES))      {        if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) -	vty_outln (vty, " All adjacency changes are logged"); +	vty_out (vty, " All adjacency changes are logged\n");        else -	vty_outln (vty, " Adjacency changes are logged"); +	vty_out (vty, " Adjacency changes are logged\n");      }    vty_out (vty, VTYNL); @@ -975,7 +975,7 @@ ospf6_distance_config_write (struct vty *vty)    struct ospf6_distance *odistance;    if (ospf6->distance_all) -    vty_outln (vty, " distance %u", ospf6->distance_all); +    vty_out (vty, " distance %u\n", ospf6->distance_all);    if (ospf6->distance_intra        || ospf6->distance_inter @@ -998,7 +998,7 @@ ospf6_distance_config_write (struct vty *vty)        {  	char buf[PREFIX_STRLEN]; -        vty_outln (vty, " distance %u %s %s", odistance->distance, +        vty_out (vty, " distance %u %s %s\n", odistance->distance,  		 prefix2str (&rn->p, buf, sizeof (buf)),                   odistance->access_list ? odistance->access_list : "");        } @@ -1027,13 +1027,13 @@ config_write_ospf6 (struct vty *vty)    if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES))      {        if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) -        vty_outln (vty, " log-adjacency-changes detail"); +        vty_out (vty, " log-adjacency-changes detail\n");        else if (!DFLT_OSPF6_LOG_ADJACENCY_CHANGES) -        vty_outln (vty, " log-adjacency-changes"); +        vty_out (vty, " log-adjacency-changes\n");      }    else if (DFLT_OSPF6_LOG_ADJACENCY_CHANGES)      { -      vty_outln (vty, " no log-adjacency-changes"); +      vty_out (vty, " no log-adjacency-changes\n");      }    if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH) @@ -1042,7 +1042,7 @@ config_write_ospf6 (struct vty *vty)    /* LSA timers print. */    if (ospf6->lsa_minarrival != OSPF_MIN_LS_ARRIVAL) -    vty_outln (vty, " timers lsa min-arrival %d",ospf6->lsa_minarrival); +    vty_out (vty, " timers lsa min-arrival %d\n",ospf6->lsa_minarrival);    ospf6_stub_router_config_write (vty);    ospf6_redistribute_config_write (vty); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index ea36ceabdf..ff00bc7a5a 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -683,7 +683,7 @@ ospf6_distance_set (struct vty *vty, struct ospf6 *o,    ret = str2prefix_ipv6 (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      } @@ -731,14 +731,14 @@ ospf6_distance_unset (struct vty *vty, struct ospf6 *o,    ret = str2prefix_ipv6 (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      }    rn = route_node_lookup (o->distance_table, (struct prefix *) &p);    if (!rn)      { -      vty_outln (vty, "Cant't find specified prefix"); +      vty_out (vty, "Cant't find specified prefix\n");        return CMD_WARNING;      } diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index d09290e520..c2e158931e 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -2192,7 +2192,7 @@ ospf_apiserver_show_info (struct vty *vty, struct ospf_lsa *lsa)    if (vty != NULL)      {        int i; -      vty_outln (vty, "  Added using OSPF API: %u octets of opaque data %s", +      vty_out (vty, "  Added using OSPF API: %u octets of opaque data %s\n",  	       opaquelen,  	       VALID_OPAQUE_INFO_LEN(lsa->data) ? "" : "(Invalid length?)");        vty_out (vty, "  Opaque data: "); diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index f8fa9bbb3b..1bcffea6fd 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -307,11 +307,11 @@ ospf_bfd_write_config(struct vty *vty, struct ospf_if_params *params)    bfd_info = (struct bfd_info *)params->bfd_info;    if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG)) -    vty_outln (vty, " ip ospf bfd %d %d %d", +    vty_out (vty, " ip ospf bfd %d %d %d\n",                bfd_info->detect_mult, bfd_info->required_min_rx,                bfd_info->desired_min_tx);    else -    vty_outln (vty, " ip ospf bfd"); +    vty_out (vty, " ip ospf bfd\n");  }  /* diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 3947d5182c..7d0c9d6baf 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -1568,90 +1568,90 @@ show_debugging_ospf_common (struct vty *vty, struct ospf *ospf)    int i;    if (ospf->instance) -    vty_outln (vty, "%sOSPF Instance: %d%s", VTYNL, ospf->instance, +    vty_out (vty, "%sOSPF Instance: %d%s\n", VTYNL, ospf->instance,               VTYNL); -  vty_outln (vty, "OSPF debugging status:"); +  vty_out (vty, "OSPF debugging status:\n");    /* Show debug status for events. */    if (IS_DEBUG_OSPF(event,EVENT)) -    vty_outln (vty, "  OSPF event debugging is on"); +    vty_out (vty, "  OSPF event debugging is on\n");    /* Show debug status for ISM. */    if (IS_DEBUG_OSPF (ism, ISM) == OSPF_DEBUG_ISM) -    vty_outln (vty, "  OSPF ISM debugging is on"); +    vty_out (vty, "  OSPF ISM debugging is on\n");    else      {        if (IS_DEBUG_OSPF (ism, ISM_STATUS)) -	vty_outln (vty, "  OSPF ISM status debugging is on"); +	vty_out (vty, "  OSPF ISM status debugging is on\n");        if (IS_DEBUG_OSPF (ism, ISM_EVENTS)) -	vty_outln (vty, "  OSPF ISM event debugging is on"); +	vty_out (vty, "  OSPF ISM event debugging is on\n");        if (IS_DEBUG_OSPF (ism, ISM_TIMERS)) -	vty_outln (vty, "  OSPF ISM timer debugging is on"); +	vty_out (vty, "  OSPF ISM timer debugging is on\n");      }    /* Show debug status for NSM. */    if (IS_DEBUG_OSPF (nsm, NSM) == OSPF_DEBUG_NSM) -    vty_outln (vty, "  OSPF NSM debugging is on"); +    vty_out (vty, "  OSPF NSM debugging is on\n");    else      {        if (IS_DEBUG_OSPF (nsm, NSM_STATUS)) -	vty_outln (vty, "  OSPF NSM status debugging is on"); +	vty_out (vty, "  OSPF NSM status debugging is on\n");        if (IS_DEBUG_OSPF (nsm, NSM_EVENTS)) -	vty_outln (vty, "  OSPF NSM event debugging is on"); +	vty_out (vty, "  OSPF NSM event debugging is on\n");        if (IS_DEBUG_OSPF (nsm, NSM_TIMERS)) -	vty_outln (vty, "  OSPF NSM timer debugging is on"); +	vty_out (vty, "  OSPF NSM timer debugging is on\n");      }    /* Show debug status for OSPF Packets. */    for (i = 0; i < 5; i++)      if (IS_DEBUG_OSPF_PACKET (i, SEND) && IS_DEBUG_OSPF_PACKET (i, RECV))        { -	vty_outln (vty, "  OSPF packet %s%s debugging is on", +	vty_out (vty, "  OSPF packet %s%s debugging is on\n",  		   lookup_msg(ospf_packet_type_str, i + 1, NULL),  		   IS_DEBUG_OSPF_PACKET (i, DETAIL) ? " detail" : "");        }      else        {  	if (IS_DEBUG_OSPF_PACKET (i, SEND)) -	  vty_outln (vty, "  OSPF packet %s send%s debugging is on", +	  vty_out (vty, "  OSPF packet %s send%s debugging is on\n",  		     lookup_msg(ospf_packet_type_str, i + 1, NULL),  		     IS_DEBUG_OSPF_PACKET (i, DETAIL) ? " detail" : "");  	if (IS_DEBUG_OSPF_PACKET (i, RECV)) -	  vty_outln (vty, "  OSPF packet %s receive%s debugging is on", +	  vty_out (vty, "  OSPF packet %s receive%s debugging is on\n",  		     lookup_msg(ospf_packet_type_str, i + 1, NULL),  		     IS_DEBUG_OSPF_PACKET (i, DETAIL) ? " detail" : "");        }    /* Show debug status for OSPF LSAs. */    if (IS_DEBUG_OSPF (lsa, LSA) == OSPF_DEBUG_LSA) -    vty_outln (vty, "  OSPF LSA debugging is on"); +    vty_out (vty, "  OSPF LSA debugging is on\n");    else      {        if (IS_DEBUG_OSPF (lsa, LSA_GENERATE)) -	vty_outln (vty, "  OSPF LSA generation debugging is on"); +	vty_out (vty, "  OSPF LSA generation debugging is on\n");        if (IS_DEBUG_OSPF (lsa, LSA_FLOODING)) -	vty_outln (vty, "  OSPF LSA flooding debugging is on"); +	vty_out (vty, "  OSPF LSA flooding debugging is on\n");        if (IS_DEBUG_OSPF (lsa, LSA_INSTALL)) -	vty_outln (vty, "  OSPF LSA install debugging is on"); +	vty_out (vty, "  OSPF LSA install debugging is on\n");        if (IS_DEBUG_OSPF (lsa, LSA_REFRESH)) -	vty_outln (vty, "  OSPF LSA refresh debugging is on"); +	vty_out (vty, "  OSPF LSA refresh debugging is on\n");      }    /* Show debug status for Zebra. */    if (IS_DEBUG_OSPF (zebra, ZEBRA) == OSPF_DEBUG_ZEBRA) -    vty_outln (vty, "  OSPF Zebra debugging is on"); +    vty_out (vty, "  OSPF Zebra debugging is on\n");    else      {        if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) -	vty_outln (vty, "  OSPF Zebra interface debugging is on"); +	vty_out (vty, "  OSPF Zebra interface debugging is on\n");        if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE)) -	vty_outln (vty, "  OSPF Zebra redistribute debugging is on"); +	vty_out (vty, "  OSPF Zebra redistribute debugging is on\n");      }    /* Show debug status for NSSA. */    if (IS_DEBUG_OSPF (nssa, NSSA) == OSPF_DEBUG_NSSA) -    vty_outln (vty, "  OSPF NSSA debugging is on"); +    vty_out (vty, "  OSPF NSSA debugging is on\n");    vty_out (vty, VTYNL); @@ -1722,56 +1722,56 @@ config_write_debug (struct vty *vty)    /* debug ospf ism (status|events|timers). */    if (IS_CONF_DEBUG_OSPF (ism, ISM) == OSPF_DEBUG_ISM) -    vty_outln (vty, "debug ospf%s ism", str); +    vty_out (vty, "debug ospf%s ism\n", str);    else      {        if (IS_CONF_DEBUG_OSPF (ism, ISM_STATUS)) -	vty_outln (vty, "debug ospf%s ism status", str); +	vty_out (vty, "debug ospf%s ism status\n", str);        if (IS_CONF_DEBUG_OSPF (ism, ISM_EVENTS)) -	vty_outln (vty, "debug ospf%s ism event", str); +	vty_out (vty, "debug ospf%s ism event\n", str);        if (IS_CONF_DEBUG_OSPF (ism, ISM_TIMERS)) -	vty_outln (vty, "debug ospf%s ism timer", str); +	vty_out (vty, "debug ospf%s ism timer\n", str);      }    /* debug ospf nsm (status|events|timers). */    if (IS_CONF_DEBUG_OSPF (nsm, NSM) == OSPF_DEBUG_NSM) -    vty_outln (vty, "debug ospf%s nsm", str); +    vty_out (vty, "debug ospf%s nsm\n", str);    else      {        if (IS_CONF_DEBUG_OSPF (nsm, NSM_STATUS)) -	vty_outln (vty, "debug ospf%s nsm status", str); +	vty_out (vty, "debug ospf%s nsm status\n", str);        if (IS_CONF_DEBUG_OSPF (nsm, NSM_EVENTS)) -	vty_outln (vty, "debug ospf%s nsm event", str); +	vty_out (vty, "debug ospf%s nsm event\n", str);        if (IS_CONF_DEBUG_OSPF (nsm, NSM_TIMERS)) -	vty_outln (vty, "debug ospf%s nsm timer", str); +	vty_out (vty, "debug ospf%s nsm timer\n", str);      }    /* debug ospf lsa (generate|flooding|install|refresh). */    if (IS_CONF_DEBUG_OSPF (lsa, LSA) == OSPF_DEBUG_LSA) -    vty_outln (vty, "debug ospf%s lsa", str); +    vty_out (vty, "debug ospf%s lsa\n", str);    else      {        if (IS_CONF_DEBUG_OSPF (lsa, LSA_GENERATE)) -	vty_outln (vty, "debug ospf%s lsa generate", str); +	vty_out (vty, "debug ospf%s lsa generate\n", str);        if (IS_CONF_DEBUG_OSPF (lsa, LSA_FLOODING)) -	vty_outln (vty, "debug ospf%s lsa flooding", str); +	vty_out (vty, "debug ospf%s lsa flooding\n", str);        if (IS_CONF_DEBUG_OSPF (lsa, LSA_INSTALL)) -	vty_outln (vty, "debug ospf%s lsa install", str); +	vty_out (vty, "debug ospf%s lsa install\n", str);        if (IS_CONF_DEBUG_OSPF (lsa, LSA_REFRESH)) -	vty_outln (vty, "debug ospf%s lsa refresh", str); +	vty_out (vty, "debug ospf%s lsa refresh\n", str);        write = 1;      }    /* debug ospf zebra (interface|redistribute). */    if (IS_CONF_DEBUG_OSPF (zebra, ZEBRA) == OSPF_DEBUG_ZEBRA) -    vty_outln (vty, "debug ospf%s zebra", str); +    vty_out (vty, "debug ospf%s zebra\n", str);    else      {        if (IS_CONF_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) -	vty_outln (vty, "debug ospf%s zebra interface", str); +	vty_out (vty, "debug ospf%s zebra interface\n", str);        if (IS_CONF_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE)) -	vty_outln (vty, "debug ospf%s zebra redistribute", str); +	vty_out (vty, "debug ospf%s zebra redistribute\n", str);        write = 1;      } @@ -1779,14 +1779,14 @@ config_write_debug (struct vty *vty)    /* debug ospf event. */    if (IS_CONF_DEBUG_OSPF (event, EVENT) == OSPF_DEBUG_EVENT)      { -      vty_outln (vty, "debug ospf%s event", str); +      vty_out (vty, "debug ospf%s event\n", str);        write = 1;      }    /* debug ospf nssa. */    if (IS_CONF_DEBUG_OSPF (nssa, NSSA) == OSPF_DEBUG_NSSA)      { -      vty_outln (vty, "debug ospf%s nssa", str); +      vty_out (vty, "debug ospf%s nssa\n", str);        write = 1;      } @@ -1796,7 +1796,7 @@ config_write_debug (struct vty *vty)      r &= conf_debug_ospf_packet[i] & (OSPF_DEBUG_SEND_RECV|OSPF_DEBUG_DETAIL);    if (r == (OSPF_DEBUG_SEND_RECV|OSPF_DEBUG_DETAIL))      { -      vty_outln (vty, "debug ospf%s packet all detail", str); +      vty_out (vty, "debug ospf%s packet all detail\n", str);        return 1;      } @@ -1806,10 +1806,10 @@ config_write_debug (struct vty *vty)      r &= conf_debug_ospf_packet[i] & OSPF_DEBUG_SEND_RECV;    if (r == OSPF_DEBUG_SEND_RECV)      { -      vty_outln (vty, "debug ospf%s packet all", str); +      vty_out (vty, "debug ospf%s packet all\n", str);        for (i = 0; i < 5; i++)  	if (conf_debug_ospf_packet[i] & OSPF_DEBUG_DETAIL) -	  vty_outln (vty, "debug ospf%s packet %s detail", str, +	  vty_out (vty, "debug ospf%s packet %s detail\n", str,  		   type_str[i]);        return 1;      } @@ -1821,7 +1821,7 @@ config_write_debug (struct vty *vty)        if (conf_debug_ospf_packet[i] == 0)  	continue; -      vty_outln (vty, "debug ospf%s packet %s%s", str, +      vty_out (vty, "debug ospf%s packet %s%s\n", str,  	       type_str[i],detail_str[conf_debug_ospf_packet[i]]);        write = 1;      } diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index 09d218f81b..f3db6afd15 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -1120,7 +1120,7 @@ ospf_opaque_config_write_router (struct vty *vty, struct ospf *ospf)    struct list *funclist;    if (CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE)) -    vty_outln (vty, " capability opaque"); +    vty_out (vty, " capability opaque\n");    funclist = ospf_opaque_wildcard_funclist;    opaque_lsa_config_write_router_callback (funclist, vty); @@ -1189,11 +1189,11 @@ show_opaque_info_detail (struct vty *vty, struct ospf_lsa *lsa)    /* Switch output functionality by vty address. */    if (vty != NULL)      { -      vty_outln (vty, "  Opaque-Type %u (%s)", opaque_type, +      vty_out (vty, "  Opaque-Type %u (%s)\n", opaque_type,  	       ospf_opaque_type_name(opaque_type)); -      vty_outln (vty, "  Opaque-ID   0x%x", opaque_id); +      vty_out (vty, "  Opaque-ID   0x%x\n", opaque_id); -      vty_outln (vty, "  Opaque-Info: %u octets of data%s", +      vty_out (vty, "  Opaque-Info: %u octets of data%s\n",                 ntohs (lsah->length) - OSPF_LSA_HEADER_SIZE,                 VALID_OPAQUE_INFO_LEN(lsah) ? "" : "(Invalid length?)");      } diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 1fb52a94b5..bb745d0c2e 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -906,7 +906,7 @@ show_vty_router_cap (struct vty *vty, struct ri_tlv_header *tlvh)    struct ri_tlv_router_cap *top = (struct ri_tlv_router_cap *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Router Capabilities: 0x%x",ntohl(top->value)); +    vty_out (vty, "  Router Capabilities: 0x%x\n",ntohl(top->value));      else        zlog_debug ("    Router Capabilities: 0x%x", ntohl (top->value)); @@ -921,7 +921,7 @@ show_vty_pce_subtlv_address (struct vty *vty, struct ri_tlv_header *tlvh)    if (ntohs (top->address.type) == PCE_ADDRESS_TYPE_IPV4)      {        if (vty != NULL) -        vty_outln (vty, "  PCE Address: %s",inet_ntoa(top->address.value)); +        vty_out (vty, "  PCE Address: %s\n",inet_ntoa(top->address.value));          else            zlog_debug ("    PCE Address: %s", inet_ntoa (top->address.value));      } @@ -929,7 +929,7 @@ show_vty_pce_subtlv_address (struct vty *vty, struct ri_tlv_header *tlvh)      {        /* TODO: Add support to IPv6 with inet_ntop() */        if (vty != NULL) -        vty_outln (vty, "  PCE Address: 0x%x", +        vty_out (vty, "  PCE Address: 0x%x\n",                   ntohl(top->address.value.s_addr));          else            zlog_debug ("    PCE Address: 0x%x", @@ -946,7 +946,7 @@ show_vty_pce_subtlv_path_scope (struct vty *vty, struct ri_tlv_header *tlvh)      (struct ri_pce_subtlv_path_scope *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  PCE Path Scope: 0x%x",ntohl(top->value)); +    vty_out (vty, "  PCE Path Scope: 0x%x\n",ntohl(top->value));      else        zlog_debug ("    PCE Path Scope: 0x%x", ntohl (top->value)); @@ -963,14 +963,14 @@ show_vty_pce_subtlv_domain (struct vty *vty, struct ri_tlv_header *tlvh)      {        tmp.s_addr = top->value;        if (vty != NULL) -        vty_outln (vty, "  PCE domain Area: %s",inet_ntoa(tmp)); +        vty_out (vty, "  PCE domain Area: %s\n",inet_ntoa(tmp));          else            zlog_debug ("    PCE domain Area: %s", inet_ntoa (tmp));      }    else      {        if (vty != NULL) -        vty_outln (vty, "  PCE domain AS: %d",ntohl(top->value)); +        vty_out (vty, "  PCE domain AS: %d\n",ntohl(top->value));          else            zlog_debug ("    PCE domain AS: %d", ntohl (top->value));      } @@ -988,14 +988,14 @@ show_vty_pce_subtlv_neighbor (struct vty *vty, struct ri_tlv_header *tlvh)      {        tmp.s_addr = top->value;        if (vty != NULL) -        vty_outln (vty, "  PCE neighbor Area: %s",inet_ntoa(tmp)); +        vty_out (vty, "  PCE neighbor Area: %s\n",inet_ntoa(tmp));          else            zlog_debug ("    PCE neighbor Area: %s", inet_ntoa (tmp));      }    else      {        if (vty != NULL) -        vty_outln (vty, "  PCE neighbor AS: %d",ntohl(top->value)); +        vty_out (vty, "  PCE neighbor AS: %d\n",ntohl(top->value));          else            zlog_debug ("    PCE neighbor AS: %d", ntohl (top->value));      } @@ -1008,7 +1008,7 @@ show_vty_pce_subtlv_cap_flag (struct vty *vty, struct ri_tlv_header *tlvh)    struct ri_pce_subtlv_cap_flag *top = (struct ri_pce_subtlv_cap_flag *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  PCE Capabilities Flag: 0x%x",ntohl(top->value)); +    vty_out (vty, "  PCE Capabilities Flag: 0x%x\n",ntohl(top->value));      else        zlog_debug ("    PCE Capabilities Flag: 0x%x", ntohl (top->value)); @@ -1019,7 +1019,7 @@ static u_int16_t  show_vty_unknown_tlv (struct vty *vty, struct ri_tlv_header *tlvh)  {    if (vty != NULL) -    vty_outln (vty, "  Unknown TLV: [type(0x%x), length(0x%x)]", +    vty_out (vty, "  Unknown TLV: [type(0x%x), length(0x%x)]\n",               ntohs (tlvh->type), ntohs(tlvh->length));      else        zlog_debug ("    Unknown TLV: [type(0x%x), length(0x%x)]", @@ -1105,16 +1105,16 @@ ospf_router_info_config_write_router (struct vty *vty)    if (OspfRI.status == enabled)      {        if (OspfRI.scope == OSPF_OPAQUE_AS_LSA) -        vty_outln (vty, " router-info as"); +        vty_out (vty, " router-info as\n");        else -        vty_outln (vty, " router-info area %s",inet_ntoa(OspfRI.area_id)); +        vty_out (vty, " router-info area %s\n",inet_ntoa(OspfRI.area_id));        if (pce->pce_address.header.type != 0) -        vty_outln (vty, "  pce address %s", +        vty_out (vty, "  pce address %s\n",                   inet_ntoa(pce->pce_address.address.value));        if (pce->pce_cap_flag.header.type != 0) -        vty_outln (vty, "  pce flag 0x%x",ntohl(pce->pce_cap_flag.value)); +        vty_out (vty, "  pce flag 0x%x\n",ntohl(pce->pce_cap_flag.value));        for (ALL_LIST_ELEMENTS_RO (pce->pce_domain, node, domain))          { @@ -1123,11 +1123,11 @@ ospf_router_info_config_write_router (struct vty *vty)                if (domain->type == PCE_DOMAIN_TYPE_AREA)                  {                    tmp.s_addr = domain->value; -                  vty_outln (vty, "  pce domain area %s",inet_ntoa(tmp)); +                  vty_out (vty, "  pce domain area %s\n",inet_ntoa(tmp));                  }                else                  { -                  vty_outln (vty, "  pce domain as %d",ntohl(domain->value)); +                  vty_out (vty, "  pce domain as %d\n",ntohl(domain->value));                  }              }          } @@ -1139,18 +1139,18 @@ ospf_router_info_config_write_router (struct vty *vty)                if (neighbor->type == PCE_DOMAIN_TYPE_AREA)                  {                    tmp.s_addr = neighbor->value; -                  vty_outln (vty, "  pce neighbor area %s",inet_ntoa(tmp)); +                  vty_out (vty, "  pce neighbor area %s\n",inet_ntoa(tmp));                  }                else                  { -                  vty_outln (vty, "  pce neighbor as %d", +                  vty_out (vty, "  pce neighbor as %d\n",                             ntohl(neighbor->value));                  }              }          }        if (pce->pce_scope.header.type != 0) -        vty_outln (vty, "  pce scope 0x%x", +        vty_out (vty, "  pce scope 0x%x\n",                   ntohl(OspfRI.pce_info.pce_scope.value));      }    return; @@ -1181,7 +1181,7 @@ DEFUN (router_info,      {        if (!inet_aton (area, &OspfRI.area_id))          { -          vty_outln (vty, "%% specified Area ID %s is invalid", +          vty_out (vty, "%% specified Area ID %s is invalid\n",                     area);            return CMD_WARNING;          } @@ -1257,7 +1257,7 @@ ospf_ri_enabled (struct vty *vty)      return 1;    if (vty) -    vty_outln (vty, "%% OSPF RI is not turned on"); +    vty_out (vty, "%% OSPF RI is not turned on\n");    return 0;  } @@ -1278,7 +1278,7 @@ DEFUN (pce_address,    if (!inet_aton (argv[idx_ipv4]->arg, &value))      { -      vty_outln (vty, "Please specify PCE Address by A.B.C.D"); +      vty_out (vty, "Please specify PCE Address by A.B.C.D\n");        return CMD_WARNING;      } @@ -1330,7 +1330,7 @@ DEFUN (pce_path_scope,    if (sscanf (argv[idx_bitpattern]->arg, "0x%x", &scope) != 1)      { -      vty_outln (vty, "pce_path_scope: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "pce_path_scope: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1384,7 +1384,7 @@ DEFUN (pce_domain,    if (sscanf (argv[idx_number]->arg, "%d", &as) != 1)      { -      vty_outln (vty, "pce_domain: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "pce_domain: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1421,7 +1421,7 @@ DEFUN (no_pce_domain,    if (sscanf (argv[idx_number]->arg, "%d", &as) != 1)      { -      vty_outln (vty, "no_pce_domain: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "no_pce_domain: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1455,7 +1455,7 @@ DEFUN (pce_neigbhor,    if (sscanf (argv[idx_number]->arg, "%d", &as) != 1)      { -      vty_outln (vty, "pce_neighbor: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "pce_neighbor: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1492,7 +1492,7 @@ DEFUN (no_pce_neighbor,    if (sscanf (argv[idx_number]->arg, "%d", &as) != 1)      { -      vty_outln (vty, "no_pce_neighbor: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "no_pce_neighbor: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1523,7 +1523,7 @@ DEFUN (pce_cap_flag,    if (sscanf (argv[idx_bitpattern]->arg, "0x%x", &cap) != 1)      { -      vty_outln (vty, "pce_cap_flag: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "pce_cap_flag: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1568,13 +1568,13 @@ DEFUN (show_ip_ospf_router_info,    if (OspfRI.status == enabled)      { -      vty_outln (vty, "--- Router Information parameters ---"); +      vty_out (vty, "--- Router Information parameters ---\n");        show_vty_router_cap (vty, &OspfRI.router_cap.header);      }    else      {        if (vty != NULL) -        vty_outln (vty, "  Router Information is disabled on this router"); +        vty_out (vty, "  Router Information is disabled on this router\n");      }    return CMD_SUCCESS;  } @@ -1596,7 +1596,7 @@ DEFUN (show_ip_opsf_router_info_pce,    if (OspfRI.status == enabled)      { -      vty_outln (vty, "--- PCE parameters ---"); +      vty_out (vty, "--- PCE parameters ---\n");        if (pce->pce_address.header.type != 0)          show_vty_pce_subtlv_address (vty, &pce->pce_address.header); @@ -1622,7 +1622,7 @@ DEFUN (show_ip_opsf_router_info_pce,      }    else      { -      vty_outln (vty,"  Router Information is disabled on this router"); +      vty_out (vty,"  Router Information is disabled on this router\n");      }    return CMD_SUCCESS; diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index aafc0a98eb..5739578f55 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1671,7 +1671,7 @@ show_vty_router_addr (struct vty *vty, struct te_tlv_header *tlvh)    struct te_tlv_router_addr *top = (struct te_tlv_router_addr *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Router-Address: %s",inet_ntoa(top->value)); +    vty_out (vty, "  Router-Address: %s\n",inet_ntoa(top->value));      else        zlog_debug ("    Router-Address: %s", inet_ntoa (top->value)); @@ -1684,7 +1684,7 @@ show_vty_link_header (struct vty *vty, struct te_tlv_header *tlvh)    struct te_tlv_link *top = (struct te_tlv_link *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Link: %u octets of data",ntohs(top->header.length)); +    vty_out (vty, "  Link: %u octets of data\n",ntohs(top->header.length));      else        zlog_debug ("    Link: %u octets of data", ntohs (top->header.length)); @@ -1711,7 +1711,7 @@ show_vty_link_subtlv_link_type (struct vty *vty, struct te_tlv_header *tlvh)      }    if (vty != NULL) -    vty_outln (vty, "  Link-Type: %s (%u)", cp,top->link_type.value); +    vty_out (vty, "  Link-Type: %s (%u)\n", cp,top->link_type.value);    else      zlog_debug ("    Link-Type: %s (%u)", cp, top->link_type.value); @@ -1725,7 +1725,7 @@ show_vty_link_subtlv_link_id (struct vty *vty, struct te_tlv_header *tlvh)    top = (struct te_link_subtlv_link_id *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Link-ID: %s", inet_ntoa(top->value)); +    vty_out (vty, "  Link-ID: %s\n", inet_ntoa(top->value));      else        zlog_debug ("    Link-ID: %s", inet_ntoa (top->value)); @@ -1743,14 +1743,14 @@ show_vty_link_subtlv_lclif_ipaddr (struct vty *vty,    n = ntohs (tlvh->length) / sizeof (top->value[0]);    if (vty != NULL) -    vty_outln (vty, "  Local Interface IP Address(es): %d", n); +    vty_out (vty, "  Local Interface IP Address(es): %d\n", n);    else      zlog_debug ("    Local Interface IP Address(es): %d", n);    for (i = 0; i < n; i++)      {        if (vty != NULL) -        vty_outln (vty, "    #%d: %s", i,inet_ntoa(top->value[i])); +        vty_out (vty, "    #%d: %s\n", i,inet_ntoa(top->value[i]));          else            zlog_debug ("      #%d: %s", i, inet_ntoa (top->value[i]));      } @@ -1767,14 +1767,14 @@ show_vty_link_subtlv_rmtif_ipaddr (struct vty *vty,    top = (struct te_link_subtlv_rmtif_ipaddr *) tlvh;    n = ntohs (tlvh->length) / sizeof (top->value[0]);    if (vty != NULL) -    vty_outln (vty, "  Remote Interface IP Address(es): %d", n); +    vty_out (vty, "  Remote Interface IP Address(es): %d\n", n);    else      zlog_debug ("    Remote Interface IP Address(es): %d", n);    for (i = 0; i < n; i++)      {        if (vty != NULL) -        vty_outln (vty, "    #%d: %s", i,inet_ntoa(top->value[i])); +        vty_out (vty, "    #%d: %s\n", i,inet_ntoa(top->value[i]));          else            zlog_debug ("      #%d: %s", i, inet_ntoa (top->value[i]));      } @@ -1788,7 +1788,7 @@ show_vty_link_subtlv_te_metric (struct vty *vty, struct te_tlv_header *tlvh)    top = (struct te_link_subtlv_te_metric *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Traffic Engineering Metric: %u", +    vty_out (vty, "  Traffic Engineering Metric: %u\n",               (u_int32_t)ntohl(top->value));        else          zlog_debug ("    Traffic Engineering Metric: %u", @@ -1807,7 +1807,7 @@ show_vty_link_subtlv_max_bw (struct vty *vty, struct te_tlv_header *tlvh)    fval = ntohf (top->value);    if (vty != NULL) -    vty_outln (vty, "  Maximum Bandwidth: %g (Bytes/sec)", fval); +    vty_out (vty, "  Maximum Bandwidth: %g (Bytes/sec)\n", fval);    else      zlog_debug ("    Maximum Bandwidth: %g (Bytes/sec)", fval); @@ -1824,7 +1824,7 @@ show_vty_link_subtlv_max_rsv_bw (struct vty *vty, struct te_tlv_header *tlvh)    fval = ntohf (top->value);    if (vty != NULL) -    vty_outln (vty, "  Maximum Reservable Bandwidth: %g (Bytes/sec)",fval); +    vty_out (vty, "  Maximum Reservable Bandwidth: %g (Bytes/sec)\n",fval);    else      zlog_debug ("    Maximum Reservable Bandwidth: %g (Bytes/sec)", fval); @@ -1840,7 +1840,7 @@ show_vty_link_subtlv_unrsv_bw (struct vty *vty, struct te_tlv_header *tlvh)    top = (struct te_link_subtlv_unrsv_bw *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Unreserved Bandwidth per Class Type in Byte/s:"); +    vty_out (vty, "  Unreserved Bandwidth per Class Type in Byte/s:\n");    else      zlog_debug ("    Unreserved Bandwidth per Class Type in Byte/s:");    for (i = 0; i < MAX_CLASS_TYPE; i+=2) @@ -1849,7 +1849,7 @@ show_vty_link_subtlv_unrsv_bw (struct vty *vty, struct te_tlv_header *tlvh)        fval2 = ntohf (top->value[i+1]);        if (vty != NULL) -        vty_outln (vty, "    [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)", +        vty_out (vty, "    [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)\n",                  i, fval1, i+1, fval2);        else          zlog_debug ("      [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)", @@ -1866,7 +1866,7 @@ show_vty_link_subtlv_rsc_clsclr (struct vty *vty, struct te_tlv_header *tlvh)    top = (struct te_link_subtlv_rsc_clsclr *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Resource class/color: 0x%x", +    vty_out (vty, "  Resource class/color: 0x%x\n",               (u_int32_t)ntohl(top->value));        else          zlog_debug ("    Resource Class/Color: 0x%x", @@ -1884,8 +1884,8 @@ show_vty_link_subtlv_lrrid (struct vty *vty, struct te_tlv_header *tlvh)    if (vty != NULL)      { -      vty_outln (vty, "  Local  TE Router ID: %s",inet_ntoa(top->local)); -      vty_outln (vty, "  Remote TE Router ID: %s",inet_ntoa(top->remote)); +      vty_out (vty, "  Local  TE Router ID: %s\n",inet_ntoa(top->local)); +      vty_out (vty, "  Remote TE Router ID: %s\n",inet_ntoa(top->remote));      }    else      { @@ -1905,8 +1905,8 @@ show_vty_link_subtlv_llri (struct vty *vty, struct te_tlv_header *tlvh)    if (vty != NULL)      { -      vty_outln (vty, "  Link Local  ID: %d",(u_int32_t)ntohl(top->local)); -      vty_outln (vty, "  Link Remote ID: %d",(u_int32_t)ntohl(top->remote)); +      vty_out (vty, "  Link Local  ID: %d\n",(u_int32_t)ntohl(top->local)); +      vty_out (vty, "  Link Remote ID: %d\n",(u_int32_t)ntohl(top->remote));      }    else      { @@ -1925,7 +1925,7 @@ show_vty_link_subtlv_rip (struct vty *vty, struct te_tlv_header *tlvh)    top = (struct te_link_subtlv_rip *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Inter-AS TE Remote ASBR IP address: %s", +    vty_out (vty, "  Inter-AS TE Remote ASBR IP address: %s\n",               inet_ntoa(top->value));      else        zlog_debug ("    Inter-AS TE Remote ASBR IP address: %s", @@ -1942,7 +1942,7 @@ show_vty_link_subtlv_ras (struct vty *vty, struct te_tlv_header *tlvh)    top = (struct te_link_subtlv_ras *) tlvh;    if (vty != NULL) -    vty_outln (vty, "  Inter-AS TE Remote AS number: %u",ntohl(top->value)); +    vty_out (vty, "  Inter-AS TE Remote AS number: %u\n",ntohl(top->value));      else        zlog_debug ("    Inter-AS TE Remote AS number: %u", ntohl (top->value)); @@ -1961,7 +1961,7 @@ show_vty_link_subtlv_av_delay (struct vty *vty, struct te_tlv_header *tlvh)    anomalous = (u_int32_t) ntohl (top->value) & TE_EXT_ANORMAL;    if (vty != NULL) -    vty_outln (vty, "  %s Average Link Delay: %d (micro-sec)", +    vty_out (vty, "  %s Average Link Delay: %d (micro-sec)\n",               anomalous ? "Anomalous" : "Normal", delay);    else      zlog_debug ("    %s Average Link Delay: %d (micro-sec)", @@ -1983,7 +1983,7 @@ show_vty_link_subtlv_mm_delay (struct vty *vty, struct te_tlv_header *tlvh)    high = (u_int32_t) ntohl (top->high);    if (vty != NULL) -    vty_outln (vty, "  %s Min/Max Link Delay: %d/%d (micro-sec)", +    vty_out (vty, "  %s Min/Max Link Delay: %d/%d (micro-sec)\n",               anomalous ? "Anomalous" : "Normal", low, high);    else      zlog_debug ("    %s Min/Max Link Delay: %d/%d (micro-sec)", @@ -2002,7 +2002,7 @@ show_vty_link_subtlv_delay_var (struct vty *vty, struct te_tlv_header *tlvh)    jitter = (u_int32_t) ntohl (top->value) & TE_EXT_MASK;    if (vty != NULL) -    vty_outln (vty, "  Delay Variation: %d (micro-sec)", jitter); +    vty_out (vty, "  Delay Variation: %d (micro-sec)\n", jitter);    else      zlog_debug ("    Delay Variation: %d (micro-sec)", jitter); @@ -2023,7 +2023,7 @@ show_vty_link_subtlv_pkt_loss (struct vty *vty, struct te_tlv_header *tlvh)    anomalous = (u_int32_t) ntohl (top->value) & TE_EXT_ANORMAL;    if (vty != NULL) -    vty_outln (vty, "  %s Link Loss: %g (%%)", anomalous ? "Anomalous" : "Normal", +    vty_out (vty, "  %s Link Loss: %g (%%)\n", anomalous ? "Anomalous" : "Normal",               fval);    else      zlog_debug ("    %s Link Loss: %g (%%)", anomalous ? "Anomalous" : "Normal", @@ -2042,7 +2042,7 @@ show_vty_link_subtlv_res_bw (struct vty *vty, struct te_tlv_header *tlvh)    fval = ntohf (top->value);    if (vty != NULL) -    vty_outln (vty, "  Unidirectional Residual Bandwidth: %g (Bytes/sec)", +    vty_out (vty, "  Unidirectional Residual Bandwidth: %g (Bytes/sec)\n",               fval);    else      zlog_debug ("    Unidirectional Residual Bandwidth: %g (Bytes/sec)", @@ -2061,7 +2061,7 @@ show_vty_link_subtlv_ava_bw (struct vty *vty, struct te_tlv_header *tlvh)    fval = ntohf (top->value);    if (vty != NULL) -    vty_outln (vty, "  Unidirectional Available Bandwidth: %g (Bytes/sec)", +    vty_out (vty, "  Unidirectional Available Bandwidth: %g (Bytes/sec)\n",               fval);    else      zlog_debug ("    Unidirectional Available Bandwidth: %g (Bytes/sec)", @@ -2080,7 +2080,7 @@ show_vty_link_subtlv_use_bw (struct vty *vty, struct te_tlv_header *tlvh)    fval = ntohf (top->value);    if (vty != NULL) -    vty_outln (vty, "  Unidirectional Utilized Bandwidth: %g (Bytes/sec)", +    vty_out (vty, "  Unidirectional Utilized Bandwidth: %g (Bytes/sec)\n",               fval);    else      zlog_debug ("    Unidirectional Utilized Bandwidth: %g (Bytes/sec)", @@ -2093,7 +2093,7 @@ static u_int16_t  show_vty_unknown_tlv (struct vty *vty, struct te_tlv_header *tlvh)  {    if (vty != NULL) -    vty_outln (vty, "  Unknown TLV: [type(0x%x), length(0x%x)]", +    vty_out (vty, "  Unknown TLV: [type(0x%x), length(0x%x)]\n",               ntohs (tlvh->type), ntohs(tlvh->length));      else        zlog_debug ("    Unknown TLV: [type(0x%x), length(0x%x)]", @@ -2230,15 +2230,15 @@ ospf_mpls_te_config_write_router (struct vty *vty)    if (OspfMplsTE.status == enabled)      { -      vty_outln (vty, " mpls-te on"); -      vty_outln (vty, " mpls-te router-address %s", +      vty_out (vty, " mpls-te on\n"); +      vty_out (vty, " mpls-te router-address %s\n",                 inet_ntoa(OspfMplsTE.router_addr.value));      }    if (OspfMplsTE.inter_as == AS) -    vty_outln (vty, "  mpls-te inter-as as"); +    vty_out (vty, "  mpls-te inter-as as\n");    if (OspfMplsTE.inter_as == Area) -    vty_outln (vty, "  mpls-te inter-as area %s ", +    vty_out (vty, "  mpls-te inter-as area %s \n",               inet_ntoa(OspfMplsTE.interas_areaid));    return; @@ -2325,7 +2325,7 @@ DEFUN (ospf_mpls_te_router_addr,    if (! inet_aton (argv[idx_ipv4]->arg, &value))      { -      vty_outln (vty, "Please specify Router-Addr by A.B.C.D"); +      vty_out (vty, "Please specify Router-Addr by A.B.C.D\n");        return CMD_WARNING;      } @@ -2393,7 +2393,7 @@ set_inter_as_mode (struct vty *vty, const char *mode_name,          }        else          { -          vty_outln (vty,"Unknown mode. Please choose between as or area"); +          vty_out (vty,"Unknown mode. Please choose between as or area\n");            return CMD_WARNING;          } @@ -2404,8 +2404,8 @@ set_inter_as_mode (struct vty *vty, const char *mode_name,        /* Register new callbacks regarding the flooding scope (AS or Area) */        if (ospf_mpls_te_register (mode) < 0)          { -          vty_outln (vty, -                     "Internal error: Unable to register Inter-AS functions"); +          vty_out (vty, +                     "Internal error: Unable to register Inter-AS functions\n");            return CMD_WARNING;          } @@ -2428,14 +2428,14 @@ set_inter_as_mode (struct vty *vty, const char *mode_name,          }        else          { -          vty_outln (vty, "Please change Inter-AS support to disable first before going to mode %s", +          vty_out (vty, "Please change Inter-AS support to disable first before going to mode %s\n",                     mode2text[mode]);            return CMD_WARNING;          }      }    else      { -      vty_outln (vty, "mpls-te has not been turned on"); +      vty_out (vty, "mpls-te has not been turned on\n");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -2505,12 +2505,12 @@ DEFUN (show_ip_ospf_mpls_te_router,  {    if (OspfMplsTE.status == enabled)      { -      vty_outln (vty, "--- MPLS-TE router parameters ---"); +      vty_out (vty, "--- MPLS-TE router parameters ---\n");        if (ntohs (OspfMplsTE.router_addr.header.type) != 0)          show_vty_router_addr (vty, &OspfMplsTE.router_addr.header);        else if (vty != NULL) -        vty_outln (vty, "  N/A"); +        vty_out (vty, "  N/A\n");      }    return CMD_SUCCESS;  } @@ -2531,21 +2531,21 @@ show_mpls_te_link_sub (struct vty *vty, struct interface *ifp)          {            if (IS_INTER_AS (lp->type))              { -              vty_outln (vty, "-- Inter-AS TEv2 link parameters for %s --", +              vty_out (vty, "-- Inter-AS TEv2 link parameters for %s --\n",                         ifp->name);              }            else              {                /* MPLS-TE is not activate on this interface */                /* or this interface is passive and Inter-AS TEv2 is not activate */ -              vty_outln (vty, "  %s: MPLS-TE is disabled on this interface", +              vty_out (vty, "  %s: MPLS-TE is disabled on this interface\n",                         ifp->name);                return;              }          }        else          { -      vty_outln (vty, "-- MPLS-TE link parameters for %s --", +      vty_out (vty, "-- MPLS-TE link parameters for %s --\n",                 ifp->name);          } @@ -2585,11 +2585,11 @@ show_mpls_te_link_sub (struct vty *vty, struct interface *ifp)          show_vty_link_subtlv_ava_bw (vty, &lp->ava_bw.header);        if (TLV_TYPE(lp->use_bw) != 0)          show_vty_link_subtlv_use_bw (vty, &lp->use_bw.header); -      vty_outln (vty, "---------------%s", VTYNL); +      vty_out (vty, "---------------%s\n", VTYNL);      }    else      { -      vty_outln (vty, "  %s: MPLS-TE is disabled on this interface", +      vty_out (vty, "  %s: MPLS-TE is disabled on this interface\n",                 ifp->name);      } @@ -2620,7 +2620,7 @@ DEFUN (show_ip_ospf_mpls_te_link,    else      {        if ((ifp = if_lookup_by_name (argv[idx_interface]->arg, VRF_DEFAULT)) == NULL) -        vty_outln (vty, "No such interface name"); +        vty_out (vty, "No such interface name\n");        else          show_mpls_te_link_sub (vty, ifp);      } diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index bc98da45ee..b2f9b21f40 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3267,9 +3267,9 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface      }    else      { -      vty_outln (vty, "%s is %s", ifp->name, +      vty_out (vty, "%s is %s\n", ifp->name,                   ((is_up = if_is_operative(ifp)) ? "up" : "down")); -      vty_outln (vty, "  ifindex %u, MTU %u bytes, BW %u Mbit %s", +      vty_out (vty, "  ifindex %u, MTU %u bytes, BW %u Mbit %s\n",                   ifp->ifindex, ifp->mtu, bandwidth, if_flag_dump(ifp->flags));      } @@ -3375,16 +3375,16 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface          }        else          { -          vty_outln (vty, " Area %s", ospf_area_desc_string (oi->area)); +          vty_out (vty, " Area %s\n", ospf_area_desc_string (oi->area)); -          vty_outln (vty, "  MTU mismatch detection: %s", +          vty_out (vty, "  MTU mismatch detection: %s\n",                       OSPF_IF_PARAM(oi, mtu_ignore) ? "disabled" : "enabled"); -          vty_outln (vty, "  Router ID %s, Network Type %s, Cost: %d", +          vty_out (vty, "  Router ID %s, Network Type %s, Cost: %d\n",                       inet_ntoa (ospf->router_id), ospf_network_type_str[oi->type],                       oi->output_cost); -          vty_outln (vty, "  Transmit Delay is %d sec, State %s, Priority %d", +          vty_out (vty, "  Transmit Delay is %d sec, State %s, Priority %d\n",                       OSPF_IF_PARAM (oi,transmit_delay), lookup_msg(ospf_ism_state_msg, oi->state, NULL),                       PRIORITY (oi));          } @@ -3393,7 +3393,7 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface        if (DR (oi).s_addr == 0)          {            if (!use_json) -            vty_outln (vty, "  No backup designated router on this network"); +            vty_out (vty, "  No backup designated router on this network\n");          }        else          { @@ -3401,7 +3401,7 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface            if (nbr == NULL)              {                if (!use_json) -                vty_outln (vty, "  No backup designated router on this network"); +                vty_out (vty, "  No backup designated router on this network\n");              }            else              { @@ -3414,7 +3414,7 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface                  {                    vty_out (vty, "  Backup Designated Router (ID) %s,",                             inet_ntoa (nbr->router_id)); -                  vty_outln (vty, " Interface Address %s", +                  vty_out (vty, " Interface Address %s\n",                               inet_ntoa (nbr->address.u.prefix4));                  }              } @@ -4769,10 +4769,10 @@ show_ip_ospf_database_header (struct vty *vty, struct ospf_lsa *lsa)  {    struct router_lsa *rlsa = (struct router_lsa*) lsa->data; -  vty_outln (vty, "  LS age: %d", LS_AGE (lsa)); -  vty_outln (vty, "  Options: 0x%-2x : %s", lsa->data->options, +  vty_out (vty, "  LS age: %d\n", LS_AGE (lsa)); +  vty_out (vty, "  Options: 0x%-2x : %s\n", lsa->data->options,             ospf_options_dump(lsa->data->options)); -  vty_outln (vty, "  LS Flags: 0x%-2x %s", +  vty_out (vty, "  LS Flags: 0x%-2x %s\n",               lsa->flags,               ((lsa->flags & OSPF_LSA_LOCAL_XLT) ?                "(Translated from Type-7)" : "")); @@ -4790,14 +4790,14 @@ show_ip_ospf_database_header (struct vty *vty, struct ospf_lsa *lsa)        vty_out (vty, VTYNL);      } -  vty_outln (vty, "  LS Type: %s", +  vty_out (vty, "  LS Type: %s\n",               lookup_msg(ospf_lsa_type_msg, lsa->data->type, NULL)); -  vty_outln (vty, "  Link State ID: %s %s", inet_ntoa (lsa->data->id), +  vty_out (vty, "  Link State ID: %s %s\n", inet_ntoa (lsa->data->id),               lookup_msg(ospf_link_state_id_type_msg, lsa->data->type, NULL)); -  vty_outln (vty, "  Advertising Router: %s", inet_ntoa (lsa->data->adv_router)); -  vty_outln (vty, "  LS Seq Number: %08lx", (u_long)ntohl (lsa->data->ls_seqnum)); -  vty_outln (vty, "  Checksum: 0x%04x", ntohs (lsa->data->checksum)); -  vty_outln (vty, "  Length: %d%s", ntohs (lsa->data->length), VTYNL); +  vty_out (vty, "  Advertising Router: %s\n", inet_ntoa (lsa->data->adv_router)); +  vty_out (vty, "  LS Seq Number: %08lx\n", (u_long)ntohl (lsa->data->ls_seqnum)); +  vty_out (vty, "  Checksum: 0x%04x\n", ntohs (lsa->data->checksum)); +  vty_out (vty, "  Length: %d%s\n", ntohs (lsa->data->length), VTYNL);  }  const char *link_type_desc[] = @@ -7071,7 +7071,7 @@ DEFUN (no_ip_ospf_area,    if (!OSPF_IF_PARAM_CONFIGURED(params, if_area))      { -      vty_outln (vty, "Can't find specified interface area configuration."); +      vty_out (vty, "Can't find specified interface area configuration.\n");        return CMD_WARNING;      }   diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 715f240617..fa628f81ee 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -1445,7 +1445,7 @@ ospf_distance_set (struct vty *vty, struct ospf *ospf,    ret = str2prefix_ipv4 (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      } @@ -1493,14 +1493,14 @@ ospf_distance_unset (struct vty *vty, struct ospf *ospf,    ret = str2prefix_ipv4 (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      }    rn = route_node_lookup (ospf->distance_table, (struct prefix *) &p);    if (!rn)      { -      vty_outln (vty, "Can't find specified prefix"); +      vty_out (vty, "Can't find specified prefix\n");        return CMD_WARNING;      } diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c index 2a90eea3b6..af8a8e2c52 100644 --- a/pimd/pim_bfd.c +++ b/pimd/pim_bfd.c @@ -52,11 +52,11 @@ pim_bfd_write_config (struct vty *vty, struct interface *ifp)      return;    if (CHECK_FLAG (bfd_info->flags, BFD_FLAG_PARAM_CFG)) -    vty_outln (vty, " ip pim bfd %d %d %d", +    vty_out (vty, " ip pim bfd %d %d %d\n",               bfd_info->detect_mult, bfd_info->required_min_rx,               bfd_info->desired_min_tx);    else -    vty_outln (vty, " ip pim bfd"); +    vty_out (vty, " ip pim bfd\n");  }  /* diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index b0afc7828a..811617b9da 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -173,8 +173,8 @@ static void pim_show_assert(struct vty *vty)    now = pim_time_monotonic_sec(); -  vty_outln (vty, -	  "Interface Address         Source          Group           State  Winner          Uptime   Timer"); +  vty_out (vty, +	  "Interface Address         Source          Group           State  Winner          Uptime   Timer\n");    for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, ch_node, ch)) {      char ch_src_str[INET_ADDRSTRLEN]; @@ -201,7 +201,7 @@ static void pim_show_assert(struct vty *vty)      pim_time_timer_to_mmss(timer, sizeof(timer),  			   ch->t_ifassert_timer); -    vty_outln (vty, "%-9s %-15s %-15s %-15s %-6s %-15s %-8s %-5s", +    vty_out (vty, "%-9s %-15s %-15s %-15s %-6s %-15s %-8s %-5s\n",  	    ch->interface->name,  	    inet_ntoa(ifaddr),  	    ch_src_str, @@ -227,8 +227,8 @@ static void pim_show_assert_internal(struct vty *vty)  	  "eATD: Evaluate AssertTrackingDesired%s",  	  VTYNL, VTYNL, VTYNL, VTYNL); -  vty_outln (vty, -	  "Interface Address         Source          Group           CA  eCA ATD eATD"); +  vty_out (vty, +	  "Interface Address         Source          Group           CA  eCA ATD eATD\n");    for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, ch_node, ch)) {      pim_ifp = ch->interface->info; @@ -245,7 +245,7 @@ static void pim_show_assert_internal(struct vty *vty)  		   ch_src_str, sizeof(ch_src_str));      pim_inet4_dump("<ch_grp?>", ch->sg.grp,  		   ch_grp_str, sizeof(ch_grp_str)); -    vty_outln (vty, "%-9s %-15s %-15s %-15s %-3s %-3s %-3s %-4s", +    vty_out (vty, "%-9s %-15s %-15s %-15s %-3s %-3s %-3s %-4s\n",  	    ch->interface->name,  	    inet_ntoa(ifaddr),  	    ch_src_str, @@ -264,8 +264,8 @@ static void pim_show_assert_metric(struct vty *vty)    struct pim_ifchannel *ch;    struct in_addr ifaddr; -  vty_outln (vty, -	  "Interface Address         Source          Group           RPT Pref Metric Address        "); +  vty_out (vty, +	  "Interface Address         Source          Group           RPT Pref Metric Address        \n");    for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, ch_node, ch)) {      pim_ifp = ch->interface->info; @@ -289,7 +289,7 @@ static void pim_show_assert_metric(struct vty *vty)      pim_inet4_dump("<addr?>", am.ip_address,  		   addr_str, sizeof(addr_str)); -    vty_outln (vty, "%-9s %-15s %-15s %-15s %-3s %4u %6u %-15s", +    vty_out (vty, "%-9s %-15s %-15s %-15s %-3s %4u %6u %-15s\n",  	    ch->interface->name,  	    inet_ntoa(ifaddr),  	    ch_src_str, @@ -308,8 +308,8 @@ static void pim_show_assert_winner_metric(struct vty *vty)    struct pim_ifchannel *ch;    struct in_addr ifaddr; -  vty_outln (vty, -	  "Interface Address         Source          Group           RPT Pref Metric Address        "); +  vty_out (vty, +	  "Interface Address         Source          Group           RPT Pref Metric Address        \n");    for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, ch_node, ch)) {      pim_ifp = ch->interface->info; @@ -345,7 +345,7 @@ static void pim_show_assert_winner_metric(struct vty *vty)      else        snprintf(metr_str, sizeof(metr_str), "%6u", am->route_metric); -    vty_outln (vty, "%-9s %-15s %-15s %-15s %-3s %-4s %-6s %-15s", +    vty_out (vty, "%-9s %-15s %-15s %-15s %-3s %-4s %-6s %-15s\n",  	    ch->interface->name,  	    inet_ntoa(ifaddr),  	    ch_src_str, @@ -431,11 +431,11 @@ static void pim_show_membership(struct vty *vty, u_char uj)    } /* scan interface channels */    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));    } else { -    vty_outln (vty, -            "Interface  Address          Source           Group            Membership"); +    vty_out (vty, +            "Interface  Address          Source           Group            Membership\n");      /*       * Example of the json data we are traversing @@ -480,7 +480,7 @@ static void pim_show_membership(struct vty *vty, u_char uj)            vty_out(vty, "%-15s  ", if_field_key);            json_object_object_get_ex(if_field_val, "localMembership", &json_tmp); -          vty_outln (vty, "%-10s", json_object_get_string(json_tmp)); +          vty_out (vty, "%-10s\n", json_object_get_string(json_tmp));          }        }      } @@ -491,19 +491,19 @@ static void pim_show_membership(struct vty *vty, u_char uj)  static void pim_print_ifp_flags(struct vty *vty, struct interface *ifp, int mloop)  { -  vty_outln (vty, "Flags"); -  vty_outln (vty, "-----"); -  vty_outln (vty, "All Multicast   : %s", +  vty_out (vty, "Flags\n"); +  vty_out (vty, "-----\n"); +  vty_out (vty, "All Multicast   : %s\n",              (ifp->flags & IFF_ALLMULTI) ? "yes" : "no"); -  vty_outln (vty, "Broadcast       : %s", +  vty_out (vty, "Broadcast       : %s\n",              if_is_broadcast(ifp) ? "yes" : "no"); -  vty_outln (vty, "Deleted         : %s", +  vty_out (vty, "Deleted         : %s\n",              PIM_IF_IS_DELETED(ifp) ? "yes" : "no"); -  vty_outln (vty, "Interface Index : %d", ifp->ifindex); -  vty_outln (vty, "Multicast       : %s", +  vty_out (vty, "Interface Index : %d\n", ifp->ifindex); +  vty_out (vty, "Multicast       : %s\n",              if_is_multicast(ifp) ? "yes" : "no"); -  vty_outln (vty, "Multicast Loop  : %d", mloop); -  vty_outln (vty, "Promiscuous     : %s", +  vty_out (vty, "Multicast Loop  : %d\n", mloop); +  vty_out (vty, "Promiscuous     : %s\n",              (ifp->flags & IFF_PROMISC) ? "yes" : "no");    vty_out (vty, VTYNL);    vty_out (vty, VTYNL); @@ -522,8 +522,8 @@ static void igmp_show_interfaces(struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -            "Interface  State          Address  V  Querier  Query Timer    Uptime"); +    vty_out (vty, +            "Interface  State          Address  V  Querier  Query Timer    Uptime\n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) {      struct pim_interface *pim_ifp; @@ -556,7 +556,7 @@ static void igmp_show_interfaces(struct vty *vty, u_char uj)          json_object_object_add(json, ifp->name, json_row);        } else { -        vty_outln (vty, "%-9s  %5s  %15s  %d  %7s  %11s  %8s", +        vty_out (vty, "%-9s  %5s  %15s  %d  %7s  %11s  %8s\n",                  ifp->name,                  if_is_up(ifp) ? "up" : "down",                  inet_ntoa(igmp->ifaddr), @@ -569,7 +569,7 @@ static void igmp_show_interfaces(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -659,42 +659,42 @@ static void igmp_show_interfaces_single(struct vty *vty, const char *ifname, u_c          json_object_object_add(json, ifp->name, json_row);        } else { -        vty_outln (vty, "Interface : %s", ifp->name); -        vty_outln (vty, "State     : %s", if_is_up(ifp) ? "up" : "down"); -        vty_outln (vty, "Address   : %s", +        vty_out (vty, "Interface : %s\n", ifp->name); +        vty_out (vty, "State     : %s\n", if_is_up(ifp) ? "up" : "down"); +        vty_out (vty, "Address   : %s\n",                    inet_ntoa(pim_ifp->primary_address)); -        vty_outln (vty, "Uptime    : %s", uptime); -        vty_outln (vty, "Version   : %d", pim_ifp->igmp_version); +        vty_out (vty, "Uptime    : %s\n", uptime); +        vty_out (vty, "Version   : %d\n", pim_ifp->igmp_version);          vty_out (vty, VTYNL);          vty_out (vty, VTYNL); -        vty_outln (vty, "Querier"); -        vty_outln (vty, "-------"); -        vty_outln (vty, "Querier     : %s", +        vty_out (vty, "Querier\n"); +        vty_out (vty, "-------\n"); +        vty_out (vty, "Querier     : %s\n",                    igmp->t_igmp_query_timer ? "local" : "other"); -        vty_outln (vty, "Start Count : %d", igmp->startup_query_count); -        vty_outln (vty, "Query Timer : %s", query_hhmmss); -        vty_outln (vty, "Other Timer : %s", other_hhmmss); +        vty_out (vty, "Start Count : %d\n", igmp->startup_query_count); +        vty_out (vty, "Query Timer : %s\n", query_hhmmss); +        vty_out (vty, "Other Timer : %s\n", other_hhmmss);          vty_out (vty, VTYNL);          vty_out (vty, VTYNL); -        vty_outln (vty, "Timers"); -        vty_outln (vty, "------"); -        vty_outln (vty, "Group Membership Interval      : %lis", +        vty_out (vty, "Timers\n"); +        vty_out (vty, "------\n"); +        vty_out (vty, "Group Membership Interval      : %lis\n",                    gmi_msec / 1000); -        vty_outln (vty, "Last Member Query Time         : %lis", +        vty_out (vty, "Last Member Query Time         : %lis\n",                    lmqt_msec / 1000); -        vty_outln (vty, "Older Host Present Interval    : %lis", +        vty_out (vty, "Older Host Present Interval    : %lis\n",                    ohpi_msec / 1000); -        vty_outln (vty, "Other Querier Present Interval : %lis", +        vty_out (vty, "Other Querier Present Interval : %lis\n",                    oqpi_msec / 1000); -        vty_outln (vty, "Query Interval                 : %ds", +        vty_out (vty, "Query Interval                 : %ds\n",                    igmp->querier_query_interval); -        vty_outln (vty, "Query Response Interval        : %lis", +        vty_out (vty, "Query Response Interval        : %lis\n",                    qri_msec / 1000); -        vty_outln (vty, "Robustness Variable            : %d", +        vty_out (vty, "Robustness Variable            : %d\n",                    igmp->querier_robustness_variable); -        vty_outln (vty, "Startup Query Interval         : %ds", sqi); +        vty_out (vty, "Startup Query Interval         : %ds\n", sqi);          vty_out (vty, VTYNL);          vty_out (vty, VTYNL); @@ -704,12 +704,12 @@ static void igmp_show_interfaces_single(struct vty *vty, const char *ifname, u_c    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } else {      if (!found_ifname) -      vty_outln (vty, "%% No such interface"); +      vty_out (vty, "%% No such interface\n");    }  } @@ -721,8 +721,8 @@ static void igmp_show_interface_join(struct vty *vty)    now = pim_time_monotonic_sec(); -  vty_outln (vty, -	  "Interface Address         Source          Group           Socket Uptime  "); +  vty_out (vty, +	  "Interface Address         Source          Group           Socket Uptime  \n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) {      struct pim_interface *pim_ifp; @@ -751,7 +751,7 @@ static void igmp_show_interface_join(struct vty *vty)        pim_inet4_dump("<grp?>", ij->group_addr, group_str, sizeof(group_str));        pim_inet4_dump("<src?>", ij->source_addr, source_str, sizeof(source_str)); -      vty_outln (vty, "%-9s %-15s %-15s %-15s %6d %8s", +      vty_out (vty, "%-9s %-15s %-15s %-15s %6d %8s\n",  	      ifp->name,  	      pri_addr_str,  	      source_str, @@ -925,21 +925,21 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch        json_object_object_add(json, ifp->name, json_row);      } else { -      vty_outln (vty, "Interface  : %s", ifp->name); -      vty_outln (vty, "State      : %s", if_is_up(ifp) ? "up" : "down"); +      vty_out (vty, "Interface  : %s\n", ifp->name); +      vty_out (vty, "State      : %s\n", if_is_up(ifp) ? "up" : "down");        if (pim_ifp->update_source.s_addr != INADDR_ANY) { -        vty_outln (vty, "Use Source : %s", inet_ntoa(pim_ifp->update_source)); +        vty_out (vty, "Use Source : %s\n", inet_ntoa(pim_ifp->update_source));        }        if (pim_ifp->sec_addr_list) {          char pbuf[PREFIX2STR_BUFFER]; -        vty_outln (vty, "Address    : %s (primary)", +        vty_out (vty, "Address    : %s (primary)\n",                  inet_ntoa(ifaddr));          for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) { -          vty_outln (vty, "             %s", +          vty_out (vty, "             %s\n",                    prefix2str(&sec_addr->addr, pbuf, sizeof(pbuf)));          }        } else { -        vty_outln (vty, "Address    : %s", inet_ntoa(ifaddr)); +        vty_out (vty, "Address    : %s\n", inet_ntoa(ifaddr));        }        vty_out (vty, VTYNL); @@ -949,15 +949,15 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch        for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, neighnode, neigh)) {          if (print_header) { -          vty_outln (vty, "PIM Neighbors"); -          vty_outln (vty, "-------------"); +          vty_out (vty, "PIM Neighbors\n"); +          vty_out (vty, "-------------\n");            print_header = 0;          }          pim_inet4_dump("<src?>", neigh->source_addr, neigh_src_str, sizeof(neigh_src_str));          pim_time_uptime(uptime, sizeof(uptime), now - neigh->creation);          pim_time_timer_to_hhmmss(expire, sizeof(expire), neigh->t_expire_timer); -        vty_outln (vty, "%-15s : up for %s, holdtime expires in %s", neigh_src_str, uptime, +        vty_out (vty, "%-15s : up for %s, holdtime expires in %s\n", neigh_src_str, uptime,                    expire);        } @@ -966,13 +966,13 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch          vty_out (vty, VTYNL);        } -      vty_outln (vty, "Designated Router"); -      vty_outln (vty, "-----------------"); -      vty_outln (vty, "Address   : %s", dr_str); -      vty_outln (vty, "Priority  : %d", pim_ifp->pim_dr_priority); -      vty_outln (vty, "Uptime    : %s", dr_uptime); -      vty_outln (vty, "Elections : %d", pim_ifp->pim_dr_election_count); -      vty_outln (vty, "Changes   : %d", pim_ifp->pim_dr_election_changes); +      vty_out (vty, "Designated Router\n"); +      vty_out (vty, "-----------------\n"); +      vty_out (vty, "Address   : %s\n", dr_str); +      vty_out (vty, "Priority  : %d\n", pim_ifp->pim_dr_priority); +      vty_out (vty, "Uptime    : %s\n", dr_uptime); +      vty_out (vty, "Elections : %d\n", pim_ifp->pim_dr_election_count); +      vty_out (vty, "Changes   : %d\n", pim_ifp->pim_dr_election_changes);        vty_out (vty, VTYNL);        vty_out (vty, VTYNL); @@ -983,15 +983,15 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch            if (up->flags & PIM_UPSTREAM_FLAG_MASK_FHR) {              if (print_header) { -              vty_outln (vty, "FHR - First Hop Router"); -              vty_outln (vty, "----------------------"); +              vty_out (vty, "FHR - First Hop Router\n"); +              vty_out (vty, "----------------------\n");                print_header = 0;              }              pim_inet4_dump("<src?>", up->sg.src, src_str, sizeof(src_str));              pim_inet4_dump("<grp?>", up->sg.grp, grp_str, sizeof(grp_str));              pim_time_uptime(uptime, sizeof(uptime), now - up->state_transition); -            vty_outln (vty, "%s : %s is a source, uptime is %s", grp_str, src_str, +            vty_out (vty, "%s : %s is a source, uptime is %s\n", grp_str, src_str,                        uptime);            }          } @@ -1002,45 +1002,45 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch          vty_out (vty, VTYNL);        } -      vty_outln (vty, "Hellos"); -      vty_outln (vty, "------"); -      vty_outln (vty, "Period         : %d", pim_ifp->pim_hello_period); -      vty_outln (vty, "Timer          : %s", hello_timer); -      vty_outln (vty, "StatStart      : %s", stat_uptime); -      vty_outln (vty, "Receive        : %d", pim_ifp->pim_ifstat_hello_recv); -      vty_outln (vty, "Receive Failed : %d", +      vty_out (vty, "Hellos\n"); +      vty_out (vty, "------\n"); +      vty_out (vty, "Period         : %d\n", pim_ifp->pim_hello_period); +      vty_out (vty, "Timer          : %s\n", hello_timer); +      vty_out (vty, "StatStart      : %s\n", stat_uptime); +      vty_out (vty, "Receive        : %d\n", pim_ifp->pim_ifstat_hello_recv); +      vty_out (vty, "Receive Failed : %d\n",                  pim_ifp->pim_ifstat_hello_recvfail); -      vty_outln (vty, "Send           : %d", pim_ifp->pim_ifstat_hello_sent); -      vty_outln (vty, "Send Failed    : %d", +      vty_out (vty, "Send           : %d\n", pim_ifp->pim_ifstat_hello_sent); +      vty_out (vty, "Send Failed    : %d\n",                  pim_ifp->pim_ifstat_hello_sendfail); -      vty_outln (vty, "Generation ID  : %08x", pim_ifp->pim_generation_id); +      vty_out (vty, "Generation ID  : %08x\n", pim_ifp->pim_generation_id);        vty_out (vty, VTYNL);        vty_out (vty, VTYNL);        pim_print_ifp_flags(vty, ifp, mloop); -      vty_outln (vty, "Join Prune Interval"); -      vty_outln (vty, "-------------------"); -      vty_outln (vty, "LAN Delay                    : %s", +      vty_out (vty, "Join Prune Interval\n"); +      vty_out (vty, "-------------------\n"); +      vty_out (vty, "LAN Delay                    : %s\n",                  pim_if_lan_delay_enabled(ifp) ? "yes" : "no"); -      vty_outln (vty, "Effective Propagation Delay  : %d msec", +      vty_out (vty, "Effective Propagation Delay  : %d msec\n",                  pim_if_effective_propagation_delay_msec(ifp)); -      vty_outln (vty, "Effective Override Interval  : %d msec", +      vty_out (vty, "Effective Override Interval  : %d msec\n",                  pim_if_effective_override_interval_msec(ifp)); -      vty_outln (vty, "Join Prune Override Interval : %d msec", +      vty_out (vty, "Join Prune Override Interval : %d msec\n",                  pim_if_jp_override_interval_msec(ifp));        vty_out (vty, VTYNL);        vty_out (vty, VTYNL); -      vty_outln (vty, "LAN Prune Delay"); -      vty_outln (vty, "---------------"); -      vty_outln (vty, "Propagation Delay           : %d msec", +      vty_out (vty, "LAN Prune Delay\n"); +      vty_out (vty, "---------------\n"); +      vty_out (vty, "Propagation Delay           : %d msec\n",                  pim_ifp->pim_propagation_delay_msec); -      vty_outln (vty, "Propagation Delay (Highest) : %d msec", +      vty_out (vty, "Propagation Delay (Highest) : %d msec\n",                  pim_ifp->pim_neighbors_highest_propagation_delay_msec); -      vty_outln (vty, "Override Interval           : %d msec", +      vty_out (vty, "Override Interval           : %d msec\n",                  pim_ifp->pim_override_interval_msec); -      vty_outln (vty, "Override Interval (Highest) : %d msec", +      vty_out (vty, "Override Interval (Highest) : %d msec\n",                  pim_ifp->pim_neighbors_highest_override_interval_msec);        vty_out (vty, VTYNL);        vty_out (vty, VTYNL); @@ -1048,12 +1048,12 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } else {      if (!found_ifname) -      vty_outln (vty, "%% No such interface"); +      vty_out (vty, "%% No such interface\n");    }  } @@ -1105,11 +1105,11 @@ static void pim_show_interfaces(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));    } else { -    vty_outln (vty, -              "Interface  State          Address  PIM Nbrs           PIM DR  FHR IfChannels"); +    vty_out (vty, +              "Interface  State          Address  PIM Nbrs           PIM DR  FHR IfChannels\n");      json_object_object_foreach(json, key, val) {        vty_out(vty, "%-9s  ", key); @@ -1134,7 +1134,7 @@ static void pim_show_interfaces(struct vty *vty, u_char uj)        vty_out(vty, "%3d  ", json_object_get_int(json_tmp));        json_object_object_get_ex(val, "pimIfChannels", &json_tmp); -      vty_outln (vty, "%9d", json_object_get_int(json_tmp)); +      vty_out (vty, "%9d\n", json_object_get_int(json_tmp));      }    } @@ -1154,15 +1154,15 @@ static void pim_show_interface_traffic (struct vty *vty, u_char uj)    else      {        vty_out (vty, VTYNL); -      vty_outln (vty, "%-12s%-17s%-17s%-17s%-17s%-17s%-17s", "Interface", +      vty_out (vty, "%-12s%-17s%-17s%-17s%-17s%-17s%-17s\n", "Interface",                 "    HELLO", "    JOIN", "   PRUNE", "   REGISTER",                 "  REGISTER-STOP", "  ASSERT"); -      vty_outln (vty, -               "%-10s%-18s%-17s%-17s%-17s%-17s%-17s", +      vty_out (vty, +               "%-10s%-18s%-17s%-17s%-17s%-17s%-17s\n",                 "", "      Rx/Tx", "     Rx/Tx", "    Rx/Tx", "    Rx/Tx",                 "     Rx/Tx", "    Rx/Tx"); -      vty_outln (vty, -           "---------------------------------------------------------------------------------------------------------------"); +      vty_out (vty, +           "---------------------------------------------------------------------------------------------------------------\n");      }    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) @@ -1193,8 +1193,8 @@ static void pim_show_interface_traffic (struct vty *vty, u_char uj)          }        else          { -          vty_outln (vty, -               "%-10s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u ", +          vty_out (vty, +               "%-10s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u \n",                 ifp->name, pim_ifp->pim_ifstat_hello_recv,                 pim_ifp->pim_ifstat_hello_sent, pim_ifp->pim_ifstat_join_recv,                 pim_ifp->pim_ifstat_join_send, pim_ifp->pim_ifstat_prune_recv, @@ -1208,7 +1208,7 @@ static void pim_show_interface_traffic (struct vty *vty, u_char uj)      }    if (uj)      { -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free (json);      } @@ -1228,15 +1228,15 @@ static void pim_show_interface_traffic_single (struct vty *vty, const char *ifna    else      {        vty_out (vty, VTYNL); -      vty_outln (vty, "%-12s%-17s%-17s%-17s%-17s%-17s%-17s", "Interface", +      vty_out (vty, "%-12s%-17s%-17s%-17s%-17s%-17s%-17s\n", "Interface",                 "    HELLO", "    JOIN", "   PRUNE", "   REGISTER",                 "  REGISTER-STOP", "  ASSERT"); -      vty_outln (vty, -               "%-10s%-18s%-17s%-17s%-17s%-17s%-17s", +      vty_out (vty, +               "%-10s%-18s%-17s%-17s%-17s%-17s%-17s\n",                 "", "      Rx/Tx", "     Rx/Tx", "    Rx/Tx", "    Rx/Tx",                 "     Rx/Tx", "    Rx/Tx"); -      vty_outln (vty, -           "---------------------------------------------------------------------------------------------------------------"); +      vty_out (vty, +           "---------------------------------------------------------------------------------------------------------------\n");      }    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) @@ -1272,8 +1272,8 @@ static void pim_show_interface_traffic_single (struct vty *vty, const char *ifna          }        else          { -          vty_outln (vty, -               "%-10s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u ", +          vty_out (vty, +               "%-10s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u \n",                 ifp->name, pim_ifp->pim_ifstat_hello_recv,                 pim_ifp->pim_ifstat_hello_sent, pim_ifp->pim_ifstat_join_recv,                 pim_ifp->pim_ifstat_join_send, pim_ifp->pim_ifstat_prune_recv, @@ -1287,14 +1287,14 @@ static void pim_show_interface_traffic_single (struct vty *vty, const char *ifna      }    if (uj)      { -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free (json);      }    else      {        if (!found_ifname) -        vty_outln (vty, "%% No such interface"); +        vty_out (vty, "%% No such interface\n");      }  } @@ -1315,8 +1315,8 @@ static void pim_show_join(struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -            "Interface Address         Source          Group           State  Uptime   Expire Prune"); +    vty_out (vty, +            "Interface Address         Source          Group           State  Uptime   Expire Prune\n");    for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, ch_node, ch)) { @@ -1374,7 +1374,7 @@ static void pim_show_join(struct vty *vty, u_char uj)        else          json_object_object_add(json_grp, ch_src_str, json_row);      } else { -      vty_outln (vty, "%-9s %-15s %-15s %-15s %-6s %8s %-6s %5s", +      vty_out (vty, "%-9s %-15s %-15s %-15s %-6s %8s %-6s %5s\n",  	      ch->interface->name,  	      inet_ntoa(ifaddr),  	      ch_src_str, @@ -1387,7 +1387,7 @@ static void pim_show_join(struct vty *vty, u_char uj)    } /* scan interface channels */    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -1512,29 +1512,29 @@ static void pim_show_neighbors_single(struct vty *vty, const char *neighbor, u_c          json_object_object_add(json_ifp, neigh_src_str, json_row);        } else { -        vty_outln (vty, "Interface : %s", ifp->name); -        vty_outln (vty, "Neighbor  : %s", neigh_src_str); -        vty_outln (vty, "    Uptime                         : %s", uptime); -        vty_outln (vty, "    Holdtime                       : %s", expire); -        vty_outln (vty, "    DR Priority                    : %d", +        vty_out (vty, "Interface : %s\n", ifp->name); +        vty_out (vty, "Neighbor  : %s\n", neigh_src_str); +        vty_out (vty, "    Uptime                         : %s\n", uptime); +        vty_out (vty, "    Holdtime                       : %s\n", expire); +        vty_out (vty, "    DR Priority                    : %d\n",                    neigh->dr_priority); -        vty_outln (vty, "    Generation ID                  : %08x", +        vty_out (vty, "    Generation ID                  : %08x\n",                    neigh->generation_id); -        vty_outln (vty, "    Override Interval (msec)       : %d", +        vty_out (vty, "    Override Interval (msec)       : %d\n",                    neigh->override_interval_msec); -        vty_outln (vty, "    Propagation Delay (msec)       : %d", +        vty_out (vty, "    Propagation Delay (msec)       : %d\n",                    neigh->propagation_delay_msec); -        vty_outln (vty, "    Hello Option - Address List    : %s", +        vty_out (vty, "    Hello Option - Address List    : %s\n",                    option_address_list ? "yes" : "no"); -        vty_outln (vty, "    Hello Option - DR Priority     : %s", +        vty_out (vty, "    Hello Option - DR Priority     : %s\n",                    option_dr_priority ? "yes" : "no"); -        vty_outln (vty, "    Hello Option - Generation ID   : %s", +        vty_out (vty, "    Hello Option - Generation ID   : %s\n",                    option_generation_id ? "yes" : "no"); -        vty_outln (vty, "    Hello Option - Holdtime        : %s", +        vty_out (vty, "    Hello Option - Holdtime        : %s\n",                    option_holdtime ? "yes" : "no"); -        vty_outln (vty, "    Hello Option - LAN Prune Delay : %s", +        vty_out (vty, "    Hello Option - LAN Prune Delay : %s\n",                    option_lan_prune_delay ? "yes" : "no"); -        vty_outln (vty, "    Hello Option - T-bit           : %s", +        vty_out (vty, "    Hello Option - T-bit           : %s\n",                    option_t_bit ? "yes" : "no");          pim_bfd_show_info (vty, neigh->bfd_info, json_ifp, uj, 0);          vty_out (vty, VTYNL); @@ -1543,13 +1543,13 @@ static void pim_show_neighbors_single(struct vty *vty, const char *neighbor, u_c    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } else {      {        if (!found_neighbor) -        vty_outln (vty, "%% No such interface or neighbor"); +        vty_out (vty, "%% No such interface or neighbor\n");      }    }  } @@ -1572,7 +1572,7 @@ pim_show_state(struct vty *vty, const char *src_or_group, const char *group, u_c      json = json_object_new_object();    } else {      vty_out(vty, "Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G)"); -    vty_outln (vty, "%sInstalled Source           Group            IIF      OIL", +    vty_out (vty, "%sInstalled Source           Group            IIF      OIL\n",                VTYNL);    } @@ -1695,7 +1695,7 @@ pim_show_state(struct vty *vty, const char *src_or_group, const char *group, u_c    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } else { @@ -1723,7 +1723,7 @@ static void pim_show_neighbors(struct vty *vty, u_char uj)    if (uj) {      json = json_object_new_object();    } else { -    vty_outln (vty, "Interface         Neighbor    Uptime  Holdtime  DR Pri"); +    vty_out (vty, "Interface         Neighbor    Uptime  Holdtime  DR Pri\n");    }    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) { @@ -1755,7 +1755,7 @@ static void pim_show_neighbors(struct vty *vty, u_char uj)          json_object_object_add(json_ifp_rows, neigh_src_str, json_row);        } else { -        vty_outln (vty, "%-9s  %15s  %8s  %8s  %6d", +        vty_out (vty, "%-9s  %15s  %8s  %8s  %6d\n",                  ifp->name,                  neigh_src_str,                  uptime, @@ -1771,7 +1771,7 @@ static void pim_show_neighbors(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -1782,8 +1782,8 @@ static void pim_show_neighbors_secondary(struct vty *vty)    struct listnode  *node;    struct interface *ifp; -  vty_outln (vty, -            "Interface Address         Neighbor        Secondary      "); +  vty_out (vty, +            "Interface Address         Neighbor        Secondary      \n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) {      struct pim_interface *pim_ifp; @@ -1817,7 +1817,7 @@ static void pim_show_neighbors_secondary(struct vty *vty)  	prefix2str(p, neigh_sec_str, sizeof(neigh_sec_str)); -	vty_outln (vty, "%-9s %-15s %-15s %-15s", +	vty_out (vty, "%-9s %-15s %-15s %-15s\n",  		ifp->name,  		inet_ntoa(ifaddr),  		neigh_src_str, @@ -1905,8 +1905,8 @@ static void pim_show_upstream(struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -              "Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt"); +    vty_out (vty, +              "Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt\n");    for (ALL_LIST_ELEMENTS_RO(pim_upstream_list, upnode, up)) {      char src_str[INET_ADDRSTRLEN]; @@ -1973,7 +1973,7 @@ static void pim_show_upstream(struct vty *vty, u_char uj)        json_object_int_add(json_row, "sptBit", up->sptbit);        json_object_object_add(json_group, src_str, json_row);      } else { -      vty_outln (vty, "%-10s%-15s %-15s %-11s %-8s %-9s %-9s %-9s %6d", +      vty_out (vty, "%-10s%-15s %-15s %-11s %-8s %-9s %-9s %-9s %6d\n",                up->rpf.source_nexthop.interface->name,                src_str,                grp_str, @@ -1987,7 +1987,7 @@ static void pim_show_upstream(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -2007,8 +2007,8 @@ static void pim_show_join_desired(struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -            "Interface Source          Group           LostAssert Joins PimInclude JoinDesired EvalJD"); +    vty_out (vty, +            "Interface Source          Group           LostAssert Joins PimInclude JoinDesired EvalJD\n");    /* scan per-interface (S,G) state */    for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, chnode, ch)) { @@ -2051,7 +2051,7 @@ static void pim_show_join_desired(struct vty *vty, u_char uj)        json_object_object_add(json_group, src_str, json_row);      } else { -      vty_outln (vty, "%-9s %-15s %-15s %-10s %-5s %-10s %-11s %-6s", +      vty_out (vty, "%-9s %-15s %-15s %-10s %-5s %-10s %-11s %-6s\n",  	      ch->interface->name,  	      src_str,  	      grp_str, @@ -2064,7 +2064,7 @@ static void pim_show_join_desired(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -2081,8 +2081,8 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -            "Source          Group           RpfIface RibNextHop      RpfAddress     "); +    vty_out (vty, +            "Source          Group           RpfIface RibNextHop      RpfAddress     \n");    for (ALL_LIST_ELEMENTS_RO(pim_upstream_list, upnode, up)) {      char src_str[INET_ADDRSTRLEN]; @@ -2118,7 +2118,7 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj)          json_object_string_add(json_row, "rpfAddress", rpf_addr_str);          json_object_object_add(json_group, src_str, json_row);      } else { -        vty_outln (vty, "%-15s %-15s %-8s %-15s %-15s", +        vty_out (vty, "%-15s %-15s %-8s %-15s %-15s\n",                  src_str,                  grp_str,                  rpf_ifname, @@ -2128,7 +2128,7 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -2201,8 +2201,8 @@ static void pim_show_rpf(struct vty *vty, u_char uj)    } else {      show_rpf_refresh_stats(vty, now, json);      vty_out (vty, VTYNL); -    vty_outln (vty, -            "Source          Group           RpfIface RpfAddress      RibNextHop      Metric Pref"); +    vty_out (vty, +            "Source          Group           RpfIface RpfAddress      RibNextHop      Metric Pref\n");    }    for (ALL_LIST_ELEMENTS_RO(pim_upstream_list, up_node, up)) { @@ -2239,7 +2239,7 @@ static void pim_show_rpf(struct vty *vty, u_char uj)        json_object_object_add(json_group, src_str, json_row);      } else { -      vty_outln (vty, "%-15s %-15s %-8s %-15s %-15s %6d %4d", +      vty_out (vty, "%-15s %-15s %-8s %-15s %-15s %6d %4d\n",                src_str,                grp_str,                rpf_ifname, @@ -2251,7 +2251,7 @@ static void pim_show_rpf(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -2288,14 +2288,14 @@ pim_show_nexthop (struct vty *vty)    if (pimg && !pimg->rpf_hash)      { -      vty_outln (vty, "no nexthop cache "); +      vty_out (vty, "no nexthop cache \n");        return;      } -  vty_outln (vty, "Number of registered addresses: %lu ", +  vty_out (vty, "Number of registered addresses: %lu \n",             pimg->rpf_hash->count); -  vty_outln (vty, "Address         Interface      Nexthop"); -  vty_outln (vty, "-------------------------------------------"); +  vty_out (vty, "Address         Interface      Nexthop\n"); +  vty_out (vty, "-------------------------------------------\n");    hash_walk (pimg->rpf_hash, pim_print_pnc_cache_walkcb, vty); @@ -2315,8 +2315,8 @@ static void igmp_show_groups(struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -              "Interface Address         Group           Mode Timer    Srcs V Uptime  "); +    vty_out (vty, +              "Interface Address         Group           Mode Timer    Srcs V Uptime  \n");    /* scan interfaces */    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), ifnode, ifp)) { @@ -2368,7 +2368,7 @@ static void igmp_show_groups(struct vty *vty, u_char uj)              json_object_object_add(json_iface, group_str, json_row);          } else { -          vty_outln (vty, "%-9s %-15s %-15s %4s %8s %4d %d %8s", +          vty_out (vty, "%-9s %-15s %-15s %4s %8s %4d %d %8s\n",                    ifp->name,                    ifaddr_str,                    group_str, @@ -2383,7 +2383,7 @@ static void igmp_show_groups(struct vty *vty, u_char uj)    } /* scan interfaces */    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -2394,8 +2394,8 @@ static void igmp_show_group_retransmission(struct vty *vty)    struct listnode  *ifnode;    struct interface *ifp; -  vty_outln (vty, -            "Interface Address         Group           RetTimer Counter RetSrcs"); +  vty_out (vty, +            "Interface Address         Group           RetTimer Counter RetSrcs\n");    /* scan interfaces */    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), ifnode, ifp)) { @@ -2433,7 +2433,7 @@ static void igmp_show_group_retransmission(struct vty *vty)  	  }  	} -	vty_outln (vty, "%-9s %-15s %-15s %-8s %7d %7d", +	vty_out (vty, "%-9s %-15s %-15s %-8s %7d %7d\n",  		ifp->name,  		ifaddr_str,  		group_str, @@ -2454,8 +2454,8 @@ static void igmp_show_sources(struct vty *vty)    now = pim_time_monotonic_sec(); -  vty_outln (vty, -            "Interface Address         Group           Source          Timer Fwd Uptime  "); +  vty_out (vty, +            "Interface Address         Group           Source          Timer Fwd Uptime  \n");    /* scan interfaces */    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), ifnode, ifp)) { @@ -2494,7 +2494,7 @@ static void igmp_show_sources(struct vty *vty)  	  pim_time_uptime(uptime, sizeof(uptime), now - src->source_creation); -	  vty_outln (vty, "%-9s %-15s %-15s %-15s %5s %3s %8s", +	  vty_out (vty, "%-9s %-15s %-15s %-15s %5s %3s %8s\n",  		  ifp->name,  		  ifaddr_str,  		  group_str, @@ -2514,8 +2514,8 @@ static void igmp_show_source_retransmission(struct vty *vty)    struct listnode  *ifnode;    struct interface *ifp; -  vty_outln (vty, -            "Interface Address         Group           Source          Counter"); +  vty_out (vty, +            "Interface Address         Group           Source          Counter\n");    /* scan interfaces */    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), ifnode, ifp)) { @@ -2548,7 +2548,7 @@ static void igmp_show_source_retransmission(struct vty *vty)  	  pim_inet4_dump("<source?>", src->source_addr, source_str, sizeof(source_str)); -	  vty_outln (vty, "%-9s %-15s %-15s %-15s %7d", +	  vty_out (vty, "%-9s %-15s %-15s %-15s %7d\n",  		  ifp->name,  		  ifaddr_str,  		  group_str, @@ -3113,14 +3113,14 @@ DEFUN (show_ip_pim_nexthop_lookup,    result = inet_pton (AF_INET, addr_str, &src_addr);    if (result <= 0)      { -      vty_outln (vty, "Bad unicast address %s: errno=%d: %s", +      vty_out (vty, "Bad unicast address %s: errno=%d: %s\n",                 addr_str, errno, safe_strerror(errno));        return CMD_WARNING;      }    if (pim_is_group_224_4 (src_addr))      { -      vty_outln (vty, "Invalid argument. Expected Valid Source Address."); +      vty_out (vty, "Invalid argument. Expected Valid Source Address.\n");        return CMD_WARNING;      } @@ -3128,15 +3128,15 @@ DEFUN (show_ip_pim_nexthop_lookup,    result = inet_pton (AF_INET, addr_str1, &grp_addr);    if (result <= 0)      { -      vty_outln (vty, "Bad unicast address %s: errno=%d: %s", +      vty_out (vty, "Bad unicast address %s: errno=%d: %s\n",                 addr_str, errno, safe_strerror(errno));        return CMD_WARNING;      }    if (!pim_is_group_224_4 (grp_addr))      { -      vty_outln (vty, -                 "Invalid argument. Expected Valid Multicast Group Address."); +      vty_out (vty, +                 "Invalid argument. Expected Valid Multicast Group Address.\n");        return CMD_WARNING;      } @@ -3163,7 +3163,7 @@ DEFUN (show_ip_pim_nexthop_lookup,    pim_addr_dump ("<grp?>", &grp, grp_str, sizeof (grp_str));    pim_addr_dump ("<nexthop?>", &nexthop.mrib_nexthop_addr,                   nexthop_addr_str, sizeof (nexthop_addr_str)); -  vty_outln (vty, "Group %s --- Nexthop %s Interface %s ", grp_str, +  vty_out (vty, "Group %s --- Nexthop %s Interface %s \n", grp_str,             nexthop_addr_str, nexthop.interface->name);    return CMD_SUCCESS; @@ -3198,8 +3198,8 @@ static void show_multicast_interfaces(struct vty *vty)    vty_out (vty, VTYNL); -  vty_outln (vty, -            "Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut"); +  vty_out (vty, +            "Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut\n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) {      struct pim_interface *pim_ifp; @@ -3226,7 +3226,7 @@ static void show_multicast_interfaces(struct vty *vty)      ifaddr = pim_ifp->primary_address; -    vty_outln (vty, "%-9s %-15s %3d %3d %7lu %7lu %10lu %10lu", +    vty_out (vty, "%-9s %-15s %3d %3d %7lu %7lu %10lu %10lu\n",  	    ifp->name,  	    inet_ntoa(ifaddr),  	    ifp->ifindex, @@ -3249,11 +3249,11 @@ DEFUN (show_ip_multicast,    char uptime[10]; -  vty_outln (vty, "Mroute socket descriptor: %d", +  vty_out (vty, "Mroute socket descriptor: %d\n",            qpim_mroute_socket_fd);    pim_time_uptime(uptime, sizeof(uptime), now - qpim_mroute_socket_creation); -  vty_outln (vty, "Mroute socket uptime: %s", +  vty_out (vty, "Mroute socket uptime: %s\n",            uptime);    vty_out (vty, VTYNL); @@ -3262,17 +3262,17 @@ DEFUN (show_ip_multicast,    pim_zlookup_show_ip_multicast (vty);    vty_out (vty, VTYNL); -  vty_outln (vty, "Maximum highest VifIndex: %d", +  vty_out (vty, "Maximum highest VifIndex: %d\n",  	  PIM_MAX_USABLE_VIFS);    vty_out (vty, VTYNL); -  vty_outln (vty, "Upstream Join Timer: %d secs", +  vty_out (vty, "Upstream Join Timer: %d secs\n",             qpim_t_periodic); -  vty_outln (vty, "Join/Prune Holdtime: %d secs", +  vty_out (vty, "Join/Prune Holdtime: %d secs\n",             PIM_JP_HOLDTIME); -  vty_outln (vty, "PIM ECMP: %s", +  vty_out (vty, "PIM ECMP: %s\n",             qpim_ecmp_enable ? "Enable" : "Disable"); -  vty_outln (vty, "PIM ECMP Rebalance: %s", +  vty_out (vty, "PIM ECMP Rebalance: %s\n",             qpim_ecmp_rebalance_enable ? "Enable" : "Disable");    vty_out (vty, VTYNL); @@ -3312,8 +3312,8 @@ static void show_mroute(struct vty *vty, u_char uj)    if (uj) {      json = json_object_new_object();    } else { -    vty_outln (vty, -              "Source          Group           Proto  Input      Output     TTL  Uptime"); +    vty_out (vty, +              "Source          Group           Proto  Input      Output     TTL  Uptime\n");    }    now = pim_time_monotonic_sec(); @@ -3424,7 +3424,7 @@ static void show_mroute(struct vty *vty, u_char uj)            strcpy(proto, "STAR");          } -        vty_outln (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s", +        vty_out (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s\n",                  src_str,                  grp_str,                  proto, @@ -3444,7 +3444,7 @@ static void show_mroute(struct vty *vty, u_char uj)      }      if (!uj && !found_oif) { -      vty_outln (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s", +      vty_out (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s\n",                src_str,                grp_str,                "none", @@ -3531,7 +3531,7 @@ static void show_mroute(struct vty *vty, u_char uj)          }          json_object_object_add(json_oil, out_ifname, json_ifp_out);        } else { -        vty_outln (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s", +        vty_out (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s\n",                  src_str,                  grp_str,                  proto, @@ -3550,7 +3550,7 @@ static void show_mroute(struct vty *vty, u_char uj)      }      if (!uj && !found_oif) { -        vty_outln (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s", +        vty_out (vty, "%-15s %-15s %-6s %-10s %-10s %-3d  %8s\n",                  src_str,                  grp_str,                  proto, @@ -3562,7 +3562,7 @@ static void show_mroute(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -3589,8 +3589,8 @@ static void show_mroute_count(struct vty *vty)    vty_out (vty, VTYNL); -  vty_outln (vty, -            "Source          Group           LastUsed Packets Bytes WrongIf  "); +  vty_out (vty, +            "Source          Group           LastUsed Packets Bytes WrongIf  \n");    /* Print PIM and IGMP route counts */    for (ALL_LIST_ELEMENTS_RO(pim_channel_oil_list, node, c_oil)) { @@ -3605,7 +3605,7 @@ static void show_mroute_count(struct vty *vty)      pim_inet4_dump("<group?>", c_oil->oil.mfcc_mcastgrp, group_str, sizeof(group_str));      pim_inet4_dump("<source?>", c_oil->oil.mfcc_origin, source_str, sizeof(source_str)); -    vty_outln (vty, "%-15s %-15s %-8llu %-7ld %-10ld %-7ld", +    vty_out (vty, "%-15s %-15s %-8llu %-7ld %-10ld %-7ld\n",  	    source_str,  	    group_str,  	    c_oil->cc.lastused/100, @@ -3627,7 +3627,7 @@ static void show_mroute_count(struct vty *vty)      pim_inet4_dump("<group?>", s_route->c_oil.oil.mfcc_mcastgrp, group_str, sizeof(group_str));      pim_inet4_dump("<source?>", s_route->c_oil.oil.mfcc_origin, source_str, sizeof(source_str)); -    vty_outln (vty, "%-15s %-15s %-8llu %-7ld %-10ld %-7ld", +    vty_out (vty, "%-15s %-15s %-8llu %-7ld %-10ld %-7ld\n",         source_str,         group_str,         s_route->c_oil.cc.lastused, @@ -3668,24 +3668,24 @@ DEFUN (show_ip_rib,    addr_str = argv[idx_ipv4]->arg;    result = inet_pton(AF_INET, addr_str, &addr);    if (result <= 0) { -    vty_outln (vty, "Bad unicast address %s: errno=%d: %s", +    vty_out (vty, "Bad unicast address %s: errno=%d: %s\n",  	    addr_str, errno, safe_strerror(errno));      return CMD_WARNING;    }    if (pim_nexthop_lookup(&nexthop, addr, 0)) { -    vty_outln (vty, "Failure querying RIB nexthop for unicast address %s", +    vty_out (vty, "Failure querying RIB nexthop for unicast address %s\n",  	    addr_str);      return CMD_WARNING;    } -  vty_outln (vty, -            "Address         NextHop         Interface Metric Preference"); +  vty_out (vty, +            "Address         NextHop         Interface Metric Preference\n");    pim_addr_dump("<nexthop?>", &nexthop.mrib_nexthop_addr,  		nexthop_addr_str, sizeof(nexthop_addr_str)); -  vty_outln (vty, "%-15s %-15s %-9s %6d %10d", +  vty_out (vty, "%-15s %-15s %-9s %6d %10d\n",  	  addr_str,  	  nexthop_addr_str,  	  nexthop.interface ? nexthop.interface->name : "<ifname?>", @@ -3701,8 +3701,8 @@ static void show_ssmpingd(struct vty *vty)    struct ssmpingd_sock *ss;    time_t                now; -  vty_outln (vty, -            "Source          Socket Address          Port Uptime   Requests"); +  vty_out (vty, +            "Source          Socket Address          Port Uptime   Requests\n");    if (!qpim_ssmpingd_list)      return; @@ -3719,14 +3719,14 @@ static void show_ssmpingd(struct vty *vty)      pim_inet4_dump("<src?>", ss->source_addr, source_str, sizeof(source_str));      if (pim_socket_getsockname(ss->sock_fd, (struct sockaddr *) &bind_addr, &len)) { -      vty_outln (vty, "%% Failure reading socket name for ssmpingd source %s on fd=%d", +      vty_out (vty, "%% Failure reading socket name for ssmpingd source %s on fd=%d\n",  	      source_str, ss->sock_fd);      }      pim_inet4_dump("<addr?>", bind_addr.sin_addr, bind_addr_str, sizeof(bind_addr_str));      pim_time_uptime(ss_uptime, sizeof(ss_uptime), now - ss->creation); -    vty_outln (vty, "%-15s %6d %-15s %5d %8s %8lld", +    vty_out (vty, "%-15s %6d %-15s %5d %8s %8lld\n",  	    source_str,  	    ss->sock_fd,  	    bind_addr_str, @@ -3756,45 +3756,45 @@ pim_rp_cmd_worker (struct vty *vty, const char *rp, const char *group, const cha    if (result == PIM_MALLOC_FAIL)      { -      vty_outln (vty, "%% Out of memory"); +      vty_out (vty, "%% Out of memory\n");        return CMD_WARNING;      }    if (result == PIM_GROUP_BAD_ADDRESS)      { -      vty_outln (vty, "%% Bad group address specified: %s", group); +      vty_out (vty, "%% Bad group address specified: %s\n", group);        return CMD_WARNING;      }    if (result == PIM_RP_BAD_ADDRESS)      { -      vty_outln (vty, "%% Bad RP address specified: %s", rp); +      vty_out (vty, "%% Bad RP address specified: %s\n", rp);        return CMD_WARNING;      }    if (result == PIM_RP_NO_PATH)      { -      vty_outln (vty, "%% No Path to RP address specified: %s", rp); +      vty_out (vty, "%% No Path to RP address specified: %s\n", rp);        return CMD_WARNING;      }    if (result == PIM_GROUP_OVERLAP)      { -      vty_outln (vty, "%% Group range specified cannot overlap"); +      vty_out (vty, "%% Group range specified cannot overlap\n");        return CMD_WARNING;      }    if (result == PIM_GROUP_PFXLIST_OVERLAP)      { -      vty_outln (vty, -                 "%% This group is already covered by a RP prefix-list"); +      vty_out (vty, +                 "%% This group is already covered by a RP prefix-list\n");        return CMD_WARNING;      }    if (result == PIM_RP_PFXLIST_IN_USE)      { -      vty_outln (vty, -                 "%% The same prefix-list cannot be applied to multiple RPs"); +      vty_out (vty, +                 "%% The same prefix-list cannot be applied to multiple RPs\n");        return CMD_WARNING;      } @@ -4042,19 +4042,19 @@ pim_no_rp_cmd_worker (struct vty *vty, const char *rp, const char *group,    if (result == PIM_GROUP_BAD_ADDRESS)      { -      vty_outln (vty, "%% Bad group address specified: %s", group); +      vty_out (vty, "%% Bad group address specified: %s\n", group);        return CMD_WARNING;      }    if (result == PIM_RP_BAD_ADDRESS)      { -      vty_outln (vty, "%% Bad RP address specified: %s", rp); +      vty_out (vty, "%% Bad RP address specified: %s\n", rp);        return CMD_WARNING;      }    if (result == PIM_RP_NOT_FOUND)      { -      vty_outln (vty, "%% Unable to find specified RP"); +      vty_out (vty, "%% Unable to find specified RP\n");        return CMD_WARNING;      } @@ -4104,13 +4104,13 @@ pim_ssm_cmd_worker (struct vty *vty, const char *plist)    switch (result)      {      case PIM_SSM_ERR_NO_VRF: -      vty_outln (vty, "%% VRF doesn't exist"); +      vty_out (vty, "%% VRF doesn't exist\n");        break;      case PIM_SSM_ERR_DUP: -      vty_outln (vty, "%% duplicate config"); +      vty_out (vty, "%% duplicate config\n");        break;      default: -      vty_outln (vty, "%% ssm range config failed"); +      vty_out (vty, "%% ssm range config failed\n");      }    return CMD_WARNING; @@ -4155,7 +4155,7 @@ DEFUN (no_ip_pim_ssm_prefix_list_name,    if (ssm->plist_name && !strcmp(ssm->plist_name, argv[0]->arg))      return pim_ssm_cmd_worker (vty, NULL); -  vty_outln (vty, "%% pim ssm prefix-list %s doesn't exist", +  vty_out (vty, "%% pim ssm prefix-list %s doesn't exist\n",             argv[0]->arg);    return CMD_WARNING; @@ -4172,12 +4172,12 @@ ip_pim_ssm_show_group_range(struct vty *vty, u_char uj)        json_object *json;        json = json_object_new_object();        json_object_string_add(json, "ssmGroups", range_str); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      }    else -    vty_outln (vty, "SSM group range : %s", range_str); +    vty_out (vty, "SSM group range : %s\n", range_str);  }  DEFUN (show_ip_pim_ssm_range, @@ -4218,12 +4218,12 @@ ip_pim_ssm_show_group_type(struct vty *vty, u_char uj, const char *group)        json_object *json;        json = json_object_new_object();        json_object_string_add(json, "groupType", type_str); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      }    else -    vty_outln (vty, "Group type : %s", type_str); +    vty_out (vty, "Group type : %s\n", type_str);  }  DEFUN (show_ip_pim_group_type, @@ -4258,8 +4258,8 @@ DEFUN_HIDDEN (no_ip_multicast_routing,                IP_STR                "Enable IP multicast forwarding\n")  { -  vty_outln (vty, -             "Command is Disabled and will be removed in a future version"); +  vty_out (vty, +             "Command is Disabled and will be removed in a future version\n");    return CMD_SUCCESS;  } @@ -4277,14 +4277,14 @@ DEFUN (ip_ssmpingd,    result = inet_pton(AF_INET, source_str, &source_addr);    if (result <= 0) { -    vty_outln (vty, "%% Bad source address %s: errno=%d: %s", +    vty_out (vty, "%% Bad source address %s: errno=%d: %s\n",  	    source_str, errno, safe_strerror(errno));      return CMD_WARNING;    }    result = pim_ssmpingd_start(source_addr);    if (result) { -    vty_outln (vty, "%% Failure starting ssmpingd for source %s: %d", +    vty_out (vty, "%% Failure starting ssmpingd for source %s: %d\n",  	    source_str, result);      return CMD_WARNING;    } @@ -4307,14 +4307,14 @@ DEFUN (no_ip_ssmpingd,    result = inet_pton(AF_INET, source_str, &source_addr);    if (result <= 0) { -    vty_outln (vty, "%% Bad source address %s: errno=%d: %s", +    vty_out (vty, "%% Bad source address %s: errno=%d: %s\n",  	    source_str, errno, safe_strerror(errno));      return CMD_WARNING;    }    result = pim_ssmpingd_stop(source_addr);    if (result) { -    vty_outln (vty, "%% Failure stopping ssmpingd for source %s: %d", +    vty_out (vty, "%% Failure stopping ssmpingd for source %s: %d\n",  	    source_str, result);      return CMD_WARNING;    } @@ -4388,7 +4388,7 @@ pim_cmd_igmp_start (struct vty *vty, struct interface *ifp)        pim_ifp = pim_if_new(ifp, 1 /* igmp=true */, 0 /* pim=false */);        if (!pim_ifp)          { -          vty_outln (vty, "Could not enable IGMP on interface %s", +          vty_out (vty, "Could not enable IGMP on interface %s\n",  	      ifp->name);            return CMD_WARNING;          } @@ -4473,7 +4473,7 @@ DEFUN (interface_ip_igmp_join,    group_str = argv[idx_ipv4]->arg;    result = inet_pton(AF_INET, group_str, &group_addr);    if (result <= 0) { -    vty_outln (vty, "Bad group address %s: errno=%d: %s", +    vty_out (vty, "Bad group address %s: errno=%d: %s\n",  	    group_str, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -4482,14 +4482,14 @@ DEFUN (interface_ip_igmp_join,    source_str = argv[idx_ipv4_2]->arg;    result = inet_pton(AF_INET, source_str, &source_addr);    if (result <= 0) { -    vty_outln (vty, "Bad source address %s: errno=%d: %s", +    vty_out (vty, "Bad source address %s: errno=%d: %s\n",  	    source_str, errno, safe_strerror(errno));      return CMD_WARNING;    }    result = pim_if_igmp_join_add(ifp, group_addr, source_addr);    if (result) { -    vty_outln (vty, "%% Failure joining IGMP group %s source %s on interface %s: %d", +    vty_out (vty, "%% Failure joining IGMP group %s source %s on interface %s: %d\n",  	    group_str, source_str, ifp->name, result);      return CMD_WARNING;    } @@ -4520,7 +4520,7 @@ DEFUN (interface_no_ip_igmp_join,    group_str = argv[idx_ipv4]->arg;    result = inet_pton(AF_INET, group_str, &group_addr);    if (result <= 0) { -    vty_outln (vty, "Bad group address %s: errno=%d: %s", +    vty_out (vty, "Bad group address %s: errno=%d: %s\n",  	    group_str, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -4529,14 +4529,14 @@ DEFUN (interface_no_ip_igmp_join,    source_str = argv[idx_ipv4_2]->arg;    result = inet_pton(AF_INET, source_str, &source_addr);    if (result <= 0) { -    vty_outln (vty, "Bad source address %s: errno=%d: %s", +    vty_out (vty, "Bad source address %s: errno=%d: %s\n",  	    source_str, errno, safe_strerror(errno));      return CMD_WARNING;    }    result = pim_if_igmp_join_del(ifp, group_addr, source_addr);    if (result) { -    vty_outln (vty, "%% Failure leaving IGMP group %s source %s on interface %s: %d", +    vty_out (vty, "%% Failure leaving IGMP group %s source %s on interface %s: %d\n",  	    group_str, source_str, ifp->name, result);      return CMD_WARNING;    } @@ -4704,21 +4704,21 @@ DEFUN (interface_ip_igmp_query_interval,      already, but we verify them anyway for extra safety.    */    if (query_interval < IGMP_QUERY_INTERVAL_MIN) { -    vty_outln (vty, "General query interval %d lower than minimum %d", +    vty_out (vty, "General query interval %d lower than minimum %d\n",  	    query_interval,  	    IGMP_QUERY_INTERVAL_MIN);      return CMD_WARNING;    }    if (query_interval > IGMP_QUERY_INTERVAL_MAX) { -    vty_outln (vty, "General query interval %d higher than maximum %d", +    vty_out (vty, "General query interval %d higher than maximum %d\n",  	    query_interval,  	    IGMP_QUERY_INTERVAL_MAX);      return CMD_WARNING;    }    if (query_interval_dsec <= pim_ifp->igmp_query_max_response_time_dsec) { -    vty_outln (vty, -	    "Can't set general query interval %d dsec <= query max response time %d dsec.", +    vty_out (vty, +	    "Can't set general query interval %d dsec <= query max response time %d dsec.\n",  	    query_interval_dsec,pim_ifp->igmp_query_max_response_time_dsec);      return CMD_WARNING;    } @@ -4746,8 +4746,8 @@ DEFUN (interface_no_ip_igmp_query_interval,    default_query_interval_dsec = IGMP_GENERAL_QUERY_INTERVAL * 10;    if (default_query_interval_dsec <= pim_ifp->igmp_query_max_response_time_dsec) { -    vty_outln (vty, -	    "Can't set default general query interval %d dsec <= query max response time %d dsec.", +    vty_out (vty, +	    "Can't set default general query interval %d dsec <= query max response time %d dsec.\n",  	    default_query_interval_dsec,  	    pim_ifp->igmp_query_max_response_time_dsec);      return CMD_WARNING; @@ -4845,8 +4845,8 @@ DEFUN (interface_ip_igmp_query_max_response_time,    query_max_response_time = atoi(argv[3]->arg);    if (query_max_response_time >= pim_ifp->igmp_default_query_interval * 10) { -    vty_outln (vty, -	    "Can't set query max response time %d sec >= general query interval %d sec", +    vty_out (vty, +	    "Can't set query max response time %d sec >= general query interval %d sec\n",  	    query_max_response_time,pim_ifp->igmp_default_query_interval);      return CMD_WARNING;    } @@ -4905,8 +4905,8 @@ DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec,    default_query_interval_dsec = 10 * pim_ifp->igmp_default_query_interval;    if (query_max_response_time_dsec >= default_query_interval_dsec) { -    vty_outln (vty, -	    "Can't set query max response time %d dsec >= general query interval %d dsec", +    vty_out (vty, +	    "Can't set query max response time %d dsec >= general query interval %d dsec\n",  	    query_max_response_time_dsec,default_query_interval_dsec);      return CMD_WARNING;    } @@ -4949,7 +4949,7 @@ DEFUN (interface_ip_pim_drprio,    uint32_t old_dr_prio;    if (!pim_ifp) { -    vty_outln (vty, "Please enable PIM on interface, first"); +    vty_out (vty, "Please enable PIM on interface, first\n");      return CMD_WARNING;    } @@ -4978,7 +4978,7 @@ DEFUN (interface_no_ip_pim_drprio,    struct pim_interface *pim_ifp = ifp->info;    if (!pim_ifp) { -    vty_outln (vty, "Pim not enabled on this interface"); +    vty_out (vty, "Pim not enabled on this interface\n");      return CMD_WARNING;    } @@ -5021,7 +5021,7 @@ DEFUN_HIDDEN (interface_ip_pim_ssm,    VTY_DECLVAR_CONTEXT(interface, ifp);    if (!pim_cmd_interface_add(ifp)) { -    vty_outln (vty, "Could not enable PIM SM on interface"); +    vty_out (vty, "Could not enable PIM SM on interface\n");      return CMD_WARNING;    } @@ -5039,7 +5039,7 @@ DEFUN (interface_ip_pim_sm,  {    VTY_DECLVAR_CONTEXT(interface, ifp);    if (!pim_cmd_interface_add(ifp)) { -    vty_outln (vty, "Could not enable PIM SM on interface"); +    vty_out (vty, "Could not enable PIM SM on interface\n");      return CMD_WARNING;    } @@ -5084,7 +5084,7 @@ DEFUN_HIDDEN (interface_no_ip_pim_ssm,  {    VTY_DECLVAR_CONTEXT(interface, ifp);    if (!pim_cmd_interface_delete(ifp)) { -    vty_outln (vty, "Unable to delete interface information"); +    vty_out (vty, "Unable to delete interface information\n");      return CMD_WARNING;    } @@ -5101,7 +5101,7 @@ DEFUN (interface_no_ip_pim_sm,  {    VTY_DECLVAR_CONTEXT(interface, ifp);    if (!pim_cmd_interface_delete(ifp)) { -    vty_outln (vty, "Unable to delete interface information"); +    vty_out (vty, "Unable to delete interface information\n");      return CMD_WARNING;    } @@ -5129,7 +5129,7 @@ DEFUN (interface_ip_mroute,     oifname = argv[idx_interface]->arg;     oif = if_lookup_by_name(oifname, VRF_DEFAULT);     if (!oif) { -     vty_outln (vty, "No such interface name %s", +     vty_out (vty, "No such interface name %s\n",          oifname);       return CMD_WARNING;     } @@ -5137,7 +5137,7 @@ DEFUN (interface_ip_mroute,     grp_str = argv[idx_ipv4]->arg;     result = inet_pton(AF_INET, grp_str, &grp_addr);     if (result <= 0) { -     vty_outln (vty, "Bad group address %s: errno=%d: %s", +     vty_out (vty, "Bad group address %s: errno=%d: %s\n",          grp_str, errno, safe_strerror(errno));       return CMD_WARNING;     } @@ -5145,7 +5145,7 @@ DEFUN (interface_ip_mroute,     src_addr.s_addr = INADDR_ANY;     if (pim_static_add(iif, oif, grp_addr, src_addr)) { -      vty_outln (vty, "Failed to add route"); +      vty_out (vty, "Failed to add route\n");        return CMD_WARNING;     } @@ -5176,7 +5176,7 @@ DEFUN (interface_ip_mroute_source,     oifname = argv[idx_interface]->arg;     oif = if_lookup_by_name(oifname, VRF_DEFAULT);     if (!oif) { -     vty_outln (vty, "No such interface name %s", +     vty_out (vty, "No such interface name %s\n",          oifname);       return CMD_WARNING;     } @@ -5184,7 +5184,7 @@ DEFUN (interface_ip_mroute_source,     grp_str = argv[idx_ipv4]->arg;     result = inet_pton(AF_INET, grp_str, &grp_addr);     if (result <= 0) { -     vty_outln (vty, "Bad group address %s: errno=%d: %s", +     vty_out (vty, "Bad group address %s: errno=%d: %s\n",          grp_str, errno, safe_strerror(errno));       return CMD_WARNING;     } @@ -5192,13 +5192,13 @@ DEFUN (interface_ip_mroute_source,     src_str = argv[idx_ipv4_2]->arg;     result = inet_pton(AF_INET, src_str, &src_addr);     if (result <= 0) { -     vty_outln (vty, "Bad source address %s: errno=%d: %s", +     vty_out (vty, "Bad source address %s: errno=%d: %s\n",          src_str, errno, safe_strerror(errno));       return CMD_WARNING;     }     if (pim_static_add(iif, oif, grp_addr, src_addr)) { -      vty_outln (vty, "Failed to add route"); +      vty_out (vty, "Failed to add route\n");        return CMD_WARNING;     } @@ -5227,7 +5227,7 @@ DEFUN (interface_no_ip_mroute,     oifname = argv[idx_interface]->arg;     oif = if_lookup_by_name(oifname, VRF_DEFAULT);     if (!oif) { -     vty_outln (vty, "No such interface name %s", +     vty_out (vty, "No such interface name %s\n",          oifname);       return CMD_WARNING;     } @@ -5235,7 +5235,7 @@ DEFUN (interface_no_ip_mroute,     grp_str = argv[idx_ipv4]->arg;     result = inet_pton(AF_INET, grp_str, &grp_addr);     if (result <= 0) { -     vty_outln (vty, "Bad group address %s: errno=%d: %s", +     vty_out (vty, "Bad group address %s: errno=%d: %s\n",          grp_str, errno, safe_strerror(errno));       return CMD_WARNING;     } @@ -5243,7 +5243,7 @@ DEFUN (interface_no_ip_mroute,     src_addr.s_addr = INADDR_ANY;     if (pim_static_del(iif, oif, grp_addr, src_addr)) { -      vty_outln (vty, "Failed to remove route"); +      vty_out (vty, "Failed to remove route\n");        return CMD_WARNING;     } @@ -5275,7 +5275,7 @@ DEFUN (interface_no_ip_mroute_source,     oifname = argv[idx_interface]->arg;     oif = if_lookup_by_name(oifname, VRF_DEFAULT);     if (!oif) { -     vty_outln (vty, "No such interface name %s", +     vty_out (vty, "No such interface name %s\n",          oifname);       return CMD_WARNING;     } @@ -5283,7 +5283,7 @@ DEFUN (interface_no_ip_mroute_source,     grp_str = argv[idx_ipv4]->arg;     result = inet_pton(AF_INET, grp_str, &grp_addr);     if (result <= 0) { -     vty_outln (vty, "Bad group address %s: errno=%d: %s", +     vty_out (vty, "Bad group address %s: errno=%d: %s\n",          grp_str, errno, safe_strerror(errno));       return CMD_WARNING;     } @@ -5291,13 +5291,13 @@ DEFUN (interface_no_ip_mroute_source,     src_str = argv[idx_ipv4_2]->arg;     result = inet_pton(AF_INET, src_str, &src_addr);     if (result <= 0) { -     vty_outln (vty, "Bad source address %s: errno=%d: %s", +     vty_out (vty, "Bad source address %s: errno=%d: %s\n",          src_str, errno, safe_strerror(errno));       return CMD_WARNING;     }     if (pim_static_del(iif, oif, grp_addr, src_addr)) { -      vty_outln (vty, "Failed to remove route"); +      vty_out (vty, "Failed to remove route\n");        return CMD_WARNING;     } @@ -5322,7 +5322,7 @@ DEFUN (interface_ip_pim_hello,      {        if (!pim_cmd_interface_add(ifp))          { -          vty_outln (vty, "Could not enable PIM SM on interface"); +          vty_out (vty, "Could not enable PIM SM on interface\n");            return CMD_WARNING;          }      } @@ -5352,7 +5352,7 @@ DEFUN (interface_no_ip_pim_hello,    struct pim_interface *pim_ifp = ifp->info;    if (!pim_ifp) { -    vty_outln (vty, "Pim not enabled on this interface"); +    vty_out (vty, "Pim not enabled on this interface\n");      return CMD_WARNING;    } @@ -5597,22 +5597,22 @@ DEFUN (debug_pim_packets,    if (argv_find (argv, argc, "hello", &idx))      {        PIM_DO_DEBUG_PIM_HELLO; -      vty_outln (vty, "PIM Hello debugging is on"); +      vty_out (vty, "PIM Hello debugging is on\n");      }    else if (argv_find (argv, argc ,"joins", &idx))      {        PIM_DO_DEBUG_PIM_J_P; -      vty_outln (vty, "PIM Join/Prune debugging is on"); +      vty_out (vty, "PIM Join/Prune debugging is on\n");      }    else if (argv_find (argv, argc, "register", &idx))      {        PIM_DO_DEBUG_PIM_REG; -      vty_outln (vty, "PIM Register debugging is on"); +      vty_out (vty, "PIM Register debugging is on\n");      }    else      {        PIM_DO_DEBUG_PIM_PACKETS; -      vty_outln (vty, "PIM Packet debugging is on "); +      vty_out (vty, "PIM Packet debugging is on \n");      }    return CMD_SUCCESS;  } @@ -5632,17 +5632,17 @@ DEFUN (no_debug_pim_packets,    if (argv_find (argv, argc,"hello",&idx))      {        PIM_DONT_DEBUG_PIM_HELLO; -      vty_outln (vty, "PIM Hello debugging is off "); +      vty_out (vty, "PIM Hello debugging is off \n");      }    else if (argv_find (argv, argc, "joins", &idx))      {        PIM_DONT_DEBUG_PIM_J_P; -      vty_outln (vty, "PIM Join/Prune debugging is off "); +      vty_out (vty, "PIM Join/Prune debugging is off \n");      }    else if (argv_find (argv, argc, "register", &idx))      {        PIM_DONT_DEBUG_PIM_REG; -      vty_outln (vty, "PIM Register debugging is off"); +      vty_out (vty, "PIM Register debugging is off\n");      }    else      PIM_DONT_DEBUG_PIM_PACKETS; @@ -5882,7 +5882,7 @@ interface_pim_use_src_cmd_worker(struct vty *vty, const char *source)    result = inet_pton(AF_INET, source, &source_addr);    if (result <= 0) { -    vty_outln (vty, "%% Bad source address %s: errno=%d: %s", +    vty_out (vty, "%% Bad source address %s: errno=%d: %s\n",          source, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -5892,13 +5892,13 @@ interface_pim_use_src_cmd_worker(struct vty *vty, const char *source)      case PIM_SUCCESS:        break;     case PIM_IFACE_NOT_FOUND: -      vty_outln (vty, "Pim not enabled on this interface"); +      vty_out (vty, "Pim not enabled on this interface\n");        break;      case PIM_UPDATE_SOURCE_DUP: -      vty_outln (vty, "%% Source already set to %s", source); +      vty_out (vty, "%% Source already set to %s\n", source);        break;      default: -      vty_outln (vty, "%% Source set failed"); +      vty_out (vty, "%% Source set failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6022,14 +6022,14 @@ ip_msdp_peer_cmd_worker (struct vty *vty, const char *peer, const char *local)    result = inet_pton(AF_INET, peer, &peer_addr);    if (result <= 0) { -    vty_outln (vty, "%% Bad peer address %s: errno=%d: %s", +    vty_out (vty, "%% Bad peer address %s: errno=%d: %s\n",          peer, errno, safe_strerror(errno));      return CMD_WARNING;    }    result = inet_pton(AF_INET, local, &local_addr);    if (result <= 0) { -    vty_outln (vty, "%% Bad source address %s: errno=%d: %s", +    vty_out (vty, "%% Bad source address %s: errno=%d: %s\n",          local, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -6039,16 +6039,16 @@ ip_msdp_peer_cmd_worker (struct vty *vty, const char *peer, const char *local)      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_OOM: -      vty_outln (vty, "%% Out of memory"); +      vty_out (vty, "%% Out of memory\n");        break;      case PIM_MSDP_ERR_PEER_EXISTS: -      vty_outln (vty, "%% Peer exists"); +      vty_out (vty, "%% Peer exists\n");        break;      case PIM_MSDP_ERR_MAX_MESH_GROUPS: -      vty_outln (vty, "%% Only one mesh-group allowed currently"); +      vty_out (vty, "%% Only one mesh-group allowed currently\n");        break;      default: -      vty_outln (vty, "%% peer add failed"); +      vty_out (vty, "%% peer add failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6075,7 +6075,7 @@ ip_no_msdp_peer_cmd_worker (struct vty *vty, const char *peer)    result = inet_pton(AF_INET, peer, &peer_addr);    if (result <= 0) { -    vty_outln (vty, "%% Bad peer address %s: errno=%d: %s", +    vty_out (vty, "%% Bad peer address %s: errno=%d: %s\n",          peer, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -6085,10 +6085,10 @@ ip_no_msdp_peer_cmd_worker (struct vty *vty, const char *peer)      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_NO_PEER: -      vty_outln (vty, "%% Peer does not exist"); +      vty_out (vty, "%% Peer does not exist\n");        break;      default: -      vty_outln (vty, "%% peer del failed"); +      vty_out (vty, "%% peer del failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6114,7 +6114,7 @@ ip_msdp_mesh_group_member_cmd_worker(struct vty *vty, const char *mg, const char    result = inet_pton(AF_INET, mbr, &mbr_ip);    if (result <= 0) { -    vty_outln (vty, "%% Bad member address %s: errno=%d: %s", +    vty_out (vty, "%% Bad member address %s: errno=%d: %s\n",          mbr, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -6124,16 +6124,16 @@ ip_msdp_mesh_group_member_cmd_worker(struct vty *vty, const char *mg, const char      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_OOM: -      vty_outln (vty, "%% Out of memory"); +      vty_out (vty, "%% Out of memory\n");        break;      case PIM_MSDP_ERR_MG_MBR_EXISTS: -      vty_outln (vty, "%% mesh-group member exists"); +      vty_out (vty, "%% mesh-group member exists\n");        break;      case PIM_MSDP_ERR_MAX_MESH_GROUPS: -      vty_outln (vty, "%% Only one mesh-group allowed currently"); +      vty_out (vty, "%% Only one mesh-group allowed currently\n");        break;      default: -      vty_outln (vty, "%% member add failed"); +      vty_out (vty, "%% member add failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6160,7 +6160,7 @@ ip_no_msdp_mesh_group_member_cmd_worker(struct vty *vty, const char *mg, const c    result = inet_pton(AF_INET, mbr, &mbr_ip);    if (result <= 0) { -    vty_outln (vty, "%% Bad member address %s: errno=%d: %s", +    vty_out (vty, "%% Bad member address %s: errno=%d: %s\n",          mbr, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -6170,13 +6170,13 @@ ip_no_msdp_mesh_group_member_cmd_worker(struct vty *vty, const char *mg, const c      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_NO_MG: -      vty_outln (vty, "%% mesh-group does not exist"); +      vty_out (vty, "%% mesh-group does not exist\n");        break;      case PIM_MSDP_ERR_NO_MG_MBR: -      vty_outln (vty, "%% mesh-group member does not exist"); +      vty_out (vty, "%% mesh-group member does not exist\n");        break;      default: -      vty_outln (vty, "%% mesh-group member del failed"); +      vty_out (vty, "%% mesh-group member del failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6203,7 +6203,7 @@ ip_msdp_mesh_group_source_cmd_worker(struct vty *vty, const char *mg, const char    result = inet_pton(AF_INET, src, &src_ip);    if (result <= 0) { -    vty_outln (vty, "%% Bad source address %s: errno=%d: %s", +    vty_out (vty, "%% Bad source address %s: errno=%d: %s\n",          src, errno, safe_strerror(errno));      return CMD_WARNING;    } @@ -6213,13 +6213,13 @@ ip_msdp_mesh_group_source_cmd_worker(struct vty *vty, const char *mg, const char      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_OOM: -      vty_outln (vty, "%% Out of memory"); +      vty_out (vty, "%% Out of memory\n");        break;      case PIM_MSDP_ERR_MAX_MESH_GROUPS: -      vty_outln (vty, "%% Only one mesh-group allowed currently"); +      vty_out (vty, "%% Only one mesh-group allowed currently\n");        break;      default: -      vty_outln (vty, "%% source add failed"); +      vty_out (vty, "%% source add failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6249,10 +6249,10 @@ ip_no_msdp_mesh_group_source_cmd_worker(struct vty *vty, const char *mg)      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_NO_MG: -      vty_outln (vty, "%% mesh-group does not exist"); +      vty_out (vty, "%% mesh-group does not exist\n");        break;      default: -      vty_outln (vty, "%% mesh-group source del failed"); +      vty_out (vty, "%% mesh-group source del failed\n");    }    return result?CMD_WARNING:CMD_SUCCESS; @@ -6268,10 +6268,10 @@ ip_no_msdp_mesh_group_cmd_worker(struct vty *vty, const char *mg)      case PIM_MSDP_ERR_NONE:        break;      case PIM_MSDP_ERR_NO_MG: -      vty_outln (vty, "%% mesh-group does not exist"); +      vty_out (vty, "%% mesh-group does not exist\n");        break;      default: -      vty_outln (vty, "%% mesh-group source del failed"); +      vty_out (vty, "%% mesh-group source del failed\n");    }    return result ? CMD_WARNING : CMD_SUCCESS; @@ -6299,7 +6299,7 @@ print_empty_json_obj(struct vty *vty)  {    json_object *json;    json = json_object_new_object(); -  vty_outln (vty, "%s", +  vty_out (vty, "%s\n",               json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));    json_object_free(json);  } @@ -6334,9 +6334,9 @@ ip_msdp_show_mesh_group(struct vty *vty, u_char uj)      json_object_string_add(json_mg_row, "name", mg->mesh_group_name);      json_object_string_add(json_mg_row, "source", src_str);    } else { -    vty_outln (vty, "Mesh group : %s", mg->mesh_group_name); -    vty_outln (vty, "  Source : %s", src_str); -    vty_outln (vty, "  Member                 State"); +    vty_out (vty, "Mesh group : %s\n", mg->mesh_group_name); +    vty_out (vty, "  Source : %s\n", src_str); +    vty_out (vty, "  Member                 State\n");    }    for (ALL_LIST_ELEMENTS_RO(mg->mbr_list, mbrnode, mbr)) { @@ -6357,14 +6357,14 @@ ip_msdp_show_mesh_group(struct vty *vty, u_char uj)        }        json_object_object_add(json_members, mbr_str, json_row);      } else { -      vty_outln (vty, "  %-15s  %11s", +      vty_out (vty, "  %-15s  %11s\n",            mbr_str, state_str);      }    }    if (uj) {      json_object_object_add(json, mg->mesh_group_name, json_mg_row); -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -6402,8 +6402,8 @@ ip_msdp_show_peers(struct vty *vty, u_char uj)    if (uj) {      json = json_object_new_object();    } else { -    vty_outln (vty, -              "Peer                       Local        State    Uptime   SaCnt"); +    vty_out (vty, +              "Peer                       Local        State    Uptime   SaCnt\n");    }    for (ALL_LIST_ELEMENTS_RO(msdp->peer_list, mpnode, mp)) { @@ -6425,14 +6425,14 @@ ip_msdp_show_peers(struct vty *vty, u_char uj)        json_object_int_add(json_row, "saCount", mp->sa_cnt);        json_object_object_add(json, peer_str, json_row);      } else { -      vty_outln (vty, "%-15s  %15s  %11s  %8s  %6d", +      vty_out (vty, "%-15s  %15s  %11s  %8s  %6d\n",            peer_str, local_str, state_str,            timebuf, mp->sa_cnt);      }    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -6496,31 +6496,31 @@ ip_msdp_show_peers_detail(struct vty *vty, const char *peer, u_char uj)        json_object_int_add(json_row, "saRcvd", mp->sa_rx_cnt);        json_object_object_add(json, peer_str, json_row);      } else { -      vty_outln (vty, "Peer : %s", peer_str); -      vty_outln (vty, "  Local               : %s", local_str); -      vty_outln (vty, "  Mesh Group          : %s", mp->mesh_group_name); -      vty_outln (vty, "  State               : %s", state_str); -      vty_outln (vty, "  Uptime              : %s", timebuf); - -      vty_outln (vty, "  Keepalive Timer     : %s", katimer); -      vty_outln (vty, "  Conn Retry Timer    : %s", crtimer); -      vty_outln (vty, "  Hold Timer          : %s", holdtimer); -      vty_outln (vty, "  Last Reset          : %s", mp->last_reset); -      vty_outln (vty, "  Conn Attempts       : %d", mp->conn_attempts); -      vty_outln (vty, "  Established Changes : %d", mp->est_flaps); -      vty_outln (vty, "  SA Count            : %d", mp->sa_cnt); -      vty_outln (vty, "  Statistics          :"); -      vty_outln (vty, "                       Sent       Rcvd"); -      vty_outln (vty, "    Keepalives : %10d %10d", +      vty_out (vty, "Peer : %s\n", peer_str); +      vty_out (vty, "  Local               : %s\n", local_str); +      vty_out (vty, "  Mesh Group          : %s\n", mp->mesh_group_name); +      vty_out (vty, "  State               : %s\n", state_str); +      vty_out (vty, "  Uptime              : %s\n", timebuf); + +      vty_out (vty, "  Keepalive Timer     : %s\n", katimer); +      vty_out (vty, "  Conn Retry Timer    : %s\n", crtimer); +      vty_out (vty, "  Hold Timer          : %s\n", holdtimer); +      vty_out (vty, "  Last Reset          : %s\n", mp->last_reset); +      vty_out (vty, "  Conn Attempts       : %d\n", mp->conn_attempts); +      vty_out (vty, "  Established Changes : %d\n", mp->est_flaps); +      vty_out (vty, "  SA Count            : %d\n", mp->sa_cnt); +      vty_out (vty, "  Statistics          :\n"); +      vty_out (vty, "                       Sent       Rcvd\n"); +      vty_out (vty, "    Keepalives : %10d %10d\n",            mp->ka_tx_cnt, mp->ka_rx_cnt); -      vty_outln (vty, "    SAs        : %10d %10d", +      vty_out (vty, "    SAs        : %10d %10d\n",            mp->sa_tx_cnt, mp->sa_rx_cnt);        vty_out (vty, VTYNL);      }    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -6568,8 +6568,8 @@ ip_msdp_show_sa(struct vty *vty, u_char uj)    if (uj) {      json = json_object_new_object();    } else { -    vty_outln (vty, -              "Source                     Group               RP  Local  SPT    Uptime"); +    vty_out (vty, +              "Source                     Group               RP  Local  SPT    Uptime\n");    }    for (ALL_LIST_ELEMENTS_RO(msdp->sa_list, sanode, sa)) { @@ -6610,14 +6610,14 @@ ip_msdp_show_sa(struct vty *vty, u_char uj)        json_object_string_add(json_row, "upTime", timebuf);        json_object_object_add(json_group, src_str, json_row);      } else { -      vty_outln (vty, "%-15s  %15s  %15s  %5c  %3c  %8s", +      vty_out (vty, "%-15s  %15s  %15s  %5c  %3c  %8s\n",            src_str, grp_str, rp_str, local_str[0], spt_str[0], timebuf);      }    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -6677,13 +6677,13 @@ ip_msdp_show_sa_entry_detail(struct pim_msdp_sa *sa, const char *src_str,      json_object_string_add(json_row, "stateTimer", statetimer);      json_object_object_add(json_group, src_str, json_row);    } else { -    vty_outln (vty, "SA : %s", sa->sg_str); -    vty_outln (vty, "  RP          : %s", rp_str); -    vty_outln (vty, "  Peer        : %s", peer_str); -    vty_outln (vty, "  Local       : %s", local_str); -    vty_outln (vty, "  SPT Setup   : %s", spt_str); -    vty_outln (vty, "  Uptime      : %s", timebuf); -    vty_outln (vty, "  State Timer : %s", statetimer); +    vty_out (vty, "SA : %s\n", sa->sg_str); +    vty_out (vty, "  RP          : %s\n", rp_str); +    vty_out (vty, "  Peer        : %s\n", peer_str); +    vty_out (vty, "  Local       : %s\n", local_str); +    vty_out (vty, "  SPT Setup   : %s\n", spt_str); +    vty_out (vty, "  Uptime      : %s\n", timebuf); +    vty_out (vty, "  State Timer : %s\n", statetimer);      vty_out (vty, VTYNL);    }  } @@ -6708,7 +6708,7 @@ ip_msdp_show_sa_detail(struct vty *vty, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -6752,7 +6752,7 @@ ip_msdp_show_sa_addr(struct vty *vty, const char *addr, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } @@ -6780,7 +6780,7 @@ ip_msdp_show_sa_sg(struct vty *vty, const char *src, const char *grp, u_char uj)    }    if (uj) { -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 71a2869818..170692e7f0 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -1533,14 +1533,14 @@ pim_msdp_config_write(struct vty *vty)    if (mg->src_ip.s_addr != INADDR_ANY) {      pim_inet4_dump("<src?>", mg->src_ip, src_str, sizeof(src_str)); -    vty_outln (vty, "ip msdp mesh-group %s source %s", +    vty_out (vty, "ip msdp mesh-group %s source %s\n",          mg->mesh_group_name, src_str);      ++count;    }    for (ALL_LIST_ELEMENTS_RO(mg->mbr_list, mbrnode, mbr)) {      pim_inet4_dump("<mbr?>", mbr->mbr_ip, mbr_str, sizeof(mbr_str)); -    vty_outln (vty, "ip msdp mesh-group %s member %s", +    vty_out (vty, "ip msdp mesh-group %s member %s\n",          mg->mesh_group_name, mbr_str);      ++count;    } diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 324541caa0..28300dbdff 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -821,11 +821,11 @@ pim_rp_config_write (struct vty *vty)          continue;        if (rp_info->plist) -        vty_outln (vty, "ip pim rp %s prefix-list %s", +        vty_out (vty, "ip pim rp %s prefix-list %s\n",                  inet_ntop(AF_INET, &rp_info->rp.rpf_addr.u.prefix4, rp_buffer, 32),                  rp_info->plist);        else -        vty_outln (vty, "ip pim rp %s %s", +        vty_out (vty, "ip pim rp %s %s\n",                  inet_ntop(AF_INET, &rp_info->rp.rpf_addr.u.prefix4, rp_buffer, 32),                  prefix2str(&rp_info->group, group_buffer, 32));        count++; @@ -878,8 +878,8 @@ pim_rp_show_information (struct vty *vty, u_char uj)    if (uj)      json = json_object_new_object();    else -    vty_outln (vty, -               "RP address       group/prefix-list   OIF         I am RP"); +    vty_out (vty, +               "RP address       group/prefix-list   OIF         I am RP\n");    for (ALL_LIST_ELEMENTS_RO (qpim_rp_list, node, rp_info))      { @@ -931,9 +931,9 @@ pim_rp_show_information (struct vty *vty, u_char uj)  		vty_out (vty, "%-10s  ", "(Unknown)");                if (rp_info->i_am_rp) -                vty_outln (vty, "yes"); +                vty_out (vty, "yes\n");                else -                vty_outln (vty, "no"); +                vty_out (vty, "no\n");              }            prev_rp_info = rp_info; @@ -944,7 +944,7 @@ pim_rp_show_information (struct vty *vty, u_char uj)      if (prev_rp_info && json_rp_rows)        json_object_object_add(json, inet_ntoa (prev_rp_info->rp.rpf_addr.u.prefix4), json_rp_rows); -    vty_outln (vty, "%s", +    vty_out (vty, "%s\n",                 json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));      json_object_free(json);    } diff --git a/pimd/pim_static.c b/pimd/pim_static.c index a35bb60f46..d373581fec 100644 --- a/pimd/pim_static.c +++ b/pimd/pim_static.c @@ -337,9 +337,9 @@ pim_static_write_mroute (struct vty *vty, struct interface *ifp)                {                  struct interface *oifp = pim_if_find_by_vif_index (i);                  if (sroute->source.s_addr == 0) -                  vty_outln (vty, " ip mroute %s %s", oifp->name, gbuf); +                  vty_out (vty, " ip mroute %s %s\n", oifp->name, gbuf);                  else -                  vty_outln (vty, " ip mroute %s %s %s", oifp->name, gbuf, +                  vty_out (vty, " ip mroute %s %s %s\n", oifp->name, gbuf,                               sbuf);                  count ++;                } diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index 5526881d2b..ccfd446969 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -46,97 +46,97 @@ pim_debug_config_write (struct vty *vty)    int writes = 0;    if (PIM_DEBUG_MSDP_EVENTS) { -    vty_outln (vty, "debug msdp events"); +    vty_out (vty, "debug msdp events\n");      ++writes;    }    if (PIM_DEBUG_MSDP_PACKETS) { -    vty_outln (vty, "debug msdp packets"); +    vty_out (vty, "debug msdp packets\n");      ++writes;    }    if (PIM_DEBUG_MSDP_INTERNAL) { -    vty_outln (vty, "debug msdp internal"); +    vty_out (vty, "debug msdp internal\n");      ++writes;    }    if (PIM_DEBUG_IGMP_EVENTS) { -    vty_outln (vty, "debug igmp events"); +    vty_out (vty, "debug igmp events\n");      ++writes;    }    if (PIM_DEBUG_IGMP_PACKETS) { -    vty_outln (vty, "debug igmp packets"); +    vty_out (vty, "debug igmp packets\n");      ++writes;    }    if (PIM_DEBUG_IGMP_TRACE) { -    vty_outln (vty, "debug igmp trace"); +    vty_out (vty, "debug igmp trace\n");      ++writes;    }    if (PIM_DEBUG_IGMP_TRACE_DETAIL) { -    vty_outln (vty, "debug igmp trace detail"); +    vty_out (vty, "debug igmp trace detail\n");      ++writes;    }    if (PIM_DEBUG_MROUTE) { -    vty_outln (vty, "debug mroute"); +    vty_out (vty, "debug mroute\n");      ++writes;    }    if (PIM_DEBUG_MROUTE_DETAIL) { -    vty_outln (vty, "debug mroute detail"); +    vty_out (vty, "debug mroute detail\n");      ++writes;    }    if (PIM_DEBUG_PIM_EVENTS) { -    vty_outln (vty, "debug pim events"); +    vty_out (vty, "debug pim events\n");      ++writes;    }    if (PIM_DEBUG_PIM_PACKETS) { -    vty_outln (vty, "debug pim packets"); +    vty_out (vty, "debug pim packets\n");      ++writes;    }    if (PIM_DEBUG_PIM_PACKETDUMP_SEND) { -    vty_outln (vty, "debug pim packet-dump send"); +    vty_out (vty, "debug pim packet-dump send\n");      ++writes;    }    if (PIM_DEBUG_PIM_PACKETDUMP_RECV) { -    vty_outln (vty, "debug pim packet-dump receive"); +    vty_out (vty, "debug pim packet-dump receive\n");      ++writes;    }    if (PIM_DEBUG_PIM_TRACE) { -    vty_outln (vty, "debug pim trace"); +    vty_out (vty, "debug pim trace\n");      ++writes;    }    if (PIM_DEBUG_PIM_TRACE_DETAIL) { -    vty_outln (vty, "debug pim trace detail"); +    vty_out (vty, "debug pim trace detail\n");      ++writes;    }    if (PIM_DEBUG_ZEBRA) { -    vty_outln (vty, "debug pim zebra"); +    vty_out (vty, "debug pim zebra\n");      ++writes;    }    if (PIM_DEBUG_SSMPINGD) { -    vty_outln (vty, "debug ssmpingd"); +    vty_out (vty, "debug ssmpingd\n");      ++writes;    }    if (PIM_DEBUG_PIM_HELLO) { -    vty_outln (vty, "debug pim packets hello"); +    vty_out (vty, "debug pim packets hello\n");      ++writes;    }    if (PIM_DEBUG_PIM_J_P) { -    vty_outln (vty, "debug pim packets joins"); +    vty_out (vty, "debug pim packets joins\n");      ++writes;    }    if (PIM_DEBUG_PIM_REG) { -    vty_outln (vty, "debug pim packets register"); +    vty_out (vty, "debug pim packets register\n");      ++writes;    }    if (PIM_DEBUG_STATIC) { -    vty_outln (vty, "debug pim static"); +    vty_out (vty, "debug pim static\n");      ++writes;    } @@ -152,7 +152,7 @@ int pim_global_config_write(struct vty *vty)    if (!pimg->send_v6_secondary)      { -      vty_outln (vty, "no ip pim send-v6-secondary"); +      vty_out (vty, "no ip pim send-v6-secondary\n");        ++writes;      } @@ -160,62 +160,62 @@ int pim_global_config_write(struct vty *vty)    if (qpim_register_suppress_time != PIM_REGISTER_SUPPRESSION_TIME_DEFAULT)      { -      vty_outln (vty, "ip pim register-suppress-time %d", +      vty_out (vty, "ip pim register-suppress-time %d\n",  	       qpim_register_suppress_time);        ++writes;      }    if (qpim_t_periodic != PIM_DEFAULT_T_PERIODIC)      { -      vty_outln (vty, "ip pim join-prune-interval %d", +      vty_out (vty, "ip pim join-prune-interval %d\n",  	       qpim_t_periodic);        ++writes;      }    if (qpim_keep_alive_time != PIM_KEEPALIVE_PERIOD)      { -      vty_outln (vty, "ip pim keep-alive-timer %d", +      vty_out (vty, "ip pim keep-alive-timer %d\n",                 qpim_keep_alive_time);        ++writes;      }    if (qpim_packet_process != PIM_DEFAULT_PACKET_PROCESS)      { -      vty_outln (vty, "ip pim packets %d", +      vty_out (vty, "ip pim packets %d\n",  	       qpim_packet_process);        ++writes;      }    if (ssm->plist_name)      { -      vty_outln (vty, "ip pim ssm prefix-list %s", +      vty_out (vty, "ip pim ssm prefix-list %s\n",                 ssm->plist_name);        ++writes;      }    if (pimg->spt.switchover == PIM_SPT_INFINITY)      {        if (pimg->spt.plist) -        vty_outln (vty, "ip pim spt-switchover infinity-and-beyond prefix-list %s", +        vty_out (vty, "ip pim spt-switchover infinity-and-beyond prefix-list %s\n",                   pimg->spt.plist);        else -        vty_outln (vty,"ip pim spt-switchover infinity-and-beyond"); +        vty_out (vty,"ip pim spt-switchover infinity-and-beyond\n");        ++writes;      }    if (qpim_ecmp_rebalance_enable)      { -      vty_outln (vty, "ip pim ecmp rebalance"); +      vty_out (vty, "ip pim ecmp rebalance\n");        ++writes;      }    else if (qpim_ecmp_enable)      { -      vty_outln (vty, "ip pim ecmp"); +      vty_out (vty, "ip pim ecmp\n");        ++writes;      }    if (qpim_ssmpingd_list) {      struct listnode *node;      struct ssmpingd_sock *ss; -    vty_outln (vty, "!"); +    vty_out (vty, "!\n");      ++writes;      for (ALL_LIST_ELEMENTS_RO(qpim_ssmpingd_list, node, ss)) {        char source_str[INET_ADDRSTRLEN];        pim_inet4_dump("<src?>", ss->source_addr, source_str, sizeof(source_str)); -      vty_outln (vty, "ip ssmpingd %s", source_str); +      vty_out (vty, "ip ssmpingd %s\n", source_str);        ++writes;      }    } @@ -232,20 +232,20 @@ int pim_interface_config_write(struct vty *vty)    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) {      /* IF name */ -    vty_outln (vty, "interface %s", ifp->name); +    vty_out (vty, "interface %s\n", ifp->name);      ++writes;      if (ifp->info) {        struct pim_interface *pim_ifp = ifp->info;        if (PIM_IF_TEST_PIM(pim_ifp->options)) { -	vty_outln (vty, " ip pim sm"); +	vty_out (vty, " ip pim sm\n");  	++writes;        }        /* IF ip pim drpriority */        if (pim_ifp->pim_dr_priority != PIM_DEFAULT_DR_PRIORITY) { -	vty_outln (vty, " ip pim drpriority %u",pim_ifp->pim_dr_priority); +	vty_out (vty, " ip pim drpriority %u\n",pim_ifp->pim_dr_priority);  	++writes;        } @@ -262,20 +262,20 @@ int pim_interface_config_write(struct vty *vty)          char src_str[INET_ADDRSTRLEN];          pim_inet4_dump("<src?>", pim_ifp->update_source, src_str,              sizeof(src_str)); -        vty_outln (vty, " ip pim use-source %s", src_str); +        vty_out (vty, " ip pim use-source %s\n", src_str);          ++writes;        }        /* IF ip igmp */        if (PIM_IF_TEST_IGMP(pim_ifp->options)) { -	vty_outln (vty, " ip igmp"); +	vty_out (vty, " ip igmp\n");  	++writes;        }        /* ip igmp version */        if (pim_ifp->igmp_version != IGMP_DEFAULT_VERSION)          { -          vty_outln (vty, " ip igmp version %d", +          vty_out (vty, " ip igmp version %d\n",                    pim_ifp->igmp_version);            ++writes;          } @@ -283,7 +283,7 @@ int pim_interface_config_write(struct vty *vty)        /* IF ip igmp query-interval */        if (pim_ifp->igmp_default_query_interval != IGMP_GENERAL_QUERY_INTERVAL)  	{ -	  vty_outln (vty, " ip igmp query-interval %d", +	  vty_out (vty, " ip igmp query-interval %d\n",  		  pim_ifp->igmp_default_query_interval);  	  ++writes;  	} @@ -291,7 +291,7 @@ int pim_interface_config_write(struct vty *vty)        /* IF ip igmp query-max-response-time */        if (pim_ifp->igmp_query_max_response_time_dsec != IGMP_QUERY_MAX_RESPONSE_TIME_DSEC)  	{ -	  vty_outln (vty, " ip igmp query-max-response-time %d", +	  vty_out (vty, " ip igmp query-max-response-time %d\n",  		  pim_ifp->igmp_query_max_response_time_dsec);  	  ++writes;  	} @@ -305,7 +305,7 @@ int pim_interface_config_write(struct vty *vty)  	  char source_str[INET_ADDRSTRLEN];  	  pim_inet4_dump("<grp?>", ij->group_addr, group_str, sizeof(group_str));            inet_ntop(AF_INET, &ij->source_addr, source_str, sizeof(source_str)); -	  vty_outln (vty, " ip igmp join %s %s", +	  vty_out (vty, " ip igmp join %s %s\n",  		  group_str,source_str);  	  ++writes;  	} @@ -313,7 +313,7 @@ int pim_interface_config_write(struct vty *vty)  	writes += pim_static_write_mroute (vty, ifp);      } -    vty_outln (vty, "!"); +    vty_out (vty, "!\n");      ++writes;      /* PIM BFD write */      pim_bfd_write_config (vty, ifp); diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 908c0a1f8b..b4fff97120 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -1151,11 +1151,11 @@ pim_zebra_zclient_update (struct vty *vty)    vty_out(vty, "Zclient update socket: ");    if (zclient) { -    vty_outln (vty, "%d failures=%d", zclient->sock, +    vty_out (vty, "%d failures=%d\n", zclient->sock,  	    zclient->fail);    }    else { -    vty_outln (vty, "<null zclient>"); +    vty_out (vty, "<null zclient>\n");    }  } diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index e7ffe0f4ad..f405a39c9d 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -439,11 +439,11 @@ pim_zlookup_show_ip_multicast (struct vty *vty)  {    vty_out(vty, "Zclient lookup socket: ");    if (zlookup) { -    vty_outln (vty, "%d failures=%d", zlookup->sock, +    vty_out (vty, "%d failures=%d\n", zlookup->sock,              zlookup->fail);    }    else { -    vty_outln (vty, "<null zclient>"); +    vty_out (vty, "<null zclient>\n");    }  } diff --git a/python/clidef.py b/python/clidef.py index 1bf3c24aa2..069d80fb70 100644 --- a/python/clidef.py +++ b/python/clidef.py @@ -142,7 +142,7 @@ $argdecls  			continue;  		_fail = 0;$argblocks  		if (_fail) -			vty_outln (vty, "%% invalid input for %s: %s", +			vty_out (vty, "%% invalid input for %s: %s\\n",  				   argv[_i]->varname, argv[_i]->arg);  		_failcnt += _fail;  	} diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 775fe3879e..a88837d906 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -34,28 +34,28 @@ DEFUN (show_debugging_rip,         DEBUG_STR         RIP_STR)  { -  vty_outln (vty, "RIP debugging status:"); +  vty_out (vty, "RIP debugging status:\n");    if (IS_RIP_DEBUG_EVENT) -    vty_outln (vty, "  RIP event debugging is on"); +    vty_out (vty, "  RIP event debugging is on\n");    if (IS_RIP_DEBUG_PACKET)      {        if (IS_RIP_DEBUG_SEND && IS_RIP_DEBUG_RECV)  	{ -	  vty_outln (vty,"  RIP packet debugging is on"); +	  vty_out (vty,"  RIP packet debugging is on\n");  	}        else  	{  	  if (IS_RIP_DEBUG_SEND) -	    vty_outln (vty,"  RIP packet send debugging is on"); +	    vty_out (vty,"  RIP packet send debugging is on\n");  	  else -	    vty_outln (vty,"  RIP packet receive debugging is on"); +	    vty_out (vty,"  RIP packet receive debugging is on\n");  	}      }    if (IS_RIP_DEBUG_ZEBRA) -    vty_outln (vty, "  RIP zebra debugging is on"); +    vty_out (vty, "  RIP zebra debugging is on\n");    return CMD_SUCCESS;  } @@ -192,28 +192,28 @@ config_write_debug (struct vty *vty)    if (IS_RIP_DEBUG_EVENT)      { -      vty_outln (vty, "debug rip events"); +      vty_out (vty, "debug rip events\n");        write++;      }    if (IS_RIP_DEBUG_PACKET)      {        if (IS_RIP_DEBUG_SEND && IS_RIP_DEBUG_RECV)  	{ -	  vty_outln (vty,"debug rip packet"); +	  vty_out (vty,"debug rip packet\n");  	  write++;  	}        else  	{  	  if (IS_RIP_DEBUG_SEND) -	    vty_outln (vty,"debug rip packet send"); +	    vty_out (vty,"debug rip packet send\n");  	  else -	    vty_outln (vty,"debug rip packet recv"); +	    vty_out (vty,"debug rip packet recv\n");  	  write++;  	}      }    if (IS_RIP_DEBUG_ZEBRA)      { -      vty_outln (vty, "debug rip zebra"); +      vty_out (vty, "debug rip zebra\n");        write++;      }    return write; diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 4ce1b9b655..d713fe6fe4 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1233,7 +1233,7 @@ DEFUN (rip_network,    if (ret < 0)      { -      vty_outln (vty, "There is a same network configuration %s", +      vty_out (vty, "There is a same network configuration %s\n",                   argv[idx_ipv4_word]->arg);        return CMD_WARNING;      } @@ -1263,7 +1263,7 @@ DEFUN (no_rip_network,    if (ret < 0)      { -      vty_outln (vty, "Can't find network configuration %s", +      vty_out (vty, "Can't find network configuration %s\n",                   argv[idx_ipv4_word]->arg);        return CMD_WARNING;      } @@ -1286,7 +1286,7 @@ DEFUN (rip_neighbor,    if (ret <= 0)      { -      vty_outln (vty, "Please specify address by A.B.C.D"); +      vty_out (vty, "Please specify address by A.B.C.D\n");        return CMD_WARNING;      } @@ -1311,7 +1311,7 @@ DEFUN (no_rip_neighbor,    if (ret <= 0)      { -      vty_outln (vty, "Please specify address by A.B.C.D"); +      vty_out (vty, "Please specify address by A.B.C.D\n");        return CMD_WARNING;      } @@ -1534,7 +1534,7 @@ DEFUN (ip_rip_authentication_mode,    {      if (auth_type != RIP_AUTH_MD5)      { -      vty_outln (vty, "auth length argument only valid for md5"); +      vty_out (vty, "auth length argument only valid for md5\n");        return CMD_WARNING;      }      if (strmatch ("rfc", authlen)) @@ -1591,14 +1591,14 @@ DEFUN (ip_rip_authentication_string,    if (strlen (argv[idx_line]->arg) > 16)      { -      vty_outln (vty, -                 "%% RIPv2 authentication string must be shorter than 16"); +      vty_out (vty, +                 "%% RIPv2 authentication string must be shorter than 16\n");        return CMD_WARNING;      }    if (ri->key_chain)      { -      vty_outln (vty, "%% key-chain configuration exists"); +      vty_out (vty, "%% key-chain configuration exists\n");        return CMD_WARNING;      } @@ -1651,7 +1651,7 @@ DEFUN (ip_rip_authentication_key_chain,    if (ri->auth_str)      { -      vty_outln (vty,"%% authentication string configuration exists"); +      vty_out (vty,"%% authentication string configuration exists\n");        return CMD_WARNING;      } @@ -1837,43 +1837,43 @@ rip_interface_config_write (struct vty *vty)            (!ri->key_chain)                                 )          continue; -      vty_outln (vty, "interface %s",ifp->name); +      vty_out (vty, "interface %s\n",ifp->name);        if (ifp->desc) -	vty_outln (vty, " description %s",ifp->desc); +	vty_out (vty, " description %s\n",ifp->desc);        /* Split horizon. */        if (ri->split_horizon != ri->split_horizon_default)  	{            switch (ri->split_horizon) {            case RIP_SPLIT_HORIZON: -            vty_outln (vty, " ip rip split-horizon"); +            vty_out (vty, " ip rip split-horizon\n");              break;            case RIP_SPLIT_HORIZON_POISONED_REVERSE: -            vty_outln (vty," ip rip split-horizon poisoned-reverse"); +            vty_out (vty," ip rip split-horizon poisoned-reverse\n");              break;            case RIP_NO_SPLIT_HORIZON:            default: -            vty_outln (vty, " no ip rip split-horizon"); +            vty_out (vty, " no ip rip split-horizon\n");              break;            }  	}        /* RIP version setting. */        if (ri->ri_send != RI_RIP_UNSPEC) -	vty_outln (vty, " ip rip send version %s", +	vty_out (vty, " ip rip send version %s\n",  		   lookup_msg(ri_version_msg, ri->ri_send, NULL));        if (ri->ri_receive != RI_RIP_UNSPEC) -	vty_outln (vty, " ip rip receive version %s ", +	vty_out (vty, " ip rip receive version %s \n",  		   lookup_msg(ri_version_msg, ri->ri_receive, NULL));        if (ri->v2_broadcast) -	vty_outln (vty, " ip rip v2-broadcast"); +	vty_out (vty, " ip rip v2-broadcast\n");        /* RIP authentication. */        if (ri->auth_type == RIP_AUTH_SIMPLE_PASSWORD) -	vty_outln (vty, " ip rip authentication mode text"); +	vty_out (vty, " ip rip authentication mode text\n");        if (ri->auth_type == RIP_AUTH_MD5)          { @@ -1886,14 +1886,14 @@ rip_interface_config_write (struct vty *vty)          }        if (ri->auth_str) -	vty_outln (vty, " ip rip authentication string %s", +	vty_out (vty, " ip rip authentication string %s\n",  		 ri->auth_str);        if (ri->key_chain) -	vty_outln (vty, " ip rip authentication key-chain %s", +	vty_out (vty, " ip rip authentication key-chain %s\n",  		 ri->key_chain); -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      }    return 0;  } @@ -1908,7 +1908,7 @@ config_write_rip_network (struct vty *vty, int config_mode)    /* Network type RIP enable interface statement. */    for (node = route_top (rip_enable_network); node; node = route_next (node))      if (node->info) -      vty_outln (vty, "%s%s/%d",  +      vty_out (vty, "%s%s/%d\n",   	       config_mode ? " network " : "    ",  	       inet_ntoa (node->p.u.prefix4),  	       node->p.prefixlen); @@ -1916,24 +1916,24 @@ config_write_rip_network (struct vty *vty, int config_mode)    /* Interface name RIP enable statement. */    for (i = 0; i < vector_active (rip_enable_interface); i++)      if ((ifname = vector_slot (rip_enable_interface, i)) != NULL) -      vty_outln (vty, "%s%s", +      vty_out (vty, "%s%s\n",  	       config_mode ? " network " : "    ",  	       ifname);    /* RIP neighbors listing. */    for (node = route_top (rip->neighbor); node; node = route_next (node))      if (node->info) -      vty_outln (vty, "%s%s",  +      vty_out (vty, "%s%s\n",   	       config_mode ? " neighbor " : "    ",  	       inet_ntoa(node->p.u.prefix4));    /* RIP passive interface listing. */    if (config_mode) {      if (passive_default) -      vty_outln (vty, " passive-interface default"); +      vty_out (vty, " passive-interface default\n");      for (i = 0; i < vector_active (Vrip_passive_nondefault); i++)        if ((ifname = vector_slot (Vrip_passive_nondefault, i)) != NULL) -	vty_outln (vty, " %spassive-interface %s", +	vty_out (vty, " %spassive-interface %s\n",  		 (passive_default ? "no " : ""), ifname);    } diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c index c047bb7768..97b405607e 100644 --- a/ripd/rip_offset.c +++ b/ripd/rip_offset.c @@ -117,7 +117,7 @@ rip_offset_list_set (struct vty *vty, const char *alist, const char *direct_str,      direct = RIP_OFFSET_LIST_OUT;    else      { -      vty_outln (vty, "Invalid direction: %s", direct_str); +      vty_out (vty, "Invalid direction: %s\n", direct_str);        return CMD_WARNING;      } @@ -125,7 +125,7 @@ rip_offset_list_set (struct vty *vty, const char *alist, const char *direct_str,    metric = atoi (metric_str);    if (metric < 0 || metric > 16)      { -      vty_outln (vty, "Invalid metric: %s", metric_str); +      vty_out (vty, "Invalid metric: %s\n", metric_str);        return CMD_WARNING;      } @@ -156,7 +156,7 @@ rip_offset_list_unset (struct vty *vty, const char *alist,      direct = RIP_OFFSET_LIST_OUT;    else      { -      vty_outln (vty, "Invalid direction: %s", direct_str); +      vty_out (vty, "Invalid direction: %s\n", direct_str);        return CMD_WARNING;      } @@ -164,7 +164,7 @@ rip_offset_list_unset (struct vty *vty, const char *alist,    metric = atoi (metric_str);    if (metric < 0 || metric > 16)      { -      vty_outln (vty, "Invalid metric: %s", metric_str); +      vty_out (vty, "Invalid metric: %s\n", metric_str);        return CMD_WARNING;      } @@ -188,7 +188,7 @@ rip_offset_list_unset (struct vty *vty, const char *alist,      }    else      { -      vty_outln (vty, "Can't find offset-list"); +      vty_out (vty, "Can't find offset-list\n");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -397,23 +397,23 @@ config_write_rip_offset_list (struct vty *vty)        if (! offset->ifname)  	{  	  if (offset->direct[RIP_OFFSET_LIST_IN].alist_name) -	    vty_outln (vty, " offset-list %s in %d", +	    vty_out (vty, " offset-list %s in %d\n",  		     offset->direct[RIP_OFFSET_LIST_IN].alist_name,  		     offset->direct[RIP_OFFSET_LIST_IN].metric);  	  if (offset->direct[RIP_OFFSET_LIST_OUT].alist_name) -	    vty_outln (vty, " offset-list %s out %d", +	    vty_out (vty, " offset-list %s out %d\n",  		     offset->direct[RIP_OFFSET_LIST_OUT].alist_name,  		     offset->direct[RIP_OFFSET_LIST_OUT].metric);  	}        else  	{  	  if (offset->direct[RIP_OFFSET_LIST_IN].alist_name) -	    vty_outln (vty, " offset-list %s in %d %s", +	    vty_out (vty, " offset-list %s in %d %s\n",  		     offset->direct[RIP_OFFSET_LIST_IN].alist_name,  		     offset->direct[RIP_OFFSET_LIST_IN].metric,  		     offset->ifname);  	  if (offset->direct[RIP_OFFSET_LIST_OUT].alist_name) -	    vty_outln (vty, " offset-list %s out %d %s", +	    vty_out (vty, " offset-list %s out %d %s\n",  		     offset->direct[RIP_OFFSET_LIST_OUT].alist_name,  		     offset->direct[RIP_OFFSET_LIST_OUT].metric,  		     offset->ifname); diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c index 636aa80a9a..7f494a0981 100644 --- a/ripd/rip_peer.c +++ b/ripd/rip_peer.c @@ -185,7 +185,7 @@ rip_peer_display (struct vty *vty)    for (ALL_LIST_ELEMENTS (peer_list, node, nnode, peer))      { -      vty_outln (vty, "    %-16s %9d %9d %9d   %s", inet_ntoa (peer->addr), +      vty_out (vty, "    %-16s %9d %9d %9d   %s\n", inet_ntoa (peer->addr),  	       peer->recv_badpackets, peer->recv_badroutes,  	       ZEBRA_RIP_DISTANCE_DEFAULT,  	       rip_peer_uptime(peer, timebuf, RIP_UPTIME_LEN)); diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 31204872ac..c7923df4a1 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -347,7 +347,7 @@ DEFUN (rip_redistribute_type,  	}      } -  vty_outln (vty, "Invalid type %s",argv[1]->arg); +  vty_out (vty, "Invalid type %s\n",argv[1]->arg);    return CMD_WARNING;  } @@ -373,7 +373,7 @@ DEFUN (no_rip_redistribute_type,          }      } -  vty_outln (vty, "Invalid type %s",argv[2]->arg); +  vty_out (vty, "Invalid type %s\n",argv[2]->arg);    return CMD_WARNING;  } @@ -400,7 +400,7 @@ DEFUN (rip_redistribute_type_routemap,        }    } -  vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +  vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);    return CMD_WARNING;  } @@ -428,7 +428,7 @@ DEFUN (no_rip_redistribute_type_routemap,        }    } -  vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +  vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);    return CMD_WARNING;  } @@ -458,7 +458,7 @@ DEFUN (rip_redistribute_type_metric,        }    } -  vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +  vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);    return CMD_WARNING;  } @@ -486,7 +486,7 @@ DEFUN (no_rip_redistribute_type_metric,        }    } -  vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +  vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);    return CMD_WARNING;  } @@ -520,7 +520,7 @@ DEFUN (rip_redistribute_type_metric_routemap,        }    } -  vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +  vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);    return CMD_WARNING;  } @@ -557,7 +557,7 @@ DEFUN (no_rip_redistribute_type_metric_routemap,        }      } -  vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +  vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);    return CMD_WARNING;  } @@ -614,13 +614,13 @@ config_write_zebra (struct vty *vty)  {    if (! zclient->enable)      { -      vty_outln (vty, "no router zebra"); +      vty_out (vty, "no router zebra\n");        return 1;      }    else if (! vrf_bitmap_check (zclient->redist[AFI_IP][ZEBRA_ROUTE_RIP], VRF_DEFAULT))      { -      vty_outln (vty, "router zebra"); -      vty_outln (vty, " no redistribute rip"); +      vty_out (vty, "router zebra\n"); +      vty_out (vty, " no redistribute rip\n");        return 1;      }    return 0; @@ -640,20 +640,20 @@ config_write_rip_redistribute (struct vty *vty, int config_mode)  	    if (rip->route_map[i].metric_config)  	      {  		if (rip->route_map[i].name) -		  vty_outln (vty, " redistribute %s metric %d route-map %s", +		  vty_out (vty, " redistribute %s metric %d route-map %s\n",  			   zebra_route_string(i), rip->route_map[i].metric,  			   rip->route_map[i].name);  		else -		  vty_outln (vty, " redistribute %s metric %d", +		  vty_out (vty, " redistribute %s metric %d\n",  			   zebra_route_string(i),rip->route_map[i].metric);  	      }  	    else  	      {  		if (rip->route_map[i].name) -		  vty_outln (vty, " redistribute %s route-map %s", +		  vty_out (vty, " redistribute %s route-map %s\n",  			   zebra_route_string(i),rip->route_map[i].name);  		else -		  vty_outln (vty, " redistribute %s",zebra_route_string(i)); +		  vty_out (vty, " redistribute %s\n",zebra_route_string(i));  	      }  	  }  	else diff --git a/ripd/ripd.c b/ripd/ripd.c index c07831fdd5..3ee259baa8 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2847,7 +2847,7 @@ DEFUN (rip_version,    version = atoi (argv[idx_number]->arg);    if (version != RIPv1 && version != RIPv2)      { -      vty_outln (vty, "invalid rip version %d",version); +      vty_out (vty, "invalid rip version %d\n",version);        return CMD_WARNING;      }    rip->version_send = version; @@ -2885,7 +2885,7 @@ DEFUN (rip_route,    ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p);    if (ret < 0)      { -      vty_outln (vty, "Malformed address"); +      vty_out (vty, "Malformed address\n");        return CMD_WARNING;      }    apply_mask_ipv4 (&p); @@ -2895,7 +2895,7 @@ DEFUN (rip_route,    if (node->info)      { -      vty_outln (vty, "There is already same static route."); +      vty_out (vty, "There is already same static route.\n");        route_unlock_node (node);        return CMD_WARNING;      } @@ -2922,7 +2922,7 @@ DEFUN (no_rip_route,    ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p);    if (ret < 0)      { -      vty_outln (vty, "Malformed address"); +      vty_out (vty, "Malformed address\n");        return CMD_WARNING;      }    apply_mask_ipv4 (&p); @@ -2931,7 +2931,7 @@ DEFUN (no_rip_route,    node = route_node_lookup (rip->route, (struct prefix *) &p);    if (! node)      { -      vty_outln (vty, "Can't find route %s.",argv[idx_ipv4_prefixlen]->arg); +      vty_out (vty, "Can't find route %s.\n",argv[idx_ipv4_prefixlen]->arg);        return CMD_WARNING;      } @@ -3014,21 +3014,21 @@ DEFUN (rip_timers,    update = strtoul (argv[idx_number]->arg, &endptr, 10);    if (update > RIP_TIMER_MAX || update < RIP_TIMER_MIN || *endptr != '\0')        { -      vty_outln (vty, "update timer value error"); +      vty_out (vty, "update timer value error\n");        return CMD_WARNING;      }    timeout = strtoul (argv[idx_number_2]->arg, &endptr, 10);    if (timeout > RIP_TIMER_MAX || timeout < RIP_TIMER_MIN || *endptr != '\0')       { -      vty_outln (vty, "timeout timer value error"); +      vty_out (vty, "timeout timer value error\n");        return CMD_WARNING;      }    garbage = strtoul (argv[idx_number_3]->arg, &endptr, 10);    if (garbage > RIP_TIMER_MAX || garbage < RIP_TIMER_MIN || *endptr != '\0')       { -      vty_outln (vty, "garbage timer value error"); +      vty_out (vty, "garbage timer value error\n");        return CMD_WARNING;      } @@ -3102,7 +3102,7 @@ rip_distance_set (struct vty *vty, const char *distance_str, const char *ip_str,    ret = str2prefix_ipv4 (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      } @@ -3148,14 +3148,14 @@ rip_distance_unset (struct vty *vty, const char *distance_str,    ret = str2prefix_ipv4 (ip_str, &p);    if (ret == 0)      { -      vty_outln (vty, "Malformed prefix"); +      vty_out (vty, "Malformed prefix\n");        return CMD_WARNING;      }    rn = route_node_lookup (rip_distance_table, (struct prefix *)&p);    if (! rn)      { -      vty_outln (vty, "Can't find specified prefix"); +      vty_out (vty, "Can't find specified prefix\n");        return CMD_WARNING;      } @@ -3241,7 +3241,7 @@ rip_distance_show (struct vty *vty)    int header = 1;    char buf[BUFSIZ]; -  vty_outln (vty, "  Distance: (default is %d)", +  vty_out (vty, "  Distance: (default is %d)\n",  	   rip->distance ? rip->distance : ZEBRA_RIP_DISTANCE_DEFAULT);    for (rn = route_top (rip_distance_table); rn; rn = route_next (rn)) @@ -3249,11 +3249,11 @@ rip_distance_show (struct vty *vty)        {  	if (header)  	  { -	    vty_outln (vty,"    Address           Distance  List"); +	    vty_out (vty,"    Address           Distance  List\n");  	    header = 0;  	  }  	sprintf (buf, "%s/%d", inet_ntoa (rn->p.u.prefix4), rn->p.prefixlen); -	vty_outln (vty, "    %-20s  %4d  %s", +	vty_out (vty, "    %-20s  %4d  %s\n",  		 buf, rdistance->distance,  		 rdistance->access_list ? rdistance->access_list : "");        } @@ -3386,7 +3386,7 @@ DEFUN (rip_allow_ecmp,  {    if (rip->ecmp)      { -      vty_outln (vty, "ECMP is already enabled."); +      vty_out (vty, "ECMP is already enabled.\n");        return CMD_WARNING;      } @@ -3403,7 +3403,7 @@ DEFUN (no_rip_allow_ecmp,  {    if (!rip->ecmp)      { -      vty_outln (vty, "ECMP is already disabled."); +      vty_out (vty, "ECMP is already disabled.\n");        return CMD_WARNING;      } @@ -3561,16 +3561,16 @@ DEFUN (show_ip_rip_status,    vty_outln (vty, "Routing Protocol is \"rip\"");    vty_out (vty, "  Sending updates every %ld seconds with +/-50%%,",  	   rip->update_time); -  vty_outln (vty, " next due in %lu seconds",  +  vty_out (vty, " next due in %lu seconds\n",   	   thread_timer_remain_second(rip->t_update));    vty_out (vty, "  Timeout after %ld seconds,", rip->timeout_time); -  vty_outln (vty, " garbage collect after %ld seconds",rip->garbage_time); +  vty_out (vty, " garbage collect after %ld seconds\n",rip->garbage_time);    /* Filtering status show. */    config_show_distribute (vty);    /* Default metric information. */ -  vty_outln (vty, "  Default redistribution metric is %d", +  vty_out (vty, "  Default redistribution metric is %d\n",  	   rip->default_metric);    /* Redistribute information. */ @@ -3581,12 +3581,12 @@ DEFUN (show_ip_rip_status,    vty_out (vty, "  Default version control: send version %s,",  	   lookup_msg(ri_version_msg,rip->version_send, NULL));    if (rip->version_recv == RI_RIP_VERSION_1_AND_2) -    vty_outln (vty, " receive any version "); +    vty_out (vty, " receive any version \n");    else -    vty_outln (vty, " receive version %s ", +    vty_out (vty, " receive version %s \n",  	       lookup_msg(ri_version_msg,rip->version_recv, NULL)); -  vty_outln (vty, "    Interface        Send  Recv   Key-chain"); +  vty_out (vty, "    Interface        Send  Recv   Key-chain\n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp))      { @@ -3607,14 +3607,14 @@ DEFUN (show_ip_rip_status,  	  else  	    receive_version = lookup_msg(ri_version_msg, ri->ri_receive, NULL); -	  vty_outln (vty, "    %-17s%-3s   %-3s    %s", ifp->name, +	  vty_out (vty, "    %-17s%-3s   %-3s    %s\n", ifp->name,  		   send_version,  		   receive_version,  		   ri->key_chain ? ri->key_chain : "");  	}      } -  vty_outln (vty, "  Routing for Networks:"); +  vty_out (vty, "  Routing for Networks:\n");    config_write_rip_network (vty, 0);      { @@ -3627,17 +3627,17 @@ DEFUN (show_ip_rip_status,  	  {  	    if (!found_passive)  	      { -		vty_outln (vty, "  Passive Interface(s):"); +		vty_out (vty, "  Passive Interface(s):\n");  		found_passive = 1;  	      } -	    vty_outln (vty, "    %s", ifp->name); +	    vty_out (vty, "    %s\n", ifp->name);  	  }        }    } -  vty_outln (vty, "  Routing Information Sources:"); -  vty_outln (vty, -             "    Gateway          BadPackets BadRoutes  Distance Last Update"); +  vty_out (vty, "  Routing Information Sources:\n"); +  vty_out (vty, +             "    Gateway          BadPackets BadRoutes  Distance Last Update\n");    rip_peer_display (vty);    rip_distance_show (vty); @@ -3656,19 +3656,19 @@ config_write_rip (struct vty *vty)    if (rip)      {        /* Router RIP statement. */ -      vty_outln (vty, "router rip"); +      vty_out (vty, "router rip\n");        write++;        /* RIP version statement.  Default is RIP version 2. */        if (rip->version_send != RI_RIP_VERSION_2  	  || rip->version_recv != RI_RIP_VERSION_1_AND_2) -	vty_outln (vty, " version %d",rip->version_send); +	vty_out (vty, " version %d\n",rip->version_send);        /* RIP timer configuration. */        if (rip->update_time != RIP_UPDATE_TIMER_DEFAULT   	  || rip->timeout_time != RIP_TIMEOUT_TIMER_DEFAULT   	  || rip->garbage_time != RIP_GARBAGE_TIMER_DEFAULT) -	vty_outln (vty, " timers basic %lu %lu %lu", +	vty_out (vty, " timers basic %lu %lu %lu\n",  		 rip->update_time,  		 rip->timeout_time,  		 rip->garbage_time); @@ -3677,10 +3677,10 @@ config_write_rip (struct vty *vty)        if (rip->default_information)  	{  	  if (rip->default_information_route_map) -	    vty_outln (vty, " default-information originate route-map %s", +	    vty_out (vty, " default-information originate route-map %s\n",  		     rip->default_information_route_map);  	  else -	    vty_outln (vty," default-information originate"); +	    vty_out (vty," default-information originate\n");  	}        /* Redistribute configuration. */ @@ -3694,7 +3694,7 @@ config_write_rip (struct vty *vty)        /* RIP default metric configuration */        if (rip->default_metric != RIP_DEFAULT_METRIC_DEFAULT) -        vty_outln (vty, " default-metric %d", +        vty_out (vty, " default-metric %d\n",  		 rip->default_metric);        /* Distribute configuration. */ @@ -3705,23 +3705,23 @@ config_write_rip (struct vty *vty)        /* Distance configuration. */        if (rip->distance) -	vty_outln (vty, " distance %d", rip->distance); +	vty_out (vty, " distance %d\n", rip->distance);        /* RIP source IP prefix distance configuration. */        for (rn = route_top (rip_distance_table); rn; rn = route_next (rn))  	if ((rdistance = rn->info) != NULL) -	  vty_outln (vty, " distance %d %s/%d %s", rdistance->distance, +	  vty_out (vty, " distance %d %s/%d %s\n", rdistance->distance,  		   inet_ntoa (rn->p.u.prefix4), rn->p.prefixlen,  		   rdistance->access_list ? rdistance->access_list : "");        /* ECMP configuration. */        if (rip->ecmp) -        vty_outln (vty, " allow-ecmp"); +        vty_out (vty, " allow-ecmp\n");        /* RIP static route configuration. */        for (rn = route_top (rip->route); rn; rn = route_next (rn))  	if (rn->info) -	  vty_outln (vty, " route %s/%d",  +	  vty_out (vty, " route %s/%d\n",   		   inet_ntoa (rn->p.u.prefix4),  		   rn->p.prefixlen); diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index 9ba0e10e46..f08265600c 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -35,28 +35,28 @@ DEFUN (show_debugging_ripng,         DEBUG_STR         "RIPng configuration\n")  { -  vty_outln (vty, "RIPng debugging status:"); +  vty_out (vty, "RIPng debugging status:\n");    if (IS_RIPNG_DEBUG_EVENT) -    vty_outln (vty, "  RIPng event debugging is on"); +    vty_out (vty, "  RIPng event debugging is on\n");    if (IS_RIPNG_DEBUG_PACKET)      {        if (IS_RIPNG_DEBUG_SEND && IS_RIPNG_DEBUG_RECV)  	{ -	  vty_outln (vty,"  RIPng packet debugging is on"); +	  vty_out (vty,"  RIPng packet debugging is on\n");  	}        else  	{  	  if (IS_RIPNG_DEBUG_SEND) -	    vty_outln (vty,"  RIPng packet send debugging is on"); +	    vty_out (vty,"  RIPng packet send debugging is on\n");  	  else -	    vty_outln (vty,"  RIPng packet receive debugging is on"); +	    vty_out (vty,"  RIPng packet receive debugging is on\n");  	}      }    if (IS_RIPNG_DEBUG_ZEBRA) -    vty_outln (vty, "  RIPng zebra debugging is on"); +    vty_out (vty, "  RIPng zebra debugging is on\n");    return CMD_SUCCESS;  } @@ -194,28 +194,28 @@ config_write_debug (struct vty *vty)    if (IS_RIPNG_DEBUG_EVENT)      { -      vty_outln (vty, "debug ripng events"); +      vty_out (vty, "debug ripng events\n");        write++;      }    if (IS_RIPNG_DEBUG_PACKET)      {        if (IS_RIPNG_DEBUG_SEND && IS_RIPNG_DEBUG_RECV)  	{ -	  vty_outln (vty,"debug ripng packet"); +	  vty_out (vty,"debug ripng packet\n");  	  write++;  	}        else  	{  	  if (IS_RIPNG_DEBUG_SEND) -	    vty_outln (vty,"debug ripng packet send"); +	    vty_out (vty,"debug ripng packet send\n");  	  else -	    vty_outln (vty,"debug ripng packet recv"); +	    vty_out (vty,"debug ripng packet recv\n");  	  write++;  	}      }    if (IS_RIPNG_DEBUG_ZEBRA)      { -      vty_outln (vty, "debug ripng zebra"); +      vty_out (vty, "debug ripng zebra\n");        write++;      }    return write; diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index d739540c2d..2abf2f9a9f 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -916,7 +916,7 @@ ripng_network_write (struct vty *vty, int config_mode)      if (node->info)        {  	struct prefix *p = &node->p; -	vty_outln (vty, "%s%s/%d",  +	vty_out (vty, "%s%s/%d\n",   		 config_mode ? " network " : "    ",  		 inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),  		 p->prefixlen); @@ -926,7 +926,7 @@ ripng_network_write (struct vty *vty, int config_mode)    /* Write enable interface. */    for (i = 0; i < vector_active (ripng_enable_if); i++)      if ((ifname = vector_slot (ripng_enable_if, i)) != NULL) -      vty_outln (vty, "%s%s", +      vty_out (vty, "%s%s\n",  	       config_mode ? " network " : "    ",  	       ifname); @@ -934,7 +934,7 @@ ripng_network_write (struct vty *vty, int config_mode)    if (config_mode)      for (i = 0; i < vector_active (Vripng_passive_interface); i++)        if ((ifname = vector_slot (Vripng_passive_interface, i)) != NULL) -        vty_outln (vty, " passive-interface %s", ifname); +        vty_out (vty, " passive-interface %s\n", ifname);    return 0;  } @@ -960,7 +960,7 @@ DEFUN (ripng_network,    if (ret < 0)      { -      vty_outln (vty, "There is same network configuration %s", +      vty_out (vty, "There is same network configuration %s\n",                   argv[idx_if_or_addr]->arg);        return CMD_WARNING;      } @@ -990,7 +990,7 @@ DEFUN (no_ripng_network,    if (ret < 0)      { -      vty_outln (vty, "can't find network %s",argv[idx_if_or_addr]->arg); +      vty_out (vty, "can't find network %s\n",argv[idx_if_or_addr]->arg);        return CMD_WARNING;      } @@ -1121,28 +1121,28 @@ interface_config_write (struct vty *vty)            (ri->split_horizon == ri->split_horizon_default))          continue; -      vty_outln (vty, "interface %s",ifp->name); +      vty_out (vty, "interface %s\n",ifp->name);        if (ifp->desc) -	vty_outln (vty, " description %s",ifp->desc); +	vty_out (vty, " description %s\n",ifp->desc);        /* Split horizon. */        if (ri->split_horizon != ri->split_horizon_default)  	{            switch (ri->split_horizon) {            case RIPNG_SPLIT_HORIZON: -            vty_outln (vty, " ipv6 ripng split-horizon"); +            vty_out (vty, " ipv6 ripng split-horizon\n");              break;            case RIPNG_SPLIT_HORIZON_POISONED_REVERSE: -            vty_outln (vty," ipv6 ripng split-horizon poisoned-reverse"); +            vty_out (vty," ipv6 ripng split-horizon poisoned-reverse\n");              break;            case RIPNG_NO_SPLIT_HORIZON:            default: -            vty_outln (vty, " no ipv6 ripng split-horizon"); +            vty_out (vty, " no ipv6 ripng split-horizon\n");              break;            }  	} -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");        write++;      } diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c index 51385dd930..e0ca0666bd 100644 --- a/ripngd/ripng_offset.c +++ b/ripngd/ripng_offset.c @@ -125,7 +125,7 @@ ripng_offset_list_set (struct vty *vty, const char *alist,      direct = RIPNG_OFFSET_LIST_OUT;    else      { -      vty_outln (vty, "Invalid direction: %s", direct_str); +      vty_out (vty, "Invalid direction: %s\n", direct_str);        return CMD_WARNING;      } @@ -133,7 +133,7 @@ ripng_offset_list_set (struct vty *vty, const char *alist,    metric = atoi (metric_str);    if (metric < 0 || metric > 16)      { -      vty_outln (vty, "Invalid metric: %s", metric_str); +      vty_out (vty, "Invalid metric: %s\n", metric_str);        return CMD_WARNING;      } @@ -164,7 +164,7 @@ ripng_offset_list_unset (struct vty *vty, const char *alist,      direct = RIPNG_OFFSET_LIST_OUT;    else      { -      vty_outln (vty, "Invalid direction: %s", direct_str); +      vty_out (vty, "Invalid direction: %s\n", direct_str);        return CMD_WARNING;      } @@ -172,7 +172,7 @@ ripng_offset_list_unset (struct vty *vty, const char *alist,    metric = atoi (metric_str);    if (metric < 0 || metric > 16)      { -      vty_outln (vty, "Invalid metric: %s", metric_str); +      vty_out (vty, "Invalid metric: %s\n", metric_str);        return CMD_WARNING;      } @@ -196,7 +196,7 @@ ripng_offset_list_unset (struct vty *vty, const char *alist,      }    else      { -      vty_outln (vty, "Can't find offset-list"); +      vty_out (vty, "Can't find offset-list\n");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -405,23 +405,23 @@ config_write_ripng_offset_list (struct vty *vty)        if (! offset->ifname)  	{  	  if (offset->direct[RIPNG_OFFSET_LIST_IN].alist_name) -	    vty_outln (vty, " offset-list %s in %d", +	    vty_out (vty, " offset-list %s in %d\n",  		     offset->direct[RIPNG_OFFSET_LIST_IN].alist_name,  		     offset->direct[RIPNG_OFFSET_LIST_IN].metric);  	  if (offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name) -	    vty_outln (vty, " offset-list %s out %d", +	    vty_out (vty, " offset-list %s out %d\n",  		     offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name,  		     offset->direct[RIPNG_OFFSET_LIST_OUT].metric);  	}        else  	{  	  if (offset->direct[RIPNG_OFFSET_LIST_IN].alist_name) -	    vty_outln (vty, " offset-list %s in %d %s", +	    vty_out (vty, " offset-list %s in %d %s\n",  		     offset->direct[RIPNG_OFFSET_LIST_IN].alist_name,  		     offset->direct[RIPNG_OFFSET_LIST_IN].metric,  		     offset->ifname);  	  if (offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name) -	    vty_outln (vty, " offset-list %s out %d %s", +	    vty_out (vty, " offset-list %s out %d %s\n",  		     offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name,  		     offset->direct[RIPNG_OFFSET_LIST_OUT].metric,  		     offset->ifname); diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c index 51f1a40097..03f3b4e05f 100644 --- a/ripngd/ripng_peer.c +++ b/ripngd/ripng_peer.c @@ -193,7 +193,7 @@ ripng_peer_display (struct vty *vty)    for (ALL_LIST_ELEMENTS (peer_list, node, nnode, peer))      { -      vty_outln (vty, "    %s %s%14s %10d %10d %10d      %s", inet6_ntoa (peer->addr), +      vty_out (vty, "    %s %s%14s %10d %10d %10d      %s\n", inet6_ntoa (peer->addr),                 VTYNL, " ",  	       peer->recv_badpackets, peer->recv_badroutes,  	       ZEBRA_RIPNG_DISTANCE_DEFAULT, diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 465d33992f..725336aff3 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -337,7 +337,7 @@ DEFUN (ripng_redistribute_type,    if (type < 0)      { -      vty_outln (vty, "Invalid type %s", proto); +      vty_out (vty, "Invalid type %s\n", proto);        return CMD_WARNING;      } @@ -363,7 +363,7 @@ DEFUN (no_ripng_redistribute_type,    if (type < 0)      { -      vty_outln (vty, "Invalid type %s", proto); +      vty_out (vty, "Invalid type %s\n", proto);        return CMD_WARNING;      } @@ -391,7 +391,7 @@ DEFUN (ripng_redistribute_type_metric,    if (type < 0)      { -      vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +      vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);        return CMD_WARNING;      } @@ -417,7 +417,7 @@ DEFUN (ripng_redistribute_type_routemap,    if (type < 0)      { -      vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +      vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);        return CMD_WARNING;      } @@ -448,7 +448,7 @@ DEFUN (ripng_redistribute_type_metric_routemap,    if (type < 0)      { -      vty_outln (vty, "Invalid type %s", argv[idx_protocol]->text); +      vty_out (vty, "Invalid type %s\n", argv[idx_protocol]->text);        return CMD_WARNING;      } @@ -472,20 +472,20 @@ ripng_redistribute_write (struct vty *vty, int config_mode)  	  if (ripng->route_map[i].metric_config)  	    {  	      if (ripng->route_map[i].name) -		vty_outln (vty, " redistribute %s metric %d route-map %s", +		vty_out (vty, " redistribute %s metric %d route-map %s\n",  			 zebra_route_string(i), ripng->route_map[i].metric,  			ripng->route_map[i].name);  	      else -		vty_outln (vty, " redistribute %s metric %d", +		vty_out (vty, " redistribute %s metric %d\n",  			zebra_route_string(i),ripng->route_map[i].metric);  	    }  	  else  	    {  	      if (ripng->route_map[i].name) -		vty_outln (vty, " redistribute %s route-map %s", +		vty_out (vty, " redistribute %s route-map %s\n",  			 zebra_route_string(i),ripng->route_map[i].name);  	      else -		vty_outln (vty, " redistribute %s",zebra_route_string(i)); +		vty_out (vty, " redistribute %s\n",zebra_route_string(i));  	    }  	}        else @@ -499,13 +499,13 @@ zebra_config_write (struct vty *vty)  {    if (! zclient->enable)      { -      vty_outln (vty, "no router zebra"); +      vty_out (vty, "no router zebra\n");        return 1;      }    else if (! vrf_bitmap_check (zclient->redist[AFI_IP6][ZEBRA_ROUTE_RIPNG], VRF_DEFAULT))      { -      vty_outln (vty, "router zebra"); -      vty_outln (vty, " no redistribute ripng"); +      vty_out (vty, "router zebra\n"); +      vty_out (vty, " no redistribute ripng\n");        return 1;      }    return 0; diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index bfec173efc..affb12b8ae 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -2113,16 +2113,16 @@ DEFUN (show_ipv6_ripng_status,    vty_outln (vty, "Routing Protocol is \"RIPng\"");    vty_out (vty, "  Sending updates every %ld seconds with +/-50%%,",             ripng->update_time); -  vty_outln (vty, " next due in %lu seconds", +  vty_out (vty, " next due in %lu seconds\n",             thread_timer_remain_second(ripng->t_update));    vty_out (vty, "  Timeout after %ld seconds,", ripng->timeout_time); -  vty_outln (vty, " garbage collect after %ld seconds",ripng->garbage_time); +  vty_out (vty, " garbage collect after %ld seconds\n",ripng->garbage_time);    /* Filtering status show. */    config_show_distribute (vty);    /* Default metric information. */ -  vty_outln (vty, "  Default redistribution metric is %d", +  vty_out (vty, "  Default redistribution metric is %d\n",             ripng->default_metric);    /* Redistribute information. */ @@ -2131,9 +2131,9 @@ DEFUN (show_ipv6_ripng_status,    vty_out (vty, VTYNL);    vty_out (vty, "  Default version control: send version %d,", ripng->version); -  vty_outln (vty, " receive version %d ",ripng->version); +  vty_out (vty, " receive version %d \n",ripng->version); -  vty_outln (vty, "    Interface        Send  Recv"); +  vty_out (vty, "    Interface        Send  Recv\n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp))      { @@ -2144,18 +2144,18 @@ DEFUN (show_ipv6_ripng_status,        if (ri->enable_network || ri->enable_interface)  	{ -	  vty_outln (vty, "    %-17s%-3d   %-3d", ifp->name, +	  vty_out (vty, "    %-17s%-3d   %-3d\n", ifp->name,  		   ripng->version,  		   ripng->version);  	}      } -  vty_outln (vty, "  Routing for Networks:"); +  vty_out (vty, "  Routing for Networks:\n");    ripng_network_write (vty, 0); -  vty_outln (vty, "  Routing Information Sources:"); -  vty_outln (vty, -             "    Gateway          BadPackets BadRoutes  Distance Last Update"); +  vty_out (vty, "  Routing Information Sources:\n"); +  vty_out (vty, +             "    Gateway          BadPackets BadRoutes  Distance Last Update\n");    ripng_peer_display (vty);    return CMD_SUCCESS;   @@ -2260,7 +2260,7 @@ DEFUN (ripng_route,    ret = str2prefix_ipv6 (argv[idx_ipv6addr]->arg, (struct prefix_ipv6 *)&p);    if (ret <= 0)      { -      vty_outln (vty, "Malformed address"); +      vty_out (vty, "Malformed address\n");        return CMD_WARNING;      }    apply_mask_ipv6 (&p); @@ -2268,7 +2268,7 @@ DEFUN (ripng_route,    rp = route_node_get (ripng->route, (struct prefix *) &p);    if (rp->info)      { -      vty_outln (vty, "There is already same static route."); +      vty_out (vty, "There is already same static route.\n");        route_unlock_node (rp);        return CMD_WARNING;      } @@ -2294,7 +2294,7 @@ DEFUN (no_ripng_route,    ret = str2prefix_ipv6 (argv[idx_ipv6addr]->arg, (struct prefix_ipv6 *)&p);    if (ret <= 0)      { -      vty_outln (vty, "Malformed address"); +      vty_out (vty, "Malformed address\n");        return CMD_WARNING;      }    apply_mask_ipv6 (&p); @@ -2302,7 +2302,7 @@ DEFUN (no_ripng_route,    rp = route_node_lookup (ripng->route, (struct prefix *) &p);    if (! rp)      { -      vty_outln (vty, "Can't find static route."); +      vty_out (vty, "Can't find static route.\n");        return CMD_WARNING;      } @@ -2329,7 +2329,7 @@ DEFUN (ripng_aggregate_address,    ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, (struct prefix_ipv6 *)&p);    if (ret <= 0)      { -      vty_outln (vty, "Malformed address"); +      vty_out (vty, "Malformed address\n");        return CMD_WARNING;      } @@ -2337,7 +2337,7 @@ DEFUN (ripng_aggregate_address,    node = route_node_get (ripng->aggregate, &p);    if (node->info)      { -      vty_outln (vty, "There is already same aggregate route."); +      vty_out (vty, "There is already same aggregate route.\n");        route_unlock_node (node);        return CMD_WARNING;      } @@ -2363,14 +2363,14 @@ DEFUN (no_ripng_aggregate_address,    ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, (struct prefix_ipv6 *) &p);    if (ret <= 0)      { -      vty_outln (vty, "Malformed address"); +      vty_out (vty, "Malformed address\n");        return CMD_WARNING;      }    rn = route_node_lookup (ripng->aggregate, &p);    if (! rn)      { -      vty_outln (vty, "Can't find aggregate route."); +      vty_out (vty, "Can't find aggregate route.\n");        return CMD_WARNING;      }    route_unlock_node (rn); @@ -2680,7 +2680,7 @@ DEFUN (ripng_allow_ecmp,  {    if (ripng->ecmp)      { -      vty_outln (vty, "ECMP is already enabled."); +      vty_out (vty, "ECMP is already enabled.\n");        return CMD_WARNING;      } @@ -2697,7 +2697,7 @@ DEFUN (no_ripng_allow_ecmp,  {    if (!ripng->ecmp)      { -      vty_outln (vty, "ECMP is already disabled."); +      vty_out (vty, "ECMP is already disabled.\n");        return CMD_WARNING;      } @@ -2720,16 +2720,16 @@ ripng_config_write (struct vty *vty)      {        /* RIPng router. */ -      vty_outln (vty, "router ripng"); +      vty_out (vty, "router ripng\n");        if (ripng->default_information) -	vty_outln (vty, " default-information originate"); +	vty_out (vty, " default-information originate\n");        ripng_network_write (vty, 1);        /* RIPng default metric configuration */        if (ripng->default_metric != RIPNG_DEFAULT_METRIC_DEFAULT) -        vty_outln (vty, " default-metric %d", +        vty_out (vty, " default-metric %d\n",  		 ripng->default_metric);        ripng_redistribute_write (vty, 1); @@ -2740,18 +2740,18 @@ ripng_config_write (struct vty *vty)        /* RIPng aggregate routes. */        for (rp = route_top (ripng->aggregate); rp; rp = route_next (rp))  	if (rp->info != NULL) -	  vty_outln (vty, " aggregate-address %s/%d",  +	  vty_out (vty, " aggregate-address %s/%d\n",   		   inet6_ntoa (rp->p.u.prefix6),  		   rp->p.prefixlen);        /* ECMP configuration. */        if (ripng->ecmp) -        vty_outln (vty, " allow-ecmp"); +        vty_out (vty, " allow-ecmp\n");        /* RIPng static routes. */        for (rp = route_top (ripng->route); rp; rp = route_next (rp))  	if (rp->info != NULL) -	  vty_outln (vty, " route %s/%d", inet6_ntoa (rp->p.u.prefix6), +	  vty_out (vty, " route %s/%d\n", inet6_ntoa (rp->p.u.prefix6),  		   rp->p.prefixlen);        /* RIPng timers configuration. */ @@ -2759,7 +2759,7 @@ ripng_config_write (struct vty *vty)  	  ripng->timeout_time != RIPNG_TIMEOUT_TIMER_DEFAULT ||  	  ripng->garbage_time != RIPNG_GARBAGE_TIMER_DEFAULT)  	{ -	  vty_outln (vty, " timers basic %ld %ld %ld", +	  vty_out (vty, " timers basic %ld %ld %ld\n",  		   ripng->update_time,  		   ripng->timeout_time,  		   ripng->garbage_time); diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c index 728ae8cb04..f1b07ce228 100644 --- a/tests/lib/cli/common_cli.c +++ b/tests/lib/cli/common_cli.c @@ -36,10 +36,10 @@ int dump_args(struct vty *vty, const char *descr,                int argc, struct cmd_token *argv[])  {    int i; -  vty_outln (vty, "%s with %d args.", descr, argc); +  vty_out (vty, "%s with %d args.\n", descr, argc);    for (i = 0; i < argc; i++)      { -      vty_outln (vty, "[%02d] %s@%s: %s", i, argv[i]->text, argv[i]->varname, argv[i]->arg); +      vty_out (vty, "[%02d] %s@%s: %s\n", i, argv[i]->text, argv[i]->varname, argv[i]->arg);      }    return CMD_SUCCESS; diff --git a/tests/lib/cli/test_cli.c b/tests/lib/cli/test_cli.c index 43366d49e2..a4d3fb4e8e 100644 --- a/tests/lib/cli/test_cli.c +++ b/tests/lib/cli/test_cli.c @@ -47,10 +47,10 @@ DEFPY(magic_test, magic_test_cmd,  	"1\n2\n3\n4\n5\n")  {    char buf[256]; -  vty_outln(vty, "def: %s", self->string); -  vty_outln(vty, "num: %ld", magic); -  vty_outln(vty, "ipv4: %s", prefix2str(ipv4net, buf, sizeof(buf))); -  vty_outln(vty, "ipv6: %s", inet_ntop(AF_INET6, &ipv6, buf, sizeof(buf))); +  vty_out(vty, "def: %s\n", self->string); +  vty_out(vty, "num: %ld\n", magic); +  vty_out(vty, "ipv4: %s\n", prefix2str(ipv4net, buf, sizeof(buf))); +  vty_out(vty, "ipv6: %s\n", inet_ntop(AF_INET6, &ipv6, buf, sizeof(buf)));    return CMD_SUCCESS;  } diff --git a/tests/lib/test_heavy.c b/tests/lib/test_heavy.c index 810d9fda78..382d1623f3 100644 --- a/tests/lib/test_heavy.c +++ b/tests/lib/test_heavy.c @@ -88,7 +88,7 @@ DEFUN (clear_foo,    char *str;    if (!argc)      { -      vty_outln (vty, "%% string argument required"); +      vty_out (vty, "%% string argument required\n");        return CMD_WARNING;      } diff --git a/tests/lib/test_heavy_thread.c b/tests/lib/test_heavy_thread.c index 80c54a827f..9e1d70adc1 100644 --- a/tests/lib/test_heavy_thread.c +++ b/tests/lib/test_heavy_thread.c @@ -112,7 +112,7 @@ DEFUN (clear_foo,    if (!argc)      { -      vty_outln (vty, "%% string argument required"); +      vty_out (vty, "%% string argument required\n");        return CMD_WARNING;      } diff --git a/tests/lib/test_heavy_wq.c b/tests/lib/test_heavy_wq.c index 13641f6edd..18b80d0810 100644 --- a/tests/lib/test_heavy_wq.c +++ b/tests/lib/test_heavy_wq.c @@ -146,7 +146,7 @@ DEFUN (clear_foo,    char *str;    if (!argc)      { -      vty_outln (vty, "%% string argument required"); +      vty_out (vty, "%% string argument required\n");        return CMD_WARNING;      } diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index f02bd0c888..794708683f 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2528,9 +2528,9 @@ DEFUN (vtysh_write_terminal,    else      fp = stdout; -  vty_outln (vty, "Building configuration..."); -  vty_outln (vty, "%sCurrent configuration:",VTYNL); -  vty_outln (vty, "!"); +  vty_out (vty, "Building configuration...\n"); +  vty_out (vty, "%sCurrent configuration:\n",VTYNL); +  vty_out (vty, "!\n");    for (i = 0; i < array_size(vtysh_client); i++)      if ((argc < 3 ) || (strmatch (vtysh_client[i].name, argv[2]->text))) @@ -2552,7 +2552,7 @@ DEFUN (vtysh_write_terminal,        fp = NULL;      } -  vty_outln (vty, "end"); +  vty_out (vty, "end\n");    return CMD_SUCCESS;  } @@ -2785,7 +2785,7 @@ DEFUN (vtysh_terminal_length,    lines = strtol (argv[idx_number]->arg, &endptr, 10);    if (lines < 0 || lines > 512 || *endptr != '\0')      { -      vty_outln (vty, "length is malformed"); +      vty_out (vty, "length is malformed\n");        return CMD_WARNING;      } diff --git a/watchfrr/watchfrr_vty.c b/watchfrr/watchfrr_vty.c index 819d896afa..276e186c40 100644 --- a/watchfrr/watchfrr_vty.c +++ b/watchfrr/watchfrr_vty.c @@ -41,7 +41,7 @@ DEFUN(config_write_integrated,  	sigset_t oldmask, sigmask;  	if (integrated_write_pid != -1) { -		vty_outln (vty,"%% configuration write already in progress."); +		vty_out (vty,"%% configuration write already in progress.\n");  		return CMD_WARNING;  	} @@ -59,7 +59,7 @@ DEFUN(config_write_integrated,  	child = fork();  	if (child == -1) { -		vty_outln (vty, "%% configuration write fork() failed: %s.", +		vty_out (vty, "%% configuration write fork() failed: %s.\n",  			safe_strerror(errno));  		sigprocmask(SIG_SETMASK, &oldmask, NULL);  		return CMD_WARNING; diff --git a/zebra/interface.c b/zebra/interface.c index b8426c6890..e2def4a499 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -976,11 +976,11 @@ nd_dump_vty (struct vty *vty, struct interface *ifp)    if (rtadv->AdvSendAdvertisements)      { -      vty_outln (vty, "  ND advertised reachable time is %d milliseconds", +      vty_out (vty, "  ND advertised reachable time is %d milliseconds\n",  	       rtadv->AdvReachableTime); -      vty_outln (vty, "  ND advertised retransmit interval is %d milliseconds", +      vty_out (vty, "  ND advertised retransmit interval is %d milliseconds\n",  	       rtadv->AdvRetransTimer); -      vty_outln (vty, "  ND router advertisements sent: %d rcvd: %d", +      vty_out (vty, "  ND router advertisements sent: %d rcvd: %d\n",  	       zif->ra_sent, zif->ra_rcvd);        interval = rtadv->MaxRtrAdvInterval;        if (interval % 1000) @@ -990,32 +990,32 @@ nd_dump_vty (struct vty *vty, struct interface *ifp)          vty_outln (vty, "  ND router advertisements are sent every "  			"%d seconds",interval / 1000);        if (rtadv->AdvDefaultLifetime != -1) -	vty_outln (vty, "  ND router advertisements live for %d seconds", +	vty_out (vty, "  ND router advertisements live for %d seconds\n",  		 rtadv->AdvDefaultLifetime);        else -	vty_outln (vty, -                   "  ND router advertisements lifetime tracks ra-interval"); +	vty_out (vty, +                   "  ND router advertisements lifetime tracks ra-interval\n");        vty_outln (vty, "  ND router advertisement default router preference is "  			"%s",rtadv_pref_strs[rtadv->DefaultPreference]);        if (rtadv->AdvManagedFlag) -	vty_outln (vty,"  Hosts use DHCP to obtain routable addresses."); +	vty_out (vty,"  Hosts use DHCP to obtain routable addresses.\n");        else -	vty_outln (vty,"  Hosts use stateless autoconfig for addresses."); +	vty_out (vty,"  Hosts use stateless autoconfig for addresses.\n");        if (rtadv->AdvHomeAgentFlag)        {        	vty_outln (vty,                           "  ND router advertisements with " "Home Agent flag bit set.");  	if (rtadv->HomeAgentLifetime != -1) -	  vty_outln (vty, "  Home Agent lifetime is %u seconds", +	  vty_out (vty, "  Home Agent lifetime is %u seconds\n",  	           rtadv->HomeAgentLifetime);  	else -	  vty_outln (vty,"  Home Agent lifetime tracks ra-lifetime"); -	vty_outln (vty, "  Home Agent preference is %u", +	  vty_out (vty,"  Home Agent lifetime tracks ra-lifetime\n"); +	vty_out (vty, "  Home Agent preference is %u\n",  	         rtadv->HomeAgentPreference);        }        if (rtadv->AdvIntervalOption) -      	vty_outln (vty, -                         "  ND router advertisements with Adv. Interval option."); +      	vty_out (vty, +                         "  ND router advertisements with Adv. Interval option.\n");      }  }  #endif /* HAVE_RTADV */ @@ -1039,36 +1039,36 @@ if_dump_vty (struct vty *vty, struct interface *ifp)      if (CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_LINKDETECTION)) {        if (if_is_running(ifp)) -       vty_outln (vty, "is up"); +       vty_out (vty, "is up\n");        else -	vty_outln (vty, "is down"); +	vty_out (vty, "is down\n");      } else { -      vty_outln (vty, "detection is disabled"); +      vty_out (vty, "detection is disabled\n");      }    } else { -    vty_outln (vty, "down"); +    vty_out (vty, "down\n");    } -  vty_outln (vty, "  Link ups:   %5u    last: %s", zebra_if->up_count, +  vty_out (vty, "  Link ups:   %5u    last: %s\n", zebra_if->up_count,             zebra_if->up_last[0] ? zebra_if->up_last : "(never)"); -  vty_outln (vty, "  Link downs: %5u    last: %s", zebra_if->down_count, +  vty_out (vty, "  Link downs: %5u    last: %s\n", zebra_if->down_count,             zebra_if->down_last[0] ? zebra_if->down_last : "(never)");    zebra_ptm_show_status(vty, ifp);    vrf = vrf_lookup_by_id (ifp->vrf_id); -  vty_outln (vty, "  vrf: %s", vrf->name); +  vty_out (vty, "  vrf: %s\n", vrf->name);    if (ifp->desc) -    vty_outln (vty, "  Description: %s",ifp->desc); +    vty_out (vty, "  Description: %s\n",ifp->desc);    if (ifp->ifindex == IFINDEX_INTERNAL)      { -      vty_outln (vty, "  pseudo interface"); +      vty_out (vty, "  pseudo interface\n");        return;      }    else if (! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))      { -      vty_outln (vty, "  index %d inactive interface",  +      vty_out (vty, "  index %d inactive interface\n",   	      ifp->ifindex);        return;      } @@ -1077,11 +1077,11 @@ if_dump_vty (struct vty *vty, struct interface *ifp)  	   ifp->ifindex, ifp->metric, ifp->mtu, ifp->speed);    if (ifp->mtu6 != ifp->mtu)      vty_out (vty, "mtu6 %d ", ifp->mtu6); -  vty_outln (vty, "%s  flags: %s", VTYNL, +  vty_out (vty, "%s  flags: %s\n", VTYNL,             if_flag_dump(ifp->flags));    /* Hardware address. */ -  vty_outln (vty, "  Type: %s", if_link_type_str(ifp->ll_type)); +  vty_out (vty, "  Type: %s\n", if_link_type_str(ifp->ll_type));    if (ifp->hw_addr_len != 0)      {        int i; @@ -1119,23 +1119,23 @@ if_dump_vty (struct vty *vty, struct interface *ifp)      {        int i;        struct if_link_params *iflp = ifp->link_params; -      vty_outln (vty, "  Traffic Engineering Link Parameters:"); +      vty_out (vty, "  Traffic Engineering Link Parameters:\n");        if (IS_PARAM_SET(iflp, LP_TE_METRIC)) -        vty_outln (vty, "    TE metric %u",iflp->te_metric); +        vty_out (vty, "    TE metric %u\n",iflp->te_metric);        if (IS_PARAM_SET(iflp, LP_MAX_BW)) -        vty_outln (vty, "    Maximum Bandwidth %g (Byte/s)", iflp->max_bw); +        vty_out (vty, "    Maximum Bandwidth %g (Byte/s)\n", iflp->max_bw);        if (IS_PARAM_SET(iflp, LP_MAX_RSV_BW)) -        vty_outln (vty, "    Maximum Reservable Bandwidth %g (Byte/s)", +        vty_out (vty, "    Maximum Reservable Bandwidth %g (Byte/s)\n",                    iflp->max_rsv_bw);        if (IS_PARAM_SET(iflp, LP_UNRSV_BW)) { -        vty_outln (vty, "    Unreserved Bandwidth per Class Type in Byte/s:"); +        vty_out (vty, "    Unreserved Bandwidth per Class Type in Byte/s:\n");          for (i = 0; i < MAX_CLASS_TYPE; i+=2) -          vty_outln (vty, "      [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)", +          vty_out (vty, "      [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)\n",                    i, iflp->unrsv_bw[i], i+1, iflp->unrsv_bw[i + 1]);        }        if (IS_PARAM_SET(iflp, LP_ADM_GRP)) -        vty_outln (vty, "    Administrative Group:%u", iflp->admin_grp); +        vty_out (vty, "    Administrative Group:%u\n", iflp->admin_grp);        if (IS_PARAM_SET(iflp, LP_DELAY))          {            vty_out(vty, "    Link Delay Average: %u (micro-sec.)", iflp->av_delay); @@ -1147,18 +1147,18 @@ if_dump_vty (struct vty *vty, struct interface *ifp)            vty_out (vty, VTYNL);          }        if (IS_PARAM_SET(iflp, LP_DELAY_VAR)) -        vty_outln (vty, "    Link Delay Variation %u (micro-sec.)", +        vty_out (vty, "    Link Delay Variation %u (micro-sec.)\n",                    iflp->delay_var);        if (IS_PARAM_SET(iflp, LP_PKT_LOSS)) -        vty_outln (vty, "    Link Packet Loss %g (in %%)", iflp->pkt_loss); +        vty_out (vty, "    Link Packet Loss %g (in %%)\n", iflp->pkt_loss);        if (IS_PARAM_SET(iflp, LP_AVA_BW)) -        vty_outln (vty, "    Available Bandwidth %g (Byte/s)", iflp->ava_bw); +        vty_out (vty, "    Available Bandwidth %g (Byte/s)\n", iflp->ava_bw);        if (IS_PARAM_SET(iflp, LP_RES_BW)) -        vty_outln (vty, "    Residual Bandwidth %g (Byte/s)", iflp->res_bw); +        vty_out (vty, "    Residual Bandwidth %g (Byte/s)\n", iflp->res_bw);        if (IS_PARAM_SET(iflp, LP_USE_BW)) -        vty_outln (vty, "    Utilized Bandwidth %g (Byte/s)", iflp->use_bw); +        vty_out (vty, "    Utilized Bandwidth %g (Byte/s)\n", iflp->use_bw);        if (IS_PARAM_SET(iflp, LP_RMT_AS)) -        vty_outln (vty, "    Neighbor ASBR IP: %s AS: %u ", inet_ntoa(iflp->rmt_ip), +        vty_out (vty, "    Neighbor ASBR IP: %s AS: %u \n", inet_ntoa(iflp->rmt_ip),                    iflp->rmt_as);      } @@ -1169,7 +1169,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp)    nd_dump_vty (vty, ifp);  #endif /* HAVE_RTADV */    if (listhead(ifp->nbr_connected)) -    vty_outln (vty, "  Neighbor address(s):"); +    vty_out (vty, "  Neighbor address(s):\n");    for (ALL_LIST_ELEMENTS_RO (ifp->nbr_connected, node, nbr_connected))      nbr_connected_dump_vty (vty, nbr_connected); @@ -1186,10 +1186,10 @@ if_dump_vty (struct vty *vty, struct interface *ifp)  	   ifp->stats.rx_over_errors, ifp->stats.rx_crc_errors,  	   ifp->stats.rx_frame_errors); -  vty_outln (vty, "    %lu fifo, %lu missed", ifp->stats.rx_fifo_errors, +  vty_out (vty, "    %lu fifo, %lu missed\n", ifp->stats.rx_fifo_errors,  	   ifp->stats.rx_missed_errors); -  vty_outln (vty, "    %lu output packets, %lu bytes, %lu dropped", +  vty_out (vty, "    %lu output packets, %lu bytes, %lu dropped\n",  	   ifp->stats.tx_packets, ifp->stats.tx_bytes,  	   ifp->stats.tx_dropped); @@ -1199,7 +1199,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp)  	   ifp->stats.tx_carrier_errors, ifp->stats.tx_fifo_errors,  	   ifp->stats.tx_heartbeat_errors); -  vty_outln (vty, "    %lu window, %lu collisions", +  vty_out (vty, "    %lu window, %lu collisions\n",  	   ifp->stats.tx_window_errors, ifp->stats.collisions);  #endif /* HAVE_PROC_NET_DEV */ @@ -1213,7 +1213,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp)             (unsigned long long)ifp->stats.ifi_iqdrops,             (unsigned long long)ifp->stats.ifi_imcasts); -  vty_outln (vty, "    input errors %llu", +  vty_out (vty, "    input errors %llu\n",             (unsigned long long)ifp->stats.ifi_ierrors);    vty_outln (vty, "    output packets %llu, bytes %llu," @@ -1222,10 +1222,10 @@ if_dump_vty (struct vty *vty, struct interface *ifp)             (unsigned long long)ifp->stats.ifi_obytes,             (unsigned long long)ifp->stats.ifi_omcasts); -  vty_outln (vty, "    output errors %llu", +  vty_out (vty, "    output errors %llu\n",             (unsigned long long)ifp->stats.ifi_oerrors); -  vty_outln (vty, "    collisions %llu", +  vty_out (vty, "    collisions %llu\n",             (unsigned long long)ifp->stats.ifi_collisions);  #else    /* Statistics print out using sysctl (). */ @@ -1234,17 +1234,17 @@ if_dump_vty (struct vty *vty, struct interface *ifp)  	   ifp->stats.ifi_ipackets, ifp->stats.ifi_ibytes,  	   ifp->stats.ifi_iqdrops,ifp->stats.ifi_imcasts); -  vty_outln (vty, "    input errors %lu", +  vty_out (vty, "    input errors %lu\n",  	   ifp->stats.ifi_ierrors); -  vty_outln (vty, "    output packets %lu, bytes %lu, multicast packets %lu", +  vty_out (vty, "    output packets %lu, bytes %lu, multicast packets %lu\n",  	   ifp->stats.ifi_opackets, ifp->stats.ifi_obytes,  	   ifp->stats.ifi_omcasts); -  vty_outln (vty, "    output errors %lu", +  vty_out (vty, "    output errors %lu\n",  	   ifp->stats.ifi_oerrors); -  vty_outln (vty, "    collisions %lu", +  vty_out (vty, "    collisions %lu\n",  	   ifp->stats.ifi_collisions);  #endif /* __bsdi__ || __NetBSD__ */  #endif /* HAVE_NET_RT_IFLIST */ @@ -1340,7 +1340,7 @@ DEFUN (show_interface_name_vrf,    ifp = if_lookup_by_name (argv[idx_ifname]->arg, vrf_id);    if (ifp == NULL)      { -      vty_outln (vty, "%% Can't find interface %s",argv[idx_ifname]->arg); +      vty_out (vty, "%% Can't find interface %s\n",argv[idx_ifname]->arg);        return CMD_WARNING;      }    if_dump_vty (vty, ifp); @@ -1378,7 +1378,7 @@ DEFUN (show_interface_name_vrf_all,    if (!found)      { -      vty_outln (vty, "%% Can't find interface %s", argv[idx_ifname]->arg); +      vty_out (vty, "%% Can't find interface %s\n", argv[idx_ifname]->arg);        return CMD_WARNING;      } @@ -1392,7 +1392,7 @@ if_show_description (struct vty *vty, vrf_id_t vrf_id)    struct listnode *node;    struct interface *ifp; -  vty_outln (vty, "Interface       Status  Protocol  Description"); +  vty_out (vty, "Interface       Status  Protocol  Description\n");    for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp))      {        int len; @@ -1458,7 +1458,7 @@ DEFUN (show_interface_desc_vrf_all,    RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)      if (!list_isempty (vrf->iflist))        { -        vty_outln (vty, "%s\tVRF %u%s", VTYNL, vrf->vrf_id, +        vty_out (vty, "%s\tVRF %u%s\n", VTYNL, vrf->vrf_id,  		 VTYNL);          if_show_description (vty, vrf->vrf_id);        } @@ -1480,7 +1480,7 @@ DEFUN (multicast,        ret = if_set_flags (ifp, IFF_MULTICAST);        if (ret < 0)  	{ -	  vty_outln (vty, "Can't set multicast flag"); +	  vty_out (vty, "Can't set multicast flag\n");  	  return CMD_WARNING;  	}        if_refresh (ifp); @@ -1506,7 +1506,7 @@ DEFUN (no_multicast,        ret = if_unset_flags (ifp, IFF_MULTICAST);        if (ret < 0)  	{ -	  vty_outln (vty, "Can't unset multicast flag"); +	  vty_out (vty, "Can't unset multicast flag\n");  	  return CMD_WARNING;  	}        if_refresh (ifp); @@ -1572,7 +1572,7 @@ DEFUN (shutdown_if,          ret = if_unset_flags (ifp, IFF_UP);          if (ret < 0)            { -            vty_outln (vty, "Can't shutdown interface"); +            vty_out (vty, "Can't shutdown interface\n");              return CMD_WARNING;            }          if_refresh (ifp); @@ -1598,7 +1598,7 @@ DEFUN (no_shutdown_if,        ret = if_set_flags (ifp, IFF_UP | IFF_RUNNING);        if (ret < 0)  	{ -	  vty_outln (vty, "Can't up interface"); +	  vty_out (vty, "Can't up interface\n");  	  return CMD_WARNING;  	}        if_refresh (ifp); @@ -1630,7 +1630,7 @@ DEFUN (bandwidth_if,    /* bandwidth range is <1-100000> */    if (bandwidth < 1 || bandwidth > 100000)      { -      vty_outln (vty, "Bandwidth is invalid"); +      vty_out (vty, "Bandwidth is invalid\n");        return CMD_WARNING;      } @@ -1832,7 +1832,7 @@ DEFUN (link_params_maxbw,    if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1)      { -      vty_outln (vty, "link_params_maxbw: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "link_params_maxbw: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      } @@ -1850,8 +1850,8 @@ DEFUN (link_params_maxbw,        || (bw <= iflp->res_bw)        || (bw <= iflp->use_bw))      { -      vty_outln (vty, -               "Maximum Bandwidth could not be lower than others bandwidth"); +      vty_out (vty, +               "Maximum Bandwidth could not be lower than others bandwidth\n");        return CMD_WARNING;      } @@ -1874,7 +1874,7 @@ DEFUN (link_params_max_rsv_bw,    if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1)      { -      vty_outln (vty, "link_params_max_rsv_bw: fscanf: %s", +      vty_out (vty, "link_params_max_rsv_bw: fscanf: %s\n",                   safe_strerror(errno));        return CMD_WARNING;      } @@ -1882,8 +1882,8 @@ DEFUN (link_params_max_rsv_bw,    /* Check that bandwidth is not greater than maximum bandwidth parameter */    if (bw > iflp->max_bw)      { -      vty_outln (vty, -               "Maximum Reservable Bandwidth could not be greater than Maximum Bandwidth (%g)", +      vty_out (vty, +               "Maximum Reservable Bandwidth could not be greater than Maximum Bandwidth (%g)\n",                 iflp->max_bw);        return CMD_WARNING;      } @@ -1911,14 +1911,14 @@ DEFUN (link_params_unrsv_bw,    /* We don't have to consider about range check here. */    if (sscanf (argv[idx_number]->arg, "%d", &priority) != 1)      { -      vty_outln (vty, "link_params_unrsv_bw: fscanf: %s", +      vty_out (vty, "link_params_unrsv_bw: fscanf: %s\n",                   safe_strerror(errno));        return CMD_WARNING;      }    if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1)      { -      vty_outln (vty, "link_params_unrsv_bw: fscanf: %s", +      vty_out (vty, "link_params_unrsv_bw: fscanf: %s\n",                   safe_strerror(errno));        return CMD_WARNING;      } @@ -1926,8 +1926,8 @@ DEFUN (link_params_unrsv_bw,    /* Check that bandwidth is not greater than maximum bandwidth parameter */    if (bw > iflp->max_bw)      { -      vty_outln (vty, -               "UnReserved Bandwidth could not be greater than Maximum Bandwidth (%g)", +      vty_out (vty, +               "UnReserved Bandwidth could not be greater than Maximum Bandwidth (%g)\n",                 iflp->max_bw);        return CMD_WARNING;      } @@ -1951,7 +1951,7 @@ DEFUN (link_params_admin_grp,    if (sscanf (argv[idx_bitpattern]->arg, "0x%lx", &value) != 1)      { -      vty_outln (vty, "link_params_admin_grp: fscanf: %s", +      vty_out (vty, "link_params_admin_grp: fscanf: %s\n",                 safe_strerror(errno));        return CMD_WARNING;      } @@ -1995,7 +1995,7 @@ DEFUN (link_params_inter_as,    if (!inet_aton (argv[idx_ipv4]->arg, &addr))      { -      vty_outln (vty, "Please specify Router-Addr by A.B.C.D"); +      vty_out (vty, "Please specify Router-Addr by A.B.C.D\n");        return CMD_WARNING;      } @@ -2069,7 +2069,7 @@ DEFUN (link_params_delay,      if (IS_PARAM_SET(iflp, LP_MM_DELAY)          && (delay <= iflp->min_delay || delay >= iflp->max_delay))        { -        vty_outln (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay", +        vty_out (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay\n",                   iflp->min_delay, iflp->max_delay);          return CMD_WARNING;        } @@ -2094,7 +2094,7 @@ DEFUN (link_params_delay,      /* Check new delays value coherency */      if (delay <= low || delay >= high)        { -        vty_outln (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay", +        vty_out (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay\n",                   low, high);          return CMD_WARNING;        } @@ -2190,7 +2190,7 @@ DEFUN (link_params_pkt_loss,    if (sscanf (argv[idx_percentage]->arg, "%g", &fval) != 1)      { -      vty_outln (vty, "link_params_pkt_loss: fscanf: %s", +      vty_out (vty, "link_params_pkt_loss: fscanf: %s\n",                   safe_strerror(errno));        return CMD_WARNING;      } @@ -2231,15 +2231,15 @@ DEFUN (link_params_res_bw,    if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1)      { -      vty_outln (vty, "link_params_res_bw: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "link_params_res_bw: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      }    /* Check that bandwidth is not greater than maximum bandwidth parameter */    if (bw > iflp->max_bw)      { -      vty_outln (vty, -               "Residual Bandwidth could not be greater than Maximum Bandwidth (%g)", +      vty_out (vty, +               "Residual Bandwidth could not be greater than Maximum Bandwidth (%g)\n",                 iflp->max_bw);        return CMD_WARNING;      } @@ -2277,15 +2277,15 @@ DEFUN (link_params_ava_bw,    if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1)      { -      vty_outln (vty, "link_params_ava_bw: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "link_params_ava_bw: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      }    /* Check that bandwidth is not greater than maximum bandwidth parameter */    if (bw > iflp->max_bw)      { -      vty_outln (vty, -               "Available Bandwidth could not be greater than Maximum Bandwidth (%g)", +      vty_out (vty, +               "Available Bandwidth could not be greater than Maximum Bandwidth (%g)\n",                 iflp->max_bw);        return CMD_WARNING;      } @@ -2323,15 +2323,15 @@ DEFUN (link_params_use_bw,    if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1)      { -      vty_outln (vty, "link_params_use_bw: fscanf: %s",safe_strerror(errno)); +      vty_out (vty, "link_params_use_bw: fscanf: %s\n",safe_strerror(errno));        return CMD_WARNING;      }    /* Check that bandwidth is not greater than maximum bandwidth parameter */    if (bw > iflp->max_bw)      { -      vty_outln (vty, -               "Utilised Bandwidth could not be greater than Maximum Bandwidth (%g)", +      vty_out (vty, +               "Utilised Bandwidth could not be greater than Maximum Bandwidth (%g)\n",                 iflp->max_bw);        return CMD_WARNING;      } @@ -2372,13 +2372,13 @@ ip_address_install (struct vty *vty, struct interface *ifp,    ret = str2prefix_ipv4 (addr_str, &cp);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address "); +      vty_out (vty, "%% Malformed address \n");        return CMD_WARNING;      }    if (ipv4_martian(&cp.prefix))      { -      vty_outln (vty, "%% Invalid address"); +      vty_out (vty, "%% Invalid address\n");        return CMD_WARNING;      } @@ -2429,7 +2429,7 @@ ip_address_install (struct vty *vty, struct interface *ifp,        ret = if_set_prefix (ifp, ifc);        if (ret < 0)  	{ -	  vty_outln (vty, "%% Can't set interface IP address: %s.",  +	  vty_out (vty, "%% Can't set interface IP address: %s.\n",   		   safe_strerror(errno));  	  return CMD_WARNING;  	} @@ -2456,7 +2456,7 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp,    ret = str2prefix_ipv4 (addr_str, &cp);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address "); +      vty_out (vty, "%% Malformed address \n");        return CMD_WARNING;      } @@ -2464,7 +2464,7 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp,    ifc = connected_check (ifp, (struct prefix *) &cp);    if (! ifc)      { -      vty_outln (vty, "%% Can't find address"); +      vty_out (vty, "%% Can't find address\n");        return CMD_WARNING;      } @@ -2487,7 +2487,7 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp,    ret = if_unset_prefix (ifp, ifc);    if (ret < 0)      { -      vty_outln (vty, "%% Can't unset interface IP address: %s.",  +      vty_out (vty, "%% Can't unset interface IP address: %s.\n",   	       safe_strerror(errno));        return CMD_WARNING;      } @@ -2572,13 +2572,13 @@ ipv6_address_install (struct vty *vty, struct interface *ifp,    ret = str2prefix_ipv6 (addr_str, &cp);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address "); +      vty_out (vty, "%% Malformed address \n");        return CMD_WARNING;      }    if (ipv6_martian(&cp.prefix))      { -      vty_outln (vty, "%% Invalid address"); +      vty_out (vty, "%% Invalid address\n");        return CMD_WARNING;      } @@ -2625,7 +2625,7 @@ ipv6_address_install (struct vty *vty, struct interface *ifp,        if (ret < 0)  	{ -	  vty_outln (vty, "%% Can't set interface IP address: %s.",  +	  vty_out (vty, "%% Can't set interface IP address: %s.\n",   		   safe_strerror(errno));  	  return CMD_WARNING;  	} @@ -2665,7 +2665,7 @@ ipv6_address_uninstall (struct vty *vty, struct interface *ifp,    ret = str2prefix_ipv6 (addr_str, &cp);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address "); +      vty_out (vty, "%% Malformed address \n");        return CMD_WARNING;      } @@ -2673,7 +2673,7 @@ ipv6_address_uninstall (struct vty *vty, struct interface *ifp,    ifc = connected_check (ifp, (struct prefix *) &cp);    if (! ifc)      { -      vty_outln (vty, "%% Can't find address"); +      vty_out (vty, "%% Can't find address\n");        return CMD_WARNING;      } @@ -2696,7 +2696,7 @@ ipv6_address_uninstall (struct vty *vty, struct interface *ifp,    ret = if_prefix_delete_ipv6 (ifp, ifc);    if (ret < 0)      { -      vty_outln (vty, "%% Can't unset interface IP address: %s.",  +      vty_out (vty, "%% Can't unset interface IP address: %s.\n",   	       safe_strerror(errno));        return CMD_WARNING;      } @@ -2742,23 +2742,23 @@ link_params_config_write (struct vty *vty, struct interface *ifp)    struct if_link_params *iflp = ifp->link_params; -  vty_outln (vty, " link-params"); -  vty_outln (vty, "  enable"); +  vty_out (vty, " link-params\n"); +  vty_out (vty, "  enable\n");    if (IS_PARAM_SET(iflp, LP_TE_METRIC) && iflp->te_metric != ifp->metric) -    vty_outln (vty, "  metric %u",iflp->te_metric); +    vty_out (vty, "  metric %u\n",iflp->te_metric);    if (IS_PARAM_SET(iflp, LP_MAX_BW) && iflp->max_bw != iflp->default_bw) -    vty_outln (vty, "  max-bw %g", iflp->max_bw); +    vty_out (vty, "  max-bw %g\n", iflp->max_bw);    if (IS_PARAM_SET(iflp, LP_MAX_RSV_BW) && iflp->max_rsv_bw != iflp->default_bw) -    vty_outln (vty, "  max-rsv-bw %g", iflp->max_rsv_bw); +    vty_out (vty, "  max-rsv-bw %g\n", iflp->max_rsv_bw);    if (IS_PARAM_SET(iflp, LP_UNRSV_BW))      {        for (i = 0; i < 8; i++)  	if (iflp->unrsv_bw[i] != iflp->default_bw) -	  vty_outln (vty, "  unrsv-bw %d %g", +	  vty_out (vty, "  unrsv-bw %d %g\n",  		  i, iflp->unrsv_bw[i]);      }    if (IS_PARAM_SET(iflp, LP_ADM_GRP)) -    vty_outln (vty, "  admin-grp 0x%x", iflp->admin_grp); +    vty_out (vty, "  admin-grp 0x%x\n", iflp->admin_grp);    if (IS_PARAM_SET(iflp, LP_DELAY))      {        vty_out(vty, "  delay %u", iflp->av_delay); @@ -2770,19 +2770,19 @@ link_params_config_write (struct vty *vty, struct interface *ifp)        vty_out (vty, VTYNL);      }    if (IS_PARAM_SET(iflp, LP_DELAY_VAR)) -    vty_outln (vty, "  delay-variation %u", iflp->delay_var); +    vty_out (vty, "  delay-variation %u\n", iflp->delay_var);    if (IS_PARAM_SET(iflp, LP_PKT_LOSS)) -    vty_outln (vty, "  packet-loss %g", iflp->pkt_loss); +    vty_out (vty, "  packet-loss %g\n", iflp->pkt_loss);    if (IS_PARAM_SET(iflp, LP_AVA_BW)) -    vty_outln (vty, "  ava-bw %g", iflp->ava_bw); +    vty_out (vty, "  ava-bw %g\n", iflp->ava_bw);    if (IS_PARAM_SET(iflp, LP_RES_BW)) -    vty_outln (vty, "  res-bw %g", iflp->res_bw); +    vty_out (vty, "  res-bw %g\n", iflp->res_bw);    if (IS_PARAM_SET(iflp, LP_USE_BW)) -    vty_outln (vty, "  use-bw %g", iflp->use_bw); +    vty_out (vty, "  use-bw %g\n", iflp->use_bw);    if (IS_PARAM_SET(iflp, LP_RMT_AS)) -    vty_outln (vty, "  neighbor %s as %u", inet_ntoa(iflp->rmt_ip), +    vty_out (vty, "  neighbor %s as %u\n", inet_ntoa(iflp->rmt_ip),          iflp->rmt_as); -  vty_outln (vty, "  exit-link-params"); +  vty_out (vty, "  exit-link-params\n");    return 0;  } @@ -2808,28 +2808,28 @@ if_config_write (struct vty *vty)        vrf = vrf_lookup_by_id (ifp->vrf_id);        if (ifp->vrf_id == VRF_DEFAULT) -        vty_outln (vty, "interface %s", ifp->name); +        vty_out (vty, "interface %s\n", ifp->name);        else -        vty_outln (vty, "interface %s vrf %s", ifp->name,vrf->name); +        vty_out (vty, "interface %s vrf %s\n", ifp->name,vrf->name);        if (if_data)  	{  	  if (if_data->shutdown == IF_ZEBRA_SHUTDOWN_ON) -	    vty_outln (vty, " shutdown"); +	    vty_out (vty, " shutdown\n");            zebra_ptm_if_write(vty, if_data);  	}        if (ifp->desc) -	vty_outln (vty, " description %s",ifp->desc); +	vty_out (vty, " description %s\n",ifp->desc);        /* Assign bandwidth here to avoid unnecessary interface flap  	 while processing config script */        if (ifp->bandwidth != 0) -	vty_outln (vty, " bandwidth %u", ifp->bandwidth);  +	vty_out (vty, " bandwidth %u\n", ifp->bandwidth);         if (!CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_LINKDETECTION)) -        vty_outln (vty, " no link-detect"); +        vty_out (vty, " no link-detect\n");        for (ALL_LIST_ELEMENTS_RO (ifp->connected, addrnode, ifc))  	  { @@ -2851,7 +2851,7 @@ if_config_write (struct vty *vty)        if (if_data)  	{  	  if (if_data->multicast != IF_ZEBRA_MULTICAST_UNSPEC) -	    vty_outln (vty, " %smulticast", +	    vty_out (vty, " %smulticast\n",  		     if_data->multicast == IF_ZEBRA_MULTICAST_ON ? "" : "no ");  	} @@ -2865,7 +2865,7 @@ if_config_write (struct vty *vty)        link_params_config_write (vty, ifp); -      vty_outln (vty, "!"); +      vty_out (vty, "!\n");      }    return 0;  } diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index ca932ac43c..4f19a873b7 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -343,28 +343,28 @@ void irdp_config_write (struct vty *vty, struct interface *ifp)    if(irdp->flags & IF_ACTIVE || irdp->flags & IF_SHUTDOWN) {      if( irdp->flags & IF_SHUTDOWN) -      vty_outln (vty, " ip irdp shutdown "); +      vty_out (vty, " ip irdp shutdown \n");      if( irdp->flags & IF_BROADCAST) -      vty_outln (vty, " ip irdp broadcast"); +      vty_out (vty, " ip irdp broadcast\n");      else -      vty_outln (vty, " ip irdp multicast"); +      vty_out (vty, " ip irdp multicast\n"); -    vty_outln (vty, " ip irdp preference %ld", +    vty_out (vty, " ip irdp preference %ld\n",  	     irdp->Preference);      for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv)) -      vty_outln (vty, " ip irdp address %s preference %d", +      vty_out (vty, " ip irdp address %s preference %d\n",                      inet_2a(adv->ip.s_addr, b1),                      adv->pref); -    vty_outln (vty, " ip irdp holdtime %d", +    vty_out (vty, " ip irdp holdtime %d\n",  	     irdp->Lifetime); -    vty_outln (vty, " ip irdp minadvertinterval %ld", +    vty_out (vty, " ip irdp minadvertinterval %ld\n",  	     irdp->MinAdvertInterval); -    vty_outln (vty, " ip irdp maxadvertinterval %ld", +    vty_out (vty, " ip irdp maxadvertinterval %ld\n",  	     irdp->MaxAdvertInterval);    } diff --git a/zebra/router-id.c b/zebra/router-id.c index 07caef7abe..7e3e286318 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -202,10 +202,10 @@ router_id_write (struct vty *vty)        if (zvrf->rid_user_assigned.u.prefix4.s_addr)          {            if (zvrf_id (zvrf) == VRF_DEFAULT) -            vty_outln (vty, "router-id %s", +            vty_out (vty, "router-id %s\n",                       inet_ntoa(zvrf->rid_user_assigned.u.prefix4));              else -              vty_outln (vty, "router-id %s vrf %s", +              vty_out (vty, "router-id %s vrf %s\n",  	                     inet_ntoa (zvrf->rid_user_assigned.u.prefix4),  	                     zvrf_name(zvrf));          } diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 677189751d..1ba8dd7d1f 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -877,8 +877,8 @@ DEFUN (ipv6_nd_suppress_ra,    if (if_is_loopback (ifp) ||        CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK))      { -      vty_outln (vty, -                 "Cannot configure IPv6 Router Advertisements on this  interface"); +      vty_out (vty, +                 "Cannot configure IPv6 Router Advertisements on this  interface\n");        return CMD_WARNING;      } @@ -901,8 +901,8 @@ DEFUN (no_ipv6_nd_suppress_ra,    if (if_is_loopback (ifp) ||        CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK))      { -      vty_outln (vty, -                 "Cannot configure IPv6 Router Advertisements on this interface"); +      vty_out (vty, +                 "Cannot configure IPv6 Router Advertisements on this interface\n");        return CMD_WARNING;      } @@ -931,8 +931,8 @@ DEFUN (ipv6_nd_ra_interval_msec,    interval = strtoul(argv[idx_number]->arg, NULL, 10);    if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime * 1000))    { -    vty_outln (vty, -               "This ra-interval would conflict with configured ra-lifetime!"); +    vty_out (vty, +               "This ra-interval would conflict with configured ra-lifetime!\n");      return CMD_WARNING;    } @@ -968,8 +968,8 @@ DEFUN (ipv6_nd_ra_interval,    interval = strtoul(argv[idx_number]->arg, NULL, 10);    if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime))    { -    vty_outln (vty, -               "This ra-interval would conflict with configured ra-lifetime!"); +    vty_out (vty, +               "This ra-interval would conflict with configured ra-lifetime!\n");      return CMD_WARNING;    } @@ -1036,8 +1036,8 @@ DEFUN (ipv6_nd_ra_lifetime,     * MaxRtrAdvInterval and 9000 seconds. -- RFC4861, 6.2.1 */    if ((lifetime != 0 && lifetime * 1000 < zif->rtadv.MaxRtrAdvInterval))      { -      vty_outln (vty, -                 "This ra-lifetime would conflict with configured ra-interval"); +      vty_out (vty, +                 "This ra-lifetime would conflict with configured ra-interval\n");        return CMD_WARNING;      } @@ -1333,7 +1333,7 @@ DEFUN (ipv6_nd_prefix,    ret = str2prefix_ipv6 (prefix, &rp.prefix);    if (!ret)      { -      vty_outln (vty, "Malformed IPv6 prefix"); +      vty_out (vty, "Malformed IPv6 prefix\n");        return CMD_WARNING;      }    apply_mask_ipv6 (&rp.prefix); /* RFC4861 4.6.2 */ @@ -1349,7 +1349,7 @@ DEFUN (ipv6_nd_prefix,      rp.AdvPreferredLifetime = strmatch (preflifetime, "infinite") ? UINT32_MAX : strtoll (preflifetime, NULL, 10);      if (rp.AdvPreferredLifetime > rp.AdvValidLifetime)        { -        vty_outln (vty, "Invalid preferred lifetime"); +        vty_out (vty, "Invalid preferred lifetime\n");          return CMD_WARNING;        }    } @@ -1386,7 +1386,7 @@ DEFUN (no_ipv6_nd_prefix,    ret = str2prefix_ipv6 (prefix, &rp.prefix);    if (!ret)      { -      vty_outln (vty, "Malformed IPv6 prefix"); +      vty_out (vty, "Malformed IPv6 prefix\n");        return CMD_WARNING;      }    apply_mask_ipv6 (&rp.prefix); /* RFC4861 4.6.2 */ @@ -1394,7 +1394,7 @@ DEFUN (no_ipv6_nd_prefix,    ret = rtadv_prefix_reset (zebra_if, &rp);    if (!ret)      { -      vty_outln (vty, "Non-existant IPv6 prefix"); +      vty_out (vty, "Non-existant IPv6 prefix\n");        return CMD_WARNING;      } @@ -1495,49 +1495,49 @@ rtadv_config_write (struct vty *vty, struct interface *ifp)          CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK)))      {        if (zif->rtadv.AdvSendAdvertisements) -        vty_outln (vty, " no ipv6 nd suppress-ra"); +        vty_out (vty, " no ipv6 nd suppress-ra\n");      }    interval = zif->rtadv.MaxRtrAdvInterval;    if (interval % 1000) -    vty_outln (vty, " ipv6 nd ra-interval msec %d",interval); +    vty_out (vty, " ipv6 nd ra-interval msec %d\n",interval);    else      if (interval != RTADV_MAX_RTR_ADV_INTERVAL) -      vty_outln (vty, " ipv6 nd ra-interval %d",interval / 1000); +      vty_out (vty, " ipv6 nd ra-interval %d\n",interval / 1000);    if (zif->rtadv.AdvIntervalOption) -    vty_outln (vty, " ipv6 nd adv-interval-option"); +    vty_out (vty, " ipv6 nd adv-interval-option\n");    if (zif->rtadv.AdvDefaultLifetime != -1) -    vty_outln (vty, " ipv6 nd ra-lifetime %d",zif->rtadv.AdvDefaultLifetime); +    vty_out (vty, " ipv6 nd ra-lifetime %d\n",zif->rtadv.AdvDefaultLifetime);    if (zif->rtadv.HomeAgentPreference) -    vty_outln (vty, " ipv6 nd home-agent-preference %u", +    vty_out (vty, " ipv6 nd home-agent-preference %u\n",  	     zif->rtadv.HomeAgentPreference);    if (zif->rtadv.HomeAgentLifetime != -1) -    vty_outln (vty, " ipv6 nd home-agent-lifetime %u", +    vty_out (vty, " ipv6 nd home-agent-lifetime %u\n",  	     zif->rtadv.HomeAgentLifetime);    if (zif->rtadv.AdvHomeAgentFlag) -    vty_outln (vty, " ipv6 nd home-agent-config-flag"); +    vty_out (vty, " ipv6 nd home-agent-config-flag\n");    if (zif->rtadv.AdvReachableTime) -    vty_outln (vty, " ipv6 nd reachable-time %d", +    vty_out (vty, " ipv6 nd reachable-time %d\n",                 zif->rtadv.AdvReachableTime);    if (zif->rtadv.AdvManagedFlag) -    vty_outln (vty, " ipv6 nd managed-config-flag"); +    vty_out (vty, " ipv6 nd managed-config-flag\n");    if (zif->rtadv.AdvOtherConfigFlag) -    vty_outln (vty, " ipv6 nd other-config-flag"); +    vty_out (vty, " ipv6 nd other-config-flag\n");    if (zif->rtadv.DefaultPreference != RTADV_PREF_MEDIUM) -    vty_outln (vty, " ipv6 nd router-preference %s", +    vty_out (vty, " ipv6 nd router-preference %s\n",  	     rtadv_pref_strs[zif->rtadv.DefaultPreference]);    if (zif->rtadv.AdvLinkMTU) -    vty_outln (vty, " ipv6 nd mtu %d", zif->rtadv.AdvLinkMTU); +    vty_out (vty, " ipv6 nd mtu %d\n", zif->rtadv.AdvLinkMTU);    for (ALL_LIST_ELEMENTS_RO (zif->rtadv.AdvPrefixList, node, rprefix))      { diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c index 3e408c929c..b765b51b93 100644 --- a/zebra/zebra_fpm.c +++ b/zebra/zebra_fpm.c @@ -1438,7 +1438,7 @@ zfpm_start_stats_timer (void)   */  #define ZFPM_SHOW_STAT(counter)						\    do {									\ -    vty_outln (vty, "%-40s %10lu %16lu", #counter, total_stats.counter,	\ +    vty_out (vty, "%-40s %10lu %16lu\n", #counter, total_stats.counter,	\  	     zfpm_g->last_ivl_stats.counter);		\    } while (0) @@ -1451,7 +1451,7 @@ zfpm_show_stats (struct vty *vty)    zfpm_stats_t total_stats;    time_t elapsed; -  vty_outln (vty, "%s%-40s %10s     Last %2d secs%s", VTYNL, "Counter", +  vty_out (vty, "%s%-40s %10s     Last %2d secs%s\n", VTYNL, "Counter",  	   "Total", ZFPM_STATS_IVL_SECS, VTYNL);    /* @@ -1490,7 +1490,7 @@ zfpm_show_stats (struct vty *vty)    elapsed = zfpm_get_elapsed_time (zfpm_g->last_stats_clear_time); -  vty_outln (vty, "%sStats were cleared %lu seconds ago", VTYNL, +  vty_out (vty, "%sStats were cleared %lu seconds ago\n", VTYNL,  	   (unsigned long)elapsed);  } @@ -1502,7 +1502,7 @@ zfpm_clear_stats (struct vty *vty)  {    if (!zfpm_is_enabled ())      { -      vty_outln (vty, "The FPM module is not enabled..."); +      vty_out (vty, "The FPM module is not enabled...\n");        return;      } @@ -1515,7 +1515,7 @@ zfpm_clear_stats (struct vty *vty)    zfpm_g->last_stats_clear_time = monotime(NULL); -  vty_outln (vty, "Cleared FPM stats"); +  vty_out (vty, "Cleared FPM stats\n");  }  /* @@ -1671,7 +1671,7 @@ static int fpm_remote_srv_write (struct vty *vty)     if (zfpm_g->fpm_server != FPM_DEFAULT_IP ||             zfpm_g->fpm_port != FPM_DEFAULT_PORT) -      vty_outln (vty,"fpm connection ip %s port %d", inet_ntoa (in), +      vty_out (vty,"fpm connection ip %s port %d\n", inet_ntoa (in),                   zfpm_g->fpm_port);     return 0; diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 510d796937..d78c1629be 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -530,7 +530,7 @@ fec_print (zebra_fec_t *fec, struct vty *vty)    rn = fec->rn;    prefix2str(&rn->p, buf, BUFSIZ); -  vty_outln (vty, "%s", buf); +  vty_out (vty, "%s\n", buf);    vty_out(vty, "  Label: %s", label2str(fec->label, buf, BUFSIZ));    if (fec->label_index != MPLS_INVALID_LABEL_INDEX)      vty_out(vty, ", Label Index: %u", fec->label_index); @@ -1398,7 +1398,7 @@ nhlfe_print (zebra_nhlfe_t *nhlfe, struct vty *vty)    if (!nexthop || !nexthop->nh_label) // unexpected      return; -  vty_outln (vty, " type: %s remote label: %s distance: %d", +  vty_out (vty, " type: %s remote label: %s distance: %d\n",            nhlfe_type2str(nhlfe->type),            label2str(nexthop->nh_label->label[0], buf, BUFSIZ),            nhlfe->distance); @@ -1436,7 +1436,7 @@ lsp_print (zebra_lsp_t *lsp, void *ctxt)    vty = (struct vty *) ctxt; -  vty_outln (vty, "Local label: %u%s", +  vty_out (vty, "Local label: %u%s\n",            lsp->ile.in_label,            CHECK_FLAG(lsp->flags, LSP_FLAG_INSTALLED) ? " (installed)" : ""); @@ -2238,7 +2238,7 @@ zebra_mpls_write_fec_config (struct vty *vty, struct zebra_vrf *zvrf)            write = 1;            prefix2str(&rn->p, buf, BUFSIZ); -          vty_outln (vty, "mpls label bind %s %s", buf, +          vty_out (vty, "mpls label bind %s %s\n", buf,                    label2str(fec->label, lstr, BUFSIZ));          }      } @@ -2809,7 +2809,7 @@ zebra_mpls_print_lsp (struct vty *vty, struct zebra_vrf *zvrf, mpls_label_t labe    if (use_json)      {        json = lsp_json(lsp); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      } @@ -2840,15 +2840,15 @@ zebra_mpls_print_lsp_table (struct vty *vty, struct zebra_vrf *zvrf,          json_object_object_add(json, label2str(lsp->ile.in_label, buf, BUFSIZ),                                 lsp_json(lsp)); -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      }    else      { -      vty_outln (vty, " Inbound                            Outbound"); -      vty_outln (vty, "   Label     Type          Nexthop     Label"); -      vty_outln (vty, "--------  -------  ---------------  --------"); +      vty_out (vty, " Inbound                            Outbound\n"); +      vty_out (vty, "   Label     Type          Nexthop     Label\n"); +      vty_out (vty, "--------  -------  ---------------  --------\n");        for (ALL_LIST_ELEMENTS_RO(lsp_list, node, lsp))          { @@ -2871,7 +2871,7 @@ zebra_mpls_print_lsp_table (struct vty *vty, struct zebra_vrf *zvrf,                    break;                  } -              vty_outln (vty, "  %8d", nexthop->nh_label->label[0]); +              vty_out (vty, "  %8d\n", nexthop->nh_label->label[0]);              }          } @@ -2913,7 +2913,7 @@ zebra_mpls_write_lsp_config (struct vty *vty, struct zebra_vrf *zvrf)  		break;  	    } -            vty_outln (vty, "mpls lsp %u %s %s", +            vty_out (vty, "mpls lsp %u %s %s\n",                       slsp->ile.in_label, buf, lstr);            }        } @@ -2963,7 +2963,7 @@ zebra_mpls_write_label_block_config (struct vty *vty, struct zebra_vrf *zvrf)    if ((zvrf->mpls_srgb.start_label != MPLS_DEFAULT_MIN_SRGB_LABEL) ||        (zvrf->mpls_srgb.end_label != MPLS_DEFAULT_MAX_SRGB_LABEL))      { -      vty_outln (vty, "mpls label global-block %u %u", +      vty_out (vty, "mpls label global-block %u %u\n",                zvrf->mpls_srgb.start_label,zvrf->mpls_srgb.end_label);      } diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index 6c2dbca3a2..41e3aac9a3 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -53,20 +53,20 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,    if (!mpls_enabled)      { -      vty_outln (vty,"%% MPLS not turned on in kernel, ignoring command"); +      vty_out (vty,"%% MPLS not turned on in kernel, ignoring command\n");        return CMD_WARNING;      }    zvrf = vrf_info_lookup(VRF_DEFAULT);    if (!zvrf)      { -      vty_outln (vty, "%% Default VRF does not exist"); +      vty_out (vty, "%% Default VRF does not exist\n");        return CMD_WARNING;      }    if (!inlabel_str)      { -      vty_outln (vty, "%% No Label Information"); +      vty_out (vty, "%% No Label Information\n");        return CMD_WARNING;      } @@ -74,7 +74,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,    label = atoi(inlabel_str);    if (!IS_MPLS_UNRESERVED_LABEL(label))      { -      vty_outln (vty, "%% Invalid label"); +      vty_out (vty, "%% Invalid label\n");        return CMD_WARNING;      } @@ -82,12 +82,12 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,      {        if (!gate_str)          { -          vty_outln (vty, "%% No Nexthop Information"); +          vty_out (vty, "%% No Nexthop Information\n");            return CMD_WARNING;          }        if (!outlabel_str)          { -          vty_outln (vty, "%% No Outgoing label Information"); +          vty_out (vty, "%% No Outgoing label Information\n");            return CMD_WARNING;          }      } @@ -108,7 +108,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,              gtype = NEXTHOP_TYPE_IPV4;            else              { -              vty_outln (vty, "%% Invalid nexthop"); +              vty_out (vty, "%% Invalid nexthop\n");                return CMD_WARNING;              }          } @@ -133,7 +133,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,        if (!zebra_mpls_lsp_label_consistent (zvrf, in_label, out_label, gtype,                                              &gate, 0))          { -          vty_outln (vty,"%% Label value not consistent"); +          vty_out (vty,"%% Label value not consistent\n");            return CMD_WARNING;          }  #endif /* HAVE_CUMULUS */ @@ -146,7 +146,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,    if (ret)      { -      vty_outln (vty, "%% LSP cannot be %s", +      vty_out (vty, "%% LSP cannot be %s\n",                 add_cmd ? "added" : "deleted");        return CMD_WARNING;      } @@ -218,7 +218,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,    zvrf = vrf_info_lookup(VRF_DEFAULT);    if (!zvrf)      { -      vty_outln (vty, "%% Default VRF does not exist"); +      vty_out (vty, "%% Default VRF does not exist\n");        return CMD_WARNING;      } @@ -226,7 +226,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,    ret = str2prefix(prefix, &p);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address"); +      vty_out (vty, "%% Malformed address\n");        return CMD_WARNING;      } @@ -234,7 +234,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,      {        if (!label_str)          { -          vty_outln (vty, "%% No label binding specified"); +          vty_out (vty, "%% No label binding specified\n");            return CMD_WARNING;          } @@ -252,12 +252,12 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,            label = atoi(label_str);            if (!IS_MPLS_UNRESERVED_LABEL(label))              { -              vty_outln (vty, "%% Invalid label"); +              vty_out (vty, "%% Invalid label\n");                return CMD_WARNING;              }            if (zebra_mpls_label_already_bound (zvrf, label))              { -              vty_outln (vty,"%% Label already bound to a FEC"); +              vty_out (vty,"%% Label already bound to a FEC\n");                return CMD_WARNING;              }          } @@ -269,7 +269,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,    if (ret)      { -      vty_outln (vty, "%% FEC to label binding cannot be %s", +      vty_out (vty, "%% FEC to label binding cannot be %s\n",                 add_cmd ? "added" : "deleted");        return CMD_WARNING;      } @@ -874,7 +874,7 @@ DEFUN (show_mpls_fec,        ret = str2prefix(argv[3]->arg, &p);        if (ret <= 0)          { -          vty_outln (vty, "%% Malformed address"); +          vty_out (vty, "%% Malformed address\n");            return CMD_WARNING;          }        zebra_mpls_print_fec (vty, zvrf, &p); @@ -925,7 +925,7 @@ DEFUN (show_mpls_status,         "MPLS information\n"         "MPLS status\n")  { -  vty_outln (vty, "MPLS support enabled: %s", +  vty_out (vty, "MPLS support enabled: %s\n",               (mpls_enabled) ? "yes" : "no (mpls kernel extensions not detected)");    return CMD_SUCCESS;  } @@ -942,7 +942,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,    zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);    if (!zvrf)      { -      vty_outln (vty, "%% Default VRF does not exist"); +      vty_out (vty, "%% Default VRF does not exist\n");        return CMD_WARNING;      } @@ -950,7 +950,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,      {        if (!start_label_str || !end_label_str)          { -          vty_outln (vty, "%% Labels not specified"); +          vty_out (vty, "%% Labels not specified\n");            return CMD_WARNING;          } @@ -959,12 +959,12 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,        if (!IS_MPLS_UNRESERVED_LABEL(start_label) ||            !IS_MPLS_UNRESERVED_LABEL(end_label))          { -          vty_outln (vty, "%% Invalid label"); +          vty_out (vty, "%% Invalid label\n");            return CMD_WARNING;          }        if (end_label < start_label)          { -          vty_outln (vty,"%% End label is less than Start label"); +          vty_out (vty,"%% End label is less than Start label\n");            return CMD_WARNING;          } @@ -975,7 +975,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,    if (ret)      { -      vty_outln (vty, "%% Global label block could not be %s", +      vty_out (vty, "%% Global label block could not be %s\n",                 add_cmd ? "added" : "deleted");        return CMD_WARNING;      } diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index 9a7b029dd8..39779793f9 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -374,7 +374,7 @@ void  zebra_ptm_write (struct vty *vty)  {    if (ptm_cb.ptm_enable) -    vty_outln (vty, "ptm-enable"); +    vty_out (vty, "ptm-enable\n");    return;  } @@ -1089,9 +1089,9 @@ zebra_ptm_show_status(struct vty *vty, struct interface *ifp)  {    vty_out (vty, "  PTM status: ");    if (ifp->ptm_enable) { -    vty_outln (vty, "%s",zebra_ptm_get_status_str(ifp->ptm_status)); +    vty_out (vty, "%s\n",zebra_ptm_get_status_str(ifp->ptm_status));    } else { -    vty_outln (vty, "disabled"); +    vty_out (vty, "disabled\n");    }  } @@ -1161,5 +1161,5 @@ void  zebra_ptm_if_write (struct vty *vty, struct zebra_if *zebra_ifp)  {    if (zebra_ifp->ptm_enable == ZEBRA_IF_PTM_ENABLE_OFF) -    vty_outln (vty, " no ptm-enable"); +    vty_out (vty, " no ptm-enable\n");  } diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index c4f417d883..fc21ada3a4 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -73,10 +73,10 @@ zebra_route_match_add(struct vty *vty,        switch (ret)  	{  	case RMAP_RULE_MISSING: -	  vty_outln (vty, "%% Zebra Can't find rule."); +	  vty_out (vty, "%% Zebra Can't find rule.\n");  	  return CMD_WARNING;  	case RMAP_COMPILE_ERROR: -	  vty_outln (vty, "%% Zebra Argument is malformed."); +	  vty_out (vty, "%% Zebra Argument is malformed.\n");  	  return CMD_WARNING;  	}      } @@ -121,10 +121,10 @@ zebra_route_match_delete (struct vty *vty,        switch (ret)  	{  	case RMAP_RULE_MISSING: -	  vty_outln (vty, "%% Zebra Can't find rule."); +	  vty_out (vty, "%% Zebra Can't find rule.\n");  	  return CMD_WARNING;  	case RMAP_COMPILE_ERROR: -	  vty_outln (vty, "%% Zebra Argument is malformed."); +	  vty_out (vty, "%% Zebra Argument is malformed.\n");  	  return CMD_WARNING;  	}      } @@ -350,7 +350,7 @@ DEFUN (set_src,      {        if (inet_pton(AF_INET6, argv[idx_ip]->arg, &src.ipv6) != 1)  	{ -	  vty_outln (vty, "%% not a valid IPv4/v6 address"); +	  vty_out (vty, "%% not a valid IPv4/v6 address\n");  	  return CMD_WARNING;  	} @@ -367,7 +367,7 @@ DEFUN (set_src,    if (!zebra_check_addr(&p))      { -      vty_outln (vty, "%% not a valid source IPv4/v6 address"); +      vty_out (vty, "%% not a valid source IPv4/v6 address\n");        return CMD_WARNING;      } @@ -386,7 +386,7 @@ DEFUN (set_src,    if (!pif)      { -      vty_outln (vty, "%% not a local address"); +      vty_out (vty, "%% not a local address\n");        return CMD_WARNING;      } @@ -529,20 +529,20 @@ DEFUN (show_ip_protocol,  {      int i; -    vty_outln (vty, "Protocol    : route-map "); -    vty_outln (vty, "------------------------"); +    vty_out (vty, "Protocol    : route-map \n"); +    vty_out (vty, "------------------------\n");      for (i=0;i<ZEBRA_ROUTE_MAX;i++)      {          if (proto_rm[AFI_IP][i]) -          vty_outln (vty, "%-10s  : %-10s", zebra_route_string(i), +          vty_out (vty, "%-10s  : %-10s\n", zebra_route_string(i),  					proto_rm[AFI_IP][i]);          else -          vty_outln (vty, "%-10s  : none", zebra_route_string(i)); +          vty_out (vty, "%-10s  : none\n", zebra_route_string(i));      }      if (proto_rm[AFI_IP][i]) -      vty_outln (vty, "%-10s  : %-10s", "any",proto_rm[AFI_IP][i]); +      vty_out (vty, "%-10s  : %-10s\n", "any",proto_rm[AFI_IP][i]);      else -      vty_outln (vty, "%-10s  : none", "any"); +      vty_out (vty, "%-10s  : none\n", "any");      return CMD_SUCCESS;  } @@ -635,20 +635,20 @@ DEFUN (show_ipv6_protocol,  {      int i; -    vty_outln (vty, "Protocol    : route-map "); -    vty_outln (vty, "------------------------"); +    vty_out (vty, "Protocol    : route-map \n"); +    vty_out (vty, "------------------------\n");      for (i=0;i<ZEBRA_ROUTE_MAX;i++)      {          if (proto_rm[AFI_IP6][i]) -          vty_outln (vty, "%-10s  : %-10s", zebra_route_string(i), +          vty_out (vty, "%-10s  : %-10s\n", zebra_route_string(i),  					proto_rm[AFI_IP6][i]);          else -          vty_outln (vty, "%-10s  : none", zebra_route_string(i)); +          vty_out (vty, "%-10s  : none\n", zebra_route_string(i));      }      if (proto_rm[AFI_IP6][i]) -      vty_outln (vty, "%-10s  : %-10s", "any",proto_rm[AFI_IP6][i]); +      vty_out (vty, "%-10s  : %-10s\n", "any",proto_rm[AFI_IP6][i]);      else -      vty_outln (vty, "%-10s  : none", "any"); +      vty_out (vty, "%-10s  : none\n", "any");      return CMD_SUCCESS;  } @@ -733,20 +733,20 @@ DEFUN (show_ip_protocol_nht,  {      int i; -    vty_outln (vty, "Protocol    : route-map "); -    vty_outln (vty, "------------------------"); +    vty_out (vty, "Protocol    : route-map \n"); +    vty_out (vty, "------------------------\n");      for (i=0;i<ZEBRA_ROUTE_MAX;i++)      {          if (nht_rm[AFI_IP][i]) -          vty_outln (vty, "%-10s  : %-10s", zebra_route_string(i), +          vty_out (vty, "%-10s  : %-10s\n", zebra_route_string(i),  					nht_rm[AFI_IP][i]);          else -          vty_outln (vty, "%-10s  : none", zebra_route_string(i)); +          vty_out (vty, "%-10s  : none\n", zebra_route_string(i));      }      if (nht_rm[AFI_IP][i]) -      vty_outln (vty, "%-10s  : %-10s", "any",nht_rm[AFI_IP][i]); +      vty_out (vty, "%-10s  : %-10s\n", "any",nht_rm[AFI_IP][i]);      else -      vty_outln (vty, "%-10s  : none", "any"); +      vty_out (vty, "%-10s  : none\n", "any");      return CMD_SUCCESS;  } @@ -832,20 +832,20 @@ DEFUN (show_ipv6_protocol_nht,  {      int i; -    vty_outln (vty, "Protocol    : route-map "); -    vty_outln (vty, "------------------------"); +    vty_out (vty, "Protocol    : route-map \n"); +    vty_out (vty, "------------------------\n");      for (i=0;i<ZEBRA_ROUTE_MAX;i++)      {          if (nht_rm[AFI_IP6][i]) -          vty_outln (vty, "%-10s  : %-10s", zebra_route_string(i), +          vty_out (vty, "%-10s  : %-10s\n", zebra_route_string(i),  					nht_rm[AFI_IP6][i]);          else -          vty_outln (vty, "%-10s  : none", zebra_route_string(i)); +          vty_out (vty, "%-10s  : none\n", zebra_route_string(i));      }      if (nht_rm[AFI_IP][i]) -      vty_outln (vty, "%-10s  : %-10s", "any",nht_rm[AFI_IP6][i]); +      vty_out (vty, "%-10s  : %-10s\n", "any",nht_rm[AFI_IP6][i]);      else -      vty_outln (vty, "%-10s  : none", "any"); +      vty_out (vty, "%-10s  : none\n", "any");      return CMD_SUCCESS;  } @@ -1294,7 +1294,7 @@ void  zebra_route_map_write_delay_timer (struct vty *vty)  {    if (vty && (zebra_rmap_update_timer != ZEBRA_RMAP_DEFAULT_UPDATE_TIMER)) -    vty_outln (vty, "zebra route-map delay-timer %d", +    vty_out (vty, "zebra route-map delay-timer %d\n",                 zebra_rmap_update_timer);    return;  } @@ -1431,40 +1431,40 @@ zebra_routemap_config_write_protocol (struct vty *vty)    for (i=0;i<ZEBRA_ROUTE_MAX;i++)      {        if (proto_rm[AFI_IP][i]) -        vty_outln (vty, "ip protocol %s route-map %s", zebra_route_string(i), +        vty_out (vty, "ip protocol %s route-map %s\n", zebra_route_string(i),                   proto_rm[AFI_IP][i]);        if (proto_rm[AFI_IP6][i]) -        vty_outln (vty, "ipv6 protocol %s route-map %s", zebra_route_string(i), +        vty_out (vty, "ipv6 protocol %s route-map %s\n", zebra_route_string(i),                   proto_rm[AFI_IP6][i]);        if (nht_rm[AFI_IP][i]) -        vty_outln (vty, "ip nht %s route-map %s", zebra_route_string(i), +        vty_out (vty, "ip nht %s route-map %s\n", zebra_route_string(i),                   nht_rm[AFI_IP][i]);        if (nht_rm[AFI_IP6][i]) -        vty_outln (vty, "ipv6 nht %s route-map %s", zebra_route_string(i), +        vty_out (vty, "ipv6 nht %s route-map %s\n", zebra_route_string(i),                   nht_rm[AFI_IP6][i]);      }    if (proto_rm[AFI_IP][ZEBRA_ROUTE_MAX]) -      vty_outln (vty, "ip protocol %s route-map %s", "any", +      vty_out (vty, "ip protocol %s route-map %s\n", "any",                 proto_rm[AFI_IP][ZEBRA_ROUTE_MAX]);    if (proto_rm[AFI_IP6][ZEBRA_ROUTE_MAX]) -      vty_outln (vty, "ipv6 protocol %s route-map %s", "any", +      vty_out (vty, "ipv6 protocol %s route-map %s\n", "any",                 proto_rm[AFI_IP6][ZEBRA_ROUTE_MAX]);    if (nht_rm[AFI_IP][ZEBRA_ROUTE_MAX]) -      vty_outln (vty, "ip nht %s route-map %s", "any", +      vty_out (vty, "ip nht %s route-map %s\n", "any",                 nht_rm[AFI_IP][ZEBRA_ROUTE_MAX]);    if (nht_rm[AFI_IP6][ZEBRA_ROUTE_MAX]) -      vty_outln (vty, "ipv6 nht %s route-map %s", "any", +      vty_out (vty, "ipv6 nht %s route-map %s\n", "any",                 nht_rm[AFI_IP6][ZEBRA_ROUTE_MAX]);    if (zebra_rmap_update_timer != ZEBRA_RMAP_DEFAULT_UPDATE_TIMER) -    vty_outln (vty, "zebra route-map delay-timer %d", +    vty_out (vty, "zebra route-map delay-timer %d\n",                 zebra_rmap_update_timer);  } diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 1656892675..bedecf009d 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -524,8 +524,8 @@ vrf_config_write (struct vty *vty)        zvrf = vrf->info;        if (! zvrf || strcmp (zvrf_name (zvrf), VRF_DEFAULT_NAME))          { -          vty_outln (vty, "vrf %s", zvrf_name(zvrf)); -          vty_outln (vty, "!"); +          vty_out (vty, "vrf %s\n", zvrf_name(zvrf)); +          vty_out (vty, "!\n");          }      }    return 0; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 6ba4c1b9d5..1da288cca0 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -79,7 +79,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,    ret = str2prefix (dest_str, &p);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address"); +      vty_out (vty, "%% Malformed address\n");        return CMD_WARNING;      } @@ -89,7 +89,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,        ret = inet_aton (mask_str, &mask);        if (ret == 0)          { -          vty_outln (vty, "%% Malformed address"); +          vty_out (vty, "%% Malformed address\n");            return CMD_WARNING;          }        p.prefixlen = ip_masklen (mask); @@ -113,7 +113,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,    if (!zvrf)      { -      vty_outln (vty, "%% vrf %s is not defined", vrf_id_str); +      vty_out (vty, "%% vrf %s is not defined\n", vrf_id_str);        return CMD_WARNING;      } @@ -122,8 +122,8 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,      {        if (!mpls_enabled)  	{ -	  vty_outln (vty, -                     "%% MPLS not turned on in kernel, ignoring command"); +	  vty_out (vty, +                     "%% MPLS not turned on in kernel, ignoring command\n");  	  return CMD_WARNING;  	}        int rc = mpls_str2label (label_str, &snh_label.num_labels, @@ -132,14 +132,14 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,          {            switch (rc) {            case -1: -            vty_outln (vty, "%% Malformed label(s)"); +            vty_out (vty, "%% Malformed label(s)\n");              break;            case -2: -            vty_outln (vty, "%% Cannot use reserved label(s) (%d-%d)", +            vty_out (vty, "%% Cannot use reserved label(s) (%d-%d)\n",                       MPLS_MIN_RESERVED_LABEL,MPLS_MAX_RESERVED_LABEL);              break;            case -3: -            vty_outln (vty, "%% Too many labels. Enter %d or fewer", +            vty_out (vty, "%% Too many labels. Enter %d or fewer\n",                       MPLS_MAX_LABELS);              break;            } @@ -152,7 +152,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,      {        if (flag_str)          { -          vty_outln (vty, "%% can not have flag %s with Null0", flag_str); +          vty_out (vty, "%% can not have flag %s with Null0\n", flag_str);            return CMD_WARNING;          }        if (add_cmd) @@ -176,7 +176,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,          SET_FLAG (flag, ZEBRA_FLAG_BLACKHOLE);          break;        default: -        vty_outln (vty, "%% Malformed flag %s ", flag_str); +        vty_out (vty, "%% Malformed flag %s \n", flag_str);          return CMD_WARNING;      }    } @@ -201,7 +201,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,        struct interface *ifp = if_lookup_by_name (gate_str, zvrf_id (zvrf));        if (!ifp)          { -	  vty_outln (vty, "%% Unknown interface: %s", gate_str); +	  vty_out (vty, "%% Unknown interface: %s\n", gate_str);            ifindex = IFINDEX_DELETED;          }        else @@ -286,7 +286,7 @@ DEFUN (ip_multicast_mode,      multicast_mode_ipv4_set (MCAST_MIX_PFXLEN);    else      { -      vty_outln (vty, "Invalid mode specified"); +      vty_out (vty, "Invalid mode specified\n");        return CMD_WARNING;      } @@ -340,7 +340,7 @@ DEFUN (show_ip_rpf_addr,    ret = inet_aton (argv[idx_ipv4]->arg, &addr);    if (ret == 0)      { -      vty_outln (vty, "%% Malformed address"); +      vty_out (vty, "%% Malformed address\n");        return CMD_WARNING;      } @@ -349,7 +349,7 @@ DEFUN (show_ip_rpf_addr,    if (re)      vty_show_ip_route_detail (vty, rn, 1);    else -    vty_outln (vty, "%% No match for RPF lookup"); +    vty_out (vty, "%% No match for RPF lookup\n");    return CMD_SUCCESS;  } @@ -1107,18 +1107,18 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi,    if (!(zvrf = zebra_vrf_lookup_by_name (vrf_name)))      {        if (use_json) -        vty_outln (vty, "{}"); +        vty_out (vty, "{}\n");        else -        vty_outln (vty, "vrf %s not defined", vrf_name); +        vty_out (vty, "vrf %s not defined\n", vrf_name);        return CMD_SUCCESS;      }    if (zvrf_id (zvrf) == VRF_UNKNOWN)      {        if (use_json) -        vty_outln (vty, "{}"); +        vty_out (vty, "{}\n");        else -        vty_outln (vty, "vrf %s inactive", vrf_name); +        vty_out (vty, "vrf %s inactive\n", vrf_name);        return CMD_SUCCESS;      } @@ -1126,7 +1126,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi,    if (! table)      {        if (use_json) -        vty_outln (vty, "{}"); +        vty_out (vty, "{}\n");        return CMD_SUCCESS;      } @@ -1183,7 +1183,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi,                      vty_out (vty, SHOW_ROUTE_V6_HEADER);                    if (zvrf_id (zvrf) != VRF_DEFAULT) -                    vty_outln (vty, "%sVRF %s:", VTYNL, +                    vty_out (vty, "%sVRF %s:\n", VTYNL,                                 zvrf_name(zvrf));                    first = 0; @@ -1203,7 +1203,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi,    if (use_json)      { -      vty_outln (vty, "%s", +      vty_out (vty, "%s\n",                   json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));        json_object_free(json);      } @@ -1244,7 +1244,7 @@ DEFUN (show_ip_nht_vrf_all,    RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)      if ((zvrf = vrf->info) != NULL)        { -        vty_outln (vty, "%sVRF %s:", VTYNL, zvrf_name(zvrf)); +        vty_out (vty, "%sVRF %s:\n", VTYNL, zvrf_name(zvrf));          zebra_print_rnh_table(zvrf_id (zvrf), AF_INET, vty, RNH_NEXTHOP_TYPE);        } @@ -1284,7 +1284,7 @@ DEFUN (show_ipv6_nht_vrf_all,    RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)      if ((zvrf = vrf->info) != NULL)        { -        vty_outln (vty, "%sVRF %s:", VTYNL, zvrf_name(zvrf)); +        vty_out (vty, "%sVRF %s:\n", VTYNL, zvrf_name(zvrf));          zebra_print_rnh_table(zvrf_id (zvrf), AF_INET6, vty, RNH_NEXTHOP_TYPE);        } @@ -1440,7 +1440,7 @@ DEFUN (show_ip_route,        if (type < 0)          { -          vty_outln (vty, "Unknown route type"); +          vty_out (vty, "Unknown route type\n");            return CMD_WARNING;          }      } @@ -1493,7 +1493,7 @@ DEFUN (show_ip_route_addr,    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed IPv4 address"); +      vty_out (vty, "%% Malformed IPv4 address\n");        return CMD_WARNING;      } @@ -1504,7 +1504,7 @@ DEFUN (show_ip_route_addr,    rn = route_node_match (table, (struct prefix *) &p);    if (! rn)      { -      vty_outln (vty, "%% Network not in table"); +      vty_out (vty, "%% Network not in table\n");        return CMD_WARNING;      } @@ -1542,7 +1542,7 @@ DEFUN (show_ip_route_prefix,    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed IPv4 address"); +      vty_out (vty, "%% Malformed IPv4 address\n");        return CMD_WARNING;      } @@ -1553,7 +1553,7 @@ DEFUN (show_ip_route_prefix,    rn = route_node_match (table, (struct prefix *) &p);    if (! rn || rn->p.prefixlen != p.prefixlen)      { -      vty_outln (vty, "%% Network not in table"); +      vty_out (vty, "%% Network not in table\n");        return CMD_WARNING;      } @@ -1602,7 +1602,7 @@ vty_show_ip_route_summary (struct vty *vty, struct route_table *table)            }        } -  vty_outln (vty, "%-20s %-20s %s  (vrf %s)", +  vty_out (vty, "%-20s %-20s %s  (vrf %s)\n",             "Route Source", "Routes", "FIB",             zvrf_name(((rib_table_info_t *)table->info)->zvrf)); @@ -1613,19 +1613,19 @@ vty_show_ip_route_summary (struct vty *vty, struct route_table *table)          {            if (i == ZEBRA_ROUTE_BGP)              { -              vty_outln (vty, "%-20s %-20d %-20d ", "ebgp", +              vty_out (vty, "%-20s %-20d %-20d \n", "ebgp",                         rib_cnt[ZEBRA_ROUTE_BGP],fib_cnt[ZEBRA_ROUTE_BGP]); -              vty_outln (vty, "%-20s %-20d %-20d ", "ibgp", +              vty_out (vty, "%-20s %-20d %-20d \n", "ibgp",                         rib_cnt[ZEBRA_ROUTE_IBGP],fib_cnt[ZEBRA_ROUTE_IBGP]);              }            else -            vty_outln (vty, "%-20s %-20d %-20d ", zebra_route_string(i), +            vty_out (vty, "%-20s %-20d %-20d \n", zebra_route_string(i),                       rib_cnt[i], fib_cnt[i]);          }      } -  vty_outln (vty, "------"); -  vty_outln (vty, "%-20s %-20d %-20d ", "Totals", rib_cnt[ZEBRA_ROUTE_TOTAL], +  vty_out (vty, "------\n"); +  vty_out (vty, "%-20s %-20d %-20d \n", "Totals", rib_cnt[ZEBRA_ROUTE_TOTAL],             fib_cnt[ZEBRA_ROUTE_TOTAL]);    vty_out (vty, VTYNL);  } @@ -1680,7 +1680,7 @@ vty_show_ip_route_summary_prefix (struct vty *vty, struct route_table *table)  	     }        } -  vty_outln (vty, "%-20s %-20s %s  (vrf %s)", +  vty_out (vty, "%-20s %-20s %s  (vrf %s)\n",             "Route Source", "Prefix Routes", "FIB",             zvrf_name(((rib_table_info_t *)table->info)->zvrf)); @@ -1690,20 +1690,20 @@ vty_show_ip_route_summary_prefix (struct vty *vty, struct route_table *table)  	{  	  if (i == ZEBRA_ROUTE_BGP)  	    { -	      vty_outln (vty, "%-20s %-20d %-20d ", "ebgp", +	      vty_out (vty, "%-20s %-20d %-20d \n", "ebgp",  		       rib_cnt[ZEBRA_ROUTE_BGP] - rib_cnt[ZEBRA_ROUTE_IBGP],  		       fib_cnt[ZEBRA_ROUTE_BGP] - fib_cnt[ZEBRA_ROUTE_IBGP]); -	      vty_outln (vty, "%-20s %-20d %-20d ", "ibgp", +	      vty_out (vty, "%-20s %-20d %-20d \n", "ibgp",  		       rib_cnt[ZEBRA_ROUTE_IBGP],fib_cnt[ZEBRA_ROUTE_IBGP]);  	    }  	  else -	    vty_outln (vty, "%-20s %-20d %-20d ", zebra_route_string(i), +	    vty_out (vty, "%-20s %-20d %-20d \n", zebra_route_string(i),  		     rib_cnt[i], fib_cnt[i]);  	}      } -  vty_outln (vty, "------"); -  vty_outln (vty, "%-20s %-20d %-20d ", "Totals", rib_cnt[ZEBRA_ROUTE_TOTAL], +  vty_out (vty, "------\n"); +  vty_out (vty, "%-20s %-20d %-20d \n", "Totals", rib_cnt[ZEBRA_ROUTE_TOTAL],  	   fib_cnt[ZEBRA_ROUTE_TOTAL]);    vty_out (vty, VTYNL);  } @@ -1780,7 +1780,7 @@ DEFUN (show_ip_route_vrf_all_addr,    ret = str2prefix_ipv4 (argv[idx_ipv4]->arg, &p);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed IPv4 address"); +      vty_out (vty, "%% Malformed IPv4 address\n");        return CMD_WARNING;      } @@ -1822,7 +1822,7 @@ DEFUN (show_ip_route_vrf_all_prefix,    ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed IPv4 address"); +      vty_out (vty, "%% Malformed IPv4 address\n");        return CMD_WARNING;      } @@ -1992,7 +1992,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,    ret = str2prefix (dest_str, &p);    if (ret <= 0)      { -      vty_outln (vty, "%% Malformed address"); +      vty_out (vty, "%% Malformed address\n");        return CMD_WARNING;      } @@ -2001,7 +2001,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,        ret = str2prefix (src_str, &src);        if (ret <= 0 || src.family != AF_INET6)          { -          vty_outln (vty, "%% Malformed source address"); +          vty_out (vty, "%% Malformed source address\n");            return CMD_WARNING;          }        src_p = (struct prefix_ipv6*)&src; @@ -2029,7 +2029,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,    if (!zvrf)      { -      vty_outln (vty, "%% vrf %s is not defined", vrf_id_str); +      vty_out (vty, "%% vrf %s is not defined\n", vrf_id_str);        return CMD_WARNING;      } @@ -2039,8 +2039,8 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,      {        if (!mpls_enabled)          { -          vty_outln (vty, -                     "%% MPLS not turned on in kernel, ignoring command"); +          vty_out (vty, +                     "%% MPLS not turned on in kernel, ignoring command\n");            return CMD_WARNING;          }        int rc = mpls_str2label (label_str, &snh_label.num_labels, @@ -2049,14 +2049,14 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,          {            switch (rc) {            case -1: -            vty_outln (vty, "%% Malformed label(s)"); +            vty_out (vty, "%% Malformed label(s)\n");              break;            case -2: -            vty_outln (vty, "%% Cannot use reserved label(s) (%d-%d)", +            vty_out (vty, "%% Cannot use reserved label(s) (%d-%d)\n",                       MPLS_MIN_RESERVED_LABEL,MPLS_MAX_RESERVED_LABEL);              break;            case -3: -            vty_outln (vty, "%% Too many labels. Enter %d or fewer", +            vty_out (vty, "%% Too many labels. Enter %d or fewer\n",                       MPLS_MAX_LABELS);              break;            } @@ -2069,7 +2069,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,      {        if (flag_str)          { -          vty_outln (vty, "%% can not have flag %s with Null0", flag_str); +          vty_out (vty, "%% can not have flag %s with Null0\n", flag_str);            return CMD_WARNING;          }        if (add_cmd) @@ -2093,7 +2093,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,          SET_FLAG (flag, ZEBRA_FLAG_BLACKHOLE);          break;        default: -        vty_outln (vty, "%% Malformed flag %s ", flag_str); +        vty_out (vty, "%% Malformed flag %s \n", flag_str);          return CMD_WARNING;      }    } @@ -2104,7 +2104,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,           address. */        if (ret != 1)          { -          vty_outln (vty, "%% Malformed address"); +          vty_out (vty, "%% Malformed address\n");            return CMD_WARNING;          }        type = STATIC_IPV6_GATEWAY_IFINDEX; @@ -2112,7 +2112,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,        ifp = if_lookup_by_name (ifname, zvrf_id (zvrf));        if (!ifp)          { -          vty_outln (vty, "%% Malformed Interface name %s", ifname); +          vty_out (vty, "%% Malformed Interface name %s\n", ifname);            return CMD_WARNING;          }        ifindex = ifp->ifindex; @@ -2130,7 +2130,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,            ifp = if_lookup_by_name (gate_str, zvrf_id (zvrf));            if (!ifp)              { -              vty_outln (vty, "%% Malformed Interface name %s", gate_str); +              vty_out (vty, "%% Malformed Interface name %s\n", gate_str);                ifindex = IFINDEX_DELETED;              }            else @@ -2618,7 +2618,7 @@ DEFUN (show_ipv6_route,        if (type < 0)          { -          vty_outln (vty, "Unknown route type"); +          vty_out (vty, "Unknown route type\n");            return CMD_WARNING;          }      } @@ -2671,7 +2671,7 @@ DEFUN (show_ipv6_route_addr,    if (ret <= 0)      { -      vty_outln (vty, "Malformed IPv6 address"); +      vty_out (vty, "Malformed IPv6 address\n");        return CMD_WARNING;      } @@ -2682,7 +2682,7 @@ DEFUN (show_ipv6_route_addr,    rn = route_node_match (table, (struct prefix *) &p);    if (! rn)      { -      vty_outln (vty, "%% Network not in table"); +      vty_out (vty, "%% Network not in table\n");        return CMD_WARNING;      } @@ -2718,7 +2718,7 @@ DEFUN (show_ipv6_route_prefix,    if (ret <= 0)      { -      vty_outln (vty, "Malformed IPv6 prefix"); +      vty_out (vty, "Malformed IPv6 prefix\n");        return CMD_WARNING;      } @@ -2729,7 +2729,7 @@ DEFUN (show_ipv6_route_prefix,    rn = route_node_match (table, (struct prefix *) &p);    if (! rn || rn->p.prefixlen != p.prefixlen)      { -      vty_outln (vty, "%% Network not in table"); +      vty_out (vty, "%% Network not in table\n");        return CMD_WARNING;      } @@ -2853,7 +2853,7 @@ DEFUN (show_ipv6_route_vrf_all_addr,    ret = str2prefix_ipv6 (argv[idx_ipv6]->arg, &p);    if (ret <= 0)      { -      vty_outln (vty, "Malformed IPv6 address"); +      vty_out (vty, "Malformed IPv6 address\n");        return CMD_WARNING;      } @@ -2895,7 +2895,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix,    ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &p);    if (ret <= 0)      { -      vty_outln (vty, "Malformed IPv6 prefix"); +      vty_out (vty, "Malformed IPv6 prefix\n");        return CMD_WARNING;      } @@ -3085,14 +3085,14 @@ DEFUN (ip_zebra_import_table_distance,    if (!is_zebra_valid_kernel_table(table_id))      { -      vty_outln (vty, "Invalid routing table ID, %d. Must be in range 1-252", +      vty_out (vty, "Invalid routing table ID, %d. Must be in range 1-252\n",  	      table_id);        return CMD_WARNING;      }    if (is_zebra_main_routing_table(table_id))      { -      vty_outln (vty, "Invalid routing table ID, %d. Must be non-default table", +      vty_out (vty, "Invalid routing table ID, %d. Must be non-default table\n",                table_id);        return CMD_WARNING;      } @@ -3121,13 +3121,13 @@ DEFUN (no_ip_zebra_import_table,    if (!is_zebra_valid_kernel_table(table_id))      { -      vty_outln (vty,"Invalid routing table ID. Must be in range 1-252"); +      vty_out (vty,"Invalid routing table ID. Must be in range 1-252\n");        return CMD_WARNING;      }    if (is_zebra_main_routing_table(table_id))      { -      vty_outln (vty, "Invalid routing table ID, %d. Must be non-default table", +      vty_out (vty, "Invalid routing table ID, %d. Must be non-default table\n",  	      table_id);        return CMD_WARNING;      } @@ -3142,18 +3142,18 @@ static int  config_write_protocol (struct vty *vty)  {    if (allow_delete) -    vty_outln (vty, "allow-external-route-update"); +    vty_out (vty, "allow-external-route-update\n");    if (zebra_rnh_ip_default_route) -    vty_outln (vty, "ip nht resolve-via-default"); +    vty_out (vty, "ip nht resolve-via-default\n");    if (zebra_rnh_ipv6_default_route) -    vty_outln (vty, "ipv6 nht resolve-via-default"); +    vty_out (vty, "ipv6 nht resolve-via-default\n");    enum multicast_mode ipv4_multicast_mode = multicast_mode_ipv4_get ();    if (ipv4_multicast_mode != MCAST_NO_CONFIG) -    vty_outln (vty, "ip multicast rpf-lookup-mode %s", +    vty_out (vty, "ip multicast rpf-lookup-mode %s\n",               ipv4_multicast_mode == MCAST_URIB_ONLY ? "urib-only" : ipv4_multicast_mode == MCAST_MRIB_ONLY ? "mrib-only" : ipv4_multicast_mode == MCAST_MIX_MRIB_FIRST ? "mrib-then-urib" : ipv4_multicast_mode == MCAST_MIX_DISTANCE ? "lower-distance" : "longer-prefix");    zebra_routemap_config_write_protocol(vty); diff --git a/zebra/zserv.c b/zebra/zserv.c index 3da94459f7..bee70f9517 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2678,53 +2678,53 @@ zebra_show_client_detail (struct vty *vty, struct zserv *client)      vty_out (vty, " Instance: %d", client->instance);    vty_out (vty, VTYNL); -  vty_outln (vty, "------------------------ "); -  vty_outln (vty, "FD: %d ", client->sock); -  vty_outln (vty, "Route Table ID: %d ", client->rtm_table); +  vty_out (vty, "------------------------ \n"); +  vty_out (vty, "FD: %d \n", client->sock); +  vty_out (vty, "Route Table ID: %d \n", client->rtm_table); -  vty_outln (vty, "Connect Time: %s ", +  vty_out (vty, "Connect Time: %s \n",  	   zserv_time_buf(&client->connect_time, cbuf, ZEBRA_TIME_BUF));    if (client->nh_reg_time)      { -      vty_outln (vty, "Nexthop Registry Time: %s ", +      vty_out (vty, "Nexthop Registry Time: %s \n",  	       zserv_time_buf(&client->nh_reg_time, nhbuf, ZEBRA_TIME_BUF));        if (client->nh_last_upd_time) -	vty_outln (vty, "Nexthop Last Update Time: %s ", +	vty_out (vty, "Nexthop Last Update Time: %s \n",  		 zserv_time_buf(&client->nh_last_upd_time, mbuf, ZEBRA_TIME_BUF));  	else -		vty_outln (vty, "No Nexthop Update sent"); +		vty_out (vty, "No Nexthop Update sent\n");      }    else -    vty_outln (vty, "Not registered for Nexthop Updates"); +    vty_out (vty, "Not registered for Nexthop Updates\n"); -  vty_outln (vty, "Last Msg Rx Time: %s ", +  vty_out (vty, "Last Msg Rx Time: %s \n",  	   zserv_time_buf(&client->last_read_time, rbuf, ZEBRA_TIME_BUF)); -  vty_outln (vty, "Last Msg Tx Time: %s ", +  vty_out (vty, "Last Msg Tx Time: %s \n",  	   zserv_time_buf(&client->last_write_time, wbuf, ZEBRA_TIME_BUF));    if (client->last_read_time) -    vty_outln (vty, "Last Rcvd Cmd: %s ", +    vty_out (vty, "Last Rcvd Cmd: %s \n",  	     zserv_command_string(client->last_read_cmd));    if (client->last_write_time) -    vty_outln (vty, "Last Sent Cmd: %s ", +    vty_out (vty, "Last Sent Cmd: %s \n",  	     zserv_command_string(client->last_write_cmd));    vty_out (vty, VTYNL); -  vty_outln (vty, "Type        Add        Update     Del "); -  vty_outln (vty, "================================================== "); -  vty_outln (vty, "IPv4        %-12d%-12d%-12d", client->v4_route_add_cnt, +  vty_out (vty, "Type        Add        Update     Del \n"); +  vty_out (vty, "================================================== \n"); +  vty_out (vty, "IPv4        %-12d%-12d%-12d\n", client->v4_route_add_cnt,  	   client->v4_route_upd8_cnt, client->v4_route_del_cnt); -  vty_outln (vty, "IPv6        %-12d%-12d%-12d", client->v6_route_add_cnt, +  vty_out (vty, "IPv6        %-12d%-12d%-12d\n", client->v6_route_add_cnt,  	   client->v6_route_upd8_cnt, client->v6_route_del_cnt); -  vty_outln (vty, "Redist:v4   %-12d%-12d%-12d", client->redist_v4_add_cnt, 0, +  vty_out (vty, "Redist:v4   %-12d%-12d%-12d\n", client->redist_v4_add_cnt, 0,  	   client->redist_v4_del_cnt); -  vty_outln (vty, "Redist:v6   %-12d%-12d%-12d", client->redist_v6_add_cnt, 0, +  vty_out (vty, "Redist:v6   %-12d%-12d%-12d\n", client->redist_v6_add_cnt, 0,  	   client->redist_v6_del_cnt); -  vty_outln (vty, "Connected   %-12d%-12d%-12d", client->ifadd_cnt, 0, +  vty_out (vty, "Connected   %-12d%-12d%-12d\n", client->ifadd_cnt, 0,  	   client->ifdel_cnt); -  vty_outln (vty, "BFD peer    %-12d%-12d%-12d", client->bfd_peer_add_cnt, +  vty_out (vty, "BFD peer    %-12d%-12d%-12d\n", client->bfd_peer_add_cnt,         client->bfd_peer_upd8_cnt, client->bfd_peer_del_cnt); -  vty_outln (vty, "Interface Up Notifications: %d",client->ifup_cnt); -  vty_outln (vty, "Interface Down Notifications: %d",client->ifdown_cnt); +  vty_out (vty, "Interface Up Notifications: %d\n",client->ifup_cnt); +  vty_out (vty, "Interface Down Notifications: %d\n",client->ifdown_cnt);    vty_out (vty, VTYNL);    return; @@ -2736,7 +2736,7 @@ zebra_show_client_brief (struct vty *vty, struct zserv *client)    char cbuf[ZEBRA_TIME_BUF], rbuf[ZEBRA_TIME_BUF];    char wbuf[ZEBRA_TIME_BUF]; -  vty_outln (vty, "%-8s%12s %12s%12s%8d/%-8d%8d/%-8d", +  vty_out (vty, "%-8s%12s %12s%12s%8d/%-8d%8d/%-8d\n",  	   zebra_route_string(client->proto),  	   zserv_time_buf(&client->connect_time, cbuf, ZEBRA_TIME_BUF),  	   zserv_time_buf(&client->last_read_time, rbuf, ZEBRA_TIME_BUF), @@ -2771,7 +2771,7 @@ DEFUN (show_table,         SHOW_STR         "default routing table to use for all clients\n")  { -  vty_outln (vty, "table %d",zebrad.rtm_table_default); +  vty_out (vty, "table %d\n",zebrad.rtm_table_default);    return CMD_SUCCESS;  } @@ -2811,7 +2811,7 @@ DEFUN (ip_forwarding,    if (ret == 0)      { -      vty_outln (vty, "Can't turn on IP forwarding"); +      vty_out (vty, "Can't turn on IP forwarding\n");        return CMD_WARNING;      } @@ -2833,7 +2833,7 @@ DEFUN (no_ip_forwarding,    if (ret != 0)      { -      vty_outln (vty, "Can't turn off IP forwarding"); +      vty_out (vty, "Can't turn off IP forwarding\n");        return CMD_WARNING;      } @@ -2848,10 +2848,10 @@ DEFUN (show_zebra,  {    struct vrf *vrf; -  vty_outln (vty, -             "                            Route      Route      Neighbor   LSP        LSP"); -  vty_outln (vty, -             "VRF                         Installs   Removals    Updates   Installs   Removals"); +  vty_out (vty, +             "                            Route      Route      Neighbor   LSP        LSP\n"); +  vty_out (vty, +             "VRF                         Installs   Removals    Updates   Installs   Removals\n");    RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)      {        struct zebra_vrf *zvrf = vrf->info; @@ -2892,15 +2892,15 @@ DEFUN (show_zebra_client_summary,    struct listnode *node;    struct zserv *client; -  vty_outln (vty, -             "Name    Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes    "); -  vty_outln (vty, -             "--------------------------------------------------------------------------------"); +  vty_out (vty, +             "Name    Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes    \n"); +  vty_out (vty, +             "--------------------------------------------------------------------------------\n");    for (ALL_LIST_ELEMENTS_RO (zebrad.client_list, node, client))      zebra_show_client_brief(vty, client); -  vty_outln (vty, "Routes column shows (added+updated)/deleted"); +  vty_out (vty, "Routes column shows (added+updated)/deleted\n");    return CMD_SUCCESS;  } @@ -2909,7 +2909,7 @@ static int  config_write_table (struct vty *vty)  {    if (zebrad.rtm_table_default) -    vty_outln (vty, "table %d",zebrad.rtm_table_default); +    vty_out (vty, "table %d\n",zebrad.rtm_table_default);    return 0;  } @@ -2934,9 +2934,9 @@ DEFUN (show_ip_forwarding,    ret = ipforward ();    if (ret == 0) -    vty_outln (vty, "IP forwarding is off"); +    vty_out (vty, "IP forwarding is off\n");    else -    vty_outln (vty, "IP forwarding is on"); +    vty_out (vty, "IP forwarding is on\n");    return CMD_SUCCESS;  } @@ -2955,16 +2955,16 @@ DEFUN (show_ipv6_forwarding,    switch (ret)      {      case -1: -      vty_outln (vty, "ipv6 forwarding is unknown"); +      vty_out (vty, "ipv6 forwarding is unknown\n");        break;      case 0: -      vty_outln (vty, "ipv6 forwarding is %s", "off"); +      vty_out (vty, "ipv6 forwarding is %s\n", "off");        break;      case 1: -      vty_outln (vty, "ipv6 forwarding is %s", "on"); +      vty_out (vty, "ipv6 forwarding is %s\n", "on");        break;      default: -      vty_outln (vty, "ipv6 forwarding is %s", "off"); +      vty_out (vty, "ipv6 forwarding is %s\n", "off");        break;      }    return CMD_SUCCESS; @@ -2984,7 +2984,7 @@ DEFUN (ipv6_forwarding,    if (ret == 0)      { -      vty_outln (vty, "Can't turn on IPv6 forwarding"); +      vty_out (vty, "Can't turn on IPv6 forwarding\n");        return CMD_WARNING;      } @@ -3006,7 +3006,7 @@ DEFUN (no_ipv6_forwarding,    if (ret != 0)      { -      vty_outln (vty, "Can't turn off IPv6 forwarding"); +      vty_out (vty, "Can't turn off IPv6 forwarding\n");        return CMD_WARNING;      } @@ -3021,10 +3021,10 @@ config_write_forwarding (struct vty *vty)    router_id_write (vty);    if (!ipforward ()) -    vty_outln (vty, "no ip forwarding"); +    vty_out (vty, "no ip forwarding\n");    if (!ipforward_ipv6 ()) -    vty_outln (vty, "no ipv6 forwarding"); -  vty_outln (vty, "!"); +    vty_out (vty, "no ipv6 forwarding\n"); +  vty_out (vty, "!\n");    return 0;  }  | 
