From bddde31ef2ac287e4343eced064c1712bbf1746c Mon Sep 17 00:00:00 2001 From: roy Date: Thu, 15 Sep 2016 18:17:29 +0000 Subject: [PATCH] Allow arplog to be used outside of if_arp.c --- sys/netinet/if_arp.c | 10 ++++------ sys/netinet/in_var.h | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sys/netinet/if_arp.c b/sys/netinet/if_arp.c index b2cdca6c3921..4681dc55d8b4 100644 --- a/sys/netinet/if_arp.c +++ b/sys/netinet/if_arp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.223 2016/09/07 13:01:39 roy Exp $ */ +/* $NetBSD: if_arp.c,v 1.224 2016/09/15 18:17:29 roy Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.223 2016/09/07 13:01:39 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.224 2016/09/15 18:17:29 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -149,12 +149,10 @@ static int arp_maxhold = 1; /* number of packets to hold per ARP entry */ int ip_dad_count = PROBE_NUM; #ifdef ARP_DEBUG -static int arp_debug = 1; +int arp_debug = 1; #else -static int arp_debug = 0; +int arp_debug = 0; #endif -#define arplog(level, fmt, args...) \ - do { if (arp_debug) log(level, "%s: " fmt, __func__, ##args);} while (0) static void arp_init(void); diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index ca66140bca0e..bb1c2ccceda5 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -1,4 +1,4 @@ -/* $NetBSD: in_var.h,v 1.81 2016/09/13 00:45:15 christos Exp $ */ +/* $NetBSD: in_var.h,v 1.82 2016/09/15 18:17:29 roy Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -378,6 +378,9 @@ struct in_multi { extern pktqueue_t *ip_pktq; extern int ip_dad_count; /* Duplicate Address Detection probes */ +extern int arp_debug; +#define arplog(level, fmt, args...) \ + do { if (arp_debug) log(level, "%s: " fmt, __func__, ##args);} while (0) /* * Structure used by functions below to remember position when stepping