📄 ckctel.h
字号:
#define SLC_FLUSHOUT 0x20#define OLD_ENV_VAR 1#define OLD_ENV_VALUE 0#define NEW_ENV_VAR 0#define NEW_ENV_VALUE 1#define ENV_ESC 2#define ENV_USERVAR 3#define FWDX_SCREEN 0#define FWDX_OPEN 1#define FWDX_CLOSE 2#define FWDX_DATA 3/* * AUTHENTICATION suboptions *//* * Who is authenticating who ... */#define AUTH_CLIENT_TO_SERVER 0 /* Client authenticating server */#define AUTH_SERVER_TO_CLIENT 1 /* Server authenticating client */#define AUTH_WHO_MASK 1/* * amount of authentication done */#define AUTH_HOW_ONE_WAY 0#define AUTH_HOW_MUTUAL 2#define AUTH_HOW_MASK 2/* * should we be encrypting? */#define AUTH_ENCRYPT_OFF 0#define AUTH_ENCRYPT_USING_TELOPT 4#define AUTH_ENCRYPT_AFTER_EXCHANGE 16#define AUTH_ENCRYPT_RESERVED 20#define AUTH_ENCRYPT_MASK 20/* * will we be forwarding? * if we want to activate the use of this flag then * #define USE_INI_CRED_FWD */#define INI_CRED_FWD_OFF 0#define INI_CRED_FWD_ON 8#define INI_CRED_FWD_MASK 8#define USE_INI_CRED_FWD#define AUTHTYPE_NULL 0#define AUTHTYPE_KERBEROS_V4 1#define AUTHTYPE_KERBEROS_V5 2#define AUTHTYPE_SPX 3#define AUTHTYPE_MINK 4#define AUTHTYPE_SRP 5#define AUTHTYPE_RSA 6#define AUTHTYPE_SSL 7#define AUTHTYPE_LOKI 10#define AUTHTYPE_SSA 11#define AUTHTYPE_KEA_SJ 12#define AUTHTYPE_KEA_INTEG 13#define AUTHTYPE_DSS 14#define AUTHTYPE_NTLM 15#ifdef AUTHTYPE_CNT#undef AUTHTYPE_CNT#endif /* AUTHTYPE_CNT */#define AUTHTYPE_CNT 16/* * AUTHTYPEs Last updated 21 March 1999 * from http://www.isi.edu/in-notes/iana/assignments/telnet-options */#define AUTHTYPE_AUTO 99#ifdef AUTH_NAMESchar *authtype_names[] = { "NULL", /* RFC 1416 */ "KERBEROS_V4", /* RFC 1416 */ "KERBEROS_V5", /* RFC 1416 */ "SPX", /* RFC 1416 */ "MINK", /* Unknown */ "SRP", /* Wu */ "RSA", /* RFC 1416 */ "SSL", /* Hudson */ "IANA_8", /* not assigned by IANA */ "IANA_9", /* not assigned by IANA */ "LOKI", /* RFC 1416 */ "SSA", /* Schoch */ "KEA_SJ", /* Horting */ "KEA_SJ_INTEG", /* Horting */ "DSS", /* Horting */ "NTLM", /* Kahn <louisk@microsoft.com> */ 0};char * authmode_names[] = { "CLIENT_TO_SERVER|ONE_WAY", "SERVER_TO_CLIENT|ONE_WAY", "CLIENT_TO_SERVER|MUTUAL", "SERVER_TO_CLIENT|MUTUAL", "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_USING_TELOPT", "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT", "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_USING_TELOPT", "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_USING_TELOPT", "CLIENT_TO_SERVER|ONE_WAY|CRED_FWD", "SERVER_TO_CLIENT|ONE_WAY|CRED_FWD", "CLIENT_TO_SERVER|MUTUAL|CRED_FWD", "SERVER_TO_CLIENT|MUTUAL|CRED_FWD", "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_USING_TELOPT|CRED_FWD", "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT|CRED_FWD", "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_USING_TELOPT|CRED_FWD", "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_USING_TELOPT|CRED_FWD", "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_AFTER_EXCHANGE", "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_AFTER_EXCHANGE", "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_AFTER_EXCHANGE", "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE", "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_RESERVED", "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_RESERVED", "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_RESERVED", "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_RESERVED", "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_AFTER_EXCHANGE|CRED_FWD", "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_AFTER_EXCHANGE|CRED_FWD", "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_AFTER_EXCHANGE|CRED_FWD", "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE|CRED_FWD", "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_RESERVED|CRED_FWD", "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_RESERVED|CRED_FWD", "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_RESERVED|CRED_FWD", "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_RESERVED|CRED_FWD", 0};#elseextern char *authtype_names[];extern char *authmode_names[];#endif#define AUTHMODE_CNT 32#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)#define AUTHTYPE_NAME(x) (AUTHTYPE_NAME_OK(x)?authtype_names[x]:"UNKNOWN")#define AUTHMODE_NAME_OK(x) ((unsigned int)(x) < AUTHMODE_CNT)#define AUTHMODE_NAME(x) (AUTHMODE_NAME_OK(x)?authmode_names[x]:"UNKNOWN")/* Kerberos Authentication Message Identifiers */#define KRB_AUTH 0 /* Authentication data follows */#define KRB_REJECT 1 /* Rejected (reason might follow) */#define KRB_ACCEPT 2 /* Accepted */#define KRB4_CHALLENGE 3#define KRB4_RESPONSE 4#define KRB5_RESPONSE 3 /* Response for mutual auth. */#define KRB5_FORWARD 4 /* Forwarded credentials follow */#define KRB5_FORWARD_ACCEPT 5 /* Forwarded credentials accepted */#define KRB5_FORWARD_REJECT 6 /* Forwarded credentials rejected *//* Secure Remote Password Authentication Message Identifiers */#define SRP_AUTH 0 /* Authentication data follows */#define SRP_REJECT 1 /* Rejected (reason might follow) */#define SRP_ACCEPT 2 /* Accepted */#define SRP_CHALLENGE 3#define SRP_RESPONSE 4#define SRP_EXP 8 /* */#define SRP_PARAMS 9 /* *//* Telnet Auth using KEA and SKIPJACK */#define KEA_CERTA_RA 1#define KEA_CERTB_RB_IVB_NONCEB 2#define KEA_IVA_RESPONSEB_NONCEA 3#define KEA_RESPONSEA 4/* Tim Hudson's SSL Authentication Message Identifiers */#define SSL_START 1#define SSL_ACCEPT 2#define SSL_REJECT 3/* Microsoft NTLM Authentication Message Identifiers */#define NTLM_AUTH 0#define NTLM_CHALLENGE 1#define NTLM_RESPONSE 2#define NTLM_ACCEPT 3#define NTLM_REJECT 4/* Generic Constants */#define AUTH_SUCCESS 0#define AUTH_FAILURE 255/* * ENCRYPTion suboptions */#define ENCRYPT_IS 0 /* I pick encryption type ... */#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */#define ENCRYPT_REPLY 2 /* Initial setup response */#define ENCRYPT_START 3 /* Am starting to send encrypted */#define ENCRYPT_END 4 /* Am ending encrypted */#define ENCRYPT_REQSTART 5 /* Request you start encrypting */#define ENCRYPT_REQEND 6 /* Request you send encrypting */#define ENCRYPT_ENC_KEYID 7#define ENCRYPT_DEC_KEYID 8#define ENCRYPT_CNT 9#define ENCTYPE_ANY 0#define ENCTYPE_DES_CFB64 1#define ENCTYPE_DES_OFB64 2#define ENCTYPE_DES3_CFB64 3#define ENCTYPE_DES3_OFB64 4#define ENCTYPE_CAST5_40_CFB64 8#define ENCTYPE_CAST5_40_OFB64 9#define ENCTYPE_CAST128_CFB64 10#define ENCTYPE_CAST128_OFB64 11#ifdef ENCTYPE_CNT#undef ENCTYPE_CNT#endif#define ENCTYPE_CNT 12#ifdef ENCRYPT_NAMESchar *encrypt_names[] = { "IS", "SUPPORT", "REPLY", "START", "END", "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", 0};char *enctype_names[] = { "ANY", "DES_CFB64", /* Ts'o */ "DES_OFB64", /* Ts'o */ "DES3_CFB64", /* Altman */ "DES3_OFB64", /* Altman */ "UNKNOWN-5", "UNKNOWN-6", "UNKNOWN-7", "CAST5_40_CFB64", /* Wu */ "CAST5_40_OFB64", /* Wu */ "CAST128_CFB64", /* Wu */ "CAST128_OFB64", /* Wu */ 0};#elseextern char *encrypt_names[];extern char *enctype_names[];#endif#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)#define ENCRYPT_NAME(x) encrypt_names[x]#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)#define ENCTYPE_NAME(x) enctype_names[x]/* For setting the state of validUser */#define AUTH_REJECT 0 /* Rejected */#define AUTH_UNKNOWN 1 /* We don't know who he is, but he's okay */#define AUTH_OTHER 2 /* We know him, but not his name */#define AUTH_USER 3 /* We know he name */#define AUTH_VALID 4 /* We know him, and he needs no password *//* Kermit Option Subnegotiations */#define KERMIT_START 0#define KERMIT_STOP 1#define KERMIT_REQ_START 2#define KERMIT_REQ_STOP 3#define KERMIT_SOP 4#define KERMIT_RESP_START 8#define KERMIT_RESP_STOP 9/* For SET TELNET AUTH HOW */#define TN_AUTH_HOW_ANY 0#define TN_AUTH_HOW_ONE_WAY 1#define TN_AUTH_HOW_MUTUAL 2/* For SET TELNET AUTH ENCRYPT */#define TN_AUTH_ENC_ANY 0#define TN_AUTH_ENC_NONE 1#define TN_AUTH_ENC_TELOPT 2#define TN_AUTH_ENC_EXCH 3 /* not used in Kermit *//* Telnet protocol functions defined in C-Kermit */_PROTOTYP( int tn_ini, (void) ); /* Telnet protocol support */_PROTOTYP( int tn_reset, (void));_PROTOTYP( int tn_set_modes, (void));_PROTOTYP( int tn_sopt, (int, int) );_PROTOTYP( int tn_doop, (CHAR, int, int (*)(int) ) );_PROTOTYP( int tn_sttyp, (void) );_PROTOTYP( int tn_snenv, (CHAR *, int) ) ;_PROTOTYP( int tn_rnenv, (CHAR *, int) ) ;_PROTOTYP( int tn_wait, (char *) ) ;_PROTOTYP( int tn_push, (void) ) ;_PROTOTYP( int tnsndbrk, (void) );_PROTOTYP( VOID tn_debug, (char *));#ifdef IKS_OPTION_PROTOTYP( int tn_siks, (int) );_PROTOTYP( int iks_wait, (int, int) );#endif /* IKS_OPTION */#ifdef CK_NAWS_PROTOTYP( int tn_snaws, (void) );#endif /* CK_NAWS */#ifdef CK_XDISPLOC_PROTOTYP( int tn_sxdisploc, (void) );#endif /* CK_XDISPLOC */#ifdef CK_SNDLOC_PROTOTYP( int tn_sndloc, (void) );#endif /* CK_SNDLOC */#ifdef CK_FORWARD_X_PROTOTYP( int fwdx_create_listen_socket,(int));_PROTOTYP( int fwdx_open_client_channel,(int));_PROTOTYP( int fwdx_open_server_channel,(VOID));_PROTOTYP( int fwdx_close_channel,(int));_PROTOTYP( int fwdx_write_data_to_channel,(int, char *,int));_PROTOTYP( int fwdx_send_data_from_channel,(int, char *,int));_PROTOTYP( int fwdx_close_all,(VOID));_PROTOTYP( int fwdx_tn_sb,(unsigned char *, int));_PROTOTYP( int tn_sndfwdx, (void));_PROTOTYP( int fwdx_send_close,(int));_PROTOTYP( int fwdx_send_open,(int));_PROTOTYP( VOID fwdx_check_sockets,(fd_set *));_PROTOTYP( int fwdx_init_fd_set,(fd_set *));#ifdef NT_PROTOTYP( VOID fwdx_thread,(VOID *));#endif /* NT */#endif /* CK_FORWARD_X */#ifndef CKCTEL_C /* These are declared in ckctel.c */extern int tn_init; /* Telnet protocol initialized flag */extern char *tn_term; /* Terminal type override */extern int sstelnet; /* Server side telnet? */extern int tn_deb; /* Telnet option debugging flag */#endif /* CKCTEL_C */#endif /* CKCTEL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -