Lines Matching refs:ofile

2804 save_lifetime(struct sadb_lifetime *lifetime, FILE *ofile)
2820 if (putc('\t', ofile) == EOF)
2823 if (lifetime->sadb_lifetime_allocations != 0 && fprintf(ofile,
2827 if (lifetime->sadb_lifetime_bytes != 0 && fprintf(ofile,
2831 if (lifetime->sadb_lifetime_addtime != 0 && fprintf(ofile,
2836 if (lifetime->sadb_lifetime_usetime != 0 && fprintf(ofile,
2848 save_address(struct sadb_address *addr, FILE *ofile)
2889 if (fprintf(ofile, " %s ", prefix) < 0)
2901 if (fprintf(ofile, "%s", printable_addr) < 0)
2906 if (fprintf(ofile, "/%d", addr->sadb_address_prefixlen) < 0)
2915 (void) fprintf(ofile, " %s %d", pprefix, ntohs(sin->sin_port));
2925 save_key(struct sadb_key *key, FILE *ofile)
2929 if (putc('\t', ofile) == EOF)
2934 if (fprintf(ofile, "%skey ", prefix) < 0)
2938 key->sadb_key_reserved, ofile, B_FALSE) == -1)
2948 save_ident(struct sadb_ident *ident, FILE *ofile)
2952 if (putc('\t', ofile) == EOF)
2958 if (fprintf(ofile, "%sidtype %s ", prefix,
2964 if (fprintf(ofile, dgettext(TEXT_DOMAIN,
2968 if (fprintf(ofile, "%s", (char *)(ident + 1)) < 0)
2976 save_sens(struct sadb_sens *sens, FILE *ofile)
2982 if (putc('\t', ofile) == EOF)
2995 if (fprintf(ofile, "%s %s ", prefix, hlabel) < 0) {
3012 save_assoc(uint64_t *buffer, FILE *ofile)
3023 terrno = errno; (void) fclose(ofile); errno = terrno; \
3026 #define savenl() if (fputs(" \\\n", ofile) == EOF) \
3029 if (fputs("# begin assoc\n", ofile) == EOF)
3032 if (fprintf(ofile, "add %s ", rparsesatype(samsg->sadb_msg_satype)) < 0)
3046 if (fprintf(ofile, "# WARNING: SA was dying "
3053 if (fprintf(ofile, " spi 0x%x ",
3060 if (fprintf(ofile, "encr_alg %s ",
3069 if (fprintf(ofile, "auth_alg %s ",
3077 if (fprintf(ofile, "replay %d ",
3085 if (fprintf(ofile, "encap udp") < 0) {
3097 ofile)) {
3106 (void) fprintf(ofile, " iproto %d",
3116 (void) fprintf(ofile, " proto %d",
3125 if (!save_address(addr, ofile)) {
3133 if (!save_key((struct sadb_key *)ext, ofile)) {
3141 if (!save_ident((struct sadb_ident *)ext, ofile)) {
3154 if (fprintf(ofile, "replay_value %" PRIu64 "",
3166 if (!save_sens((struct sadb_sens *)ext, ofile)) {
3179 if (fputs(dgettext(TEXT_DOMAIN, "\n# end assoc\n\n"), ofile) == EOF) {