getutent

Name

getutent -- access utmp file entries

Synopsis

#include <utmp.h>

struct utmp *getutent(void);

Description

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line.

Return Value

getutent() returns a pointer to a static struct utmp.

Errors

On error, (struct utmp*)0 will be returned.

Files

/var/run/utmp database of currently logged-in users

/var/log/wtmp database of past user logins