From owner-freebsd-ipfw@FreeBSD.ORG Fri Aug 29 09:06:16 2008 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CBDD106566B for ; Fri, 29 Aug 2008 09:06:16 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id C07D68FC16 for ; Fri, 29 Aug 2008 09:06:15 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=daemon.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KYzWz-000KmI-GU for freebsd-ipfw@freebsd.org; Fri, 29 Aug 2008 16:40:33 +0800 Message-ID: <48B7B606.2040802@micom.mng.net> Date: Fri, 29 Aug 2008 16:40:38 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.12 (X11/20080415) MIME-Version: 1.0 To: freebsd-ipfw@freebsd.org X-Enigmail-Version: 0.95.6 OpenPGP: id=78F6425E Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: IPFW_TABLES_MAX in src/sbin/ipfw/ipfw2.c X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 09:06:16 -0000 Hi, I'm trying to make small changes in ipfw2.c code, but make fails with following error: v02# make cc -O2 -fno-strict-aliasing -pipe -Wno-pointer-sign -c /usr/src/sbin/ipfw/ipfw2.c /usr/src/sbin/ipfw/ipfw2.c: In function 'table_handler': /usr/src/sbin/ipfw/ipfw2.c:5941: error: 'IPFW_TABLES_MAX' undeclared (first use in this function) /usr/src/sbin/ipfw/ipfw2.c:5941: error: (Each undeclared identifier is reported only once /usr/src/sbin/ipfw/ipfw2.c:5941: error: for each function it appears in.) *** Error code 1 IPFW_TABLES_MAX seems like defined in netinet/ip_fw.h, which is included in ipfw2.c: #define IPFW_INTERNAL /* Access to protected structures in ip_fw.h. */ ... #include ... Any idea how to solve this problem? Basically I'm trying to add small feature (list all tables) to ipfw something like: ipfw table all list I know it is possible to write small shell script to display all the tables and IPs. However I thought it might be useful to have such small feature in ipfw2 code. Correct me if I'm wrong here. thanks, Ganbold -- With listening comes wisdom, with speaking repentance.