Update function names in /proc/net/tcp documentation
Subsystems (3)
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
Quoted 10 lines · Jean Delvare
Update function name references to match the current code.
Signed-off-by Jean Delvare <[email protected]>--- 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
Hi Rick,
Quoted 19 lines · Rick Jones
Quoted 18 lines · Jean Delvare
Update function name references to match the current code.
Signed-off-by Jean Delvare <[email protected]>--- 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
-0It 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
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.txtHi 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_diagis 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
Quoted 5 lines · Jean Delvare
Quoted 2 lines
inet_diagis the preferred interface.How does it work? Is there some documentation available? I see
net/ipv4/inet_diag.cbut 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.txtHi Herbert,
Quoted 7 lines · Herbert Xu
Quoted 5 lines · Jean Delvare
Quoted 2 lines
inet_diagis the preferred interface.How does it work? Is there some documentation available? I see
net/ipv4/inet_diag.cbut 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
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_diagsupport. Would it make sense to addtcp_diagsupport 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