Lines Matching refs:fd
507 report_spi(FILE *fd, const u_int8_t *buf, size_t sz, int spi)
519 fprintf(fd, "%s", s);
528 fprintf(fd, "SPI %d: %s\n", spi, s);
538 report_proto(FILE *fd, struct proto *proto)
547 fprintf(fd, "Transform: IPsec ESP\n");
548 fprintf(fd, "Encryption key length: %d\n", keylen);
549 fprintf(fd, "Authentication key length: %d\n", hashlen);
551 fprintf(fd, "Encryption algorithm: ");
554 fprintf(fd, "3DES\n");
558 fprintf(fd, "AES (CBC)\n");
562 fprintf(fd, "AES (CTR)\n");
566 fprintf(fd, "AES (GCM)\n");
570 fprintf(fd, "AES (GMAC)\n");
574 fprintf(fd, "Cast-128\n");
578 fprintf(fd, "Blowfish\n");
582 fprintf(fd, "unknown (%d)\n", proto->id);
585 fprintf(fd, "Authentication algorithm: ");
588 fprintf(fd, "none\n");
595 fprintf(fd, "HMAC-MD5\n");
599 fprintf(fd, "HMAC-SHA1\n");
603 fprintf(fd, "HMAC-RIPEMD-160\n");
607 fprintf(fd, "HMAC-SHA2-256\n");
611 fprintf(fd, "HMAC-SHA2-384\n");
615 fprintf(fd, "HMAC-SHA2-512\n");
621 fprintf(fd, "unknown (%d)", iproto->auth);
625 fprintf(fd, "none\n");
631 fprintf(fd, "Transform: IPsec AH\n");
632 fprintf(fd, "Encryption not used.\n");
633 fprintf(fd, "Authentication key length: %d\n", hashlen);
635 fprintf(fd, "Authentication algorithm: ");
638 fprintf(fd, "HMAC-MD5\n");
642 fprintf(fd, "HMAC-SHA1\n");
646 fprintf(fd, "HMAC-RIPEMD-160\n");
650 fprintf(fd, "HMAC-SHA2-256\n");
654 fprintf(fd, "HMAC-SHA2-384\n");
658 fprintf(fd, "HMAC-SHA2-512\n");
662 fprintf(fd, "unknown (%d)", proto->id);
667 fprintf(fd, "report_proto: invalid proto %d\n", proto->proto);
675 report_lifetimes(FILE *fd, struct sa *sa)
680 fprintf(fd, "Lifetime: %llu seconds\n", sa->seconds);
685 fprintf(fd, "<no soft timeout>\n");
687 fprintf(fd, "Soft timeout in %ld seconds\n", timeout);
693 fprintf(fd, "No hard timeout>\n");
695 fprintf(fd, "Hard timeout in %ld seconds\n", timeout);
699 fprintf(fd, "Lifetime: %llu kilobytes\n", sa->kilobytes);
706 report_phase1(FILE *fd, struct sa *sa)
709 fprintf(fd, "icookie %08x%08x rcookie %08x%08x\n",
718 report_phase2(FILE *fd, struct sa *sa)
730 report_spi(fd, proto->spi[i],
733 fprintf(fd, "SPI %d not defined.\n", i);
736 report_proto(fd, proto);
756 sa_dump_all(FILE *fd, struct sa *sa)
759 fprintf(fd, "SA name: %s", sa->name ? sa->name : "<unnamed>");
760 fprintf(fd, " (Phase %d%s)\n", sa->phase, sa->phase == 1 ?
764 fprintf(fd, "%s", sa->transport == NULL ? "<no transport>" :
766 fprintf(fd, "\n");
769 report_lifetimes(fd, sa);
771 fprintf(fd, "Flags 0x%08x\n", sa->flags);
774 report_phase1(fd, sa);
776 report_phase2(fd, sa);
779 fprintf(fd, "<unknown phase>\n");
783 fprintf(fd, "\n");
786 /* Report info of all SAs to file 'fd'. */
788 sa_report_all(FILE *fd)
795 sa_dump_all(fd, sa);