From owner-svn-src-user@FreeBSD.ORG Fri Dec 25 17:05:55 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E719D1065672; Fri, 25 Dec 2009 17:05:55 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5B558FC08; Fri, 25 Dec 2009 17:05:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBPH5t2U066787; Fri, 25 Dec 2009 17:05:55 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBPH5tpW066785; Fri, 25 Dec 2009 17:05:55 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200912251705.nBPH5tpW066785@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 25 Dec 2009 17:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200990 - user/luigi/ipfw3-head/sys/netinet/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2009 17:05:56 -0000 Author: luigi Date: Fri Dec 25 17:05:55 2009 New Revision: 200990 URL: http://svn.freebsd.org/changeset/base/200990 Log: make it possible to omit the bpf support Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_log.c Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_log.c Fri Dec 25 16:53:14 2009 (r200989) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_log.c Fri Dec 25 17:05:55 2009 (r200990) @@ -87,6 +87,12 @@ __FBSDID("$FreeBSD$"); #define SNPARGS(buf, len) buf + len, sizeof(buf) > len ? sizeof(buf) - len : 0 #define SNP(buf) buf, sizeof(buf) +#ifdef WITHOUT_BPF +void +ipfw_log_bpf(int onoff) +{ +} +#else /* !WITHOUT_BPF */ static struct ifnet *log_if; /* hook to attach to bpf */ /* we use this dummy function for all ifnet callbacks */ @@ -128,6 +134,7 @@ ipfw_log_bpf(int onoff) log_if = NULL; } } +#endif /* !WITHOUT_BPF */ /* * We enter here when we have a rule with O_LOG. @@ -143,6 +150,7 @@ ipfw_log(struct ip_fw *f, u_int hlen, st char action2[40], proto[128], fragment[32]; if (V_fw_verbose == 0) { +#ifndef WITHOUT_BPF struct m_hdr mh; if (log_if == NULL || log_if->if_bpf == NULL) @@ -173,6 +181,7 @@ ipfw_log(struct ip_fw *f, u_int hlen, st ip->ip_len = htons(ip->ip_len); } #endif /* !HAVE_NET_IPLEN */ +#endif /* !WITHOUT_BPF */ return; } /* the old 'log' function */