]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: reduce exported var symbols
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 3 Apr 2019 20:34:18 +0000 (20:34 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 3 Apr 2019 20:34:18 +0000 (20:34 +0000)
Don't need these in our DSO tables

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
17 files changed:
lib/bfd.c
lib/distribute.c
lib/ferr.c
lib/grammar_sandbox.c
lib/hash.c
lib/if.c
lib/if_rmap.c
lib/imsg.c
lib/keychain.c
lib/log.c
lib/nexthop_group.c
lib/sigevent.c
lib/thread.c
lib/vrf.c
lib/vty.c
lib/vty.h
lib/zclient.c

index 178c203f5e9f64ca66fdcbe617a95e8723ef570f..7e27a64de7bcc20f490b61e3240d0fc945977065 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -34,8 +34,8 @@
 
 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
index fa8ac5242ed6aa13584b898cc8e7eb792c54fec5..be40bd2603d5acf78b16e0632aca5e53279d417e 100644 (file)
@@ -32,7 +32,7 @@ DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE, "Distribute list")
 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)
 {
index e18597afb07c0a92537c26909516b1b4faa47983..d7fa1a84f8955960e010cb7a673368262103dc9b 100644 (file)
@@ -61,7 +61,7 @@ static void err_key_fini(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)
index 20d5879c67784278225635c000c540bc00ccf3d7..c6fd3c04adece80ad9f8930e56f15a5e62935a12 100644 (file)
@@ -44,7 +44,7 @@ void pretty_print_graph(struct vty *vty, struct graph_node *, int, int,
 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 {                                                                   \
index c02b81814cc0b509ed1d52da6c727b11b6dda70d..884c8f22af72baabc740bc0af1f758bded705f05 100644 (file)
@@ -33,7 +33,7 @@ DEFINE_MTYPE(LIB, HASH, "Hash")
 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,
index 5b1473af40907408fb9ed1d29afce6fe66838313..5fdeb4540bb2598d3bf85b390d3859900ff020d2 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -56,9 +56,6 @@ DEFINE_QOBJ_TYPE(interface)
 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
index 955c1417c4f47680480c04862e7e4572c1347cfb..d8236b6b255e3829c446dea3ad6d27b9da18111d 100644 (file)
@@ -31,7 +31,7 @@ DEFINE_MTYPE_STATIC(LIB, IF_RMAP_CTX_NAME, "Interface route map container name")
 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)
 {
index 57e70617d27849497d45d566112fcbf43ae884ae..f07c56f0a64500b009fe6fa9766bc1f4b51b9abf 100644 (file)
@@ -22,9 +22,9 @@
 #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__
 /*
index 0a96c4cf0e2115894bbf74a9c6adb89670b64db4..fc9f0f9cfa95f811a2fef15ab96860babb8edd82 100644 (file)
@@ -32,7 +32,7 @@ DEFINE_QOBJ_TYPE(keychain)
 DEFINE_QOBJ_TYPE(key)
 
 /* Master list of key chain. */
-struct list *keychain_list;
+static struct list *keychain_list;
 
 static struct keychain *keychain_new(void)
 {
index cf623a4c19bbdfbfb946df5efd8356dfadb3d6db..8724e0db9349b64618b58568869ce1519a961a7d 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -57,7 +57,7 @@ struct zlog *zlog_default = NULL;
 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",
index 27ab04279c1cc3617dca745fd3b19c2f54def98c..dbc333778593ca02d3fde497ade6082944400af6 100644 (file)
@@ -49,7 +49,7 @@ nexthop_group_cmd_compare(const struct nexthop_group_cmd *nhgc1,
 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,
index 57b41503e1c142d5c4c6b7b8f18da96c80ae8225..f00ff4921e59ecd1757b2eaf7517034a55e8061b 100644 (file)
@@ -38,7 +38,7 @@
 
 
 /* master signals descriptor struct */
-struct quagga_sigevent_master_t {
+static struct quagga_sigevent_master_t {
        struct thread *t;
 
        struct quagga_signal_t *signals;
index 19ab409439945c415e86913b9d98779780bc2520..4bd61b78c8a102ad8e50c9b2b3ee80279fd43f6d 100644 (file)
@@ -52,10 +52,10 @@ DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats")
        } 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);
index dd87ed63e810b7cf5a7107ac2330f42f2445ad4b..bc289be9c0c2481b45da71bad39f8cbf5fde8f9f 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -64,7 +64,7 @@ static char vrf_default_name[VRF_NAMSIZ] = VRF_DEFAULT_NAME_INTERNAL;
  * Turn on/off debug code
  * for vrf.
  */
-int debug_vrf = 0;
+static int debug_vrf = 0;
 
 /* Holding VRF hooks  */
 struct vrf_master {
index 0bcee6a80141d7b1407895586d27ff6b44ee0ec9..dae8e825993ba84356c3ef5797bc2221400a2d00 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -93,7 +93,7 @@ struct vty *vty_exclusive_lock;
 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;
 
index ca5a2003c46402940ec7fae86c2159cffd1e2d6f..9c2653e1ac0ded45a43a604adbb9f5a63a5bcf69 100644 (file)
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -290,7 +290,6 @@ struct vty_arg {
 #endif
 
 /* Exported variables */
-extern char integrate_default[];
 extern struct vty *vty_exclusive_lock;
 
 /* Prototypes. */
index 3e26cd9e6c42cc512ce821b03610901e449b17b6..92a9d5ef3153923b31bf6340d4575826e55b5406 100644 (file)
@@ -49,13 +49,13 @@ enum event { ZCLIENT_SCHEDULE, ZCLIENT_READ, ZCLIENT_CONNECT };
 /* 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,