meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
courses:ct30a5000:assignment6 [2012/07/03 13:34]
julaakko
courses:ct30a5000:assignment6 [2012/09/10 12:46]
julaakko
Line 1: Line 1:
-Network programming [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5000/etusivu|@ Noppa]] | [[courses:​ct30a5000:​start|@ wiki]] - +Network programming [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5001/etusivu|@ Noppa]] | [[courses:​ct30a5000:​start|@ wiki]] - 
 Updated: ​ --- //​[[jussi.laakkonen@lut.fi|Jussi Laakkonen]] 2011/10/17 15:40// Updated: ​ --- //​[[jussi.laakkonen@lut.fi|Jussi Laakkonen]] 2011/10/17 15:40//
  
Line 5: Line 5:
  
  
-====== Assignment6:​ ======+====== Assignment6: ​FTP client ​======
  
 +In sixth assignment you'll implement a FTP client. It must comply to RFC specification of FTP and must be able to interact with FTP servers.
  
 ===== Description ===== ===== Description =====
  
 +Create a FTP client based on [[http://​tools.ietf.org/​html/​rfc959|RFC 959]].
  
 ===== Requirements ===== ===== Requirements =====
  
   * [[generic_features_to_implement|Generic features]]   * [[generic_features_to_implement|Generic features]]
 +  * Client
 +    * Run with:​ <​code>​./​ftpclient -h <​hostname>​ -p <​port></​code>​
 +      * If no port defined (no ''​-p <​port>''​) use default FTP port.
 +    * Client must be interactive.
 +    * Support both IP address and hostname of server.
 +    * Support **stream mode** only.
 +    * Support both **upload** and **download**.
 +    * Support **ascii** and **binary** files.
 +      * Use __''​file-structure''​__ as data structure.
 +      * Since we are dealing with x86 architecture there is no need to take care of different byte sizes.
 +    * Support **active** and **passive** modes of FTP
 +      * For help about the difference of active and passive FTP see [[http://​slacksite.com/​other/​ftp.html|Active FTP vs. Passive FTP, a Definitive Explanation]])
 +    * Support __anonymous FTP servers__ (no authentication).
 +    * Must not crash in any circumstances.
 +    * Client must support following:
 +      * Access control commands:
 +        * **open** - open connection to server (send ''​anonymous''​ as user name and empty password if no authentication is implemented)
 +        * **cd** - change working directory
 +        * **close** - close connection to server
 +      * Transfer parameter commands:
 +        * **active** - change mode to active
 +        * **passive** - change mode to passive
 +      * FTP service commands:
 +        * **get** - retrieve a file from server
 +        * **put** - send a file to server
 +        * **ls** - request a list of files on the server in current working directory
 +      * Other commands:
 +        * **ascii** - change transfer mode to ascii
 +        * **binary** - change transfer mode to binary
 +        * **quit** - quit the client
 +      * Process replies for these commands sent by server.
 +    * Must be compatible with standard FTP servers
 +  * OPTIONAL:
 +    * Show transfer speed after transmission and the total size of the file.
 +    * Implement support for user authentication.
 +    * Implement commands (and handle replies properly):
 +      * SYST
 +      * STATUS
 +      * HELP 
 +
 +===== Protocol =====
 +
 +[[http://​tools.ietf.org/​html/​rfc959|RFC 959]]
  
 ===== Additional notes and hints ===== ===== Additional notes and hints =====
 +
 +  * HINT: **STATE MACHINE**.
 +  * Read the RFC __carefully__.
 +  * Remember that ''​\n''​ is not the line end marker in FTP.
 +  * Some FTP servers to use for testing
 +    * Anonymous FTP server in University network, no outside access:
 +      * Name: venla.it.lut.fi
 +      * IP: 157.24.27.242
 +      * Port: Standard FTP port (21)
 +      * Instructions:​
 +        * Username: anonymous
 +        * Password: <blank i.e. no password>​
 +        * Folders
 +          * ''​read/''​ - Readonly access, contains example files (3 binary and 1 text).
 +            * the ''​sample.txt''​ seems to contain linefeed+carriage return at the end of each line, new text file will be added without \r.
 +          * ''​write/''​ - Write and read access, place to upload data. Will be cleared at 6:00 every morning, quota is 2GB (?).
 +    * Funet FTP server:
 +      * Address: ftp.funet.fi
 +      * Port: Standard FTP port (21)
 +      * Anonymous access from everywhere.
 +      * Read only access.
 +      * Provided by Funet
 +      * Lots of different sized data (RFCs, Linux/UNIX images ...)
 +    * Or you can install a FTP server on your own machine, some FTP servers:
 +      * For Windows machines:
 +        * [[http://​filezilla-project.org/​|Filezilla FTP server]]
 +        * [[http://​smallftpd.sourceforge.net/​|Smallftpd]]
 +        * [[http://​www.pablosoftwaresolutions.com/​html/​quick__n_easy_ftp_server.html|Quick 'n easy FTP server]]
 +      * For Linux machines:
 +        * [[http://​www.pureftpd.org/​project/​pure-ftpd|Pure-ftpd]]
 +        * [[http://​vsftpd.beasts.org/​|Vstfpd]]
  
 ===== Questions ===== ===== Questions =====
  
 +  * TBA
  
 ---- ----
-Network programming [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5000/etusivu|@ Noppa]] | [[courses:​ct30a5000:​start|@ wiki]] +Network programming [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5001/etusivu|@ Noppa]] | [[courses:​ct30a5000:​start|@ wiki]]