#include <oskit/com/libcenv.h>oskit_error_t oskit_libcenv_gethostname(oskit_libcenv_t *c, char *hostname, int len);
oskit_error_t oskit_libcenv_sethostname(oskit_libcenv_t *c, char *hostname, int len);
Get (or set) the system hostname from the oskit_libcenv COM object. The application initialization code will typically set the hostname when it initializes the network. The POSIX library will then request the hostname as needed by the C library or the application program.
- c
- The oskit_libcenv object to operate on.
- hostname
- The character string of the hostname to either set or get.
- len
- The length of the hostname if being set, or the maximum length of the string buffer if getting the hostname.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.