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

📄 tnfsm.h

📁 tcp/ip原理的第三卷
💻 H
字号:
/* tnfsm.h */

/* Telnet Remote-Input FSM States: */
#define	TSDATA		 0	/* normal data processing		*/
#define	TSIAC		 1	/* have seen IAC			*/
#define	TSWOPT		 2	/* have seen IAC-{WILL/WONT}		*/
#define	TSDOPT		 3	/* have seen IAC-{DO/DONT}		*/
#define	TSSUBNEG	 4	/* have seen IAC-SB			*/
#define	TSSUBIAC	 5	/* have seen IAC-SB-...-IAC		*/

#define	NTSTATES	 6	/* # of TS* states			*/

/* Telnet Keyboard-Input FSM States: */
#define	KSREMOTE	 0	/* input goes to the TLI descriptor	*/
#define	KSLOCAL		 1	/* input goes to a local func.		*/
#define	KSCOLLECT	 2	/* input is scripting-file name		*/

#define	NKSTATES	 3	/* # of KS* states			*/

/* Telnet Option Subnegotiation FSM States: */
#define	SS_START	0	/* initial state			*/
#define	SS_TERMTYPE	1	/* TERMINAL_TYPE option subnegotiation	*/
#define	SS_END		2	/* state after all legal input		*/

#define	NSSTATES	3	/* # of SS_* states			*/

#define	FSINVALID	0xff	/* an invalid state number		*/

#define	NCHRS		256		/* number of valid characters	*/
#define	TCANY		(NCHRS+1)	/* match any character		*/

struct fsm_trans {
	u_char	ft_state;		/* current state		*/
	short	ft_char;		/* input character		*/
	u_char	ft_next;		/* next state			*/
	int	(*ft_action)();		/* action to take		*/
};

⌨️ 快捷键说明

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