Whamcloud - gitweb
LU-17186 utils: replace gethostby*() with get*info() 32/52632/9
authorJian Yu <yujian@whamcloud.com>
Tue, 17 Oct 2023 18:06:39 +0000 (11:06 -0700)
committerSebastien Buisson <sbuisson@ddn.com>
Wed, 13 Dec 2023 12:06:17 +0000 (13:06 +0100)
commit99687573d33336a153c1a5b94a4b66ebbcc2d0f1
treefeb80bda16da36df3bfeb76d1fd7e381135d2326
parentd0babe6bd8b38cb86875c5e3d92aee4c69986ce9
LU-17186 utils: replace gethostby*() with get*info()

This patch replaces the deprecated gethostbyname() and
gethostbyaddr() functions with getaddrinfo() and getnameinfo()
functions respectively.

The getaddrinfo() function combines the functionality provided by the
gethostbyname() and getservbyname() functions into a single interface,
but unlike the latter functions, getaddrinfo() is reentrant and allows
programs to eliminate IPv4-versus-IPv6 dependencies.

The getnameinfo() function is the inverse of getaddrinfo(): it
converts a socket address to a corresponding host and service, in a
protocol-independent manner. It combines the functionality of
gethostbyaddr() and getservbyport(), but unlike those functions,
getnameinfo() is reentrant and allows programs to eliminate
IPv4-versus-IPv6 dependencies.

Test-Parameters: kerberos=true testlist=sanity-krb5
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iacb5583826cd2f7329455bc6cbb4477f9087f15a
libcfs/autoconf/lustre-libcfs.m4
libcfs/libcfs/util/nidstrings.c
lnet/autoconf/lustre-lnet.m4
lustre/autoconf/lustre-core.m4
lustre/utils/gss/lgss_krb5_utils.c
lustre/utils/gss/lsupport.c
lustre/utils/gss/lsupport.h
lustre/utils/nidlist.c
lustre/utils/portals.c