Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Make if_stats competely opaque to user-space.
details:   https://anonhg.NetBSD.org/src/rev/c25b74c4011c
branches:  trunk
changeset: 1006986:c25b74c4011c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 01 21:59:39 2020 +0000
description:
Make if_stats competely opaque to user-space.
diffstat:
 sys/net/if.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 1dd64def3a37 -r c25b74c4011c sys/net/if.h
--- a/sys/net/if.h      Sat Feb 01 21:45:11 2020 +0000
+++ b/sys/net/if.h      Sat Feb 01 21:59:39 2020 +0000
@@ -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 @@
        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 */
Home |
Main Index |
Thread Index |
Old Index