txswiReply

Verifies the reply message and decodes the message if required.

Prototype

TXSWI_MSG txswiReply ( CPIPKT *pkt, S16 len, U32 *ccode)

Argument

Description

pkt

Pointer to the CPI packet (of len) to be formatted into a TX SWI request message.

len

Byte length of the CPI packet to be decoded.

ccode

Pointer to the location where the completion code is stored.


Return value

Return value

Description

Message pointer

Pointer to the received and decoded TX SWI message.

NULL if invalid pkt.


Details

All TX SWI request messages complete asynchronously. A separate reply message is received when the TX board completes processing the corresponding request message. When a TX SWI reply message is received, the application calls txswiReply to have the reply verified and converted to the host native format. After calling txswiReply, the returned message pointer holds the information provided by the TX board. The TXSWI_MSG structure is a union of all message types provided by the TX SWI library. To obtain the correct reply information, reference the proper response sub-structure. For example, to obtain the response from a txswiGetSwitchCaps request, reference the message as:

rxmsg->response.get_switch_caps…

Refer to Sending and receiving requests for more information.