Discussion:
network interface in userland?
(too old to reply)
r***@reedmedia.net
2007-12-14 16:56:14 UTC
Permalink
What needs to be done to support network interfaces in userland?

I am mostly curious about this for developing and testing without
rebooting kernels.

If this has been discussed before, please point me to it.

By the way, I have a USB-based internal wireless interface I want
supported:

port 6 addr 3: high speed, power 500 mA, config 1,
RTL8187B_WLAN_Adapter(0x8197), Realtek(0x0bda), rev 2.00, serial
00e04c000001

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Antti Kantee
2007-12-14 17:07:40 UTC
Permalink
Post by r***@reedmedia.net
What needs to be done to support network interfaces in userland?
I am mostly curious about this for developing and testing without
rebooting kernels.
If this has been discussed before, please point me to it.
By the way, I have a USB-based internal wireless interface I want
I haven't really given it thought, but some ramblings:

You need to access the hardware somehow. For this you probably need a
userspace "port" of bus_space and bus_dma, although I don't know how
exactly that would work. You also need to tap into the interrupts,
for which polling might be a better (easier) solution.

You should be able to hack interfacing with the kernel networking stack
with tap(4). Not really perfect, but should work.

For wireless need to run net80211 in userspace also.

So, not really "compile & go" for the time being.
--
Antti Kantee <***@iki.fi> Of course he runs NetBSD
http://www.iki.fi/pooka/ http://www.NetBSD.org/
"la qualité la plus indispensable du cuisinier est l'exactitude"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2007-12-14 17:55:23 UTC
Permalink
Post by Antti Kantee
You should be able to hack interfacing with the kernel networking
stack with tap(4). Not really perfect, but should work.
Only if the interface is sufficiently Ethernet-like.

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Joerg Sonnenberger
2007-12-15 09:35:35 UTC
Permalink
Post by Antti Kantee
Post by r***@reedmedia.net
By the way, I have a USB-based internal wireless interface I want
You need to access the hardware somehow. For this you probably need a
userspace "port" of bus_space and bus_dma, although I don't know how
exactly that would work. You also need to tap into the interrupts,
for which polling might be a better (easier) solution.
libusb provides that specifically for USB devices. That doesn't solve
the problem of having a 802.11 stack, but at least the hardware access
is easy.

Joerg

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Masao Uebayashi
2007-12-15 12:06:12 UTC
Permalink
Post by r***@reedmedia.net
I am mostly curious about this for developing and testing without
rebooting kernels.
If what you need is trying a new driver without reboot, LKM *should
be* the way to go.

(I say *should be* because I have never tried that. :)

Masao

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ermal Luçi
2007-12-15 14:09:30 UTC
Permalink
DragonflyBSD has done some kernel 'virtualisation' in userland.
Meaning running kernel and network interface drivers in userland,
maybe take a look at that.
It would be nice to have that ability in FreeBSD/NetBSD too.
Post by Masao Uebayashi
Post by r***@reedmedia.net
I am mostly curious about this for developing and testing without
rebooting kernels.
If what you need is trying a new driver without reboot, LKM *should
be* the way to go.
(I say *should be* because I have never tried that. :)
Masao
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Thomas E. Spanjaard
2007-12-15 14:11:30 UTC
Permalink
Post by Ermal Luçi
DragonflyBSD has done some kernel 'virtualisation' in userland.
Meaning running kernel and network interface drivers in userland,
maybe take a look at that.
It would be nice to have that ability in FreeBSD/NetBSD too.
Except that doesn't do what the OP wants. VKernels don't support direct
hardware access to devices on the host system.

Cheers,
--
Thomas E. Spanjaard
***@netphreax.net
Loading...