From: Vishwas Raman <vishwas@eternal-systems.com>
To: linux-kernel@vger.kernel.org
Subject: Accessing tcp socket information from within a module
Date: Fri, 03 Oct 2003 17:02:07 -0700 [thread overview]
Message-ID: <3F7E0DFF.2030404@eternal-systems.com> (raw)
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.
next reply other threads:[~2003-10-04 0:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-04 0:02 Vishwas Raman [this message]
2003-10-04 5:51 ` Accessing tcp socket information from within a module 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F7E0DFF.2030404@eternal-systems.com \
--to=vishwas@eternal-systems.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox