[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
kgethostname Kernel Service
Purpose
Retrieves the name of the current host.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
int
kgethostname ( name, namelen)
char *name;
int *namelen;
Parameters
name |
Specifies the address of the buffer in which to place the host name. |
namelen |
Specifies the address of a variable in which the length of the host
name will be stored. This parameter should be set to the size of the buffer
before the kgethostname kernel service is called. |
Description
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.
Execution Environment
The kgethostname kernel service
can be called from either the process or interrupt environment.
Return Value
0 |
Indicates successful completion. |
Related Information
The sethostname subroutine.
Network Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]