Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/tcpdump convert parameters to host byte order befor...
details: https://anonhg.NetBSD.org/src/rev/d69e30522fcd
branches: trunk
changeset: 504046:d69e30522fcd
user: joda <joda%NetBSD.org@localhost>
date: Tue Feb 20 19:18:32 2001 +0000
description:
convert parameters to host byte order before printing them
diffstat:
usr.sbin/tcpdump/print-bootp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 6bf7d527b87c -r d69e30522fcd usr.sbin/tcpdump/print-bootp.c
--- a/usr.sbin/tcpdump/print-bootp.c Tue Feb 20 18:33:09 2001 +0000
+++ b/usr.sbin/tcpdump/print-bootp.c Tue Feb 20 19:18:32 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print-bootp.c,v 1.7 2000/10/11 20:23:57 is Exp $ */
+/* $NetBSD: print-bootp.c,v 1.8 2001/02/20 19:18:32 joda Exp $ */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -28,7 +28,7 @@
static const char rcsid[] =
"@(#) Header: print-bootp.c,v 1.45 97/06/15 13:20:28 leres Exp (LBL)";
#else
-__RCSID("$NetBSD: print-bootp.c,v 1.7 2000/10/11 20:23:57 is Exp $");
+__RCSID("$NetBSD: print-bootp.c,v 1.8 2001/02/20 19:18:32 joda Exp $");
#endif
#endif
@@ -351,7 +351,7 @@
if (c == 'i')
printf("%s", ipaddr_string(&ul));
else
- printf("%u", ul);
+ printf("%u", ntohl(ul));
bp += sizeof(ul);
size -= sizeof(ul);
first = 0;
@@ -364,7 +364,7 @@
if (!first)
putchar(',');
memcpy((char *)&us, (char *)bp, sizeof(us));
- printf("%d", us);
+ printf("%d", ntohs(us));
bp += sizeof(us);
size -= sizeof(us);
first = 0;
Home |
Main Index |
Thread Index |
Old Index