/*
* The Remote User Information Lister
*
- * (c) 1997--2002 Martin Mares <mj@ucw.cz>
- *
- * This software may be freely distributed and used according to the terms
- * of the GNU General Public License. See file COPYING in any of the GNU packages.
+ * (c) 1997--2010 Martin Mares <mj@ucw.cz>
*/
#include <stdio.h>
#include <dirent.h>
#include <time.h>
#include <netinet/in.h>
-#include <asm/types.h>
#include "net.h"
}
static void
-show_uptime(char *name, struct rywho_pkt *p)
+show_uptime(char *name, struct nwho_pkt *p)
{
int i;
}
static void
-show_users(char *name, struct rywho_pkt *p)
+show_users(char *name, struct nwho_pkt *p)
{
int u;
int m = ntohl(p->num_users);
{
DIR *d;
struct dirent *e;
- struct rywho_pkt pkt;
+ struct nwho_pkt pkt;
int fd, r;
int is = 0;
}
r = read(fd, &pkt, sizeof(pkt));
close(fd);
- if (r < sizeof(struct rywho_pkt) - MAX_USERS*sizeof(struct userinfo)
+ if (r < sizeof(struct nwho_pkt) - MAX_USERS*sizeof(struct userinfo)
|| pkt.magic != htonl(NWHO_MAGIC)
- || r != sizeof(struct rywho_pkt) - (MAX_USERS - ntohl(pkt.num_users))*sizeof(struct userinfo))
+ || r != sizeof(struct nwho_pkt) - (MAX_USERS - ntohl(pkt.num_users))*sizeof(struct userinfo))
{
fprintf(stderr, "%s: Malformed record\n", e->d_name);
continue;