From 248dbed1187038918d79f62cd9cf631f4150c2a0 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 19 Jul 2021 07:55:27 +0200 Subject: resolv: Deprecate legacy interfaces in libresolv Debugging interfaces: p_*, fp_*, and sym_* could conceivably be used to produce debug out, but these functions have not been updated to parse more resource records, so they are not very useful today. Likewise for ns_sprintrr and ns_sprintrrf. ns_format_ttl and ns_parse_ttl are related to these. Internal implementation details: res_isourserver is probably only useful in the implementation of a stub resolver, and so is res_nameinquery. Unclear semantics and bad performance: ns_samedomain, ns_subdomain, ns_makecanon, ns_samename do textual converions & copies instead of checking equivalence of the wire format. inet_neta cannot handle IPv6 addresses. res_hostalias has been superseded by getaddrinfo with AI_CANONNAME. hostalias is not thread-safe. Some functions have int as size arguments instead of size_t, so they do not follow current coding practices. However, dn_expand and b64_ntop are somewhat widely used (to name just two examples), so deprecating them seems problematic. Reviewed-by: Carlos O'Donell --- inet/arpa/inet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inet') diff --git a/inet/arpa/inet.h b/inet/arpa/inet.h index 3a99dbfa5a..54c9c6d468 100644 --- a/inet/arpa/inet.h +++ b/inet/arpa/inet.h @@ -74,7 +74,8 @@ extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW; /* Format a network number NET into presentation format and place result in buffer starting at BUF with length of LEN bytes. */ -extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW; +extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW + __attribute_deprecated_msg__ ("Use inet_ntop instead"); /* Convert network number for interface type AF in buffer starting at CP to presentation format. The result will specifiy BITS bits of -- cgit 1.4.1