Listing and identifying sockets. the ss command may be used to display the listening connections and the established connections on a machine. Suppose you see the sample output shown below. Netid State Local Addr:Port Peer Addr:Port Users udp UNCONN 0.0.0.0:8003 0.0.0.0:* (pid=29604,fd=3) tcp LISTEN 0.0.0.0:8003 0.0.0.0:* (pid=28832,fd=3) Netid State Local Addr:Port Peer Addr:Port Users tcp ESTAB 127.0.0.1:8003 127.0.0.1:47468 (pid=28832,fd=4) tcp ESTAB 127.0.0.1:47468 127.0.0.1:8003 (pid=29910,fd=3) The output above lists all the connections on the machine where the ss command is run. Helpfully, the last column of the output, entitled Users, also shows the process ID (pid) of the application process associated with the socket and the number of the file descriptor (fd) associated with the socket. (a) Suppose a TCP packet enters the machine, destined to TCP port 8003 corresponding to an established connection. Can you identify the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to? (b) Suppose a TCP packet enters the machine, destined to TCP port 8003, corresponding to a fresh connection just being initiated by a client through a connect() call. Can you identify the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?   Suppose a TCP packet enters the machine, destined to TCP port 47468, corresponding to a fresh connection being made by a client through the connect() call. Will this client’s  connect() succeed? Why or why not?   Suppose a UDP packet enters the machine, destined to UDP port 8003. Can you identify the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Listing and identifying sockets. the ss command

may be used to display the listening connections and the established connections on a machine.

Suppose you see the sample output shown below.

Netid State Local Addr:Port Peer Addr:Port Users

udp UNCONN 0.0.0.0:8003 0.0.0.0:* (pid=29604,fd=3)

tcp LISTEN 0.0.0.0:8003 0.0.0.0:* (pid=28832,fd=3)

Netid State Local Addr:Port Peer Addr:Port Users

tcp ESTAB 127.0.0.1:8003 127.0.0.1:47468 (pid=28832,fd=4)

tcp ESTAB 127.0.0.1:47468 127.0.0.1:8003 (pid=29910,fd=3)

The output above lists all the connections on the machine where the ss command is run. Helpfully,

the last column of the output, entitled Users, also shows the process ID (pid) of the application

process associated with the socket and the number of the file descriptor (fd) associated with

the socket.

(a) Suppose a TCP packet enters the machine, destined to TCP port 8003 corresponding to

an established connection. Can you identify the pid and socket fd, if any, corresponding to the

socket where this packet is demuxed to?

(b) Suppose a TCP packet enters the machine, destined to TCP port 8003, corresponding to a

fresh connection just being initiated by a client through a connect() call. Can you identify the

pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?

 

Suppose a TCP packet enters the machine, destined to TCP port 47468, corresponding

to a fresh connection being made by a client through the connect() call. Will this client’s 

connect() succeed? Why or why not?

 

Suppose a UDP packet enters the machine, destined to UDP port 8003. Can you identify

the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Creating a local network
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education