diff options
author | Vladimir Kotal <Vladimir.Kotal@Sun.COM> | 2009-03-18 19:49:20 +0100 |
---|---|---|
committer | Vladimir Kotal <Vladimir.Kotal@Sun.COM> | 2009-03-18 19:49:20 +0100 |
commit | bfe6f8f50e1ad7cfc72f4665989dc9e25e82e872 (patch) | |
tree | 981efdf6820863125d9256c577104fcf1b0c6116 /usr/src/lib/libipsecutil/common/ipsec_util.h | |
parent | 7e16fca05dfbcfd32c2ebc9e4d1abdac1cd8657c (diff) | |
download | illumos-gate-bfe6f8f50e1ad7cfc72f4665989dc9e25e82e872.tar.gz |
6520458 ikeadm should have command line history capabilities
4313953 ipseckey(1m) needs line editing support.
6814629 ipseckey should employ strict checking for {dump,flush} commands
Diffstat (limited to 'usr/src/lib/libipsecutil/common/ipsec_util.h')
-rw-r--r-- | usr/src/lib/libipsecutil/common/ipsec_util.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr/src/lib/libipsecutil/common/ipsec_util.h b/usr/src/lib/libipsecutil/common/ipsec_util.h index 83c2834f46..350b423df9 100644 --- a/usr/src/lib/libipsecutil/common/ipsec_util.h +++ b/usr/src/lib/libipsecutil/common/ipsec_util.h @@ -45,6 +45,7 @@ extern "C" { #include <err.h> #include <errfp.h> #include <net/pfpolicy.h> +#include <libtecla.h> #ifndef A_CNT /* macros for array manipulation */ @@ -54,10 +55,16 @@ extern "C" { /* used for file parsing */ #define NBUF_SIZE 16 -#define IBUF_SIZE 2048 #define COMMENT_CHAR '#' #define CONT_CHAR '\\' #define QUOTE_CHAR '"' +/* + * Input buffer size limits maximum line length for both file parsing and + * interactive mode. 4K chars should be enough even for broad commands and + * all possible key lenghts of today's symmetric ciphers entered via + * ipseckey(1M) which has the most bifurcated grammar from all IPsec commands. + */ +#define IBUF_SIZE 4096 /* used for command-line parsing */ #define START_ARG 8 @@ -163,7 +170,8 @@ extern boolean_t dump_sadb_idtype(uint8_t, FILE *, int *); /* callback function passed in to do_interactive() */ typedef void (*parse_cmdln_fn)(int, char **, char *, boolean_t); -extern void do_interactive(FILE *, char *, char *, char *, parse_cmdln_fn); +extern void do_interactive(FILE *, char *, char *, char *, parse_cmdln_fn, + CplMatchFn *); extern uint_t lines_parsed; extern uint_t lines_added; |