lkml.org 
[lkml]   [1996]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: network drivers and user interface
Date
From

Thomas Sailer <sailer@ife.ee.ethz.ch> writes:
>- network device drivers in userland: is there a better way to feed
> packets into/out of the kernel to a userland network driver than
> converting the packets to SLIP and feeding them into a pty?
> I have some DSP boards which could be used as ham radio modems easily
> with a driver in userland...

I don't think any other solution is likely to be any more efficient.
SLIP encapsulation takes about 20-30 lines of code if I remeber
correctly, and you're going to have to cross the kernel/user
boundary no matter what you do here.

>- the other way round: is there an interface that allows me to get
> every packet in raw form of a single network driver? I know the
> SOCK_PACKET stuff, but there I get every packet of the specified type
> from every interface, and I have to filter the packets myself, and this
> will sure hurt performance if I'm only interested in a slow interface
> whereas other interfaces are very active...

In the 2.0 kernel you can bind the socket to a particular interface so you
only receive packets for the one you are interested in. I do this in the
diald code to avoid getting all the packets for interfaces I don't care about.

-- eric

---------------------------------------------------------------------------
Eric Schenk www: http://www.cs.toronto.edu/~schenk
Department of Computer Science email: schenk@cs.toronto.edu
University of Toronto




\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.040 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site