lkml.org 
[lkml]   [2003]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Accessing tcp socket information from within a module
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.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.053 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site