pkstream/pkstream.c: Use `getaddrinfo' to resolve addresses and services.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 28 Sep 2017 00:41:43 +0000 (01:41 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 28 Jun 2018 23:23:56 +0000 (00:23 +0100)
This will give us multiple addresses for simple queries, which we must
do something sensible with:

  * for server bind and peer addresses, we accumulate them in our
    address vectors as before;

  * for client bind addresses, and local UDP addresses, we just take
    the first match, and hope that's good enough; and

  * for client connect addresses, and remote UDP addresses, we try to
    connect to each address in turn and take the first one that works.

Some utility functions have been added or enhanced:

  * `pushaddr' has become `pushaddrs', and its job is now to push the
    addresses from a `struct addrinfo' chain onto an address vector; and

  * `copyaddr' has been introduced to do possible partial copies of
    addresses.

Note that everything is still strictly IPv4 throughout.  But almost all
of the pieces are now in place...


No differences found