FreeBSD/sys/netinet6/in6.c
/* Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format. */
Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format.
Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format .
void
in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam)
{
	struct sockaddr_in *sin_p;
	struct sockaddr_in6 *sin6_p;
	sin6_p = malloc(sizeof *sin6_p, M_SONAME, M_WAITOK);
	sin_p = (struct sockaddr_in *)*nam;
	in6_sin_2_v4mapsin6(sin_p, sin6_p);
	free(*nam, M_SONAME);
	*nam = (struct sockaddr *)sin6_p;
}
void in6_sin_2_v4mapsin6_in_sock ( struct sockaddr * * nam ) { struct sockaddr_in * sin_p ; struct sockaddr_in6 * sin6_p ; sin6_p = malloc ( sizeof * sin6_p , M_SONAME , M_WAITOK ) ; sin_p = ( struct sockaddr_in * ) * nam ; in6_sin_2_v4mapsin6 ( sin_p , sin6_p ) ; free ( * nam , M_SONAME ) ; * nam = ( struct sockaddr * ) sin6_p ; }
Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format.
Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format .