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

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

?? dcempad.c

?? 一個通訊程序源碼
?? C
字號:
/* CHK=0xFF53 *//*+-------------------------------------------------------------------------	dceMPAD.c - DCE-specific portion of generic SCO UUCP dialer	Driver for ATT Tridom MPAD VSAT modem emulation	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 *//*:11-29-1990-18:31-r@n4hgf-revision/1st releasable *//*:11-29-1990-17:48-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 = 50;/* * 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 = 50;/* * 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 = "ATT Tridom MPAD";char *DCE_revision = "1.37";/* * 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 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 rRring			6#define rConnect300		(  300  | rfConnect)#define rConnect1200	( 1200  | rfConnect)#define rConnect2400	( 2400  | rfConnect)#define rConnect4800	( 4800  | rfConnect)#define rConnect9600	( 9600  | rfConnect)#define rConnect9600	( 9600  | rfConnect)#define rConnect19200	(19200  | rfConnect)#define rConnect38400	(38400  | rfConnect)DCE_RESULT DCE_results[] ={    { "OK",                 rOk,            },    { "NO CARRIER",         rNoCarrier,     },    { "ERROR",              rError          },    { "BUSY",               rBusy           },    { "NO ANSWER",          rNoAnswer       },    { "NO DIAL TONE",       rNoDialTone     },    { "KDIR SENDX ERROR",   rNoDialTone     },  /* MPAD software error */    { "KDIR UNRESPONSIVE",  rNoDialTone     },    { "KDIR BUSY",          rBusy           },    { "KDIR BAD REQUEST",   rError          },  /* number 0 or >11 length */    { "NO SUCH NUMBER",     rNoAnswer       },    { "KDIR LOGIC ERROR",   rNoDialTone     },  /* MPAD software error */    { "KDIR NOT AVAIL",     rNoDialTone     },    { "TP4 STATE ERROR",    rNoDialTone     },  /* rain fade */    { "TP4 GIVE UP",        rBusy           },  /* rain fade */    { "TP4 ERROR RESP",     rBusy           },  /* transient problem */    { "NET DEACT",          rNoDialTone     },  /* net op deactivated port */    { "CONNECT 300",        rConnect300     },    { "CONNECT 1200",       rConnect1200    },    { "CONNECT 4800",       rConnect4800    },    { "CONNECT 9600",       rConnect9600    },    { "CONNECT 19200",      rConnect19200   },    { "CONNECT 38400",      rConnect38400   },    { (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 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 *//*+-------------------------------------------------------------------------	sync_MPAD() - sync modem with our DTE speed--------------------------------------------------------------------------*/voidsync_MPAD(){register int maxretry = 8;register int count;unsigned char rdchar;	while(maxretry--)	{		lflush();		write(dce_fd,"a",1);		count = 5;		while(count)	/* wait 50-200 msec for character, depending on HZ */		{			if(rdchk(dce_fd))				break;			Nap(50L);			count--;		}		if(count && (read(dce_fd,&rdchar,1) == 1) && (rdchar == 'a'))			return;		write(dce_fd,"atq0v1e1\r",9);		Nap(500L);	}	DEBUG(1,"MPAD SYNC FAILED\n",0);	myexit(RC_FAIL | RCE_TIMOUT);}	/* end of sync_MPAD *//*+-------------------------------------------------------------------------	init_MPAD() - init MPAD from scratch, assuming nothing--------------------------------------------------------------------------*/voidinit_MPAD(){register itmp;int maxretry = 4;char *init0 = "ATE0Q0V1X99S0=1S2=255\r";	DEBUG(1,"--> reseting %s\n",dce_name);	lflash_DTR();	sync_MPAD();	/*	 * set to factory default (bless them for this command)	 * and a few initial beachhead values	 */	for(itmp = 0; itmp < maxretry; itmp++)	{		lwrite(init0);		if(lread(5) == rOk)			break;	}	if(itmp == maxretry)	{		DEBUG(1,"reset failed\n",0);		myexit(RC_FAIL | RCE_TIMOUT);	}}	/* end of init_MPAD *//*+-------------------------------------------------------------------------	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(){	DEBUG(1,"--> hanging up %s\n",dce_name);	lflash_DTR();	init_MPAD();}	/* 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.MPAD Plus-specific comments: Q0          do not be quiet E0          do not echo V1          verbal result codes S0=0        dont allow connect while dialing X99         full result codes--------------------------------------------------------------------------*/intDCE_dial(telno_str)char *telno_str;{char cmd[128];char phone[50];int timeout;int result;char *cptr;char *dialout_default = "ATQ0E0V1E0S0=0X99\r";#define MDVALID	 "0123456789NnSs()-"/* 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);	}/* walk through dialer codes, doing custom setup */	strcpy(cmd,"AT");	cptr = cmd + strlen(cmd);	DEBUG(1,"--> issuing default setup command\n",0);	sync_MPAD();	lwrite(dialout_default);	if(lread(5) != rOk)	{		DEBUG(1,"default dialout setup failed\n",0);		return(RC_FAIL | RCE_NULL);	}/* issue the custom setup command */	if(*cptr)	{		DEBUG(1,"--> issuing custom setup cmd\n",0);		strcat(cmd,"\r");		sync_MPAD();		lwrite(cmd);		if(lread(5) != rOk)		{			DEBUG(1,"custom modem setup failed\n",0);			return(RC_FAIL | RCE_NULL);		}	}/* * calculate a timeout for the connect */	timeout = 20;	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" : phone);	sprintf(cmd,"ATS7=%dDT%s\r",(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);	}	sync_MPAD();	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);		}	}	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一区二区三区免费野_久草精品视频
久久无码av三级| 精品在线免费观看| 欧美96一区二区免费视频| 国产91精品在线观看| 亚洲国产精品欧美一二99| 加勒比av一区二区| 久久精品国产99| 欧美性猛片xxxx免费看久爱| 欧美日韩在线一区二区| 欧美日韩aaa| 亚洲男人的天堂av| 风流少妇一区二区| 欧美videossexotv100| 一区二区久久久久久| 波波电影院一区二区三区| 精品国产精品网麻豆系列| 日韩不卡手机在线v区| 激情五月婷婷综合网| 91精品国产一区二区| 亚洲第一狼人社区| 欧美三区在线观看| 亚洲影视在线观看| 免费成人深夜小野草| 国产一区二区久久| 欧美va亚洲va| 亚洲欧美在线视频观看| 亚洲成国产人片在线观看| 色综合一区二区三区| 亚洲欧美一区二区三区孕妇| 99在线精品一区二区三区| 中文字幕欧美激情| 成人国产一区二区三区精品| 中日韩免费视频中文字幕| 亚洲黄色av一区| 色欲综合视频天天天| 日韩午夜电影av| 国产精品无人区| 日韩国产欧美在线播放| 欧美一级日韩不卡播放免费| 极品美女销魂一区二区三区| 久久伊99综合婷婷久久伊| 国产真实乱对白精彩久久| 久久久久久久久久美女| 国产福利一区在线| 中文文精品字幕一区二区| 成人高清av在线| 日韩一区二区在线看片| 久久精品国产精品亚洲红杏| 国产性天天综合网| 免费日韩伦理电影| 国产丝袜美腿一区二区三区| 成人性色生活片| 亚洲色图视频免费播放| 国产麻豆精品theporn| 欧美日韩一级视频| 久久99久久久欧美国产| 国产亚洲精久久久久久| 91免费看视频| 日韩av高清在线观看| 久久精品欧美一区二区三区不卡 | 中文在线一区二区| 91美女片黄在线| 日韩成人一区二区| 亚洲国产精品国自产拍av| 免费成人在线影院| 国产精品的网站| 欧美一级搡bbbb搡bbbb| 亚洲福中文字幕伊人影院| 精品国产sm最大网站免费看| 91免费国产在线| 黄色精品一二区| 欧美大片一区二区| 一本久久a久久精品亚洲| 狠狠色综合日日| 亚洲黄色录像片| 色婷婷精品大在线视频 | 欧美色图片你懂的| 国产成人8x视频一区二区| 亚洲成人激情社区| 欧美午夜精品一区| 国产成人精品免费网站| 久久久久久电影| 欧美日韩一区在线| av激情综合网| 免费在线一区观看| 日韩欧美不卡一区| 国产一区二区三区不卡在线观看 | 亚洲福利视频一区| 国产精品国产精品国产专区不蜜 | 欧美国产欧美综合| 精品少妇一区二区三区日产乱码 | 亚洲综合色丁香婷婷六月图片| 26uuu色噜噜精品一区| 国产自产视频一区二区三区| 亚洲bdsm女犯bdsm网站| 日韩美女视频一区二区| 国产欧美日韩另类一区| 成人综合婷婷国产精品久久免费| 国产精品久久毛片a| 91福利在线观看| 99re成人精品视频| 亚洲国产视频一区二区| 欧美一区二区三区免费大片| 欧美亚洲另类激情小说| 不卡一卡二卡三乱码免费网站| 国产亚洲福利社区一区| 色婷婷综合视频在线观看| 日韩精品亚洲一区| 久久久久久久久97黄色工厂| 色综合色综合色综合| 国产乱淫av一区二区三区 | 国产91精品一区二区| 日韩一区欧美小说| 在线91免费看| 欧美色图第一页| 欧美日韩国产首页| 欧美乱熟臀69xxxxxx| 欧美日韩一级大片网址| 国产精品99久久久久久似苏梦涵| 1024成人网色www| 18成人在线视频| 日韩亚洲欧美一区二区三区| 成人avav影音| 色成年激情久久综合| 黄色资源网久久资源365| 国产在线一区二区| 国产乱对白刺激视频不卡| 国产传媒欧美日韩成人| 成人午夜视频免费看| 91视频在线观看免费| 欧美午夜精品久久久| 日韩一区二区在线观看| 欧美中文字幕一区| 成人黄页毛片网站| 欧美性高清videossexo| 成人午夜伦理影院| 色94色欧美sute亚洲线路一久| 欧美日韩国产不卡| 欧美成人福利视频| 亚洲国产精品t66y| 久久一区二区视频| 日韩丝袜美女视频| 欧美亚洲国产一区二区三区| 成人一级黄色片| 国内一区二区视频| 日本中文字幕一区二区视频| 亚洲免费av网站| 国产精品久久一级| 亚洲国产精品一区二区久久恐怖片 | 婷婷开心激情综合| 国产麻豆精品95视频| 免费成人结看片| 日韩国产精品大片| 成人黄色av电影| 成人三级伦理片| 欧美日韩一区中文字幕| 国产精品你懂的| 欧美国产精品中文字幕| 久久亚洲影视婷婷| 亚洲一区二区在线免费观看视频| 国产精品久久久久久久久久久免费看| 精品日韩99亚洲| 精品久久久久一区| 亚洲免费在线播放| 精品一区二区三区免费播放| 日本aⅴ亚洲精品中文乱码| 成人午夜av电影| 欧美一区二区三区四区视频| 亚洲三级在线观看| 国产成a人亚洲精品| 亚洲资源在线观看| 国产精品538一区二区在线| 欧美无乱码久久久免费午夜一区| 欧美色电影在线| 国产精品毛片久久久久久久| 日本一区二区成人在线| 蜜臀久久99精品久久久久宅男 | 精品一区二区三区在线播放| 激情文学综合插| 国产精品88av| 91丝袜美腿高跟国产极品老师| 久久久久久久久久久久久夜| 免费成人在线视频观看| 欧美日本韩国一区二区三区视频| 在线播放国产精品二区一二区四区| 中文字幕亚洲视频| 亚洲午夜电影在线| 免费观看在线色综合| 欧美日韩美女一区二区| 亚洲男女一区二区三区| 秋霞电影一区二区| 欧美日韩成人高清| 精品国产一区二区在线观看| 香港成人在线视频| 国产综合久久久久影院| 精品国产百合女同互慰| 中文字幕一区二区三区精华液| 亚洲电影欧美电影有声小说| 在线视频你懂得一区| 精品国产免费视频|