Source-Changes-HG archive

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

[src/trunk]: src/sys/net Move macros related to multicast address into #ifdef...



details:   https://anonhg.NetBSD.org/src/rev/d6b7649baed1
branches:  trunk
changeset: 319853:d6b7649baed1
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Jun 14 07:39:16 2018 +0000

description:
Move macros related to multicast address into #ifdef _KERNEL

Those macros and structure are only used in the kernel.
reviewed by ozaki-r@n.o, thanks.

diffstat:

 sys/net/if_ether.h |  18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diffs (53 lines):

diff -r bcff363f7ba5 -r d6b7649baed1 sys/net/if_ether.h
--- a/sys/net/if_ether.h        Thu Jun 14 07:19:47 2018 +0000
+++ b/sys/net/if_ether.h        Thu Jun 14 07:39:16 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ether.h,v 1.72 2018/04/19 21:20:43 christos Exp $   */
+/*     $NetBSD: if_ether.h,v 1.73 2018/06/14 07:39:16 yamaguchi Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -205,6 +205,13 @@
        int             eccr_capenable;         /* capabilities enabled */
 };
 
+/* sysctl for Ethernet multicast addresses */
+struct ether_multi_sysctl {
+       u_int   enm_refcount;
+       uint8_t enm_addrlo[ETHER_ADDR_LEN];
+       uint8_t enm_addrhi[ETHER_ADDR_LEN];
+};
+
 #ifdef _KERNEL
 extern const uint8_t etherbroadcastaddr[ETHER_ADDR_LEN];
 extern const uint8_t ethermulticastaddr_slowprotocols[ETHER_ADDR_LEN];
@@ -217,7 +224,6 @@
 int    ether_delmulti(const struct sockaddr *, struct ethercom *);
 int    ether_multiaddr(const struct sockaddr *, uint8_t[], uint8_t[]);
 void    ether_input(struct ifnet *, struct mbuf *);
-#endif /* _KERNEL */
 
 /*
  * Ethernet multicast address structure.  There is one of these for each
@@ -232,12 +238,6 @@
        LIST_ENTRY(ether_multi) enm_list;
 };
 
-struct ether_multi_sysctl {
-       u_int   enm_refcount;
-       uint8_t enm_addrlo[ETHER_ADDR_LEN];
-       uint8_t enm_addrhi[ETHER_ADDR_LEN];
-};
-
 /*
  * Structure used by macros below to remember position when stepping through
  * all of the ether_multi records.
@@ -288,8 +288,6 @@
        ETHER_NEXT_MULTI((step), (enm)); \
 }
 
-#ifdef _KERNEL
-
 #define ETHER_LOCK(ec)         mutex_enter((ec)->ec_lock)
 #define ETHER_UNLOCK(ec)       mutex_exit((ec)->ec_lock)
 



Home | Main Index | Thread Index | Old Index