CS 779/879
Design of Network Protocols
Spring 2007
Final Exam


Time 2 & 1/2 hours

 

Open:   Textbooks & Notes

Closed:   Notebooks

 

 

Name:  

 

                           
Unix Login:


 

 

Q1: (15 points)

 

In the system call:

socket (arg1, arg2, arg3);

List  all possible  values that we have discussed in our class for:

 

arg1:

 

 

 

 

 

arg2:

 

 

 

 

 

ag3:


Q2: (15 points)

 

To read from a socket we may use one of the following system calls:

 

read,  recv,  recvfrom.

 

Describe under what conditions we must use:

 

recv:

 

 

 

 

 

 

 

recvfrom:


Q3: (20 points)

 

Part1:

 

Assume the following program is running at  host: (something)128.82.4.210, fe80::203:baff:fe2a:67ff).

 

  %  DayTimeServer4SctpS

 

Provide all possible alternative arguments to each of the following programs to obtain the daytime from that server:

 

Ø    DayTimeClient4SctpS

 

 

 

Ø    DayTimeClient6SctpS

 

 

 

Ø    DayTimeClient4SctpQ

 

 

 

Ø    DayTimeClient6SctpQ


 

Part 2:

Assume the following program is running at  host: (something)128.82.4.210, fe80::203:baff:fe2a:67ff).

 

  %  DayTimeServer6SctpS

 

Provide all possible alternative arguments to each of the following programs to obtain the daytime from that server:

 

Ø    DayTimeClient4SctpS

 

 

 

Ø    DayTimeClient6SctpS

 

 

 

Ø    DayTimeClient4SctpQ

 

 

 

Ø    DayTimeClient6SctpQ


 

Q4: (15 points)

In testing assignment #5 for student (S), Dr. Wahab executed the server GCS and all chatting clients (sctp and mcast)  on the same machine.

Dr. Wahab noticed that when an sctpt client types a message M, all other sctp clients get the message M twice.

 

Ø    What is the most plausible cause for this problem?

 

 

 

 

 

 

 

 

Ø    How student S can fix this problem?


 

Q5: (35 points)

Write a program called GDS (General Daytime Server) with the following description:

% GDS  <port>

To send the daytime to any request from any client that arrives to <port>.

The program can handle any type of client with any of the following transport protocol types:

               tcp, udp, sctp

and any IP protocol  type:

               ipv4,  ipv6

 

To improve the readability of your code:

- do not write any include statements and

- do not check for any errors for example:

                       if (socket (. . .)) < 0)

            perror(. . .);

     Should be written simply as:

   socket (. . .);