I guess dual-stack is not well tested with socket API :-( I did most of the
dual-stack stuff, but since I don't use IPv6 and socket API at work, I have
no real-life tests for it.
On Mon, Oct 17, 2016 at 12:42 PM, Aditya Prakash <
> I am able to implement a web server using dual stack. However, I have an
> MDNS implementation using two UDP sockets, for v4 and v6. My specification
> requires me to join and send messages to v4 as well as v6. However, when I
> try doing a `sendto` to the IPv4 group (inet_addr("188.8.131.52") ), using a
> v6 socket, say fd is 'sock6',
> to.sin_family = AF_INET;
> to.sin_port = port;
> to.sin_addr.s_addr = inet_addr("184.108.40.206");
> len = sendto(sock6, (char *)m->header, size, 0, (struct sockaddr
> *)&to, sizeof(struct sockaddr_in));
> the following check fails
> ' if ((to != NULL) && !SOCK_ADDR_TYPE_MATCH(to, sock))'
> also if I try to append ::ffff: in the beginning of the address(changing
> family accordingly), the joingroup call fails.
> As of now I use the same above sockaddr_in `to` to join v4 group via
> setsockopt ADD_MEMBERSHIP. I wanted to know if it is possible to implement
> the mdns without using the low level calls as in the lwip's example
> mdns(i.e. using socket apis).
> On Thu, Oct 6, 2016 at 6:03 PM, Aditya Prakash <
> aditya.prakash...@gmail.com> wrote:
>> Two years back I made a web server based on LwIP that uses two sockets,
>> one for IPv4 and one for IPv6.
>> However recently I have seen that there have been a quite a lot of
>> changes regarding dual stack, I am not sure to what extent it is
>> implemented. I was wondering whether these changes would allow me to get to
>> use a single socket for both IPv4 and IPv6.
>> Thanks & Regards,
>> Aditya Prakash
> Thanks & Regards,
> Aditya Prakash
> lwip-users mailing list
lwip-users mailing list