1 /* $Id: isdn_tty.h,v 1.1.2.2 2004/01/12 22:37:19 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 software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference.
20 * Definition of some special Registers of AT-Emulator
23 #define REG_RINGCNT 1 /* ring counter register */
31 #define REG_RESP 12 /* show response messages register */
32 #define BIT_RESP 1 /* show response messages bit */
33 #define REG_RESPNUM 12 /* show numeric responses register */
34 #define BIT_RESPNUM 2 /* show numeric responses bit */
52 #define BIT_T70_EXT 32
57 #define REG_CIDONCE 13
58 #define BIT_CIDONCE 16
59 #define REG_RUNG 13 /* show RUNG message register */
60 #define BIT_RUNG 64 /* show RUNG message bit */
61 #define REG_DISPLAY 13
62 #define BIT_DISPLAY 128
76 #define REG_CPNFCON 23
81 /* defines for result codes */
83 #define RESULT_CONNECT 1
85 #define RESULT_NO_CARRIER 3
86 #define RESULT_ERROR 4
87 #define RESULT_CONNECT64000 5
88 #define RESULT_NO_DIALTONE 6
90 #define RESULT_NO_ANSWER 8
91 #define RESULT_RINGING 9
92 #define RESULT_NO_MSN_EAZ 10
93 #define RESULT_VCON 11
94 #define RESULT_RUNG 12
96 #define TTY_IS_FCLASS1(info) \
97 ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
98 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS1))
99 #define TTY_IS_FCLASS2(info) \
100 ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
101 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS2))
103 extern void isdn_tty_modem_escape(void);
104 extern void isdn_tty_modem_ring(void);
105 extern void isdn_tty_carrier_timeout(void);
106 extern void isdn_tty_modem_xmit(void);
107 extern int isdn_tty_modem_init(void);
108 extern void isdn_tty_exit(void);
109 extern void isdn_tty_readmodem(void);
110 extern int isdn_tty_find_icall(int, int, setup_parm *);
111 extern int isdn_tty_stat_callback(int, isdn_ctrl *);
112 extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);
113 extern int isdn_tty_capi_facility(capi_msg *cm);
114 extern void isdn_tty_at_cout(char *, modem_info *);
115 extern void isdn_tty_modem_hup(modem_info *, int);
116 #ifdef CONFIG_ISDN_TTY_FAX
117 extern int isdn_tty_cmd_PLUSF_FAX(char **, modem_info *);
118 extern int isdn_tty_fax_command(modem_info *, isdn_ctrl *);
119 extern void isdn_tty_fax_bitorder(modem_info *, struct sk_buff *);