CSCE3600 – Systems Programming Minor Assignment Using Linux Sockets

Assignment Task

PROGRAM DESCRIPTION:

In this assignment, you will write two complete C programs to support a client/server model using Linux sockets for a UDP “ping” utility, similar to the ping utility already available on our CSE machines.

Server

The server program will be called with one command-line argument, the port number being used, such as ./minor4svr 8001. If the user calls the server program with too few or too many arguments, you will print out a usage statement and terminate the program.

The server will set up a UDP socket on the Internet (i.e., INET) domain and then wait in an infinite loop listening for incoming UDP packets, specifically PING messages from a client.

Packet Loss

UDP provides applications with an unreliable transport service. Messages may get lost in the network due to a variety of reasons. Since packet loss is rare or even non-existent in typical campus networks, the server in this lab will inject artificial loss to simulate the effects of network packet loss. The server will simulate 30% packet loss through generation of a seeded, randomized integer that will determine whether a particular incoming PING message is lost or not.

When a PING message comes in and if the packet is not lost, the server will print the client message to the terminal and then send a PONG message back to the client. If the packet is determined to be lost, the server will print an appropriate message to the terminal and simply “eat” the message by not responding to the client.

Client

The client program will be called with two command-line arguments, the hostname of the server and the port number being used, such as ./minor4cli cse06 8001. If the user calls the client program with too few or too many arguments, you will print out a usage statement and terminate the program. The client will send 10 automated PING messages to the server on a UDP socket, where automated means the message is built in the code, not entered from the keyboard. Because UDP is an unreliable protocol, a packet sent from the client to the server may be lost in the network, or vice versa. For this reason, the client cannot wait indefinitely for a reply to a PING message. You should get the client to wait up to one second for a reply – if no reply is received within one second, your client program should assume that the packet was lost during transmission across the network.

Specifically, for each of the 10 PING messages, your client program should:

send the PING message using the UDP socket and print a status message.

if the response message is received from the server, calculate and print the round trip time (RTT) in milliseconds for each message; otherwise, print a status message that it timed out.

After all of the PING messages have been sent (and responses received or timed out), the client program should report:

the number of messages sent, the number of messages received, and the message loss rate (as a percentage);the minimum, maximum, and average RTTs for all of the 

REQUIREMENTS:

Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date, and brief description), comments for each variable, and commented blocks of code.

Programs should be named as xminor4svr.c and minor4cli.c, for the server and client code, respectively.

Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02, …, cse06), so you should make sure that your program compiles and runs on a CSE machine.

Please pay attention to the SAMPLE OUTPUT for how this program is expected to work.

This is an individual programming assignment that must be the sole work of the individual student. Any instance of academic dishonesty will result in a grade of “F” for the course, along with a report filed into the Academic Integrity Database.

This CSCE3600 – IT Assignment has been solved by our IT experts at Schooling Best. 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 HELP WITH YOUR HOMEWORK PAPERS @ 25% OFF

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Write My Paper Button

WeCreativez WhatsApp Support
We are here to answer your questions. Ask us anything!
👋 Hi, how can I help?
Scroll to Top