convert parameters to host byte order before printing them

This commit is contained in:
joda 2001-02-20 19:18:32 +00:00
parent 9c52662e24
commit 7478bd5e34

View File

@ -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;