File: userlist.h

package info (click to toggle)
cfingerd 1.3.2-11.0
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 600 kB
  • ctags: 396
  • sloc: ansic: 3,220; perl: 572; makefile: 155; sh: 52
file content (44 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * USERLIST - Configurable "rwho"-type replacement, shows only users online.
 * Header file
 */

#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
#include <string.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <utmp.h>
#include <ctype.h>
#include <time.h>
#include <pwd.h>

#define	BOOL	int

#define	TRUE	1
#define	FALSE	0

/* Display types */
#define	DISPLAY_CFINGERD	1
#define	DISPLAY_RFC1288		2
#define	DISPLAY_LINUX		3
#define	DISPLAY_GNU		4
#define	DISPLAY_BSDOS		5
#define	DISPLAY_UNIX5		6

typedef struct {
    char *username;
    char *tty;
    char *locale;
    char *line;
    long ip_addr;
    time_t time;
} TTY_FROM;

#include "config.h"

extern TTY_FROM tty_list[MAX_TTYS];
extern int times_on, display_type;