Home | History | Annotate | Download | only in tc

Lines Matching full:len

97 int print_tc_classid(char *buf, int len, __u32 h)
102 snprintf(buf, len, "none");
104 snprintf(buf, len, ":%x", TC_H_MIN(h));
106 snprintf(buf, len, "%x:", TC_H_MAJ(h)>>16);
108 snprintf(buf, len, "%x:%x", TC_H_MAJ(h)>>16, TC_H_MIN(h));
199 void print_rate(char *buf, int len, __u32 rate)
206 snprintf(buf, len, "%.0fMibit", tmp/1024.0*1024.0);
208 snprintf(buf, len, "%.0fKibit", tmp/1024);
210 snprintf(buf, len, "%.0fbit", tmp);
213 snprintf(buf, len, "%.0fMbit", tmp/1000000.0);
215 snprintf(buf, len, "%.0fKbit", tmp/1000.0);
217 snprintf(buf, len, "%.0fbit", tmp);
255 void print_time(char *buf, int len, __u32 time)
260 snprintf(buf, len, "%.1fs", tmp/TIME_UNITS_PER_SEC);
262 snprintf(buf, len, "%.1fms", tmp/(TIME_UNITS_PER_SEC/1000));
264 snprintf(buf, len, "%uus", time);
337 void print_size(char *buf, int len, __u32 sz)
342 snprintf(buf, len, "%gMb", rint(tmp/(1024*1024)));
344 snprintf(buf, len, "%gKb", rint(tmp/1024));
346 snprintf(buf, len, "%ub", sz);
371 void print_percent(char *buf, int len, __u32 per)
373 snprintf(buf, len, "%g%%", 100. * (double) per / max_percent_value);
382 void print_qdisc_handle(char *buf, int len, __u32 h)
384 snprintf(buf, len, "%x:", TC_H_MAJ(h)>>16);
393 char * action_n2a(int action, char *buf, int len)
412 snprintf(buf, len, "%d", action);
459 void print_linklayer(char *buf, int len, unsigned linklayer)
463 snprintf(buf, len, "%s", "unspec");
466 snprintf(buf, len, "%s", "ethernet");
469 snprintf(buf, len, "%s", "atm");
472 snprintf(buf, len, "%s", "unknown");