[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] sockaddr_in6 and sockaddr minor concerns
From: |
Joel Cunningham |
Subject: |
[lwip-devel] sockaddr_in6 and sockaddr minor concerns |
Date: |
Wed, 13 May 2015 20:12:44 +0000 (GMT) |
I've been familiarizing myself with the new IPv6 work and had a couple of minor questions/concerns over areas of the socket address implementation:
1) sockaddr_in6 doesn't contain sin6_scope_id as required by the Open Group specification. Is this intentional or just an oversight? The Open Group specification lists sin6_scope_id one of the "minimum required fields"
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html
2) The struct sockaddr has a separate sa_data define when LWIP_IPV6 is set that adds extra bytes. This seems unnecessary because with the addition of IPv6, sockaddr_storage should be used by applications when there needs to be storage large enough for either a sockaddr_in or sockaddr_in6. I doubled checked with the Steven's book: Unix Network Programming - Vol 1 Third Edition, which has been updated for IPv6. The definition given in the book has sa_data of 1 bytes.
The extra bytes don't functionally harm anything, but they do use more memory in the IPv6 case and we are light weight :)
I'd be happy to provide a patch if these concerns are indeed valid
Thanks,
Joel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] sockaddr_in6 and sockaddr minor concerns,
Joel Cunningham <=