public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Accessing tcp socket information from within a module
@ 2003-10-04  0:02 Vishwas Raman
  2003-10-04  5:51 ` David S. Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Vishwas Raman @ 2003-10-04  0:02 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I am trying to write a module in the 2.4.20 kernel, which will do pretty 
much a small subset of what netstat does from the user-space. All 
netstat does is read from /proc/net/tcp to get hold of info regarding 
TCP sockets in the system.

I want to be able to find out what are all the open tcp sockets in the 
system and the states they are in. In the TCP implementation in the 
kernel, this information lies in a set of hash tables. I tried to access 
one of these hash tables "tcp_hashinfo" from within my kernel moule. But 
this symbol is exported by netsyms.c in the kernel only if IPV6 or 
KHTTPD or is turned on, and since I have my kernel built without IPV6 or 
KHTTPD, I cannot access these hashtables.

Is there some way of accessing the information of all open tcp sockets 
in the system, other than having to turn one of IPV6 or KHTTPD on?

Thanks in advance for any help.

-Vishwas.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-05  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04  0:02 Accessing tcp socket information from within a module Vishwas Raman
2003-10-04  5:51 ` David S. Miller
2003-10-04 23:07   ` Vishwas Raman
2003-10-04 23:10     ` David S. Miller
2003-10-04 23:58       ` Onboard LAN Asus A7V8X-X (VT6102 [Rhine-II]) William Scott Lockwood III
2003-10-05  1:31         ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox