ec_gethostname

March 26, 2020 Contributors

Name

ec_gethostname — lowercase gethostname() replacement

Synopsis

#include "util.h"

| int **ec_gethostname** ( | hostname, |   |
|   | len); |   |

char * <var class="pdparam">hostname</var>;
size_t <var class="pdparam">len</var>;

Description

Note

This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

lowercase gethostname() replacement

Calls the system gethostname() and then normalizes the hostname to all lowercase before returning it in a new buffer

Parameters

hostname

a buffer to return the hostname

len

size of the buffer

Return Values

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.