|
Home > Archive > Unix Programming > May 2006 > Raw socket three way handshake
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Raw socket three way handshake
|
|
|
| I have a problem with the establishement of a three way handshake
through raw socket.
The problem is that if in my application client I use the syscall
socket(AF_INET,SOCK_RAW,IPPROTO_RAW)
the kernel will refuse the server answer because there isn't a
CONNECTED socket.
So I used the syscall connect()
but if I want sent another TCP packet I need to know the sequence
number that the
connect() has utilized and the ack from the server and I don't know how
capture this
information.
Can you help me, please?
Thanks in advantage.
| |
| Barry Margolin 2006-05-20, 7:14 pm |
| In article <1148127238.959210.130370@u72g2000cwu.googlegroups.com>,
"Marco" <ares.marco@gmail.com> wrote:
> I have a problem with the establishement of a three way handshake
> through raw socket.
> The problem is that if in my application client I use the syscall
> socket(AF_INET,SOCK_RAW,IPPROTO_RAW)
> the kernel will refuse the server answer because there isn't a
> CONNECTED socket.
> So I used the syscall connect()
> but if I want sent another TCP packet I need to know the sequence
> number that the
> connect() has utilized and the ack from the server and I don't know how
> capture this
> information.
> Can you help me, please?
> Thanks in advantage.
This is a well-known limitation of raw sockets. If you use them for a
protocol that the stack processes by itself, the stack will respond to
the incoming packets.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
|
|
|
|
|