

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A programming assignment for cmsc 417 students, where they are required to write a single program that acts as a multicast sender and then a multicast listener. The program should send a message to a multicast address and print all messages received at that address until the process is interrupted. The assignment involves building a virtual network using multicast frames and unicast tunnels, and students will be testing network protocols and applications by the end of the semester.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Your task in this assignment will be to write a single program that first acts as a multicast sender and then a multicast listener. This assignment is to be done individually.
Over the rest of the semester, we will build a virtual network using a combination of multicast frames (to emulate multi-access networks) and unicast tunnels to emulate a backbone network. Building this application blends networked application development with simulations of network pro- tocols, so you should be able to build both network protocols and network applications at the end of the semester.
DUE: Feb 15. Take note! This is only approximately 120 lines of C code.
The program should do two things in exactly the order below.
Your message header should consist of the following:
uint8_t version; /* set to 1; if you receive anything else, discard. / uint8_t ttl; / set to 1; if you receive anything else, it’s fine. / uint16_t payload_length; / bytes following the header, not including trailing null of a c string * uint32_t account_identifier; /* digits of your account name: unsigned int i; sscanf("cs417xxx", "cs417% uint32_t source_address; /* unused for now, set to 0 and ignore. / uint32_t destination_address; / unused for now, set to 0 and ignore. / uint16_t checksum / unused for now, set to 0 and ignore. / uint16_t protocol / must be 1; if you receive anything else, discard. */
#include <inttypes.h>
./one "The message"
That is, the string, if given, will be in argv[1]. If argc is less than 2, either send a default message, or send no message at all.
We will test whether your code sends a valid message with the given string once and only once, whether your code prints received messages to stdout, optionally with some heading, whether the system calls made by your code appear correct, and anything else we think of in the next few days.
At the end of this assignment, you should understand: