summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mopd
diff options
context:
space:
mode:
authormaja <maja@openbsd.org>2006-04-15 11:55:48 +0000
committermaja <maja@openbsd.org>2006-04-15 11:55:48 +0000
commit80e63575f9ad1c84381f43326f1416f8dc35aaf7 (patch)
tree3515f0913940c35d2faee3a3f74b21d3d9a7090a /usr.sbin/mopd
parentsort; (diff)
downloadwireguard-openbsd-80e63575f9ad1c84381f43326f1416f8dc35aaf7.tar.xz
wireguard-openbsd-80e63575f9ad1c84381f43326f1416f8dc35aaf7.zip
Fix some bugs in printing of MOP packets. -moj
Diffstat (limited to 'usr.sbin/mopd')
-rw-r--r--usr.sbin/mopd/common/dl.c8
-rw-r--r--usr.sbin/mopd/common/print.c20
2 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/mopd/common/dl.c b/usr.sbin/mopd/common/dl.c
index 1cd89027f71..ee283043913 100644
--- a/usr.sbin/mopd/common/dl.c
+++ b/usr.sbin/mopd/common/dl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dl.c,v 1.5 2004/04/14 20:37:28 henning Exp $ */
+/* $OpenBSD: dl.c,v 1.6 2006/04/15 11:55:48 maja Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#ifndef LINT
static const char rcsid[] =
- "$OpenBSD: dl.c,v 1.5 2004/04/14 20:37:28 henning Exp $";
+ "$OpenBSD: dl.c,v 1.6 2006/04/15 11:55:48 maja Exp $";
#endif
#include "os.h"
@@ -238,7 +238,7 @@ mopDumpDL(FILE *fd, u_char *pkt, int trans)
c = mopGetChar(pkt, &index); /* Parameter Length */
switch (tmpc) {
case MOP_K_PLTP_TSN: /* Target Name */
- fprintf(fd, "Target Name : %02x '", tmpc);
+ fprintf(fd, "Target Name : %02x '", c);
for (i = 0; i < c; i++)
fprintf(fd, "%c",
mopGetChar(pkt, &index));
@@ -252,7 +252,7 @@ mopDumpDL(FILE *fd, u_char *pkt, int trans)
fprintf(fd, "\n");
break;
case MOP_K_PLTP_HSN: /* Host Name */
- fprintf(fd, "Host Name : %02x '", tmpc);
+ fprintf(fd, "Host Name : %02x '", c);
for (i = 0; i < c; i++)
fprintf(fd, "%c",
mopGetChar(pkt, &index));
diff --git a/usr.sbin/mopd/common/print.c b/usr.sbin/mopd/common/print.c
index 32cf3a6fb67..8ed8208af28 100644
--- a/usr.sbin/mopd/common/print.c
+++ b/usr.sbin/mopd/common/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.8 2004/09/20 17:51:07 miod Exp $ */
+/* $OpenBSD: print.c,v 1.9 2006/04/15 11:55:48 maja Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#ifndef LINT
static const char rcsid[] =
- "$OpenBSD: print.c,v 1.8 2004/09/20 17:51:07 miod Exp $";
+ "$OpenBSD: print.c,v 1.9 2006/04/15 11:55:48 maja Exp $";
#endif
#include <sys/types.h>
@@ -559,7 +559,7 @@ mopPrintInfo(FILE *fd, u_char *pkt, int *index, u_short moplen, u_char mopcode,
break;
case MOP_K_INFO_DLTY:
tmpc = mopGetChar(pkt, index);
- fprintf(fd, "Data Link Type: %02x ", tmpc);
+ fprintf(fd, "DLnk Type : %02x ", tmpc);
switch (tmpc) {
case MOP_K_DLTY_NI:
fprintf(fd, "Ethernet\n");
@@ -577,20 +577,20 @@ mopPrintInfo(FILE *fd, u_char *pkt, int *index, u_short moplen, u_char mopcode,
break;
case MOP_K_INFO_DLBSZ:
tmps = mopGetShort(pkt, index);
- fprintf(fd, "DL Buff Size : %04x (%d)\n", tmps, tmps);
+ fprintf(fd, "DLnk Buf Size: %04x (%d)\n", tmps, tmps);
break;
default:
- if (((device = NMA_C_SOFD_LCS) || /* DECserver 100 */
- (device = NMA_C_SOFD_DS2) || /* DECserver 200 */
- (device = NMA_C_SOFD_DP2) || /* DECserver 250 */
- (device = NMA_C_SOFD_DS3)) && /* DECserver 300 */
+ if (((device == NMA_C_SOFD_LCS) || /* DECserver 100 */
+ (device == NMA_C_SOFD_DS2) || /* DECserver 200 */
+ (device == NMA_C_SOFD_DP2) || /* DECserver 250 */
+ (device == NMA_C_SOFD_DS3)) && /* DECserver 300 */
((itype > 101) && (itype < 107)))
{
switch (itype) {
case 102:
ucp = pkt + *index;
*index = *index + ilen;
- fprintf(fd, "ROM Sftwr Ver: %02x '",
+ fprintf(fd, "ROM SW Ver : %02x '",
ilen);
for (i = 0; i < ilen; i++)
fprintf(fd, "%c", ucp[i]);
@@ -599,7 +599,7 @@ mopPrintInfo(FILE *fd, u_char *pkt, int *index, u_short moplen, u_char mopcode,
case 103:
ucp = pkt + *index;
*index = *index + ilen;
- fprintf(fd, "Software Ver : %02x '",
+ fprintf(fd, "Loaded SW Ver: %02x '",
ilen);
for (i = 0; i < ilen; i++)
fprintf(fd, "%c", ucp[i]);