[ns] Insert Custom header between IP and TCP/UDP

Qasim Javed qasim_nust at yahoo.com
Tue Apr 11 11:46:25 PDT 2006


Hi,
 
 I want to insert an extra header of my own so that I can make some routing decisions based on the fields in that header. For example, in case of TCP, I want the TCP header to be encapsulated in my custom header and my customer header (along with TCP header and data) encapsulated in the IP header. How can I do that. I know how to define a new header but the problem is where should I insert the header i.e., which part of the code?
 
 Below is a diagram showing what I want.
 
     ++++++++++++
     |     IP Header        |
     ++++++++++++
     |  Custom Header  |
     ++++++++++++
     |  TCP/UDP Hdr    |
     ++++++++++++
     
 Does anyone have any ideas how can I push a new header in between the IP and TCP header.
 
 
 regards,
 Qasim
  

		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.


More information about the Ns-users mailing list