What system call will tell me the state of a socket's tcp connection?

dave@bfnet.com
17 Jun 1999 13:47:47 -0700


I have a socket's file descriptor:

fd = accept (fd, sa, salenptr);

and I want to know about its TCP state, as in the netstat (or cat
/proc/net/tcp) output:

Proto Recv-Q Send-Q Local Address Foreign Address State User Inode Timer
tcp 15876 0 x.y.com:nntp z.x.com:63700 CLOSE_WAIT root 2754272 off (0.00/0/0)

What system call do I use on the socket's file descriptor "fd" to
discover the following:

1. State
2. Inode
3. Timer

etc?

Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu