Subject: Re: calling the network device driver directly
To: None <netbsd-help@netbsd.org>
From: village idiot <village_ldi0t@yahoo.com>
List: netbsd-help
Date: 01/07/2002 13:54:25
--- Manuel Bouyer <bouyer@antioche.eu.org> wrote:
> On Mon, Jan 07, 2002 at 07:02:42AM -0800, village
> idiot wrote:
> > Hello everyone,
> > 
> > I do not know if I ask in the correct forum, but
> > anyways, here it comes:
> > 
> > What I want to do, is to call the ATM network
> device
> > driver myself, instead of letting TCP or UDP do
> it.
> > Therefor I am trying to find out how to do
> excactly
> > that. I assume there must be something "between"
> the
> > driver and TCP that lets the layer above call the
> > diffrent kinds of network device drivers in a
> > standardized way.
> > 
> > Does anyone know if there is a simple way of doing
> > what I wish to do? Basically I want to bypass the
> > UDP/TCP thing, and call the driver directly. I
> want to
> > call the driver, manipulating structs or whatnot,
> so I
> > can send my own data (strings). 
> 
> From kernel, or from userland ?
>

I want to do it from userspace. I have not done this
kind of stuff before. I could also make small
modifications in kernel or driver if that will make
things easier. If in the driver, it will have to be
additions, not changing existing methods.

What I want to make is a light weight transport module
that lets me avoid the use of non needed methods that
for example TCP or UDP implements. Like error checking
and basically all things that I do not need. I have my
own light weight modules for those kinds of things. I
want to make everything suit eachother, just using the
modules I need. So if for example I need error
checking, I will enter an error checking module into a
protocol graph I make. And if I do not need it, I will
not enter it into the protocol graph. Hence,
(hopefully) it can make things run faster when needed.
This is the reason not using existing modules.

I have made a module (server/client style) with the
use of sockets to access the network layer, but now I
want to take it a step further making it without
sockets, and hopefully will things run faster. I am
thinking of using IP over the driver for packet
indexing and such.

I got a tip from Andrew Brown:
"perhaps...use a bpf and construct your own packets?"
That sounds like a good idea, because constructing my
own packets is what I want. Well, constructing some of
it. I want low latency, so anything that always stays
the same in the packets I want to re-use for each
call. I am not completely sure how pbf works, never
heard of it until now, but from what I have read just
now, that may be an idea. I will have to read through
the bpf man pages thuroughly to make sure if I can use
it. Thanks Adrew, by the way.

I know I will have to keep kernel traps to its
minimum, so I am hoping the driver does its part too,
so to speak.

Just curious, seeing how I do not know much about
drivers, or anything for that matter. For atm, do the
network device driver or the network card make the atm
cells? I am guessing card.


Thanks for any help.



__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/