-/* $NetBSD: bpf.c,v 1.5 1995/10/06 05:12:12 thorpej Exp $ */
+/* $NetBSD: bpf.c,v 1.5.2.1 1995/11/14 08:45:42 thorpej Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
#ifndef lint
/*static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$NetBSD: bpf.c,v 1.5 1995/10/06 05:12:12 thorpej Exp $";
+static char rcsid[] = "$NetBSD: bpf.c,v 1.5.2.1 1995/11/14 08:45:42 thorpej Exp $";
#endif /* not lint */
#include <sys/param.h>
syslog(LOG_ERR, "bpf: large packet dropped (%d bytes)",
caplen);
else {
- rconn->rmplen = htons(caplen);
+ rconn->rmplen = caplen;
bcopy((char *)&bhp->bh_tstamp, (char *)&rconn->tstamp,
sizeof(struct timeval));
bcopy((char *)bp + hdrlen, (char *)&rconn->rmp, caplen);
BpfWrite(rconn)
RMPCONN *rconn;
{
- if (write(BpfFd, (char *)&rconn->rmp, ntohs(rconn->rmplen)) < 0) {
+ if (write(BpfFd, (char *)&rconn->rmp, rconn->rmplen) < 0) {
syslog(LOG_ERR, "write: %s: %m", EnetStr(rconn));
return(0);
}
-/* $NetBSD: rmp_var.h,v 1.7 1995/10/06 05:12:19 thorpej Exp $ */
+/* $NetBSD: rmp_var.h,v 1.7.2.1 1995/11/14 08:45:43 thorpej Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
* limited to 255 bytes due to the preceding 1-byte length field.
*/
-#define RMPBOOTSIZE(s) htons(sizeof(struct hp_hdr) + sizeof(struct hp_llc) + \
+#define RMPBOOTSIZE(s) (sizeof(struct hp_hdr) + sizeof(struct hp_llc) + \
sizeof(struct rmp_boot_repl) + s - sizeof(restofpkt))
-#define RMPREADSIZE(s) htons(sizeof(struct hp_hdr) + sizeof(struct hp_llc) + \
+#define RMPREADSIZE(s) (sizeof(struct hp_hdr) + sizeof(struct hp_llc) + \
sizeof(struct rmp_read_repl) + s - sizeof(restofpkt) \
- sizeof(u_int8_t))
-#define RMPDONESIZE htons(sizeof(struct hp_hdr) + sizeof(struct hp_llc) + \
+#define RMPDONESIZE (sizeof(struct hp_hdr) + sizeof(struct hp_llc) + \
sizeof(struct rmp_boot_done))
#define RMPBOOTDATA 255
#define RMPREADDATA (RMPDATALEN - \
-/* $NetBSD: rmpproto.c,v 1.5 1995/10/06 05:12:21 thorpej Exp $ */
+/* $NetBSD: rmpproto.c,v 1.5.2.1 1995/11/14 08:45:44 thorpej Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
#ifndef lint
/*static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$NetBSD: rmpproto.c,v 1.5 1995/10/06 05:12:21 thorpej Exp $";
+static char rcsid[] = "$NetBSD: rmpproto.c,v 1.5.2.1 1995/11/14 08:45:44 thorpej Exp $";
#endif /* not lint */
#include <sys/param.h>
*/
bcopy((char *)&rconn->rmp.hp_hdr.saddr[0],
(char *)&rconn->rmp.hp_hdr.daddr[0], RMP_ADDRLEN);
- rconn->rmp.hp_hdr.len = htons(ntohs(rconn->rmplen)
- - sizeof(struct hp_hdr));
+ rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr));
/*
* Reverse 802.2/HP Extended Source & Destination Access Pts.
-/* $NetBSD: utils.c,v 1.5 1995/10/06 05:12:22 thorpej Exp $ */
+/* $NetBSD: utils.c,v 1.5.2.1 1995/11/14 08:45:46 thorpej Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
#ifndef lint
/*static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$NetBSD: utils.c,v 1.5 1995/10/06 05:12:22 thorpej Exp $";
+static char rcsid[] = "$NetBSD: utils.c,v 1.5.2.1 1995/11/14 08:45:46 thorpej Exp $";
#endif /* not lint */
#include <sys/param.h>
(void) fprintf(DbgFp, ReadFmt, rmp->r_rrpl.rmp_retcode,
t, ntohs(rmp->r_rrpl.rmp_session));
(void) fprintf(DbgFp, "\t\tNoOfBytesSent: %d\n",
- ntohs(rconn->rmplen) - ntohs(RMPREADSIZE(0)));
+ rconn->rmplen - RMPREADSIZE(0));
break;
case RMP_BOOT_DONE: /* boot complete */
(void) fprintf(DbgFp, "\tBoot Complete:\n");