diff options
author | harti <harti@FreeBSD.org> | 2006-10-30 16:56:38 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2006-10-30 16:56:38 +0000 |
commit | e52b46159838d2cde3744331fbf4b3836663599a (patch) | |
tree | d19b72481c942193ee8418b96333dac67a4be358 /contrib/bsnmp/snmp_mibII | |
parent | f467eea07a293b5abac9d5967a6d61c11194fa8d (diff) | |
download | FreeBSD-src-e52b46159838d2cde3744331fbf4b3836663599a.zip FreeBSD-src-e52b46159838d2cde3744331fbf4b3836663599a.tar.gz |
Vendor patch: improve readability by using the IF_Mbps macro.
Submitted by: glebius
Diffstat (limited to 'contrib/bsnmp/snmp_mibII')
-rw-r--r-- | contrib/bsnmp/snmp_mibII/mibII.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/bsnmp/snmp_mibII/mibII.c b/contrib/bsnmp/snmp_mibII/mibII.c index 1e0871b..96bd366 100644 --- a/contrib/bsnmp/snmp_mibII/mibII.c +++ b/contrib/bsnmp/snmp_mibII/mibII.c @@ -26,12 +26,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/snmp_mibII/mibII.c,v 1.24 2006/02/14 09:04:18 brandt_h Exp $ + * $Begemot: mibII.c 516 2006-10-27 15:54:02Z brandt_h $ * * Implementation of the standard interfaces and ip MIB. */ #include "mibII.h" #include "mibII_oid.h" +#include <net/if.h> #include <net/if_types.h> @@ -376,16 +377,16 @@ mibif_reset_hc_timer(void) u_int ticks; if ((ticks = mibif_force_hc_update_interval) == 0) { - if (mibif_maxspeed <= 10000000) { + if (mibif_maxspeed <= IF_Mbps(10)) { /* at 10Mbps overflow needs 3436 seconds */ ticks = 3000 * 100; /* 50 minutes */ - } else if (mibif_maxspeed <= 100000000) { + } else if (mibif_maxspeed <= IF_Mbps(100)) { /* at 100Mbps overflow needs 343 seconds */ ticks = 300 * 100; /* 5 minutes */ - } else if (mibif_maxspeed < 650000000) { + } else if (mibif_maxspeed < IF_Mbps(622)) { /* at 622Mbps overflow needs 53 seconds */ ticks = 40 * 100; /* 40 seconds */ - } else if (mibif_maxspeed <= 1000000000) { + } else if (mibif_maxspeed <= IF_Mbps(1000)) { /* at 1Gbps overflow needs 34 seconds */ ticks = 20 * 100; /* 20 seconds */ } else { |