亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dceha24.c

?? 一個通訊程序源碼
?? C
字號:
/*+-------------------------------------------------------------------------	dceHA24.c - DCE-specific portion of generic SCO UUCP dialer	Driver for generic Hayes-style 2400 baud modem	wht@n4hgf.Mt-Park.GA.US Necessary DCE switch setting or other configuration:   enable onhook upon loss of DTR--------------------------------------------------------------------------*//*+:EDITS:*//*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 *//*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA *//*:02-02-1992-18:01-root@n4hgf-proper ordering of DCE_result entries *//*:01-26-1992-15:30-wht@n4hgf-gendial 1.2 for ecu 3.20- better hangup *//*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 *//*:04-16-1991-18:18-wht@n4hgf-creation from template */#include "dialer.h"/* * DCE_DTR_low_msec - milliseconds to hold DTR low to ensure DCE *                    sees the transition; this value may be changed *                    as necessary before each call to lflash_DTR(), * but, generally, a constant value will do. */long DCE_DTR_low_msec = 750L;/* * DCE_DTR_high_msec - milliseconds DTR must remain high before the *                     DCE may be expected to be ready to be commanded */long DCE_DTR_high_msec = 1500L;/* * DCE_write_pace_msec - milliseconds to pause between each character *                       sent to the DCE (zero if streaming I/O is *                       permitted); this value may be changed as * necessary before each call to lwrite(), but, generally, a constant * value will do.  Note that this value is used to feed a value to Nap(), * which has a granularity of .010 seconds on UNIX/386, .020 on XENIX/286 * and .050 seconds on XENIX/86. */long DCE_write_pace_msec = 40;/* * DCE_name     - short name for DCE * DCE_revision - revision number for this module */char *DCE_name = "generic AT-cmd 2400";char *DCE_revision = "1.21";/* * DCE_hangup_CBAUD - baud rate to use for hanging up DCE *                    and readying it for dial in access *                    (BXXX mask); use a value of zero if the speed *                    specified by the invoker is to be used. * This value is useful for DCEs such as the early Hayes 2400 * which are so unfortunately compatible with their 1200 predecessor * that they refuse to answer at 2400 baud unless you last spoke to * them at that rate. For such bad boys, use B2400 below. */int DCE_hangup_CBAUD = B2400;/* * DCE_results - a table of DCE response strings and a token *               code for each; when you call lread() or lread_ignore(), *               if the read routine detects one of the strings, * the appropriate code is returned.  If no string matches, then * lread()/lread_ignore examines the DCE result string for a * numeric value; if one is found, the numeric value or'd with * 0x4000 is returned (in this way, e.g., you can read "modem * S registers."  If nothing agrees with this search, lread() * will abort the program with RC|FAIL|RCE_TIMOUT, lread_ignore() * will return -1.  You may use any value between 0 and 0x3FFFFFFF. * This module is the only consumer  of the codes, although they * are decoded by gendial.c's _lread(). * * If one possible result is an "early substring" of another, like * "CONNECT" is of "CONNECT 1200", then put such results later in the * table than the larger result. * */#define rfConnect		0x00400000#define rfMASK			0x000000FF#define rOk				0#define rNoCarrier		1#define rError			2#define rNoDialTone		3#define rBusy			4#define rNoAnswer		5#define rConnect300		(7 | rfConnect)#define rConnect1200	(8 | rfConnect)#define rConnect2400	(9 | rfConnect)DCE_RESULT DCE_results[] ={	{ "OK",						rOk,			},	{ "NO CARRIER",				rNoCarrier,		},	{ "ERROR",					rError			},	{ "NO DIALTONE",			rNoDialTone,	},	{ "BUSY",					rBusy			},	{ "NO ANSWER",				rNoAnswer		},	{ "CONNECT 1200",			rConnect1200	},	{ "CONNECT 2400",			rConnect2400	},	{ "CONNECT",				rConnect300		},	{ (char *)0,				-1				}		/* end table */};/*+-------------------------------------------------------------------------	DCE_baud_to_CBAUD(baud) - check for valid baud rates supported by DCE  DCE dependent function must validate baud rates supported by DCE  returns baud rate in struct termio c_cflag fashion  or terminates program with error--------------------------------------------------------------------------*/intDCE_baud_to_CBAUD(baud)unsigned int baud;{	switch(baud)	{		case 50:   return(B50);		/* delete the ones you dont handle */		case 75:   return(B75);		case 110:  return(B110);		case 134:  return(B134);		case 150:  return(B150);		case 300:  return(B300);		case 1200: return(B1200);		case 2400: return(B2400);		case 4800: return(B4800);		case 9600: return(B9600);#if defined(B19200)		case 19200: return(B19200);#else#ifdef EXTA		case 19200: return(EXTA);#endif#endif#if defined(B38400)		case 38400: return(B38400);#else#ifdef EXTB		case 38400: return(EXTB);#endif#endif	}	myexit(RC_FAIL | RCE_SPEED);#if defined(OPTIMIZE) || defined(__OPTIMIZE__)	/* don't complain */	return(0);	/* keep gcc from complaining about no rtn at end */#endif}	/* end of DCE_baud_to_CBAUD *//*+-------------------------------------------------------------------------	DCE_hangup() - issue hangup command to DCEThis function should do whatever is necessary to ensure1) any active connection is terminated2) the DCE is ready to receive an incoming call if DTR is asserted3) the DCE will not accept an incoming call if DTR is falseThe function should return when done.You must set any switches necessary to make modem hang up on loss of DTR--------------------------------------------------------------------------*/voidDCE_hangup(){int itmp;int maxretry = 4;	DEBUG(1,"--> hanging up %s\n",dce_name);	lflash_DTR();	/*	 * set up modem	 */	for(itmp = 0; itmp < maxretry; itmp++)	{		lwrite("ATS0=1M0Q0V1X3\r");		if(lread(5) == rOk)			break;	}	if(itmp == maxretry)	{		DEBUG(1,"failed to reset modem\n",0);		myexit(RC_FAIL | RCE_TIMOUT);	}	/*	 * shut up - no result codes	 */	lwrite("ATQ1\r");}	/* end of DCE_hangup *//*+-------------------------------------------------------------------------	DCE_dial(telno) - dial a remote DCEThis function should connect to the remote DCE and use any successindication to modify the tty baud rate if necessary before returning.Upon successful connection, return 0.Upon unsuccessful connection, return RC_FAIL or'd with an appropriateRCE_XXX value from dialer.h.lwrite() is used to write to the DCE.lread() and lread_ignore() are used to read from the DCE.  Read timeoutsfrom calling lread() will result automatically in the proper errortermination of the program.  Read timeouts from calling lread_ignore()return -1; you handle the execption here.Any necessary coding of phone numbers, switch settings or otherconfiguration necessary for this function to succeed should bedocumented at the top of the module.--------------------------------------------------------------------------*/intDCE_dial(telno_str)char *telno_str;{char cmd[128];char phone[50];int timeout;int result;char *cptr;char *dialout_default = "ATS0=0S7=40S2=43Q0V1E0X3\r";#define MDVALID	 "0123456789NnSs*#,!/()-"int itmp;int maxretry = 4;	translate("=,-,",telno_str);	if(strspn(telno_str,MDVALID) != strlen(telno_str))	{		DEBUG(1,"phone number has invalid characters\n",0);		return(RC_FAIL | RCE_PHNO);	}	if(decode_phone_number(telno_str,phone,sizeof(phone)))	{		DEBUG(1,"phone number too long\n",0);		return(RC_FAIL | RCE_PHNO);	}	/*	 * wake up modem	 */	DEBUG(6,"--> waking up modem\n",0);	for(itmp = 0; itmp < maxretry; itmp++)	{		lwrite(dialout_default);		if(lread(5) == rOk)			break;	}	if(itmp == maxretry)	{		DEBUG(1,"DIAL INIT FAILED\n",0);		myexit(RC_FAIL | RCE_TIMOUT);	}	/*	 * calculate a timeout for the connect	 * allow a minimum of 40 seconds	 * if long distance (North American calculation here)	 * make it 132 (S7 is calculated as timeout * .9)	 */	timeout = 40;	if((phone[0] == '1') && (phone[0] != '0'))		timeout = 132;	if((timeout < 90) && (dialer_codes['V' - 'A'] || dialer_codes['P' - 'A']))		timeout = 90;	for(cptr = phone; cptr = strchr(cptr,','); cptr++)		timeout += 2;	/* add extra time for pause characters */	DEBUG(6,"wait for connect = %d seconds\n",timeout);/* indicate non-root should not see DTE->DCE traffic */	secure = 1;/* * build and issue the actual dialing command * if root, let him see number, otherwise just say "remote system" */	DEBUG(1,"--> dialing %s\n", (!ecu_calling & uid)		? "remote system" : telno_str);#ifdef WHT	if(!strncmp(*gargv,"ECU",3))		dialer_codes['S' - 'A'] = 1;#endif	sprintf(cmd,"ATM%dS7=%dDT%s\r",		((dialer_codes['S' - 'A']) && !(dialer_codes['N' - 'A'])) ? 1 : 0,		(timeout * 9) / 10,		phone);	/* cmd string can only be 40 characters including "AT" */	if(strlen(cmd) > 40)	{		DEBUG(1,"phone number string too long\n",0);		cleanup(RC_FAIL | RCE_PHNO);	}	lwrite(cmd);/* indicate non-root can see DTE->DCE traffic */	secure = 0;/* wait for connect */	result = lread(timeout);	if(!(result & rfConnect))	{		switch(result & rfMASK)		{		case rNoCarrier:			return(RC_FAIL | RCE_NOCARR);		case rNoDialTone:			return(RC_FAIL | RCE_NOTONE);		case rBusy:			return(RC_FAIL | RCE_BUSY);		case rNoAnswer:			return(RC_FAIL | RCE_ANSWER);		case rError:		default:			return(RC_FAIL | RCE_NULL);		}	}/* indicate non-root can see DTE->DCE traffic */	secure = 0;	return(0);		/* succeeded */}	/* end of DCE_dial *//***********************************************************  You probably do not need to modify the code below here ***********************************************************//*+-------------------------------------------------------------------------	DCE_abort(sig) - dial attempt aborted sig =  0 if non-signal abort (read timeout, most likely)     != 0 if non-SIGALRM signal caught extern int dialing set  1 if dialing request was active,                    else 0 if hangup request was activeThis is a chance for the DCE-specific code to do anything itneeds to cl,ean up after a failure.  Note that if a dialingcall fails, it is the responsibility of the higher-levelprogram calling the dialer to call it again with a hangup request, sothis function is usually a no-op.--------------------------------------------------------------------------*/voidDCE_abort(sig)int sig;{	DEBUG(10,"DCE_abort(%d);\n",sig);}	/* end of DCE_abort *//*+-------------------------------------------------------------------------	DCE_exit(exitcode) - "last chance for gas" in this incarnationThe independent portion of the dialer program calls this routine inlieu of exit() in every case except one (see DCE_argv_hook() below).Normally, this function just passes it's argument to exit(), butany necessary post-processing can be done.  The function must,however, eventually call exit(exitcode);--------------------------------------------------------------------------*/voidDCE_exit(exitcode)int exitcode;{	DEBUG(10,"DCE_exit(%d);\n",exitcode);	exit(exitcode);}	/* end of DCE_exit *//*+-------------------------------------------------------------------------	DCE_argv_hook(argc,argv,optind,unrecognized_switches)This hook gives DCE-specific code a chance to look over the entirecommand line, such as for -z Telebit processing.argc andf argv are the same values passed to main(),optind is the value of optind at the end of normal getopt processing.unrecognized_switches is the count of switches not handled by main().Specifically, -h and -x are standard switches.Normally, this function should just return RC_FAIL|RCE_ARGS if there areany unrecognized switches, otherwise zero.  If you keep your nose cleanthough, you can do anything you need to do here and exit the program.Note: only simple switches (with no argument) may be used with thisfacility if the functrion is to return,' since main()'s getopt() willstop processing switches if it runs into an unrecognized switch with anargument.If the function returns a non-zero value, then the value will be passedDIRECTLY to exit() with no further ado.  Thus, a non-zero value must beof the format expected by dialer program callers, with RC_FAIL set as aminimum.--------------------------------------------------------------------------*/intDCE_argv_hook(argc,argv,optind,unrecognized_switches)int argc;char **argv;int optind;int unrecognized_switches;{	if(unrecognized_switches)		return(RC_FAIL | RCE_ARGS);	return(0);}	/* end of DCE_argv_hook *//* vi: set tabstop=4 shiftwidth=4: */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91玉足脚交白嫩脚丫在线播放| 国产亚洲1区2区3区| 久久久久9999亚洲精品| 一区二区国产盗摄色噜噜| 狠狠v欧美v日韩v亚洲ⅴ| 日本高清无吗v一区| 久久影音资源网| 香蕉影视欧美成人| 91理论电影在线观看| 日韩视频中午一区| 亚洲午夜一二三区视频| gogogo免费视频观看亚洲一| 日韩久久久精品| 五月天视频一区| 色综合久久中文综合久久97| 久久精品水蜜桃av综合天堂| 久久精品999| 日韩欧美中文字幕制服| 婷婷中文字幕综合| 欧美日韩亚洲另类| 亚洲国产你懂的| 在线视频一区二区免费| 中文字幕一区二区三区蜜月| 国产成人av一区二区三区在线| 精品国产一区二区精华| 麻豆精品视频在线观看视频| 91精品在线观看入口| 亚洲成人在线免费| 欧美日韩在线亚洲一区蜜芽| 一区二区三区精品久久久| 99麻豆久久久国产精品免费| 国产精品伦一区二区三级视频| 国产传媒一区在线| 久久久噜噜噜久久人人看| 精一区二区三区| 久久久久久99精品| 成人三级伦理片| 亚洲欧洲精品成人久久奇米网| www.色综合.com| 亚洲日穴在线视频| 欧美伊人精品成人久久综合97| 亚洲一区二区精品久久av| 欧美撒尿777hd撒尿| 天堂久久一区二区三区| 4438成人网| 精品一区二区三区不卡| 国产欧美精品日韩区二区麻豆天美| 国产福利一区二区三区| 国产精品毛片a∨一区二区三区| 99re亚洲国产精品| 亚洲成精国产精品女| 欧美一级夜夜爽| 国产超碰在线一区| 亚洲精品久久嫩草网站秘色| 欧美另类久久久品| 国产乱色国产精品免费视频| 亚洲色欲色欲www| 精品视频在线免费观看| 美女mm1313爽爽久久久蜜臀| 国产精品美女久久久久久久久久久| 色域天天综合网| 免费亚洲电影在线| 国产精品高清亚洲| 欧美区一区二区三区| 国产精品一级在线| 亚洲一级不卡视频| 久久一夜天堂av一区二区三区| 色诱视频网站一区| 韩国女主播一区| 一区二区不卡在线视频 午夜欧美不卡在| 91精品国产色综合久久不卡蜜臀 | 2021中文字幕一区亚洲| 丰满少妇在线播放bd日韩电影| 亚洲愉拍自拍另类高清精品| 精品国产91久久久久久久妲己| 91视频国产观看| 九色|91porny| 亚洲第一成人在线| 中文字幕一区二区三区精华液| 日韩欧美123| 欧美三级蜜桃2在线观看| 丰满放荡岳乱妇91ww| 日韩不卡一区二区| 有码一区二区三区| 亚洲国产激情av| 日韩精品一区二区三区中文精品| 色呦呦国产精品| 国产成人在线网站| 精品一区二区精品| 青青草视频一区| 亚洲午夜精品在线| 亚洲视频小说图片| 国产精品天美传媒| 国产婷婷色一区二区三区在线| 欧美久久久久久蜜桃| 色94色欧美sute亚洲线路二| 国产成人午夜视频| 精品在线亚洲视频| 日本vs亚洲vs韩国一区三区| 亚洲夂夂婷婷色拍ww47 | 欧美精品一区二区三区一线天视频| 在线观看一区不卡| 91黄色激情网站| 99国产精品久| 99精品黄色片免费大全| 成人高清免费观看| 成人动漫一区二区在线| 高清不卡在线观看av| 国产福利精品导航| 国产乱一区二区| 国产成人自拍网| 成人性生交大合| 不卡一区在线观看| 成人av在线网站| 99久久精品久久久久久清纯| 99精品视频一区二区| 色婷婷综合久久久久中文一区二区| 99热在这里有精品免费| 一本久久a久久精品亚洲| 色久综合一二码| 欧美性受xxxx黑人xyx| 欧美日韩国产在线播放网站| 欧美日韩黄视频| 8x福利精品第一导航| 欧美成人猛片aaaaaaa| 久久久久久**毛片大全| 国产精品丝袜一区| 亚洲精品日日夜夜| 玉足女爽爽91| 日韩av成人高清| 国产精品77777| 91丨九色丨蝌蚪丨老版| 91麻豆免费观看| 精品视频123区在线观看| 欧美一区二区三区免费在线看 | 亚洲欧美在线高清| 亚洲第四色夜色| 激情久久五月天| 97久久精品人人做人人爽50路| 欧美色倩网站大全免费| 日韩免费福利电影在线观看| 欧美国产成人精品| 亚洲成人www| 国产伦精品一区二区三区视频青涩| 国产二区国产一区在线观看| 色欧美片视频在线观看 | 国产精品久久久久久一区二区三区 | 久久五月婷婷丁香社区| 日韩伦理电影网| 日韩成人免费电影| 成人午夜碰碰视频| 7777精品伊人久久久大香线蕉经典版下载| 3atv在线一区二区三区| 日本一区二区三区视频视频| 亚洲成人动漫在线观看| 国产精品综合一区二区| 欧美三级视频在线| 中文字幕av资源一区| 丝袜美腿成人在线| 97精品国产97久久久久久久久久久久| 欧美老肥妇做.爰bbww| 欧美高清在线一区二区| 日韩精品色哟哟| 色婷婷av一区二区三区之一色屋| 亚洲精品一区在线观看| 亚洲综合精品自拍| 成人av网站免费| 久久综合视频网| 视频一区中文字幕国产| 91麻豆精品秘密| 欧美韩日一区二区三区四区| 蜜乳av一区二区| 欧美色图免费看| 亚洲九九爱视频| 成人一二三区视频| 久久久精品国产99久久精品芒果| 亚洲第一综合色| 色婷婷综合久色| 成人免费在线观看入口| 国产成人免费网站| 精品欧美一区二区久久| 日韩高清在线一区| 欧美日韩的一区二区| 一区二区在线看| av资源网一区| 国产精品不卡一区| 成人精品视频一区| 亚洲国产成人在线| 国产999精品久久久久久| 亚洲精品一区二区三区福利| 日本视频在线一区| 日韩一区二区视频| 全国精品久久少妇| 91精品国产91热久久久做人人| 午夜av一区二区三区| 欧美日韩久久久| 视频一区二区中文字幕| 在线综合视频播放| 三级欧美在线一区| 日韩免费性生活视频播放|