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,
};
. {return yytext[0];}
%%
-YY_BUFFER_STATE buffer;
+static YY_BUFFER_STATE buffer;
void set_lexer_string (yyscan_t *scn, const char *string)
{
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);
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;
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;
}
/* 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);
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)
{
return CMD_SUCCESS;
}
-struct cmd_node nexthop_group_node = {
+static struct cmd_node nexthop_group_node = {
NH_GROUP_NODE,
"%s(config-nh-group)# ",
1
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...
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)(
/* 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)
{
};
/* 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);
/*
* 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)
{
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 *);
}
-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,
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;
}
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)
{
/* 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.