diff options
author | Mark Stapp <mjs@voltanet.io> | 2018-07-12 22:05:19 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2018-07-23 16:34:35 +0200 |
commit | 123214efb82f6348cd80c387be15a1e2e21ce63e (patch) | |
tree | 9120c8e331acfb05b30eed616f34967fae8b30c0 /ripd/rip_routemap.c | |
parent | Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanup (diff) | |
download | frr-123214efb82f6348cd80c387be15a1e2e21ce63e.tar.xz frr-123214efb82f6348cd80c387be15a1e2e21ce63e.zip |
libs, daemons: use const in route-map apply
Use 'const prefix *' in route-map apply apis; led to some
corresponding changes in several daemons.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ripd/rip_routemap.c')
-rw-r--r-- | ripd/rip_routemap.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index 2c0232487..88473c164 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -58,7 +58,8 @@ static void rip_route_map_update(const char *notused) /* `match metric METRIC' */ /* Match function return 1 if match is success else return zero. */ -static route_map_result_t route_match_metric(void *rule, struct prefix *prefix, +static route_map_result_t route_match_metric(void *rule, + const struct prefix *prefix, route_map_object_t type, void *object) { @@ -111,7 +112,7 @@ struct route_map_rule_cmd route_match_metric_cmd = { /* `match interface IFNAME' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t route_match_interface(void *rule, - struct prefix *prefix, + const struct prefix *prefix, route_map_object_t type, void *object) { @@ -159,7 +160,7 @@ struct route_map_rule_cmd route_match_interface_cmd = { /* Match function return 1 if match is success else return zero. */ static route_map_result_t route_match_ip_next_hop(void *rule, - struct prefix *prefix, + const struct prefix *prefix, route_map_object_t type, void *object) { @@ -206,7 +207,7 @@ static struct route_map_rule_cmd route_match_ip_next_hop_cmd = { /* `match ip next-hop prefix-list PREFIX_LIST' */ static route_map_result_t -route_match_ip_next_hop_prefix_list(void *rule, struct prefix *prefix, +route_match_ip_next_hop_prefix_list(void *rule, const struct prefix *prefix, route_map_object_t type, void *object) { struct prefix_list *plist; @@ -251,7 +252,7 @@ static struct route_map_rule_cmd route_match_ip_next_hop_prefix_list_cmd = { /* Match function should return 1 if match is success else return zero. */ static route_map_result_t route_match_ip_address(void *rule, - struct prefix *prefix, + const struct prefix *prefix, route_map_object_t type, void *object) { @@ -290,7 +291,7 @@ static struct route_map_rule_cmd route_match_ip_address_cmd = { /* `match ip address prefix-list PREFIX_LIST' */ static route_map_result_t -route_match_ip_address_prefix_list(void *rule, struct prefix *prefix, +route_match_ip_address_prefix_list(void *rule, const struct prefix *prefix, route_map_object_t type, void *object) { struct prefix_list *plist; @@ -324,7 +325,7 @@ static struct route_map_rule_cmd route_match_ip_address_prefix_list_cmd = { /* `match tag TAG' */ /* Match function return 1 if match is success else return zero. */ -static route_map_result_t route_match_tag(void *rule, struct prefix *prefix, +static route_map_result_t route_match_tag(void *rule, const struct prefix *p, route_map_object_t type, void *object) { route_tag_t *tag; @@ -354,7 +355,8 @@ static struct route_map_rule_cmd route_match_tag_cmd = { /* `set metric METRIC' */ /* Set metric to attribute. */ -static route_map_result_t route_set_metric(void *rule, struct prefix *prefix, +static route_map_result_t route_set_metric(void *rule, + const struct prefix *prefix, route_map_object_t type, void *object) { @@ -453,7 +455,7 @@ static struct route_map_rule_cmd route_set_metric_cmd = { /* Set nexthop to object. ojbect must be pointer to struct attr. */ static route_map_result_t route_set_ip_nexthop(void *rule, - struct prefix *prefix, + const struct prefix *prefix, route_map_object_t type, void *object) { @@ -505,7 +507,7 @@ static struct route_map_rule_cmd route_set_ip_nexthop_cmd = { /* `set tag TAG' */ /* Set tag to object. ojbect must be pointer to struct attr. */ -static route_map_result_t route_set_tag(void *rule, struct prefix *prefix, +static route_map_result_t route_set_tag(void *rule, const struct prefix *prefix, route_map_object_t type, void *object) { route_tag_t *tag; |