From 7478bd5e342e888c498c34842ef14fb24cf60251 Mon Sep 17 00:00:00 2001 From: joda Date: Tue, 20 Feb 2001 19:18:32 +0000 Subject: [PATCH] convert parameters to host byte order before printing them --- usr.sbin/tcpdump/print-bootp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/tcpdump/print-bootp.c b/usr.sbin/tcpdump/print-bootp.c index d9f2f3298677..c5413f513ca9 100644 --- a/usr.sbin/tcpdump/print-bootp.c +++ b/usr.sbin/tcpdump/print-bootp.c @@ -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 @@ rfc1048_print(register const u_char *bp, register u_int length) 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 @@ rfc1048_print(register const u_char *bp, register u_int length) 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;