"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/bgpctl/output.c" between
openbgpd-6.7p0.tar.gz and openbgpd-6.8p0.tar.gz

About: OpenBGPD is a Border Gateway Protocol (BGP) daemon which manages the network routing tables. Its main purpose is to exchange information concerning "network reachability" with other BGP systems.

output.c  (openbgpd-6.7p0):output.c  (openbgpd-6.8p0)
/* $OpenBSD: output.c,v 1.8 2020/05/02 14:28:10 claudio Exp $ */ /* $OpenBSD: output.c,v 1.9 2020/05/10 13:38:46 deraadt Exp $ */
/* /*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
* Copyright (c) 2004-2019 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2004-2019 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2016 Job Snijders <job@instituut.net> * Copyright (c) 2016 Job Snijders <job@instituut.net>
* Copyright (c) 2016 Peter Hessler <phessler@openbsd.org> * Copyright (c) 2016 Peter Hessler <phessler@openbsd.org>
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies. * copyright notice and this permission notice appear in all copies.
* *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#include <endian.h>
#include <err.h> #include <err.h>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "bgpd.h" #include "bgpd.h"
#include "session.h" #include "session.h"
#include "rde.h" #include "rde.h"
skipping to change at line 264 skipping to change at line 265
if (p->state == STATE_ESTABLISHED) { if (p->state == STATE_ESTABLISHED) {
ina.s_addr = p->remote_bgpid; ina.s_addr = p->remote_bgpid;
printf(" BGP version 4, remote router-id %s", printf(" BGP version 4, remote router-id %s",
inet_ntoa(ina)); inet_ntoa(ina));
printf("%s\n", fmt_auth_method(p->auth.method)); printf("%s\n", fmt_auth_method(p->auth.method));
} }
printf(" BGP state = %s", statenames[p->state]); printf(" BGP state = %s", statenames[p->state]);
if (p->conf.down) { if (p->conf.down) {
printf(", marked down"); printf(", marked down");
} }
if (*(p->conf.shutcomm)) { if (*(p->conf.reason)) {
printf(" with shutdown reason \"%s\"", printf(" with shutdown reason \"%s\"",
log_shutcomm(p->conf.shutcomm)); log_reason(p->conf.reason));
} }
if (p->stats.last_updown != 0) if (p->stats.last_updown != 0)
printf(", %s for %s", printf(", %s for %s",
p->state == STATE_ESTABLISHED ? "up" : "down", p->state == STATE_ESTABLISHED ? "up" : "down",
fmt_monotime(p->stats.last_updown)); fmt_monotime(p->stats.last_updown));
printf("\n"); printf("\n");
printf(" Last read %s, holdtime %us, keepalive interval %us\n", printf(" Last read %s, holdtime %us, keepalive interval %us\n",
fmt_monotime(p->stats.last_read), fmt_monotime(p->stats.last_read),
p->holdtime, p->holdtime/3); p->holdtime, p->holdtime/3);
printf(" Last write %s\n", fmt_monotime(p->stats.last_write)); printf(" Last write %s\n", fmt_monotime(p->stats.last_write));
skipping to change at line 299 skipping to change at line 300
if (p->capa.peer.as4byte) if (p->capa.peer.as4byte)
printf(" 4-byte AS numbers\n"); printf(" 4-byte AS numbers\n");
} }
printf("\n"); printf("\n");
if (res->action == SHOW_NEIGHBOR_TIMERS) if (res->action == SHOW_NEIGHBOR_TIMERS)
return; return;
show_neighbor_msgstats(p); show_neighbor_msgstats(p);
printf("\n"); printf("\n");
if (*(p->stats.last_shutcomm)) { if (*(p->stats.last_reason)) {
printf(" Last received shutdown reason: \"%s\"\n", printf(" Last received shutdown reason: \"%s\"\n",
log_shutcomm(p->stats.last_shutcomm)); log_reason(p->stats.last_reason));
} }
errstr = fmt_errstr(p->stats.last_sent_errcode, errstr = fmt_errstr(p->stats.last_sent_errcode,
p->stats.last_sent_suberr); p->stats.last_sent_suberr);
if (errstr) if (errstr)
printf(" Last error sent: %s\n", errstr); printf(" Last error sent: %s\n", errstr);
errstr = fmt_errstr(p->stats.last_rcvd_errcode, errstr = fmt_errstr(p->stats.last_rcvd_errcode,
p->stats.last_rcvd_suberr); p->stats.last_rcvd_suberr);
if (errstr) if (errstr)
printf(" Last error received: %s\n", errstr); printf(" Last error received: %s\n", errstr);
 End of changes. 6 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)