Home | History | Annotate | Download | only in ip

Lines Matching refs:fp

281 			FILE *fp, const char *prefix, const char *title)
286 fputs(title, fp);
289 fprintf(fp, "src %s ", rt_addr_n2a(family, sizeof(*saddr),
292 fprintf(fp, "dst %s", rt_addr_n2a(family, sizeof(id->daddr),
294 fprintf(fp, "%s", _SL_);
297 fputs(prefix, fp);
298 fprintf(fp, "\t");
300 fprintf(fp, "proto %s ", strxf_xfrmproto(id->proto));
304 fprintf(fp, "spi 0x%08x", spi);
306 fprintf(fp, "(%u)", spi);
307 fprintf(fp, " ");
310 fprintf(fp, "reqid %u", reqid);
312 fprintf(fp, "(0x%08x)", reqid);
313 fprintf(fp, " ");
315 fprintf(fp, "mode ");
318 fprintf(fp, "transport");
321 fprintf(fp, "tunnel");
324 fprintf(fp, "ro");
327 fprintf(fp, "in_trigger");
330 fprintf(fp, "beet");
333 fprintf(fp, "%u", mode);
336 fprintf(fp, "%s", _SL_);
350 void xfrm_stats_print(struct xfrm_stats *s, FILE *fp, const char *prefix)
353 fputs(prefix, fp);
354 fprintf(fp, "stats:%s", _SL_);
357 fputs(prefix, fp);
358 fprintf(fp, " replay-window %u replay %u failed %u%s",
386 FILE *fp, const char *prefix)
390 fputs(prefix, fp);
391 fprintf(fp, "lifetime config:%s",_SL_);
394 fputs(prefix, fp);
395 fprintf(fp, " limit: soft %s(bytes),",
397 fprintf(fp, " hard %s(bytes)%s",
401 fputs(prefix, fp);
402 fprintf(fp, " limit: soft %s(packets),",
404 fprintf(fp, " hard %s(packets)%s",
408 fputs(prefix, fp);
409 fprintf(fp, " expire add: soft %llu(sec), hard %llu(sec)%s",
415 fputs(prefix, fp);
416 fprintf(fp, " expire use: soft %llu(sec), hard %llu(sec)%s",
423 fputs(prefix, fp);
424 fprintf(fp, "lifetime current:%s", _SL_);
427 fputs(prefix, fp);
428 fprintf(fp, " %llu(bytes), %llu(packets)%s",
434 fputs(prefix, fp);
435 fprintf(fp, " add %s ", strxf_time(cur->add_time));
436 fprintf(fp, "use %s%s", strxf_time(cur->use_time), _SL_);
441 FILE *fp, const char *prefix)
453 fputs(prefix, fp);
456 fprintf(fp, "src %s/%u ", rt_addr_n2a(f, sizeof(sel->saddr),
461 fprintf(fp, "dst %s/%u ", rt_addr_n2a(f, sizeof(sel->daddr),
466 fprintf(fp, "proto %s ", strxf_proto(sel->proto));
474 fprintf(fp, "sport %u ", ntohs(sel->sport));
476 fprintf(fp, "dport %u ", ntohs(sel->dport));
482 fprintf(fp, "type %u ", ntohs(sel->sport));
484 fprintf(fp, "code %u ", ntohs(sel->dport));
488 fprintf(fp, "type %u ", ntohs(sel->sport));
491 fprintf(fp, "(dport) 0x%.4x ", sel->dport);
497 fprintf(fp, "dev %s ", ll_index_to_name(sel->ifindex));
500 fprintf(fp, "uid %u", sel->user);
502 fprintf(fp, "%s", _SL_);
506 FILE *fp, const char *prefix, int newline)
512 fputs(prefix, fp);
514 fprintf(fp, "%s ", strxf_algotype(type));
517 fprintf(fp, "(ERROR truncated)");
522 fprintf(fp, "%s ", algo->alg_name);
526 fprintf(fp, "(ERROR truncated)");
530 fprintf(fp, "0x");
532 fprintf(fp, "%.2x", (unsigned char)algo->alg_key[i]);
535 fprintf(fp, " (%d bits)", algo->alg_key_len);
539 fprintf(fp, "%s", _SL_);
543 FILE *fp, const char *prefix)
545 return __xfrm_algo_print(algo, type, len, fp, prefix, 1);
549 FILE *fp, const char *prefix)
560 __xfrm_algo_print(&base.algo, XFRMA_ALG_AEAD, len, fp, prefix, 0);
562 fprintf(fp, " %d", algo->alg_icv_len);
564 fprintf(fp, "%s", _SL_);
568 __u16 family, FILE *fp, const char *prefix)
575 fputs(prefix, fp);
576 fprintf(fp, "(ERROR \"tmpl\" truncated)");
577 fprintf(fp, "%s", _SL_);
585 fputs(prefix, fp);
588 tmpl->reqid, tmpl->family, 0, fp, prefix, "tmpl ");
592 fputs(prefix, fp);
593 fprintf(fp, "\t");
597 fprintf(fp, "level required ");
600 fprintf(fp, "level use ");
603 fprintf(fp, "level %u ", tmpl->optional);
608 fprintf(fp, "share %s ", strxf_share(tmpl->share));
610 fprintf(fp, "%s", _SL_);
615 fputs(prefix, fp);
616 fprintf(fp, "\t");
617 fprintf(fp, "%s-mask %s ",
620 fprintf(fp, "%s-mask %s ",
623 fprintf(fp, "%s-mask %s",
627 fprintf(fp, "%s", _SL_);
633 FILE *fp, const char *prefix)
638 XFRMA_ALG_AUTH, RTA_PAYLOAD(rta), fp, prefix);
644 RTA_PAYLOAD(rta), fp, prefix);
650 XFRMA_ALG_CRYPT, RTA_PAYLOAD(rta), fp, prefix);
656 XFRMA_ALG_COMP, RTA_PAYLOAD(rta), fp, prefix);
664 fputs(prefix, fp);
665 fprintf(fp, "encap ");
668 fprintf(fp, "(ERROR truncated)");
669 fprintf(fp, "%s", _SL_);
674 fprintf(fp, "type ");
677 fprintf(fp, "espinudp-nonike ");
680 fprintf(fp, "espinudp ");
683 fprintf(fp, "%u ", e->encap_type);
686 fprintf(fp, "sport %u ", ntohs(e->encap_sport));
687 fprintf(fp, "dport %u ", ntohs(e->encap_dport));
690 fprintf(fp, "addr %s",
693 fprintf(fp, "%s", _SL_);
699 RTA_PAYLOAD(rta), family, fp, prefix);
707 fputs(prefix, fp);
708 fprintf(fp, "coa ");
713 fprintf(fp, "(ERROR truncated)");
714 fprintf(fp, "%s", _SL_);
719 fprintf(fp, "%s",
722 fprintf(fp, "%s", _SL_);
729 fputs(prefix, fp);
730 fprintf(fp, "lastused ");
733 fprintf(fp, "(ERROR truncated)");
734 fprintf(fp, "%s", _SL_);
740 fprintf(fp, "%s", strxf_time(lastused));
741 fprintf(fp, "%s", _SL_);
755 struct rtattr *tb[], FILE *fp, const char *prefix,
764 xsinfo->reqid, xsinfo->family, force_spi, fp,
771 fputs(buf, fp);
772 fprintf(fp, "replay-window %u ", xsinfo->replay_window);
774 fprintf(fp, "seq 0x%08u ", xsinfo->seq);
778 fprintf(fp, "flag ");
779 XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_NOECN, "noecn");
780 XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_DECAP_DSCP, "decap-dscp");
781 XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_NOPMTUDISC, "nopmtudisc");
782 XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_WILDRECV, "wildrecv");
784 fprintf(fp, "%x", flags);
787 fprintf(fp, " (0x%s)", strxf_mask8(xsinfo->flags));
788 fprintf(fp, "%s", _SL_);
790 xfrm_xfrma_print(tb, xsinfo->family, fp, buf);
798 xfrm_selector_print(&xsinfo->sel, xsinfo->family, fp, sbuf);
802 xfrm_lifetime_print(&xsinfo->lft, &xsinfo->curlft, fp, buf);
803 xfrm_stats_print(&xsinfo->stats, fp, buf);
808 struct rtattr *tb[], FILE *fp, const char *prefix,
815 xfrm_selector_print(&xpinfo->sel, preferred_family, fp, title);
821 fputs(buf, fp);
822 fprintf(fp, "dir ");
825 fprintf(fp, "in");
828 fprintf(fp, "out");
831 fprintf(fp, "fwd");
834 fprintf(fp, "%u", xpinfo->dir);
837 fprintf(fp, " ");
842 fprintf(fp, "action allow ");
845 fprintf(fp, "action block ");
848 fprintf(fp, "action %u ", xpinfo->action);
853 fprintf(fp, "index %u ", xpinfo->index);
854 fprintf(fp, "priority %u ", xpinfo->priority);
859 fprintf(fp, "ptype ");
862 fprintf(fp, "(ERROR truncated)");
865 fprintf(fp, "%s ", strxf_ptype(upt->type));
869 fprintf(fp, "share %s ", strxf_share(xpinfo->share));
874 fprintf(fp, "flag ");
875 XFRM_FLAG_PRINT(fp, flags, XFRM_POLICY_LOCALOK, "localok");
877 fprintf(fp, "%x", flags);
880 fprintf(fp, " (0x%s)", strxf_mask8(xpinfo->flags));
881 fprintf(fp, "%s", _SL_);
884 xfrm_lifetime_print(&xpinfo->lft, &xpinfo->curlft, fp, buf);
886 xfrm_xfrma_print(tb, xpinfo->sel.family, fp, buf);