]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - windows/winnet.c
Move out of the SockAddr structure the mutable fields "ai" and
authorSimon Tatham <anakin@pobox.com>
Sat, 8 Nov 2008 16:45:45 +0000 (16:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 8 Nov 2008 16:45:45 +0000 (16:45 +0000)
commit6e2501be77c79cb93850399502a10ca864932bab
tree019e7397db89f94de19fedd4c1f42412034553eb
parent50abe3567bfaa5a7ebc60e6377f85c0534526454
Move out of the SockAddr structure the mutable fields "ai" and
"curraddr", and turn "family" into a macro-derived property of the
other fields. The idea is that this renders SockAddrs immutable once
created, which should open up the possibility of duplicating and
reusing one without having to redo the actual DNS lookup.

I _hope_ I haven't broken anything. The new code architecture
contains several rather dubious-looking operations (namely the
arbitrary choice of the first returned address in functions like
sk_getaddr and sk_address_is_local - what if, for instance, a DNS
lookup returned a local and a non-local address?), but I think they
were functionally just as dubious beforehand and all this change has
done is to make them more obviously so to a reader.

[originally from svn r8293]
unix/uxnet.c
windows/winnet.c