From owner-svn-src-head@FreeBSD.ORG Mon Oct 28 07:45:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DDA354E3; Mon, 28 Oct 2013 07:45:04 +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 B17DA28AC; Mon, 28 Oct 2013 07:45:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9S7j4Gf050444; Mon, 28 Oct 2013 07:45:04 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9S7j4XX050440; Mon, 28 Oct 2013 07:45:04 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201310280745.r9S7j4XX050440@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Oct 2013 07:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257242 - in head/sys: net sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2013 07:45:04 -0000 Author: glebius Date: Mon Oct 28 07:45:03 2013 New Revision: 257242 URL: http://svnweb.freebsd.org/changeset/base/257242 Log: Instead of putting ifnet declaration into eventhandler.h, move bpf(4) and vlan(4) related event declarations to bpf.h and if_vlan_var.h. To avoid dependency on eventhandler.h, protect these declarations with ifdef SYS_EVENTHANDLER_H. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/bpf.h head/sys/net/if_vlan_var.h head/sys/sys/eventhandler.h Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Mon Oct 28 07:29:16 2013 (r257241) +++ head/sys/net/bpf.h Mon Oct 28 07:45:03 2013 (r257242) @@ -1310,4 +1310,12 @@ bpf_peers_present(struct bpf_if *bpf) */ #define BPF_MEMWORDS 16 +#ifdef SYS_EVENTHANDLER_H +/* BPF attach/detach events */ +struct ifnet; +typedef void (*bpf_track_fn)(void *, struct ifnet *, int /* dlt */, + int /* 1 =>'s attach */); +EVENTHANDLER_DECLARE(bpf_track, bpf_track_fn); +#endif /* SYS_EVENTHANDLER_H */ + #endif /* _NET_BPF_H_ */ Modified: head/sys/net/if_vlan_var.h ============================================================================== --- head/sys/net/if_vlan_var.h Mon Oct 28 07:29:16 2013 (r257241) +++ head/sys/net/if_vlan_var.h Mon Oct 28 07:45:03 2013 (r257242) @@ -150,6 +150,14 @@ extern int (*vlan_tag_p)(struct ifnet *, extern int (*vlan_setcookie_p)(struct ifnet *, void *); extern void *(*vlan_cookie_p)(struct ifnet *); +#ifdef SYS_EVENTHANDLER_H +/* VLAN state change events */ +typedef void (*vlan_config_fn)(void *, struct ifnet *, uint16_t); +typedef void (*vlan_unconfig_fn)(void *, struct ifnet *, uint16_t); +EVENTHANDLER_DECLARE(vlan_config, vlan_config_fn); +EVENTHANDLER_DECLARE(vlan_unconfig, vlan_unconfig_fn); +#endif /* SYS_EVENTHANDLER_H */ + #endif /* _KERNEL */ #endif /* _NET_IF_VLAN_VAR_H_ */ Modified: head/sys/sys/eventhandler.h ============================================================================== --- head/sys/sys/eventhandler.h Mon Oct 28 07:29:16 2013 (r257241) +++ head/sys/sys/eventhandler.h Mon Oct 28 07:45:03 2013 (r257242) @@ -203,19 +203,6 @@ typedef void (*vfs_unmounted_notify_fn)( EVENTHANDLER_DECLARE(vfs_mounted, vfs_mounted_notify_fn); EVENTHANDLER_DECLARE(vfs_unmounted, vfs_unmounted_notify_fn); -/* VLAN state change events */ -struct ifnet; -typedef void (*vlan_config_fn)(void *, struct ifnet *, uint16_t); -typedef void (*vlan_unconfig_fn)(void *, struct ifnet *, uint16_t); -EVENTHANDLER_DECLARE(vlan_config, vlan_config_fn); -EVENTHANDLER_DECLARE(vlan_unconfig, vlan_unconfig_fn); - -/* BPF attach/detach events */ -struct ifnet; -typedef void (*bpf_track_fn)(void *, struct ifnet *, int /* dlt */, - int /* 1 =>'s attach */); -EVENTHANDLER_DECLARE(bpf_track, bpf_track_fn); - /* * Process events * process_fork and exit handlers are called without Giant.