From: Martin Mares Date: Fri, 31 Dec 2010 15:35:00 +0000 (+0100) Subject: Renamed net.h to nwho.h X-Git-Tag: v1.13~13 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=839a3df94c43c129df704599f49341b249f88587;p=nwho.git Renamed net.h to nwho.h --- diff --git a/Makefile b/Makefile index 8415f4d..98a6d54 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,11 @@ all: nwhod nwho nwhod: nwhod.o -nwhod.o: nwhod.c net.h +nwhod.o: nwhod.c nwho.h nwho: nwho.o -nwho.o: nwho.c net.h +nwho.o: nwho.c nwho.h clean: rm -f *.o nwhod nwho *~ diff --git a/net.h b/net.h deleted file mode 100644 index 23fdf30..0000000 --- a/net.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The Remote User Info Distribution Protocol - * - * (c) 1997--2010 Martin Mares - */ - -#include - -typedef uint32_t u32; - -#define MAX_USERS 128 - -struct userinfo { - char name[10]; - char con[8]; - char mesg_y; - char pad; - u32 login_time; - u32 idle_time; -}; - -struct nwho_pkt { - u32 magic; /* Guard against ancient nwho versions */ - u32 local_time; - u32 server_time; /* Reserved for use by the server */ - u32 num_users; - u32 uptime; - u32 avl[3]; - struct userinfo users[MAX_USERS]; -}; - -#define NWHO_SPOOL_DIR "/var/state/nwho" -#define NWHO_MAGIC 0x21913332 -#define NWHO_PORT 811 - -#define DEFAULT_SEND_TIME 30 -#define DEFAULT_PRUNE_TIME 30 -#define DEFAULT_DOWN_TIME 120 -#define DEFAULT_DEAD_TIME 4*86400 diff --git a/nwho.c b/nwho.c index 7edcd0c..3376803 100644 --- a/nwho.c +++ b/nwho.c @@ -13,7 +13,7 @@ #include #include -#include "net.h" +#include "nwho.h" static int is_uptime; static time_t now; diff --git a/nwho.h b/nwho.h new file mode 100644 index 0000000..23fdf30 --- /dev/null +++ b/nwho.h @@ -0,0 +1,39 @@ +/* + * The Remote User Info Distribution Protocol + * + * (c) 1997--2010 Martin Mares + */ + +#include + +typedef uint32_t u32; + +#define MAX_USERS 128 + +struct userinfo { + char name[10]; + char con[8]; + char mesg_y; + char pad; + u32 login_time; + u32 idle_time; +}; + +struct nwho_pkt { + u32 magic; /* Guard against ancient nwho versions */ + u32 local_time; + u32 server_time; /* Reserved for use by the server */ + u32 num_users; + u32 uptime; + u32 avl[3]; + struct userinfo users[MAX_USERS]; +}; + +#define NWHO_SPOOL_DIR "/var/state/nwho" +#define NWHO_MAGIC 0x21913332 +#define NWHO_PORT 811 + +#define DEFAULT_SEND_TIME 30 +#define DEFAULT_PRUNE_TIME 30 +#define DEFAULT_DOWN_TIME 120 +#define DEFAULT_DEAD_TIME 4*86400 diff --git a/nwhod.c b/nwhod.c index 872a68d..188bd6d 100644 --- a/nwhod.c +++ b/nwhod.c @@ -22,7 +22,7 @@ #include #include -#include "net.h" +#include "nwho.h" struct hostrec { struct hostrec *next;