ENGR2782 Computer Networks and Operating Systems Assignment 2 Please submit your assignment through.

ENGR2782 Computer Networks and Operating Systems 
Assignment 2 
Please submit your assignment through FLO by midday Friday 2nd November, Week 13.

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

§  The aim of the assignment is to provide you with and opportunity to apply your new knowledge of operating system concepts

§  Demonstrate a working knowledge of Computer Network concepts

§  Demonstrate you can analyse the relevant requirements and present appropriate user program choices

§  Learn how to apply programming, data structure and algorithm concepts

1.        

Inter-Process Communication

Task 1 – From the two provided files on FLO; server1.c and client1.c (Marks 30)

§  Find a coding standard or style guide for C, provide the link and format the code according to the standard (5)

§  Replace command line argument parsing with getopt() and define a usage() error function in 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 the workshop in week 10, this client/server pair are using TCP/IP and listen on any IP address on any network interface on the host.

Task 2 – From your working TCP/IP client/server create two programs from Task 1 create; client2.c andserver2.c (Marks 40)

§  Create a simple protocol to inspired by HTTPor similar to request files from the client to the server.

§  Your server program should;

§  Listen to a high port (above 1024), accept requests

§  The client should be able to make a request of a file name, provided by a command line argument, eg;

client2 -g test1.txt client2 —get test1.txt

§  The server should respond with with a status code and file size in bytes, followed by the contents of the file.

§  The server should then once finished delivering the file close the connection and listen for further requests.

Task 4 – 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, outline its’ messages and its’ rules (10)

3.       How did you choose to parse the strings form the client request and from the server for status and file size? (5)

4.       What techniques would we use to so the server could serve many clients simultaneously? (5)

5.        

Resources

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

HTTP standard;

§  https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

§  RFC https://tools.ietf.org/html/rfc2616

Further information may be posted to the discussion forum as appropriate.

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 10% 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

 

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-8hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Do you have an upcoming essay or assignment due?

All of our assignments are originally produced, unique, and free of plagiarism.

If yes Order Paper Now