Initial revision
[freeradius.git] / src / include / radutmp.h
1 /*
2  * radutmp.h    Definitions for the Radius UTMP file.
3  *
4  * Version:     @(#)radutmp  2.01  11-Feb-1998  miquels@cistron.nl
5  */
6
7 #ifndef _RADUTMP_H
8 #define _RADUTMP_H
9
10 /*
11  *      Types of connection.
12  */
13 #ifndef P_UNKNOWN
14 #  define P_UNKNOWN       0
15 #  define P_LOCAL         'L'
16 #  define P_RLOGIN        'R'
17 #  define P_SLIP          'S'
18 #  define P_CSLIP         'C'
19 #  define P_PPP           'P'
20 #  define P_AUTOPPP       'A'
21 #  define P_TELNET        'E'
22 #  define P_TCPCLEAR      'T'
23 #  define P_TCPLOGIN      'U'
24 #  define P_CONSOLE       '!'
25 #  define P_SHELL         'X'
26 #endif
27
28 #define P_IDLE          0
29 #define P_LOGIN         1
30
31 #define RUT_NAMESIZE 32
32
33 struct radutmp {
34   char login[32];               /* Loginname */
35                                 /* FIXME: extend to 48 or 64 bytes */
36   int  nas_port;                /* Port on the terminal server (32 bits). */
37   char session_id[8];           /* Radius session ID (first 8 bytes at least)*/
38                                 /* FIXME: extend to 16 or 32 bytes */
39   unsigned int nas_address;     /* IP of portmaster. */
40   unsigned int framed_address;  /* SLIP/PPP address or login-host. */
41   int proto;                    /* Protocol. */
42   time_t time;                  /* Time entry was last updated. */
43   time_t delay;                 /* Delay time of request */
44   int type;                     /* Type of entry (login/logout) */
45   char porttype;                /* Porttype (I=ISDN A=Async T=Async-ISDN */
46   char res1,res2,res3;          /* Fills up to one int */
47   char caller_id[16];           /* Calling-Station-ID */
48   char reserved[12];            /* 3 ints reserved */
49 };
50
51 #endif /* _RADUTMP_H */