Thread: [Ndiswrapper-general] Wrapper around network device.
Status: Beta
Brought to you by:
pgiri
From: Menne K. <jo...@an...> - 2005-06-04 18:55:33
Attachments:
main.cpp
|
Hello! my name is Menne Kamminga. I have a question: i use ndiswrapper for a little conceptronic usb 2.0 stick for a wireless-G network (54 MBit). This device is a bit unstable, every now and then the device crashes and ndiswrapper resets it. At this moment i loose my connection to the network. (of course) I made a small daemon to solve the problem (partly): Right now: i have this daemon: (pseudo-code) while(1) { sleep for a bit to save cpu time. if(network link not detected) { while(network device is not detected) { sleep for a bit to save cpu time. } //we get here: so the network device is alive and well! //meaning: ndiswrapper has re-initialised the device. Bring up the device using dhclient OR ifconfig :) } } The problem with this sort of thing is that it takes 2 or 3 seconds to bring the device back up, so many program's give an error or crash. The big question is: Is it possible to create a daemon/kernel-module that creates a fake network device with a buffer around the real network device to make sure the connection stays up when the real device goes down? (to give ndiswrapper a chance to reset the device!) NOTE: I know how to create a dummy network device, but i don't know how to route stuff to a real one, or buffer it for a while. yours truly: Menne Kamminga Included: full source to my crappy and inefficient daemon! :) |