Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 2013 14:45:46 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Luigi Rizzo <luigi@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r258463 - head/sys/netpfil/ipfw
Message-ID:  <20131122104546.GE7577@FreeBSD.org>
In-Reply-To: <201311220457.rAM4vpbW019390@svn.freebsd.org>
References:  <201311220457.rAM4vpbW019390@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131122104546.GE7577>