Home | History | Annotate | Download | only in ip

Lines Matching defs:fp

295 static void print_rtax_features(FILE *fp, unsigned int features)
300 fprintf(fp, " ecn");
305 fprintf(fp, " 0x%x", of);
310 FILE *fp = (FILE*)arg;
359 fprintf(fp, "Deleted ");
361 fprintf(fp, "%s ", rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1)));
365 fprintf(fp, "%s/%u ", rt_addr_n2a(r->rtm_family,
372 fprintf(fp, "%s ", format_host(r->rtm_family,
379 fprintf(fp, "0/%d ", r->rtm_dst_len);
381 fprintf(fp, "default ");
385 fprintf(fp, "from %s/%u ", rt_addr_n2a(r->rtm_family,
392 fprintf(fp, "from %s ", format_host(r->rtm_family,
399 fprintf(fp, "from 0/%u ", r->rtm_src_len);
402 fprintf(fp, "as to %s ", format_host(r->rtm_family,
410 lwt_print_encap(fp, tb[RTA_ENCAP_TYPE], tb[RTA_ENCAP]);
414 fprintf(fp, "tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1)));
418 fprintf(fp, "via %s ",
427 fprintf(fp, "via %s %s ",
433 fprintf(fp, "dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
436 fprintf(fp, " table %s ", rtnl_rttable_n2a(table, b1, sizeof(b1)));
439 fprintf(fp, " proto %s ", rtnl_rtprot_n2a(r->rtm_protocol, b1, sizeof(b1)));
441 fprintf(fp, " scope %s ", rtnl_rtscope_n2a(r->rtm_scope, b1, sizeof(b1)));
447 fprintf(fp, " src %s ",
454 fprintf(fp, " metric %u ", rta_getattr_u32(tb[RTA_PRIORITY]));
456 fprintf(fp, "dead ");
458 fprintf(fp, "onlink ");
460 fprintf(fp, "pervasive ");
462 fprintf(fp, "offload ");
464 fprintf(fp, "notify ");
466 fprintf(fp, "linkdown ");
471 fprintf(fp, " mark 0x%x", mark);
473 fprintf(fp, " mark %u", mark);
478 fprintf(fp, " uid %u ", rta_getattr_u32(tb[RTA_UID]));
484 fprintf(fp, "realm%s ", from ? "s" : "");
486 fprintf(fp, "%s/",
489 fprintf(fp, "%s ",
496 fprintf(fp, "%s cache ", _SL_);
500 fprintf(fp, "%s" flname "%s", first ? "<" : "", flags ? "," : "> "); \
518 fprintf(fp, "%s%x> ", first ? "<" : "", flags);
524 fprintf(fp, " expires %dsec", ci->rta_expires/hz);
526 fprintf(fp, " error %d", ci->rta_error);
529 fprintf(fp, " users %d", ci->rta_clntref);
531 fprintf(fp, " used %d", ci->rta_used);
533 fprintf(fp, " age %dsec", ci->rta_lastuse/hz);
536 fprintf(fp, " ipid 0x%04x", ci->rta_id);
538 fprintf(fp, " ts 0x%x tsage %dsec",
549 fprintf(fp, "%s cache ", _SL_);
551 fprintf(fp, " expires %dsec", ci->rta_expires/hz);
553 fprintf(fp, " error %d", ci->rta_error);
556 fprintf(fp, " users %d", ci->rta_clntref);
558 fprintf(fp, " used %d", ci->rta_used);
560 fprintf(fp, " age %dsec", ci->rta_lastuse/hz);
564 fprintf(fp, " error %d", ci->rta_error);
590 fprintf(fp, " %s", mx_names[i]);
592 fprintf(fp, " metric %d", i);
595 fprintf(fp, " lock");
599 print_rtax_features(fp, val);
602 fprintf(fp, " %u", val);
614 fprintf(fp, " %gs", val/1e3);
616 fprintf(fp, " %ums", val);
619 fprintf(fp, " %s", rta_getattr_str(mxrta[i]));
625 fprintf(fp, " iif %s", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_IIF])));
640 fprintf(fp, " Oifs:");
642 fprintf(fp, " ");
644 fprintf(fp, "%s\tnexthop", _SL_);
649 lwt_print_encap(fp,
654 fprintf(fp, " via %s ",
663 fprintf(fp, "via %s %s ",
672 fprintf(fp, " realm%s ", from ? "s" : "");
674 fprintf(fp, "%s/",
677 fprintf(fp, "%s",
682 fprintf(fp, " %s", ll_index_to_name(nh->rtnh_ifindex));
684 fprintf(fp, "(ttl>%d)", nh->rtnh_hops);
686 fprintf(fp, " dev %s", ll_index_to_name(nh->rtnh_ifindex));
687 fprintf(fp, " weight %d", nh->rtnh_hops+1);
690 fprintf(fp, " dead");
692 fprintf(fp, " onlink");
694 fprintf(fp, " pervasive");
696 fprintf(fp, " linkdown");
703 fprintf(fp, " pref ");
707 fprintf(fp, "low");
710 fprintf(fp, "medium");
713 fprintf(fp, "high");
716 fprintf(fp, "%u", pref);
719 fprintf(fp, "\n");
720 fflush(fp);