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

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

?? dcemc9624.c

?? 一個通訊程序源碼
?? C
字號:
/* CHK=0xB3C9 *//*+-------------------------------------------------------------------------	dceMC9624.c - DCE-specific portion of generic SCO UUCP dialer	Driver for Microcom AX/9624c (assuming DTMF dialing only)	wht@n4hgf.Mt-Park.GA.US--------------------------------------------------------------------------*//*+: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 *//*:03-12-1991-19:11-wht@n4hgf-if ecu dialing, show complete call progress *//*:01-05-1991-13:48-root@n4hgf-ATZ during reset - modem is flakey *//*:11-29-1990-18:31-r@n4hgf-revision/1st releasable *//*:07-24-1990-15:36-wht@n4hgf-add speaker on/off *//*:07-20-1990-00:10-wht@n4hgf-creation */#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 = 500;/* * 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 = 500;/* * 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 = 0;/* * DCE_name     - short name for DCE * DCE_revision - revision number for this module */char *DCE_name = "Microcom AX/9624c";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 = 0;/* 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 * 0x40000000 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. * *//* flag bits */#define rfConnect		0x00800000#define rfREL			0x00400000#define rfMASK			0x0000FFFF	/* mask off rfBits *//* unique codes */#define rOk				0#define rNoCarrier		1#define rError			2#define rNoDialTone 	3#define rBusy			4#define rNoAnswer		5#define rConnect300		(  300  | rfConnect)#define rConnect1200	( 1200  | rfConnect)#define rConnect2400	( 1200  | rfConnect)#define rConnect4800	( 4800  | rfConnect)#define rConnect9600	( 9600  | rfConnect)#define rConnect300R	(  300  | rfConnect | rfREL)#define rConnect1200R	( 1200  | rfConnect | rfREL)#define rConnect2400R	( 2400  | rfConnect | rfREL)#define rConnect4800R	( 4800  | rfConnect | rfREL)#define rConnect9600R	( 9600  | rfConnect | rfREL)DCE_RESULT DCE_results[] ={	{ "OK",						rOk,			},	{ "NO CARRIER",				rNoCarrier,		},	{ "ERROR",					rError			},	{ "NO DIALTONE",			rNoDialTone,	},	{ "BUSY",					rBusy			},	{ "NO ANSWER",				rNoAnswer		},	{ "CONNECT 300/REL",		rConnect300R	},	{ "CONNECT 1200/REL",		rConnect1200R	},	{ "CONNECT 2400/REL",		rConnect2400R	},	{ "CONNECT 4800/REL",		rConnect4800R	},	{ "CONNECT 9600/REL",		rConnect9600R	},	{ "CONNECT 300",			rConnect300		},	{ "CONNECT 1200",			rConnect1200	},	{ "CONNECT 2400",			rConnect2400	},	{ "CONNECT 4800",			rConnect4800 	},	{ "CONNECT 9600",			rConnect9600	},	{ "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 110:  return(B110);		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	}	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 *//*+-------------------------------------------------------------------------	sync_Microcom() - sync modem with our DTE speed--------------------------------------------------------------------------*/voidsync_Microcom(){register int maxretry = 4;	while(maxretry--)	{		lflush();		DCE_write_pace_msec = 20;		lwrite("ATQ0E1V1\r");		DCE_write_pace_msec = 0;		if(lread_ignore(5) == rOk)			return;	}	DEBUG(1,"Microcom SYNC FAILED\n",0);	myexit(RC_FAIL | RCE_TIMOUT);}	/* end of sync_Microcom *//*+-------------------------------------------------------------------------	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.Any necessary switch setting or other configuration necessary for thisfunction to succeed should be documented at the top of the module.--------------------------------------------------------------------------*/voidDCE_hangup(){char *reset_it = "ATZ\r";char *dialin = "ATS0=1Q1E0M0\\N3\\Q1\\G1%C1%P2\r";	DEBUG(1,"--> hanging up %s\n",dce_name);	lflash_DTR();	sync_Microcom();	lwrite(reset_it);	lread_ignore(5);	lwrite(dialin);	Nap(500L);}	/* end of DCE_hangup *//*+-------------------------------------------------------------------------	DCE_dial(telno_str) - 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.Microcom Plus-specific comments:--------------------------------------------------------------------------*/intDCE_dial(telno_str)char *telno_str;{char cmd[128];int timeout;int result;char *cptr;char phone[42];#define MDVALID "0123456789NnSs,*#()-"char *setup      = "ATQ0E1V1X4S0=0&D2&C1%C1%P2";char *setup_REL  = "\\N3\\Q1\\G1";char *setup_NORM = "\\N0\\Q0\\G0";/* preliminary setup */	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);	}/* * calculate a timeout for the connect * allow a minimum of 40 seconds, if reliable, 50 * also if long distance (North American calculation here) * make it 132 */	timeout = 40;	if(hiCBAUD > B2400)		timeout = 50;	if((phone[0] == '1') && (phone[0] != '0'))		timeout = 132;	for(cptr = phone; cptr = strchr(cptr,','); cptr++)		timeout += 2;	/* add extra time for pause characters */	DEBUG(6,"wait for connect = %d seconds\n",timeout);/* * build and issue the dialout setup command * 9624's S7 timing is way off (S7 is calculated as timeout * .6) */	DEBUG(1,"--> issuing setup command\n",0);	sprintf(cmd,"%s%sS7=%d\r",		setup,		(hiCBAUD > B2400) ? setup_REL : setup_NORM,		(timeout * 6) / 10);	sync_Microcom();	lwrite(cmd);	if(lread(5) != rOk)		return(RC_FAIL | RCE_NULL);/* 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" */#ifdef WHT	if(!strncmp(*gargv,"ECU",3))		dialer_codes['S' - 'A'] = 1;#endif	DEBUG(1,"--> dialing %s\n", (!ecu_calling & uid) ? "remote system" : phone);	sprintf(cmd,"ATS2=255M%dDT%s\r",		((dialer_codes['S' - 'A']) && !(dialer_codes['N' - 'A'])) ? 1 : 0,		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 rNoDialTone:			return(RC_FAIL | RCE_NOTONE);		case rBusy:			return(RC_FAIL | RCE_BUSY);		case rNoAnswer:		case rNoCarrier:	/* with ATX4, NO CARRIER == NO ANSWER							 * since BUSY and NO DIAL TONE are reported							 */			return(RC_FAIL | RCE_ANSWER);		default:			return(RC_FAIL | RCE_NULL);		}	}	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 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一区二区三区免费野_久草精品视频
亚洲欧洲精品天堂一级| eeuss影院一区二区三区| 国产成人综合在线播放| 欧美日韩一区二区三区免费看| 2017欧美狠狠色| 五月天激情综合| 91蜜桃婷婷狠狠久久综合9色| 精品伦理精品一区| 亚洲一卡二卡三卡四卡五卡| 成人动漫一区二区三区| 日韩精品一区二区三区三区免费 | 欧美一区二区大片| 亚洲乱码国产乱码精品精小说| 国产一区二区三区免费在线观看| 91精品国产综合久久精品麻豆| 亚洲精品福利视频网站| 97精品电影院| 自拍偷拍欧美精品| 不卡一二三区首页| 国产精品视频观看| 国产成人免费在线观看| 久久精品无码一区二区三区| 美女任你摸久久| 欧美一二三区在线观看| 首页综合国产亚洲丝袜| 欧美日韩综合色| 亚洲一区欧美一区| 色又黄又爽网站www久久| 亚洲色图都市小说| 色综合 综合色| 亚洲精品视频在线| 欧日韩精品视频| 亚洲国产综合色| 欧美美女喷水视频| 天天综合色天天| 日韩一区二区三区电影在线观看 | 久久99久久久欧美国产| 91精品国产综合久久久久| 日韩精品久久理论片| 欧美一级欧美三级在线观看| 麻豆国产精品官网| 久久日韩精品一区二区五区| 国产精品影视网| 国产精品久99| 欧美主播一区二区三区| 男男gaygay亚洲| 久久无码av三级| a4yy欧美一区二区三区| 亚洲一二三四区| 日韩欧美在线不卡| 国产一区二区三区免费播放| 国产精品国产三级国产a| 欧美图区在线视频| 看电影不卡的网站| 中文字幕 久热精品 视频在线 | heyzo一本久久综合| 一区二区三区在线不卡| 日韩免费看的电影| 成人高清免费观看| 天天av天天翘天天综合网色鬼国产 | 国产日韩成人精品| 91丨九色丨蝌蚪富婆spa| 亚洲不卡一区二区三区| 亚洲精品一区二区三区精华液| 成人午夜激情影院| 亚洲6080在线| 中文字幕精品—区二区四季| 91传媒视频在线播放| 国产一区二区三区最好精华液| 国产精品国产自产拍在线| 日韩一级高清毛片| 91美女在线观看| 久久av资源站| 亚洲gay无套男同| 国产精品久久久久7777按摩 | 久久成人久久鬼色| 亚洲品质自拍视频| 久久精品网站免费观看| 欧美亚州韩日在线看免费版国语版| 美女一区二区在线观看| 夜色激情一区二区| 亚洲国产精品99久久久久久久久| 欧美日韩高清在线| 色综合久久久久久久久| 精品一二线国产| 天天综合色天天综合| 亚洲精选视频在线| 亚洲国产高清在线观看视频| 欧美大尺度电影在线| 欧美亚洲动漫精品| 一本大道久久a久久综合| 国产精品综合久久| 蜜桃久久av一区| 亚洲1区2区3区4区| 亚洲国产乱码最新视频 | 日日摸夜夜添夜夜添精品视频| 欧美国产禁国产网站cc| 久久先锋影音av| 精品国产不卡一区二区三区| 欧美一区二区三区视频在线观看| 91高清在线观看| 91丨九色丨尤物| 成人激情校园春色| 风间由美一区二区三区在线观看| 美腿丝袜在线亚洲一区| 日本不卡一区二区三区| 亚洲国产美国国产综合一区二区| 亚洲欧美日韩中文播放| 亚洲女性喷水在线观看一区| 国产精品人妖ts系列视频| 国产日韩欧美综合在线| 久久精品无码一区二区三区| 久久久久久夜精品精品免费| 亚洲精品一线二线三线| 久久久国际精品| 中文字幕av不卡| 亚洲人成影院在线观看| 一区二区免费在线播放| 亚洲毛片av在线| 亚洲国产一区在线观看| 亚洲狠狠爱一区二区三区| 偷窥少妇高潮呻吟av久久免费| 亚洲国产日韩a在线播放性色| 亚洲色图视频网站| 一区二区三区在线播放| 亚洲成av人影院| 美女国产一区二区三区| 国内偷窥港台综合视频在线播放| 国产美女主播视频一区| 粉嫩aⅴ一区二区三区四区五区| av动漫一区二区| 欧美亚洲动漫精品| 欧美一区二区三区系列电影| 久久亚洲综合色| 国产精品电影一区二区三区| 亚洲乱码国产乱码精品精可以看 | 欧美电影免费提供在线观看| 久久久综合激的五月天| 亚洲色图欧美激情| 日本欧美在线观看| 国产91富婆露脸刺激对白| 在线国产电影不卡| 精品久久免费看| 亚洲欧美日韩中文播放| 蜜臀精品久久久久久蜜臀| 成人激情视频网站| 欧美日韩亚洲不卡| 国产欧美一区二区三区鸳鸯浴 | 欧美一区二区免费| 国产精品高潮呻吟| 视频在线在亚洲| 成人一区二区三区视频| 欧美日韩精品综合在线| 亚洲精品在线免费播放| 亚洲欧美一区二区三区国产精品| 青青草原综合久久大伊人精品 | 2欧美一区二区三区在线观看视频| 国产欧美日韩精品一区| 天天亚洲美女在线视频| kk眼镜猥琐国模调教系列一区二区| 欧美美女视频在线观看| 亚洲婷婷在线视频| 久久精品国产77777蜜臀| 色婷婷av久久久久久久| 国产欧美日韩久久| 日本女优在线视频一区二区| 91麻豆免费观看| 久久久久久久久久久久久夜| 亚洲二区在线视频| 97精品国产97久久久久久久久久久久| 日韩精品中文字幕在线不卡尤物| 一区二区三区四区中文字幕| 国产成人精品免费网站| 欧美一卡二卡三卡| 婷婷中文字幕综合| 欧美三级资源在线| 中文字幕亚洲视频| 成人高清免费在线播放| 久久亚洲综合色一区二区三区| 日韩精品成人一区二区在线| 色婷婷综合久久久久中文| 国产精品蜜臀av| 国产精品99久| 久久久久久久久久久电影| 毛片av中文字幕一区二区| 欧美精品aⅴ在线视频| 亚洲18影院在线观看| 欧美性色综合网| 夜夜嗨av一区二区三区中文字幕 | www.亚洲精品| 国产女人18毛片水真多成人如厕| 日本91福利区| 日韩一级大片在线观看| 日本不卡一区二区| 51久久夜色精品国产麻豆| 亚洲高清一区二区三区| 欧美日韩不卡一区二区| 人人超碰91尤物精品国产| 日韩你懂的电影在线观看| 久久精品久久久精品美女|