Move out of the SockAddr structure the mutable fields "ai" and
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 8 Nov 2008 16:45:45 +0000 (16:45 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 8 Nov 2008 16:45:45 +0000 (16:45 +0000)
commitfacf756868132a288816194ebb54c5770903fc35
tree019e7397db89f94de19fedd4c1f42412034553eb
parent94fe9122886861d39bbb5bcfb9f7fe5eb2c46427
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@8293 cda61777-01e9-0310-a592-d414129be87e
unix/uxnet.c
windows/winnet.c