* Required resources on network driver programming
@ 2004-12-20 7:45 linux lover
2004-12-20 9:06 ` Michael Renzmann
2004-12-20 9:44 ` Roar Bjørgum Rotvik
0 siblings, 2 replies; 5+ messages in thread
From: linux lover @ 2004-12-20 7:45 UTC (permalink / raw)
To: linux-net; +Cc: netdev
Hi all,
I am newbie to Linux kernel
programming. I want to write my own virtual network
device driver that take every packets from IP layer
just print the contents of packet(header part with its
starting addresses only) and send it to actual device
driver for packet transmission and at receiving end
receive packet from NIC card again print the header
addresses and send it to upper layer for normal packet
processing.
I require help about where can i get
resources or any book for writing virtual network
driver with SAMPLE EXAMPLES?
regards,
linux_lover
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Required resources on network driver programming
2004-12-20 7:45 Required resources on network driver programming linux lover
@ 2004-12-20 9:06 ` Michael Renzmann
2004-12-20 9:44 ` Roar Bjørgum Rotvik
1 sibling, 0 replies; 5+ messages in thread
From: Michael Renzmann @ 2004-12-20 9:06 UTC (permalink / raw)
To: linux lover; +Cc: linux-net, netdev
Hi.
linux lover wrote:
> I require help about where can i get
> resources or any book for writing virtual network
> driver with SAMPLE EXAMPLES?
I think the following resources might be useful for your task - also
there might be alternatives for the implementation
(tcpdump/tethereal-like programs that capture the information you need
from a packet socket):
Linux Device Drivers, 2nd Edition
http://www.xml.com/ldd/chapter/book/index.html
The Linux Kernel Module Programming Guide
http://en.tldp.org/LDP/lkmpg/
Virtual Network Interfaces
http://www.linux.it/~rubini/docs/vinter/vinter.html
Linux Kernel Module Programming Guide
http://oopweb.com/OS/Documents/LKMPG/VolumeFrames.html?/OS/Documents/LKMPG/Volume/node11.html
The Linux Kernel API
http://kernelnewbies.org/documents/kdoc/kernel-api/linuxkernelapi.html
Generally it's also a good idea to have a look at
http://www.kernelnewbies.org/ and visit the IRC-channel #kernelnewbies
at oftc.net.
Bye, Mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Required resources on network driver programming
2004-12-20 7:45 Required resources on network driver programming linux lover
2004-12-20 9:06 ` Michael Renzmann
@ 2004-12-20 9:44 ` Roar Bjørgum Rotvik
1 sibling, 0 replies; 5+ messages in thread
From: Roar Bjørgum Rotvik @ 2004-12-20 9:44 UTC (permalink / raw)
To: linux lover; +Cc: linux-net, netdev
linux lover wrote:
>
> Hi all,
> I am newbie to Linux kernel
> programming. I want to write my own virtual network
> device driver that take every packets from IP layer
> just print the contents of packet(header part with its
> starting addresses only) and send it to actual device
> driver for packet transmission and at receiving end
> receive packet from NIC card again print the header
> addresses and send it to upper layer for normal packet
> processing.
> I require help about where can i get
> resources or any book for writing virtual network
> driver with SAMPLE EXAMPLES?
Another mail gave you pointers to driver programming.
Here are links to TUN/TAP, a virtual ethernet (or point-to-point) device
driver in the Linux kernel.
With TAP you have a virtual ethernet device, where the device driver is
replaced with a userspace application (that you write) that receives all
data sent to the tap device (for instance tap0) from the linux kernel
network stack.
This data contains ethernet header + all other payload (like IP-header +
IP data with either TCP/UDP or arp-packets)..
Your userspace app may also send data to a tap-device and this data will
be sent to the linux network stack like it came from a real ethernet device.
So your userspace app may do whatever it want with the data, it may
print out the contents of the IP layer and forward the data to another
PC using the real ethernet device (eth0, or another network medium).
The other PC may do the opposite, i.e. receive the data from the
ethernet device and send then to the tap device.
Your application may even encapsulate the data send between the two PC
in any protocol you may like (you got tunneling).
If you wanted to do all in kernel mode this is not what you want, but
tun/tap code may give you some tips on how to create a virtual ethernet
device..
See these links:
http://lxr.linux.no/source/drivers/net/tun.c?v=2.6.8.1
http://vtun.sourceforge.net/tun/
http://vtun.sourceforge.net/tun/faq.html
--
Roar B. Rotvik
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Required resources on network driver programming
@ 2004-12-20 21:34 Rudolf Ladyzhenskii
0 siblings, 0 replies; 5+ messages in thread
From: Rudolf Ladyzhenskii @ 2004-12-20 21:34 UTC (permalink / raw)
To: linux lover, linux-net; +Cc: netdev
Hi,
Firstly, there is a software package called ETHEREAL that will do that for you.
If you really want to do it yourself, search the web on how to interface with NETFILTER.
Rudolf
-----Original Message-----
From: netdev-bounce@oss.sgi.com [mailto:netdev-bounce@oss.sgi.com]On
Behalf Of linux lover
Sent: Monday, December 20, 2004 6:46 PM
To: linux-net@vger.kernel.org
Cc: netdev@oss.sgi.com
Subject: Required resources on network driver programming
Hi all,
I am newbie to Linux kernel
programming. I want to write my own virtual network
device driver that take every packets from IP layer
just print the contents of packet(header part with its
starting addresses only) and send it to actual device
driver for packet transmission and at receiving end
receive packet from NIC card again print the header
addresses and send it to upper layer for normal packet
processing.
I require help about where can i get
resources or any book for writing virtual network
driver with SAMPLE EXAMPLES?
regards,
linux_lover
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Required resources on network driver programming
@ 2004-12-20 21:34 Rudolf Ladyzhenskii
0 siblings, 0 replies; 5+ messages in thread
From: Rudolf Ladyzhenskii @ 2004-12-20 21:34 UTC (permalink / raw)
To: linux lover, linux-net; +Cc: netdev
Hi,
Firstly, there is a software package called ETHEREAL that will do that for you.
If you really want to do it yourself, search the web on how to interface with NETFILTER.
Rudolf
-----Original Message-----
From: netdev-bounce@oss.sgi.com [mailto:netdev-bounce@oss.sgi.com]On
Behalf Of linux lover
Sent: Monday, December 20, 2004 6:46 PM
To: linux-net@vger.kernel.org
Cc: netdev@oss.sgi.com
Subject: Required resources on network driver programming
Hi all,
I am newbie to Linux kernel
programming. I want to write my own virtual network
device driver that take every packets from IP layer
just print the contents of packet(header part with its
starting addresses only) and send it to actual device
driver for packet transmission and at receiving end
receive packet from NIC card again print the header
addresses and send it to upper layer for normal packet
processing.
I require help about where can i get
resources or any book for writing virtual network
driver with SAMPLE EXAMPLES?
regards,
linux_lover
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-12-20 21:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-20 7:45 Required resources on network driver programming linux lover
2004-12-20 9:06 ` Michael Renzmann
2004-12-20 9:44 ` Roar Bjørgum Rotvik
-- strict thread matches above, loose matches on Subject: below --
2004-12-20 21:34 Rudolf Ladyzhenskii
2004-12-20 21:34 Rudolf Ladyzhenskii
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).