"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/bgpctl/output_json.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_json.c  (openbgpd-6.7p0):output_json.c  (openbgpd-6.8p0)
/* $OpenBSD: output_json.c,v 1.2 2020/05/03 18:34:34 claudio Exp $ */ /* $OpenBSD: output_json.c,v 1.3 2020/05/10 13:38:46 deraadt Exp $ */
/* /*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2020 Claudio Jeker <claudio@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 203 skipping to change at line 204
/* capabilities */ /* capabilities */
json_do_bool("announce_capabilities", p->conf.announce_capa); json_do_bool("announce_capabilities", p->conf.announce_capa);
json_neighbor_capabilities(&p->conf.capabilities); json_neighbor_capabilities(&p->conf.capabilities);
json_do_end(); json_do_end();
/* stats */ /* stats */
json_neighbor_stats(p); json_neighbor_stats(p);
/* errors */ /* errors */
if (*(p->conf.shutcomm)) if (*(p->conf.reason))
json_do_printf("my_shutdown_reason", "%s", json_do_printf("my_shutdown_reason", "%s",
log_shutcomm(p->conf.shutcomm)); log_reason(p->conf.reason));
if (*(p->stats.last_shutcomm)) if (*(p->stats.last_reason))
json_do_printf("last_shutdown_reason", "%s", json_do_printf("last_shutdown_reason", "%s",
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)
json_do_printf("last_error_sent", "%s", errstr); json_do_printf("last_error_sent", "%s", 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)
json_do_printf("last_error_received", "%s", errstr); json_do_printf("last_error_received", "%s", errstr);
/* connection info */ /* connection info */
 End of changes. 5 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)