The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+18 votes
2.1k views

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

  1. socket

  2. bind

  3. listen

  4. connect

asked in Computer Networks by Veteran (59.4k points) | 2.1k views
0
+1

2 Answers

+40 votes
Best answer

Answer is (D).

socket()   creates a new socket of a certain socket type, identified by an integer number, and allocates system resources to it.
bind()  is typically used on the server side, and associates a socket with a socket address structure, i.e. a specified local port number and IP address.
listen() is used on the server side, and causes a bound TCP socket to enter listening state.
connect() is used on the client side, and assigns a free local port number to a socket. In case of a TCP socket, it causes an attempt to establish a new TCP connection.

When connect() is called by client, following three way handshake happens to establish the connection in TCP.
1) The client requests a connection by sending a SYN (synchronize) message to the server.
2) The server acknowledges this request by sending SYN-ACK back to the client.
3) The client responds with an ACK, and the connection is established.

answered by Boss (14.8k points)
edited ago by
–6 votes
ans b)
answered by Active (5.2k points)
+1
It is connect !


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

36,204 questions
43,662 answers
124,117 comments
42,948 users