Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2003 04:37:43 +0300
From:      Alin-Adrian Anton <aanton@reversedhell.net>
To:        Wes Peters <wes@softweyr.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: raw socket programming SOLVED
Message-ID:  <3F0CC367.3040908@reversedhell.net>
In-Reply-To: <200307102238.02405.wes@softweyr.com>
References:  <0193271C683D5844A478A359271B8F66147AD8@DC1.dynatec.com> <20030707164832.L49607@beagle.fokus.fraunhofer.de> <3F0790EF.10407@reversedhell.net> <200307102238.02405.wes@softweyr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Wes Peters wrote:

>On Saturday 05 July 2003 08:01 pm, Alin-Adrian Anton wrote:
>  
>
>>Yes, it works now, with these includes:
>>-------------------------------
>>#include <sys/types.h>
>>#include <sys/socket.h>
>>#include <stdio.h>
>>#include <string.h>
>>#include <errno.h>
>>
>>#include <netinet/in_systm.h>
>>#include <netinet/in.h>
>>#include <netinet/ip.h>
>>
>>#include <unistd.h>
>>#include <netinet/tcp.h>
>>-------------------------------
>>    
>>
>
>Believe it or not, the advice in style(9) is quite helpful in putting 
>include files in their correct order.  I'm so used to doing things in 
>similar order that I re-wrote your original program as:
>
>#include <sys/types.h>
>#include <sys/socket.h>
>
>#include <netinet/in_systm.h>
>#include <netinet/in.h>
>#include <netinet/ip.h>
>#include <netinet/tcp.h>
>
>#include <errno.h>
>#include <stdio.h>
>#include <string.h>
>#include <unistd.h>
>
>int main() { printf("foo\n"); }
>
>after grepping for n_long in /usr/include.  The order of the netinet 
>includes; in.h then ip.h then tcp.h, seems logical to me.  Perhaps a 
>(re-) reading of the instructions on include files in style(9) is in 
>order.
>
>  
>
Thank you, I just read it. You are right. :-)

Alin.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F0CC367.3040908>