From: Kevin Day Date: Fri, 30 Jun 2023 02:50:36 +0000 (-0500) Subject: Update: Add documentation comments regarding problems observed with gethostbyaddr... X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=bcfe9b0fcba4be17d130d09bfadac1d6dad064af;p=fll Update: Add documentation comments regarding problems observed with gethostbyaddr() and gethostbyname(). Valgrind reported still reachable memory under a Glibc system when the network is not connected while performing a DNS resolution operation. There is nothing I can do about this other than recommending to use something other than Glibc such as musl-libc. --- diff --git a/level_0/f_network/c/network.h b/level_0/f_network/c/network.h index 7759aa6..58d4034 100644 --- a/level_0/f_network/c/network.h +++ b/level_0/f_network/c/network.h @@ -71,6 +71,10 @@ extern "C" { * * This is for the Domain Name and is not for the IP address digit itself. * + * Some libc implementation may not properly clean up after calling gethostbyaddr() under certain cases, like on error or DNS entry not found. + * This can result in still reachable memory when the program exists. + * This is the fault of the particular libc in use, but testing to rule this out should still be considered. + * * @param from * The IP version 4 or version 6 family integer. * @param to @@ -97,6 +101,10 @@ extern "C" { * * This is for the Domain Name and is not for the IP address digit itself. * + * Some libc implementation may not properly clean up after calling gethostbyname() under certain cases, like on error or DNS entry not found. + * This can result in still reachable memory when the program exists. + * This is the fault of the particular libc in use, but testing to rule this out should still be considered. + * * @param from * The human-friendly IP Domain Name. * @param to