| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 |  | 
 | 2 | /* | 
 | 3 |  * | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 4 |  Copyright (c) Eicon Networks, 2002. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 |  * | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 6 |  This source file is supplied for the use with | 
 | 7 |  Eicon Networks range of DIVA Server Adapters. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 |  * | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 9 |  Eicon File Revision :    2.1 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 |  * | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 11 |  This program is free software; you can redistribute it and/or modify | 
 | 12 |  it under the terms of the GNU General Public License as published by | 
 | 13 |  the Free Software Foundation; either version 2, or (at your option) | 
 | 14 |  any later version. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 |  * | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 16 |  This program is distributed in the hope that it will be useful, | 
 | 17 |  but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY | 
 | 18 |  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 
 | 19 |  See the GNU General Public License for more details. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 |  * | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 21 |  You should have received a copy of the GNU General Public License | 
 | 22 |  along with this program; if not, write to the Free Software | 
 | 23 |  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 |  * | 
 | 25 |  */ | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 26 | #ifndef _INC_CAPI20 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | #define _INC_CAPI20 | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 28 | /* operations on message queues                             */ | 
 | 29 | /* the common device type for CAPI20 drivers */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | #define FILE_DEVICE_CAPI20 0x8001 | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 31 | /* DEVICE_CONTROL codes for user and kernel mode applications */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | #define CAPI20_CTL_REGISTER             0x0801 | 
 | 33 | #define CAPI20_CTL_RELEASE              0x0802 | 
 | 34 | #define CAPI20_CTL_GET_MANUFACTURER     0x0805 | 
 | 35 | #define CAPI20_CTL_GET_VERSION          0x0806 | 
 | 36 | #define CAPI20_CTL_GET_SERIAL           0x0807 | 
 | 37 | #define CAPI20_CTL_GET_PROFILE          0x0808 | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 38 | /* INTERNAL_DEVICE_CONTROL codes for kernel mode applicatios only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | #define CAPI20_CTL_PUT_MESSAGE          0x0803 | 
 | 40 | #define CAPI20_CTL_GET_MESSAGE          0x0804 | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 41 | /* the wrapped codes as required by the system */ | 
 | 42 | #define CAPI_CTL_CODE(f, m)             CTL_CODE(FILE_DEVICE_CAPI20, f, m, FILE_ANY_ACCESS) | 
 | 43 | #define IOCTL_CAPI_REGISTER             CAPI_CTL_CODE(CAPI20_CTL_REGISTER, METHOD_BUFFERED) | 
 | 44 | #define IOCTL_CAPI_RELEASE              CAPI_CTL_CODE(CAPI20_CTL_RELEASE, METHOD_BUFFERED) | 
 | 45 | #define IOCTL_CAPI_GET_MANUFACTURER     CAPI_CTL_CODE(CAPI20_CTL_GET_MANUFACTURER, METHOD_BUFFERED) | 
 | 46 | #define IOCTL_CAPI_GET_VERSION          CAPI_CTL_CODE(CAPI20_CTL_GET_VERSION, METHOD_BUFFERED) | 
 | 47 | #define IOCTL_CAPI_GET_SERIAL           CAPI_CTL_CODE(CAPI20_CTL_GET_SERIAL, METHOD_BUFFERED) | 
 | 48 | #define IOCTL_CAPI_GET_PROFILE          CAPI_CTL_CODE(CAPI20_CTL_GET_PROFILE, METHOD_BUFFERED) | 
 | 49 | #define IOCTL_CAPI_PUT_MESSAGE          CAPI_CTL_CODE(CAPI20_CTL_PUT_MESSAGE, METHOD_BUFFERED) | 
 | 50 | #define IOCTL_CAPI_GET_MESSAGE          CAPI_CTL_CODE(CAPI20_CTL_GET_MESSAGE, METHOD_BUFFERED) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | struct divas_capi_register_params  { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 52 | 	word MessageBufferSize; | 
 | 53 | 	word maxLogicalConnection; | 
 | 54 | 	word maxBDataBlocks; | 
 | 55 | 	word maxBDataLen; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | }; | 
 | 57 | struct divas_capi_version  { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 58 | 	word CapiMajor; | 
 | 59 | 	word CapiMinor; | 
 | 60 | 	word ManuMajor; | 
 | 61 | 	word ManuMinor; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | }; | 
 | 63 | typedef struct api_profile_s { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 64 | 	word          Number; | 
 | 65 | 	word          Channels; | 
 | 66 | 	dword         Global_Options; | 
 | 67 | 	dword         B1_Protocols; | 
 | 68 | 	dword         B2_Protocols; | 
 | 69 | 	dword         B3_Protocols; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | } API_PROFILE; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 71 | /* ISDN Common API message types                            */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | #define _ALERT_R                        0x8001 | 
 | 73 | #define _CONNECT_R                      0x8002 | 
 | 74 | #define _CONNECT_I                      0x8202 | 
 | 75 | #define _CONNECT_ACTIVE_I               0x8203 | 
 | 76 | #define _DISCONNECT_R                   0x8004 | 
 | 77 | #define _DISCONNECT_I                   0x8204 | 
 | 78 | #define _LISTEN_R                       0x8005 | 
 | 79 | #define _INFO_R                         0x8008 | 
 | 80 | #define _INFO_I                         0x8208 | 
 | 81 | #define _SELECT_B_REQ                   0x8041 | 
 | 82 | #define _FACILITY_R                     0x8080 | 
 | 83 | #define _FACILITY_I                     0x8280 | 
 | 84 | #define _CONNECT_B3_R                   0x8082 | 
 | 85 | #define _CONNECT_B3_I                   0x8282 | 
 | 86 | #define _CONNECT_B3_ACTIVE_I            0x8283 | 
 | 87 | #define _DISCONNECT_B3_R                0x8084 | 
 | 88 | #define _DISCONNECT_B3_I                0x8284 | 
 | 89 | #define _DATA_B3_R                      0x8086 | 
 | 90 | #define _DATA_B3_I                      0x8286 | 
 | 91 | #define _RESET_B3_R                     0x8087 | 
 | 92 | #define _RESET_B3_I                     0x8287 | 
 | 93 | #define _CONNECT_B3_T90_ACTIVE_I        0x8288 | 
 | 94 | #define _MANUFACTURER_R                 0x80ff | 
 | 95 | #define _MANUFACTURER_I                 0x82ff | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 96 | /* OR this to convert a REQUEST to a CONFIRM                */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | #define CONFIRM                 0x0100 | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 98 | /* OR this to convert a INDICATION to a RESPONSE            */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | #define RESPONSE                0x0100 | 
 | 100 | /*------------------------------------------------------------------*/ | 
 | 101 | /* diehl isdn private MANUFACTURER codes                            */ | 
 | 102 | /*------------------------------------------------------------------*/ | 
 | 103 | #define _DI_MANU_ID             0x44444944 | 
 | 104 | #define _DI_ASSIGN_PLCI         0x0001 | 
 | 105 | #define _DI_ADV_CODEC           0x0002 | 
 | 106 | #define _DI_DSP_CTRL            0x0003 | 
 | 107 | #define _DI_SIG_CTRL            0x0004 | 
 | 108 | #define _DI_RXT_CTRL            0x0005 | 
 | 109 | #define _DI_IDI_CTRL            0x0006 | 
 | 110 | #define _DI_CFG_CTRL            0x0007 | 
 | 111 | #define _DI_REMOVE_CODEC        0x0008 | 
 | 112 | #define _DI_OPTIONS_REQUEST     0x0009 | 
 | 113 | #define _DI_SSEXT_CTRL          0x000a | 
 | 114 | #define _DI_NEGOTIATE_B3        0x000b | 
 | 115 | /*------------------------------------------------------------------*/ | 
 | 116 | /* parameter structures                                             */ | 
 | 117 | /*------------------------------------------------------------------*/ | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 118 | /* ALERT-REQUEST                                            */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 120 | 	byte structs[0];      /* Additional Info */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 121 | } _ALT_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 122 | /* ALERT-CONFIRM                                            */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 124 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 125 | } _ALT_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 126 | /* CONNECT-REQUEST                                          */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 127 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 128 | 	word CIP_Value; | 
 | 129 | 	byte structs[0];      /* Called party number, | 
 | 130 | 				 Called party subaddress, | 
 | 131 | 				 Calling party number, | 
 | 132 | 				 Calling party subaddress, | 
 | 133 | 				 B_protocol, | 
 | 134 | 				 BC, | 
 | 135 | 				 LLC, | 
 | 136 | 				 HLC, | 
 | 137 | 				 Additional Info */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | } _CON_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 139 | /* CONNECT-CONFIRM                                          */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 141 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | } _CON_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 143 | /* CONNECT-INDICATION                                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 145 | 	word CIP_Value; | 
 | 146 | 	byte structs[0];      /* Called party number, | 
 | 147 | 				 Called party subaddress, | 
 | 148 | 				 Calling party number, | 
 | 149 | 				 Calling party subaddress, | 
 | 150 | 				 BC, | 
 | 151 | 				 LLC, | 
 | 152 | 				 HLC, | 
 | 153 | 				 Additional Info */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 154 | } _CON_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 155 | /* CONNECT-RESPONSE                                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 157 | 	word Accept; | 
 | 158 | 	byte structs[0];      /* B_protocol, | 
 | 159 | 				 Connected party number, | 
 | 160 | 				 Connected party subaddress, | 
 | 161 | 				 LLC */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | } _CON_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 163 | /* CONNECT-ACTIVE-INDICATION                                */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 165 | 	byte structs[0];      /* Connected party number, | 
 | 166 | 				 Connected party subaddress, | 
 | 167 | 				 LLC */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 168 | } _CON_A_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 169 | /* CONNECT-ACTIVE-RESPONSE                                  */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 170 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 171 | 	byte structs[0];      /* empty */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 172 | } _CON_A_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 173 | /* DISCONNECT-REQUEST                                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 174 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 175 | 	byte structs[0];      /* Additional Info */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | } _DIS_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 177 | /* DISCONNECT-CONFIRM                                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 179 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | } _DIS_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 181 | /* DISCONNECT-INDICATION                                    */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 182 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 183 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | } _DIS_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 185 | /* DISCONNECT-RESPONSE                                      */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 187 | 	byte structs[0];      /* empty */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | } _DIS_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 189 | /* LISTEN-REQUEST                                           */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 191 | 	dword Info_Mask; | 
 | 192 | 	dword CIP_Mask; | 
 | 193 | 	byte structs[0];      /* Calling party number, | 
 | 194 | 				 Calling party subaddress */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 195 | } _LIS_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 196 | /* LISTEN-CONFIRM                                           */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 198 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | } _LIS_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 200 | /* INFO-REQUEST                                             */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 202 | 	byte structs[0];      /* Called party number, | 
 | 203 | 				 Additional Info */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 204 | } _INF_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 205 | /* INFO-CONFIRM                                             */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 207 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | } _INF_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 209 | /* INFO-INDICATION                                          */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 210 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 211 | 	word Number; | 
 | 212 | 	byte structs[0];      /* Info element */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | } _INF_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 214 | /* INFO-RESPONSE                                            */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 216 | 	byte structs[0];      /* empty */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | } _INF_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 218 | /* SELECT-B-REQUEST                                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 219 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 220 | 	byte structs[0];      /* B-protocol */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | } _SEL_B_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 222 | /* SELECT-B-CONFIRM                                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 223 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 224 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | } _SEL_B_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 226 | /* FACILITY-REQUEST */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 228 | 	word Selector; | 
 | 229 | 	byte structs[0];      /* Facility parameters */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | } _FAC_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 231 | /* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 233 | 	byte  struct_length; | 
 | 234 | 	word  function; | 
 | 235 | 	byte  length; | 
 | 236 | 	word  SupplementaryServiceInfo; | 
 | 237 | 	dword SupportedServices; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 238 | } _FAC_CON_STRUCTS; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 239 | /* FACILITY-CONFIRM */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 240 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 241 | 	word Info; | 
 | 242 | 	word Selector; | 
 | 243 | 	byte structs[0];      /* Facility parameters */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 244 | } _FAC_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 245 | /* FACILITY-INDICATION */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 247 | 	word Selector; | 
 | 248 | 	byte structs[0];      /* Facility parameters */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 249 | } _FAC_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 250 | /* FACILITY-RESPONSE */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 252 | 	word Selector; | 
 | 253 | 	byte structs[0];      /* Facility parameters */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 254 | } _FAC_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 255 | /* CONNECT-B3-REQUEST                                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 257 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | } _CON_B3_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 259 | /* CONNECT-B3-CONFIRM                                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 261 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 262 | } _CON_B3_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 263 | /* CONNECT-B3-INDICATION                                    */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 264 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 265 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 266 | } _CON_B3_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 267 | /* CONNECT-B3-RESPONSE                                      */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 268 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 269 | 	word Accept; | 
 | 270 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 271 | } _CON_B3_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 272 | /* CONNECT-B3-ACTIVE-INDICATION                             */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 273 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 274 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | } _CON_B3_A_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 276 | /* CONNECT-B3-ACTIVE-RESPONSE                               */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 277 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 278 | 	byte structs[0];      /* empty */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | } _CON_B3_A_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 280 | /* DISCONNECT-B3-REQUEST                                    */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 281 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 282 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | } _DIS_B3_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 284 | /* DISCONNECT-B3-CONFIRM                                    */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 286 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 287 | } _DIS_B3_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 288 | /* DISCONNECT-B3-INDICATION                                 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 289 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 290 | 	word Info; | 
 | 291 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 292 | } _DIS_B3_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 293 | /* DISCONNECT-B3-RESPONSE                                   */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 294 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 295 | 	byte structs[0];      /* empty */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | } _DIS_B3_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 297 | /* DATA-B3-REQUEST                                          */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 299 | 	dword         Data; | 
 | 300 | 	word          Data_Length; | 
 | 301 | 	word          Number; | 
 | 302 | 	word          Flags; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | } _DAT_B3_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 304 | /* DATA-B3-REQUEST 64 BIT Systems                           */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 305 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 306 | 	dword         Data; | 
 | 307 | 	word          Data_Length; | 
 | 308 | 	word          Number; | 
 | 309 | 	word          Flags; | 
 | 310 | 	void          *pData; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 311 | } _DAT_B3_REQ64P; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 312 | /* DATA-B3-CONFIRM                                          */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 313 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 314 | 	word          Number; | 
 | 315 | 	word          Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 316 | } _DAT_B3_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 317 | /* DATA-B3-INDICATION                                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 319 | 	dword         Data; | 
 | 320 | 	word          Data_Length; | 
 | 321 | 	word          Number; | 
 | 322 | 	word          Flags; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | } _DAT_B3_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 324 | /* DATA-B3-INDICATION  64 BIT Systems                       */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 326 | 	dword         Data; | 
 | 327 | 	word          Data_Length; | 
 | 328 | 	word          Number; | 
 | 329 | 	word          Flags; | 
 | 330 | 	void          *pData; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 331 | } _DAT_B3_IND64P; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 332 | /* DATA-B3-RESPONSE                                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 333 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 334 | 	word          Number; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | } _DAT_B3_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 336 | /* RESET-B3-REQUEST                                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 337 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 338 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 339 | } _RES_B3_REQP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 340 | /* RESET-B3-CONFIRM                                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 341 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 342 | 	word Info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | } _RES_B3_CONP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 344 | /* RESET-B3-INDICATION                                      */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 345 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 346 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | } _RES_B3_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 348 | /* RESET-B3-RESPONSE                                        */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 349 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 350 | 	byte structs[0];      /* empty */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 351 | } _RES_B3_RESP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 352 | /* CONNECT-B3-T90-ACTIVE-INDICATION                         */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 354 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 355 | } _CON_B3_T90_A_INDP; | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 356 | /* CONNECT-B3-T90-ACTIVE-RESPONSE                           */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 357 | typedef struct { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 358 | 	word Reject; | 
 | 359 | 	byte structs[0];      /* NCPI */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 360 | } _CON_B3_T90_A_RESP; | 
 | 361 | /*------------------------------------------------------------------*/ | 
 | 362 | /* message structure                                                */ | 
 | 363 | /*------------------------------------------------------------------*/ | 
 | 364 | typedef struct _API_MSG CAPI_MSG; | 
 | 365 | typedef struct _MSG_HEADER CAPI_MSG_HEADER; | 
 | 366 | struct _API_MSG { | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 367 | 	struct _MSG_HEADER { | 
 | 368 | 		word        length; | 
 | 369 | 		word        appl_id; | 
 | 370 | 		word        command; | 
 | 371 | 		word        number; | 
 | 372 | 		byte        controller; | 
 | 373 | 		byte        plci; | 
 | 374 | 		word        ncci; | 
 | 375 | 	} header; | 
 | 376 | 	union { | 
 | 377 | 		_ALT_REQP           alert_req; | 
 | 378 | 		_ALT_CONP           alert_con; | 
 | 379 | 		_CON_REQP           connect_req; | 
 | 380 | 		_CON_CONP           connect_con; | 
 | 381 | 		_CON_INDP           connect_ind; | 
 | 382 | 		_CON_RESP           connect_res; | 
 | 383 | 		_CON_A_INDP         connect_a_ind; | 
 | 384 | 		_CON_A_RESP         connect_a_res; | 
 | 385 | 		_DIS_REQP           disconnect_req; | 
 | 386 | 		_DIS_CONP           disconnect_con; | 
 | 387 | 		_DIS_INDP           disconnect_ind; | 
 | 388 | 		_DIS_RESP           disconnect_res; | 
 | 389 | 		_LIS_REQP           listen_req; | 
 | 390 | 		_LIS_CONP           listen_con; | 
 | 391 | 		_INF_REQP           info_req; | 
 | 392 | 		_INF_CONP           info_con; | 
 | 393 | 		_INF_INDP           info_ind; | 
 | 394 | 		_INF_RESP           info_res; | 
 | 395 | 		_SEL_B_REQP         select_b_req; | 
 | 396 | 		_SEL_B_CONP         select_b_con; | 
 | 397 | 		_FAC_REQP           facility_req; | 
 | 398 | 		_FAC_CONP           facility_con; | 
 | 399 | 		_FAC_INDP           facility_ind; | 
 | 400 | 		_FAC_RESP           facility_res; | 
 | 401 | 		_CON_B3_REQP        connect_b3_req; | 
 | 402 | 		_CON_B3_CONP        connect_b3_con; | 
 | 403 | 		_CON_B3_INDP        connect_b3_ind; | 
 | 404 | 		_CON_B3_RESP        connect_b3_res; | 
 | 405 | 		_CON_B3_A_INDP      connect_b3_a_ind; | 
 | 406 | 		_CON_B3_A_RESP      connect_b3_a_res; | 
 | 407 | 		_DIS_B3_REQP        disconnect_b3_req; | 
 | 408 | 		_DIS_B3_CONP        disconnect_b3_con; | 
 | 409 | 		_DIS_B3_INDP        disconnect_b3_ind; | 
 | 410 | 		_DIS_B3_RESP        disconnect_b3_res; | 
 | 411 | 		_DAT_B3_REQP        data_b3_req; | 
 | 412 | 		_DAT_B3_REQ64P      data_b3_req64; | 
 | 413 | 		_DAT_B3_CONP        data_b3_con; | 
 | 414 | 		_DAT_B3_INDP        data_b3_ind; | 
 | 415 | 		_DAT_B3_IND64P      data_b3_ind64; | 
 | 416 | 		_DAT_B3_RESP        data_b3_res; | 
 | 417 | 		_RES_B3_REQP        reset_b3_req; | 
 | 418 | 		_RES_B3_CONP        reset_b3_con; | 
 | 419 | 		_RES_B3_INDP        reset_b3_ind; | 
 | 420 | 		_RES_B3_RESP        reset_b3_res; | 
 | 421 | 		_CON_B3_T90_A_INDP  connect_b3_t90_a_ind; | 
 | 422 | 		_CON_B3_T90_A_RESP  connect_b3_t90_a_res; | 
 | 423 | 		byte                b[200]; | 
 | 424 | 	} info; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 425 | }; | 
 | 426 | /*------------------------------------------------------------------*/ | 
 | 427 | /* non-fatal errors                                                 */ | 
 | 428 | /*------------------------------------------------------------------*/ | 
 | 429 | #define _NCPI_IGNORED           0x0001 | 
 | 430 | #define _FLAGS_IGNORED          0x0002 | 
 | 431 | #define _ALERT_IGNORED          0x0003 | 
 | 432 | /*------------------------------------------------------------------*/ | 
 | 433 | /* API function error codes                                         */ | 
 | 434 | /*------------------------------------------------------------------*/ | 
 | 435 | #define GOOD                            0x0000 | 
 | 436 | #define _TOO_MANY_APPLICATIONS          0x1001 | 
 | 437 | #define _BLOCK_TOO_SMALL                0x1002 | 
 | 438 | #define _BUFFER_TOO_BIG                 0x1003 | 
 | 439 | #define _MSG_BUFFER_TOO_SMALL           0x1004 | 
 | 440 | #define _TOO_MANY_CONNECTIONS           0x1005 | 
 | 441 | #define _REG_CAPI_BUSY                  0x1007 | 
 | 442 | #define _REG_RESOURCE_ERROR             0x1008 | 
 | 443 | #define _REG_CAPI_NOT_INSTALLED         0x1009 | 
 | 444 | #define _WRONG_APPL_ID                  0x1101 | 
 | 445 | #define _BAD_MSG                        0x1102 | 
 | 446 | #define _QUEUE_FULL                     0x1103 | 
 | 447 | #define _GET_NO_MSG                     0x1104 | 
 | 448 | #define _MSG_LOST                       0x1105 | 
 | 449 | #define _WRONG_NOTIFY                   0x1106 | 
 | 450 | #define _CAPI_BUSY                      0x1107 | 
 | 451 | #define _RESOURCE_ERROR                 0x1108 | 
 | 452 | #define _CAPI_NOT_INSTALLED             0x1109 | 
 | 453 | #define _NO_EXTERNAL_EQUIPMENT          0x110a | 
 | 454 | #define _ONLY_EXTERNAL_EQUIPMENT        0x110b | 
 | 455 | /*------------------------------------------------------------------*/ | 
 | 456 | /* addressing/coding error codes                                    */ | 
 | 457 | /*------------------------------------------------------------------*/ | 
 | 458 | #define _WRONG_STATE                    0x2001 | 
 | 459 | #define _WRONG_IDENTIFIER               0x2002 | 
 | 460 | #define _OUT_OF_PLCI                    0x2003 | 
 | 461 | #define _OUT_OF_NCCI                    0x2004 | 
 | 462 | #define _OUT_OF_LISTEN                  0x2005 | 
 | 463 | #define _OUT_OF_FAX                     0x2006 | 
 | 464 | #define _WRONG_MESSAGE_FORMAT           0x2007 | 
 | 465 | #define _OUT_OF_INTERCONNECT_RESOURCES  0x2008 | 
 | 466 | /*------------------------------------------------------------------*/ | 
 | 467 | /* configuration error codes                                        */ | 
 | 468 | /*------------------------------------------------------------------*/ | 
 | 469 | #define _B1_NOT_SUPPORTED                    0x3001 | 
 | 470 | #define _B2_NOT_SUPPORTED                    0x3002 | 
 | 471 | #define _B3_NOT_SUPPORTED                    0x3003 | 
 | 472 | #define _B1_PARM_NOT_SUPPORTED               0x3004 | 
 | 473 | #define _B2_PARM_NOT_SUPPORTED               0x3005 | 
 | 474 | #define _B3_PARM_NOT_SUPPORTED               0x3006 | 
 | 475 | #define _B_STACK_NOT_SUPPORTED               0x3007 | 
 | 476 | #define _NCPI_NOT_SUPPORTED                  0x3008 | 
 | 477 | #define _CIP_NOT_SUPPORTED                   0x3009 | 
 | 478 | #define _FLAGS_NOT_SUPPORTED                 0x300a | 
 | 479 | #define _FACILITY_NOT_SUPPORTED              0x300b | 
 | 480 | #define _DATA_LEN_NOT_SUPPORTED              0x300c | 
 | 481 | #define _RESET_NOT_SUPPORTED                 0x300d | 
 | 482 | #define _SUPPLEMENTARY_SERVICE_NOT_SUPPORTED 0x300e | 
 | 483 | #define _REQUEST_NOT_ALLOWED_IN_THIS_STATE   0x3010 | 
 | 484 | #define _FACILITY_SPECIFIC_FUNCTION_NOT_SUPP 0x3011 | 
 | 485 | /*------------------------------------------------------------------*/ | 
 | 486 | /* reason codes                                                     */ | 
 | 487 | /*------------------------------------------------------------------*/ | 
 | 488 | #define _L1_ERROR                       0x3301 | 
 | 489 | #define _L2_ERROR                       0x3302 | 
 | 490 | #define _L3_ERROR                       0x3303 | 
 | 491 | #define _OTHER_APPL_CONNECTED           0x3304 | 
 | 492 | #define _CAPI_GUARD_ERROR               0x3305 | 
 | 493 | #define _L3_CAUSE                       0x3400 | 
 | 494 | /*------------------------------------------------------------------*/ | 
 | 495 | /* b3 reason codes                                                  */ | 
 | 496 | /*------------------------------------------------------------------*/ | 
 | 497 | #define _B_CHANNEL_LOST                 0x3301 | 
 | 498 | #define _B2_ERROR                       0x3302 | 
 | 499 | #define _B3_ERROR                       0x3303 | 
 | 500 | /*------------------------------------------------------------------*/ | 
 | 501 | /* fax error codes                                                  */ | 
 | 502 | /*------------------------------------------------------------------*/ | 
 | 503 | #define _FAX_NO_CONNECTION              0x3311 | 
 | 504 | #define _FAX_TRAINING_ERROR             0x3312 | 
 | 505 | #define _FAX_REMOTE_REJECT              0x3313 | 
 | 506 | #define _FAX_REMOTE_ABORT               0x3314 | 
 | 507 | #define _FAX_PROTOCOL_ERROR             0x3315 | 
 | 508 | #define _FAX_TX_UNDERRUN                0x3316 | 
 | 509 | #define _FAX_RX_OVERFLOW                0x3317 | 
 | 510 | #define _FAX_LOCAL_ABORT                0x3318 | 
 | 511 | #define _FAX_PARAMETER_ERROR            0x3319 | 
 | 512 | /*------------------------------------------------------------------*/ | 
 | 513 | /* line interconnect error codes                                    */ | 
 | 514 | /*------------------------------------------------------------------*/ | 
 | 515 | #define _LI_USER_INITIATED               0x0000 | 
 | 516 | #define _LI_LINE_NO_LONGER_AVAILABLE     0x3805 | 
 | 517 | #define _LI_INTERCONNECT_NOT_ESTABLISHED 0x3806 | 
 | 518 | #define _LI_LINES_NOT_COMPATIBLE         0x3807 | 
 | 519 | #define _LI2_USER_INITIATED              0x0000 | 
 | 520 | #define _LI2_PLCI_HAS_NO_BCHANNEL        0x3800 | 
 | 521 | #define _LI2_LINES_NOT_COMPATIBLE        0x3801 | 
 | 522 | #define _LI2_NOT_IN_SAME_INTERCONNECTION 0x3802 | 
 | 523 | /*------------------------------------------------------------------*/ | 
 | 524 | /* global options                                                   */ | 
 | 525 | /*------------------------------------------------------------------*/ | 
 | 526 | #define GL_INTERNAL_CONTROLLER_SUPPORTED     0x00000001L | 
 | 527 | #define GL_EXTERNAL_EQUIPMENT_SUPPORTED      0x00000002L | 
 | 528 | #define GL_HANDSET_SUPPORTED                 0x00000004L | 
 | 529 | #define GL_DTMF_SUPPORTED                    0x00000008L | 
 | 530 | #define GL_SUPPLEMENTARY_SERVICES_SUPPORTED  0x00000010L | 
 | 531 | #define GL_CHANNEL_ALLOCATION_SUPPORTED      0x00000020L | 
 | 532 | #define GL_BCHANNEL_OPERATION_SUPPORTED      0x00000040L | 
 | 533 | #define GL_LINE_INTERCONNECT_SUPPORTED       0x00000080L | 
 | 534 | #define GL_ECHO_CANCELLER_SUPPORTED          0x00000100L | 
 | 535 | /*------------------------------------------------------------------*/ | 
 | 536 | /* protocol selection                                               */ | 
 | 537 | /*------------------------------------------------------------------*/ | 
 | 538 | #define B1_HDLC                 0 | 
 | 539 | #define B1_TRANSPARENT          1 | 
 | 540 | #define B1_V110_ASYNC           2 | 
 | 541 | #define B1_V110_SYNC            3 | 
 | 542 | #define B1_T30                  4 | 
 | 543 | #define B1_HDLC_INVERTED        5 | 
 | 544 | #define B1_TRANSPARENT_R        6 | 
 | 545 | #define B1_MODEM_ALL_NEGOTIATE  7 | 
 | 546 | #define B1_MODEM_ASYNC          8 | 
 | 547 | #define B1_MODEM_SYNC_HDLC      9 | 
 | 548 | #define B2_X75                  0 | 
 | 549 | #define B2_TRANSPARENT          1 | 
 | 550 | #define B2_SDLC                 2 | 
 | 551 | #define B2_LAPD                 3 | 
 | 552 | #define B2_T30                  4 | 
 | 553 | #define B2_PPP                  5 | 
 | 554 | #define B2_TRANSPARENT_NO_CRC   6 | 
 | 555 | #define B2_MODEM_EC_COMPRESSION 7 | 
 | 556 | #define B2_X75_V42BIS           8 | 
 | 557 | #define B2_V120_ASYNC           9 | 
 | 558 | #define B2_V120_ASYNC_V42BIS    10 | 
 | 559 | #define B2_V120_BIT_TRANSPARENT 11 | 
 | 560 | #define B2_LAPD_FREE_SAPI_SEL   12 | 
 | 561 | #define B3_TRANSPARENT          0 | 
 | 562 | #define B3_T90NL                1 | 
 | 563 | #define B3_ISO8208              2 | 
 | 564 | #define B3_X25_DCE              3 | 
 | 565 | #define B3_T30                  4 | 
 | 566 | #define B3_T30_WITH_EXTENSIONS  5 | 
 | 567 | #define B3_RESERVED             6 | 
 | 568 | #define B3_MODEM                7 | 
 | 569 | /*------------------------------------------------------------------*/ | 
 | 570 | /*  facility definitions                                            */ | 
 | 571 | /*------------------------------------------------------------------*/ | 
 | 572 | #define SELECTOR_HANDSET            0 | 
 | 573 | #define SELECTOR_DTMF               1 | 
 | 574 | #define SELECTOR_V42BIS             2 | 
 | 575 | #define SELECTOR_SU_SERV            3 | 
 | 576 | #define SELECTOR_POWER_MANAGEMENT   4 | 
 | 577 | #define SELECTOR_LINE_INTERCONNECT  5 | 
 | 578 | #define SELECTOR_ECHO_CANCELLER     6 | 
 | 579 | /*------------------------------------------------------------------*/ | 
 | 580 | /*  supplementary services definitions                              */ | 
 | 581 | /*------------------------------------------------------------------*/ | 
 | 582 | #define S_GET_SUPPORTED_SERVICES  0x0000 | 
 | 583 | #define S_LISTEN                  0x0001 | 
 | 584 | #define S_HOLD                    0x0002 | 
 | 585 | #define S_RETRIEVE                0x0003 | 
 | 586 | #define S_SUSPEND                 0x0004 | 
 | 587 | #define S_RESUME                  0x0005 | 
 | 588 | #define S_ECT                     0x0006 | 
 | 589 | #define S_3PTY_BEGIN              0x0007 | 
 | 590 | #define S_3PTY_END                0x0008 | 
 | 591 | #define S_CALL_DEFLECTION         0x000d | 
 | 592 | #define S_CALL_FORWARDING_START   0x0009 | 
 | 593 | #define S_CALL_FORWARDING_STOP    0x000a | 
 | 594 | #define S_INTERROGATE_DIVERSION   0x000b /* or interrogate parameters */ | 
 | 595 | #define S_INTERROGATE_NUMBERS     0x000c | 
 | 596 | #define S_CCBS_REQUEST            0x000f | 
 | 597 | #define S_CCBS_DEACTIVATE         0x0010 | 
 | 598 | #define S_CCBS_INTERROGATE        0x0011 | 
 | 599 | #define S_CCBS_CALL               0x0012 | 
 | 600 | #define S_MWI_ACTIVATE            0x0013 | 
 | 601 | #define S_MWI_DEACTIVATE          0x0014 | 
 | 602 | #define S_CONF_BEGIN           0x0017 | 
 | 603 | #define S_CONF_ADD                0x0018 | 
 | 604 | #define S_CONF_SPLIT           0x0019 | 
 | 605 | #define S_CONF_DROP               0x001a | 
 | 606 | #define S_CONF_ISOLATE           0x001b | 
 | 607 | #define S_CONF_REATTACH           0x001c | 
 | 608 | #define S_CCBS_ERASECALLLINKAGEID 0x800d | 
 | 609 | #define S_CCBS_STOP_ALERTING      0x8012 | 
 | 610 | #define S_CCBS_INFO_RETAIN        0x8013 | 
 | 611 | #define S_MWI_INDICATE            0x8014 | 
 | 612 | #define S_CONF_PARTYDISC          0x8016 | 
 | 613 | #define S_CONF_NOTIFICATION       0x8017 | 
 | 614 | /* Service Masks */ | 
 | 615 | #define MASK_HOLD_RETRIEVE        0x00000001 | 
 | 616 | #define MASK_TERMINAL_PORTABILITY 0x00000002 | 
 | 617 | #define MASK_ECT                  0x00000004 | 
 | 618 | #define MASK_3PTY                 0x00000008 | 
 | 619 | #define MASK_CALL_FORWARDING      0x00000010 | 
 | 620 | #define MASK_CALL_DEFLECTION      0x00000020 | 
 | 621 | #define MASK_MWI                  0x00000100 | 
 | 622 | #define MASK_CCNR                 0x00000200 | 
 | 623 | #define MASK_CONF                 0x00000400 | 
 | 624 | /*------------------------------------------------------------------*/ | 
 | 625 | /*  dtmf definitions                                                */ | 
 | 626 | /*------------------------------------------------------------------*/ | 
 | 627 | #define DTMF_LISTEN_START     1 | 
 | 628 | #define DTMF_LISTEN_STOP      2 | 
 | 629 | #define DTMF_DIGITS_SEND      3 | 
 | 630 | #define DTMF_SUCCESS          0 | 
 | 631 | #define DTMF_INCORRECT_DIGIT  1 | 
 | 632 | #define DTMF_UNKNOWN_REQUEST  2 | 
 | 633 | /*------------------------------------------------------------------*/ | 
 | 634 | /*  line interconnect definitions                                   */ | 
 | 635 | /*------------------------------------------------------------------*/ | 
 | 636 | #define LI_GET_SUPPORTED_SERVICES       0 | 
 | 637 | #define LI_REQ_CONNECT                  1 | 
 | 638 | #define LI_REQ_DISCONNECT               2 | 
 | 639 | #define LI_IND_CONNECT_ACTIVE           1 | 
 | 640 | #define LI_IND_DISCONNECT               2 | 
 | 641 | #define LI_FLAG_CONFERENCE_A_B          ((dword) 0x00000001L) | 
 | 642 | #define LI_FLAG_CONFERENCE_B_A          ((dword) 0x00000002L) | 
 | 643 | #define LI_FLAG_MONITOR_A               ((dword) 0x00000004L) | 
 | 644 | #define LI_FLAG_MONITOR_B               ((dword) 0x00000008L) | 
 | 645 | #define LI_FLAG_ANNOUNCEMENT_A          ((dword) 0x00000010L) | 
 | 646 | #define LI_FLAG_ANNOUNCEMENT_B          ((dword) 0x00000020L) | 
 | 647 | #define LI_FLAG_MIX_A                   ((dword) 0x00000040L) | 
 | 648 | #define LI_FLAG_MIX_B                   ((dword) 0x00000080L) | 
 | 649 | #define LI_CONFERENCING_SUPPORTED       ((dword) 0x00000001L) | 
 | 650 | #define LI_MONITORING_SUPPORTED         ((dword) 0x00000002L) | 
 | 651 | #define LI_ANNOUNCEMENTS_SUPPORTED      ((dword) 0x00000004L) | 
 | 652 | #define LI_MIXING_SUPPORTED             ((dword) 0x00000008L) | 
 | 653 | #define LI_CROSS_CONTROLLER_SUPPORTED   ((dword) 0x00000010L) | 
 | 654 | #define LI2_GET_SUPPORTED_SERVICES      0 | 
 | 655 | #define LI2_REQ_CONNECT                 1 | 
 | 656 | #define LI2_REQ_DISCONNECT              2 | 
 | 657 | #define LI2_IND_CONNECT_ACTIVE          1 | 
 | 658 | #define LI2_IND_DISCONNECT              2 | 
 | 659 | #define LI2_FLAG_INTERCONNECT_A_B       ((dword) 0x00000001L) | 
 | 660 | #define LI2_FLAG_INTERCONNECT_B_A       ((dword) 0x00000002L) | 
 | 661 | #define LI2_FLAG_MONITOR_B              ((dword) 0x00000004L) | 
 | 662 | #define LI2_FLAG_MIX_B                  ((dword) 0x00000008L) | 
 | 663 | #define LI2_FLAG_MONITOR_X              ((dword) 0x00000010L) | 
 | 664 | #define LI2_FLAG_MIX_X                  ((dword) 0x00000020L) | 
 | 665 | #define LI2_FLAG_LOOP_B                 ((dword) 0x00000040L) | 
 | 666 | #define LI2_FLAG_LOOP_PC                ((dword) 0x00000080L) | 
 | 667 | #define LI2_FLAG_LOOP_X                 ((dword) 0x00000100L) | 
 | 668 | #define LI2_CROSS_CONTROLLER_SUPPORTED  ((dword) 0x00000001L) | 
 | 669 | #define LI2_ASYMMETRIC_SUPPORTED        ((dword) 0x00000002L) | 
 | 670 | #define LI2_MONITORING_SUPPORTED        ((dword) 0x00000004L) | 
 | 671 | #define LI2_MIXING_SUPPORTED            ((dword) 0x00000008L) | 
 | 672 | #define LI2_REMOTE_MONITORING_SUPPORTED ((dword) 0x00000010L) | 
 | 673 | #define LI2_REMOTE_MIXING_SUPPORTED     ((dword) 0x00000020L) | 
 | 674 | #define LI2_B_LOOPING_SUPPORTED         ((dword) 0x00000040L) | 
 | 675 | #define LI2_PC_LOOPING_SUPPORTED        ((dword) 0x00000080L) | 
 | 676 | #define LI2_X_LOOPING_SUPPORTED         ((dword) 0x00000100L) | 
 | 677 | /*------------------------------------------------------------------*/ | 
 | 678 | /* echo canceller definitions                                       */ | 
 | 679 | /*------------------------------------------------------------------*/ | 
 | 680 | #define EC_GET_SUPPORTED_SERVICES            0 | 
 | 681 | #define EC_ENABLE_OPERATION                  1 | 
 | 682 | #define EC_DISABLE_OPERATION                 2 | 
 | 683 | #define EC_ENABLE_NON_LINEAR_PROCESSING      0x0001 | 
 | 684 | #define EC_DO_NOT_REQUIRE_REVERSALS          0x0002 | 
 | 685 | #define EC_DETECT_DISABLE_TONE               0x0004 | 
 | 686 | #define EC_ENABLE_ADAPTIVE_PREDELAY          0x0008 | 
 | 687 | #define EC_NON_LINEAR_PROCESSING_SUPPORTED   0x0001 | 
 | 688 | #define EC_BYPASS_ON_ANY_2100HZ_SUPPORTED    0x0002 | 
 | 689 | #define EC_BYPASS_ON_REV_2100HZ_SUPPORTED    0x0004 | 
 | 690 | #define EC_ADAPTIVE_PREDELAY_SUPPORTED       0x0008 | 
 | 691 | #define EC_BYPASS_INDICATION                 1 | 
 | 692 | #define EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ   1 | 
 | 693 | #define EC_BYPASS_DUE_TO_REVERSED_2100HZ     2 | 
 | 694 | #define EC_BYPASS_RELEASED                   3 | 
 | 695 | /*------------------------------------------------------------------*/ | 
 | 696 | /* function prototypes                                              */ | 
 | 697 | /*------------------------------------------------------------------*/ | 
 | 698 | /*------------------------------------------------------------------*/ | 
| Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 699 | #endif /* _INC_CAPI20 */ |