BEST代写-线上留学生作业代写 & 论文代写专家

成立于2015年的老牌留学生代写品牌-BEST代写提供超过百门冷热门留学学科的作业和论文代写服务。全网BEST原创,高质,准时的留学生代写。

C语言代写 | Socket ENGR2881 Computer Networks Assignment

C语言代写 | Socket ENGR2881 Computer Networks Assignment

ENGR2881 Computer Networks Assignment
Please submit your assignment through FLO by midday Thursday 20th June. Please see the assignment hand in for final submission date.
Assignment Overview
The result of writing user programs on modern operating systems should allow program designers to solve complex problems with a number of simple techniques.
This assignment is focused around using network sockets to pass data from client to/from server user process. As this is a common problem to be solved, there are several useful concepts to demonstrate, each to be delivered as a separate pair of programs as we do with laboratory checkpoints. Each of these will be in the tasks described later in this document.
Examples of the concepts presented here will allow you to start building such application services as; threaded web services, multi-tenant network service delivery, networked database services, parallel processing, message queuing services, along with many others.
Requirements
• Demonstrate an understanding of Computer Network concepts; IP addresses, sockets, simplex vs duplex connections, network protocols
• Demonstrate you are able to develop programs in the UNIX environment in C
• Demonstrate you are able to articulate user program design choices in terms of; security, efficiency, performance, or other relevant requirements
Topic outcomes achieved
• LO1: Understand computer network terminology and topologies, functions and architectures of computer networks
• LO2: Demonstrate the design and implementation of simple process and network level programs
• LO3: Demonstrate an understanding of the various layers which make up networks and how they are used to form complex, reliable and secure communication mediums
• LO4: Understand and be able to articulate the structure and function of the major types of networks in common use
• LO5: Understand aspects of the internet, including various associated protocols IP, UDP, TCP, IP addressing, header fields and the operation of servers / clients
• LO6: Appreciate the real-time nature of networked devices and communications and demonstrate an understanding of current and emerging methods for secure information transfer
2.Document version 1.1 3.CRICOS No. 00114A

1.
Networked Inter-Process Communication
Task 1 – From the two provided files on FLO; server1.c and client1.c (Marks 30)
• Find a suitable coding standard or style guide for C, provide a document in pdf, with reference and
format the code for client and server files according to this standard (5)
• Replace command line argument parsing with getopt() and define a usage() error function in
server1.c at line 35(A) (5)
• Replace the “Q)…?” through out the code with an appropriate values, functions or variables.(20)
• The code is similar to the UDP client/server from Workshop08, this client/server pair are using TCP/IP and listen on any IP address on any network interface on the host.
2.Document version 1.1 3.CRICOS No. 00114A

1.
Task 2 – From your working TCP/IP client/server create two programs from Task 1 create; client2.c and server2.c (Marks 40)
• Create and document(see task 3) a simple protocol inspired by FTP and/or HTTP that allows request files from the client to the server (30 marks).
• Implement CTAP tests for common functionality (10 marks);
• Test the server and client functions to produce and parse; tokens creation, token verification, file size generation, port number generation.
• The code to implement these functions should be in a shared header and source file to be included by the server, client and test programs.
• For you protocol you should implement at least;
• Server listens to a high port (above 1024), and accept requests
server2 -p 1234 -h localhost
• The client should be able to make a request of a file name, provided by a command line argument, eg;
client2 -p 1234 -h localhost -g test1.txt
• The server should respond with;
• The filename, the file size in bytes, a port number for the client to connect to, a session token for the client to use
• The server should open the second socket and listen on the provided port number
• The client should then;
• Open a second socket to the second port offered by the server and then the client should send the server the session token
• The server should send the contents of the file, once the session token has been verified
• The server should then once finished delivering the file close the connections and listen for further requests.

2.Document version 1.1 3.CRICOS No. 00114A

1.
Task 3 – Reflecting on the requirements and your implementation of tasks 1 and 2, consider in a couple of paragraphs the reasons for each of the following; (Marks 30)
1. What changes would be required in our above programs in Task 1, to use IPv6 instead of IPv4? (10)
2. Document the “protocol” you chose to implement in Task 2, outline its’ messages and its’ rules
(5)
3. What challenges did you face implementing the tests in Task2? (10)
4. What techniques would we use to so the server could serve many clients simultaneously for Task 1 and Task 2? (5)
2.Document version 1.1 3.CRICOS No. 00114A

1.
Resources
Assistance to questions will be provided through the Group Discussion Forum on the FLO page, check the FAQ posts.
Check the man pages for functions;
socket() bind() setsockopt() listen() accept() htonl() htons() inet_ntop()
Beej’s Guide to Network Programming – Using Internet Sockets;
• Online HTML – https://beej.us/guide/bgnet/html/single/bgnet.html • PDF – https://beej.us/guide/bgnet/pdf/bgnet_A4_2.pdf
FTP and HTTP standards;
• https://en.wikipedia.org/wiki/File_Transfer_Protocol
• https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol • RFC for FTP https://tools.ietf.org/html/rfc354
• RFC for HTTP https://tools.ietf.org/html/rfc2616
Academic references
• Use academic referencing in either Harvard or IEEE formats
• Your bibliography should be in listed as an appendix
Grading and submission
• The assignment is worth 25% of your total semester grade
• A maximum of 100 marks are available for this assignment
• Your work needs to be submitted to the hand in box on FLO
• You may upload a ZIP file of your source code, along with a PDF with your responses to relevant tasks and appendices
• Please check the due date and time on the assignment hand in box
2.Document version 1.1 3.CRICOS No. 00114A

bestdaixie

评论已关闭。