Which of the following system calls results in the sending of SYN packets?

2008

Which of the following system calls results in the sending of SYN packets?

Answer: D. connectAnswer: connect Why: The connect system call performs an active TCP open. When connect is called on a TCP socket, the kernel sends a TCP SYN packet to the…

  1. A.

    socket

  2. B.

    bind

  3. C.

    listen

  4. D.

    connect

Attempted by 587 students.

Show answer & explanation

Correct answer: D

Answer: connect

Why: The connect system call performs an active TCP open. When connect is called on a TCP socket, the kernel sends a TCP SYN packet to the remote endpoint to start the three-way handshake.

  • socket: creates a local endpoint (socket descriptor); it does not transmit packets.

  • bind: assigns a local IP address and port to a socket; it does not initiate a TCP connection.

  • listen: places a socket into passive mode so it can accept incoming connections; it does not send SYN packets.

  • connect: performs an active open and causes the kernel to send a TCP SYN to initiate the three-way handshake.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…