X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/64677b0d78ff168d98c3035e894c4910c021136e..aa9960a2c3d98c38d385c10e54d9160cb89feba0:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index 63a67f2d..37a05346 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -22,10 +22,10 @@ /* \summary: BOOTP and IPv4 DHCP printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include @@ -72,7 +72,7 @@ struct bootp { nd_byte bp_sname[64]; /* server host name */ nd_byte bp_file[128]; /* boot file name */ nd_byte bp_vend[64]; /* vendor-specific area */ -} UNALIGNED; +} ND_UNALIGNED; #define BOOTPREPLY 2 #define BOOTPREQUEST 1 @@ -247,7 +247,7 @@ struct cmu_vend { struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */ struct in_addr v_ts1, v_ts2; /* Time servers */ nd_byte v_unused[24]; /* currently unused */ -} UNALIGNED; +} ND_UNALIGNED; /* v_flags values */ @@ -332,22 +332,22 @@ bootp_print(netdissect_options *ndo, ND_PRINT(" (0x%04x)", EXTRACT_BE_U_2(bp->bp_flags)); /* Client's ip address */ - ND_TCHECK(bp->bp_ciaddr); + ND_TCHECK_4(&bp->bp_ciaddr); if (EXTRACT_IPV4_TO_HOST_ORDER(&bp->bp_ciaddr.s_addr)) ND_PRINT("\n\t Client-IP %s", ipaddr_string(ndo, &bp->bp_ciaddr)); /* 'your' ip address (bootp client) */ - ND_TCHECK(bp->bp_yiaddr); + ND_TCHECK_4(&bp->bp_yiaddr); if (EXTRACT_IPV4_TO_HOST_ORDER(&bp->bp_yiaddr.s_addr)) ND_PRINT("\n\t Your-IP %s", ipaddr_string(ndo, &bp->bp_yiaddr)); /* Server's ip address */ - ND_TCHECK(bp->bp_siaddr); + ND_TCHECK_4(&bp->bp_siaddr); if (EXTRACT_IPV4_TO_HOST_ORDER(&bp->bp_siaddr.s_addr)) ND_PRINT("\n\t Server-IP %s", ipaddr_string(ndo, &bp->bp_siaddr)); /* Gateway's ip address */ - ND_TCHECK(bp->bp_giaddr); + ND_TCHECK_4(&bp->bp_giaddr); if (EXTRACT_IPV4_TO_HOST_ORDER(&bp->bp_giaddr.s_addr)) ND_PRINT("\n\t Gateway-IP %s", ipaddr_string(ndo, &bp->bp_giaddr)); @@ -1052,7 +1052,7 @@ trunc: ND_PRINT("|[rfc1048]"); } -#define PRINTCMUADDR(m, s) { ND_TCHECK(cmu->m); \ +#define PRINTCMUADDR(m, s) { ND_TCHECK_4(&cmu->m); \ if (cmu->m.s_addr != 0) \ ND_PRINT(" %s:%s", s, ipaddr_string(ndo, &cmu->m.s_addr)); }