capidrv.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:5k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id: capidrv.h,v 1.1.4.1 2001/11/20 14:19:34 kai Exp $
  2.  *
  3.  * ISDN4Linux Driver, using capi20 interface (kernelcapi)
  4.  *
  5.  * Copyright 1997 by Carsten Paeth <calle@calle.de>
  6.  *
  7.  * This software may be used and distributed according to the terms
  8.  * of the GNU General Public License, incorporated herein by reference.
  9.  *
  10.  */
  11. #ifndef __CAPIDRV_H__
  12. #define __CAPIDRV_H__
  13. /*
  14.  * LISTEN state machine
  15.  */
  16. #define ST_LISTEN_NONE 0 /* L-0 */
  17. #define ST_LISTEN_WAIT_CONF 1 /* L-0.1 */
  18. #define ST_LISTEN_ACTIVE 2 /* L-1 */
  19. #define ST_LISTEN_ACTIVE_WAIT_CONF 3 /* L-1.1 */
  20. #define EV_LISTEN_REQ 1 /* L-0 -> L-0.1
  21.    L-1 -> L-1.1 */
  22. #define EV_LISTEN_CONF_ERROR 2 /* L-0.1 -> L-0
  23.    L-1.1 -> L-1 */
  24. #define EV_LISTEN_CONF_EMPTY 3 /* L-0.1 -> L-0
  25.    L-1.1 -> L-0 */
  26. #define EV_LISTEN_CONF_OK 4 /* L-0.1 -> L-1
  27.    L-1.1 -> L.1 */
  28. /*
  29.  * per plci state machine
  30.  */
  31. #define ST_PLCI_NONE 0 /* P-0 */
  32. #define ST_PLCI_OUTGOING  1 /* P-0.1 */
  33. #define ST_PLCI_ALLOCATED 2 /* P-1 */
  34. #define ST_PLCI_ACTIVE 3 /* P-ACT */
  35. #define ST_PLCI_INCOMING 4 /* P-2 */
  36. #define ST_PLCI_FACILITY_IND 5 /* P-3 */
  37. #define ST_PLCI_ACCEPTING 6 /* P-4 */
  38. #define ST_PLCI_DISCONNECTING 7 /* P-5 */
  39. #define ST_PLCI_DISCONNECTED 8 /* P-6 */
  40. #define ST_PLCI_RESUMEING 9 /* P-0.Res */
  41. #define ST_PLCI_RESUME 10 /* P-Res */
  42. #define ST_PLCI_HELD 11 /* P-HELD */
  43. #define EV_PLCI_CONNECT_REQ 1 /* P-0 -> P-0.1
  44.                                                  */
  45. #define EV_PLCI_CONNECT_CONF_ERROR 2 /* P-0.1 -> P-0
  46.                                                  */
  47. #define EV_PLCI_CONNECT_CONF_OK 3 /* P-0.1 -> P-1
  48.                                                  */
  49. #define EV_PLCI_FACILITY_IND_UP 4 /* P-0 -> P-1
  50.                                                  */
  51. #define EV_PLCI_CONNECT_IND 5 /* P-0 -> P-2
  52.                                                  */
  53. #define EV_PLCI_CONNECT_ACTIVE_IND 6 /* P-1 -> P-ACT
  54.                                                  */
  55. #define EV_PLCI_CONNECT_REJECT 7 /* P-2 -> P-5
  56.    P-3 -> P-5
  57.  */
  58. #define EV_PLCI_DISCONNECT_REQ 8 /* P-1 -> P-5
  59.    P-2 -> P-5
  60.    P-3 -> P-5
  61.    P-4 -> P-5
  62.    P-ACT -> P-5
  63.    P-Res -> P-5 (*)
  64.    P-HELD -> P-5 (*)
  65.    */
  66. #define EV_PLCI_DISCONNECT_IND 9 /* P-1 -> P-6
  67.    P-2 -> P-6
  68.    P-3 -> P-6
  69.    P-4 -> P-6
  70.    P-5 -> P-6
  71.    P-ACT -> P-6
  72.    P-Res -> P-6 (*)
  73.    P-HELD -> P-6 (*)
  74.    */
  75. #define EV_PLCI_FACILITY_IND_DOWN 10 /* P-0.1 -> P-5
  76.    P-1 -> P-5
  77.    P-ACT -> P-5
  78.    P-2 -> P-5
  79.    P-3 -> P-5
  80.    P-4 -> P-5
  81.    */
  82. #define EV_PLCI_DISCONNECT_RESP 11 /* P-6 -> P-0
  83.                                                    */
  84. #define EV_PLCI_CONNECT_RESP 12 /* P-6 -> P-0
  85.                                                    */
  86. #define EV_PLCI_RESUME_REQ 13 /* P-0 -> P-0.Res
  87.                                                  */
  88. #define EV_PLCI_RESUME_CONF_OK 14 /* P-0.Res -> P-Res
  89.                                                  */
  90. #define EV_PLCI_RESUME_CONF_ERROR 15 /* P-0.Res -> P-0
  91.                                                  */
  92. #define EV_PLCI_RESUME_IND 16 /* P-Res -> P-ACT
  93.                                                  */
  94. #define EV_PLCI_HOLD_IND 17 /* P-ACT -> P-HELD
  95.                                                  */
  96. #define EV_PLCI_RETRIEVE_IND 18 /* P-HELD -> P-ACT
  97.                                                  */
  98. #define EV_PLCI_SUSPEND_IND 19 /* P-ACT -> P-5
  99.                                                  */
  100. #define EV_PLCI_CD_IND 20 /* P-2 -> P-5
  101.                                                  */
  102. /*
  103.  * per ncci state machine
  104.  */
  105. #define ST_NCCI_PREVIOUS -1
  106. #define ST_NCCI_NONE 0 /* N-0 */
  107. #define ST_NCCI_OUTGOING 1 /* N-0.1 */
  108. #define ST_NCCI_INCOMING 2 /* N-1 */
  109. #define ST_NCCI_ALLOCATED 3 /* N-2 */
  110. #define ST_NCCI_ACTIVE 4 /* N-ACT */
  111. #define ST_NCCI_RESETING 5 /* N-3 */
  112. #define ST_NCCI_DISCONNECTING 6 /* N-4 */
  113. #define ST_NCCI_DISCONNECTED 7 /* N-5 */
  114. #define EV_NCCI_CONNECT_B3_REQ 1 /* N-0 -> N-0.1 */
  115. #define EV_NCCI_CONNECT_B3_IND 2 /* N-0 -> N.1 */
  116. #define EV_NCCI_CONNECT_B3_CONF_OK 3 /* N-0.1 -> N.2 */
  117. #define EV_NCCI_CONNECT_B3_CONF_ERROR 4 /* N-0.1 -> N.0 */
  118. #define EV_NCCI_CONNECT_B3_REJECT 5 /* N-1 -> N-4 */
  119. #define EV_NCCI_CONNECT_B3_RESP 6 /* N-1 -> N-2 */
  120. #define EV_NCCI_CONNECT_B3_ACTIVE_IND 7 /* N-2 -> N-ACT */
  121. #define EV_NCCI_RESET_B3_REQ 8 /* N-ACT -> N-3 */
  122. #define EV_NCCI_RESET_B3_IND 9 /* N-3 -> N-ACT */
  123. #define EV_NCCI_DISCONNECT_B3_IND 10 /* N-4 -> N.5 */
  124. #define EV_NCCI_DISCONNECT_B3_CONF_ERROR 11 /* N-4 -> previous */
  125. #define EV_NCCI_DISCONNECT_B3_REQ 12 /* N-1 -> N-4
  126.    N-2 -> N-4
  127.    N-3 -> N-4
  128.    N-ACT -> N-4 */
  129. #define EV_NCCI_DISCONNECT_B3_RESP 13 /* N-5 -> N-0 */
  130. #endif /* __CAPIDRV_H__ */