LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-01-2007, 01:41 AM   #1
raklo
Member
 
Registered: Apr 2006
Posts: 143

Rep: Reputation: 15
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
 
Old 08-02-2007, 12:06 AM   #2
Lothar Schwab
LQ Newbie
 
Registered: Aug 2007
Location: Minnesota, USA
Distribution: Lubuntu
Posts: 19

Rep: Reputation: 2
Quote:
Originally Posted by raklo
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
What good is it if you have a private incompatible
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?
 
Old 08-02-2007, 12:51 AM   #3
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
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
 
Old 08-18-2011, 01:21 AM   #4
Maitrikkshah
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Rep: Reputation: Disabled
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..
 
Old 08-18-2011, 10:16 AM   #5
gleemer
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 08-18-2011, 02:17 PM   #6
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 876

Rep: Reputation: 184Reputation: 184
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the option field in IP header guam Programming 5 08-25-2011 04:52 AM
Information needed about the use of the reserved field in the inode structure calsoft_pg Linux - Software 1 12-23-2005 10:27 PM
error using RPM -header read field? tonywoptio Linux - Software 1 11-01-2005 05:14 PM
Adding Option field in IP header guam Linux - Networking 0 11-04-2004 10:17 AM
Setting TOS field in IP header malik_mca Programming 1 10-13-2004 01:42 PM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration