inpcb or tcpcb in Linux net souce code

This is a discussion on inpcb or tcpcb in Linux net souce code within the Linux Networking forums, part of the Linux Forums category; Hi all, I want to search all tcp connections in kernel. In BSD there are inpcb (Internet protocol control block) ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-21-2004
Soohyun Cho
 
Posts: n/a
Default inpcb or tcpcb in Linux net souce code

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


Reply With Quote
  #2 (permalink)  
Old 05-22-2004
Soohyun Cho
 
Posts: n/a
Default Re: inpcb or tcpcb in Linux net souce code

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
>
>


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:31 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0