tor  0.4.2.1-alpha-dev
Functions
gethostname.c File Reference
#include "orconfig.h"
#include "lib/net/gethostname.h"

Go to the source code of this file.

Functions

 MOCK_IMPL (int, tor_gethostname,(char *name, size_t namelen))
 

Detailed Description

Mockable wrapper for gethostname().

Definition in file gethostname.c.

Function Documentation

◆ MOCK_IMPL()

MOCK_IMPL ( int  ,
tor_gethostname  ,
(char *name, size_t namelen)   
)

Get name of current host and write it to name array, whose length is specified by namelen argument. Return 0 upon successful completion; otherwise return return -1. (Currently, this function is merely a mockable wrapper for POSIX gethostname().)

Definition at line 26 of file gethostname.c.