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);
430 fprintf(fp, "realm%s ", from ? "s" : "");
432 fprintf(fp, "%s/",
435 fprintf(fp, "%s ",
442 fprintf(fp, "%s cache ", _SL_);
446 fprintf(fp, "%s" flname "%s", first ? "<" : "", flags ? "," : "> "); \
464 fprintf(fp, "%s%x> ", first ? "<" : "", flags);
470 fprintf(fp, " expires %dsec", ci->rta_expires/hz);
472 fprintf(fp, " error %d", ci->rta_error);
475 fprintf(fp, " users %d", ci->rta_clntref);
477 fprintf(fp, " used %d", ci->rta_used);
479 fprintf(fp, " age %dsec", ci->rta_lastuse/hz);
482 fprintf(fp, " ipid 0x%04x", ci->rta_id);
484 fprintf(fp, " ts 0x%x tsage %dsec",
495 fprintf(fp, "%s cache ", _SL_);
497 fprintf(fp, " expires %dsec", ci->rta_expires/hz);
499 fprintf(fp, " error %d", ci->rta_error);
502 fprintf(fp, " users %d", ci->rta_clntref);
504 fprintf(fp, " used %d", ci->rta_used);
506 fprintf(fp, " age %dsec", ci->rta_lastuse/hz);
510 fprintf(fp, " error %d", ci->rta_error);
530 fprintf(fp, " %s", mx_names[i]);
532 fprintf(fp, " metric %d", i);
534 fprintf(fp, " lock");
543 fprintf(fp, " %u", val);
555 fprintf(fp, " %gs", val/1e3);
557 fprintf(fp, " %ums", val);
562 fprintf(fp, " iif %s", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_IIF])));
577 fprintf(fp, " Oifs:");
579 fprintf(fp, " ");
581 fprintf(fp, "%s\tnexthop", _SL_);
585 fprintf(fp, " via %s ",
595 fprintf(fp, " realm%s ", from ? "s" : "");
597 fprintf(fp, "%s/",
600 fprintf(fp, "%s",
605 fprintf(fp, " %s", ll_index_to_name(nh->rtnh_ifindex));
607 fprintf(fp, "(ttl>%d)", nh->rtnh_hops);
609 fprintf(fp, " dev %s", ll_index_to_name(nh->rtnh_ifindex));
610 fprintf(fp, " weight %d", nh->rtnh_hops+1);
613 fprintf(fp, " dead");
615 fprintf(fp, " onlink");
617 fprintf(fp, " pervasive");
622 fprintf(fp, "\n");
623 fflush(fp);