-
Mike Hibler authored
Things were simple back when all Linux called them "ethN" and there were very few pseudo-devices to worry about... Now we find the "active" experimental interfaces from the Emulab-provided /var/emulab/boot/tmcc/ifconfig info. We use the MACs there along with "findif" to identify interfaces of interest. N.B.: as it stands, this version of slothd requires the most recent change to "findif" to accept command line MAC addresses with ':'s. Also fixed a couple of bugs while in here. The "netstat" command output (used to obtain packet counts on both Linux and FreeBSD) has also changed over the years. At some point, the Linux version (at least on CentOS) removed the "Met" (metric) column from the output, throwing off the parsing of input and output packet counts. For FreeBSD, an "Idrops" column was added which throws off the output packet count. Both are now handled by noting whether the columns exist when first seeing the header, and adjusting the sscanf format accordingly. On the Linux side I have only seen this affect CentOS 7. For FreeBSD, it affects all versions back to at least FreeBSD 8!
05abd217