Version




typedef struct Tcap_Octet_Str
{
U16 length;
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
U8 octStr[TCAP_MAX_OCTSTR];
} TcapOctetStr;

typedef struct Tcap_CompId
{
U8 present; /* component ID present/not present */
U8 compId; /* component ID value */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
} TcapCompId;

|
Octet 1
|
2nd Address Digit
|
1st (most significant) Address Digit
|
|
...
|
...
|
...
|
|
Octet n
|
m + 1th Address Digit or Filler
|
mth Address Digit
|
|
Bit Pattern
|
Digit/Signal
|
|---|---|
|
0000
|
0
|
|
0001
|
1
|
|
0010
|
2
|
|
0011
|
3
|
|
0100
|
4
|
|
0101
|
5
|
|
0110
|
6
|
|
0111
|
7
|
|
1000
|
8
|
|
1001
|
9
|
|
1010
|
spare
|
|
1011
|
code 11
|
|
1100
|
code 12
|
|
1101
|
spare
|
|
1110
|
spare
|
|
1111
|
ST
|


typedef struct Tcap_Sp_Addr /* SCCP Address */
{
U8 presind; /* presence indicator */
U8 spare1; /* spare for alignment */
S16 swType; /* switch type (ANSI/ITU-T) */
U8 subsystemInd; /* subsystem indicator */
U8 pointCodeInd; /* point code indicator */
U8 glTitleInd; /* global title indicator */
U8 routingInd; /* routing indicator */
U8 natIntInd; /* national/international ind. */
U8 subsystem; /* subsystem number */
U32 pointCode; /* point code */
U8 glTransType; /* global title translation type */
U8 encoding; /* address encoding scheme */
U8 numPlan; /* numbering plan */
U8 natAddrInd; /* nature of address indicator */
U8 spare2; /* spare for alignment */
U8 glTitleLen; /* length of global title */
U8 glTitle[MAX_GLT_SZ]; /* Global Title */
} SccpAddr;
#define NOT_PRESENT 0 /* field not present in msg */
#define PRESENT 1 /* field present in msg */
#define SW_ITU 1 /* ITU-T address */
#define SW_ANSI 2 /* ANSI address */
#define SUBSYS_NONE 0x00 /* No subsystem number in addr */
#define SUBSYS_INC 0x01 /* Addr contains subsystem
* number */
#define PTCODE_NONE 0x00 /* No point code in address */
#define PTCODE_INC 0x01 /* Addr contains point code */
#define GLT_NONE 0x00 /* No global title in address */
#define GLT_TT_NP_E 0x01 /* ANSI global title includes:
* translation type, numbering
* plan & encoding */
#define GLT_TT 0x02 /* ANSI global title includes:
* translation type only */
#define GLT_ITU_FMT1 0x01 /* ITU global title includes:
* encoding, nature of address */
#define GLT_ITU_FMT2 0x02 /* ITU global title includes:
* translation type only */
#define GLT_ITU_FMT3 0x03 /* ITU global title includes:
* translation type, numbering plan
* & encoding */
#define GLT_ITU_FMT4 0x04 /* ITU global title includes:
* translation type, numbering
* plan, encoding, nature of
* address */
#define ROUTE_GLT 0x00 /* route by global title only */
#define ROUTE_PC_SN 0x01 /* route by point code + SSN */
#define ADDRIND_INT 0x00 /* International addr indicator */
#define ADDRIND_NAT 0x01 /* National address indicator */
#define SUBSYS_NONE 0x00 /* subsystem unknown/not used */
#define SUBSYS_SCCPMGMT 0x01 /* SCCP management subsystem */
#define SUBSYS_ISUP 0x03 /* ISUP subsystem */
#define SUBSYS_OMAP 0x04 /* operations, maint., admin. */
#define SUBSYS_MAP 0x05 /* mobile application part */
#define SUBSYS_HLR 0x06 /* home location register */
#define SUBSYS_VLR 0x07 /* visitor location register */
#define SUBSYS_MSC 0x08 /* mobile switching center */
#define SUBSYS_EIR 0x09 /* equipment ident. register */
#define SUBSYS_AUTH 0x0A /* authentication center */
Other values in range 0x0B - 0xFF are also allowed.
#define ENC_UNKNOWN 0x00 /* Encoding unknown */
#define ENC_BCD_ODD 0x01 /* BCD, odd number of digits */
#define ENC_BCD_EVEN 0x02 /* BCD, even number of digits */
#define NP_UNK 0x00 /* unknown */
#define NP_ISDN 0x01 /* ISDN/telephony - E.164/E.163 */
#define NP_TEL 0x02 /* telephony numbering - E.163 */
#define NP_DATA 0x03 /* data numbering - X.121 */
#define NP_TELEX 0x04 /* telex numbering-Recomm. F.69 */
#define NP_MARITIME 0x05 /* Maritime mobile numbering */
#define NP_LANDMOB 0x06 /* Land mobile numbering */
#define NP_ISDNMOB 0x07 /* ISDN/mobile numbering */
#define NP_NATIONAL 0x08 /* natnl standard numbering */
#define NP_PRIVATE 0x09 /* private numbering */
#define NP_EXT 0x0f /* reserved for extension */
#define NATIND_SUBS 0x01 /* Subscriber number */
#define NATIND_NATL 0x03 /* national number */
#define NATIND_INTNATL 0x04 /* international number */

typedef struct Tcap_Sccp_Qos
{
U8 priority; /* message priority (lowest) 0..3 (highest) */
U8 retOpt; /* action to take if msg undeliverable */
U8 seqDlvy; /* sequential deliver required? */
U8 spare; /* spare for alignment */
} TcapSccpQos;
#define MSG_DISCARD 0x00 /* discard message on error */
#define MSG_RETURN 0x08 /* return message on error */
#define TCAP_QOS_NORMAL 0 /* normal delivery, use SCCP
* class 0 */
#define TCAP_QOS_SEQDEL 1 /* seq'l delivery required,
* use SCCP class 1 */

typedef struct Tcap_Trans_Info
{
U8 msgType; /* transaction message/package type */
U8 abortCause; /* cause of an abort by TCAP layer, valid
* only if msgType is TCAP_ANSI_PABORT or
* TCAP_P_ABORT */
U8 preArgEnd; /* pre-arranged end? 0=no, 1=yes */
U8 chkpt; /* Checkpoint behavior */
U16 inactvTimer; /* Inactivity timer */
U16 spare1; /* spare for alignment */
U32 suDlgId; /* service user dialog ID */
U32 spDlgId; /* service provider (TCAP) dialog ID */
TcapSpAddr cdAddr; /* called party address */
TcapSpAddr cgAddr; /* calling party address */
TcapSccpQos qos; /* SCCP quality of service requested */
} TcapTransInfo;
#define TCAP_BEGIN 1 /* ITU-T begin message */
#define TCAP_CONTINUE 2 /* ITU-T continue message */
#define TCAP_END 3 /* ITU-T end message */
#define TCAP_U_ABORT 4 /* ITU-T user abort message */
#define TCAP_UNI 5 /* ITU-T unidirectional */
#define TCAP_QRY_PRM 6 /* ANSI query w/permission msg */
#define TCAP_QRY_NO_PRM 7 /* ANSI query w/out permiss. msg */
#define TCAP_RESPONSE 8 /* ANSI response message */
#define TCAP_CNV_PRM 9 /* ANSI conversation w/permiss.
* msg */
#define TCAP_CNV_NO_PRM 10 /* ANSI conversation without
* permission message */
#define TCAP_ANSI_UABORT 11 /* TCAP ANSI User abort message */
#define TCAP_ANSI_PABORT 12 /* TCAP ANSI Protocol abort msg */
#define TCAP_P_ABORT 13 /* CCITT protocol abort message */
#define TCAP_ANSI_UNI 14 /* ANSI unidirectional */
#define TCAP_LOC_IND 15 /* locally-generated comp. ind. */
#define TCAP_XACTION_TIMEOUT 16 /* Locally generated trans.
* timeout indication */
/* P-Abort ITU-T Causes */
#define TCAP_ABORT_UNREC_MSG 0x00 /* unrecognized message */
#define TCAP_ABORT_UNREC_TRS 0x01 /* unrecognized trans. id */
#define TCAP_ABORT_BAD_FRMT 0x02 /* malformed trans. part */
#define TCAP_ABORT_INC_TRANS 0x03 /* incorrect trans. part */
#define TCAP_ABORT_RESOURCE 0x04 /* insufficient resources */
#define TCAP_ABORT_ABNML_DLG 0x05 /* incorrect dialog portion */
#define TCAP_ABORT_NO_CMN_DLG 0x06 /* unsupported protocol
* version dialog portion */
/* P-Abort ANSI Causes */
#define TCAP_ANSI_ABORT_UP 0x01 /* unrecognized pkg. type */
#define TCAP_ANSI_ABORT_IN 0x02 /* incorrect trans. portion */
#define TCAP_ANSI_ABORT_BD 0x03 /* badly structured
* transaction portion */
#define TCAP_ANSI_ABORT_UT 0x04 /* unrecognized trans. ID */
#define TCAP_ANSI_ABORT_PR 0x05 /* Permission to release
* problem */
#define TCAP_ANSI_ABORT_RN 0x06 /* resource not available */
#define TCAP_NO_CHKPT 0 /* don't checkpoint this transaction */
#define TCAP_CHKPT 1 /* checkpoint this transaction */
#define TCAP_CHKPT_DEFAULT 2 /* use the default checkpoint value */

typedef struct Tcap_Dlg_Sect
{
U8 dlgType; /* type of message this dialog is for */
U8 resPres; /* result field present? */
U8 result; /* dialog result: accepted/rejected perm */
U8 resSrc; /* result source: user or provider (TCAP) */
U8 resDiag; /* result diagnostic */
U8 abrtSrc; /* source of abort */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
TcapOctetStr apConName; /* application context name */
TcapOctetStr secConInfo; /* security context name */
TcapOctetStr confAlgId; /* confidentiality algorithm ID */
TcapOctetStr confValue; /* confidentiality value */
U8 apConNameType; /* security context information type */
U8 secConInfoType; /* confidentiality algorithm ID type */
U8 confAlgIdType; /* confidentiality value type */
U8 confValueId; /* confidentiality value identifier */
} TcapDlgSect;
#define TCAP_DLGP_UNK 0 /* unknown dialog portion type */
#define TCAP_DLGP_UNI 1 /* unidir. dialog portion type */
#define TCAP_DLGP_REQ 2 /* request dialog portion type */
#define TCAP_DLGP_RSP 3 /* response dialog portion type */
#define TCAP_DLGP_ABT 4 /* abort dialog portion type */
#define TCAP_DLGP_ANSI 1 /* ANSI96 dialog portion type */
#define TCAP_DLGP_NONE 0xFF /* dialog portion not present */
#define TCAP_DLG_ACCEPTED 0 /* dialog has been accepted */
#define TCAP_DLG_REJ_PERM 1 /* dialog rejected permanently */
#define TCAP_DLG_SU_TAG 0x21 /* dialog service user tag */
#define TCAP_DLG_SP_TAG 0x22 /* dialog service provider tag */
#define TCAP_DLG_RSD_NULL 0 /* result diagnostic null */
#define TCAP_DLG_RSD_NORSN 1 /* no reason */
#define TCAP_DLG_RSD_NOACN 2 /* user: no appl. context name */
#define TCAP_DLG_RSD_NCDLG 2 /* provider: no common dialog
* portion */
#define TCAP_DLG_USR_ABRT 0 /* Service user */
#define TCAP_DLG_PRV_ABRT 1 /* Service provider */
If a dialog is aborted by the user application, this field should be set to TCAP_DLG_USR_ABRT. If a dialog is aborted by the TCAP layer, it will be set to TCAP_DLG_PRV_ABRT.

typedef struct Tcap_Comp
{
U8 compType; /* Component type... */
U8 rejSrc; /* source of reject/cancel component */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
union /* ANSI or ITU-T component */
{
TcapItuComp ituComp; /* ITU-T component */
TcapAnsiComp ansiComp; /* ITU-T component */
} uProt;
} TcapComp;
#define TCAP_UNKNOWN 0 /* unknown component */
#define TCAP_INVOKE 1 /* invoke */
#define TCAP_RET_RES_L 2 /* return result last */
#define TCAP_RET_ERR 3 /* return error */
#define TCAP_REJECT 4 /* reject */
#define TCAP_RET_RES_NL 5 /* return result not last */
#define TCAP_INVOKE_L 6 /* invoke last */
#define TCAP_INVOKE_NL 7 /* invoke not last */
#define TCAP_CANCEL 8 /* cancel outstanding invoke */
#define TCAP_COMP_NONE 0 /* no additional status */
#define TCAP_COMP_CANCEL 5 /* invoke component timed out */
#define TCAP_COMP_REJ_USR 6 /* TC user reject component */
#define TCAP_COMP_REJ_LOCAL 7 /* local TCAP reject component */
#define TCAP_COMP_REJ_REMOTE 8 /* remote TCAP reject comp. */
When an outstanding invoke operation times out, the TCAP layer creates a REJECT component with a rejSrc of TCAP_COMP_CANCEL. This field is not used for outgoing components.

typedef struct Tcap_Ansi_Comp
{
TcapCompId invokeId; /* invoke id */
TcapCompId corrId; /* correlation id */
U16 invokeTimer; /* Invoke Timer */
union /* component type-specfic fields */
{
TcapAnsiOpcode opcode; /* operation code for invoke */
TcapAnsiErrcode errcode; /* error code for return error */
TcapAnsiPrbcode prbcode; /* problem code for reject */
} uComp;
U8 paramFlg; /* Set or Sequence... */
U8 spare; /* spare for alignment */
} TcapAnsiComp;
typedef struct Tcap_Ansi_Opcode
{
U8 opCodeId; /* operation code identifier */
U8 opFamily; /* operation code family */
U8 opSpec; /* operation code */
U8 spare; /* spare for alignment */
} TcapAnsiOpcode;
The opCodeId is set to one of the following values:#define TCAP_NATIONAL 3 /* National TCAP */ #define TCAP_PRIVATE 4 /* Private TCAP */ The opFamily field has several pre-defined fields for National TCAP. If the opCodeId specifies "private TCAP", an application-specific value is used.
#define TCAP_ANSI_NOF_NU 0x00 /* not used */ #define TCAP_ANSI_NOF_PARAM 0x01 /* parameter */ #define TCAP_ANSI_NOF_CHGING 0x02 /* charging */ #define TCAP_ANSI_NOF_PR_INS 0x03 /* provide instructions */ #define TCAP_ANSI_NOF_CN_CTL 0x04 /* connection control */ #define TCAP_ANSI_NOF_CL_INT 0x05 /* caller interaction */ #define TCAP_ANSI_NOF_SND_NO 0x06 /* send notification */ #define TCAP_ANSI_NOF_NET_MN 0x07 /* network management */ #define TCAP_ANSI_NOF_PROC 0x08 /* procedural */ #define TCAP_ANSI_NOF_OP_CTL 0x09 /* Operation Control Family * (ANSI-92) */ #define TCAP_ANSI_NOF_RP_EVT 0x0A /* Report Event Family * (ANSI-92) */ #define TCAP_ANSI_NOF_MISC 0x7E /* miscellaneous */ #define TCAP_ANSI_NOF_RSRVD 0x7F /* reserved */
In order to specify that a reply is required, the following value should be logically OR'd with one of the previous values.
#define TCAP_ANSI_NOF_RP_REQ 0x80 /* reply req'd: OR w/value */ The opSpec field (operation specifier) specifies a particular operation within an operation family.
#define TCAP_ANSI_OS_RSRVD 0xFF /* all families - reserved */ #define TCAP_ANSI_OS_NU 0x00 /* all families - not used */ #define TCAP_ANSI_OS_PRV_VAL 0x01 /* parameter - provide * value */ #define TCAP_ANSI_OS_SET_VAL 0x02 /* parameter - set value */ #define TCAP_ANSI_OS_BL_CALL 0x01 /* charging - bill call */ #define TCAP_ANSI_OS_START 0x01 /* provide instruction- * start */ #define TCAP_ANSI_OS_ASSIST 0x02 /* provide instruction * assist */ #define TCAP_ANSI_OS_CONNECT 0x01 /* conn. control - connect */ #define TCAP_ANSI_OS_TMP_CON 0x02 /* conn. control - temporary * connect */ #define TCAP_ANSI_OS_DISC 0x03 /* conn.control - disconn. */ #define TCAP_ANSI_OS_FWD_DIS 0x04 /* conn.control - forward * disconnect */ #define TCAP_ANSI_OS_PLY_ANN 0x01 /* caller interaction - play * announcement */ #define TCAP_ANSI_OS_COL_DIG 0x02 /* caller interaction - play * ann & collect digits */ #define TCAP_ANSI_OS_INF_WTG 0x03 /* caller interaction - * information waiting */ #define TCAP_ANSI_OS_INF_PVD 0x03 /* caller interaction - info. * Provided */ #define TCAP_ANSI_OS_PTY_FRE 0x01 /* send notif. when free */ #define TCAP_ANSI_OS_RAS_TRM 0x01 /* procedural report assist * termination */ #define TCAP_ANSI_OS_CANCEL 0x01 /* Oper. Control - Cancel */ #define TCAP_ANSI_OS_VM_AVL 0x01 /* Report Event - Voice Message * Available */ #define TCAP_ANSI_OS_VM_RTVD 0x02 /* Report Event - Voice Message * Retrieved*/ #define TCAP_ANSI_OS_Q_CALL 0x02 /* Misc. - Queue Call */ #define TCAP_ANSI_OS_DQ_CALL 0x02 /* Misc. - Dequeue Call */ #define TCAP_ANSI_OS_CAL_GAP 0x01 /* network mgmt. - call gap */ #define TCAP_ANSI_OS_TMP_HDN 0x01 /* proc. - temp. handover */
typedef struct Tcap_Ansi_Errcode
{
U8 errCodeId; /* error code identifier */
U8 errCode; /* error code value */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
} TcapAnsiErrcode;
The errCodeId is set to one of the following values:#define TCAP_NATIONAL 3 /* National TCAP */ #define TCAP_PRIVATE 4 /* Private TCAP */ The errCode field has several pre-defined fields for National TCAP (shown below). If the errCodeId specifies "private TCAP", an application-specific value is used.
#define TCAP_ANSI_ERR_NU 0x00 /* not used */ #define TCAP_ANSI_ERR_UX_CMP 0x01 /* unexpected component seq. */ #define TCAP_ANSI_ERR_UX_DAT 0x02 /* unexpected data value */ #define TCAP_ANSI_ERR_UA_NET 0x03 /* unavailable network * resource */ #define TCAP_ANSI_ERR_MSG_RC 0x04 /* missing customer record */ #define TCAP_ANSI_ERR_REP_OD 0x05 /* reply overdue (ANSI-88) */ #define TCAP_ANSI_ERR_REP_SC 0x05 /* spare code (ANSI-92) */ #define TCAP_ANSI_ERR_DAT_UA 0x06 /* data unavailable */ #define TCAP_ANSI_ERR_TSK_RE 0x07 /* Task refused (ANSI-92) */ #define TCAP_ANSI_ERR_Q_FULL 0x08 /* Queue Full (ANSI-92) */ #define TCAP_ANSI_ERR_NO_Q 0x09 /* No Queue (ANSI-92) */ #define TCAP_ANSI_ERR_TMR_EX 0x0A /* Timer Expired (ANSI-92) */ #define TCAP_ANSI_ERR_DAT_EX 0x0B /* Data already exists * (ANSI92) */ #define TCAP_ANSI_ERR_UNAUTH 0x0C /* Un authorized Rqst * (ANSI-92) */ #define TCAP_ANSI_ERR_NOT_QD 0x0D /* Not Queued (ANSI-92) */ #define TCAP_ANSI_ERR_UAS_DN 0x0E /* Unassigned DN (ANSI-92) */ #define TCAP_ANSI_ERR_SPARE 0x0F /* Spare (ANSI-92) */ #define TCAP_ANSI_ERR_NOT_AV 0x10 /* Notification Available on * dest DN(ANSI-92) */ #define TCAP_ANSI_ERR_VMSR_E 0x11 /* VMSR sys. ID does not match * user profile (ANSI-92) */
typedef struct Tcap_Ansi_Prbcode
{
U8 probType; /* problem type... */
U8 probSpec; /* problem specifier */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
} TcapAnsiPrbcode;
The probType field classifies the problem encountered in the rejected component.#define TCAP_ANSI_PRB_NU 0x00 /* not used */ #define TCAP_ANSI_PRB_GEN 0x01 /* general */ #define TCAP_ANSI_PRB_INV 0x02 /* invoke */ #define TCAP_ANSI_PRB_RR 0x03 /* return result */ #define TCAP_ANSI_PRB_RE 0x04 /* return error */ #define TCAP_ANSI_PRB_TRANS 0x05 /* transaction portion */ #define TCAP_ANSI_PRB_RSRVD 0xFF /* all families - reserved */ The probType field specifies the particular problem encountered in the rejected component.
/* general problems */ #define TCAP_ANSI_PRB_UR_CMP 0x01 /* unrecognized component */ #define TCAP_ANSI_PRB_IN_CMP 0x02 /* incorrect component */ #define TCAP_ANSI_PRB_BD_CMP 0x03 /* badly structured component */ /* invoke problems */ #define TCAP_ANSI_PRB_DUP_ID 0x01 /* duplicate invoke ID */ #define TCAP_ANSI_PRB_UR_OP 0x02 /* unrecognized oper. code */ #define TCAP_ANSI_PRB_IN_PRM 0x03 /* incorrect parameter */ #define TCAP_ANSI_PRB_IUR_ID 0x04 /* unrecognized correl. ID */ /* return result problems */ #define TCAP_ANSI_PRB_RUR_ID 0x01 /* unrecognized correlation ID */ #define TCAP_ANSI_PRB_UX_RES 0x02 /* unexpected return result */ /* return error problems */ #define TCAP_ANSI_PRB_EUR_ID 0x01 /* unrecognized correlation ID */ #define TCAP_ANSI_PRB_UX_RER 0x02 /* unexpected return error */ #define TCAP_ANSI_PRB_UR_ERR 0x03 /* unrecognized error */ #define TCAP_ANSI_PRB_UX_ERR 0x04 /* unexpected error */ #define TCAP_ANSI_PRB_EN_PRM 0x05 /* incorrect parameter */ /* transaction portion problems */ #define TCAP_ANSI_PRB_UR_PKG 0x01 /* unrecognized package type */ #define TCAP_ANSI_PRB_IN_TRN 0x02 /* incorrect transaction part */ #define TCAP_ANSI_PRB_BD_TRN 0x03 /* badly structured * transaction portion */ #define TCAP_ANSI_PRB_UR_TRN 0x04 /* unrecognized transaction ID */ #define TCAP_ANSI_PRB_PR_TRN 0x05 /* permission to release */ #define TCAP_ANSI_PRB_RU_TRN 0x06 /* resource unavailable */
#define TCAP_NO_SET_SEQ 0 /* no parameters */
#define TCAP_SEQUENCE 1 /* parameter is a sequence */
#define TCAP_SET 2 /* parameter is a set */

typedef struct Tcap_Itu_Comp
{
TcapCompId invokeId; /* invoke id */
TcapCompId linkedId; /* linked id */
U16 invokeTimer; /* Invoke Timer */
U8 opClass; /* operation class for invoke */
U8 spare; /* spare for alignment */
union /* component type-specific fields */
{
TcapItuOpcode opcode; /* operation code for invoke */
TcapItuErrcode errcode; /* error code for return error */
TcapItuPrbcode prbcode; /* problem code for reject */
} uComp;
} TcapItuComp;
typedef struct Tcap_Itu_Opcode
{
U8 opCodeType; /* operation code type */
U8 spare; /* spare for alignment */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
TcapOctetStr opCode; /* opcode length/value */
} TcapItuOpcode;
The opCodeType is set to one of the following values:#define TCAP_NONE 0 /* opcode omitted (return result only) */ #define TCAP_LOCAL 1 /* local error/operation code */ #define TCAP_GLOBAL 2 /* global error/operation code */ The opCode value is an variable length octet string coded to the standards for the application protocol in use.
typedef struct Tcap_Itu_Errcode
{
U8 errCodeId; /* error code identifier */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
U8 spare; /* spare for alignment */
TcapOctetStr errCode; /* error code length/value */
} TcapItuErrcode;
The errCodeId is set to one of the following values:#define TCAP_LOCAL 1 /* local error/operation code */ #define TCAP_GLOBAL 2 /* global error/operation code */ The errCode value is an variable length octet string coded to the standards for the application protocol in use.
typedef struct Tcap_Itu_Prbcode
{
U8 probType; /* problem type */
U8 spare; /* spare for alignment */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
TcapOctetStr prbCode; /* problem code length/value */
} TcapItuPrbcode;
The probType field classifies the problem encountered in the rejected component.#define TCAP_PROB_NONE 0x00 /* no problem code flag */ #define TCAP_PROB_GENERAL 0x80 /* general problem code flag */ #define TCAP_PROB_INVOKE 0x81 /* invoke problem code flag */ #define TCAP_PROB_RET_RES 0x82 /* return result problem code */ #define TCAP_PROB_RET_ERR 0x83 /* return err problem code flag */ The prbCode value is a variable length octet string.
/* General Problems */ #define TCAP_UNREC_COMP 0 /* Unrecognized component */ #define TCAP_MISTYPED_COMP 1 /* Mistyped parameter */ #define TCAP_BAD_STRUC_COMP 2 /* Badly structured component */ /* Invoke problems */ #define TCAP_DUP_INVOKE 0 /* Duplicate Invoke Id */ #define TCAP_UNREC_OPR 1 /* Unrecognized invoke Id */ #define TCAP_MISTYPED_PARAM 2 /* Mistyped parameter */ #define TCAP_RESOURCE_LIMIT 3 /* Resource limitation */ #define TCAP_INIT_RELEASE 4 /* Initiating Release */ #define TCAP_UNREC_LINKED_ID 5 /* Unrecognized linked Id */ #define TCAP_LINKED_RESP_UNX 6 /* Linked response unexpected */ #define TCAP_UNX_LINKED_OP 7 /* Unexpected linked operation */ /* Return result problem */ #define TCAP_RR_UNREC_INVKID 0 /* Unrecognized invoke Id */ #define TCAP_UNX_RETRSLT 1 /* Return result unexpected */ #define TCAP_RR_MISTYPED_PAR 2 /* Mistyped parameter */ /* Return Error problems */ #define TCAP_RE_UNREC_INVKID 0 /* Unerecognized invoke id */ #define TCAP_RE_UNX_RETERR 1 /* Unexpected return error */ #define TCAP_UNREC_ERROR 2 /* Unrecgnized error */ #define TCAP_UNX_ERR 3 /* Unexpected error */ #define TCAP_RE_MISTYPED_PAR 4 /* Mistyped parameter */


typedef struct Tcap_Recv_Info
{
U8 eventType; /* Event type... */
U8 spare; /* spare for alignment */
S16 suId; /* TCAP SAP ID event belongs to */
union /* event-specific info */
{
TcapCoordEvent coord; /* coord indication/confirm */
TcapPCStateEvent pcstate; /* SP state change */
TcapSsnStateEvent ssnstate; /* subsystem state change */
TcapNotifEvent notif; /* undeliverable msg notify */
TcapStatusEvent status; /* TCAP error indication */
TcapTransEvent; data; /* transaction data */
} event;
} TcapRecvInfo;
#define TCAP_EVENT_DAT_IND 0xB1 /* Transaction data ind. */
#define TCAP_EVENT_STA_IND 0xB2 /* Status (error) ind. */
#define TCAP_EVENT_COORD_IND 0xB3 /* coordinated state change
* indication */
#define TCAP_EVENT_COORD_CFM 0xB4 /* coordinated state change
* confirmation */
#define TCAP_EVENT_SSN_STATE 0xB5 /* Subsystem state change */
#define TCAP_EVENT_PC_STATE 0xB6 /* SP state change */
#define TCAP_EVENT_NOT_IND 0xBF /* Notice indication (sccp
* undeliverable msg return) */

typedef struct Tcap_Coord_Event
{
U8 aSsn; /* affected subsystem number */
U8 smi; /* subsystem multiplicity indicator... */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
} TcapCoordEvent;
#define SMI_UNKNOWN 0x00 /* multiplicity unknown */
#define SMI_SOLO 0x01 /* subsystem not replicated */
#define SMI_DUP 0x02 /* subsystem is replicated */
#define SMI_DENIED 0x10 /* Indicate denial of coordinated
* state change */
The special value SMI_DENIED is used by the SCCP in the TCAP_EVENT_COORD_CFM message to indicate that the state change request timed out and was not granted.
typedef struct Tcap_PCState_Event
{
U32 aPc; /* affected point code */
U8 status; /* new signaling point status */
U8 spare; /* spare for alignment */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
} TcapPCStateEvent;
#define SP_ACC 0x00 /* Signaling Point Accessible */
#define SP_INACC 0x01 /* Signaling Point inaccessible */
#define SP_INACC_NODROP 0x06 /* Signaling Point inaccessible-
* connections NOT dropped */
#define SP_CONG_OFF 0x07 /* APC congestion ceased */
#define SP_CONG1 0x10 /* APC congestion level 1 */
#define SP_CONG2 0x11 /* APC congestion level 2 */
#define SP_CONG3 0x12 /* APC congestion level 3 */

typedef struct Tcap_Ssn_State_Event
{
U8 Ssn; /* affected subsystem number */
U8 status; /* new subsystem status */
U8 smi; /* subsystem multiplicity indicator */
U8 spare; /* spare for alignment */
U32 aPc; /* affected point code - future use */
} TcapSsnStateEvent;
#define SS_OOS 0x03 /* Subsystem out of service */
#define SS_IS 0x04 /* Subsystem in service */
#define SMI_UNKNOWN 0x00 /* multiplicity unknown */
#define SMI_SOLO 0x01 /* subsystem not replicated */
#define SMI_DUP 0x02 /* subsystem is replicated */

typedef struct Tcap_Notif_Event
{
TcapTransInfo transInfo; /* trans. info from failed Req */
U8 retcause; /* cause for return of message */
U8 spare; /* spare for alignment */
U8 fill; /* fill for alignment */
U8 fill2; /* fill for alignment */
} TcapNotifEvent;
#define RETCGENTRANS 0x00 /* no translation for address of
* this nature */
#define RETCNOTRANS 0x01 /* no translation for this address */
#define RETCSUBSCONG 0x02 /* Subsystem congestion */
#define RETCSUBSFAIL 0x03 /* Subsystem failure */
#define RETCUNQUIP 0x04 /* unequipped user */
#define RETCNETFAIL 0x05 /* network failure */
#define RETCNETCONG 0x06 /* Network congestion */
#define RETCUNQUALIFIED 0x07 /* unqualified */
#define RETCHOPCNT 0x08 /* hop counter violation */
#define RETCMSGXPORT 0x09 /* error in message transport */
#define RETCLOCALPROC 0x0A /* error in local processing */
#define RETCREASSEMBLY 0x0B /* dest can't do reassembly */
#define RETCBADISNI 0xF9 /* invalid ISNI routing rqst */
#define RETCAUTH 0xFA /* unauthorized message */
#define RETCINCOMPAT 0xFB /* message incompatibility */
#define RETCNOISNI 0xFC /* can't do ISNI constrained
* routing */
#define RETCREDISNI 0xFD /* redundant ISNI constrained
* routing information */
#define RETCISNIID 0xFE /* can't do ISNI identification */

typedef struct Tcap_Status_Event
{
S16 status; /* cause of error */
S16 suId /* caller's service user ID */
} TcapStatusEvent;
#define TCAP_R_EVT_INAPP 1 /* received event in inappropriate
* state */
#define TCAP_MSNG_ELE 2 /* missing mandatory element */
#define TCAP_DUP_INV_ID 3 /* duplicate invoke ID */
#define TCAP_INV_REJ 4 /* rec'd REJECT with syntax error */
#define TCAP_CONGESTED 5 /* unable to initiate new transaction
/* due to outbound congestion */
#define TCAP_RES_FAIL 6 /* unable to initiate new transaction
/* due to dialog control block
/* exhaustion */

typedef struct Tcap_Trans_Event
{
U32 opc; /* originating point code from
* routing label */
TcapTransInfo transInfo; /* transaction info block */
TcapDlgSect dlgPart; /* ITU-92 dialog section */
U16 numComps; /* number of components in msg */
U16 userInfoLen; /* byte length of user info */
U8 *pUserInfo; /* pointer to user dialog info */
} TcapTransEvent;
Version