Home | History | Annotate | Download | only in ip

Lines Matching refs:fp

282 	FILE *fp = (FILE*)arg;
331 fprintf(fp, "Deleted ");
333 fprintf(fp, "%s ", rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1)));
337 fprintf(fp, "%s/%u ", rt_addr_n2a(r->rtm_family,
344 fprintf(fp, "%s ", format_host(r->rtm_family,
351 fprintf(fp, "0/%d ", r->rtm_dst_len);
353 fprintf(fp, "default ");
357 fprintf(fp, "from %s/%u ", rt_addr_n2a(r->rtm_family,
364 fprintf(fp, "from %s ", format_host(r->rtm_family,
371 fprintf(fp, "from 0/%u ", r->rtm_src_len);
375 fprintf(fp, "tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1)));
379 fprintf(fp, "via %s ",
386 fprintf(fp, "dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
390 fprintf(fp, " table %s ", rtnl_rttable_n2a(table, b1, sizeof(b1)));
392 fprintf(fp, " proto %s ", rtnl_rtprot_n2a(r->rtm_protocol, b1, sizeof(b1)));
394 fprintf(fp, " scope %s ", rtnl_rtscope_n2a(r->rtm_scope, b1, sizeof(b1)));
400 fprintf(fp, " src %s ",
407 fprintf(fp, " metric %u ", rta_getattr_u32(tb[RTA_PRIORITY]));
409 fprintf(fp, "dead ");
411 fprintf(fp, "onlink ");
413 fprintf(fp, "pervasive ");
415 fprintf(fp, "notify ");
420 fprintf(fp, " mark 0x%x", mark);
422 fprintf(fp, " mark %u", mark);
427 fprintf(fp, " uid %u ", rta_getattr_u32(tb[RTA_UID]));
433 fprintf(fp, "realm%s ", from ? "s" : "");
435 fprintf(fp, "%s/",
438 fprintf(fp, "%s ",
445 fprintf(fp, "%s cache ", _SL_);
449 fprintf(fp, "%s" flname "%s", first ? "<" : "", flags ? "," : "> "); \
467 fprintf(fp, "%s%x> ", first ? "<" : "", flags);
473 fprintf(fp, " expires %dsec", ci->rta_expires/hz);
475 fprintf(fp, " error %d", ci->rta_error);
478 fprintf(fp, " users %d", ci->rta_clntref);
480 fprintf(fp, " used %d", ci->rta_used);
482 fprintf(fp, " age %dsec", ci->rta_lastuse/hz);
485 fprintf(fp, " ipid 0x%04x", ci->rta_id);
487 fprintf(fp, " ts 0x%x tsage %dsec",
498 fprintf(fp, "%s cache ", _SL_);
500 fprintf(fp, " expires %dsec", ci->rta_expires/hz);
502 fprintf(fp, " error %d", ci->rta_error);
505 fprintf(fp, " users %d", ci->rta_clntref);
507 fprintf(fp, " used %d", ci->rta_used);
509 fprintf(fp, " age %dsec", ci->rta_lastuse/hz);
513 fprintf(fp, " error %d", ci->rta_error);
533 fprintf(fp, " %s", mx_names[i]);
535 fprintf(fp, " metric %d", i);
537 fprintf(fp, " lock");
546 fprintf(fp, " %u", val);
558 fprintf(fp, " %gs", val/1e3);
560 fprintf(fp, " %ums", val);
565 fprintf(fp, " iif %s", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_IIF])));
580 fprintf(fp, " Oifs:");
582 fprintf(fp, " ");
584 fprintf(fp, "%s\tnexthop", _SL_);
588 fprintf(fp, " via %s ",
598 fprintf(fp, " realm%s ", from ? "s" : "");
600 fprintf(fp, "%s/",
603 fprintf(fp, "%s",
608 fprintf(fp, " %s", ll_index_to_name(nh->rtnh_ifindex));
610 fprintf(fp, "(ttl>%d)", nh->rtnh_hops);
612 fprintf(fp, " dev %s", ll_index_to_name(nh->rtnh_ifindex));
613 fprintf(fp, " weight %d", nh->rtnh_hops+1);
616 fprintf(fp, " dead");
618 fprintf(fp, " onlink");
620 fprintf(fp, " pervasive");
625 fprintf(fp, "\n");
626 fflush(fp);