man.bsd.lv manual page server

Manual Page Search Parameters

LOGWTMP(3) Library Functions Manual LOGWTMP(3)

logwtmpappend a new record to the wtmp file

library “libutil”

#include <sys/types.h>
#include <libutil.h>

void
logwtmp(const char *line, const char *name, const char *host);

The function () tries to append a new record to the wtmp(5) file, using the provided arguments line, name, and host, and the current time.

If the length of the hostname string host is longer than what would fit into the hostname field of the wtmp(5) file, it will first be attempted to convert it into a numerical IP address using gethostbyname(3). Failing this, the hostname will be recorded as "invalid hostname".

The calling process must have permission to write to the wtmp(5) file.

None.

gethostbyname(3), login(3), wtmp(5)

December 29, 1996 DragonFly-5.6.1