Adds a component and, optionally, its associated parameters to a TCAP transaction data message being constructed.
DWORD TCAPAddComp ( U8 *pMessage, TcapComp *pComp, U16 paramLen, U8 *pParamBuf)
Argument |
Description |
pMessage |
Pointer to the address of the caller's message buffer. This buffer must have been previously initialized with TCAPInitTrans. |
pComp |
Pointer to the address of the caller's TcapComp structure where the characteristics of the component (component type, component IDs, other component type-specific attributes) are defined. |
paramLen |
Byte length of component parameters to be included in the message. If no parameters are included with this component, set this parameter to 0 (zero). |
pParamBuf |
Pointer to the address of the buffer containing component parameters. If this component has no parameters, pass a NULL pointer for this argument. |
Return value |
Description |
TCAP_SUCCESS |
|
TCAP_OVERFLOW |
Adding this component/parameters to the message overflows the maximum TCAP message size. |
TCAP_PARAM |
NULL pointer was passed for a required parameter. |
TCAP_UNINIT |
Supplied message buffer (pMessage) is not a valid message. |
For ANSI components, all parameters associated with a component must be enclosed by an ASN.1 SET or SEQUENCE constructor. This is performed on behalf of the application by the TCAP layer, based on the value in the paramFlg field in the ANSI component structure.
For ITU-T components, there is no requirement that all parameters be enclosed in a ASN.1 SET or SEQUENCE constructor. If this is required by the specific application protocol, then it must be done by the application.