Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

FTP Server for XP Embedded

0.00/5 (No votes)
3 Aug 2005 1  
A minimalistic FTP server for XPe-powered systems.

MiniFTP screenshot

Introduction

I think that I'm not the only one who's experimenting with XP Embedded - feature rich, componentized version of Windows XP Professional. This system may be used in "black boxes" which contain a fully functional OS, but only with necessary components and may boot from ROM.

Background

The typical way to add FTP functionality in embedded systems powered by XPe is to use IIS FTP. It's relatively easy, but this way has some limitations: the size of image will grow, IIS requires 'heavy' components; IIS cannot be used with Minlogon because it relies on NTLM authentication; for simple tasks like up/downloading some files, IIS is overkill; no easy way to append custom commands. The solution is to use some lightweight FTP server like this one: a single class offers nearly full FTP functionality, and supports commands defined in RFC 959 plus any custom ones. There are several limitations, which won't be critical for embedded FTP servers (from my point of view): only one user with 'administrative' rights, only one directory without subfolders, only one user may be connected to the server.

Using the code

To use the code, just add CFTPServerT<>-based class to your code. Custom command handling may be made through 'command handlers' FTP_COMMAND_HANDLER(_T("some_custom_cmd"), handler_func), you may see the sample in the code, it's well commented. Custom command handlers allow to use any non-standard commands for e.g. remote restart, shutdown, upgrade and any other tasks still using FTP. You may embed this server right into your software, just keep in mind the 'KISS' principle. The sample is an easy console application, but may be converted into a service very quickly.

History

  • August, 2005 - the initial version 1.0.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here