Socket API questions

Q7

GATE CS 2021 CS-2Transport LayerMCQ1 mark−1/3 if wrong
Consider the three-way handshake mechanism followed during TCP connection establishment between hosts P and Q. Let X and Y be two random 32-bit starting sequence numbers chosen by P and Q respectively. Suppose P sends a TCP connection request message to Q with a TCP segment having SYN bit = 1, SEQ number = X, and ACK bit = 0. Suppose Q accepts the connection request. Which one of the following choices represents the information present in the TCP segment header that is sent by Q to P?
Show answer without attempting

Answer: C

Q18

GATE CS 2017 CS-2Transport LayerMCQ1 mark−1/3 if wrong
Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which connect function has already been called. Which of the following statements is/are CORRECT?

I. A connected UDP socket can be used to communicate with multiple peers simultaneously.
II. A process can successfully call connect function again for an already connected UDP socket.
Show answer without attempting

Answer: B

Q33

GATE CS 2015 CS-2Transport LayerMCQ1 mark−1/3 if wrong
Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIX socket API.
Show answer without attempting

Answer: B

Q24

GATE CS 2014 CS-2Transport LayerMCQ1 mark−1/3 if wrong
Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket?
Show answer without attempting

Answer: C

0/40 correct0 marks

Related topics in Transport Layer