Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Allow arplog to be used outside of if_arp.c



details:   https://anonhg.NetBSD.org/src/rev/706ef574663d
branches:  trunk
changeset: 347760:706ef574663d
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Sep 15 18:17:29 2016 +0000

description:
Allow arplog to be used outside of if_arp.c

diffstat:

 sys/netinet/if_arp.c |  10 ++++------
 sys/netinet/in_var.h |   5 ++++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r f688c8e46412 -r 706ef574663d sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c      Thu Sep 15 17:45:44 2016 +0000
+++ b/sys/netinet/if_arp.c      Thu Sep 15 18:17:29 2016 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 -r f688c8e46412 -r 706ef574663d sys/netinet/in_var.h
--- a/sys/netinet/in_var.h      Thu Sep 15 17:45:44 2016 +0000
+++ b/sys/netinet/in_var.h      Thu Sep 15 18:17:29 2016 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index