Lines Matching defs:ofile
2806 save_lifetime(struct sadb_lifetime *lifetime, FILE *ofile)
2822 if (putc('\t', ofile) == EOF)
2825 if (lifetime->sadb_lifetime_allocations != 0 && fprintf(ofile,
2829 if (lifetime->sadb_lifetime_bytes != 0 && fprintf(ofile,
2833 if (lifetime->sadb_lifetime_addtime != 0 && fprintf(ofile,
2838 if (lifetime->sadb_lifetime_usetime != 0 && fprintf(ofile,
2850 save_address(struct sadb_address *addr, FILE *ofile)
2891 if (fprintf(ofile, " %s ", prefix) < 0)
2903 if (fprintf(ofile, "%s", printable_addr) < 0)
2908 if (fprintf(ofile, "/%d", addr->sadb_address_prefixlen) < 0)
2917 (void) fprintf(ofile, " %s %d", pprefix, ntohs(sin->sin_port));
2927 save_key(struct sadb_key *key, FILE *ofile)
2931 if (putc('\t', ofile) == EOF)
2936 if (fprintf(ofile, "%skey ", prefix) < 0)
2940 key->sadb_key_reserved, ofile, B_FALSE) == -1)
2950 save_ident(struct sadb_ident *ident, FILE *ofile)
2954 if (putc('\t', ofile) == EOF)
2960 if (fprintf(ofile, "%sidtype %s ", prefix,
2966 if (fprintf(ofile, dgettext(TEXT_DOMAIN,
2970 if (fprintf(ofile, "%s", (char *)(ident + 1)) < 0)
2978 save_sens(struct sadb_sens *sens, FILE *ofile)
2984 if (putc('\t', ofile) == EOF)
2997 if (fprintf(ofile, "%s %s ", prefix, hlabel) < 0) {
3014 save_assoc(uint64_t *buffer, FILE *ofile)
3025 terrno = errno; (void) fclose(ofile); errno = terrno; \
3028 #define savenl() if (fputs(" \\\n", ofile) == EOF) \
3031 if (fputs("# begin assoc\n", ofile) == EOF)
3034 if (fprintf(ofile, "add %s ", rparsesatype(samsg->sadb_msg_satype)) < 0)
3048 if (fprintf(ofile, "# WARNING: SA was dying "
3055 if (fprintf(ofile, " spi 0x%x ",
3062 if (fprintf(ofile, "encr_alg %s ",
3071 if (fprintf(ofile, "auth_alg %s ",
3079 if (fprintf(ofile, "replay %d ",
3087 if (fprintf(ofile, "encap udp") < 0) {
3099 ofile)) {
3108 (void) fprintf(ofile, " iproto %d",
3118 (void) fprintf(ofile, " proto %d",
3127 if (!save_address(addr, ofile)) {
3135 if (!save_key((struct sadb_key *)ext, ofile)) {
3143 if (!save_ident((struct sadb_ident *)ext, ofile)) {
3156 if (fprintf(ofile, "replay_value %" PRIu64 "",
3168 if (!save_sens((struct sadb_sens *)ext, ofile)) {
3181 if (fputs(dgettext(TEXT_DOMAIN, "\n# end assoc\n\n"), ofile) == EOF) {