forked from Mirror/frr
lib: constify read only parameters
Constify some BFD library function parameters to signalize they are not going to get modified. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
ae09457333
commit
ca30ac7fc3
|
@ -552,7 +552,8 @@ static bool bfd_sess_address_changed(const struct bfd_session_params *bsp,
|
|||
}
|
||||
|
||||
void bfd_sess_set_ipv4_addrs(struct bfd_session_params *bsp,
|
||||
struct in_addr *src, struct in_addr *dst)
|
||||
const struct in_addr *src,
|
||||
const struct in_addr *dst)
|
||||
{
|
||||
if (!bfd_sess_address_changed(bsp, AF_INET, (struct in6_addr *)src,
|
||||
(struct in6_addr *)dst))
|
||||
|
@ -576,7 +577,8 @@ void bfd_sess_set_ipv4_addrs(struct bfd_session_params *bsp,
|
|||
}
|
||||
|
||||
void bfd_sess_set_ipv6_addrs(struct bfd_session_params *bsp,
|
||||
struct in6_addr *src, struct in6_addr *dst)
|
||||
const struct in6_addr *src,
|
||||
const struct in6_addr *dst)
|
||||
{
|
||||
if (!bfd_sess_address_changed(bsp, AF_INET6, src, dst))
|
||||
return;
|
||||
|
|
|
@ -124,7 +124,8 @@ void bfd_sess_free(struct bfd_session_params **bsp);
|
|||
* \param dst remote address (mandatory).
|
||||
*/
|
||||
void bfd_sess_set_ipv4_addrs(struct bfd_session_params *bsp,
|
||||
struct in_addr *src, struct in_addr *dst);
|
||||
const struct in_addr *src,
|
||||
const struct in_addr *dst);
|
||||
|
||||
/**
|
||||
* Set the local and peer address of the BFD session.
|
||||
|
@ -138,7 +139,8 @@ void bfd_sess_set_ipv4_addrs(struct bfd_session_params *bsp,
|
|||
* \param dst remote address (mandatory).
|
||||
*/
|
||||
void bfd_sess_set_ipv6_addrs(struct bfd_session_params *bsp,
|
||||
struct in6_addr *src, struct in6_addr *dst);
|
||||
const struct in6_addr *src,
|
||||
const struct in6_addr *dst);
|
||||
|
||||
/**
|
||||
* Configure the BFD session interface.
|
||||
|
|
Loading…
Reference in a new issue