X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c1c3c77463d592cc576eaa491e604752044ca55a..d6aacc676d8540f31d1df72b12b43fc9cde93df6:/print-ip.c diff --git a/print-ip.c b/print-ip.c index 09a44ae5..d64aef75 100644 --- a/print-ip.c +++ b/print-ip.c @@ -23,13 +23,13 @@ #include "config.h" #endif -#include +#include #include #include "netdissect.h" #include "addrtoname.h" -#include "extract.h" /* must come after interface.h */ +#include "extract.h" #include "ip.h" #include "ipproto.h" @@ -122,7 +122,7 @@ ip_finddst(netdissect_options *ndo, } } trunc: - UNALIGNED_MEMCPY(&retval, &ip->ip_dst.s_addr, sizeof(uint32_t)); + UNALIGNED_MEMCPY(&retval, &ip->ip_dst, sizeof(uint32_t)); return retval; } @@ -147,9 +147,9 @@ nextproto4_cksum(netdissect_options *ndo, ph.len = htons((uint16_t)len); ph.mbz = 0; ph.proto = next_proto; - UNALIGNED_MEMCPY(&ph.src, &ip->ip_src.s_addr, sizeof(uint32_t)); + UNALIGNED_MEMCPY(&ph.src, &ip->ip_src, sizeof(uint32_t)); if (IP_HL(ip) == 5) - UNALIGNED_MEMCPY(&ph.dst, &ip->ip_dst.s_addr, sizeof(uint32_t)); + UNALIGNED_MEMCPY(&ph.dst, &ip->ip_dst, sizeof(uint32_t)); else ph.dst = ip_finddst(ndo, ip);