Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
In Fedora 23, gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC):
python-inet_diag/inet_diag.c: In function ‘inet_diag__create’:
python-inet_diag/inet_diag.c:1130:45: warning: pointer type mismatch in conditional expression
.iov_base = ( req_v2 == 1 ) ? &req2 : &req,
Since we are really dealing with two anonymous struct for different
netlink protocol versions, cast one to (void *) to mean we know what
we're doing.
Cc: James Hulka <james.hulka@gmail.com>
Cc: Jiri Kastner <jkastner@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
Tested-by: Jiri Kastner <jkastner@redhat.com>
Signed-off-by: Joakim Hernberg <jhernberg@alchemy.lu>
|
|
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
added process, pid and fd getter functions
cleanup memory leaks and reformat
memory cleanup user_ent_hash
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
memory cleanup user_ent_hash
inet_diag_copy.h: unused removed
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
retreiving full process path
return proc as struct
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
<kuznet@ms2.inr.ac.ru>)
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
<kuznet@ms2.inr.ac.ru>)
added filter options to create function
added create function documentation
diag_filter.h: new header file
added various filter condition constants
added diag_filter structure
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
<kuznet@ms2.inr.ac.ru>)
added filter options to create function
added listening states constant
added process, pid and fd getter functions
using standard inet_idag.h instead of copy
using inet_diag_req_v2
various memory leak cleanups
diag_filter.h: new header file
added various filter condition constants
added diag_filter structure
Signed-off-by: James Hulka <james.hulka@gmail.com>
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
But only the ones that we can get via inet_diag are supported now (DCCP,
TCP).
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Defaulting to TCP.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
congestion_state: get socket congestion state
windows_probes_out: get number of unanswered 0 window probes
protocol_options: get protocol specific options being used in the socket
receive_window_scale_shift: get receive window scale shift used in this socket
send_window_scale_shift: get send window scale shift used in this socket
rto: get retransmission timeout used on this socket
rtt: get round trip time calculated on this socket
rttvar: get round trip time variation calculated on this socket
ato: get socket ack timeout value
cwnd: get socket congestion window
ssthresh: get socket slow start threshold
And use most of them in pss.py.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
But just the first one, INET_DIAG_MEMINFO was implemented in this cset
and used by pss.py, next changesets will add support for the rest.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
And use it in pss to implement --listening/-l and --all/-a.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
timer_expiration: get expiration time (in ms) for running timer
retransmissions: get connection retransmissions timer
uid: get connection owner user id
And use it in psk:
$ psk firefox xchat
14562: /usr/lib64/firefox-3.0.9/firefox
State Recv-Q Send-Q Local Address:Port Peer Address:Port Owner Timer (ms) Rtm
ESTAB 0 0 192.168.1.120:7344 192.168.1.1:20480 acme off 0 0
ESTAB 0 0 192.168.1.120:10172 192.168.1.1:20480 acme off 0 0
ESTAB 0 0 192.168.1.120:10428 192.168.1.1:20480 acme off 0 0
16046: xchat
State Recv-Q Send-Q Local Address:Port Peer Address:Port Owner Timer (ms) Rtm
ESTAB 0 0 192.168.1.120:25546 195.92.253.2:57859 acme keepalive 6360395 0
ESTAB 0 0 10.11.12.210:32721 10.10.36.184:2842 acme keepalive 6439886 0
ESTAB 0 0 192.168.1.120:41655 154.35.200.44:2842 acme keepalive 6360715 0
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
At the end of the line
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Resulting code is the same as before, just source code got shorter.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
To test it also introduce the psk utility:
$ psk pidgin firefox
15558: pidgin
ESTAB 0 0 192.168.1.120:60373 209.85.163.125:5222
ESTAB 0 0 192.168.1.120:35224 207.46.124.219:1863
15877: /usr/lib64/firefox-3.0.8/firefox
ESTAB 0 0 192.168.1.120:48280 192.168.1.1:80
ESTAB 0 0 192.168.1.120:48363 192.168.1.1:80
ESTAB 0 0 192.168.1.120:48217 192.168.1.1:80
$
It gets a snapshot of /proc/pids using procfs.pidstats, and creates a
dictionary of inet_diag.inet_sock objects keyed by inode, then traverses the
list of processes looking for /proc/PID/fd/socket:[] symlinks, correlating
processes to sockets.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
Comes with a barebones ss clone!
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|