]> mj.ucw.cz Git - nwho.git/blob - net.h
4b6b7135cd2790c2464bc187da8af32b49851e2d
[nwho.git] / net.h
1 /*
2  *      The Remote User Info Distribution Protocol
3  *
4  *      (c) 1997--2001 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU General Public License. See file COPYING in any of the GNU packages.
8  */
9
10 #define MAX_USERS 128
11
12 struct userinfo {
13   char name[10];
14   char con[8];
15   char mesg_y;
16   char pad;
17   __u32 login_time;
18   __u32 idle_time;
19 };
20
21 struct rywho_pkt {
22   __u32 magic;                          /* Guard against ancient nwho versions */
23   __u32 local_time;
24   __u32 server_time;                    /* Reserved for use by the server */
25   __u32 num_users;
26   __u32 uptime;
27   __u32 avl[3];
28   struct userinfo users[MAX_USERS];
29 };
30
31 #define NWHO_SPOOL_DIR "/var/state/nwho"
32 #define NWHO_MAGIC 0x21913332
33 #define NWHO_PORT 811
34
35 #define DEFAULT_SEND_TIME 30
36 #define DEFAULT_PRUNE_TIME 30
37 #define DEFAULT_DEAD_TIME 120