All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vishwas Raman <vishwas@eternal-systems.com>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Accessing tcp socket information from within a module
Date: Sat, 04 Oct 2003 16:07:00 -0700	[thread overview]
Message-ID: <3F7F5294.1090606@eternal-systems.com> (raw)
In-Reply-To: 20031003225124.17a440c2.davem@redhat.com

David S. Miller wrote:
> On Fri, 03 Oct 2003 17:02:07 -0700
> Vishwas Raman <vishwas@eternal-systems.com> wrote:
> 
> 
>>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?
> 
> 
> You don't even need to write your kernel module, there is already
> a special netlink socket provided to userspace exactly for this
> purpose, to get info on all TCP sockets efficiently.
> 
> See net/ipv4/tcp_diag.c
> 

But what if I am interested in doing the same in kernel space and not 
user space? The module I am writing is going to sit between the tcp and 
ip layers of the networking stack. And I need to get info on all TCP 
sockets and create/modify certain data structures of my own in the 
module based on that information.



  reply	other threads:[~2003-10-04 23:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=3F7F5294.1090606@eternal-systems.com \
    --to=vishwas@eternal-systems.com \
    --cc=davem@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.