Packet Simulation

This is a discussion on Packet Simulation within the Networking/Device Communication forums, part of the General Programming Boards category; Hi, I am trying to write a program which would simulate the generation of an ipv6 packet. The packet payload ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    1

    Packet Simulation

    Hi,

    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?

    Thanx,
    RM1205

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

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    Start with
    Code:
    #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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 10:34 AM

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