CSS 432
Final Project: Network Application
Instructor: Munehiro Fukuda
Due date: See the syllabus
The program should be invoked with ftp [hostname]. It connects a session to the remote hostname server using the default port 21 and transfers files in passive mode. If no argument is given, the client program does not establish any connection until it receives an open command (See below).
ftp client interface | the corresponding RFC959 commands | behavior |
open ip port | N/A | Establish a TCP connection to ip on port. |
name: account | USER account | Send a user identification to the server. |
password: user_password | PASS user_password SYST |
Send the user password to the server. |
cd subdir | CWD subdir | change the server's current working directory to subdir |
ls | PASV LIST |
Ask the server to send back its current directory contents through the data connection. |
get file | PASV RETR file |
Get a file from the current remote directory. |
put file | PASV STOR file |
Store a file into the current remote directory. |
close | QUIT | Close the connection but not quit ftp. |
quit | QUIT (if not closed) | Close the connection and quit ftp. |
Run your client program on a UW1-320 linux machine and connect to the ftp.tripod.com server. Your client program must respond to a user authentication using the css432 account, and perform cd, ls, get, put, close and quit commands. The password for css432 is found in the ~css432/ftp/passwd file
[mfukuda@uw1-320-20]$ ./ftp ftp.tripod.com 220 Welcome to Tripod FTP. Name (ftp.tripod.com:mfukuda): css432 331 Username set to css432. Now enter your password. Password: ********* 230- ============================================================ 230- IMPORTANT NOTICE 230- ============================================================ 230- 230- Powerful building tools. Traffic-generating, money-making 230- programs. It's all waiting for you at the new Tripod. 230- 230- httpd://www.tripod.com/ 230- 230- ============================================================ 230- 230- Tripod offers a cgi-bin to all members! For more 230- information, visit our CGI tutorial. 230- 230- httpd://www.tripod.lycos.com/build/module_library/tutorial/ 230- 230- ============================================================ 230- 230- Got a great idea for a website? Then don't 230- wait, get your own web address today! 230- 230- httpd://tripod.domains.lycos.com/ 230- 230- ============================================================ 230- 230- Visit Tripod's Script Library, with free, easy-to-use, 230- customizable CGI and JavaScripts available to all members. 230- 230- httpd://build.tripod.com/tools/script_library 230- 230- ============================================================ 230- 230- We heard you loud and clear! You love your site, but 230- you don't like the ads. Remove those pesky popups 230- forever with Tripod Plus! 230- 230- httpd://www.tripod.lycos.com/host/plus.html 230- 230- ============================================================ 230 User 'css432' logged on. 215 UNIX Type: L8 ftp> ls 227 Entering Passive Mode (209,202,240,80,206,212) 150 Opening ASCII mode data connection for LIST. drwxr-xr-x 1 css432 Tripod 0 Sep 15 21:22 cgi-bin -rw-r--r-- 1 css432 Tripod 26169 Sep 16 18:28 ttcp.c -rw-r--r-- 1 css432 Tripod 8236 Sep 15 21:22 index.htm drwxr-xr-x 1 css432 Tripod 0 Sep 15 21:22 _private drwxr-xr-x 1 css432 Tripod 0 Sep 16 18:32 project 226 Transfer complete. ftp> get ttcp.c 227 Entering Passive Mode (209,202,240,80,206,221) 200 Type set to 'I' (IMAGE aka BINARY). 150 Opening BINARY mode data connection for 'ttcp.c'. 226 Transfer complete. (26169 bytes sent.) ftp> cd project 250 Directory set to '/project'. ftp> ls 227 Entering Passive Mode (209,202,240,80,206,229) 150 Opening ASCII mode data connection for LIST. 226 Transfer complete. ftp> put (local-file) data (remote-file) MFukuda.txt 227 Entering Passive Mode (209,202,240,80,206,248) 200 Type set to 'I' (IMAGE aka BINARY). 150 Opening BINARY mode data connection for 'MFukuda.txt'. 226 Transfer complete. (26169 bytes sent.) ftp> ls 227 Entering Passive Mode (209,202,240,80,206,252) 150 Opening ASCII mode data connection for LIST. -rw-r--r-- 1 css432 Tripod 26169 Sep 16 18:33 MFukuda.txt 226 Transfer complete. ftp> close 221 Goodbye... ftp> quit [mfukuda@uw1-320-20]$Do not overwrite any files in css432@ftp.tripod.com's home directory. Put any of your files under only the project directory in order to test your ftp client's put command. Your ftp client program may indicate a password on your computer display, although the above example hid the css432's password with *********.
If an individual student submits a copy: Your first name initial + your last name Example: if your name is Mickey Mouse, the file name is: MMouse.tar To archive all files in the current directory, type: tar -cvf - * > MMouse.tarTo import the public key for CSS432, run gpg as follows:
gpg --import ~css432/CSS432PubKey/CSS432.PubKeyTo encrypt your archived file, MMouse.tar, run gpg as follows:
gpg -ea -r CSS432 MMouse.tarAfter encrypting MMouse.tar, you will get "MMouse.tar.asc". Copy this .asc file to the ~css434/project/ directory.
Your final project will be graded with the following criteria:
Criteria | Weight |
Documentation of your implementations including explanations and illustrations in details | 29pts(29%) |
(1) client's interface in terms of OPEN, PASS/SYST, and QUIT | 5pts |
(2) client's get function in terms of PAV, RETR, and local file options( O_CREAT | O_WRONLY and S_IRUSR | S_IWUSR |S_IRGRP | S_IROTH) | 5pts |
(3) client's cd function (i.e., CWD) | 4pts |
(4) client's ls function in terms of PASV, LIST, and file output to stdout | 5pts |
(5) client's put function in terms of PASV, STOR, and local file option (O_RDONLY) | 5pts |
(6) limitations (how much you complied with RFC 959) | 5pts |
Source code that adheres good modularization, coding style, and an appropriate amount of comments. | 29pts(29%) |
(1) the correctness of client's interface (USER/PASS/SYST/QUIT) including authentication | 5pts |
(2) the correctness of client's get (PASV/RETR) function | 5pts |
(3) the correctness of client's cd (CWD )function | 4pt |
(4) the correctness of client's ls (PASV/LIST) function | 5pts |
(5) the correctness of client's put (PASV/STOR) function | 5pts |
(6) comments/coding style | 5pts |
Execution output such as snapshots of your display/windows. Type import -window root X.jpeg; lpr -Puw1-320-p1 X.jpeg on a uw1-320 linux machine. You don't have to print out all data. But the output must include all execution snapshots of the following execution. | 30pts(30%) |
(1) client's connection establishment | 6pts |
(2) client's get function | 6pts |
(3) client's cd function | 6pts |
(4) client's ls function stdout | 6pts |
(5) client's put function | 6pts |
Performance evaluation that compares the difference in elapsed time between your ftp client program and the Unix ftp, when executing a GET command. | 4pts(4%) |
Discussions should be given for possible functional extensions of your own program and/or the Unix ftp. You should also mention about the difference in performance between your own program and the Unix ftp. | 8ts(8%) |
Total | 100pts(100%) |
Extra credits will be given if you have implemented addtional ftp commands or functionality. | 5pts(5%) |