]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-arp.c
CVE-2016-7931/Add bounds and length checks.
[tcpdump] / print-arp.c
index b1cc7fc780535968aa901f5e146db186d4bd8425..79c8ecb1af3bcd58b548e3f882915a7a3b1c1ab5 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define NETDISSECT_REWORKED
+/* \summary: Address Resolution Protocol (ARP) printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 #include "ether.h"
 #include "ethertype.h"
-#include "extract.h"                   /* must come after interface.h */
+#include "extract.h"
 
 static const char tstr[] = "[|ARP]";
 
@@ -389,8 +390,8 @@ arp_print(netdissect_options *ndo,
 
        case ARPOP_INVREPLY:
                ND_PRINT((ndo,"%s at %s",
-                         linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
-                         ipaddr_string(ndo, TPA(ap))));
+                         linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap)),
+                         ipaddr_string(ndo, SPA(ap))));
                break;
 
        default: