Network Programming
Language: C
Task 1 Unix Domain Protocol – Connectionless
- Modify both Unix Domain Protocol – Connectionless server and client program so that the server sends the received message back to the client.
Task 2 Unicast and Multicast programs
- You are required to modify three (3) programs as follows:
a. unicast_client.c: (refer to Lab 1 udp_client.c)
i. This program will send a unicast message to the server.
ii. It will repeatedly request user input until the user types “Good bye”.
b. multicast_sender.c: (refer to Lab 4 multicast_sender.c)
i. This program will receive a unicast message from the unicast client.
ii. It will then forward the received message to the multicast receiver(s) who joined the multicast group.
c. multicast_receiver.c: (refer to Lab 4 multicast_receiver.c)
i. This program will receive a multicast message from the server if it has correctly joined the designated multicast group.
ii. This program will NOT receive a multicast message from the server if it has joined the incorrect multicast group. - The unicast IP address, unicast port number, multicast IP address, and multicast port number are specified when the program is executed in the terminal.
-E.g., ./m_s 224.0.0.15 192.168.56.101 5000
-Multicast IP address: 224.0.0.15
-Multicast Port Number: 5000
-Unicast IP address: 192.168.56.101
-Unicast Port Number: 4999 (multicast port number – 1) - To verify if your programs are running correctly, below are the steps.
a. Start one (1) server in a new terminal by using the following commands:
./m_s 224.0.0.15 192.168.56.101 5000
b. Start one (1) sender in a new terminal by using the following commands:
./u_c
c. Open three (3) separate terminals and start three (3) receivers using following commands:
./m_r 224.0.0.15 192.168.56.101 5000
./m_r 224.0.0.15 192.168.56.101 5000
./m_r 224.0.0.25 192.168.56.101 4998