X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ce751501abbddbe91d683d13b5cd845a5d551d8f..80b630570892c1eb0e5686c80cc788d6cf9eb8f8:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index fb1329e2..adbf015b 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -22,31 +22,29 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.47 1999-10-17 23:35:47 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.52 2000-09-28 06:42:56 guy Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include #include #include -#if __STDC__ struct mbuf; struct rtentry; -#endif -#include #include -#include #include -#ifdef HAVE_MEMORY_H -#include -#endif #include #include #include "interface.h" #include "addrtoname.h" +#include "ether.h" #include "bootp.h" static void rfc1048_print(const u_char *, u_int); @@ -265,7 +263,7 @@ static struct tok tag2str[] = { { TAG_RENEWAL_TIME, "lRN" }, { TAG_REBIND_TIME, "lRB" }, { TAG_VENDOR_CLASS, "bVC" }, - { TAG_CLIENT_ID, "bCID" }, + { TAG_CLIENT_ID, "xCID" }, { 0, NULL } }; @@ -428,12 +426,13 @@ rfc1048_print(register const u_char *bp, register u_int length) break; case 'b': + case 'x': default: /* Bytes */ while (size > 0) { if (!first) - putchar('.'); - printf("%d", *bp); + putchar (c == 'x' ? ':' : '.'); + printf (c == 'x' ? "%02x" : "%d", *bp); ++bp; --size; first = 0;