[Iftop-users] Forwarded bug reports from Debian

Markus Koschany apo at gambaru.de
Tue, 19 Nov 2013 10:42:27 +0100


--vtzGhvizbBRQ85DL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, 18. Nov 16:03 Paul Warren <pdw@ex-parrot.com> wrote:
[...]
> On 13/11/2013 11:05, Markus Koschany wrote:
> >1. iftop does not notice changes to ppp interfaces and stops refreshing
> >    its output http://bugs.debian.org/543138
>
> Does anyone know how to detect when this happens?  It's obviously
> not treated as an error by pcap_loop() when it happens.

Unfortunately no. Perhaps there are some hints in ifconfig's source
code. I could also imagine some buffer that stores the amount of
captured packages. If the amount equals zero in a given time frame, one
may assume that the device is down and a restart of iftop's capture
process necessary. This could be a special option or mode, so that
people have to choose it explicitly.


> >2. iftop: chooses eth0 as the default interface instead of the default
> >    route http://bugs.debian.org/644998
> >
> >The code could be changed in two ways:
> >   * Only consider interfaces with routes associated with them.
> >   * Prefer the interface with a default route to other ones.
>
> This is a great idea, but what's the easiest way to identify these
> interfaces programmatically?

Perhaps you could use a command like

ip route show 0.0.0.0/0

The last output argument is the device with the default route associated
to it.

An alternative might be to display all available interfaces at startup
and let the user choose the interface herself. (only a small improvement
over the -i option but this should definitely work)

Regards,

Markus

--vtzGhvizbBRQ85DL
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQJ8BAEBCgBmBQJSizKDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBQ0YzRDA4OEVGMzJFREVGNkExQTgzNUZE
OUFEMTRCOTUxM0I1MUU0AAoJENmtFLlRO1Hk38gP/RlpryVlgwje3jpHlO1+y5/i
7cF5QJFQEqVsyJW++aOcea8xkZDCVGbJ2pFbfjE0FbF6Ua17Dnv8ew4QEYty+EHH
X1IE1+SOOTEPcgaHopOHVIh8sVjqNuGfxDR3QE+Ll3hHm4Fv56sw6lRF6chSmnvF
FYh1wFcNFU17EC3loUVeQjVsui41rlzNqcAUrxTcF7p7SbLFa0uyrz50e/rkq1wr
p/rpgJr1OgPRuTRlNdKJSVo9BV1z16bdBaKreV76Z2lfUMi2MGHbmhlE3fYjd8Xd
1BYRQNMhrG0YKs+Bdqe0VY0oLPQsYXvz41E0Aa/yYZfpTVQSCSFz9B28s0D0CIPT
i8rAgmLygsp5eeq6/70P++D1VrHEJwS1wwDyIvidN0dy1r/fXgWF/kMMediEjWHG
h36PT2omj47VoMLmq844SYH4iha19HrbaQkx4QCJB3hK5W9VY492Bo01I+IR3JwL
+YDP/qR0KnFQVPpXxZL736HphoPxFnN1HKFziZtIk0k9FAPjW4bsZng2TXElvsTK
Kg2z6b3Wh/ycXigMvDI7PMtETYvUUcMot9+QTHYHOwgl8QsjsKKddRR8FXMX73HH
9Zh9+39noLUgbukhQjOPD5kUssS2TRwFB8cDt8IOmUcQMFjDKwXNye5XDqdvLAB1
WwP4VUqyh0++xMP8gTrx
=2R3r
-----END PGP SIGNATURE-----

--vtzGhvizbBRQ85DL--