Date: Fri, 25 Dec 2009 17:05:55 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r200990 - user/luigi/ipfw3-head/sys/netinet/ipfw Message-ID: <200912251705.nBPH5tpW066785@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912251705.nBPH5tpW066785>