netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* modifying tcp/ip stack
@ 2004-08-21  5:46 cranium2003
  2004-08-21  7:01 ` Ben Greear
  2004-08-21 10:22 ` Henrik Nordstrom
  0 siblings, 2 replies; 3+ messages in thread
From: cranium2003 @ 2004-08-21  5:46 UTC (permalink / raw)
  To: net dev; +Cc: linux net

Hello,
        I want to modify existing protocol stack as
given below.
        What exactly i want to do is that i want to
add a new protocol headerin between IP and ETHERNET
header.
        I want to implement packet structure as
(Ethernet header +MY header + IP header +TCP header +
PAYLOAD) that mean when packet comes from NIC it
should first remove MY header in my routine then IP
header in ip_input.c file.
        Also at transmitting end packet at IP layer
with (IP header + TCP header +PAYLOAD)structure passed
to ip_output.c then given to my routine for adding a
new protocol header on that packetand then to Ethernet
layer.
        I want your help to know what changes i
require to do in kernel 2.4.24 to achieve this?
         Please kindly reply me.
Thaking you.

Regards,
Parag.


		
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: modifying tcp/ip stack
  2004-08-21  5:46 modifying tcp/ip stack cranium2003
@ 2004-08-21  7:01 ` Ben Greear
  2004-08-21 10:22 ` Henrik Nordstrom
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Greear @ 2004-08-21  7:01 UTC (permalink / raw)
  To: cranium2003; +Cc: net dev

cranium2003 wrote:
> Hello,
>         I want to modify existing protocol stack as
> given below.
>         What exactly i want to do is that i want to
> add a new protocol headerin between IP and ETHERNET
> header.
>         I want to implement packet structure as
> (Ethernet header +MY header + IP header +TCP header +
> PAYLOAD) that mean when packet comes from NIC it
> should first remove MY header in my routine then IP
> header in ip_input.c file.
>         Also at transmitting end packet at IP layer
> with (IP header + TCP header +PAYLOAD)structure passed
> to ip_output.c then given to my routine for adding a
> new protocol header on that packetand then to Ethernet
> layer.
>         I want your help to know what changes i
> require to do in kernel 2.4.24 to achieve this?
>          Please kindly reply me.

802.1Q vlan code does this.  See net/8021q/*

Ben

> Thaking you.
> 
> Regards,
> Parag.
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download now. 
> http://messenger.yahoo.com
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: modifying tcp/ip stack
  2004-08-21  5:46 modifying tcp/ip stack cranium2003
  2004-08-21  7:01 ` Ben Greear
@ 2004-08-21 10:22 ` Henrik Nordstrom
  1 sibling, 0 replies; 3+ messages in thread
From: Henrik Nordstrom @ 2004-08-21 10:22 UTC (permalink / raw)
  To: cranium2003; +Cc: net dev, linux net

On Fri, 20 Aug 2004, cranium2003 wrote:

>        What exactly i want to do is that i want to
> add a new protocol headerin between IP and ETHERNET
> header.

>From my understanding this is best done in two pieces:

a) A virtual network driver which adds your protocol header and then hands 
off the packet to the intended destination device.

b) A net net_protocol which parses your protocol header and then hands off 
the packets to the next layer (IP or whatever). Alternatively it can be a 
added as a packet_type to the device using dev_add_pack() which steals the 
packet from the original device and then reinjects them as coming from 
your device after processing your protocol header.

It may also be possible using the xfrm framework in 2.6 without using any 
of the above, but I am not familiar with how this works.

Regards
Henrik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-21 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-21  5:46 modifying tcp/ip stack cranium2003
2004-08-21  7:01 ` Ben Greear
2004-08-21 10:22 ` Henrik Nordstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).