can i add my own field(of 2 bytes) in the ip header structure
hi all,
can i add my own field of 2 bytes in the ip header structure without doing much changes in the tcp/ip stack code in the kernel????????????? if yes how,n if no is there ny other alternative to accomplish this other then editing the kernel code. regards |
Quote:
IP version that can send two additional bytes with an IP header if: - The standard socket library does not offer an interface to pass these additional bytes - All other high level protocols (TCP, UDP probably DHCP, ICMP) are no longer compatible with the rest of the world (including your own home-network) There are really only exotic cases where such a change to IP makes sense. If possible you should define an application level solution based or regular TCP. The next escalation level would be to provide a new protocol and to integrate it into the socket library. The last resort would be to really change IP the described way. If you want to resort to this you need to do changes to kernel mode code software. Have you thought about options like out-of-band data transmissions with TCP? Or sending the out-of-band data via a second TCP connection? |
thanx for the reply,
as i think,the socket thing (working on using raw sockets) can be a goodoption for sending in my own bytes,but then in that case i mnot using the header format of IP protocol at all,so that does not exactly serve my purpose. as i'd like to use the header format of IP and send my bytes. the option that im currently thinking ,is rther than editing the kernel code if i can write a module,something like a hook of netfilters, that can do the same thing for me. but still wondering bout the approach to that. wd apprecieate if anyone adds smething to this. regards rakesh |
Hey i also want to add 4bytes of data to the ip header...
I read your post. have you got any solution??? If yes please tell me what you have done it will be helpful to me.. |
While I agree with Lothar that this is a rather odd thing to do, perhaps you can accomplish it with the iptables mangle table? I don't know that you can but its worth investigating.
|
Yes you can. The IP header was designed to be extensible by adding Options to the standard header. Check
this link out. I'm not sure how you would go about leveraging this from the IP stack, I'm guessing some programming is in order. |
All times are GMT -5. The time now is 06:55 AM. |