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

📄 iac.c

📁 支持ZModem, Telnet功能的串口通讯程序
💻 C
字号:
/* * This function deals with the telnet protocol for turning options * on and off. It basically refuses to do anything that the far end * asks it to and agrees tthat the far end should do anything it * wants to. This is done by modifying the original IAC string and * then returning it. */#include "virtmodem.h"#include "blocks.h"extern struct block_list remote;#define WILL 251#define WONT 252#define DO 253#define DONT 254voiddo_iac(unsigned char b[3]){    int i;    b[0]=255;    switch(b[1]) {    case WILL:	b[1]=DO;	break;    case WONT:	b[1]=DONT;	break;    case DO:    case DONT:	b[1]=WONT;	break;    default:	outstr("BAD IAC\r\n");    }    /* add new IAC to return stream */    for(i=0;i<3;i++)	add_char(&remote,b[i]);}

⌨️ 快捷键说明

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