Date: Mon, 01 Sep 2008 12:12:05 +0800 From: Ganbold <ganbold@micom.mng.net> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Cc: Gleb Smirnoff <glebius@FreeBSD.org>, rizzo@iet.unipi.it, Julian Elischer <julian@elischer.org> Subject: IPFW_TABLES_MAX in src/sbin/ipfw/ipfw2.c Message-ID: <48BB6B95.4010103@micom.mng.net>
next in thread | raw e-mail | index | archive | help
Hi, Sorry for sending this third time (2 to freebsd-ipfw, 1 to freebsd-net). I'm trying to make small changes in ipfw2.c code (RELENG_7), 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 <netinet/ip_fw.h> ... I'm trying to read IPFW_TABLES_MAX and print all tables IP in loop. Any idea how to solve this problem? Basically I'm trying to add small feature (list IPs of all tables) to /sbin/ipfw something like: ipfw table all list I know it is possible to write small shell script to display all the tables and IPs in it. However I thought it might be useful to have such small feature in /sbin/ipfw. Correct me if I'm wrong here. thanks, Ganbold -- Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P. D. Ouspensky
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48BB6B95.4010103>