Retrieves the name of the current host.
#include <sys/types.h> #include <sys/errno.h>
int kgethostname (name, namelen) char *name; int *namelen;
The kgethostname kernel service returns the standard name of the current host as set by the sethostname subroutine. The returned host name is null-terminated unless insufficient space is provided.
The kgethostname kernel service can be called from either the process or interrupt environment.
0 | Indicates successful completion. |
The kgethostname kernel service is part of Base Operating System (BOS) Runtime.
The sethostname subroutine.
Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.