summaryrefslogtreecommitdiff
path: root/zebra/connected.c
diff options
context:
space:
mode:
authorMark Stapp <mjs.ietf@gmail.com>2021-07-08 10:10:14 -0400
committerMark Stapp <mjs.ietf@gmail.com>2021-09-14 10:31:45 -0400
commit9c86ee1e021f7fbb09c29610de12392ff120e1e7 (patch)
treeeb5cdebb9158d94c9c2e3ff5eeb696abcb4c6481 /zebra/connected.c
parentff45112c07cc07b887691f2ee458987d3c78a3e1 (diff)
lib,zebra: use more const
Use const in ipX_martian apis, and in some zebra apis. Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
Diffstat (limited to 'zebra/connected.c')
-rw-r--r--zebra/connected.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index e1dd0dbdff..0511b35185 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -307,9 +307,10 @@ void connected_up(struct interface *ifp, struct connected *ifc)
}
/* Add connected IPv4 route to the interface. */
-void connected_add_ipv4(struct interface *ifp, int flags, struct in_addr *addr,
- uint16_t prefixlen, struct in_addr *dest,
- const char *label, uint32_t metric)
+void connected_add_ipv4(struct interface *ifp, int flags,
+ const struct in_addr *addr, uint16_t prefixlen,
+ const struct in_addr *dest, const char *label,
+ uint32_t metric)
{
struct prefix_ipv4 *p;
struct connected *ifc;
@@ -502,8 +503,8 @@ static void connected_delete_helper(struct connected *ifc, struct prefix *p)
/* Delete connected IPv4 route to the interface. */
void connected_delete_ipv4(struct interface *ifp, int flags,
- struct in_addr *addr, uint16_t prefixlen,
- struct in_addr *dest)
+ const struct in_addr *addr, uint16_t prefixlen,
+ const struct in_addr *dest)
{
struct prefix p, d;
struct connected *ifc;
@@ -527,8 +528,9 @@ void connected_delete_ipv4(struct interface *ifp, int flags,
}
/* Add connected IPv6 route to the interface. */
-void connected_add_ipv6(struct interface *ifp, int flags, struct in6_addr *addr,
- struct in6_addr *dest, uint16_t prefixlen,
+void connected_add_ipv6(struct interface *ifp, int flags,
+ const struct in6_addr *addr,
+ const struct in6_addr *dest, uint16_t prefixlen,
const char *label, uint32_t metric)
{
struct prefix_ipv6 *p;
@@ -589,8 +591,9 @@ void connected_add_ipv6(struct interface *ifp, int flags, struct in6_addr *addr,
connected_update(ifp, ifc);
}
-void connected_delete_ipv6(struct interface *ifp, struct in6_addr *address,
- struct in6_addr *dest, uint16_t prefixlen)
+void connected_delete_ipv6(struct interface *ifp,
+ const struct in6_addr *address,
+ const struct in6_addr *dest, uint16_t prefixlen)
{
struct prefix p, d;
struct connected *ifc;