DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info")
-int bfd_debug = 0;
-struct bfd_gbl bfd_gbl;
+static int bfd_debug = 0;
+static struct bfd_gbl bfd_gbl;
/*
* bfd_gbl_init - Initialize the BFD global structure
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_IFNAME, "Dist-list ifname")
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_NAME, "Dist-list name")
-struct list *dist_ctx_list;
+static struct list *dist_ctx_list;
static struct distribute *distribute_new(void)
{
/*
* Global shared hash table holding reference text for all defined errors.
*/
-pthread_mutex_t refs_mtx = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t refs_mtx = PTHREAD_MUTEX_INITIALIZER;
struct hash *refs;
static bool ferr_hash_cmp(const void *a, const void *b)
void init_cmdgraph(struct vty *, struct graph **);
/** shim interface commands **/
-struct graph *nodegraph = NULL, *nodegraph_free = NULL;
+static struct graph *nodegraph = NULL, *nodegraph_free = NULL;
#define check_nodegraph() \
do { \
DEFINE_MTYPE(LIB, HASH_BACKET, "Hash Bucket")
DEFINE_MTYPE_STATIC(LIB, HASH_INDEX, "Hash Index")
-pthread_mutex_t _hashes_mtx = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t _hashes_mtx = PTHREAD_MUTEX_INITIALIZER;
static struct list *_hashes;
struct hash *hash_create_size(unsigned int size,
DEFINE_HOOK(if_add, (struct interface * ifp), (ifp))
DEFINE_KOOH(if_del, (struct interface * ifp), (ifp))
-/* List of interfaces in only the default VRF */
-int ptm_enable = 0;
-
/* Compare interface names, returning an integer greater than, equal to, or
* less than 0, (following the strcmp convention), according to the
* relationship between ifp1 and ifp2. Interface names consist of an
DEFINE_MTYPE_STATIC(LIB, IF_RMAP, "Interface route map")
DEFINE_MTYPE_STATIC(LIB, IF_RMAP_NAME, "I.f. route map name")
-struct list *if_rmap_ctx_list;
+static struct list *if_rmap_ctx_list;
static struct if_rmap *if_rmap_new(void)
{
#include "queue.h"
#include "imsg.h"
-int imsg_fd_overhead = 0;
+static int imsg_fd_overhead = 0;
-int imsg_get_fd(struct imsgbuf *);
+static int imsg_get_fd(struct imsgbuf *);
#ifndef __OpenBSD__
/*
DEFINE_QOBJ_TYPE(key)
/* Master list of key chain. */
-struct list *keychain_list;
+static struct list *keychain_list;
static struct keychain *keychain_new(void)
{
bool zlog_startup_stderr = true;
/* lock protecting zlog_default for mt-safe zlog */
-pthread_mutex_t loglock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t loglock = PTHREAD_MUTEX_INITIALIZER;
const char *zlog_priority[] = {
"emergencies", "alerts", "critical", "errors", "warnings",
RB_GENERATE(nhgc_entry_head, nexthop_group_cmd, nhgc_entry,
nexthop_group_cmd_compare)
-struct nhgc_entry_head nhgc_entries;
+static struct nhgc_entry_head nhgc_entries;
static inline int
nexthop_group_cmd_compare(const struct nexthop_group_cmd *nhgc1,
/* master signals descriptor struct */
-struct quagga_sigevent_master_t {
+static struct quagga_sigevent_master_t {
struct thread *t;
struct quagga_signal_t *signals;
} while (0);
/* control variable for initializer */
-pthread_once_t init_once = PTHREAD_ONCE_INIT;
+static pthread_once_t init_once = PTHREAD_ONCE_INIT;
pthread_key_t thread_current;
-pthread_mutex_t masters_mtx = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t masters_mtx = PTHREAD_MUTEX_INITIALIZER;
static struct list *masters;
static void thread_free(struct thread_master *master, struct thread *thread);
* Turn on/off debug code
* for vrf.
*/
-int debug_vrf = 0;
+static int debug_vrf = 0;
/* Holding VRF hooks */
struct vrf_master {
static int no_password_check = 0;
/* Integrated configuration file path */
-char integrate_default[] = SYSCONFDIR INTEGRATE_DEFAULT_CONFIG;
+static char integrate_default[] = SYSCONFDIR INTEGRATE_DEFAULT_CONFIG;
static int do_log_commands = 0;
#endif
/* Exported variables */
-extern char integrate_default[];
extern struct vty *vty_exclusive_lock;
/* Prototypes. */
/* Prototype for event manager. */
static void zclient_event(enum event, struct zclient *);
+struct zclient_options zclient_options_default = {.receive_notify = false};
+
struct sockaddr_storage zclient_addr;
socklen_t zclient_addr_len;
/* This file local debug flag. */
-int zclient_debug = 0;
-
-struct zclient_options zclient_options_default = {.receive_notify = false};
+static int zclient_debug;
/* Allocate zclient structure. */
struct zclient *zclient_new(struct thread_master *master,