get_hostname()

get_hostname()#

Retrieve the hostname of the current system.

Prototype

PUBLIC char *get_hostname(void);
        

Parameters

Key

Type

Description

-

-

This function does not take any parameters.


Return Value

Returns a string containing the hostname, or NULL on failure. The caller is responsible for freeing the string.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples