From owner-svn-src-head@FreeBSD.ORG Fri Nov 22 10:45:48 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTPS id B1D6B28D; Fri, 22 Nov 2013 10:45:48 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (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 22C8D2953; Fri, 22 Nov 2013 10:45:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rAMAjkRg087728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 22 Nov 2013 14:45:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rAMAjk2C087727; Fri, 22 Nov 2013 14:45:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 22 Nov 2013 14:45:46 +0400 From: Gleb Smirnoff To: Luigi Rizzo Subject: Re: svn commit: r258463 - head/sys/netpfil/ipfw Message-ID: <20131122104546.GE7577@FreeBSD.org> References: <201311220457.rAM4vpbW019390@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311220457.rAM4vpbW019390@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 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: Fri, 22 Nov 2013 10:45:48 -0000 Luigi, On Fri, Nov 22, 2013 at 04:57:51AM +0000, Luigi Rizzo wrote: L> Author: luigi L> Date: Fri Nov 22 04:57:50 2013 L> New Revision: 258463 L> URL: http://svnweb.freebsd.org/changeset/base/258463 L> L> Log: L> make ipfw_check_packet() and ipfw_check_frame() public, L> so they can be used in the userspace version of ipfw/dummynet L> (normally using netmap for the I/O path). L> L> This is the first of a few commits to ease compiling the L> ipfw kernel code in userspace. Is it possible to put the static word under #ifndef USERSPACE? Or do we want to expose these functions to the rest of kernel? L> Modified: L> head/sys/netpfil/ipfw/ip_fw_pfil.c L> L> Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c L> ============================================================================== L> --- head/sys/netpfil/ipfw/ip_fw_pfil.c Fri Nov 22 04:05:24 2013 (r258462) L> +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Fri Nov 22 04:57:50 2013 (r258463) L> @@ -82,9 +82,9 @@ int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); L> L> /* Forward declarations. */ L> static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); L> -static int ipfw_check_packet(void *, struct mbuf **, struct ifnet *, int, L> +int ipfw_check_packet(void *, struct mbuf **, struct ifnet *, int, L> struct inpcb *); L> -static int ipfw_check_frame(void *, struct mbuf **, struct ifnet *, int, L> +int ipfw_check_frame(void *, struct mbuf **, struct ifnet *, int, L> struct inpcb *); L> L> #ifdef SYSCTL_NODE L> @@ -116,7 +116,7 @@ SYSEND L> * dummynet, divert, netgraph or other modules. L> * The packet may be consumed. L> */ L> -static int L> +int L> ipfw_check_packet(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, L> struct inpcb *inp) L> { L> @@ -292,7 +292,7 @@ again: L> * Inteface is NULL from ether_demux, and ifp from L> * ether_output_frame. L> */ L> -static int L> +int L> ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *dst, int dir, L> struct inpcb *inp) L> { -- Totus tuus, Glebius.