constructing IPv6 in6_addr structure from ipv6

From: Steve French
Date: Mon Dec 06 2004 - 17:08:29 EST


Is there a recommended way to construct a struct sockaddr_in6 in kernel
which is the format the connect function on a socket requires for ipv6
addresses?

Basically this boils down to how to best construct a struct in6_addr
starting with a IPv6 network address represented as a familiar dotted
address character string. I would prefer to convert this in kernel via
something like inet_pton(AF_INET6,original_address_string,
converted_to_in6_add_form) but I could convert in userspace and pass the
16 byte array down to the kernel mangled as a string, via a mount
option.

Is it better to mangle the address and pass it down, or do something
similar to inet_pton? This can't be the first time that someone has
wanted to deal with an ipv6 address coming from userspace ...





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/