Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
LOGWTMP(3)             FreeBSD Library Functions Manual             LOGWTMP(3)

NAME
     logwtmp - append a new record to the wtmp file

LIBRARY
     System Utilities Library (libutil, -lutil)

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

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

DESCRIPTION
     The function logwtmp() 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.

RETURN VALUES
     None.

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

FreeBSD 11.0-PRERELEASE        December 29, 1996       FreeBSD 11.0-PRERELEASE

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=logwtmp&sektion=3&manpath=FreeBSD+4.7-RELEASE>

home | help