This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: [danyd@fastrac.net.au] libc/846: struct ip_fw mismatch between netinet/ip_fw.h and linux/ip_fw.h
- To: libc-hacker@cygnus.com, danyd@fastrac.net.au
- Subject: Re: [danyd@fastrac.net.au] libc/846: struct ip_fw mismatch between netinet/ip_fw.h and linux/ip_fw.h
- From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Date: 21 Nov 1998 22:40:23 +0100
- Mail-Copies-To: never
- References: <E0zadTj-0006By-00@fountain.nexus.co.uk> <r23e80lslr.fsf@happy.cygnus.com>
>>>>> Ulrich Drepper writes:
Ulrich> Philip Blundell <pb@nexus.co.uk> writes:
>> Agreed. The ipfw program is probably about the only user and is presumably
>> maintained by the same people who look after the kernel code.
>>
>> I don't think we want to put a wrapper round setsockopt() just to make this
>> work.
Ulrich> OK. Could someone come up with a patch and a FAQ entry?
Ok, here's a possible solution:
Looking at the actual file, I'm in favor of removing <netinet/ip_fw.h>
totally. Nearly all structures and defines are different between
Linux 2.0 and Linux 2.1.
Here's a patch and a FAQ entry (the patch doesn't remove the file).
Andreas
1998-11-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/netinet/ip_fw.h: Removed. There are too
many differences between the Linux 2.0 and 2.1 versions of this
file and it's too difficult to convert all calls. The file should
only be needed by the ipfw program which has to take care of the
correct kernel version and include files.
* sysdeps/unix/sysv/linux/Dist: Remove netinet/ip_fw.h.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Likewise.
Index: FAQ.in
===================================================================
RCS file: /glibc/cvsfiles/libc/FAQ.in,v
retrieving revision 1.42
diff -u -r1.42 FAQ.in
--- FAQ.in 1998/11/20 17:20:37 1.42
+++ FAQ.in 1998/11/21 21:39:26
@@ -1094,6 +1094,14 @@
when thinking about it. The standards describing the System V IPC functions
define it this way and therefore programs must be adopted.
+?? Why has <netinet/ip_fw.h> disappeared?
+
+{AJ} The corresponding Linux kernel data structures and constants are
+totally different in Linux 2.0 and Linux 2.1. This situation has to be
+taken care in user programs using the firewall structures and therefore
+those programs (ipfw is AFAIK the only one) should deal with this problem
+themselves.
+
? Miscellaneous
Index: sysdeps/unix/sysv/linux/Dist
===================================================================
RCS file: /glibc/cvsfiles/libc/sysdeps/unix/sysv/linux/Dist,v
retrieving revision 1.62
diff -u -r1.62 Dist
--- sysdeps/unix/sysv/linux/Dist 1998/11/12 18:05:36 1.62
+++ sysdeps/unix/sysv/linux/Dist 1998/11/21 21:39:26
@@ -34,7 +34,6 @@
netinet/if_tr.h
netinet/igmp.h
netinet/in_systm.h
-netinet/ip_fw.h
netlink/netlink.h
netpacket/packet.h
netipx/ipx.h
Index: sysdeps/unix/sysv/linux/Makefile
===================================================================
RCS file: /glibc/cvsfiles/libc/sysdeps/unix/sysv/linux/Makefile,v
retrieving revision 1.93
diff -u -r1.93 Makefile
--- sysdeps/unix/sysv/linux/Makefile 1998/11/12 18:05:43 1.93
+++ sysdeps/unix/sysv/linux/Makefile 1998/11/21 21:39:26
@@ -80,7 +80,7 @@
endif
ifeq ($(subdir),inet)
-sysdep_headers += sys/socketvar.h netinet/in_systm.h netinet/ip_fw.h \
+sysdep_headers += sys/socketvar.h netinet/in_systm.h \
netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \
netipx/ipx.h netash/ash.h netax25/ax25.h netatalk/at.h \
netrom/netrom.h netpacket/packet.h netrose/rose.h \
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de