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?
You will probably get a better response over at the networking forum
Then write a function to fill in ipv6header etc with the required information
#define HEADER_SIZE 20 // or whatever it is
unsigned char ipv6header[HEADER_SIZE];
Then time how long it takes - there are plenty of examples on the board how to do that.