1 /* $Id: isdn_tty.h,v 1.22 2000/06/21 09:54:29 keil Exp $
3 * header for Linux ISDN subsystem, tty related functions (linklevel).
5 * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
6 * Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <linux/config.h>
32 * Definition of some special Registers of AT-Emulator
35 #define REG_RINGCNT 1 /* ring counter register */
43 #define REG_RESP 12 /* show response messages register */
44 #define BIT_RESP 1 /* show response messages bit */
45 #define REG_RESPNUM 12 /* show numeric responses register */
46 #define BIT_RESPNUM 2 /* show numeric responses bit */
64 #define BIT_T70_EXT 32
69 #define REG_CIDONCE 13
70 #define BIT_CIDONCE 16
71 #define REG_RUNG 13 /* show RUNG message register */
72 #define BIT_RUNG 64 /* show RUNG message bit */
73 #define REG_DISPLAY 13
74 #define BIT_DISPLAY 128
90 /* defines for result codes */
92 #define RESULT_CONNECT 1
94 #define RESULT_NO_CARRIER 3
95 #define RESULT_ERROR 4
96 #define RESULT_CONNECT64000 5
97 #define RESULT_NO_DIALTONE 6
99 #define RESULT_NO_ANSWER 8
100 #define RESULT_RINGING 9
101 #define RESULT_NO_MSN_EAZ 10
102 #define RESULT_VCON 11
103 #define RESULT_RUNG 12
105 #define TTY_IS_FCLASS1(info) \
106 ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
107 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS1))
108 #define TTY_IS_FCLASS2(info) \
109 ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
110 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS2))
112 extern void isdn_tty_modem_escape(void);
113 extern void isdn_tty_modem_ring(void);
114 extern void isdn_tty_carrier_timeout(void);
115 extern void isdn_tty_modem_xmit(void);
116 extern int isdn_tty_modem_init(void);
117 extern void isdn_tty_readmodem(void);
118 extern int isdn_tty_find_icall(int, int, setup_parm
*);
119 extern void isdn_tty_cleanup_xmit(modem_info
*);
120 extern int isdn_tty_stat_callback(int, isdn_ctrl
*);
121 extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff
*);
122 extern int isdn_tty_capi_facility(capi_msg
*cm
);
123 extern void isdn_tty_at_cout(char *, modem_info
*);
124 extern void isdn_tty_modem_hup(modem_info
*, int);
125 #ifdef CONFIG_ISDN_TTY_FAX
126 extern int isdn_tty_cmd_PLUSF_FAX(char **, modem_info
*);
127 extern int isdn_tty_fax_command(modem_info
*, isdn_ctrl
*);
128 extern void isdn_tty_fax_bitorder(modem_info
*, struct sk_buff
*);