--- libaitcli/inc/defs.h 2010/06/04 12:08:32 1.2.2.1 +++ libaitcli/inc/defs.h 2011/03/16 18:28:06 1.3.2.1 @@ -3,20 +3,30 @@ * by Michael Pounov * * $Author: misho $ -* $Id: defs.h,v 1.2.2.1 2010/06/04 12:08:32 misho Exp $ +* $Id: defs.h,v 1.3.2.1 2011/03/16 18:28:06 misho Exp $ * *************************************************************************/ #ifndef __DEFS_H #define __DEFS_H -#define STRSIZ 256 +/* Defines telnet types when compiled in OpenBSD */ +#ifndef TELOPT_KERMIT +#define TELOPT_KERMIT 47 /* RFC2840 - Kermit */ +#define TELOPT_KERMIT_STR "KERMIT" + +#undef TELOPT +#define TELOPT(x) ((x) == TELOPT_KERMIT) ? TELOPT_KERMIT_STR : telopts[(x)-TELOPT_FIRST] +#endif + + #define MAX_BINDKEY 559 #define HISTORY_LINES 100 #define HISTORY_FILE "/tmp/.aitcli.history" #define CLI_PROMPT "aitCLI> " +#define CLI_CMD_SEP "---" #define LINEMODE_RAW -1 #define LINEMODE_INS 0 @@ -28,6 +38,9 @@ #define RETCODE_EOF 2 #define DEFAULT_SOCK_TIMEOUT 60 +#define DEFAULT_TELNET_TIMEOUT 10 + +#define MAX_PROMPT_ITEMS 21 #define LOGERR { \ cli_Errno = errno; \