Building your own IP header

This is a discussion on Building your own IP header within the Networking/Device Communication forums, part of the General Programming Boards category; Hi Folks, I am developing a protocol traffic generator. I need to be able to start the traffic with different ...

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    134

    Building your own IP header

    Hi Folks,

    I am developing a protocol traffic generator. I need to be able to start the traffic with different source address to different destination addresses.

    basically I need to costruct my own IP header. I understand one way to do it is using raw sockets. Can someone point me to some links on how to construct your own IP header using raw sockets.

    I am developing on Linux with gcc compiler.

    Thanks,

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    You might look at nmaps source, as I believe it does this. I think it only chages the source IP for one option, but I know it uses RAW sockets, and creates the headers itself so it can set the various flags itself. You should still be able to get an idea I would think.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    This post: Useful Links And Good Books
    has many good links, and for a raw sockets guide take a look at the link i incuded there.

    goodluck.


    p.s: microsoft just killed rawsockets on windows forever with their latest security patch - MS05-019.
    http://seclists.org/lists/nmap-hacke...-Jun/0000.html
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux raw socket programming
    By cnb in forum Networking/Device Communication
    Replies: 17
    Last Post: 11-08-2010, 08:56 AM
  2. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  3. IP without connecting to external socket
    By Hunter2 in forum Networking/Device Communication
    Replies: 5
    Last Post: 08-26-2003, 08:50 AM
  4. Using c++ standards
    By subdene in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2002, 10:15 AM

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