mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 07:36:46 +00:00
lib: make some variables static
Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
33de8d1dd0
commit
1b3e9a21dd
@ -41,7 +41,7 @@ static void agg_node_destroy(route_table_delegate_t *delegate,
|
||||
XFREE(MTYPE_TMP, anode);
|
||||
}
|
||||
|
||||
route_table_delegate_t agg_table_delegate = {
|
||||
static route_table_delegate_t agg_table_delegate = {
|
||||
.create_node = agg_node_create,
|
||||
.destroy_node = agg_node_destroy,
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ RANGE \({NUMBER}[ ]?\-[ ]?{NUMBER}\)
|
||||
. {return yytext[0];}
|
||||
%%
|
||||
|
||||
YY_BUFFER_STATE buffer;
|
||||
static YY_BUFFER_STATE buffer;
|
||||
|
||||
void set_lexer_string (yyscan_t *scn, const char *string)
|
||||
{
|
||||
|
2
lib/if.c
2
lib/if.c
@ -58,7 +58,7 @@ DEFINE_QOBJ_TYPE(interface)
|
||||
DEFINE_HOOK(if_add, (struct interface * ifp), (ifp))
|
||||
DEFINE_KOOH(if_del, (struct interface * ifp), (ifp))
|
||||
|
||||
struct interface_master{
|
||||
static struct interface_master{
|
||||
int (*create_hook)(struct interface *ifp);
|
||||
int (*up_hook)(struct interface *ifp);
|
||||
int (*down_hook)(struct interface *ifp);
|
||||
|
@ -51,7 +51,7 @@ static struct ns *ns_lookup_name_internal(const char *name);
|
||||
|
||||
RB_GENERATE(ns_head, ns, entry, ns_compare)
|
||||
|
||||
struct ns_head ns_tree = RB_INITIALIZER(&ns_tree);
|
||||
static struct ns_head ns_tree = RB_INITIALIZER(&ns_tree);
|
||||
|
||||
static struct ns *default_ns;
|
||||
static int ns_current_ns_fd;
|
||||
@ -74,7 +74,8 @@ static inline int ns_map_compare(const struct ns_map_nsid *a,
|
||||
RB_HEAD(ns_map_nsid_head, ns_map_nsid);
|
||||
RB_PROTOTYPE(ns_map_nsid_head, ns_map_nsid, id_entry, ns_map_compare);
|
||||
RB_GENERATE(ns_map_nsid_head, ns_map_nsid, id_entry, ns_map_compare);
|
||||
struct ns_map_nsid_head ns_map_nsid_list = RB_INITIALIZER(&ns_map_nsid_list);
|
||||
static struct ns_map_nsid_head ns_map_nsid_list =
|
||||
RB_INITIALIZER(&ns_map_nsid_list);
|
||||
|
||||
static ns_id_t ns_id_external_numbering;
|
||||
|
||||
@ -123,7 +124,7 @@ static int have_netns(void)
|
||||
}
|
||||
|
||||
/* Holding NS hooks */
|
||||
struct ns_master {
|
||||
static struct ns_master {
|
||||
int (*ns_new_hook)(struct ns *ns);
|
||||
int (*ns_delete_hook)(struct ns *ns);
|
||||
int (*ns_enable_hook)(struct ns *ns);
|
||||
|
@ -34,7 +34,7 @@ static inline int ns_compare(const struct ns *ns, const struct ns *ns2);
|
||||
|
||||
RB_GENERATE(ns_head, ns, entry, ns_compare)
|
||||
|
||||
struct ns_head ns_tree = RB_INITIALIZER(&ns_tree);
|
||||
static struct ns_head ns_tree = RB_INITIALIZER(&ns_tree);
|
||||
|
||||
static inline int ns_compare(const struct ns *a, const struct ns *b)
|
||||
{
|
||||
|
@ -752,7 +752,7 @@ DEFPY(ecmp_nexthops, ecmp_nexthops_cmd,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
struct cmd_node nexthop_group_node = {
|
||||
static struct cmd_node nexthop_group_node = {
|
||||
NH_GROUP_NODE,
|
||||
"%s(config-nh-group)# ",
|
||||
1
|
||||
|
2
lib/ns.h
2
lib/ns.h
@ -71,8 +71,6 @@ struct ns {
|
||||
RB_HEAD(ns_head, ns);
|
||||
RB_PROTOTYPE(ns_head, ns, entry, ns_compare)
|
||||
|
||||
extern struct ns_head ns_tree;
|
||||
|
||||
/*
|
||||
* API for managing NETNS. eg from zebra daemon
|
||||
* one want to manage the list of NETNS, etc...
|
||||
|
@ -221,7 +221,7 @@ struct route_map_match_set_hooks {
|
||||
const char *command, const char *arg);
|
||||
};
|
||||
|
||||
struct route_map_match_set_hooks rmap_match_set_hook;
|
||||
static struct route_map_match_set_hooks rmap_match_set_hook;
|
||||
|
||||
/* match interface */
|
||||
void route_map_match_interface_hook(int (*func)(
|
||||
@ -623,7 +623,7 @@ struct route_map_list {
|
||||
|
||||
/* Master list of route map. */
|
||||
static struct route_map_list route_map_master = {NULL, NULL, NULL, NULL, NULL};
|
||||
struct hash *route_map_master_hash = NULL;
|
||||
static struct hash *route_map_master_hash = NULL;
|
||||
|
||||
static unsigned int route_map_hash_key_make(const void *p)
|
||||
{
|
||||
@ -683,7 +683,7 @@ struct route_map_dep_data {
|
||||
};
|
||||
|
||||
/* Hashes maintaining dependency between various sublists used by route maps */
|
||||
struct hash *route_map_dep_hash[ROUTE_MAP_DEP_MAX];
|
||||
static struct hash *route_map_dep_hash[ROUTE_MAP_DEP_MAX];
|
||||
|
||||
static unsigned int route_map_dep_hash_make_key(const void *p);
|
||||
static void route_map_clear_all_references(char *rmap_name);
|
||||
|
@ -93,8 +93,8 @@ void systemd_send_stopping(void)
|
||||
/*
|
||||
* How many seconds should we wait between watchdog sends
|
||||
*/
|
||||
int wsecs = 0;
|
||||
struct thread_master *systemd_master = NULL;
|
||||
static int wsecs = 0;
|
||||
static struct thread_master *systemd_master = NULL;
|
||||
|
||||
static int systemd_send_watchdog(struct thread *t)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ static char vrf_default_name[VRF_NAMSIZ] = VRF_DEFAULT_NAME_INTERNAL;
|
||||
static int debug_vrf = 0;
|
||||
|
||||
/* Holding VRF hooks */
|
||||
struct vrf_master {
|
||||
static struct vrf_master {
|
||||
int (*vrf_new_hook)(struct vrf *);
|
||||
int (*vrf_delete_hook)(struct vrf *);
|
||||
int (*vrf_enable_hook)(struct vrf *);
|
||||
@ -752,7 +752,7 @@ DEFUN (no_vrf,
|
||||
}
|
||||
|
||||
|
||||
struct cmd_node vrf_node = {VRF_NODE, "%s(config-vrf)# ", 1};
|
||||
static struct cmd_node vrf_node = {VRF_NODE, "%s(config-vrf)# ", 1};
|
||||
|
||||
DEFUN_NOSH (vrf_netns,
|
||||
vrf_netns_cmd,
|
||||
|
@ -89,7 +89,7 @@ static char *vty_ipv6_accesslist_name = NULL;
|
||||
static vector Vvty_serv_thread;
|
||||
|
||||
/* Current directory. */
|
||||
char vty_cwd[MAXPATHLEN];
|
||||
static char vty_cwd[MAXPATHLEN];
|
||||
|
||||
/* Login password check. */
|
||||
static int no_password_check = 0;
|
||||
|
@ -87,7 +87,7 @@ static inline int yang_module_compare(const struct yang_module *a,
|
||||
}
|
||||
RB_GENERATE(yang_modules, yang_module, entry, yang_module_compare)
|
||||
|
||||
struct yang_modules yang_modules = RB_INITIALIZER(&yang_modules);
|
||||
static struct yang_modules yang_modules = RB_INITIALIZER(&yang_modules);
|
||||
|
||||
struct yang_module *yang_module_load(const char *module_name)
|
||||
{
|
||||
|
@ -114,9 +114,6 @@ typedef int (*yang_iterate_cb)(const struct lys_node *snode, void *arg);
|
||||
/* Global libyang context for native FRR models. */
|
||||
extern struct ly_ctx *ly_native_ctx;
|
||||
|
||||
/* Tree of all loaded YANG modules. */
|
||||
extern struct yang_modules yang_modules;
|
||||
|
||||
/*
|
||||
* Create a new YANG module and load it using libyang. If the YANG module is not
|
||||
* found in the YANG_MODELS_PATH directory, the program will exit with an error.
|
||||
|
Loading…
Reference in New Issue
Block a user