On Mon, Dec 20, 2010 at 09:03, Laine Stump <laine(a)laine.org> wrote:
brSetInetAddress can only set a single IP address on the bridge, and
uses a method (ioctl(SIOCSETIFADDR)) that only works for IPv4. Replace
it and brSetInetNetmask with a single function that uses the external
"ip addr add" command to add an address/prefix to the interface - this
supports IPv6, and allows adding multiple addresses to the interface.
ioctl(SIOCSIFADDR) on AF_INET socket works for IPv4, on AF_INET6
socket works for IPv6 space.
You need to create fd6=socket(AF_INET6, SOCK_STREAM, 0) in brInit()
and do ioctl() on fd6.
--
Pawel