SCCS-vsn: usr.bin/ruptime/ruptime.c 4.6
SCCS-vsn: usr.sbin/rwhod/rwhod.c 4.5
SCCS-vsn: include/protocols/rwhod.h 4.2
SCCS-vsn: usr.bin/telnet/telnet.c 4.12
SCCS-vsn: libexec/telnetd/telnetd.c 4.10
SCCS-vsn: usr.bin/tftp/main.c 4.3
SCCS-vsn: usr.bin/tftp/tftp.c 4.3
SCCS-vsn: libexec/tftpd/tftpd.c 4.4
-/* rwhod.h 4.1 82/04/02 */
+/* rwhod.h 4.2 82/11/14 */
struct whod {
int wd_sendtime;
int wd_recvtime;
char wd_hostname[32];
int wd_loadav[3];
struct whod {
int wd_sendtime;
int wd_recvtime;
char wd_hostname[32];
int wd_loadav[3];
struct whoent {
struct utmp we_utmp;
int we_idle;
struct whoent {
struct utmp we_utmp;
int we_idle;
-static char sccsid[] = "@(#)telnetd.c 4.9 82/10/10";
+static char sccsid[] = "@(#)telnetd.c 4.10 82/11/14";
#endif
/*
* Stripped-down telnet server.
*/
#endif
/*
* Stripped-down telnet server.
*/
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <sgtty.h>
#include <wait.h>
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <sgtty.h>
#include <wait.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/in.h>
-#define INFINITY 10000000
#define BELL '\07'
char hisopts[256];
#define BELL '\07'
char hisopts[256];
char line[] = "/dev/ptyp0";
struct sockaddr_in sin = { AF_INET };
char line[] = "/dev/ptyp0";
struct sockaddr_in sin = { AF_INET };
-int options = SO_ACCEPTCONN|SO_KEEPALIVE;
main(argc, argv)
char *argv[];
main(argc, argv)
char *argv[];
}
sin.sin_port = sp->s_port;
argc--, argv++;
}
sin.sin_port = sp->s_port;
argc--, argv++;
- if (argc > 0 && !strcmp(argv[0], "-d"))
- options |= SO_DEBUG, argc--, argv++;
if (argc > 0) {
sin.sin_port = atoi(*argv);
if (sin.sin_port <= 0) {
if (argc > 0) {
sin.sin_port = atoi(*argv);
if (sin.sin_port <= 0) {
- sin.sin_port = htons(sin.sin_port);
+ sin.sin_port = htons((u_short)sin.sin_port);
#ifndef DEBUG
if (fork())
exit(0);
#ifndef DEBUG
if (fork())
exit(0);
+again:
+ s = socket(0, SOCK_STREAM, 0, 0);
+ if (s < 0) {
+ perror("telnetd: socket");;
+ sleep(5);
+ goto again;
+ }
+ while (bind(s, (caddr_t)&sin, sizeof (sin), 0) < 0) {
+ perror("telnetd: bind");
+ sleep(5);
+ }
+ listen(s, 10);
- errno = 0;
- if ((s = socket(SOCK_STREAM, 0, &sin, options)) < 0) {
- perror("socket");
- sleep(5);
- continue;
- }
- if (accept(s, 0) < 0) {
+ int s2;
+
+ s2 = accept(s, (caddr_t)0, 0);
+ if (s2 < 0) {
sleep(1);
continue;
}
if ((pid = fork()) < 0)
printf("Out of processes\n");
else if (pid == 0)
sleep(1);
continue;
}
if ((pid = fork()) < 0)
printf("Out of processes\n");
else if (pid == 0)
while (wait3(status, WNOHANG, 0) > 0)
continue;
}
while (wait3(status, WNOHANG, 0) > 0)
continue;
}
ibits |= (1 << f);
if (ncc < 0 && pcc < 0)
break;
ibits |= (1 << f);
if (ncc < 0 && pcc < 0)
break;
- select(32, &ibits, &obits, INFINITY);
+ select(16, &ibits, &obits, 0, 0);
if (ibits == 0 && obits == 0) {
sleep(5);
continue;
if (ibits == 0 && obits == 0) {
sleep(5);
continue;
- printf("netser: panic state=%d\n", state);
+ printf("telnetd: panic state=%d\n", state);
ioctl(net, SIOCDONE, &how);
ioctl(net, SIOCDONE, &how);
kill(0, SIGKILL);
exit(1);
}
kill(0, SIGKILL);
exit(1);
}
-/* tftpd.c 4.3 82/10/08 */
+/* tftpd.c 4.4 82/11/14 */
/*
* Trivial file transfer protocol server.
*/
#include <sys/types.h>
/*
* Trivial file transfer protocol server.
*/
#include <sys/types.h>
+
+#include <netinet/in.h>
+
+#include <signal.h>
#include <stat.h>
#include <stdio.h>
#include <wait.h>
#include <errno.h>
#include <ctype.h>
#include <netdb.h>
#include <stat.h>
#include <stdio.h>
#include <wait.h>
#include <errno.h>
#include <ctype.h>
#include <netdb.h>
#include "tftp.h"
extern int errno;
struct sockaddr_in sin = { AF_INET };
int f;
#include "tftp.h"
extern int errno;
struct sockaddr_in sin = { AF_INET };
int f;
char buf[BUFSIZ];
main(argc, argv)
char buf[BUFSIZ];
main(argc, argv)
fprintf(stderr, "tftpd: udp/tftp: unknown service\n");
exit(1);
}
fprintf(stderr, "tftpd: udp/tftp: unknown service\n");
exit(1);
}
- sin.sin_port = htons(sp->s_port);
+ sin.sin_port = htons((u_short)sp->s_port);
#ifndef DEBUG
if (fork())
exit(0);
#ifndef DEBUG
if (fork())
exit(0);
- argc--, argv++;
- if (argc > 0 && !strcmp(argv[0], "-d"))
- options |= SO_DEBUG;
- errno = 0;
- f = socket(SOCK_DGRAM, 0, &sin, options);
+ int fromlen;
+
+ f = socket(0, SOCK_DGRAM, 0, 0);
+ perror("tftpd: socket");
+ close(f);
+ sleep(5);
+ continue;
+ }
+ while (bind(f, (caddr_t)&sin, sizeof (sin), 0) < 0) {
+ perror("tftpd: bind");
+ close(f);
sleep(5);
continue;
}
again:
sleep(5);
continue;
}
again:
- n = receive(f, &from, buf, sizeof (buf));
+ fromlen = sizeof (from);
+ n = recvfrom(f, buf, sizeof (buf), (caddr_t)&from, &fromlen, 0);
+ perror("tftpd: recvfrom");
goto again;
}
tp = (struct tftphdr *)buf;
goto again;
}
tp = (struct tftphdr *)buf;
tp->th_opcode = ntohs(tp->th_opcode);
tp->th_opcode = ntohs(tp->th_opcode);
if (tp->th_opcode == RRQ || tp->th_opcode == WRQ)
if (fork() == 0)
tftp(&from, tp, n);
(void) close(f);
if (tp->th_opcode == RRQ || tp->th_opcode == WRQ)
if (fork() == 0)
tftp(&from, tp, n);
(void) close(f);
while (wait3(status, WNOHANG, 0) > 0)
while (wait3(status, WNOHANG, 0) > 0)
-#else
- while (wait3(status, 0, 0) > 0)
register struct formats *pf;
char *filename, *mode;
register struct formats *pf;
char *filename, *mode;
- if (connect(f, client) < 0) {
+ if (connect(f, (caddr_t)client, sizeof (*client), 0) < 0) {
perror("connect");
exit(1);
}
perror("connect");
exit(1);
}
}
alarm(0);
#if vax || pdp11
}
alarm(0);
#if vax || pdp11
- tp->th_opcode = ntohs(tp->th_opcode);
- tp->th_block = ntohs(tp->th_block);
+ tp->th_opcode = ntohs((u_short)tp->th_opcode);
+ tp->th_block = ntohs((u_short)tp->th_block);
#endif
if (tp->th_opcode == ERROR)
break;
#endif
if (tp->th_opcode == ERROR)
break;
}
alarm(0);
#if vax || pdp11
}
alarm(0);
#if vax || pdp11
- tp->th_opcode = ntohs(tp->th_opcode);
- tp->th_block = ntohs(tp->th_block);
+ tp->th_opcode = ntohs((u_short)tp->th_opcode);
+ tp->th_block = ntohs((u_short)tp->th_block);
#endif
if (tp->th_opcode == ERROR)
break;
#endif
if (tp->th_opcode == ERROR)
break;
-static char sccsid[] = "@(#)ruptime.c 4.5 82/10/07";
+static char sccsid[] = "@(#)ruptime.c 4.6 82/11/14";
#endif
#include <sys/param.h>
#endif
#include <sys/param.h>
printf("%-8.8s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n",
hsp->hs_wd->wd_hostname,
interval(hsp->hs_wd->wd_sendtime -
printf("%-8.8s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n",
hsp->hs_wd->wd_hostname,
interval(hsp->hs_wd->wd_sendtime -
- hsp->hs_wd->wd_bootime, " up"),
+ hsp->hs_wd->wd_boottime, " up"),
hsp->hs_nusers,
hsp->hs_nusers == 1 ? ", " : "s,",
maxloadav >= 1000 ? 5 : 4,
hsp->hs_nusers,
hsp->hs_nusers == 1 ? ", " : "s,",
maxloadav >= 1000 ? 5 : 4,
return (
(down(h2) ? h2->hs_wd->wd_recvtime - now
return (
(down(h2) ? h2->hs_wd->wd_recvtime - now
- : h2->hs_wd->wd_sendtime - h2->hs_wd->wd_bootime)
+ : h2->hs_wd->wd_sendtime - h2->hs_wd->wd_boottime)
-
(down(h1) ? h1->hs_wd->wd_recvtime - now
-
(down(h1) ? h1->hs_wd->wd_recvtime - now
- : h1->hs_wd->wd_sendtime - h1->hs_wd->wd_bootime)
+ : h1->hs_wd->wd_sendtime - h1->hs_wd->wd_boottime)
-static char sccsid[] = "@(#)telnet.c 4.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)telnet.c 4.12 (Berkeley) %G%";
/*
* User telnet program.
*/
/*
* User telnet program.
*/
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <sgtty.h>
#include <setjmp.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <sgtty.h>
#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/in.h>
#define TELOPTS
#include "telnet.h"
#define ctrl(x) ((x) & 037)
#define strip(x) ((x)&0177)
#define TELOPTS
#include "telnet.h"
#define ctrl(x) ((x) & 037)
#define strip(x) ((x)&0177)
-#define INFINITY 10000000
char ttyobuf[BUFSIZ], *tfrontp = ttyobuf, *tbackp = ttyobuf;
char netobuf[BUFSIZ], *nfrontp = netobuf, *nbackp = netobuf;
char ttyobuf[BUFSIZ], *tfrontp = ttyobuf, *tbackp = ttyobuf;
char netobuf[BUFSIZ], *nfrontp = netobuf, *nbackp = netobuf;
}
host = gethostbyname(argv[1]);
if (host) {
}
host = gethostbyname(argv[1]);
if (host) {
- bcopy(host->h_addr, &sin.sin_addr, host->h_length);
+ sin.sin_family = host->h_addrtype;
+ bcopy(host->h_addr, (caddr_t)&sin.sin_addr, host->h_length);
hostname = host->h_name;
} else {
hostname = host->h_name;
} else {
+ sin.sin_family = AF_INET;
sin.sin_addr.s_addr = inet_addr(argv[1]);
if (sin.sin_addr.s_addr == -1) {
printf("%s: unknown host\n", argv[1]);
sin.sin_addr.s_addr = inet_addr(argv[1]);
if (sin.sin_addr.s_addr == -1) {
printf("%s: unknown host\n", argv[1]);
}
}
sin.sin_port = htons(sin.sin_port);
}
}
sin.sin_port = htons(sin.sin_port);
- if ((net = socket(SOCK_STREAM, 0, 0, options)) < 0) {
- perror("socket");
+ net = socket(0, SOCK_STREAM, 0, 0);
+ if (net < 0) {
+ perror("telnet: socket");
return;
}
sigset(SIGINT, intr);
sigset(SIGPIPE, deadpeer);
printf("Trying...\n");
return;
}
sigset(SIGINT, intr);
sigset(SIGPIPE, deadpeer);
printf("Trying...\n");
- if (connect(net, &sin)) {
- perror("connect");
+ if (connect(net, (caddr_t)&sin, sizeof (sin), 0) < 0) {
+ perror("telnet: connect");
sigset(SIGINT, SIG_DFL);
return;
}
sigset(SIGINT, SIG_DFL);
return;
}
(void) mode(0);
if (connected) {
(void) mode(0);
if (connected) {
ioctl(net, SIOCDONE, &how);
ioctl(net, SIOCDONE, &how);
printf("Connection closed.\n");
close(net);
connected = 0;
printf("Connection closed.\n");
close(net);
connected = 0;
else
stbuf.sg_flags |= ECHO;
tchars.t_intrc = tchars.t_quitc = -1;
else
stbuf.sg_flags |= ECHO;
tchars.t_intrc = tchars.t_quitc = -1;
+ tchars.t_stopc = tchars.t_startc = -1;
disc = OTTYDISC;
onoff = 1;
}
disc = OTTYDISC;
onoff = 1;
}
ibits |= (1 << s);
if (scc < 0 && tcc < 0)
break;
ibits |= (1 << s);
if (scc < 0 && tcc < 0)
break;
- select(32, &ibits, &obits, INFINITY);
+ select(16, &ibits, &obits, 0, 0);
if (ibits == 0 && obits == 0) {
sleep(5);
continue;
if (ibits == 0 && obits == 0) {
sleep(5);
continue;
-/* main.c 4.2 82/10/08 */
+/* main.c 4.3 82/11/14 */
/*
* TFTP User Program -- Command Interface.
*/
#include <sys/types.h>
/*
* TFTP User Program -- Command Interface.
*/
#include <sys/types.h>
+
+#include <netinet/in.h>
+
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <netdb.h>
#include <ctype.h>
#include <netdb.h>
-struct sockaddr_in sin = { AF_INET };
int trace;
int verbose;
int connected;
int trace;
int verbose;
int connected;
fprintf(stderr, "tftp: udp/tftp: unknown service\n");
exit(1);
}
fprintf(stderr, "tftp: udp/tftp: unknown service\n");
exit(1);
}
- sin.sin_port = htons(sp->s_port);
- if (argc > 1 && !strcmp(argv[1], "-d")) {
- options |= SO_DEBUG;
- argc--, argv++;
- }
- f = socket(SOCK_DGRAM, 0, 0, options);
+ f = socket(0, SOCK_DGRAM, 0, 0);
if (f < 0) {
perror("socket");
exit(3);
if (f < 0) {
perror("socket");
exit(3);
}
host = gethostbyname(argv[1]);
if (host) {
}
host = gethostbyname(argv[1]);
if (host) {
+ sin.sin_family = host->h_addrtype;
bcopy(host->h_addr, &sin.sin_addr, host->h_length);
hostname = host->h_name;
} else {
bcopy(host->h_addr, &sin.sin_addr, host->h_length);
hostname = host->h_name;
} else {
+ sin.sin_family = AF_INET;
sin.sin_addr.s_addr = inet_addr(argv[1]);
if (sin.sin_addr.s_addr == -1) {
connected = 0;
sin.sin_addr.s_addr = inet_addr(argv[1]);
if (sin.sin_addr.s_addr == -1) {
connected = 0;
-#if vax || pdp11
- sin.sin_port = htons(sin.sin_port);
-#endif
+ sin.sin_port = htons((u_short)sin.sin_port);
printf("%s: Unknown host.\n", cp);
return;
}
printf("%s: Unknown host.\n", cp);
return;
}
- bcopy(hp->h_addr, &sin.sin_addr, hp->h_length);
+ bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
sin.sin_family = hp->h_addrtype;
connected = 1;
hostname = hp->h_name;
sin.sin_family = hp->h_addrtype;
connected = 1;
hostname = hp->h_name;
printf("%s: Unknown host.\n", argv[n]);
continue;
}
printf("%s: Unknown host.\n", argv[n]);
continue;
}
- bcopy(hp->h_addr, &sin.sin_addr, hp->h_length);
+ bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
sin.sin_family = hp->h_addrtype;
connected = 1;
hostname = hp->h_name;
sin.sin_family = hp->h_addrtype;
connected = 1;
hostname = hp->h_name;
- * Call each command handler with argc == 0 and argv[0] == name.
*/
help(argc, argv)
int argc;
*/
help(argc, argv)
int argc;
-/* tftp.c 4.2 82/08/17 */
+/* tftp.c 4.3 82/11/14 */
/*
* TFTP User Program -- Protocol Machines
*/
#include <sys/types.h>
/*
* TFTP User Program -- Protocol Machines
*/
#include <sys/types.h>
+
+#include <netinet/in.h>
+
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
#include "tftp.h"
extern int errno;
#include "tftp.h"
extern int errno;
register int block = 0, size, n, amount = 0;
struct sockaddr_in from;
time_t start = time(0), delta;
register int block = 0, size, n, amount = 0;
struct sockaddr_in from;
time_t start = time(0), delta;
size = makerequest(WRQ, name) - 4;
timeout = 0;
size = makerequest(WRQ, name) - 4;
timeout = 0;
rexmt:
if (trace)
tpacket("sent", tp, size + 4);
rexmt:
if (trace)
tpacket("sent", tp, size + 4);
- if (send(f, &sin, buf, size + 4) != size + 4) {
+ n = sendto(f, buf, size + 4, (caddr_t)&sin, sizeof (sin), 0);
+ if (n != size + 4) {
perror("send");
break;
}
again:
perror("send");
break;
}
again:
- n = receive(f, &from, buf, sizeof (buf));
+ fromlen = sizeof (from);
+ n = recvfrom(f, buf, sizeof (buf), (caddr_t)&from, &fromlen, 0);
if (n <= 0) {
if (n == 0)
goto again;
if (n <= 0) {
if (n == 0)
goto again;
alarm(0);
if (trace)
tpacket("received", tp, n);
alarm(0);
if (trace)
tpacket("received", tp, n);
+ /* should verify packet came from server */
#if vax || pdp11
tp->th_opcode = ntohs(tp->th_opcode);
tp->th_block = ntohs(tp->th_block);
#if vax || pdp11
tp->th_opcode = ntohs(tp->th_opcode);
tp->th_block = ntohs(tp->th_block);
register int block = 1, n, size, amount = 0;
struct sockaddr_in from;
time_t start = time(0), delta;
register int block = 1, n, size, amount = 0;
struct sockaddr_in from;
time_t start = time(0), delta;
size = makerequest(RRQ, name);
timeout = 0;
size = makerequest(RRQ, name);
timeout = 0;
rexmt:
if (trace)
tpacket("sent", tp, size);
rexmt:
if (trace)
tpacket("sent", tp, size);
- if (send(f, &sin, buf, size) != size) {
+ if (sendto(f, buf, size, (caddr_t)&sin, sizeof (sin), 0) != size) {
perror("send");
break;
}
again:
perror("send");
break;
}
again:
- n = receive(f, &from, buf, sizeof (buf));
+ n = recvfrom(f, buf, sizeof (buf), (caddr_t)&from, &fromlen, 0);
if (n <= 0) {
if (n == 0)
goto again;
if (n <= 0) {
if (n == 0)
goto again;
alarm(0);
if (trace)
tpacket("received", tp, n);
alarm(0);
if (trace)
tpacket("received", tp, n);
+ /* should verify client address */
#if vax || pdp11
tp->th_opcode = ntohs(tp->th_opcode);
tp->th_block = ntohs(tp->th_block);
#if vax || pdp11
tp->th_opcode = ntohs(tp->th_opcode);
tp->th_block = ntohs(tp->th_block);
alarm(0);
tp->th_opcode = htons((u_short)ACK);
tp->th_block = htons((u_short)block);
alarm(0);
tp->th_opcode = htons((u_short)ACK);
tp->th_block = htons((u_short)block);
- (void) send(f, &sin, buf, 4);
+ (void) sendto(f, buf, 4, &sin, sizeof (sin), 0);
(void) close(fd);
if (amount > 0) {
delta = time(0) - start;
(void) close(fd);
if (amount > 0) {
delta = time(0) - start;
-static char sccsid[] = "@(#)rwhod.c 4.4 82/10/10";
+static char sccsid[] = "@(#)rwhod.c 4.5 82/11/14";
-#include <stdio.h>
-#include <signal.h>
-#include <errno.h>
-#include <utmp.h>
-#include "rwhod.h"
+
+#include <netinet/in.h>
+
+#include <nlist.h>
+#include <stdio.h>
+#include <signal.h>
+#include <errno.h>
+#include <utmp.h>
#include <ctype.h>
#include <netdb.h>
#include <ctype.h>
#include <netdb.h>
struct sockaddr_in sin = { AF_INET };
extern errno;
struct sockaddr_in sin = { AF_INET };
extern errno;
struct nlist nl[] = {
#define NL_AVENRUN 0
{ "_avenrun" },
struct nlist nl[] = {
#define NL_AVENRUN 0
{ "_avenrun" },
-#define NL_BOOTIME 1
- { "_bootime" },
+#define NL_BOOTTIME 1
+ { "_boottime" },
fprintf(stderr, "rwhod: udp/who: unknown service\n");
exit(1);
}
fprintf(stderr, "rwhod: udp/who: unknown service\n");
exit(1);
}
sp->s_port = htons(sp->s_port);
sp->s_port = htons(sp->s_port);
-#endif
- sin.sin_port = sp->s_port;
#ifndef DEBUG
if (fork())
exit(0);
#ifndef DEBUG
if (fork())
exit(0);
perror("rwhod: /etc/utmp");
exit(1);
}
perror("rwhod: /etc/utmp");
exit(1);
}
+ sin.sin_port = sp->s_port;
-again:
- if ((s = socket(SOCK_DGRAM, 0, &sin, 0)) < 0) {
+ if ((s = socket(0, SOCK_DGRAM, 0, 0)) < 0) {
- sleep(5);
- goto again;
+ exit(1);
+ }
+ if (bind(s, &sin, sizeof (sin), 0) < 0) {
+ perror("rwhod: bind");
+ exit(1);
}
sigset(SIGALRM, onalrm);
onalrm();
for (;;) {
struct whod wd;
}
sigset(SIGALRM, onalrm);
onalrm();
for (;;) {
struct whod wd;
+ int cc, whod, len=sizeof (from);
- cc = receive(s, &from, (char *)&wd, sizeof (struct whod));
+ cc = recvfrom(s, (char *)&wd, sizeof (struct whod), 0, &from, &len);
if (cc <= 0) {
if (cc < 0 && errno != EINTR)
if (cc <= 0) {
if (cc < 0 && errno != EINTR)
- perror("rwhod: receive");
continue;
}
if (from.sin_port != sp->s_port) {
continue;
}
if (from.sin_port != sp->s_port) {
mywd.wd_loadav[i] = avenrun[i] * 100;
cc = (char *)we - (char *)&mywd;
(void) time(&mywd.wd_sendtime);
mywd.wd_loadav[i] = avenrun[i] * 100;
cc = (char *)we - (char *)&mywd;
(void) time(&mywd.wd_sendtime);
- send(s, &sin, (char *)&mywd, cc);
+ (void) sendto(s, (char *)&mywd, cc, 0, &sin, sizeof (sin));
- (void) lseek(kmemf, (long)nl[NL_BOOTIME].n_value, 0);
- (void) read(kmemf, (char *)&mywd.wd_bootime, sizeof (mywd.wd_bootime));
+ (void) lseek(kmemf, (long)nl[NL_BOOTTIME].n_value, 0);
+ (void) read(kmemf, (char *)&mywd.wd_boottime, sizeof (mywd.wd_boottime));