>So style improvement is the principal motivation for your change?  I
>assumed that there were other reasons, with the improved style being
>just a benefit.  The people who worked on IPv6 code so far -- myself,
>Thomas, and Mauro -- seem to be satisfied with the current style.
>Don't get me wrong, noone would say it's perfect, but I do think that
>it offers both portability and correctness while being reasonably
>elegance.
>
>"Better" style is often a matter of taste.  Your patch makes some
>things more elegant (it deletes the custom "ip_address" type,
>simplifies the implementation of lookup_host and deletes stuff from
>connect.c), but makes others less elegant (the interface to
>lookup_host and connect_to_ip, embedding instances of sockaddr_storage
>into address_list).  The compromises you chose are not inherently
>better or worse than ours, they're different.  Personally I prefer the
>current approach.
>  
>
Hi,

1. i was also thinking about sockaddr_storage in the beginning. But a) it is
also not available on all systems, wich mean we have to define it too.
2. The current form ONLY allow IPv4 and IPv6 wich should be handeld. Using
the sockaddr_Storage mean that we can use other transport protocol's too. Since
we do not whant it we have to check what type of data we have.
3. Memory footprint is not only file size but also include runtime memory
And here we need each address of the Storage type 1/4KB while the other type need about
5 Byte for ipv4 !!!
4. Tradeof Clean style of code / size of used memory
a) for systems with emulated adress resolution code size is bigger and memory usage 
(+6K file size)
b) for systems with ipv4 code size is smaller and memory usage is bigger (-1K file 
size)
c) for systems with ipv6 + adress resolution also memory usage is bigger (-1K file 
size)
- that mean equal what system we consume more runtime memory
- depending on what system we run we need +6k or -1k filesize
d) Unknown spped effects for using emulation or more powerfull resolution function 
when not needed.
c) sockaddr_storage is so big since it can hold UNIX-Sockets too, wich are not 
supported by DNS, wich mean
there is no case where the full size could be used even if we wan't to try using http 
wich non IP protocol.
So even if the code get "cleaner" i prever the size with less runtime memory.


Reply via email to