RFC: Using NI_MAXSERV and NI_MAXHOST in the kernel

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Tue, 17 Oct 2023 00:07:01 UTC
Hi,

I have a patch for a bug identified at last week's testing event, where
the FreeBSD NFSv4.1/4.2 client needs to rDNS a DS's address to a
FQDN so that it can generate a server principal for Kerberos.
(The bug only affects the case of a sec=krb5[ip],pnfs mount, so most
 will never see it.)

Since the userspace gssd daemon calls getnameinfo(3) to do the rDNS,
it would be nice if the kernel upcall code knew NI_MAXSERV and NI_MAXHOST.
However, they currently live in netdb.h.

I have put copies of them in sys/kgssapi/gssapi;.h, which works, but means
that they are defined in two different places

What do others think is the best way to handle this?

Thanks, rick