How to read /proc/net/netstat entry from within a kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there

I would liek grab certain TCP stats from the
/proc/net/netstat and /proc/net/tcp entries from
within my kernel module, and I know there are at least
two ways to do it. 

The first way involves opening the /proc entries as
files from within the module.

The other way involves trying to find the variables
that are displayed in those proc files. I know that
the netstat /proc read_proc function is defined in
net/ipv4/proc.c but I don't know how to grab those
stats it displays directly from there.

Can someone please suggest what I should do? Am I
heading in the right direction? 

                   Thanks in advance!

                                          Ian

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux