Module Name: src
Committed By: thorpej
Date: Sat Feb 1 21:59:40 UTC 2020
Modified Files:
src/sys/net: if.h
Log Message:
Make if_stats competely opaque to user-space.
To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/net/if.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.279 src/sys/net/if.h:1.280
--- src/sys/net/if.h:1.279 Sat Feb 1 21:11:10 2020
+++ src/sys/net/if.h Sat Feb 1 21:59:39 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.279 2020/02/01 21:11:10 thorpej Exp $ */
+/* $NetBSD: if.h,v 1.280 2020/02/01 21:59:39 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -291,7 +291,11 @@ typedef struct ifnet {
uint64_t if_metric; /* :? routing metric (external only) */
uint64_t if_baudrate; /* :? linespeed */
struct timespec if_lastchange; /* :? last operational state change */
+#ifdef _KERNEL
percpu_t *if_stats; /* :: statistics */
+#else
+ void *if_stats; /* opaque to user-space */
+#endif /* _KERNEL */
#else /* ! __IF_STATS_PERCPU */
struct if_data if_data; /* ?: statistics and other data */
#endif /* __IF_STATS_PERCPU */