3way handshake raw sockets

This is a discussion on 3way handshake raw sockets within the Linux Programming forums, part of the Platform Specific Boards category; Hi I'm trying to use raw sockets to connect to a server, when my program sends a syn packet the ...

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    6

    3way handshake raw sockets

    Hi
    I'm trying to use raw sockets to connect to a server, when my program sends a syn packet the server repleys with a syn ack , but then my computer sends a rst.
    I think the kernel thinks the port doesn't have anything running on it and close the handshake.

    Thanks

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,235
    Quote Originally Posted by linuxtest View Post
    Hi
    I'm trying to use raw sockets to connect to a server, when my program sends a syn packet the server repleys with a syn ack , but then my computer sends a rst.
    I think the kernel thinks the port doesn't have anything running on it and close the handshake.

    Thanks
    You can't expect the kernel to stop doing its normal kernel things (like running the TCP/IP stack in the background) just because you start doing something weird like sending raw packets... It has no idea you are doing that.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Raw Sockets Help
    By jaysonturner in forum C Programming
    Replies: 4
    Last Post: 05-08-2007, 02:37 PM
  2. Raw Sockets and SP2...
    By Devil Panther in forum Networking/Device Communication
    Replies: 11
    Last Post: 08-12-2005, 04:52 AM
  3. Raw Sockets problem.
    By Mad_guy in forum C Programming
    Replies: 3
    Last Post: 07-03-2005, 03:14 PM
  4. raw sockets?
    By Devil Panther in forum Networking/Device Communication
    Replies: 2
    Last Post: 11-01-2003, 12:23 AM
  5. Problem with Raw Sockets
    By Encrypted in forum Linux Programming
    Replies: 2
    Last Post: 04-30-2003, 04:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21