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 或邮箱:99515681@qq.com
微信:codinghelp
Trivial File Transfer Protocol (TFTP)的更多相关文章
- TFTP(Trivial File Transfer Protocol,简单文件传输协议)
TFTP(Trivial File Transfer Protocol,简单文件传输协议),是 TCP/IP 协议族中用来在客户机和服务器之间进行简单文件传输的协议,开销很小.这时候有人可能会纳闷,既 ...
- TFTP(Trivial File Transfer Protocol,简单文件传输协议)
网络特性 通常使用UDP 69端口(据说可改成TCP) 与FTP区别 轻量级,适用于传输小文件,当然功能也少些,比如没有列出目录功能,不进行认证
- FTP(File Transfer Protocol)是什么?
文件传输协议 FTP(File Transfer Protocol),是文件传输协议的简称.用于Internet上的控制文件的双向传输.同时,它也是一个应用程序(Application).用户可以通过 ...
- FTP - File Transfer Protocol
FTP - File Transfer Protocol FTP 实际上使用了两个 TCP 链接. 一个作为控制信道用, 主要传输一些指令和响应, 比如 ACK 或 错误码. 另一个链接是数据信道, ...
- ftp - Internet 文件传输程序 (file transfer program)
概述 (SYNOPSIS) ftp [-pinegvd ] [host ] pftp [-inegvd ] [host ] 说明 (DESCRIPTION) 用户通过 Ftp 这个程序来使用 Inte ...
- SSH File Transfer遇到错误"too many authentication failures for root".A protocol error was detected......
在SSH Secure Shell 连接Linux centos的时候,遇到F-Secure SSH File Transfer错误"too many authentication fai ...
- PAT 5-8 File Transfer (25分)
We have a network of computers and a list of bi-directional connections. Each of these connections a ...
- 让 File Transfer Manager 在新版本WIndows上能用
最近研究.NET NATIVE,听说发布了第二个预览版,增加了X86支持,所以下,发现连接到的页面是:https://connect.microsoft.com/VisualStudio/Downlo ...
- PAT 05-树7 File Transfer
这次的题让我对选择不同数据结构所产生的结果惊呆了,一开始用的是结构来存储集合,课件上有现成的,而且我也是实在不太会,150ms的时间限制过不去,不得已,看到这题刚好可以用数组,结果7ms最多,有意思! ...
随机推荐
- css之字体的引用
font-family 属性设置文本的字体系列. font-family 属性应该设置几个字体名称作为一种"后备"机制,如果浏览器不支持第一种字体,他将尝试下一种字体. 注意: 如 ...
- MS SQL Server 查询元数据
use test -- 查询数据库中所有的表和架构名称select SCHEMA_NAME(schema_id) as table_schema_name, name as table_name fr ...
- lua 调用参数报错(a userdata value)
本来想用这种方式统一安全删除node,后来发现参数变成(a userdata value),所以不能用下面这个方式做 方法如下: function RemoveNodeSafe(node) if no ...
- 【python】flask+nginx配置
背景信息 有wordpress服务A 有flask服务B, gunicorn启动,8个进程 用nginx代理,实现访问A然后跳转到B 问题 flask服务B上有文件上传操作,用nginx后发现无法上传 ...
- Java Web项目漏洞:检测到目标URL存在http host头攻击漏洞解决办法
检测到目标URL存在http host头攻击漏洞 详细描述 为了方便的获得网站域名,开发人员一般依赖于HTTP Host header.例如,在php里用_SERVER["HTTP_HOST ...
- lxml.etree.HTML(text) 解析HTML文档
0.参考 http://lxml.de/tutorial.html#the-xml-function There is also a corresponding function HTML() for ...
- 课堂小记---html
其他注意点: 行高line-hight的继承特性: 行高有三种属性值:数字(1.5).百分比(150%).长度值(1.5em或者30px).继承上这三者是有区别的. 当属性值为数字值,其子元素会继承行 ...
- django——模型层之多表操作
django的多表操作 1.使用场景 在实际生产过程多,我们面对的数据纷繁复杂,此时就需要良好的数据结构设计,多表之间的约束关系为我们提供了数据管理以及查询的便利.在MYsql中我们利用外键(fore ...
- Python网络爬虫之三种数据解析方式
1. 正则解析 正则例题 import re # string1 = """<div>静夜思 # 窗前明月光 # 疑是地上霜 # 举头望明月 # 低头思故乡 ...
- c#清空数组&初始化数组&动态数组
清空数组>>>Array.Clear [去MSDN查看] ]; ; i < str.Length; i++) str[i] = i.ToString(); Array.Clea ...