Thread: Packet Simulation

  1. #1
    Registered User
    Join Date
    Jul 2004

    Packet Simulation


    I am trying to write a program which would simulate the generation of an ipv6 packet. The packet payload is not TCP, UDP, ICMP. The payload to the IPv6 header is going to be another header. The header is a control message that will be encapsulated in a IPv6 header. My aim is to try quantify the time and processor utilization required to generate this packet. The program has to run on a single machine and there is no concept of client-server model. Is it possible to write such a program?


  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    You will probably get a better response over at the networking forum

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Start with
    #define HEADER_SIZE 20 // or whatever it is
    unsigned char ipv6header[HEADER_SIZE];
    Then write a function to fill in ipv6header[0] etc with the required information

    Then time how long it takes - there are plenty of examples on the board how to do that.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Packet processing in Socket programming, please help
    By pumpkin in forum Networking/Device Communication
    Replies: 5
    Last Post: 05-28-2009, 01:33 AM
  2. Replies: 4
    Last Post: 05-05-2009, 05:35 AM
  3. EDCF protocol in Network simulation program
    By linux_007 in forum C++ Programming
    Replies: 0
    Last Post: 04-12-2009, 03:04 PM
  4. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 03:25 AM
  5. Raw Packet (sorry tripple weird Post)
    By Coder87C in forum Networking/Device Communication
    Replies: 6
    Last Post: 03-04-2006, 11:34 AM