Lines Matching defs:ebuf

111  * Create/Grow a buffer large enough to hold error messages. If *ebuf
118 record_error(char *ep, char *ebuf, char *fmt, ...)
134 if (ebuf != NULL)
135 length += strlen(ebuf);
152 if (ep == NULL && ebuf != NULL)
153 (void) strlcpy(err_ptr, ebuf, length);
188 handle_errors(char *ep, char *ebuf, boolean_t fatal, boolean_t done)
202 if (ebuf != NULL) {
203 free(ebuf);
214 * is called, free(ebuf) and reset command buffer.
217 if (ebuf != NULL) {
218 free(ebuf);
317 parsenum(char *num, boolean_t bail, char *ebuf)
324 FATAL(ep, ebuf, gettext("Unexpected end of command line,"
333 FATAL1(ep, ebuf, gettext(
364 parsesatype(char *type, char *ebuf)
380 tt->token = (int)parsenum(type, B_FALSE, ebuf);
382 ERROR1(ep, ebuf, gettext(
591 parsestate(char *state, char *ebuf)
607 FATAL(ep, ebuf, "Unexpected end of command line "
615 ERROR1(ep, ebuf, gettext("Unknown state type \"%s\"\n"), state);
625 parsealg(char *alg, int proto_num, char *ebuf)
632 FATAL(ep, ebuf, gettext("Unexpected end of command line, "
642 WARN1(ep, ebuf, gettext(
655 invalue = parsenum(alg, B_FALSE, ebuf);
661 ERROR1(ep, ebuf, gettext(
664 ERROR1(ep, ebuf, gettext(
690 parseidtype(char *type, char *ebuf)
698 FATAL(ep, ebuf, gettext("Unexpected end of command line, "
710 invalue = parsenum(type, B_FALSE, ebuf);
716 ERROR1(ep, ebuf, gettext("Unknown identity type \"%s\"\n"), type);
740 parseaddr(char *addr, struct hostent **hpp, boolean_t v6only, char *ebuf)
747 FATAL(ep, ebuf, gettext("Unexpected end of command line, "
795 WARN1(ep, ebuf, gettext("Unknown address %s."), addr);
822 parsekey(char *input, char *ebuf, uint_t reserved_bits)
830 FATAL(ep, ebuf, gettext("Unexpected end of command line, "
847 FATAL1(ep, ebuf, gettext(
853 ERROR2(ep, ebuf, gettext(
861 WARN2(ep, ebuf, gettext(
898 ERROR1(ep, ebuf, gettext(
1201 char *ebuf)
1315 WARN(ep, ebuf, gettext(
1388 ERROR1(ep, ebuf, gettext(
1392 FATAL(ep, ebuf, gettext(
1412 WARN1(ep, ebuf, gettext(
1470 ERROR1(ep, ebuf, gettext(
1475 FATAL(ep, ebuf, gettext(
1492 WARN1(ep, ebuf, gettext(
1514 handle_errors(ep, ebuf, B_TRUE, B_FALSE);
1583 ERROR2(ep, ebuf, gettext(
1588 ERROR2(ep, ebuf, "%s %s.\n",
1598 ERROR2(ep, ebuf, gettext(
1611 WARN1(ep, ebuf, gettext("WARNING: "
1618 handle_errors(ep, ebuf, B_TRUE, B_FALSE);
1631 * free(ebuf) even if there are no errors.
1634 handle_errors(ep, ebuf, B_TRUE, B_TRUE);
1642 doaddup(int cmd, int satype, char *argv[], char *ebuf)
1699 ERROR1(ep, ebuf, gettext(
1734 ERROR(ep, ebuf, gettext(
1742 ebuf));
1744 ERROR(ep, ebuf, gettext(
1750 ERROR(ep, ebuf, gettext(
1762 ERROR(ep, ebuf, gettext(
1774 ebuf));
1776 ERROR(ep, ebuf, gettext(
1788 ERROR(ep, ebuf, gettext(
1794 (uint8_t)parsenum(*argv, B_TRUE, ebuf);
1796 WARN(ep, ebuf, gettext(
1809 ERROR(ep, ebuf, gettext(
1815 ebuf);
1820 ERROR(ep, ebuf, gettext(
1826 IPSEC_PROTO_AH, ebuf);
1830 ERROR(ep, ebuf, gettext("Cannot specify"
1835 ERROR(ep, ebuf, gettext(
1841 IPSEC_PROTO_ESP, ebuf);
1845 ERROR(ep, ebuf, gettext(
1851 ERROR(ep, ebuf, gettext(
1864 ERROR(ep, ebuf, gettext("Can only specify "
1868 srcport = parsenum(*argv, B_TRUE, ebuf);
1873 ERROR(ep, ebuf, gettext("Can only specify "
1877 dstport = parsenum(*argv, B_TRUE, ebuf);
1883 ERROR(ep, ebuf, gettext(
1888 isrcport = parsenum(*argv, B_TRUE, ebuf);
1894 ERROR(ep, ebuf, gettext(
1899 idstport = parsenum(*argv, B_TRUE, ebuf);
1904 ERROR(ep, ebuf, gettext(
1909 natt_lport = parsenum(*argv, B_TRUE, ebuf);
1914 ERROR(ep, ebuf, gettext(
1919 natt_rport = parsenum(*argv, B_TRUE, ebuf);
1925 ERROR(ep, ebuf, gettext(
1930 proto = parsenum(*argv, B_TRUE, ebuf);
1936 ERROR(ep, ebuf, gettext(
1941 iproto = parsenum(*argv, B_TRUE, ebuf);
1947 ERROR(ep, ebuf, gettext(
1953 (token == TOK_SRCADDR6), ebuf);
1955 ERROR1(ep, ebuf, gettext(
1988 ERROR(ep, ebuf, gettext(
1994 (token == TOK_DSTADDR6), ebuf);
1996 ERROR1(ep, ebuf, gettext(
2025 ERROR(ep, ebuf, gettext(
2035 ERROR1(ep, ebuf, gettext(
2057 (token == TOK_PROXYADDR6), ebuf);
2059 ERROR1(ep, ebuf, gettext(
2103 WARN1(ep, ebuf, gettext(
2114 ERROR(ep, ebuf, gettext(
2124 ERROR1(ep, ebuf, gettext(
2146 (token == TOK_IDSTADDR6), ebuf);
2148 ERROR1(ep, ebuf, gettext(
2192 WARN1(ep, ebuf, gettext(
2202 ERROR(ep, ebuf, gettext(
2207 sa_len = parseaddr(*argv, &natt_lhp, 0, ebuf);
2209 ERROR1(ep, ebuf, gettext(
2248 WARN1(ep, ebuf, gettext(
2259 ERROR(ep, ebuf, gettext(
2264 sa_len = parseaddr(*argv, &natt_rhp, 0, ebuf);
2266 ERROR1(ep, ebuf, gettext(
2305 WARN1(ep, ebuf, gettext(
2316 ERROR(ep, ebuf, gettext(
2323 FATAL(ep, ebuf, gettext(
2328 encrypt = parsekey(*argv, ebuf, reserved_bits);
2331 ERROR(ep, ebuf, gettext(
2340 ERROR(ep, ebuf, gettext(
2345 auth = parsekey(*argv, ebuf, 0);
2348 ERROR(ep, ebuf, gettext(
2357 FATAL(ep, ebuf, gettext(
2364 ERROR(ep, ebuf, gettext(
2375 srcid->sadb_ident_type = parseidtype(*argv, ebuf);
2386 ERROR(ep, ebuf, gettext(
2392 ERROR(ep, ebuf, gettext(
2403 dstid->sadb_ident_type = parseidtype(*argv, ebuf);
2430 ERROR(ep, ebuf, gettext(
2436 (uint32_t)parsenum(*argv, B_TRUE, ebuf);
2440 ERROR(ep, ebuf, gettext(
2446 B_TRUE, ebuf);
2450 ERROR(ep, ebuf, gettext(
2456 B_TRUE, ebuf);
2460 ERROR(ep, ebuf, gettext(
2466 B_TRUE, ebuf);
2489 ERROR(ep, ebuf, gettext(
2495 (uint32_t)parsenum(*argv, B_TRUE, ebuf);
2499 ERROR(ep, ebuf, gettext(
2505 B_TRUE, ebuf);
2509 ERROR(ep, ebuf, gettext(
2515 B_TRUE, ebuf);
2519 ERROR(ep, ebuf, gettext(
2525 B_TRUE, ebuf);
2538 ERROR(ep, ebuf, gettext(
2558 *argv, B_TRUE, ebuf);
2578 B_TRUE, ebuf);
2583 B_TRUE, ebuf);
2590 ERROR(ep, ebuf, gettext(
2594 B_TRUE, ebuf);
2601 ERROR(ep, ebuf,
2615 ERROR(ep, ebuf,
2624 ERROR1(ep, ebuf, gettext(
2631 handle_errors(ep, ebuf, B_TRUE, B_FALSE);
2667 ERROR(ep, ebuf, gettext("Must specify 'encap udp' "
2670 ERROR(ep, ebuf, gettext("Must specify 'encap udp' "
2719 ERROR1(ep, ebuf, gettext(
2726 FATAL(ep, ebuf, gettext(
2739 ERROR(ep, ebuf, gettext(
2761 ERROR1(ep, ebuf, gettext(
2775 ERROR1(ep, ebuf, gettext(
2777 ERROR1(ep, ebuf, gettext(
2783 ERROR1(ep, ebuf, gettext(
2812 ERROR(ep, ebuf, gettext(
2850 FATAL1(ep, ebuf, gettext(
2856 ERROR(ep, ebuf, gettext(
2882 handle_errors(ep, ebuf, B_TRUE, B_FALSE);
2947 spi, ebuf);
2962 free(ebuf);
2972 dodelget(int cmd, int satype, char *argv[], char *ebuf)
3027 ERROR1(ep, ebuf, gettext(
3032 ERROR(ep, ebuf, gettext(
3041 B_TRUE, ebuf));
3047 ERROR(ep, ebuf, gettext(
3051 srcport = parsenum(*argv, B_TRUE, ebuf);
3056 ERROR(ep, ebuf, gettext(
3061 dstport = parsenum(*argv, B_TRUE, ebuf);
3066 ERROR(ep, ebuf, gettext(
3070 proto = parsenum(*argv, B_TRUE, ebuf);
3076 ERROR(ep, ebuf, gettext(
3081 (token == TOK_SRCADDR6), ebuf);
3083 ERROR1(ep, ebuf, gettext(
3108 ERROR(ep, ebuf, gettext(
3114 (token == TOK_SRCADDR6), ebuf);
3116 ERROR1(ep, ebuf, gettext(
3144 ERROR2(ep, ebuf, gettext(
3151 handle_errors(ep, ebuf, B_TRUE, B_FALSE);
3154 FATAL1(ep, ebuf, gettext(
3419 parseit(int argc, char *argv[], char *ebuf, boolean_t read_cmdfile)
3436 ERROR(ep, ebuf, gettext("Help not appropriate in "
3443 ERROR(ep, ebuf, gettext("Monitor not appropriate in "
3461 ERROR(ep, ebuf, gettext("Monitor not appropriate in "
3475 handle_errors(ep, ebuf, B_FALSE, B_FALSE);
3477 satype = parsesatype(*argv, ebuf);
3488 FATAL(ep, ebuf, gettext(
3499 ERROR(ep, ebuf, gettext("Too many arguments for "
3501 handle_errors(ep, ebuf,
3525 FATAL(ep, ebuf, gettext(
3530 doaddup(cmd, satype, argv, ebuf);
3536 FATAL(ep, ebuf, gettext(
3541 dodelget(cmd, satype, argv, ebuf);
3545 ERROR(ep, ebuf, gettext("Dump not appropriate in "
3549 ERROR(ep, ebuf, gettext("Too many arguments "
3551 handle_errors(ep, ebuf,
3559 ERROR(ep, ebuf, gettext("Save not appropriate in "
3572 handle_errors(ep, ebuf, B_FALSE, B_FALSE);