Results 1 to 2 of 2

Thread: Raw Socket Programming in C.

  1. #1
    Join Date
    Jan 2009

    Question Raw Socket Programming in C.

    I am trying to write a TCP/IP program using raw sockets. I construct the IP header and call setsockopt with IP_HDRINCL so ubuntu doesn't insert it's own ip header in for me when I run my C/C++ program. I also installed wireshark to see if my program works. I always see "bogus tcp header must be at least 20 bytes in length" error when i send my custom TCP packet and it appears all the TCP fields are zeroed out. The IP header (except for tcpheader) seems fine. Any reason for this? I'm suspecting that Ubuntu might be doing something like windows where it messes with your raw sockets and network traffic.

  2. #2
    Join Date
    Aug 2006
    Ubuntu 12.04 Precise Pangolin

    Re: Raw Socket Programming in C.

    I'd try asking in the Programming Forum as they're better suited to help you.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts