1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

smaller tcp_connection_t

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@400 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2005-11-11 22:50:16 +00:00
parent 004d3874cd
commit 9a5602ded8
2 changed files with 3 additions and 5 deletions

View File

@ -763,7 +763,7 @@ void update_tcp_port_monitor_collection(
FILE *fp;
char buf[256];
tcp_connection_t conn;
unsigned long state;
unsigned long inode,uid,state;
if ( !p_collection )
return;
@ -788,11 +788,11 @@ void update_tcp_port_monitor_collection(
if ( sscanf (buf, "%*d: %lx:%lx %lx:%lx %lx %*x:%*x %*x:%*x %*x %lu %*d %lu",
(unsigned long *)&conn.local_addr, (unsigned long *)&conn.local_port,
(unsigned long *)&conn.remote_addr, (unsigned long *)&conn.remote_port,
(unsigned long *)&state, (unsigned long *)&conn.uid, (unsigned long *)&conn.inode) != 7 )
(unsigned long *)&state, (unsigned long *)&uid, (unsigned long *)&inode) != 7 )
fprintf( stderr, "/proc/net/tcp: bad file format\n" );
if ((conn.inode == 0) || (state != TCP_ESTABLISHED)) continue;
if ((inode == 0) || (state != TCP_ESTABLISHED)) continue;
/* show the connection to each port monitor. */
for_each_tcp_port_monitor_in_collection(

View File

@ -93,8 +93,6 @@ typedef struct _tcp_connection_t {
in_port_t local_port;
in_addr_t remote_addr;
in_port_t remote_port;
unsigned int uid;
unsigned int inode;
int age;
} tcp_connection_t;