summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-19 11:58:52 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-11-19 11:58:52 +0100
commit6a49d0cc12ff5192291bcc4e5c7ac8bec5c1e78c (patch)
tree00b9d1256ecc602a3c1a1cedd49b65d9ad96733e
parentc5d9d3bb361a7ccf58c3a75ce20d48dcde51210a (diff)
parent50e24903ba3e90d3502428eaa1bdb961de305c72 (diff)
Merge remote-tracking branch 'cmaster-next' into cmaster-next-releng
-rw-r--r--bgpd/bgp_vty.c24
-rw-r--r--lib/bitfield.h20
-rw-r--r--lib/csv.c20
-rw-r--r--lib/csv.h21
-rw-r--r--lib/ptm_lib.c21
-rw-r--r--lib/ptm_lib.h24
-rwxr-xr-xtools/cmd_check.py20
-rwxr-xr-xtools/quagga-reload.py21
-rw-r--r--zebra/zebra_rnh_null.c20
9 files changed, 169 insertions, 22 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 4164318220..5dafac1e06 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -12387,8 +12387,9 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (use_json)
{
- json_object_int_add(json_hold, "connectionsEstablished", p->established);
- json_object_int_add(json_hold, "connectionsDropped", p->dropped);
+ json_object_object_add(json_neigh, "addressFamilyInfo", json_hold);
+ json_object_int_add(json_neigh, "connectionsEstablished", p->established);
+ json_object_int_add(json_neigh, "connectionsDropped", p->dropped);
}
else
vty_out (vty, " Connections established %d; dropped %d%s", p->established, p->dropped,
@@ -12397,7 +12398,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (! p->last_reset)
{
if (use_json)
- json_object_string_add(json_hold, "lastReset", "never");
+ json_object_string_add(json_neigh, "lastReset", "never");
else
vty_out (vty, " Last reset never%s", VTY_NEWLINE);
}
@@ -12411,13 +12412,13 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
uptime = bgp_clock();
uptime -= p->resettime;
tm = gmtime(&uptime);
- json_object_int_add(json_hold, "lastResetTimerMsecs", (tm->tm_sec * 1000) + (tm->tm_min * 60000) + (tm->tm_hour * 3600000));
- json_object_string_add(json_hold, "lastResetDueTo", peer_down_str[(int) p->last_reset]);
+ json_object_int_add(json_neigh, "lastResetTimerMsecs", (tm->tm_sec * 1000) + (tm->tm_min * 60000) + (tm->tm_hour * 3600000));
+ json_object_string_add(json_neigh, "lastResetDueTo", peer_down_str[(int) p->last_reset]);
if (p->last_reset_cause_size)
{
char errorcodesubcode_hexstr[5];
sprintf(errorcodesubcode_hexstr, "%02X%02X", p->notify.code, p->notify.subcode);
- json_object_string_add(json_hold, "lastErrorCodeSubcode", errorcodesubcode_hexstr);
+ json_object_string_add(json_neigh, "lastErrorCodeSubcode", errorcodesubcode_hexstr);
}
}
else
@@ -12468,7 +12469,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (CHECK_FLAG (p->sflags, PEER_STATUS_PREFIX_OVERFLOW))
{
if (use_json)
- json_object_boolean_true_add(json_hold, "prefixesConfigExceedMax");
+ json_object_boolean_true_add(json_neigh, "prefixesConfigExceedMax");
else
vty_out (vty, " Peer had exceeded the max. no. of prefixes configured.%s", VTY_NEWLINE);
@@ -12476,8 +12477,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
{
if (use_json)
{
- json_object_boolean_true_add(json_hold, "reducePrefixNumFrom");
- json_object_int_add(json_hold, "restartInTimerMsec", thread_timer_remain_second (p->t_pmax_restart) * 1000);
+ json_object_boolean_true_add(json_neigh, "reducePrefixNumFrom");
+ json_object_int_add(json_neigh, "restartInTimerMsec", thread_timer_remain_second (p->t_pmax_restart) * 1000);
}
else
vty_out (vty, " Reduce the no. of prefix from %s, will restart in %ld seconds%s",
@@ -12487,16 +12488,13 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
else
{
if (use_json)
- json_object_boolean_true_add(json_hold, "reducePrefixNumAndClearIpBgp");
+ json_object_boolean_true_add(json_neigh, "reducePrefixNumAndClearIpBgp");
else
vty_out (vty, " Reduce the no. of prefix and clear ip bgp %s to restore peering%s",
p->host, VTY_NEWLINE);
}
}
- if (use_json)
- json_object_object_add(json_neigh, "addressFamilyInfo", json_hold);
-
/* EBGP Multihop and GTSM */
if (p->sort != BGP_PEER_IBGP)
{
diff --git a/lib/bitfield.h b/lib/bitfield.h
index 5bf2c8bd06..7062796a99 100644
--- a/lib/bitfield.h
+++ b/lib/bitfield.h
@@ -1,3 +1,23 @@
+/* Bitfields
+ * Copyright (C) 2016 Cumulus Networks, Inc.
+ *
+ * This file is part of Quagga.
+ *
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Quagga; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
/**
* A simple bit array implementation to allocate and free IDs. An example
* of its usage is in allocating link state IDs for OSPFv3 as OSPFv3 has
diff --git a/lib/csv.c b/lib/csv.c
index b90a8a9b92..7df9292647 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -1,3 +1,23 @@
+/* CSV
+ * Copyright (C) 2013 Cumulus Networks, Inc.
+ *
+ * This file is part of Quagga.
+ *
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Quagga; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/csv.h b/lib/csv.h
index 078f390873..3fb4453761 100644
--- a/lib/csv.h
+++ b/lib/csv.h
@@ -1,4 +1,23 @@
-/* Copyright 2013 Cumulus Networks, LLC. All rights reserved. */
+/* CSV
+ * Copyright (C) 2013 Cumulus Networks, Inc.
+ *
+ * This file is part of Quagga.
+ *
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Quagga; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
#ifndef __CSV_H__
#define __CSV_H__
diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c
index bcf0be623d..0666797fad 100644
--- a/lib/ptm_lib.c
+++ b/lib/ptm_lib.c
@@ -1,10 +1,23 @@
-/*********************************************************************
- * Copyright 2015 Cumulus Networks, LLC. All rights reserved.
+/* PTM Library
+ * Copyright (C) 2015 Cumulus Networks, Inc.
*
- * library file used by clients for sending commands and parsing response
+ * This file is part of Quagga.
*
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Quagga; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
*/
-
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
diff --git a/lib/ptm_lib.h b/lib/ptm_lib.h
index e79529a819..be4170bb37 100644
--- a/lib/ptm_lib.h
+++ b/lib/ptm_lib.h
@@ -1,9 +1,25 @@
-/*********************************************************************
- * Copyright 2015 Cumulus Networks, LLC. All rights reserved.
+/* PTM Library
+ * Copyright (C) 2015 Cumulus Networks, Inc.
*
- * library file used by clients for sending commands and parsing response
+ * This file is part of Quagga.
*
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Quagga; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
*/
+#ifndef __PTM_LIB_H__
+#define __PTM_LIB_H__
#define PTMLIB_MSG_SZ 1024
#define PTMLIB_MSG_HDR_LEN 37
@@ -47,3 +63,5 @@ int ptm_lib_find_key_in_msg(void *, const char *, char *);
int ptm_lib_init_msg(ptm_lib_handle_t *, int, int, void *, void **);
int ptm_lib_append_msg(ptm_lib_handle_t *, void *, const char *, const char *);
int ptm_lib_complete_msg(ptm_lib_handle_t *, void *, char *, int *);
+
+#endif
diff --git a/tools/cmd_check.py b/tools/cmd_check.py
index 5bd8032b70..bfe90c4392 100755
--- a/tools/cmd_check.py
+++ b/tools/cmd_check.py
@@ -1,4 +1,24 @@
#!/usr/bin/python3
+# Command Checker
+# Copyright (C) 2016 Cumulus Networks, Inc.
+#
+# This file is part of Quagga.
+#
+# Quagga is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# Quagga is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Quagga; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
# Parses a source file, ensuring that CLI definitions (DEFUNs, ALIASs, etc)
# have install_command called on them at some point.
diff --git a/tools/quagga-reload.py b/tools/quagga-reload.py
index ed36b940a9..4d6e9259fd 100755
--- a/tools/quagga-reload.py
+++ b/tools/quagga-reload.py
@@ -1,5 +1,24 @@
#!/usr/bin/python
-
+# Quagga Reloader
+# Copyright (C) 2014 Cumulus Networks, Inc.
+#
+# This file is part of Quagga.
+#
+# Quagga is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# Quagga is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Quagga; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
"""
This program
- reads a quagga configuration text file
diff --git a/zebra/zebra_rnh_null.c b/zebra/zebra_rnh_null.c
index 3ec8be027d..eecb8519d5 100644
--- a/zebra/zebra_rnh_null.c
+++ b/zebra/zebra_rnh_null.c
@@ -1,3 +1,23 @@
+/* Zebra next hop tracking code
+ * Copyright (C) 2013 Cumulus Networks, Inc.
+ *
+ * This file is part of Quagga.
+ *
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Quagga; see the file COPYING. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
#include <zebra.h>
#include "zebra/rib.h"
#include "zebra/zserv.h"