(Page 6 of 14 in this chapter)
TCAPGetComp
Description
- Extracts a specific component and, optionally, its associated parameter(s) from a TCAP transaction data message received via TCAPRetrieveMessage.
Prototype
- S16 TCAPGetComp (U8 *pMessage,
- U8 index,
- TcapComp *pComp,
- U16 *pParamLen,
- U8 *pParamBuf )
- pMessage The address of the caller's message buffer containing a message of type TCAP_EVENT_DAT_IND that was previously received via the TCAPRetrieveMessage primitive.
- index The index of the component being retrieved; its range is 0..TcapTransEvent.numComps - 1, where TcapTransEvent is the event structure associated with this message that was returned by the TCAPRetrieveMessage primitive.
- pComp The address of the caller's TcapComp area where the component body (not including parameters) is returned.
- pParamLen On input, this field should be set to the maximum number of bytes of parameters to be copied into caller's parameter buffer. On return, this field will be set to the actual number of bytes of parameters copied to the caller's parameter buffer. See the Details section for special considerations on this field.
- pParamBuf The address of the caller's parameter buffer where parameters belonging to this component are returned to caller (size of this buffer is passed initially in the pParamLen parameter).
Return Values
Details
- The caller must preserve the contents of the message buffer between the call to TCAPRetrieveMessage that returned the message and the last call to TCAPGetComp to retrieve the last component. Once the last call to TCAPGetComp returns, the message buffer may be released or reused.
- If the caller does not expect any parameters with this component, then NULL pointers may be specified for the pParamLen and pParamBuf arguments.
- If the number of bytes of component parameters belonging to the specified component exceeds the size of the caller's parameter buffer (as specified by the input value of the pParamLen argument), then:
- The actual number of bytes needed to contain the parameters is
returned to the caller in the pParamLen argument (if pParamLen
is not NULL); and
- The return value of the function is TCAP_OVERFLOW.
(Page 6 of 14 in this chapter)
tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights
reserved.