Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I need to submit this exercise until the end of the day of the 1 8 th of may. I have to write a

Hello I need to submit this exercise until the end of the day of the 18th of may.
I have to write a code using Language C (Fedora, Linux). If requested I insert also my student number: 1230065.
I also insert this code sent by the professor to check if the code works correctly:
#!/bin/bash
if [[ $# -eq 0]] ; then
echo 'Utilizao:' $0'nmero_de_estudante'
exit 0
fi
CFILES=$(echo -e "ex2_clt.c
ex2_srv.c
ex3_clt.c
ex3_srv.c
ex4_clt.c
ex4_srv.c
ex5_clt.c
ex5_srv.c
ex8a.c
ex8b.c")
OIFS="$IFS"
IFS=$'
'
for file in $CFILES
do
ls ${file} &>/dev/null || echo Ficheiro \"$file\" no encontrado.
execfile=${file%.c}
ls ${execfile} &>/dev/null && ( grep "$1" ${execfile} &>/dev/null || echo Verifique se faz a impresso solicitada em \"${file}\")|| echo Ficheiro \"$execfile\" no encontrado.
done
IFS="$OIF"
Here it is the exercise:
Exercise 8
a) Implement a program that is able to receive text messages through UDP 3000 port and print
them, as well as the sender's IP address and port number, on the screen.
b) Implement a program that allows sending messages to the program described in point 1
until it is finished with the combination ctrl+c.
c) Check that the initial program can receive sequences of messages from different clients
without resorting to any type of multi-tasking mechanism (creation of new processes or
threads).
d) The maximum size of IPv4 packets is 65536 bytes. However, in general, the connection
layer (e.g., the ethernet network) does not allow sending packets of this length. The IPv4
protocol supports a fragmentation mechanism in order to overcome this limitation.
However, this mechanism has some disadvantages so, in Linux, it is disabled by default for
UDP. Check, by trial and error (it can also be based on the information provided by the
ifconfig command), the maximum size that messages can have to be sent successfully.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

Explain the difference between home-country and host-country laws.

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

Identify the cause of a performance problem. page 363

Answered: 1 week ago