Lines Matching defs:rate
237 u_int rate, size, errors = 0;
243 if ((rate = getifspeed(pf->dev, pa->ifname)) == 0) {
245 if ((rate = getifspeed(pa->ifname)) == 0) {
251 } else if ((pa->ifbandwidth = eval_bwspec(bw, rate)) == 0)
252 pa->ifbandwidth = rate;
258 rate = pa->ifbandwidth;
259 if (rate <= 1 * 1000 * 1000)
261 else if (rate <= 10 * 1000 * 1000)
263 else if (rate <= 200 * 1000 * 1000)
1075 rate2str(double rate)
1087 for (i = 0; rate >= 1000 && i <= 3; i++)
1088 rate /= 1000;
1090 if ((int)(rate * 100) % 100)
1091 snprintf(buf, RATESTR_MAX, "%.2f%cb", rate, unit[i]);
1093 snprintf(buf, RATESTR_MAX, "%d%cb", (int)rate, unit[i]);