2 * The Remote User Info Distribution Protocol
4 * (c) 1997--2010 Martin Mares <mj@ucw.cz>
8 #include <netinet/in.h>
24 u32 magic; /* Guard against ancient nwho versions */
26 u32 server_time; /* Reserved for use by the server */
30 struct userinfo users[MAX_USERS];
33 #define NWHO_SPOOL_DIR "/var/state/nwho"
34 #define NWHO_MAGIC 0x21913332
37 #define DEFAULT_SEND_TIME 30
38 #define DEFAULT_PRUNE_TIME 30
39 #define DEFAULT_DOWN_TIME 120
40 #define DEFAULT_DEAD_TIME 4*86400
42 #define STRINGIFY(x) STRINGIFY2(x)
43 #define STRINGIFY2(x) #x
45 static inline int nwho_pkt_size(struct nwho_pkt *pkt)
47 return sizeof(struct nwho_pkt) - (MAX_USERS - ntohl(pkt->num_users))*sizeof(struct userinfo);
52 void die(char *msg, ...) __attribute__((noreturn));