summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-04-07bumping version to 0.2.1HEADv0.2.1masterJiri Kastner2-2/+5
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
2016-01-27inet_diag.c: Silence gcc warning about different types in conditional exprArnaldo Carvalho de Melo1-1/+1
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>
2015-07-08copy paste fixesJiri Kastner1-1/+0
Signed-off-by: Jiri Kastner <jkastner@redhat.com> Tested-by: Jiri Kastner <jkastner@redhat.com> Signed-off-by: Joakim Hernberg <jhernberg@alchemy.lu>
2015-05-17release 0.2Jiri Kastner4-4/+7
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
2015-05-17inet_diag.c: allow usage of old request typeJames Hulka1-20/+46
Signed-off-by: James Hulka <james.hulka@gmail.com> Signed-off-by: Jiri Kastner <jkastner@redhat.com>
2015-05-17inet_diag.c: added listening states constantJames Hulka1-426/+420
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>
2015-05-17inet_diag.c: cleanup memory leaks and reformatJames Hulka2-900/+810
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>
2015-05-17inet_diag.c: using req_v2 and specifying protocol type in headerJames Hulka1-68/+56
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>
2015-05-17inet_diag.c: added process info parsing from socketstat (Alexey Kuznetsov, ↵James Hulka1-55/+65
<kuznet@ms2.inr.ac.ru>) Signed-off-by: James Hulka <james.hulka@gmail.com> Signed-off-by: Jiri Kastner <jkastner@redhat.com>
2015-05-17inet_diag.c: added filter building code from socketstat (Alexey Kuznetsov, ↵James Hulka1-311/+289
<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>
2015-05-17inet_diag.c: do not free bytecode if not usedJames Hulka1-5/+9
Signed-off-by: James Hulka <james.hulka@gmail.com> Signed-off-by: Jiri Kastner <jkastner@redhat.com>
2015-05-17inet_diag.c: added filter building code from socketstat (Alexey Kuznetsov, ↵James Hulka2-20/+600
<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>
2014-10-10release 0.1v0.1Jiri Kastner2-3/+3
Signed-off-by: Jiri Kastner <jkastner@redhat.com>
2009-05-28inet_diag: Older kernels don't have NETLINK_INET_DIAGArnaldo Carvalho de Melo1-0/+4
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-28inet_diag: Older kernels don't include linux/types.h in netlink.hArnaldo Carvalho de Melo1-0/+1
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-28inet_diag_copy.h: Remove bitwise notation, not avail in older kernelsArnaldo Carvalho de Melo2-6/+6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-13pss: Allow specifying protocol type (-t, -d, etc)Arnaldo Carvalho de Melo1-15/+39
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>
2009-05-13inet_diag: Allow passing the sock type (DCCP, TCP)Arnaldo Carvalho de Melo1-18/+7
Defaulting to TCP. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-13pss: Implement family filteringArnaldo Carvalho de Melo1-13/+19
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-12pss: Implement --processesArnaldo Carvalho de Melo1-10/+75
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-11pss: Implement -e/--extendArnaldo Carvalho de Melo1-11/+28
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-11inet_diag: Implement inet_socket__sockArnaldo Carvalho de Melo1-0/+10
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-05-11inet_diag: ports are in network byte orderArnaldo Carvalho de Melo1-4/+10
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-30inet_diag: Add protocol info methodsArnaldo Carvalho de Melo2-7/+128
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>
2009-04-30inet_diag: Support extensionsArnaldo Carvalho de Melo2-9/+96
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>
2009-04-30inet_diag: Allow passing a states mask to inet_diat.create()Arnaldo Carvalho de Melo2-13/+23
And use it in pss to implement --listening/-l and --all/-a. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-30pss: Implement --options/-oArnaldo Carvalho de Melo1-6/+41
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-29inet_diag_socket: timer_expiration, retransmissions & uid methodsArnaldo Carvalho de Melo2-3/+27
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>
2009-04-28psk: show if timers are running and whichArnaldo Carvalho de Melo1-5/+11
At the end of the line Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-28inet_diag: Add bound_iface, family and timer methodsArnaldo Carvalho de Melo1-8/+26
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-28inet_diag: Add some macros to ease adding new methodsArnaldo Carvalho de Melo2-83/+32
Resulting code is the same as before, just source code got shorter. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2009-04-27inet_diag: Add inode() methodArnaldo Carvalho de Melo4-0/+142
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>
2009-04-27initial repositoryArnaldo Carvalho de Melo8-0/+1166
Comes with a barebones ss clone! Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>