capicmd.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* $Id: capicmd.h,v 1.2.6.2 2001/09/23 22:24:33 kai Exp $
  2. *
  3. * CAPI 2.0 Interface for Linux
  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 __CAPICMD_H__
  12. #define __CAPICMD_H__
  13. #define CAPI_MSG_BASELEN 8
  14. #define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
  15. #define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
  16. /*----- CAPI commands -----*/
  17. #define CAPI_ALERT 0x01
  18. #define CAPI_CONNECT 0x02
  19. #define CAPI_CONNECT_ACTIVE 0x03
  20. #define CAPI_CONNECT_B3_ACTIVE 0x83
  21. #define CAPI_CONNECT_B3 0x82
  22. #define CAPI_CONNECT_B3_T90_ACTIVE 0x88
  23. #define CAPI_DATA_B3 0x86
  24. #define CAPI_DISCONNECT_B3 0x84
  25. #define CAPI_DISCONNECT 0x04
  26. #define CAPI_FACILITY 0x80
  27. #define CAPI_INFO 0x08
  28. #define CAPI_LISTEN 0x05
  29. #define CAPI_MANUFACTURER 0xff
  30. #define CAPI_RESET_B3 0x87
  31. #define CAPI_SELECT_B_PROTOCOL 0x41
  32. /*----- CAPI subcommands -----*/
  33. #define CAPI_REQ 0x80
  34. #define CAPI_CONF 0x81
  35. #define CAPI_IND 0x82
  36. #define CAPI_RESP 0x83
  37. /*----- CAPI combined commands -----*/
  38. #define CAPICMD(cmd,subcmd) (((cmd)<<8)|(subcmd))
  39. #define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ)
  40. #define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF)
  41. #define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND)
  42. #define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP)
  43. #define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ)
  44. #define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF)
  45. #define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ)
  46. #define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF)
  47. #define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND)
  48. #define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP)
  49. #define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ)
  50. #define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF)
  51. #define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND)
  52. #define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP)
  53. #define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ)
  54. #define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF)
  55. #define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ)
  56. #define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF)
  57. #define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND)
  58. #define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP)
  59. #define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ)
  60. #define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF)
  61. #define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND)
  62. #define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP)
  63. #define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND)
  64. #define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP)
  65. #define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ)
  66. #define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF)
  67. #define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND)
  68. #define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP)
  69. #define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ)
  70. #define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF)
  71. #define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND)
  72. #define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP)
  73. #define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ)
  74. #define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF)
  75. #define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND)
  76. #define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP)
  77. #define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ)
  78. #define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF)
  79. #define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ)
  80. #define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF)
  81. #define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND)
  82. #define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP)
  83. #define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ)
  84. #define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF)
  85. #define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND)
  86. #define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP)
  87. #define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ)
  88. #define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF)
  89. #define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND)
  90. #define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP)
  91. #endif /* __CAPICMD_H__ */