Networking Functionality is Implemented by Kernel Space Code - Engineering Assignment Help

Download Solution Order New Solution
Assignment Task :

Milestone 

To ensure you are making progress on this assignment, you need to complete a minimum amount of work by May 24th, 11:59 pm AEST (Week 12 Sunday) to receive up to 4 out of 16 total marks. 

2 out of 4 milestone marks are for passing specified Milestone automatic correctness tests on Ed. 

By the Milestone deadline, you must also submit in your assignment workspace on Ed, a 300 word description of your design of your assignment so far (please use a plain text file). This short descrip- tion should outline the general logical flow of your assignment, including initial socket setup and including the method by which you are handling multiple connections. You may wish to include an example scenario of a client request and the flow of data on the network and in your program under this scenario. 

You must attend your Week 13 tutorial, where you will have a short 5 minute discussion with your tutor as to your progress and the design of your assignment submission, with reference to your written description and last submission before the Milestone. See the Submission section at the end of this document for further details. 

The written description and review by your tutor in your Week 13 tutorial will contribute the other 2 out of 4 milestone marks. 

See the “Submission and Mark Breakdown” section at the end of this document for further informa- tion. 

 

Working on your assignment 

Staff may make announcements on Ed (https://edstem.org) regarding any updates or clarifi- cations to the assignment. The Ed resources section will contain a PDF outlining any notes/changes/- corrections to the assignment. You can ask questions on Ed using the assignments category. Please read this assignment description carefully before asking questions. Please ensure that your work is your own and you do not share any code or solutions with other students. 

You can work on this assignment using your own computers, lab machines, or Ed. However, it must compile and run on Ed and this will determine the grade. It is important that you continually back up your assignment files onto your own machine, flash drives, external hard drives and cloud storage providers, ensuring that it is private, and only accessible by you. You are encouraged to submit your assignment while you are in the process of completing it to receive feedback and to check for correctness of your solution. 

 

Introduction 

Typically, networking functionality is implemented by kernel space code. On Linux and other Unix- like operating systems, the kernel implements the various components required for networking, such as Wifi capabilities and the Internet Protocol. This is made available to userspace programs through special system calls, which interact with an abstraction known as a socket. 

Sockets represent a connection to another endpoint on a network, but are analogous to file handles and are also described by a file descriptor. “Reading” from or “writing” to a socket corresponds to receiving or sending data over the network. However, as there are specialised operations that need to be performed with sockets, such as accepting or making connections to network destinations, there are special system calls that are generally used. 

A full discussion of network stacks and protocols is out of scope for this unit. For this assignment, your server will use standard Transmission Control Protocol (TCP) connections on top of the Internet Protocol, version 4 (IPv4). This is a standard networking protocol combination for ubiquitous services such as HTTP which we use on the “World Wide Web”. 

The combination of TCP and IP(v4), as implemented and exposed to userspace by the kernel, permits the formation of network connections. We will not be using any other version of IP in this assignment. A client initiates a connection to a server. Both client and server endpoints are defined by an IP address, which in IPv4 is a 32 bit unsigned integer, as well as a TCP port number, which is a 16 bit unsigned integer. Once the server accepts the connection, the endpoints exchange data to setup a reliable connection. Data that userspace programs send into the socket, at either end of the connection, is delivered and made available for receiving by the userspace application at the other endpoint. TCP guarantees that data is delivered reliably and in order over varying network conditions. It also permits either endpoint to send data simultaneously to each other. However, it treats data as a continuous stream rather than discrete messages; that is for example if an endpoint sends 5 bytes then 10 bytes, the other endpoint will be able to read the data as it is received, with no indication that there was originally a break in sending 5 bytes in. 

Your server is responsible for creating a “listening” TCP socket. This means that it waits for inbound TCP connections from clients. 

In software development, you will often be required to program against third party APIs and libraries. To practice this skill, for this assignment you will need to refer to the manpages for system calls mentioned to determine how to employ them, though guidance will be provided in this specification. 

To create your TCP socket, you need to use socket(2). For the domain argument, please use AF_INET. For the type argument, please use SOCK_STREAM. You can leave the protocol argument as 0.You then need to bind your TCP socket to an address using bind(2). This assigns an IP address and TCP port to your end of the socket. 

You may have seen IPv4 addresses represented in “dotted quad notation”, such as “192.0.2.1”, which is simply 4 8-bit integers extracted in order from the 32-bit address. You may wish to use inet_aton(3) to convert from dotted quad notation to the 32-bit integer representation, and inet_ntoa(3) to con- vert in the other direction. 

Next, you need to specify that your TCP socket will be listening for incoming connections, using listen(2). 

Finally, you will wait for inbound connections on your socket using accept(2). The kernel will queue for your program connections to the IP address and TCP port combination that you bind(2) to. When accept(2) returns, it creates a new socket which allows your program to communicate with this particular accepted connection. Your original socket remains listening for further connections that can be accepted with accept(2).

 

This Engineering Assignment has been solved by our Engineering Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.