Using the option field in IP header
Hello everyone,
I want to use the option field of IP header and add some custom information to the IP header. Can anyone suggest me how is it possible? From some research, I found that I can use ip_var.h file. But I can not find the file in /usr/include/netinet directory. I am using Redhat 8.0. Appreciate your help. Thanks Guam |
Assuming you have nothing but good intentions in mind, don't touch the IP options. Write your own layer 7 header that contains your "custom information".
If you put your own crap in the IP header, no one else's computer will know what to do with it. If it's a good stack (the thing that takes packets apart inside your computer), the packet's will be dropped. If it's a bad stack... well, who knows. |
The first byte of IP packet is normally 0x45, the 5 means 5*4=20 bytes in the header. If you make it 0x46 then you have an additional 4 bytes of options immediately following the header. The previous post is right, don't modify the ip header by adding options, your results will only be frustrating when the receiving computer doesn't handle it the way you expect. This doesn't mean they don't exist, but I've never seen the options used for anything in modern computers and I wouldn't be surprised if its broken in most stacks.
|
hey guam i have similar problem as u... I also want to add my custom info in the options field of ip header... Have you find any solution how to do it... Please help me... Please give me a reply...
|
Quote:
You'll have better luck opening a new thread. |
Yes for that reason i have sent him an email also...
|
All times are GMT -5. The time now is 01:48 AM. |