Trivial File Transfer Protocol (TFTP)

Assignment 2
The Trivial File Transfer Protocol (TFTP) is an Internet software utility for
transferring files that is simpler to use than the File Transfer Protocol (FTP) but
less capable. It is used where user authentication and directory visibility are not
required. For example, it is used by Cisco routers and switches to transfer
images of the operating system from/to the devices.
NOTE: TFTP‘s port is 69 (a system/OS port). This is below 1024 and therefore
you cannot bind a Socket to it unless you have administrative access rights on
the machine you are working. To avoid any complications you can use any port >
1024 to bind server sockets.
Task 1: Implementation of the Trivial File
Transfer Protocol (TFTP)
For this task you need to implement (in Java) the Trivial File Transfer Protocol
(TFTP) as specified in RFC 1350 (Links to an external site.)Links to an external
site.. You will submit source code for a client and server application that ‘speak‘
the TFTP protocol. You will built your protocol on top of UDP. Compared to the
specifications in the RFC, you will implement a slightly simplified version:
Support for octet mode only. The files should be transferred as a raw
sequence of bytes. Do not read, write or transfer files as characters.
Support only for error handling when the server is unable to satisfy the
request because the file cannot be found.
No support for error handling when data duplication occurs.
The client and server applications should be simple Java console applications.
The server should operate (i.e. read and write files) in the directory where it is
started from. The server should support simultaneous file transfers to and from
multiple clients. The client should just read command line arguments (or have a
very simple console-based menu - e.g. "press 1 to store file, press 2 to retrieve
file") and execute user commands (i.e. reading or writing a file).
Hint: the simplest way to implement timeouts is by calling

代写TFTP留学生作业、Java课程设计作业代做、Java程序语言作业调试
the setSoTimeout() method on the DatagramSocket objects (assuming that you
are using blocking I/O). If the timeout expires,
a java.net.SocketTimeoutException is raised, though the DatagramSocket is still
valid.
Task 2: Implementation of an even simpler
version of TFTP on top of TCP
For this task you will use TCP sockets to implement a protocol that operates like
TFTP (i.e. supports only read and write operations). Given that TCP supports
in-order, reliable data transport, you should not implement the relevant
mechanisms described in RFC 1350 (ACKs, retransmissions). The client and
server applications should be equally simple, as in Task 1. The server must be
able to handle multiple file transfers.
Marking Criteria
You should make sure that your code compiles. Code which does not compile
will receive at most 20%.
I will assess your assignment using the following criteria:
TFTP-UDP-Server (35%)
Is the server-side of the protocol fully and correctly implemented
(based on the specifications in the RFC)? i.e. read/write requests,
acknowledgments, timeouts, error handling, support for simultaneous
file transfers.
TFTP-UDP-Client (30%):
Is the client-side of the protocol fully and correctly implemented (based
on the specifications in the RFC)? i.e. read/write requests,
acknowledgments, timeouts, error handling.
TFTP-TCP-Server (10%)
Is the server-side of the protocol fully and correctly implemented? i.e.
read/write requests, error handling, support for simultaneous file
transfers.
TFTP-TCP-Client (10%):
Is the client-side of the protocol fully and correctly implemented? i.e.
read/write requests, error handling.
Description of Protocols (10%):
Is there description for both protocols and how/where the specifications
are implemented?
Is the description well-written with clear references to the source code?
Other Characteristics (5%):
Is the code commented appropriately?
Is it indented correctly?
? Is naming of variables and methods sensible?
Submission Guidelines
You should submit the coursework by the deadline posted on Sussex
Direct (and the submission link on Canvas). Standard penalties for late
submissions will apply. You will need to submit a .zip file containing the
following:
Well-formatted and well-documented source code (written in Java) in 4
separate Netbeans projects that can be compiled and run. The
Netbeans projects, named TFTP-UDP-Server, TFTP-UDP-Client,
TFTP-TCP-Server and TFTP-TCP-Client, respectively, will include all
required source code to execute the 2 different file transfer protocols.
A short report (up to 2000 words) describing your protocols, the source
code and the design decisions that you made.
Please do not put your names on your submissions, but do include your
candidate number. Failure to submit source code, as described in the first
bullet, will result to a zero mark as I will not be able to assess your
programming effort.
Plagiarism and Collusion
The coursework you submit is supposed to have been produced by
you and you alone. This means that you should not: work together with
anyone else on this assignment
give code for the assignment to other students
request help from external sources
do anything that means that the work you submit for assessment is not
wholly your own work, but consists in part or whole of other people’s
work, presented as your own, for which you should in fairness get no
credit
If you need help ask your tutor The University considers it misconduct to
give or receive help other than from your tutors, or to copy work from
uncredited sources, and if any suspicion arises that this has happened,
formal action will be taken. Remember that in cases of collusion (students
helping each other on assignments) the student giving help is regarded by
the University as just as guilty as the person receiving help, and is liable
to potentially receive the same penalty. Also bear in mind that suspicious
similarities in student code are surprisingly easy to spot and sadly the
procedures for dealing with it are stressful and unpleasant. Academic
misconduct also upsets other students, who do complain to us about
unfairness. So please don’t collude or plagiarise.

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected]

微信:codinghelp

原文地址:https://www.cnblogs.com/simplepython/p/10746297.html

时间: 2024-10-10 10:18:32

Trivial File Transfer Protocol (TFTP)的相关文章

基于TCP的TFTP(Trivial File Transfer Protocol,简单文件传输协议) 的c编程实现

我们或许都听到过,TFTP(Trivial File Transfer Protocol,简单文件传输协议)是TCP/IP协议族中的一个用来在客户机与服务器之间进行简单文件传输的协议,提供不复杂.开销不大的文件传输服务. 本文就简单的叙述下tftp的小文件传输功能以及客户端对服务器的列表功能. 之前就一直很纳闷,我们经常在网上下载什么东西或者从别处传输一个文件,具体是怎么实现的呢?于是乎,翻查一些资料,加上自己对网络编程的逐步加深,所以功夫不负有心人,还算是大致的完成了下. 本例程实现的功能呢?

FTP(File Transfer Protocol)是什么?

文件传输协议 FTP(File Transfer Protocol),是文件传输协议的简称.用于Internet上的控制文件的双向传输.同时,它也是一个应用程序(Application).用户可以通过它把自己的PC机与世界各地所有运行FTP协议的服务器相连,访问服务器上的大量程序和信息.[编辑本段]FTP的作用 正如其名所示:FTP的主要作用,就是让用户连接上一个远程计算机(这些计算机上运行着FTP服务器程序)察看远程计算机有哪些文件,然后把文件从远程计算机上拷到本地计算机,或把本地计算机的文件

FTP - File Transfer Protocol

1 FTP - File Transfer Protocol 2 FTP 实际上使用了两个 TCP 链接. 一个作为控制信道用, 主要传输一些指令和响应, 3 比如 ACK 或 错误码. 另一个链接是数据信道, 用来传输文件和一些诸如目录列表的 4 信息等. 5 6 from ftplib import FTP, all_errors 7 FtpServerAddr = '' 8 user = '' 9 PW = '' 10 acct = '' 11 12 FH = FTP(FtpServerA

Simple Mail Transfer Protocol

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol https://zh.wikipedia.org/wiki/简单邮件传输协议 Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (email) transmission. First defined by RFC 821 in 1982, it was last up

PTA 5-8(English) File Transfer (25) - 并查集 - 数组实现

题目:http://pta.patest.cn/pta/test/16/exam/4/question/670 PTA - Data Structures and Algorithms (English) - 5-8 We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer t

04-树5. File Transfer (25)

04-树5. File Transfer (25) 时间限制 150 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another. Is it

PAT 5-8 File Transfer (25分)

We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another. Is it possible to send a file from any computer on the network to any other? Input Specification:

PAT File Transfer

File Transfer We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another. Is it possible to send a file from any computer on the network to any other? Input S

SSH Secure File Transfer Client传送文件

SSH Secure File Transfer Client是连接Linux的主要客户端工具之一,其特点就是传送文件方便.虽然SSH Secure File Transfer Client显示中文时有时会乱码,但仍然挡人们对它的喜爱 http://jingyan.baidu.com/article/19192ad815fd0ee53e570719.html