How to determine active/passive end of TCP connection
0
votes
1
answer
822
views
If I inspect information about established TCP connections as returned by
sock_diag(7)
(or in /proc/net/tcp
), how can I determine whether a given connection originated with the local side owning the passive , listening socket or the active, connecting one?
**UPDATE** I am interested in doing this at the level of APIs, i.e. without launching commands such as ss
or netstat
.
Asked by Drux
(567 rep)
May 24, 2020, 08:25 PM
Last activity: May 25, 2020, 06:24 AM
Last activity: May 25, 2020, 06:24 AM