1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 20:19:42 +00:00

api: Add entrypoints to allow use of per-server ports

Add user-visible entrypoints ares_{get,set}_servers_ports(3), which
take struct ares_addr_port_node rather than struct ares_addr_node.
This structure includes a UDP and TCP port number; if this is set
to zero, the channel-wide port values are used as before.

Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which
is analogous to ares_set_servers(3) except it doesn't ignore any
specified port information; instead, any per-server specified port
is used as both the UDP and TCP port for that server.

The internal struct ares_addr is extended to hold the UDP/TCP ports,
stored in network order, with the convention that a value of zero
indicates that the channel-wide UDP/TCP port should be used.

For the internal implementation of ares_dup(3), shift to use the
_ports() version of the get/set functions, so port information is
transferred correctly to the new channel.

Update manpages, and add missing ares_set_servers_csv to the lists
while we're at it
This commit is contained in:
David Drysdale
2015-12-28 11:09:52 +00:00
parent 06d0f72e54
commit 7972adc5d7
14 changed files with 269 additions and 53 deletions

View File

@ -0,0 +1 @@
.so man3/ares_set_servers_csv.3