]> mj.ucw.cz Git - nwho.git/commitdiff
Renamed net.h to nwho.h
authorMartin Mares <mj@ucw.cz>
Fri, 31 Dec 2010 15:35:00 +0000 (16:35 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 31 Dec 2010 15:35:00 +0000 (16:35 +0100)
Makefile
net.h [deleted file]
nwho.c
nwho.h [new file with mode: 0644]
nwhod.c

index 8415f4d91aa809a20de362ef044286f792708601..98a6d5449d1b10372b88803e3798e4eea2b12c0c 100644 (file)
--- 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 (file)
index 23fdf30..0000000
--- a/net.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *     The Remote User Info Distribution Protocol
- *
- *     (c) 1997--2010 Martin Mares <mj@ucw.cz>
- */
-
-#include <inttypes.h>
-
-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 7edcd0cd521caaa07658f353a1cfe137ad550ecd..33768033398a98fc2e20165fb5f6d66ba8ba44cb 100644 (file)
--- a/nwho.c
+++ b/nwho.c
@@ -13,7 +13,7 @@
 #include <time.h>
 #include <netinet/in.h>
 
-#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 (file)
index 0000000..23fdf30
--- /dev/null
+++ b/nwho.h
@@ -0,0 +1,39 @@
+/*
+ *     The Remote User Info Distribution Protocol
+ *
+ *     (c) 1997--2010 Martin Mares <mj@ucw.cz>
+ */
+
+#include <inttypes.h>
+
+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 872a68d5e72b8d5cfb10623a2cd02f13b2e5e5da..188bd6d781e116d23ab78ac3fce3ec66d0ccbf0a 100644 (file)
--- a/nwhod.c
+++ b/nwhod.c
@@ -22,7 +22,7 @@
 #include <dirent.h>
 #include <errno.h>
 
-#include "net.h"
+#include "nwho.h"
 
 struct hostrec {
   struct hostrec *next;