PDA

Bekijk de volledige versie : Adding bandwith limiting options to the FTP server



Styno
01-04-2004, 21:45
My primary reason for buying the WL-500g is the possibility to attach an USB HD and run a FTP server on it. This would eliminate the need for a computer to be on for 24/7 serving large files to friends.

The low bandwith provided by the ADSL line requires only very little CPU power to saturate that bandwith. This makes the WL-500g a perfect candidate for the job. So if the WL-500g would be able to do this, there would be no need for an energy hungry PC to be on all the time doing nothing, and the router is on 24/7 anyway.

But you all know that :D, so I'll get down to business:
When large files are being transferred, the entire bandwith is used and other data streams like browsing and games suffer tremendous slowdowns (More info on this is in the README in the WonderShaper package). A QoS solution would be a huge benefit to these types of applications. The possibility of adding some sort of QoS with WonderShaper is allready being discussed in the WonderShaper topic (http://wl500g.info/showthread.php?s=&threadid=192).

I read that topic so far and the usefullness of WonderShaper is obvious but there may be one drawback though. The code size is (still) so large that it has to be run from the external storage device which will probably be very slow. To implement WonderShaper in a neat way there's probably a lot of work to be done here (No flame intended at all!).

Antiloop pointed me to the source code of the FTP server used in the router (Stupid-FTPd (http://sourceforge.net/projects/stupid-ftpd/)). So when I reviewed this code I thought it might be possible to add some simple bandwith limitation stuff to it. This would bloat the code very little so it could still be a part of the firmware and run from the onboard RAM.

I am an C/C++ programmer in Industrial Automation and I write cross-platform code for semi-embedded Windows/Linux applications. So this should not be a very difficult task, however the compiling and testing using Linux is :rolleyes:. I don't have much experience with Linux other then some Debian configuration and KDeveloper. If I'm going to do some customizing here, I will certainly need some help with this.

So, any comments on this? Do you guys like the idea or should I just wait for WonderShaper to be implemented?

Oleg
04-04-2004, 16:53
Any help on porting/programing/patching are greatly appricated.
As for stupid-ftpd. In my opinion we should purge it out from wl500g and replace it with something robust like vs-ftpd. The problem is size. :( vs-ftpd contains traffic management things.

Styno
13-04-2004, 16:21
I've been looking at vs-ftpd and it seems to require PAM (Pluggable Authentication Modules for Linux). Is this supported by the Linux version running on the router?

/edit:
Ok, the above was premature. When PAM is not available to the system, the application falls back to 'shadow' passwords it seems.

What do you mean with the size being a problem? According to Debian an installed mipsel package takes about 360k. Is this too much?

Oleg
13-04-2004, 16:52
:) If you intend to replace the built-in ftp server then the answer is "size does matter". Current firmware already occupies 95% of flash (maximum firmware size is 0x3a000 bytes).