[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    [Kopete-devel] [Bug 50360] Kopete eats CPU cycles (connection status)
From:       Martijn Klingens <klingens () kde ! org>
Date:       2002-11-14 17:11:33
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=50360     




------- Additional Comments From klingens@kde.org  2002-11-14 18:11 -------
Subject: Re: [Kopete-devel]  Kopete eats CPU cycles (connection status)

On Wednesday 13 November 2002 19:45, Chris Howells wrote:
> Yes, this is a known problem (to me at least). I need to find a more
> efficient way to find the default gateway than parsing the output of
> netstat. I think this is possible via sockets, but I'll need to do some
> research there.

----
martijn@kenny:~ > /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
----

Maybe that's a bit faster?

Or, but I'm unsure how portable it is:
----
martijn@kenny:~ > cat /proc/net/route
Iface Destination Gateway  Flags RefCnt Use Metric Mask     MTU Window IRTT
eth0  0000A8C0    00000000 0001  0      0   0      00FFFFFF 40  0      0
eth0  00000000    0100A8C0 0003  0      0   0      00000000 40  0      0
----

at least it can be done natively in C++, so it should be quite fast.
_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic