in6: Constify some sockaddr conversion functions

No functional change intended.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
This commit is contained in:
Mark Johnston 2024-11-14 19:20:21 +00:00
parent b697835ce6
commit 3bb15ffc4a
2 changed files with 5 additions and 5 deletions

View File

@ -2653,7 +2653,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux)
* v4 mapped addr or v4 compat addr
*/
void
in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
in6_sin6_2_sin(struct sockaddr_in *sin, const struct sockaddr_in6 *sin6)
{
bzero(sin, sizeof(*sin));
@ -2665,7 +2665,7 @@ in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
/* Convert sockaddr_in to sockaddr_in6 in v4 mapped addr format. */
void
in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
{
bzero(sin6, sizeof(*sin6));
sin6->sin6_len = sizeof(struct sockaddr_in6);

View File

@ -677,9 +677,9 @@ extern void in6_if_up(struct ifnet *);
struct sockaddr;
void in6_sin6_2_sin(struct sockaddr_in *sin,
struct sockaddr_in6 *sin6);
void in6_sin_2_v4mapsin6(struct sockaddr_in *sin,
struct sockaddr_in6 *sin6);
const struct sockaddr_in6 *sin6);
void in6_sin_2_v4mapsin6(const struct sockaddr_in *sin,
struct sockaddr_in6 *sin6);
void in6_sin6_2_sin_in_sock(struct sockaddr *nam);
extern void addrsel_policy_init(void);