This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: glibc-2.1 and ip_fw.h


> Date: Sat, 20 Feb 1999 22:31:58 +0900 (KST)
> From: Byeong-ryeol Kim <jinbo21@mail.kornet.nm.kr>
> Reply-To: Byeong-ryeol Kim <jinbo21@soback.kornet.nm.kr>
> 
> I tried to compile linuxconf-1.2r5, but met errors below.
> There is no ip_fw.h in /usr/include/*, but it is only in linux 
> directory of kernel source.
> The firewall.cc file contains header files in glibc2 as follows:
> 
> ...
> #ifdef __GLIBC__
> 	#include <netinet/ip.h>
> 	#include <netinet/tcp.h>
> 	#include <netinet/udp.h>
> 	#include <netinet/ip_icmp.h>
> 	#include <net/if.h>
> 	#include <netinet/ip_fw.h>
> #else
> 	#include <linux/ip.h>
> 	#include <linux/tcp.h>
> 	#include <linux/udp.h>
> 	#include <linux/icmp.h>
> 	#include <linux/if.h>
> 	#include <linux/timer.h>
> 	#include <linux/ip_fw.h>
> #endif
> ....
> 
> But, there is no ip_fw.h in /usr/include/netinet and elsewhere.
> As a consequence, the compile process aborts when compiling 
> firewall.cc.(see 1)
> I tried /usr/src/linux/include/linux/ip_fw.h with no avail.(see 2)
> I know, in this case. one sould create one's own private header 
> file, but it is inconvenient and this ip_fw.h is necessary for 
> programs for firewall.
> Is this intentional or from some other reason?

I believe it is intentional.  IIRC, ip_fw.h varies incompatibly
between kernel versions, so there is no "correct" version we could put
in glibc.

So the only solution is to make your own ip_fw.h which contains the
structure definitions you wanted.

I suppose we could come up with some kind of header file by including
all the different structure definitions from the kernel, so you'd have

struct ip_fwpkt_k2_0
struct ip_fwpkt_k2_2

and whatever other versions are necessary.

-- 
Geoffrey Keating <geoffk@ozemail.com.au>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]