1 2/* 3 * 4 Copyright (c) Eicon Networks, 2002. 5 * 6 This source file is supplied for the use with 7 Eicon Networks range of DIVA Server Adapters. 8 * 9 Eicon File Revision : 2.1 10 * 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. 15 * 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. 20 * 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. 24 * 25 */ 26#ifndef PC_H_INCLUDED /* { */ 27#define PC_H_INCLUDED 28/*------------------------------------------------------------------*/ 29/* buffer definition */ 30/*------------------------------------------------------------------*/ 31typedef struct { 32 word length; /* length of data/parameter field */ 33 byte P[270]; /* data/parameter field */ 34} PBUFFER; 35/*------------------------------------------------------------------*/ 36/* dual port ram structure */ 37/*------------------------------------------------------------------*/ 38struct dual 39{ 40 byte Req; /* request register */ 41 byte ReqId; /* request task/entity identification */ 42 byte Rc; /* return code register */ 43 byte RcId; /* return code task/entity identification */ 44 byte Ind; /* Indication register */ 45 byte IndId; /* Indication task/entity identification */ 46 byte IMask; /* Interrupt Mask Flag */ 47 byte RNR; /* Receiver Not Ready (set by PC) */ 48 byte XLock; /* XBuffer locked Flag */ 49 byte Int; /* ISDN-S interrupt */ 50 byte ReqCh; /* Channel field for layer-3 Requests */ 51 byte RcCh; /* Channel field for layer-3 Returncodes */ 52 byte IndCh; /* Channel field for layer-3 Indications */ 53 byte MInd; /* more data indication field */ 54 word MLength; /* more data total packet length */ 55 byte ReadyInt; /* request field for ready interrupt */ 56 byte SWReg; /* Software register for special purposes */ 57 byte Reserved[11]; /* reserved space */ 58 byte InterfaceType; /* interface type 1=16K interface */ 59 word Signature; /* ISDN-S adapter Signature (GD) */ 60 PBUFFER XBuffer; /* Transmit Buffer */ 61 PBUFFER RBuffer; /* Receive Buffer */ 62}; 63/*------------------------------------------------------------------*/ 64/* SWReg Values (0 means no command) */ 65/*------------------------------------------------------------------*/ 66#define SWREG_DIE_WITH_LEDON 0x01 67#define SWREG_HALT_CPU 0x02 /* Push CPU into a while (1) loop */ 68/*------------------------------------------------------------------*/ 69/* Id Fields Coding */ 70/*------------------------------------------------------------------*/ 71#define ID_MASK 0xe0 /* Mask for the ID field */ 72#define GL_ERR_ID 0x1f /* ID for error reporting on global requests*/ 73#define DSIG_ID 0x00 /* ID for D-channel signaling */ 74#define NL_ID 0x20 /* ID for network-layer access (B or D) */ 75#define BLLC_ID 0x60 /* ID for B-channel link level access */ 76#define TASK_ID 0x80 /* ID for dynamic user tasks */ 77#define TIMER_ID 0xa0 /* ID for timer task */ 78#define TEL_ID 0xc0 /* ID for telephone support */ 79#define MAN_ID 0xe0 /* ID for management */ 80/*------------------------------------------------------------------*/ 81/* ASSIGN and REMOVE requests are the same for all entities */ 82/*------------------------------------------------------------------*/ 83#define ASSIGN 0x01 84#define UREMOVE 0xfe /* without return code */ 85#define REMOVE 0xff 86/*------------------------------------------------------------------*/ 87/* Timer Interrupt Task Interface */ 88/*------------------------------------------------------------------*/ 89#define ASSIGN_TIM 0x01 90#define REMOVE_TIM 0xff 91/*------------------------------------------------------------------*/ 92/* dynamic user task interface */ 93/*------------------------------------------------------------------*/ 94#define ASSIGN_TSK 0x01 95#define REMOVE_TSK 0xff 96#define LOAD 0xf0 97#define RELOCATE 0xf1 98#define START 0xf2 99#define LOAD2 0xf3 100#define RELOCATE2 0xf4 101/*------------------------------------------------------------------*/ 102/* dynamic user task messages */ 103/*------------------------------------------------------------------*/ 104#define TSK_B2 0x0000 105#define TSK_WAKEUP 0x2000 106#define TSK_TIMER 0x4000 107#define TSK_TSK 0x6000 108#define TSK_PC 0xe000 109/*------------------------------------------------------------------*/ 110/* LL management primitives */ 111/*------------------------------------------------------------------*/ 112#define ASSIGN_LL 1 /* assign logical link */ 113#define REMOVE_LL 0xff /* remove logical link */ 114/*------------------------------------------------------------------*/ 115/* LL service primitives */ 116/*------------------------------------------------------------------*/ 117#define LL_UDATA 1 /* link unit data request/indication */ 118#define LL_ESTABLISH 2 /* link establish request/indication */ 119#define LL_RELEASE 3 /* link release request/indication */ 120#define LL_DATA 4 /* data request/indication */ 121#define LL_LOCAL 5 /* switch to local operation (COM only) */ 122#define LL_DATA_PEND 5 /* data pending indication (SDLC SHM only) */ 123#define LL_REMOTE 6 /* switch to remote operation (COM only) */ 124#define LL_TEST 8 /* link test request */ 125#define LL_MDATA 9 /* more data request/indication */ 126#define LL_BUDATA 10 /* broadcast unit data request/indication */ 127#define LL_XID 12 /* XID command request/indication */ 128#define LL_XID_R 13 /* XID response request/indication */ 129/*------------------------------------------------------------------*/ 130/* NL service primitives */ 131/*------------------------------------------------------------------*/ 132#define N_MDATA 1 /* more data to come REQ/IND */ 133#define N_CONNECT 2 /* OSI N-CONNECT REQ/IND */ 134#define N_CONNECT_ACK 3 /* OSI N-CONNECT CON/RES */ 135#define N_DISC 4 /* OSI N-DISC REQ/IND */ 136#define N_DISC_ACK 5 /* OSI N-DISC CON/RES */ 137#define N_RESET 6 /* OSI N-RESET REQ/IND */ 138#define N_RESET_ACK 7 /* OSI N-RESET CON/RES */ 139#define N_DATA 8 /* OSI N-DATA REQ/IND */ 140#define N_EDATA 9 /* OSI N-EXPEDITED DATA REQ/IND */ 141#define N_UDATA 10 /* OSI D-UNIT-DATA REQ/IND */ 142#define N_BDATA 11 /* BROADCAST-DATA REQ/IND */ 143#define N_DATA_ACK 12 /* data ack ind for D-bit procedure */ 144#define N_EDATA_ACK 13 /* data ack ind for INTERRUPT */ 145#define N_XON 15 /* clear RNR state */ 146#define N_COMBI_IND N_XON /* combined indication */ 147#define N_Q_BIT 0x10 /* Q-bit for req/ind */ 148#define N_M_BIT 0x20 /* M-bit for req/ind */ 149#define N_D_BIT 0x40 /* D-bit for req/ind */ 150/*------------------------------------------------------------------*/ 151/* Signaling management primitives */ 152/*------------------------------------------------------------------*/ 153#define ASSIGN_SIG 1 /* assign signaling task */ 154#define UREMOVE_SIG 0xfe /* remove signaling task without return code*/ 155#define REMOVE_SIG 0xff /* remove signaling task */ 156/*------------------------------------------------------------------*/ 157/* Signaling service primitives */ 158/*------------------------------------------------------------------*/ 159#define CALL_REQ 1 /* call request */ 160#define CALL_CON 1 /* call confirmation */ 161#define CALL_IND 2 /* incoming call connected */ 162#define LISTEN_REQ 2 /* listen request */ 163#define HANGUP 3 /* hangup request/indication */ 164#define SUSPEND 4 /* call suspend request/confirm */ 165#define RESUME 5 /* call resume request/confirm */ 166#define SUSPEND_REJ 6 /* suspend rejected indication */ 167#define USER_DATA 8 /* user data for user to user signaling */ 168#define CONGESTION 9 /* network congestion indication */ 169#define INDICATE_REQ 10 /* request to indicate an incoming call */ 170#define INDICATE_IND 10 /* indicates that there is an incoming call */ 171#define CALL_RES 11 /* accept an incoming call */ 172#define CALL_ALERT 12 /* send ALERT for incoming call */ 173#define INFO_REQ 13 /* INFO request */ 174#define INFO_IND 13 /* INFO indication */ 175#define REJECT 14 /* reject an incoming call */ 176#define RESOURCES 15 /* reserve B-Channel hardware resources */ 177#define HW_CTRL 16 /* B-Channel hardware IOCTL req/ind */ 178#define TEL_CTRL 16 /* Telephone control request/indication */ 179#define STATUS_REQ 17 /* Request D-State (returned in INFO_IND) */ 180#define FAC_REG_REQ 18 /* 1TR6 connection independent fac reg */ 181#define FAC_REG_ACK 19 /* 1TR6 fac registration acknowledge */ 182#define FAC_REG_REJ 20 /* 1TR6 fac registration reject */ 183#define CALL_COMPLETE 21/* send a CALL_PROC for incoming call */ 184#define SW_CTRL 22 /* extended software features */ 185#define REGISTER_REQ 23 /* Q.931 connection independent reg req */ 186#define REGISTER_IND 24 /* Q.931 connection independent reg ind */ 187#define FACILITY_REQ 25 /* Q.931 connection independent fac req */ 188#define FACILITY_IND 26 /* Q.931 connection independent fac ind */ 189#define NCR_INFO_REQ 27 /* INFO_REQ with NULL CR */ 190#define GCR_MIM_REQ 28 /* MANAGEMENT_INFO_REQ with global CR */ 191#define SIG_CTRL 29 /* Control for Signalling Hardware */ 192#define DSP_CTRL 30 /* Control for DSPs */ 193#define LAW_REQ 31 /* Law config request for (returns info_i) */ 194#define SPID_CTRL 32 /* Request/indication SPID related */ 195#define NCR_FACILITY 33 /* Request/indication with NULL/DUMMY CR */ 196#define CALL_HOLD 34 /* Request/indication to hold a CALL */ 197#define CALL_RETRIEVE 35 /* Request/indication to retrieve a CALL */ 198#define CALL_HOLD_ACK 36 /* OK of hold a CALL */ 199#define CALL_RETRIEVE_ACK 37 /* OK of retrieve a CALL */ 200#define CALL_HOLD_REJ 38 /* Reject of hold a CALL */ 201#define CALL_RETRIEVE_REJ 39 /* Reject of retrieve a call */ 202#define GCR_RESTART 40 /* Send/Receive Restart message */ 203#define S_SERVICE 41 /* Send/Receive Supplementary Service */ 204#define S_SERVICE_REJ 42 /* Reject Supplementary Service indication */ 205#define S_SUPPORTED 43 /* Req/Ind to get Supported Services */ 206#define STATUS_ENQ 44 /* Req to send the D-ch request if !state0 */ 207#define CALL_GUARD 45 /* Req/Ind to use the FLAGS_CALL_OUTCHECK */ 208#define CALL_GUARD_HP 46 /* Call Guard function to reject a call */ 209#define CALL_GUARD_IF 47 /* Call Guard function, inform the appl */ 210#define SSEXT_REQ 48 /* Supplem.Serv./QSIG specific request */ 211#define SSEXT_IND 49 /* Supplem.Serv./QSIG specific indication */ 212/* reserved commands for the US protocols */ 213#define INT_3PTY_NIND 50 /* US specific indication */ 214#define INT_CF_NIND 51 /* US specific indication */ 215#define INT_3PTY_DROP 52 /* US specific indication */ 216#define INT_MOVE_CONF 53 /* US specific indication */ 217#define INT_MOVE_RC 54 /* US specific indication */ 218#define INT_MOVE_FLIPPED_CONF 55 /* US specific indication */ 219#define INT_X5NI_OK 56 /* internal transfer OK indication */ 220#define INT_XDMS_START 57 /* internal transfer OK indication */ 221#define INT_XDMS_STOP 58 /* internal transfer finish indication */ 222#define INT_XDMS_STOP2 59 /* internal transfer send FA */ 223#define INT_CUSTCONF_REJ 60 /* internal conference reject */ 224#define INT_CUSTXFER 61 /* internal transfer request */ 225#define INT_CUSTX_NIND 62 /* internal transfer ack */ 226#define INT_CUSTXREJ_NIND 63 /* internal transfer rej */ 227#define INT_X5NI_CF_XFER 64 /* internal transfer OK indication */ 228#define VSWITCH_REQ 65 /* communication between protocol and */ 229#define VSWITCH_IND 66 /* capifunctions for D-CH-switching */ 230#define MWI_POLL 67 /* Message Waiting Status Request fkt */ 231#define CALL_PEND_NOTIFY 68 /* notify capi to set new listen */ 232#define DO_NOTHING 69 /* dont do somethin if you get this */ 233#define INT_CT_REJ 70 /* ECT rejected internal command */ 234#define CALL_HOLD_COMPLETE 71 /* In NT Mode indicate hold complete */ 235#define CALL_RETRIEVE_COMPLETE 72 /* In NT Mode indicate retrieve complete */ 236/*------------------------------------------------------------------*/ 237/* management service primitives */ 238/*------------------------------------------------------------------*/ 239#define MAN_READ 2 240#define MAN_WRITE 3 241#define MAN_EXECUTE 4 242#define MAN_EVENT_ON 5 243#define MAN_EVENT_OFF 6 244#define MAN_LOCK 7 245#define MAN_UNLOCK 8 246#define MAN_INFO_IND 2 247#define MAN_EVENT_IND 3 248#define MAN_TRACE_IND 4 249#define MAN_COMBI_IND 9 250#define MAN_ESC 0x80 251/*------------------------------------------------------------------*/ 252/* return code coding */ 253/*------------------------------------------------------------------*/ 254#define UNKNOWN_COMMAND 0x01 /* unknown command */ 255#define WRONG_COMMAND 0x02 /* wrong command */ 256#define WRONG_ID 0x03 /* unknown task/entity id */ 257#define WRONG_CH 0x04 /* wrong task/entity id */ 258#define UNKNOWN_IE 0x05 /* unknown information el. */ 259#define WRONG_IE 0x06 /* wrong information el. */ 260#define OUT_OF_RESOURCES 0x07 /* ISDN-S card out of res. */ 261#define ISDN_GUARD_REJ 0x09 /* ISDN-Guard SuppServ rej */ 262#define N_FLOW_CONTROL 0x10 /* Flow-Control, retry */ 263#define ASSIGN_RC 0xe0 /* ASSIGN acknowledgement */ 264#define ASSIGN_OK 0xef /* ASSIGN OK */ 265#define OK_FC 0xfc /* Flow-Control RC */ 266#define READY_INT 0xfd /* Ready interrupt */ 267#define TIMER_INT 0xfe /* timer interrupt */ 268#define OK 0xff /* command accepted */ 269/*------------------------------------------------------------------*/ 270/* information elements */ 271/*------------------------------------------------------------------*/ 272#define SHIFT 0x90 /* codeset shift */ 273#define MORE 0xa0 /* more data */ 274#define SDNCMPL 0xa1 /* sending complete */ 275#define CL 0xb0 /* congestion level */ 276/* codeset 0 */ 277#define SMSG 0x00 /* segmented message */ 278#define BC 0x04 /* Bearer Capability */ 279#define CAU 0x08 /* cause */ 280#define CAD 0x0c /* Connected address */ 281#define CAI 0x10 /* call identity */ 282#define CHI 0x18 /* channel identification */ 283#define LLI 0x19 /* logical link id */ 284#define CHA 0x1a /* charge advice */ 285#define FTY 0x1c /* Facility */ 286#define DT 0x29 /* ETSI date/time */ 287#define KEY 0x2c /* keypad information element */ 288#define UID 0x2d /* User id information element */ 289#define DSP 0x28 /* display */ 290#define SIG 0x34 /* signalling hardware control */ 291#define OAD 0x6c /* origination address */ 292#define OSA 0x6d /* origination sub-address */ 293#define CPN 0x70 /* called party number */ 294#define DSA 0x71 /* destination sub-address */ 295#define RDX 0x73 /* redirecting number extended */ 296#define RDN 0x74 /* redirecting number */ 297#define RIN 0x76 /* redirection number */ 298#define IUP 0x76 /* VN6 rerouter->PCS (codeset 6) */ 299#define IPU 0x77 /* VN6 PCS->rerouter (codeset 6) */ 300#define RI 0x79 /* restart indicator */ 301#define MIE 0x7a /* management info element */ 302#define LLC 0x7c /* low layer compatibility */ 303#define HLC 0x7d /* high layer compatibility */ 304#define UUI 0x7e /* user user information */ 305#define ESC 0x7f /* escape extension */ 306#define DLC 0x20 /* data link layer configuration */ 307#define NLC 0x21 /* network layer configuration */ 308#define REDIRECT_IE 0x22 /* redirection request/indication data */ 309#define REDIRECT_NET_IE 0x23 /* redirection network override data */ 310/* codeset 6 */ 311#define SIN 0x01 /* service indicator */ 312#define CIF 0x02 /* charging information */ 313#define DATE 0x03 /* date */ 314#define CPS 0x07 /* called party status */ 315/*------------------------------------------------------------------*/ 316/* ESC information elements */ 317/*------------------------------------------------------------------*/ 318#define MSGTYPEIE 0x7a /* Messagetype info element */ 319#define CRIE 0x7b /* INFO info element */ 320#define CODESET6IE 0xec /* Tunnel for Codeset 6 IEs */ 321#define VSWITCHIE 0xed /* VSwitch info element */ 322#define SSEXTIE 0xee /* Supplem. Service info element */ 323#define PROFILEIE 0xef /* Profile info element */ 324/*------------------------------------------------------------------*/ 325/* TEL_CTRL contents */ 326/*------------------------------------------------------------------*/ 327#define RING_ON 0x01 328#define RING_OFF 0x02 329#define HANDS_FREE_ON 0x03 330#define HANDS_FREE_OFF 0x04 331#define ON_HOOK 0x80 332#define OFF_HOOK 0x90 333/* operation values used by ETSI supplementary services */ 334#define THREE_PTY_BEGIN 0x04 335#define THREE_PTY_END 0x05 336#define ECT_EXECUTE 0x06 337#define ACTIVATION_DIVERSION 0x07 338#define DEACTIVATION_DIVERSION 0x08 339#define CALL_DEFLECTION 0x0D 340#define INTERROGATION_DIVERSION 0x0B 341#define INTERROGATION_SERV_USR_NR 0x11 342#define ACTIVATION_MWI 0x20 343#define DEACTIVATION_MWI 0x21 344#define MWI_INDICATION 0x22 345#define MWI_RESPONSE 0x23 346#define CONF_BEGIN 0x28 347#define CONF_ADD 0x29 348#define CONF_SPLIT 0x2a 349#define CONF_DROP 0x2b 350#define CONF_ISOLATE 0x2c 351#define CONF_REATTACH 0x2d 352#define CONF_PARTYDISC 0x2e 353#define CCBS_INFO_RETAIN 0x2f 354#define CCBS_ERASECALLLINKAGEID 0x30 355#define CCBS_STOP_ALERTING 0x31 356#define CCBS_REQUEST 0x32 357#define CCBS_DEACTIVATE 0x33 358#define CCBS_INTERROGATE 0x34 359#define CCBS_STATUS 0x35 360#define CCBS_ERASE 0x36 361#define CCBS_B_FREE 0x37 362#define CCNR_INFO_RETAIN 0x38 363#define CCBS_REMOTE_USER_FREE 0x39 364#define CCNR_REQUEST 0x3a 365#define CCNR_INTERROGATE 0x3b 366#define GET_SUPPORTED_SERVICES 0xff 367#define DIVERSION_PROCEDURE_CFU 0x70 368#define DIVERSION_PROCEDURE_CFB 0x71 369#define DIVERSION_PROCEDURE_CFNR 0x72 370#define DIVERSION_DEACTIVATION_CFU 0x80 371#define DIVERSION_DEACTIVATION_CFB 0x81 372#define DIVERSION_DEACTIVATION_CFNR 0x82 373#define DIVERSION_INTERROGATE_NUM 0x11 374#define DIVERSION_INTERROGATE_CFU 0x60 375#define DIVERSION_INTERROGATE_CFB 0x61 376#define DIVERSION_INTERROGATE_CFNR 0x62 377/* Service Masks */ 378#define SMASK_HOLD_RETRIEVE 0x00000001 379#define SMASK_TERMINAL_PORTABILITY 0x00000002 380#define SMASK_ECT 0x00000004 381#define SMASK_3PTY 0x00000008 382#define SMASK_CALL_FORWARDING 0x00000010 383#define SMASK_CALL_DEFLECTION 0x00000020 384#define SMASK_MCID 0x00000040 385#define SMASK_CCBS 0x00000080 386#define SMASK_MWI 0x00000100 387#define SMASK_CCNR 0x00000200 388#define SMASK_CONF 0x00000400 389/* ---------------------------------------------- 390 Types of transfers used to transfer the 391 information in the 'struct RC->Reserved2[8]' 392 The information is transferred as 2 dwords 393 (2 4Byte unsigned values) 394 First of them is the transfer type. 395 2^32-1 possible messages are possible in this way. 396 The context of the second one had no meaning 397 ---------------------------------------------- */ 398#define DIVA_RC_TYPE_NONE 0x00000000 399#define DIVA_RC_TYPE_REMOVE_COMPLETE 0x00000008 400#define DIVA_RC_TYPE_STREAM_PTR 0x00000009 401#define DIVA_RC_TYPE_CMA_PTR 0x0000000a 402#define DIVA_RC_TYPE_OK_FC 0x0000000b 403#define DIVA_RC_TYPE_RX_DMA 0x0000000c 404/* ------------------------------------------------------ 405 IO Control codes for IN BAND SIGNALING 406 ------------------------------------------------------ */ 407#define CTRL_L1_SET_SIG_ID 5 408#define CTRL_L1_SET_DAD 6 409#define CTRL_L1_RESOURCES 7 410/* ------------------------------------------------------ */ 411/* ------------------------------------------------------ 412 Layer 2 types 413 ------------------------------------------------------ */ 414#define X75T 1 /* x.75 for ttx */ 415#define TRF 2 /* transparent with hdlc framing */ 416#define TRF_IN 3 /* transparent with hdlc fr. inc. */ 417#define SDLC 4 /* sdlc, sna layer-2 */ 418#define X75 5 /* x.75 for btx */ 419#define LAPD 6 /* lapd (Q.921) */ 420#define X25_L2 7 /* x.25 layer-2 */ 421#define V120_L2 8 /* V.120 layer-2 protocol */ 422#define V42_IN 9 /* V.42 layer-2 protocol, incoming */ 423#define V42 10 /* V.42 layer-2 protocol */ 424#define MDM_ATP 11 /* AT Parser built in the L2 */ 425#define X75_V42BIS 12 /* x.75 with V.42bis */ 426#define RTPL2_IN 13 /* RTP layer-2 protocol, incoming */ 427#define RTPL2 14 /* RTP layer-2 protocol */ 428#define V120_V42BIS 15 /* V.120 asynchronous mode supporting V.42bis compression */ 429#define LISTENER 27 /* Layer 2 to listen line */ 430#define MTP2 28 /* MTP2 Layer 2 */ 431#define PIAFS_CRC 29 /* PIAFS Layer 2 with CRC calculation at L2 */ 432/* ------------------------------------------------------ 433 PIAFS DLC DEFINITIONS 434 ------------------------------------------------------ */ 435#define PIAFS_64K 0x01 436#define PIAFS_VARIABLE_SPEED 0x02 437#define PIAFS_CHINESE_SPEED 0x04 438#define PIAFS_UDATA_ABILITY_ID 0x80 439#define PIAFS_UDATA_ABILITY_DCDON 0x01 440#define PIAFS_UDATA_ABILITY_DDI 0x80 441/* 442 DLC of PIAFS : 443 Byte | 8 7 6 5 4 3 2 1 444 -----+-------------------------------------------------------- 445 0 | 0 0 1 0 0 0 0 0 Data Link Configuration 446 1 | X X X X X X X X Length of IE (at least 15 Bytes) 447 2 | 0 0 0 0 0 0 0 0 max. information field, LOW byte (not used, fix 73 Bytes) 448 3 | 0 0 0 0 0 0 0 0 max. information field, HIGH byte (not used, fix 73 Bytes) 449 4 | 0 0 0 0 0 0 0 0 address A (not used) 450 5 | 0 0 0 0 0 0 0 0 address B (not used) 451 6 | 0 0 0 0 0 0 0 0 Mode (not used, fix 128) 452 7 | 0 0 0 0 0 0 0 0 Window Size (not used, fix 127) 453 8 | X X X X X X X X XID Length, Low Byte (at least 7 Bytes) 454 9 | X X X X X X X X XID Length, High Byte 455 10 | 0 0 0 0 0 C V S PIAFS Protocol Speed configuration -> Note(1) 456 | S = 0 -> Protocol Speed is 32K 457 | S = 1 -> Protocol Speed is 64K 458 | V = 0 -> Protocol Speed is fixed 459 | V = 1 -> Protocol Speed is variable 460 | C = 0 -> speed setting according to standard 461 | C = 1 -> speed setting for chinese implementation 462 11 | 0 0 0 0 0 0 R T P0 - V42bis Compression enable/disable, Low Byte 463 | T = 0 -> Transmit Direction enable 464 | T = 1 -> Transmit Direction disable 465 | R = 0 -> Receive Direction enable 466 | R = 1 -> Receive Direction disable 467 13 | 0 0 0 0 0 0 0 0 P0 - V42bis Compression enable/disable, High Byte 468 14 | X X X X X X X X P1 - V42bis Dictionary Size, Low Byte 469 15 | X X X X X X X X P1 - V42bis Dictionary Size, High Byte 470 16 | X X X X X X X X P2 - V42bis String Length, Low Byte 471 17 | X X X X X X X X P2 - V42bis String Length, High Byte 472 18 | X X X X X X X X PIAFS extension length 473 19 | 1 0 0 0 0 0 0 0 PIAFS extension Id (0x80) - UDATA abilities 474 20 | U 0 0 0 0 0 0 D UDATA abilities -> Note (2) 475 | up to now the following Bits are defined: 476 | D - signal DCD ON 477 | U - use extensive UDATA control communication 478 | for DDI test application 479 + Note (1): ----------+------+-----------------------------------------+ 480 | PIAFS Protocol | Bit | | 481 | Speed configuration | S | Bit 1 - Protocol Speed | 482 | | | 0 - 32K | 483 | | | 1 - 64K (default) | 484 | | V | Bit 2 - Variable Protocol Speed | 485 | | | 0 - Speed is fix | 486 | | | 1 - Speed is variable (default) | 487 | | | OVERWRITES 32k Bit 1 | 488 | | C | Bit 3 0 - Speed Settings according to | 489 | | | PIAFS specification | 490 | | | 1 - Speed setting for chinese | 491 | | | PIAFS implementation | 492 | | | Explanation for chinese speed settings: | 493 | | | if Bit 3 is set the following | 494 | | | rules apply: | 495 | | | Bit1=0 Bit2=0: 32k fix | 496 | | | Bit1=1 Bit2=0: 64k fix | 497 | | | Bit1=0 Bit2=1: PIAFS is trying | 498 | | | to negotiate 32k is that is | 499 | | | not possible it tries to | 500 | | | negotiate 64k | 501 | | | Bit1=1 Bit2=1: PIAFS is trying | 502 | | | to negotiate 64k is that is | 503 | | | not possible it tries to | 504 | | | negotiate 32k | 505 + Note (2): ----------+------+-----------------------------------------+ 506 | PIAFS | Bit | this byte defines the usage of UDATA | 507 | Implementation | | control communication | 508 | UDATA usage | D | Bit 1 - DCD-ON signalling | 509 | | | 0 - no DCD-ON is signalled | 510 | | | (default) | 511 | | | 1 - DCD-ON will be signalled | 512 | | U | Bit 8 - DDI test application UDATA | 513 | | | control communication | 514 | | | 0 - no UDATA control | 515 | | | communication (default) | 516 | | | sets as well the DCD-ON | 517 | | | signalling | 518 | | | 1 - UDATA control communication | 519 | | | ATTENTION: Do not use these | 520 | | | setting if you | 521 | | | are not really | 522 | | | that you need it | 523 | | | and you know | 524 | | | exactly what you | 525 | | | are doing. | 526 | | | You can easily | 527 | | | disable any | 528 | | | data transfer. | 529 +---------------------+------+-----------------------------------------+ 530*/ 531/* ------------------------------------------------------ 532 LISTENER DLC DEFINITIONS 533 ------------------------------------------------------ */ 534#define LISTENER_FEATURE_MASK_CUMMULATIVE 0x0001 535/* ------------------------------------------------------ 536 LISTENER META-FRAME CODE/PRIMITIVE DEFINITIONS 537 ------------------------------------------------------ */ 538#define META_CODE_LL_UDATA_RX 0x01 539#define META_CODE_LL_UDATA_TX 0x02 540#define META_CODE_LL_DATA_RX 0x03 541#define META_CODE_LL_DATA_TX 0x04 542#define META_CODE_LL_MDATA_RX 0x05 543#define META_CODE_LL_MDATA_TX 0x06 544#define META_CODE_EMPTY 0x10 545#define META_CODE_LOST_FRAMES 0x11 546#define META_FLAG_TRUNCATED 0x0001 547/*------------------------------------------------------------------*/ 548/* CAPI-like profile to indicate features on LAW_REQ */ 549/*------------------------------------------------------------------*/ 550#define GL_INTERNAL_CONTROLLER_SUPPORTED 0x00000001L 551#define GL_EXTERNAL_EQUIPMENT_SUPPORTED 0x00000002L 552#define GL_HANDSET_SUPPORTED 0x00000004L 553#define GL_DTMF_SUPPORTED 0x00000008L 554#define GL_SUPPLEMENTARY_SERVICES_SUPPORTED 0x00000010L 555#define GL_CHANNEL_ALLOCATION_SUPPORTED 0x00000020L 556#define GL_BCHANNEL_OPERATION_SUPPORTED 0x00000040L 557#define GL_LINE_INTERCONNECT_SUPPORTED 0x00000080L 558#define B1_HDLC_SUPPORTED 0x00000001L 559#define B1_TRANSPARENT_SUPPORTED 0x00000002L 560#define B1_V110_ASYNC_SUPPORTED 0x00000004L 561#define B1_V110_SYNC_SUPPORTED 0x00000008L 562#define B1_T30_SUPPORTED 0x00000010L 563#define B1_HDLC_INVERTED_SUPPORTED 0x00000020L 564#define B1_TRANSPARENT_R_SUPPORTED 0x00000040L 565#define B1_MODEM_ALL_NEGOTIATE_SUPPORTED 0x00000080L 566#define B1_MODEM_ASYNC_SUPPORTED 0x00000100L 567#define B1_MODEM_SYNC_HDLC_SUPPORTED 0x00000200L 568#define B2_X75_SUPPORTED 0x00000001L 569#define B2_TRANSPARENT_SUPPORTED 0x00000002L 570#define B2_SDLC_SUPPORTED 0x00000004L 571#define B2_LAPD_SUPPORTED 0x00000008L 572#define B2_T30_SUPPORTED 0x00000010L 573#define B2_PPP_SUPPORTED 0x00000020L 574#define B2_TRANSPARENT_NO_CRC_SUPPORTED 0x00000040L 575#define B2_MODEM_EC_COMPRESSION_SUPPORTED 0x00000080L 576#define B2_X75_V42BIS_SUPPORTED 0x00000100L 577#define B2_V120_ASYNC_SUPPORTED 0x00000200L 578#define B2_V120_ASYNC_V42BIS_SUPPORTED 0x00000400L 579#define B2_V120_BIT_TRANSPARENT_SUPPORTED 0x00000800L 580#define B2_LAPD_FREE_SAPI_SEL_SUPPORTED 0x00001000L 581#define B3_TRANSPARENT_SUPPORTED 0x00000001L 582#define B3_T90NL_SUPPORTED 0x00000002L 583#define B3_ISO8208_SUPPORTED 0x00000004L 584#define B3_X25_DCE_SUPPORTED 0x00000008L 585#define B3_T30_SUPPORTED 0x00000010L 586#define B3_T30_WITH_EXTENSIONS_SUPPORTED 0x00000020L 587#define B3_RESERVED_SUPPORTED 0x00000040L 588#define B3_MODEM_SUPPORTED 0x00000080L 589#define MANUFACTURER_FEATURE_SLAVE_CODEC 0x00000001L 590#define MANUFACTURER_FEATURE_FAX_MORE_DOCUMENTS 0x00000002L 591#define MANUFACTURER_FEATURE_HARDDTMF 0x00000004L 592#define MANUFACTURER_FEATURE_SOFTDTMF_SEND 0x00000008L 593#define MANUFACTURER_FEATURE_DTMF_PARAMETERS 0x00000010L 594#define MANUFACTURER_FEATURE_SOFTDTMF_RECEIVE 0x00000020L 595#define MANUFACTURER_FEATURE_FAX_SUB_SEP_PWD 0x00000040L 596#define MANUFACTURER_FEATURE_V18 0x00000080L 597#define MANUFACTURER_FEATURE_MIXER_CH_CH 0x00000100L 598#define MANUFACTURER_FEATURE_MIXER_CH_PC 0x00000200L 599#define MANUFACTURER_FEATURE_MIXER_PC_CH 0x00000400L 600#define MANUFACTURER_FEATURE_MIXER_PC_PC 0x00000800L 601#define MANUFACTURER_FEATURE_ECHO_CANCELLER 0x00001000L 602#define MANUFACTURER_FEATURE_RTP 0x00002000L 603#define MANUFACTURER_FEATURE_T38 0x00004000L 604#define MANUFACTURER_FEATURE_TRANSP_DELIVERY_CONF 0x00008000L 605#define MANUFACTURER_FEATURE_XONOFF_FLOW_CONTROL 0x00010000L 606#define MANUFACTURER_FEATURE_OOB_CHANNEL 0x00020000L 607#define MANUFACTURER_FEATURE_IN_BAND_CHANNEL 0x00040000L 608#define MANUFACTURER_FEATURE_IN_BAND_FEATURE 0x00080000L 609#define MANUFACTURER_FEATURE_PIAFS 0x00100000L 610#define MANUFACTURER_FEATURE_DTMF_TONE 0x00200000L 611#define MANUFACTURER_FEATURE_FAX_PAPER_FORMATS 0x00400000L 612#define MANUFACTURER_FEATURE_OK_FC_LABEL 0x00800000L 613#define MANUFACTURER_FEATURE_VOWN 0x01000000L 614#define MANUFACTURER_FEATURE_XCONNECT 0x02000000L 615#define MANUFACTURER_FEATURE_DMACONNECT 0x04000000L 616#define MANUFACTURER_FEATURE_AUDIO_TAP 0x08000000L 617#define MANUFACTURER_FEATURE_FAX_NONSTANDARD 0x10000000L 618#define MANUFACTURER_FEATURE_SS7 0x20000000L 619#define MANUFACTURER_FEATURE_MADAPTER 0x40000000L 620#define MANUFACTURER_FEATURE_MEASURE 0x80000000L 621#define MANUFACTURER_FEATURE2_LISTENING 0x00000001L 622#define MANUFACTURER_FEATURE2_SS_DIFFCONTPOSSIBLE 0x00000002L 623#define MANUFACTURER_FEATURE2_GENERIC_TONE 0x00000004L 624#define MANUFACTURER_FEATURE2_COLOR_FAX 0x00000008L 625#define MANUFACTURER_FEATURE2_SS_ECT_DIFFCONTPOSSIBLE 0x00000010L 626#define RTP_PRIM_PAYLOAD_PCMU_8000 0 627#define RTP_PRIM_PAYLOAD_1016_8000 1 628#define RTP_PRIM_PAYLOAD_G726_32_8000 2 629#define RTP_PRIM_PAYLOAD_GSM_8000 3 630#define RTP_PRIM_PAYLOAD_G723_8000 4 631#define RTP_PRIM_PAYLOAD_DVI4_8000 5 632#define RTP_PRIM_PAYLOAD_DVI4_16000 6 633#define RTP_PRIM_PAYLOAD_LPC_8000 7 634#define RTP_PRIM_PAYLOAD_PCMA_8000 8 635#define RTP_PRIM_PAYLOAD_G722_16000 9 636#define RTP_PRIM_PAYLOAD_QCELP_8000 12 637#define RTP_PRIM_PAYLOAD_G728_8000 14 638#define RTP_PRIM_PAYLOAD_G729_8000 18 639#define RTP_PRIM_PAYLOAD_GSM_HR_8000 30 640#define RTP_PRIM_PAYLOAD_GSM_EFR_8000 31 641#define RTP_ADD_PAYLOAD_BASE 32 642#define RTP_ADD_PAYLOAD_RED 32 643#define RTP_ADD_PAYLOAD_CN_8000 33 644#define RTP_ADD_PAYLOAD_DTMF 34 645#define RTP_PRIM_PAYLOAD_PCMU_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_PCMU_8000) 646#define RTP_PRIM_PAYLOAD_1016_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_1016_8000) 647#define RTP_PRIM_PAYLOAD_G726_32_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_G726_32_8000) 648#define RTP_PRIM_PAYLOAD_GSM_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_GSM_8000) 649#define RTP_PRIM_PAYLOAD_G723_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_G723_8000) 650#define RTP_PRIM_PAYLOAD_DVI4_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_DVI4_8000) 651#define RTP_PRIM_PAYLOAD_DVI4_16000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_DVI4_16000) 652#define RTP_PRIM_PAYLOAD_LPC_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_LPC_8000) 653#define RTP_PRIM_PAYLOAD_PCMA_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_PCMA_8000) 654#define RTP_PRIM_PAYLOAD_G722_16000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_G722_16000) 655#define RTP_PRIM_PAYLOAD_QCELP_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_QCELP_8000) 656#define RTP_PRIM_PAYLOAD_G728_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_G728_8000) 657#define RTP_PRIM_PAYLOAD_G729_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_G729_8000) 658#define RTP_PRIM_PAYLOAD_GSM_HR_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_GSM_HR_8000) 659#define RTP_PRIM_PAYLOAD_GSM_EFR_8000_SUPPORTED (1L << RTP_PRIM_PAYLOAD_GSM_EFR_8000) 660#define RTP_ADD_PAYLOAD_RED_SUPPORTED (1L << (RTP_ADD_PAYLOAD_RED - RTP_ADD_PAYLOAD_BASE)) 661#define RTP_ADD_PAYLOAD_CN_8000_SUPPORTED (1L << (RTP_ADD_PAYLOAD_CN_8000 - RTP_ADD_PAYLOAD_BASE)) 662#define RTP_ADD_PAYLOAD_DTMF_SUPPORTED (1L << (RTP_ADD_PAYLOAD_DTMF - RTP_ADD_PAYLOAD_BASE)) 663/* virtual switching definitions */ 664#define VSJOIN 1 665#define VSTRANSPORT 2 666#define VSGETPARAMS 3 667#define VSCAD 1 668#define VSRXCPNAME 2 669#define VSCALLSTAT 3 670#define VSINVOKEID 4 671#define VSCLMRKS 5 672#define VSTBCTIDENT 6 673#define VSETSILINKID 7 674#define VSSAMECONTROLLER 8 675/* Errorcodes for VSETSILINKID begin */ 676#define VSETSILINKIDRRWC 1 677#define VSETSILINKIDREJECT 2 678#define VSETSILINKIDTIMEOUT 3 679#define VSETSILINKIDFAILCOUNT 4 680#define VSETSILINKIDERROR 5 681/* Errorcodes for VSETSILINKID end */ 682/* -----------------------------------------------------------** 683** The PROTOCOL_FEATURE_STRING in feature.h (included ** 684** in prstart.sx and astart.sx) defines capabilities and ** 685** features of the actual protocol code. It's used as a bit ** 686** mask. ** 687** The following Bits are defined: ** 688** -----------------------------------------------------------*/ 689#define PROTCAP_TELINDUS 0x0001 /* Telindus Variant of protocol code */ 690#define PROTCAP_MAN_IF 0x0002 /* Management interface implemented */ 691#define PROTCAP_V_42 0x0004 /* V42 implemented */ 692#define PROTCAP_V90D 0x0008 /* V.90D (implies up to 384k DSP code) */ 693#define PROTCAP_EXTD_FAX 0x0010 /* Extended FAX (ECM, 2D, T6, Polling) */ 694#define PROTCAP_EXTD_RXFC 0x0020 /* RxFC (Extd Flow Control), OOB Chnl */ 695#define PROTCAP_VOIP 0x0040 /* VoIP (implies up to 512k DSP code) */ 696#define PROTCAP_CMA_ALLPR 0x0080 /* CMA support for all NL primitives */ 697#define PROTCAP_FREE8 0x0100 /* not used */ 698#define PROTCAP_FREE9 0x0200 /* not used */ 699#define PROTCAP_FREE10 0x0400 /* not used */ 700#define PROTCAP_FREE11 0x0800 /* not used */ 701#define PROTCAP_FREE12 0x1000 /* not used */ 702#define PROTCAP_FREE13 0x2000 /* not used */ 703#define PROTCAP_FREE14 0x4000 /* not used */ 704#define PROTCAP_EXTENSION 0x8000 /* used for future extensions */ 705/* -----------------------------------------------------------* */ 706/* Onhook data transmission ETS30065901 */ 707/* Message Type */ 708/*#define RESERVED4 0x4*/ 709#define CALL_SETUP 0x80 710#define MESSAGE_WAITING_INDICATOR 0x82 711/*#define RESERVED84 0x84*/ 712/*#define RESERVED85 0x85*/ 713#define ADVICE_OF_CHARGE 0x86 714/*1111 0001 715 to 716 1111 1111 717 F1H - Reserved for network operator use 718 to 719 FFH*/ 720/* Parameter Types */ 721#define DATE_AND_TIME 1 722#define CLI_PARAMETER_TYPE 2 723#define CALLED_DIRECTORY_NUMBER_PARAMETER_TYPE 3 724#define REASON_FOR_ABSENCE_OF_CLI_PARAMETER_TYPE 4 725#define NAME_PARAMETER_TYPE 7 726#define REASON_FOR_ABSENCE_OF_CALLING_PARTY_NAME_PARAMETER_TYPE 8 727#define VISUAL_INDICATOR_PARAMETER_TYPE 0xb 728#define COMPLEMENTARY_CLI_PARAMETER_TYPE 0x10 729#define CALL_TYPE_PARAMETER_TYPE 0x11 730#define FIRST_CALLED_LINE_DIRECTORY_NUMBER_PARAMETER_TYPE 0x12 731#define NETWORK_MESSAGE_SYSTEM_STATUS_PARAMETER_TYPE 0x13 732#define FORWARDED_CALL_TYPE_PARAMETER_TYPE 0x15 733#define TYPE_OF_CALLING_USER_PARAMETER_TYPE 0x16 734#define REDIRECTING_NUMBER_PARAMETER_TYPE 0x1a 735#define EXTENSION_FOR_NETWORK_OPERATOR_USE_PARAMETER_TYPE 0xe0 736/* -----------------------------------------------------------* */ 737#else 738#endif /* PC_H_INCLUDED } */ 739