Skip to contentSkip to conversation

Update function names in /proc/net/tcp documentation

PATCH In review Jean Delvare 3 participants 8 messages Oct 12, 2007 – Oct 16, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update function names in /proc/net/tcp documentation

Update function name references to match the current code.

---
 Documentation/networking/proc_net_tcp.txt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/networking/proc_net_tcp.txt +2 -2
@@ -1,8 +1,8 @@
 This document describes the interfaces /proc/net/tcp and /proc/net/tcp6.
 
 These /proc interfaces provide information about currently active TCP 
-connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and
-tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively.
+connections, and are implemented by tcp4_seq_show() in net/ipv4/tcp_ipv4.c
+and tcp6_seq_show() in net/ipv6/tcp_ipv6.c, respectively.
 
 It will first list all listening TCP sockets, and next list all established
 TCP connections. A typical entry of /proc/net/tcp would look like this (split 
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 10 lines · Jean Delvare

Update function name references to match the current code.

---
 Documentation/networking/proc_net_tcp.txt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Documentation/networking/proc_net_tcp.txt line 8

Quoted 10 lines
Documentation/networking/proc_net_tcp.txt +2 -2
@@ -1,8 +1,8 @@
 This document describes the interfaces /proc/net/tcp and /proc/net/tcp6.
 
 These /proc interfaces provide information about currently active TCP 
-connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and
-tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively.
+connections, and are implemented by tcp4_seq_show() in net/ipv4/tcp_ipv4.c
+and tcp6_seq_show() in net/ipv6/tcp_ipv6.c, respectively.
 
 It will first list all listening TCP sockets, and next list all established
 TCP connections. A typical entry of /proc/net/tcp would look like this (split 

/proc/net/[tcp|tcp6] are deprecated now right? Perhaps there should be something to that effect added to the txt.

rick jones

#2 lore raw

Hi Rick,

Quoted 19 lines · Rick Jones
Quoted 18 lines · Jean Delvare

Update function name references to match the current code.

---
 Documentation/networking/proc_net_tcp.txt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/networking/proc_net_tcp.txt +2 -2
@@ -1,8 +1,8 @@
 This document describes the interfaces /proc/net/tcp and /proc/net/tcp6.
 
 These /proc interfaces provide information about currently active TCP 
-connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and
-tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively.
+connections, and are implemented by tcp4_seq_show() in net/ipv4/tcp_ipv4.c
+and tcp6_seq_show() in net/ipv6/tcp_ipv6.c, respectively.
 
Quoted 5 lines

Documentation/networking/proc_net_tcp.txt line 8

Quoted 2 lines
Documentation/networking/proc_net_tcp.txt +0 -0
 It will first list all listening TCP sockets, and next list all established
 TCP connections. A typical entry of /proc/net/tcp would look like this (split 

/proc/net/[tcp|tcp6] are deprecated now right? Perhaps there should be something to that effect added to the txt.

I didn't know that, sorry. What is the new interface to access the TCP information?

Signature · 1 line
Jean Delvare
#3 lore raw
Quoted 3 lines · Jean Delvare

I didn't know that, sorry. What is the new interface to access the TCP information?

inet_diag is the preferred interface.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#4 lore raw

Hi Herbert,

Quoted 6 lines · Herbert Xu
Quoted 3 lines · Jean Delvare

I didn't know that, sorry. What is the new interface to access the TCP information?

inet_diag is the preferred interface.

How does it work? Is there some documentation available? I see net/ipv4/inet_diag.c but I have no idea how to use it.

Thanks,

Signature · 1 line
Jean Delvare
#5 lore raw
Quoted 5 lines · Jean Delvare
Quoted 2 lines

inet_diag is the preferred interface.

How does it work? Is there some documentation available? I see net/ipv4/inet_diag.c but I have no idea how to use it.

Have a look at the iproute package. It contains the ss command which provides a command-line interface to it.

Of course it's also a good example of how you can access it from C. The Debian pidentd package has also been patched to use this interface.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#6 lore raw

Hi Herbert,

Quoted 7 lines · Herbert Xu
Quoted 5 lines · Jean Delvare
Quoted 2 lines

inet_diag is the preferred interface.

How does it work? Is there some documentation available? I see net/ipv4/inet_diag.c but I have no idea how to use it.

Quoted 6 lines

Have a look at the iproute package. It contains the ss command which provides a command-line interface to it.

Of course it's also a good example of how you can access it from C. The Debian pidentd package has also been patched to use this interface.

Thanks for the information. Now I'm worried that most people use netstat and not ss, while it seems that netstat doesn't have tcp_diag support. Would it make sense to add tcp_diag support to netstat? Or should we simply invite system admins to switch from netstat to ss (maybe by adding a netstat-like formatting option)?

Not that I am skilled enough in this area to do either myself anyway (let alone the lack of time), but I'm curious what the correct approach would be.

Thanks,

Signature · 1 line
Jean Delvare
#7 lore raw
Quoted 6 lines · Jean Delvare

Thanks for the information. Now I'm worried that most people use netstat and not ss, while it seems that netstat doesn't have tcp_diag support. Would it make sense to add tcp_diag support to netstat? Or should we simply invite system admins to switch from netstat to ss (maybe by adding a netstat-like formatting option)?

Personally getting netstat to use inet_diag would seem to be easier than retraining everybody's fingers to type ss :)

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt