On 2019/09/24 22:06, Sebastian Benoit wrote:
> Claudio Jeker(cje...@diehard.n-r-g.com) on 2019.09.24 17:01:21 +0200:
> > On Tue, Sep 24, 2019 at 03:51:43PM +0100, Stuart Henderson wrote:
> > > On 2019/09/24 11:10, Claudio Jeker wrote:
> > > > On Tue, Sep 24, 2019 at 10:06:51AM +0100, Stuart Henderson wrote:
> > > > > On 2019/09/23 22:48, Stuart Henderson wrote:
> > > > > > "bgpctl XX nei" functions can now take "group XX" - when used as
> > > > > > "show nei group XX terse" you can't tell which entry relates to each
> > > > > > neighbour.
> > > > > > 
> > > > > > OK to add the address to the end of the line where it's reasonably
> > > > > > out of the way of existing parsers?
> > > > > 
> > > > > missing free, pointed out by benno. (not that bgpctl will stick around
> > > > > for long anyway :)
> > > > 
> > > > This is fine with me. I wonder if other data e.g. the peer description 
> > > > or
> > > > peer AS number should be added as well.
> > > 
> > > That might be useful, though as the peer description could contain
> > > spaces we'd want to be reasonably sure we have already included any
> > > other useful data first so that it can go right at the end of the line
> > > (so that parsing the output isn't too awkward).
> > > 
> > 
> > I was thinking the same maybe even put the name in "" to make it look more
> > like a string.
> 
> Yes, that makes it matchable again at least.
> 
> > At least adding the AS number should be done.
> 
> +1
> 
> > 
> > -- 
> > :wq Claudio
> > 
> 

Index: bgpctl.8
===================================================================
RCS file: /cvs/src/usr.sbin/bgpctl/bgpctl.8,v
retrieving revision 1.90
diff -u -p -r1.90 bgpctl.8
--- bgpctl.8    24 Sep 2019 14:46:09 -0000      1.90
+++ bgpctl.8    25 Sep 2019 11:18:28 -0000
@@ -290,7 +290,8 @@ The printed numbers are the sent and rec
 notifications, sent and received updates, sent and received keepalives, and
 sent and received route refresh messages plus the current and maximum
 prefix count, the number of sent and received updates, sent and
-received withdraws, and finally the neighbor's address.
+received withdraws, the neighbor's address (or subnet, for a template),
+AS number, and finally description.
 .It Cm timers
 Show the BGP timers.
 .El
Index: bgpctl.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpctl/bgpctl.c,v
retrieving revision 1.244
diff -u -p -r1.244 bgpctl.c
--- bgpctl.c    24 Sep 2019 14:46:09 -0000      1.244
+++ bgpctl.c    25 Sep 2019 11:18:28 -0000
@@ -619,8 +619,8 @@ show_neighbor_terse(struct imsg *imsg)
                            NULL)
                                err(1, "strdup");
 
-               printf("%llu %llu %llu %llu %llu %llu %llu "
-                   "%llu %llu %llu %u %u %llu %llu %llu %llu %s\n",
+               printf("%llu %llu %llu %llu %llu %llu %llu %llu %llu "
+                   "%llu %u %u %llu %llu %llu %llu %s %s \"%s\"\n",
                    p->stats.msg_sent_open, p->stats.msg_rcvd_open,
                    p->stats.msg_sent_notification,
                    p->stats.msg_rcvd_notification,
@@ -630,7 +630,8 @@ show_neighbor_terse(struct imsg *imsg)
                    p->stats.prefix_cnt, p->conf.max_prefix,
                    p->stats.prefix_sent_update, p->stats.prefix_rcvd_update,
                    p->stats.prefix_sent_withdraw,
-                   p->stats.prefix_rcvd_withdraw, s);
+                   p->stats.prefix_rcvd_withdraw, s,
+                   log_as(p->conf.remote_as), p->conf.descr);
                free(s);
                break;
        case IMSG_CTL_END:

Reply via email to