In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> 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?

None. You have to parse /proc/net/tcp (readlink("/proc/self/<fd>")  to find
the inode number) 


-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to