From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 7 07:10:29 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8614837B401 for ; Mon, 7 Jul 2003 07:10:29 -0700 (PDT) Received: from mail.rdstm.ro (mail.rdstm.ro [193.231.233.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B39C43FA3 for ; Mon, 7 Jul 2003 07:10:27 -0700 (PDT) (envelope-from aanton@reversedhell.net) Received: from reversedhell.net (casa_auto [81.196.32.25]) by mail.rdstm.ro (8.12.9/8.12.1) with ESMTP id h67EAPFT016533; Mon, 7 Jul 2003 17:10:25 +0300 Message-ID: <3F07860E.9060702@reversedhell.net> Date: Sun, 06 Jul 2003 05:14:38 +0300 From: Alin-Adrian Anton User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030606 X-Accept-Language: en-us, en, ro MIME-Version: 1.0 To: Tom Servo References: <0193271C683D5844A478A359271B8F66147AD8@DC1.dynatec.com> In-Reply-To: <0193271C683D5844A478A359271B8F66147AD8@DC1.dynatec.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: raw socket programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 14:10:29 -0000 Tom Servo wrote: >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 >>#include >>#include >>#include >>#include >>#include >>#include >>#include >>#include >> >>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. >> >> > > > > > > > Well, I don't wanna be idiot, perhaps I am too tired, but n_long appears in ip.h defined as : beast# grep ipt_time /usr/include/netinet/ip.h union ipt_timestamp { n_long ipt_time[1]; n_long ipt_time; } ipt_timestamp; beast# grep ipt_time /usr/include/netinet/* /usr/include/netinet/ip.h: union ipt_timestamp { /usr/include/netinet/ip.h: n_long ipt_time[1]; /usr/include/netinet/ip.h: n_long ipt_time; /usr/include/netinet/ip.h: } ipt_timestamp; beast# And, I simply don't find where ipt_time is defined ! I suppose it is structure, perhaps it is of type ipt_timestamp, *g*. And yes, those are all the files I include, nothing more, nothing less. Alin.