[wplug] Very strange problem

Hagbard Celine hceline at softhome.net
Fri Aug 2 15:07:05 EDT 2002


Wow, that was fast :o)

If the path is `/usr/include/netinet/ip.h', and I do a `#include <netinet/ip.h>'
to get at it (i.e. the standard stuff), the missing defines I know about are

ICMP_UNREACH_FILTER_PROHIB
ICMP_UNREACH_HOST_PRECEDENCE
ICMP_UNREACH_PRECEDENCE_CUTTOFF
MAX_IPOPTLEN

I seem to remember some strangeness in `struct ip' itself, but can't offhand
remember which members are affected.  I could play with it again to uncover
these, if necessary.

What baffles me is that if I do
`cp -a /usr/include/netinet/ip.h /usr/include/netinet/ipA.h' and include it
with `#include <netinet/ipA.h>', or if I do
`cp -a /usr/include/netinet/ip.h /usr/src/netkit-fnord-0.02/src/ip.h' and
include it with `#include "ip.h"' (traceroute.c lives on the same source tree
branch as the copy of ip.h), everything is fine...

Hagbard

> On linux, typically the top level include files
> reference architecture-specific "real" include files,
> so depending on what exact path you're using you may
> be including different definitions.
> 
> What are the actual paths you're using and what are
> the definitions you're having problems with?
> 
> Dave
> 
> --- Hagbard Celine <hceline at softhome.net> wrote:
> > A question for the hackers here:
> > 
> > I'm attempting to learn something about network
> > programming, and to that end,
> > I've begun playing with ping and traceroute.  While
> > doing this, I've
> > encountered something that totally baffles me...
> > 
> > When I include <netinet/ip.h>, certain of the
> > defines and declarations are
> > skipped, even though they *should* be done.  If,
> > however, I change the path -
> > perhaps to <netinet/ipA.h>, or even "ip.h",
> > everything works just fine and
> > dandy.  Why should the path to the header make a
> > difference in what is parsed?
> > 
> > Before you ask which distro I'm using, I'm not;  I
> > roll my own system...  Also,
> > this started about two weeks ago.  Could I have done
> > something to myself?
> > 
> > Thanks much,
> > Hagbard
> > 
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
> 




More information about the wplug mailing list