I found it.
It is "struct sock" in include/net/sock.h.
Thanks,
Soohyun Cho wrote:
> Hi all,
>
> I want to search all tcp connections in kernel.
> In BSD there are inpcb (Internet protocol control block) and tcpcb (TCP
> control block) and the inpcb entities are connected by doubly linked lists.
> I think Linux has sock and tcp_opt which are corresponding to insub and
> tcpcb respectively.
> However I couldn't figure it out whether socks are connected by anyway.
> Are they linked by doubly linked list or some other way?
> Is there any way I can search all connections in kernel?
>
> I think netstat program is already doing this in kernel level.
> But I coundn't find netstat's source code also.
>
> Thank a lot.
>
> Soohyun Cho
>
>
|