X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b638c78b40951d394e14dea3608f87a1cff9786f..817aadf8bb2f67efced4c26f7335db0f64d67783:/print-ip.c diff --git a/print-ip.c b/print-ip.c index 0752199c..d64aef75 100644 --- a/print-ip.c +++ b/print-ip.c @@ -23,7 +23,7 @@ #include "config.h" #endif -#include +#include #include @@ -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);