RE: raw socket programming

[ Available lists | Index of freebsd-hackers | Month of Jul 2003 | Week of 7 Jul 2003 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Tom Servo <xtomservox@hotpop.com>
Date
7 Jul 2003 06:50:28
Subject
RE: raw socket programming
Message-ID
0193271C683D5844A478A359271B8F66147AD8@DC1.dynatec.com

In reply to

[ Hide this part ]
Off the top of my head this appears to be an include sequencing/circular
include problem. Check the type that 'n_long' is being defined as and make
sure that the proper includes that define the type are defined before the
variable is defined and make sure that it is not getting run over. Is that
the only files that you are including?
-ts

>Hey folks,
>
>I am playing with raw sockets on a FreeBSD 4.8 STABLE. This is the
>include section from my file:
>
>#include <sys/types.h>
>#include <sys/socket.h>
>#include <stdio.h>
>#include <string.h>
>#include <errno.h>
>#include <netinet/in.h>
>#include <netinet/ip.h>
>#include <unistd.h>
>#include <netinet/tcp.h>
>
>When i try to compile the code, this is what I get:
>%cc -o raw raw.c
>In file included from raw.c:7:
>/usr/include/netinet/ip.h:156: syntax error before `n_long'
>/usr/include/netinet/ip.h:159: syntax error before `n_long'
>%
>
>Errors like that were many more, but I rearranged the included files in
>this particular order, and the huge number of errors was reduced to what
>I pasted. Before, there were errors in tcp.h and etc.
>
>I would really appreciate an advice of what else to include/not to
>include in order to get things right.
>
>Thanks in advance!
>
>Yours Sincerely,
>Alin.



_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Elapsed time: 0.147 seconds