Question: Problem Using UDP - based Internet sockets, write a C program, myping.c , which mimics the standard ping command as shown below: $ . /
Problem
Using UDPbased Internet sockets, write a C program, myping.c which mimics the standard ping command as shown below:
$ myping syscsabc.edu
from syscsabc.edu : time ms
from syscsabc.edu : time ms
from syscsabc.edu : time ms
from syscsabc.edu : time ms
from syscsabc.edu : time ms
where time is the Round Trip Time RTT the delay between the client sending the ping message and receiving the pong message. Note that standard ping programs use the Internet Control Message Protocol ICMPto be discussed later not UDP.
Your client program should send five ping messages to the server at every second interval see the sleep function For each message, your client is to determine and print the RTT in milliseconds when the corresponding pong message is returned see the clock function
Recall that UDP is an unreliable protocol; a packet sent by the client or server may be lost. The client may have to send more than five ping messages to receive five pong messages from the server.
To handle the clients ping request, write another C program, mypingserver.c which runs on the server. Your server program must be UDPbased and may use any ports between and Run your server with:
$ mypingserver
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
