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

📄 ckudia.c

📁 linux终端仿真程序
💻 C
📖 第 1 页 / 共 5 页
字号:
#define		MAX_MDM		 4	/* Number of modem types */#else					/* Full-blown dialer support */#define		n_ATTDTDM	 1#define         n_ATTISN         2#define		n_ATTMODEM	 3#define		n_CCITT		 4#define		n_CERMETEK	 5#define		n_DF03		 6#define		n_DF100		 7#define		n_DF200		 8#define		n_GDC		 9#define		n_HAYES		10#define		n_PENRIL	11#define		n_RACAL		12#define		n_UNKNOWN       13#define		n_VENTEL	14#define		n_CONCORD	15#define		n_ATTUPC	16	/* aka UNIX PC and ATT7300 */#define		n_ROLM          17      /* Rolm CBX DCM */#define		n_MICROCOM	18	/* Microcoms in SX command mode */#define         n_USR           19	/* Modern USRs */#define         n_TELEBIT       20      /* Telebits of all kinds */#define         n_DIGITEL       21	/* Digitel DT-22 (CCITT variant) */#define         n_H_1200        22	/* Hayes 1200 */#define		n_H_ULTRA       23	/* Hayes Ultra and maybe Optima */#define		n_H_ACCURA      24	/* Hayes Accura and maybe Optima */#define         n_PPI           25	/* Practical Peripherals */#define         n_DATAPORT      26	/* AT&T Dataport */#define         n_BOCA          27	/* Boca */#define		n_MOTOROLA      28	/* Motorola Fastalk or Lifestyle */#define		n_DIGICOMM	29	/* Digicomm Connection */#define		n_DYNALINK      30	/* Dynalink 1414VE */#define		n_INTEL		31	/* Intel 14400 Faxmodem */#define		n_UCOM_AT	32	/* Microcoms in AT mode */#define		n_MULTI		33	/* Multitech MT1432 */#define		n_SUPRA		34	/* SupraFAXmodem */#define	        n_ZOLTRIX	35	/* Zoltrix */#define		n_ZOOM		36	/* Zoom */#define		n_ZYXEL		37	/* ZyXEL */#define         n_TAPI          38	/* Microsoft Windows dialer */#define         n_TBNEW         39	/* Newer Telebit models */#define		n_MAXTECH       40	/* MaxTech XM288EA */#define         n_UDEF          41	/* User-Defined */#define         n_RWV32         42	/* Generic Rockwell V.32 */#define         n_RWV32B        43	/* Generic Rockwell V.32bis */#define         n_RWV34         44	/* Generic Rockwell V.34 */#define		n_MWAVE		45	/* IBM Mwave Adapter */#define         n_TELEPATH      46	/* Gateway Telepath */#define         n_MICROLINK     47	/* MicroLink modems */#define         n_CARDINAL      48	/* Cardinal modems */#define		MAX_MDM		48	/* Number of modem types */#endif /* MINIDIAL */int dialudt = n_UDEF;			/* Number of user-defined type *//* BEGIN MDMINF STRUCT DEFINITIONS *//*  Declare structures containing modem-specific information.  REMEMBER that only the first SEVEN characters of these names are  guaranteed to be unique.  First declare the three types that are allowed for MINIDIAL versions.*/staticMDMINF CCITT =				/* CCITT / ITU-T V.25bis autodialer *//*  According to V.25bis:  . Even parity is required for giving commands to the modem.  . Commands might or might not echo.  . Responses ("Indications") from the modem are terminated by CR and LF.  . Call setup is accomplished by:    - DTE raises DTR (V.24 circuit 108)              [ttopen() does this]    - Modem raises CTS (V.24 circuit 106)            [C-Kermit ignores this]    - DTE issues a call request command ("CRN")    - Modem responds with "VAL" ("command accepted")    - If the call is completed:        modem responds with "CNX" ("call connected");        modem turns CTS (106) OFF;        modem turns DSR (107) ON;      else:        modem responds with "CFI <parameter>" ("call failure indication").  . To clear a call, the DTE turns DTR (108) OFF.  . There is no mention of the Carrier Detect circuit (109) in the standard.  . There is no provision for "escaping back" to the modem's command mode.  It is not known whether there exists in real life a pure V.25bis modem.  If there is, this code has never been tested on it.  See the Digitel entry.*/    {    "CCITT / ITU-T V.25bis autodialer",    "",			/* pulse command */    "",			/* tone command */    40,			/* dial_time -- programmable -- */    ",:",		/* pause_chars -- "," waits for programmable time */                        /* ":" waits for dial tone */    10,			/* pause_time (seconds, just a guess) */    "",			/* wake_str (none) */    200,		/* wake_rate (msec) */    "VAL",		/* wake_prompt */    "",			/* dmode_str (none) */    "",			/* dmode_prompt (none) */    "CRN%s\015",        /* dial_str */    200,		/* dial_rate (msec) */    0,			/* No esc_time */    0,			/* No esc_char  */    "",			/* No hup_str  */    "",			/* hwfc_str */    "",			/* swfc_str */    "",			/* nofc_str */    "",			/* ec_on_str */    "",			/* ec_off_str */    "",			/* dc_on_str */    "",			/* dc_off_str */    "",			/* aa_on_str */    "",			/* aa_off_str */    "",			/* sb_on_str */    "",			/* sb_off_str */    0L,			/* max_speed */    CKD_V25,		/* capas */    NULL		/* No ok_fn    */};staticMDMINF HAYES =				/* Hayes 2400 and compatible modems */    {    "Hayes Smartmodem 2400 and compatibles",    "ATP\015",				/* pulse command */    "ATT\015",				/* tone command */    35,					/* dial_time */    ",",				/* pause_chars */    2,					/* pause_time */#ifdef OS2    "ATQ0&S0&C1&D2\015",		/* wake_str */#else    "ATQ0\015",				/* wake_str */#endif /* OS2 */    0,					/* wake_rate */    "OK\015",				/* wake_prompt */    "",					/* dmode_str */    "",					/* dmode_prompt */    "ATD%s\015",			/* dial_str, user supplies D or T */    0,					/* dial_rate */    1100,				/* esc_time */    43,					/* esc_char */    "ATQ0H0\015",			/* hup_str */    "",					/* hwfc_str */    "",					/* swfc_str */    "",					/* nofc_str */    "",					/* ec_on_str */    "",					/* ec_off_str */    "",					/* dc_on_str */    "",					/* dc_off_str */    "ATS0=1\015",			/* aa_on_str */    "ATS0=0\015",			/* aa_off_str */    "",					/* sb_on_str */    "",					/* sb_off_str */    2400L,				/* max_speed */    CKD_AT,				/* capas */    getok				/* ok_fn */};/*  The intent of the "unknown" modem is to allow KERMIT to support  unknown modems by having the user type the entire autodial sequence  (possibly including control characters, etc.) as the "phone number".  The protocol and other characteristics of this modem are unknown, with  some "reasonable" values being chosen for some of them.  The only way to  detect if a connection is made is to look for carrier.*/staticMDMINF UNKNOWN =			/* Information for "Unknown" modem */    {    "Unknown",				/* name */    "",					/* pulse command */    "",					/* tone command */    30,					/* dial_time */    "",					/* pause_chars */    0,					/* pause_time */    "",					/* wake_str */    0,					/* wake_rate */    "",					/* wake_prompt */    "",					/* dmode_str */    NULL,				/* dmode_prompt */    "%s\015",				/* dial_str */    0,					/* dial_rate */    0,					/* esc_time */    0,					/* esc_char */    "",					/* hup_str */    "",					/* hwfc_str */    "",					/* swfc_str */    "",					/* nofc_str */    "",					/* ec_on_str */    "",					/* ec_off_str */    "",					/* dc_on_str */    "",					/* dc_off_str */    "",					/* aa_on_str */    "",					/* aa_off_str */    "",					/* sb_on_str */    "",					/* sb_off_str */    0L,					/* max_speed */    0,					/* capas */    NULL				/* ok_fn */};#ifndef MINIDIALstaticMDMINF ATTISN =				/* AT&T ISN Network */    {    "",					/* pulse command */    "",					/* tone command */    "AT&T ISN Network",    30,					/* Dial time */    "",					/* Pause characters */    0,					/* Pause time */    "\015\015\015\015",			/* Wake string */    900,				/* Wake rate */    "DIAL",				/* Wake prompt */    "",					/* dmode_str */    "",					/* dmode_prompt */    "%s\015",				/* dial_str */    0,					/* dial_rate */    0,					/* esc_time */    0,					/* esc_char */    "",					/* hup_str */    "",					/* hwfc_str */    "",					/* swfc_str */    "",					/* nofc_str */    "",					/* ec_on_str */    "",					/* ec_off_str */    "",					/* dc_on_str */    "",					/* dc_off_str */    "",					/* aa_on_str */    "",					/* aa_off_str */    "",					/* sb_on_str */    "",					/* sb_off_str */    0L,					/* max_speed */    0,					/* capas */    NULL				/* ok_fn */};staticMDMINF ATTMODEM =	/* information for AT&T switched-network modems */			/* "Number" following "dial" can include: p's and			 * t's to indicate pulse or tone (default) dialing,			 * + for wait for dial tone, , for pause, r for			 * last number dialed, and, except for 2224B, some			 * comma-delimited options like o12=y, before number. * "Important" options for the modems: * *	All:		Except for 2224B, enable option 12 for "transparent *			data," o12=y.  If a computer port used for both *			incoming and outgoing calls is connected to the *			modem, disable "enter interactive mode on carriage *			return," EICR.  The Kermit "dial" command can *			function with EIA leads standard, EIAS. * *	2212C:		Internal hardware switches at their default *			positions (four rockers down away from numbers) *			unless EICR is not wanted (rocker down at the 4). *			For EIAS, rocker down at the 1. * *	2224B:		Front-panel switch position 1 must be up (at the 1, *			closed).  Disable EICR with position 2 down. *			For EIAS, position 4 down. *			All switches on the back panel down. * *	2224CEO:	All front-panel switches down except either 5 or 6. *			Enable interactive flow control with o16=y. *			Select normal asynchronous mode with o34=0 (zero). *			Disable EICR with position 3 up.  For EIAS, 1 up. *			Reset the modem after changing switches. * *	2296A:		If option 00 (zeros) is present, use o00=0. *			Enable interactive flow control with o16=y. *			Select normal asynchronous mode with o34=0 (zero). *                      (available in Microcom Networking version, but *                      not necessarily other models of the 2296A). *			Enable modem-port flow control (if available) with * 			o42=y.  Enable asynchronous operation with o50=y. * 			Disable EICR with o69=n.  For EIAS, o66=n, using * 			front panel. */    {   "AT&T switched-network modems",    "",					/* pulse command */    "",					/* tone command */    20,					/* dial_time */    ",",				/* pause_chars */    2,					/* pause_time */    "+",				/* wake_str */    0,					/* wake_rate */    "",					/* wake_prompt */    "",					/* dmode_str */    "",					/* dmode_prompt */    "at%s\015",				/* dial_str */    0,					/* dial_rate */    0,					/* esc_time */    0,					/* esc_char */    "",					/* hup_str */    "",					/* hwfc_str */    "",					/* swfc_str */    "",					/* nofc_str */    "",					/* ec_on_str */    "",					/* ec_off_str */    "",					/* dc_on_str */    "",					/* dc_off_str */    "",					/* aa_on_str */    "",					/* aa_off_str */    "",					/* sb_on_str */    "",					/* sb_off_str */    0L,					/* max_speed */    CKD_AT,				/* capas */    NULL				/* ok_fn */};staticMDMINF ATTDTDM = /* AT&T Digital Terminal Data Module  */		 /* For dialing: KYBD switch down, others usually up. */    {    "AT&T Digital Terminal Data Module",    "",					/* pulse command */    "",					/* tone command */    20,					/* dial_time */    "",					/* pause_chars */    0,					/* pause_time */    "",					/* wake_str */    0,					/* wake_rate */    "",					/* wake_prompt */    "",					/* dmode_str */    "",					/* dmode_prompt */    "%s\015",				/* dial_str */     0,					/* dial_rate */    0,					/* esc_time */    0,					/* esc_char */    "",					/* hup_str */    "",					/* hwfc_str */    "",					/* swfc_str */    "",					/* nofc_str */    "",					/* ec_on_str */    "",					/* ec_off_str */    "",					/* dc_on_str */    "",					/* dc_off_str */    "",					/* aa_on_str */    "",					/* aa_off_str */    "",					/* sb_on_str */    "",					/* sb_off_str */    0L,					/* max_speed */    0,					/* capas */    NULL				/* ok_fn */};staticMDMINF DIGITEL =        /* Digitel DT-22 CCITT variant used in Brazil *//*  Attempts to adhere strictly to the V.25bis specification do not produce good  results in real life.  The modem for which this code was developed: (a)  ignores parity; (b) sometimes terminates responses with LF CR instead of CR  LF; (c) has a Hayes-like escape sequence; (d) supports a hangup ("HUP")  command.  Information from Fernando Cabral in Brasilia.*/    {    "Digitel DT-22 CCITT dialer",    "",				/* pulse command */    "",				/* tone command */    40,				/* dial_time -- programmable -- */    ",:",		/* pause_chars -- "," waits for programmable time */                        /* ":" waits for dial tone */    10,			/* pause_time (seconds, just a guess) */    "HUP\015",          /* wake_str (Not Standard CCITT) */    200,		/* wake_rate (msec) */    "VAL",		/* wake_prompt */    "",			/* dmode_str (none) */    "",			/* dmode_prompt (none) */    "CRN%s\015",        /* dial_str */    200,		/* dial_rate (msec) */    1100,		/* esc_time (Not Standard CCITT) */    43,			/* esc_char  (Not Standard CCITT) */    "HUP\015",		/* hup_str  (Not Standard CCITT) */    "",					/* hwfc_str */    "",					/* swfc_str */    "",					/* nofc_str */    "",					/* ec_on_str */    "",					/* ec_off_str */    "",					/* dc_on_str */    "",					/* dc_off_str */    "",					/* aa_on_str */    "",					/* aa_off_str */    "",					/* sb_on_str */    "",					/* sb_off_str */    0L,					/* max_speed */    CKD_V25,				/* capas */    getok				/* ok_fn */};staticMDMINF H_1200 =		/* Hayes 1200 and compatible modems */    {    "Hayes Smartmodem 1200 and compatibles",    "ATP\015",				/* pulse command */    "ATT\015",				/* tone command */    35,					/* dial_time */    ",",				/* pause_chars */    2,					/* pause_time */    "ATQ0\015",				/* wake_str */    0,					/* wake_rate */    "OK\015",				/* wake_prompt */    "",					/* dmode_str */    "",					/* dmode_prompt */

⌨️ 快捷键说明

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