Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jul 2003 15:37:07 +0300
From:      Alin-Adrian Anton <aanton@reversedhell.net>
To:        Toni Andjelkovic <toni@soth.at>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: tcp raw socket programming recvfrom()
Message-ID:  <3F0C0C73.5080908@reversedhell.net>
In-Reply-To: <20030710224839.GB1574@webboy.soth.at>
References:  <Pine.GSO.4.10.10307101416000.12648-100000@cranford-fe.eng.netapp.com> <3F0BE42A.50407@reversedhell.net> <20030710224839.GB1574@webboy.soth.at>

next in thread | previous in thread | raw e-mail | index | archive | help
Toni Andjelkovic wrote:

>On Wed, Jul 09 2003 (12:45:14 +0300), Alin-Adrian Anton wrote:
>  
>
>>Usually? What does usually mean? I know I can use bpf. But is there 
>>another way to look at incoming TCP packet ? What I did is I sent a TCP 
>>SYN packet and the server answers with a TCP SYN_ACK packet. How can I 
>>look at the SYN_ACK packet using raw sockets?
>>    
>>
>
>Try libpcap or tcpdump.
>
>Cheers,
>Toni
>
>
>  
>
Libcap uses /dev/bpf for *BSD, and RAW recvfrom for linux and others. My 
goal is to experience with the freebsd system, not only to receive that 
packet. I just want to understand why *BSD socket model, which is the 
original socket model, chose not to allow recvfrom with raw sockets, on 
TCP and UDP protocols. It allows it with ICMP and all others. I just 
want to understand why this choice.

Linux didn't respect that, and in linux it is possible to recvfrom with 
raw socket, on TCP and UDP protocols too.

In the end, I will just use the /dev/bpf to get the work done. I want to 
play with the system, and understand it, not with a portable lib :P .
The goal is not to get things done, for that there is libcap. The goal 
is to explore src/sys details and IP stack.

PS: ethereal is a great sniffer :-)

Thanks :-).

Alin.




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