This is the mail archive of the libc-hacker@sourceware.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: [danyd@fastrac.net.au] libc/846: struct ip_fw mismatch between netinet/ip_fw.h and linux/ip_fw.h


> Cc: danyd@fastrac.net.au
> From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
> Date: 02 Nov 1998 20:14:58 +0100

> 1) (as noted in the appended PR) glibc uses u_int32_t for fw_pcnt,
>    fw_bcnt but the kernel uses unsigned long which might be 64bit:-(.
> 
> 2) The whole struct ip_fw is totally different in Linux 2.0.35 and
>    2.1.126.  Which version should we adopt in glibc 2.0 and which one
>    in glibc 2.1?

This is, well, nasty.  I think if the structure varies than we cannot
define it at all, otherwise people who try to use glibc 2.0 on linux
2.1.126, or glibc 2.1 on linux 2.0.x, will find that this structure is
defined wrongly.  An alternative would be to write a wrapper for
whatever calls use this structure (getsockopt?).

I think that for this structure, it should be left to whatever
programs use it to deal with this problem; there probably aren't many
of them.

-- 
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]