sethostname -- set host name
int sethostname(const char *name, size_t len);
This function is used to change the host name of the current processor.
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
len is negative or len is larger than the maximum allowed size.
the caller was not the superuser.
name is an invalid address.
SUSv2 guarantees that Host names are limited to 255 bytes.