diff options
Diffstat (limited to 'lib/routemap.c')
| -rw-r--r-- | lib/routemap.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 580d898448..14fec0283c 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -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)( @@ -598,7 +598,7 @@ int generic_set_delete(struct vty *vty, struct route_map_index *index, /* Route map rule. This rule has both `match' rule and `set' rule. */ struct route_map_rule { /* Rule type. */ - struct route_map_rule_cmd *cmd; + const struct route_map_rule_cmd *cmd; /* For pretty printing. */ char *rule_str; @@ -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); @@ -1228,22 +1228,22 @@ static struct route_map_rule *route_map_rule_new(void) } /* Install rule command to the match list. */ -void route_map_install_match(struct route_map_rule_cmd *cmd) +void route_map_install_match(const struct route_map_rule_cmd *cmd) { - vector_set(route_match_vec, cmd); + vector_set(route_match_vec, (void *)cmd); } /* Install rule command to the set list. */ -void route_map_install_set(struct route_map_rule_cmd *cmd) +void route_map_install_set(const struct route_map_rule_cmd *cmd) { - vector_set(route_set_vec, cmd); + vector_set(route_set_vec, (void *)cmd); } /* Lookup rule command from match list. */ -static struct route_map_rule_cmd *route_map_lookup_match(const char *name) +static const struct route_map_rule_cmd *route_map_lookup_match(const char *name) { unsigned int i; - struct route_map_rule_cmd *rule; + const struct route_map_rule_cmd *rule; for (i = 0; i < vector_active(route_match_vec); i++) if ((rule = vector_slot(route_match_vec, i)) != NULL) @@ -1253,10 +1253,10 @@ static struct route_map_rule_cmd *route_map_lookup_match(const char *name) } /* Lookup rule command from set list. */ -static struct route_map_rule_cmd *route_map_lookup_set(const char *name) +static const struct route_map_rule_cmd *route_map_lookup_set(const char *name) { unsigned int i; - struct route_map_rule_cmd *rule; + const struct route_map_rule_cmd *rule; for (i = 0; i < vector_active(route_set_vec); i++) if ((rule = vector_slot(route_set_vec, i)) != NULL) @@ -1324,7 +1324,7 @@ const char *route_map_get_match_arg(struct route_map_index *index, const char *match_name) { struct route_map_rule *rule; - struct route_map_rule_cmd *cmd; + const struct route_map_rule_cmd *cmd; /* First lookup rule for add match statement. */ cmd = route_map_lookup_match(match_name); @@ -1396,7 +1396,7 @@ enum rmap_compile_rets route_map_add_match(struct route_map_index *index, { struct route_map_rule *rule; struct route_map_rule *next; - struct route_map_rule_cmd *cmd; + const struct route_map_rule_cmd *cmd; void *compile; int8_t delete_rmap_event_type = 0; const char *rule_key; @@ -1482,7 +1482,7 @@ enum rmap_compile_rets route_map_delete_match(struct route_map_index *index, route_map_event_t type) { struct route_map_rule *rule; - struct route_map_rule_cmd *cmd; + const struct route_map_rule_cmd *cmd; const char *rule_key; cmd = route_map_lookup_match(match_name); @@ -1523,7 +1523,7 @@ enum rmap_compile_rets route_map_add_set(struct route_map_index *index, { struct route_map_rule *rule; struct route_map_rule *next; - struct route_map_rule_cmd *cmd; + const struct route_map_rule_cmd *cmd; void *compile; cmd = route_map_lookup_set(set_name); @@ -1574,7 +1574,7 @@ enum rmap_compile_rets route_map_delete_set(struct route_map_index *index, const char *set_arg) { struct route_map_rule *rule; - struct route_map_rule_cmd *cmd; + const struct route_map_rule_cmd *cmd; cmd = route_map_lookup_set(set_name); if (cmd == NULL) |
