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:
1
ares_set_servers_ports_csv.3
Normal file
1
ares_set_servers_ports_csv.3
Normal file
@ -0,0 +1 @@
|
||||
.so man3/ares_set_servers_csv.3
|
Reference in New Issue
Block a user