![]() |
![]() |
![]() |
![]() |
Set the name of the current host
#include <unix.h> int sethostname( char * name, int namelen );
socket3r.lib, socket3s.lib
The sethostname() function sets the name of the host machine to be name. The length of name is set by namelen. Restricted to the superuser, this call is normally used only at boot time.
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
This function is restricted to the superuser, and is normally used only at boot time.
Hostnames are limited to MAXHOSTNAMELEN characters (defined in <sys/param.h>).
![]() |
![]() |
![]() |
![]() |