Module Name:    src
Committed By:   yamaguchi
Date:           Thu Jun 14 07:39:16 UTC 2018

Modified Files:
        src/sys/net: if_ether.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/net/if_ether.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_ether.h
diff -u src/sys/net/if_ether.h:1.72 src/sys/net/if_ether.h:1.73
--- src/sys/net/if_ether.h:1.72	Thu Apr 19 21:20:43 2018
+++ src/sys/net/if_ether.h	Thu Jun 14 07:39:16 2018
@@ -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 @@ struct eccapreq {
 	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_addmulti(const struct sockaddr
 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 @@ struct ether_multi {
 	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 @@ struct ether_multistep {
 	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)
 

Reply via email to