⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ckctel.h

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 H
📖 第 1 页 / 共 3 页
字号:
/* ckctel.h -- Symbol and macro definitions for C-Kermit telnet support *//*  Authors: Jeffrey Altman <jaltman@columbia.edu>,           Frank da Cruz <fdc@columbia.edu>  Columbia University Academic Information Systems, New York City.  Copyright (C) 1985, 2000,    Trustees of Columbia University in the City of New York.    All rights reserved.  See the C-Kermit COPYING.TXT file or the    copyright text in the ckcmai.c module for disclaimer and permissions.  Notes:  . Only one source file should include #defines for    TELCMDS, TELOPTS, TELOPT_STATES, SLC_NAMES, and AUTH_NAMES.  . This file should be used inplace of "arpa/telnet.h"*/#ifndef CKCTEL_H#define	CKCTEL_H/*  Definitions for the TELNET protocol.  can't rely on library header files for any of them.*/#ifndef IAC				/* First the telnet commands */#define IAC 255#endif /* IAC */#ifndef DONT#define DONT 254#endif /* DONT */#ifndef DO#define DO 253#endif /* DO */#ifndef WONT#define WONT 252#endif /* WONT */#ifndef WILL#define WILL 251#endif /* WILL */#ifndef SB#define SB 250#endif /* SB */#ifndef TN_GA#define TN_GA 249#endif /* TN_GA */#ifndef TN_EL#define TN_EL 248#endif /* TN_EL */#ifndef TN_EC#define TN_EC 247#endif /* TN_EC */#ifndef TN_AYT#define TN_AYT 246#endif /* TN_AYT */#ifndef TN_AO#define TN_AO 245#endif /* TN_AO */#ifndef TN_IP#define TN_IP 244#endif /* TN_IP */#ifndef BREAK#define BREAK 243#endif /* BREAK */#ifndef TN_DM#define TN_DM 242#endif /* TN_DM */#ifndef TN_NOP#define TN_NOP 241#endif /* TN_NOP */#ifndef SE#define SE 240#endif /* SE */#ifndef TN_EOR#define TN_EOR 239#endif /* TN_EOR */#ifndef TN_ABORT#define TN_ABORT 238#endif /* TN_ABORT */#ifndef TN_SUSP#define TN_SUSP 237#endif /* TN_SUSP */#ifndef TN_EOF#define TN_EOF 236#endif /* TN_EOF */#ifndef LAST_TN_CMD#define LAST_TN_CMD 236#define TN_SAK 200              /* IBM Secure Attention Key */#endif /* LAST_TN_CMD */#define SYNCH	242		/* for telfunc calls */#ifdef TELCMDSchar *telcmds[] = {	"EOF", "SUSP", "ABORT", "EOR",	"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",	"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0};#else /* TELCMDS */extern char *telcmds[];#endif /* TELCMDS */#define	TELCMD_FIRST	TN_EOF#define	TELCMD_LAST	IAC#define	TELCMD_OK(x)	((unsigned int)(x) <= TELCMD_LAST && \			 (unsigned int)(x) >= TELCMD_FIRST || \                          (unsigned int)(x) == TN_SAK)#define	TELCMD(x)	(TELCMD_OK(x)? ((x) == TN_SAK?"SAK": \                         telcmds[(x)-TELCMD_FIRST]):"UNKNOWN")/* Then the options *//* NB: the following platforms have TELOPT_AUTHENTICATION defined as *//* 45 instead of 37.                                                 */#ifdef TELOPT_AUTHENTICATION#ifdef __osf__#undef TELOPT_AUTHENTICATION#endif /* __osf__ */#ifndef IRIX#undef TELOPT_AUTHENTICATION#endif /* IRIX */#ifndef ultrix#undef TELOPT_AUTHENTICATION#endif /* ultrix */#endif /* TELOPT_AUTHENTICATION *//* telnet options */#ifndef TELOPT_BINARY#define TELOPT_BINARY	0	/* 8-bit data path (RFC 856)*/#endif#ifndef TELOPT_ECHO#define TELOPT_ECHO	1	/* echo (RFC 857)*/#endif#ifndef TELOPT_RCP#define	TELOPT_RCP	2	/* prepare to reconnect (NIC 50005)*/#endif#ifndef	TELOPT_SGA#define	TELOPT_SGA	3	/* suppress go ahead (RFC 858) */#endif#ifndef	TELOPT_NAMS#define	TELOPT_NAMS	4	/* approximate message size (ETHERNET) */#endif#ifndef	TELOPT_STATUS#define	TELOPT_STATUS	5	/* give status (RFC 859) */#endif#ifndef	TELOPT_TM#define	TELOPT_TM	6	/* timing mark (RFC 860) */#endif#ifndef	TELOPT_RCTE#define	TELOPT_RCTE	7	/* remote controlled transmission and echo */#endif                          /* (RFC 726) */#ifndef TELOPT_NAOL#define TELOPT_NAOL 	8	/* negotiate about output line width */#endif                          /* (NIC 50005) */#ifndef TELOPT_NAOP#define TELOPT_NAOP 	9	/* negotiate about output page size */#endif                          /* (NIC 50005) */#ifndef TELOPT_NAOCRD#define TELOPT_NAOCRD	10	/* negotiate about CR disposition (RFC 652) */#endif                          /* [Historic] */#ifndef TELOPT_NAOHTS#define TELOPT_NAOHTS	11	/* negotiate about horizontal tabstops */#endif                          /* (RFC 653) [Historic] */#ifndef TELOPT_NAOHTD#define TELOPT_NAOHTD	12	/* negotiate about horiz tab disposition */#endif                          /* (RFC 654) [Historic] */#ifndef TELOPT_NAOFFD#define TELOPT_NAOFFD	13	/* negotiate about formfeed disposition */#endif                          /* (RFC 655) [Historic] */#ifndef TELOPT_NAOVTS#define TELOPT_NAOVTS	14	/* negotiate about vertical tab stops */#endif                          /* (RFC 656) [Historic] */#ifndef TELOPT_NAOVTD#define TELOPT_NAOVTD	15	/* negotiate about vertical tab disposition */#endif                          /* (RFC 657) [Historic] */#ifndef TELOPT_NAOLFD#define TELOPT_NAOLFD	16	/* negotiate about output LF disposition */#endif                          /* (RFC 658) [Historic] */#ifndef TELOPT_XASCII#define TELOPT_XASCII	17	/* extended ascii character set */#endif                          /* (RFC 698) */#ifndef	TELOPT_LOGOUT#define	TELOPT_LOGOUT	18	/* force logout (RFC 727) */#endif#ifndef	TELOPT_BM#define	TELOPT_BM	19	/* byte macro (RFC 735) */#endif#ifndef	TELOPT_DET#define	TELOPT_DET	20	/* data entry terminal (RFC 1043, 732) */#endif#ifndef	TELOPT_SUPDUP#define	TELOPT_SUPDUP	21	/* supdup protocol (RFC 736, 734) */#endif#ifndef	TELOPT_SUPDUPOUTPUT#define	TELOPT_SUPDUPOUTPUT 22	/* supdup output (RFC 749) */#endif#ifndef	TELOPT_SNDLOC#define	TELOPT_SNDLOC	23	/* send location (RFC 779) */#endif#ifndef	TELOPT_TTYPE#define	TELOPT_TTYPE	24	/* terminal type (RFC 1091) */#endif#ifndef	TELOPT_EOR#define	TELOPT_EOR	25	/* end or record (RFC 885) */#endif#ifndef	TELOPT_TUID#define	TELOPT_TUID	26	/* TACACS user identification (RFC 927) */#endif#ifndef	TELOPT_OUTMRK#define	TELOPT_OUTMRK	27	/* output marking (RFC 933) */#endif#ifndef	TELOPT_TTYLOC#define	TELOPT_TTYLOC	28	/* terminal location number (RFC 946) */#endif#ifndef	TELOPT_3270REGIME#define	TELOPT_3270REGIME 29	/* 3270 regime (RFC 1041) */#endif#ifndef	TELOPT_X3PAD#define	TELOPT_X3PAD	30	/* X.3 PAD (RFC 1053) */#endif#ifndef	TELOPT_NAWS#define	TELOPT_NAWS	31	/* window size (RFC 1073) */#endif#ifndef	TELOPT_TSPEED#define	TELOPT_TSPEED	32	/* terminal speed (RFC 1079) */#endif#ifndef	TELOPT_LFLOW#define	TELOPT_LFLOW	33	/* remote flow control (RFC 1372) */#endif#ifndef TELOPT_LINEMODE#define TELOPT_LINEMODE	34	/* Linemode option (RFC 1184) */#endif#ifndef TELOPT_XDISPLOC#define TELOPT_XDISPLOC	35	/* X Display Location (RFC 1096) */#endif#ifndef TELOPT_OLD_ENVIRON#define TELOPT_OLD_ENVIRON 36	/* Old - Environment variables (RFC 1408) */#endif#ifndef	TELOPT_AUTHENTICATION#define	TELOPT_AUTHENTICATION 37/* Authenticate (RFC 1409) */#endif#ifndef	TELOPT_ENCRYPTION#define	TELOPT_ENCRYPTION 38    /* Encryption option (Borman,Tso) */#endif#ifndef TELOPT_NEWENVIRON#define TELOPT_NEWENVIRON 39    /* New - Environment variables (RFC 1572) */#endif#ifndef TELOPT_3270E#define TELOPT_3270E    40      /* 3270 Extended (RFC 1647) */#endif#ifndef TELOPT_XAUTH#define TELOPT_XAUTH    41      /* ??? (Earhart) */#endif#ifndef TELOPT_CHARSET#define TELOPT_CHARSET  42      /* Character-set (RFC 2066) */#endif#ifndef TELOPT_RSP#define TELOPT_RSP      43      /* Remote Serial Port (Barnes) */#endif#ifndef TELOPT_COM_PORT#define TELOPT_COM_PORT 44      /* Com Port Control (RFC 2217) */#endif#ifndef TELOPT_SLE#define TELOPT_SLE      45      /* Suppress Local Echo (Atmar) - rejected */#endif#ifndef TELOPT_START_TLS#define TELOPT_START_TLS 46     /* Start TLS Authentication/Encryption */#endif                          /* (Boe) */#ifndef TELOPT_KERMIT#define TELOPT_KERMIT   47      /* Kermit (altman) */#endif#ifndef TELOPT_SEND_URL#define TELOPT_SEND_URL 48      /* Send URL */#endif#ifndef TELOPT_FORWARD_X#define TELOPT_FORWARD_X 49     /* X Windows Forwarding (not yet allocated) */#endif /* TELOPT_FORWARD_X */#ifndef TELOPT_PRAGMA_LOGON#define TELOPT_PRAGMA_LOGON 138 /* Encrypted Logon option (PragmaSys) */#endif#ifndef TELOPT_SSPI_LOGON#define TELOPT_SSPI_LOGON 139   /* MS SSPI Logon option (PragmaSys) */#endif#ifndef TELOPT_PRAGMA_HEARTBEAT				/* Server Send Heartbeat option (PragmaSys) */#define TELOPT_PRAGMA_HEARTBEAT 140#endif#define TELOPT_IBM_SAK 200      /* IBM Secure Attention Key *//*  IBM Secure Attention Key (SAK) Option  In addition to terminal negotiation, the telnet command allows  negotiation for the Secure Attention Key (SAK)  option. This option, when supported, provides the local user with  a secure communication path to the remote  host for tasks such as changing user IDs or passwords. If the remote  host supports the SAK function, a trusted  shell is opened on the remote host when the telnet send sak  subcommand is issued. The SAK function can  also be assigned to a single key available in telnet input mode,  using the set sak subcommand.  TN_SAK  Sends the TELNET SAK (Secure Attention Key) sequence, which causes  the remote system to invoke the trusted shell. If the SAK is not  supported, then an error message is displayed that reads:    Remote side does not support SAK.*/#ifndef	TELOPT_EXOPL#define	TELOPT_EXOPL	255	/* Extended-options-list (RFC 861) */#endif#ifdef NTELOPTS#undef NTELOPTS#endif /* NTELOPTS *//* The Telnet Option space is no longer being allocated by ICANN as a *//* continuous list.  In other words it is becoming sparse.  But we do *//* not want to have to allocate memory for a long list of strings and *//* structs which will never be used.  Therefore, the NTELOPTS define  *//* can no longer be equal to TELOPT_LAST+1.  In fact, the notion of   *//* TELOPT_FIRST and TELOPT_LAST no longer make sense.                 */#define	NTELOPTS        54#define TELOPT_FIRST     TELOPT_BINARY

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -