isdn_tty.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /* $Id: isdn_tty.h,v 1.1.2.2 2004/01/12 22:37:19 keil Exp $
  2. *
  3. * header for Linux ISDN subsystem, tty related functions (linklevel).
  4. *
  5. * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
  6. * Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
  7. *
  8. * This software may be used and distributed according to the terms
  9. * of the GNU General Public License, incorporated herein by reference.
  10. *
  11. */
  12. #define DLE 0x10
  13. #define ETX 0x03
  14. #define DC4 0x14
  15. /*
  16. * Definition of some special Registers of AT-Emulator
  17. */
  18. #define REG_RINGATA 0
  19. #define REG_RINGCNT 1 /* ring counter register */
  20. #define REG_ESC 2
  21. #define REG_CR 3
  22. #define REG_LF 4
  23. #define REG_BS 5
  24. #define REG_WAITC 7
  25. #define REG_RESP 12 /* show response messages register */
  26. #define BIT_RESP 1 /* show response messages bit */
  27. #define REG_RESPNUM 12 /* show numeric responses register */
  28. #define BIT_RESPNUM 2 /* show numeric responses bit */
  29. #define REG_ECHO 12
  30. #define BIT_ECHO 4
  31. #define REG_DCD 12
  32. #define BIT_DCD 8
  33. #define REG_CTS 12
  34. #define BIT_CTS 16
  35. #define REG_DTRR 12
  36. #define BIT_DTRR 32
  37. #define REG_DSR 12
  38. #define BIT_DSR 64
  39. #define REG_CPPP 12
  40. #define BIT_CPPP 128
  41. #define REG_DXMT 13
  42. #define BIT_DXMT 1
  43. #define REG_T70 13
  44. #define BIT_T70 2
  45. #define BIT_T70_EXT 32
  46. #define REG_DTRHUP 13
  47. #define BIT_DTRHUP 4
  48. #define REG_RESPXT 13
  49. #define BIT_RESPXT 8
  50. #define REG_CIDONCE 13
  51. #define BIT_CIDONCE 16
  52. #define REG_RUNG 13 /* show RUNG message register */
  53. #define BIT_RUNG 64 /* show RUNG message bit */
  54. #define REG_DISPLAY 13
  55. #define BIT_DISPLAY 128
  56. #define REG_L2PROT 14
  57. #define REG_L3PROT 15
  58. #define REG_PSIZE 16
  59. #define REG_WSIZE 17
  60. #define REG_SI1 18
  61. #define REG_SI2 19
  62. #define REG_SI1I 20
  63. #define REG_PLAN 21
  64. #define REG_SCREEN 22
  65. #define REG_CPN 23
  66. #define BIT_CPN 1
  67. #define REG_CPNFCON 23
  68. #define BIT_CPNFCON 2
  69. #define REG_CDN 23
  70. #define BIT_CDN 4
  71. /* defines for result codes */
  72. #define RESULT_OK 0
  73. #define RESULT_CONNECT 1
  74. #define RESULT_RING 2
  75. #define RESULT_NO_CARRIER 3
  76. #define RESULT_ERROR 4
  77. #define RESULT_CONNECT64000 5
  78. #define RESULT_NO_DIALTONE 6
  79. #define RESULT_BUSY 7
  80. #define RESULT_NO_ANSWER 8
  81. #define RESULT_RINGING 9
  82. #define RESULT_NO_MSN_EAZ 10
  83. #define RESULT_VCON 11
  84. #define RESULT_RUNG 12
  85. #define TTY_IS_FCLASS1(info) \
  86. ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
  87. (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS1))
  88. #define TTY_IS_FCLASS2(info) \
  89. ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
  90. (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS2))
  91. extern void isdn_tty_modem_escape(void);
  92. extern void isdn_tty_modem_ring(void);
  93. extern void isdn_tty_carrier_timeout(void);
  94. extern void isdn_tty_modem_xmit(void);
  95. extern int isdn_tty_modem_init(void);
  96. extern void isdn_tty_exit(void);
  97. extern void isdn_tty_readmodem(void);
  98. extern int isdn_tty_find_icall(int, int, setup_parm *);
  99. extern int isdn_tty_stat_callback(int, isdn_ctrl *);
  100. extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);
  101. extern int isdn_tty_capi_facility(capi_msg *cm);
  102. extern void isdn_tty_at_cout(char *, modem_info *);
  103. extern void isdn_tty_modem_hup(modem_info *, int);
  104. #ifdef CONFIG_ISDN_TTY_FAX
  105. extern int isdn_tty_cmd_PLUSF_FAX(char **, modem_info *);
  106. extern int isdn_tty_fax_command(modem_info *, isdn_ctrl *);
  107. extern void isdn_tty_fax_bitorder(modem_info *, struct sk_buff *);
  108. #endif