From owner-svn-src-all@FreeBSD.ORG Mon Oct 28 08:03:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DD578B39; Mon, 28 Oct 2013 08:03:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C9E8A29CB; Mon, 28 Oct 2013 08:03:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9S83eKP056998; Mon, 28 Oct 2013 08:03:40 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9S83eOe056996; Mon, 28 Oct 2013 08:03:40 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201310280803.r9S83eOe056996@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Oct 2013 08:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257244 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2013 08:03:41 -0000 Author: glebius Date: Mon Oct 28 08:03:40 2013 New Revision: 257244 URL: http://svnweb.freebsd.org/changeset/base/257244 Log: - Make the prophecy from 1997 happen and remove if_var.h inclusion from if.h. - Remove unnecessary includes and declarations from if.h - Remove unnecessary includes and declarations from if_var.h [1] - Mark some declarations that are about to be removed in near future with comments, explaning why this declaration is still necessary. - Protect eventhandler declarations with #ifdef SYS_EVENTHANDLER_H. Obtained from: bdeBSD [1] Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if.h head/sys/net/if_var.h Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Mon Oct 28 07:47:52 2013 (r257243) +++ head/sys/net/if.h Mon Oct 28 08:03:40 2013 (r257244) @@ -35,10 +35,6 @@ #include -#ifdef _KERNEL -#include -#endif - #if __BSD_VISIBLE /* * does not depend on on most other systems. This @@ -49,8 +45,6 @@ #include #include #endif - -struct ifnet; #endif /* @@ -537,10 +531,4 @@ struct if_nameindex *if_nameindex(void); unsigned int if_nametoindex(const char *); __END_DECLS #endif - -#ifdef _KERNEL -/* XXX - this should go away soon. */ -#include -#endif - #endif /* !_NET_IF_H_ */ Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon Oct 28 07:47:52 2013 (r257243) +++ head/sys/net/if_var.h Mon Oct 28 08:03:40 2013 (r257244) @@ -58,38 +58,26 @@ * interfaces. These routines live in the files if.c and route.c */ -#ifdef __STDC__ -/* - * Forward structure declarations for function prototypes [sic]. - */ -struct mbuf; -struct thread; -struct rtentry; -struct rt_addrinfo; +struct rtentry; /* ifa_rtrequest */ +struct rt_addrinfo; /* ifa_rtrequest */ struct socket; -struct ether_header; struct carp_if; struct carp_softc; struct ifvlantrunk; -struct route; +struct route; /* if_output */ struct vnet; -#endif - -#include /* get TAILQ macros */ #ifdef _KERNEL -#include -#include +#include /* ifqueue only? */ #include #include #endif /* _KERNEL */ #include #include /* XXX */ -#include /* XXX */ +#include /* struct ifqueue */ #include /* XXX */ #include /* XXX */ -#include /* XXX */ -#include +#include /* if_link_task */ #define IF_DUNIT_NONE -1 @@ -220,8 +208,6 @@ struct ifnet { void *if_pspare[8]; /* 1 netmap, 7 TDB */ }; -typedef void if_init_f_t(void *); - /* * XXX These aliases are terribly dangerous because they could apply * to anything. @@ -367,6 +353,7 @@ void if_maddr_runlock(struct ifnet *ifp) } while(0) #ifdef _KERNEL +#ifdef SYS_EVENTHANDLER_H /* interface link layer address change event */ typedef void (*iflladdr_event_handler_t)(void *, struct ifnet *); EVENTHANDLER_DECLARE(iflladdr_event, iflladdr_event_handler_t); @@ -382,6 +369,7 @@ EVENTHANDLER_DECLARE(ifnet_departure_eve /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); +#endif /* SYS_EVENTHANDLER_H */ /* * interface groups @@ -404,6 +392,7 @@ struct ifg_list { TAILQ_ENTRY(ifg_list) ifgl_next; }; +#ifdef SYS_EVENTHANDLER_H /* group attach event */ typedef void (*group_attach_event_handler_t)(void *, struct ifg_group *); EVENTHANDLER_DECLARE(group_attach_event, group_attach_event_handler_t); @@ -413,6 +402,7 @@ EVENTHANDLER_DECLARE(group_detach_event, /* group change event */ typedef void (*group_change_event_handler_t)(void *, const char *); EVENTHANDLER_DECLARE(group_change_event, group_change_event_handler_t); +#endif /* SYS_EVENTHANDLER_H */ #define IF_AFDATA_LOCK_INIT(ifp) \ rw_init(&(ifp)->if_afdata_lock, "if_afdata")