(Page 8 of 13 in this chapter)


TxApiPktInit

Description

Initializes a block of memory as a TX API Common Management packet (to be used as a request or response in future
TX API calls).

Prototype

short TxApiPktInit (TXAPIHNDL *handle,
TXMNGPKT *mngpkt )

handle Pointer to TX API handle (indicating destination communications processor).

mngpkt Pointer to TX API Management packet to be initialized.

Return Values

TX API completion code.

Details

The application is responsible for providing request and response packets to the TX Common Management API. This allows the application to have the greatest amount of control over memory handling. Request and response packets must be the size of a full TXMNGPKT structure. For more information about the TXMNGPKT structure, refer to Appendix C.

Note: TxApiPktInit need only be called once for a given packet. That packet may then be used for repeated requests/responses. If a given packet is to be used to send a request to a different destination than the one set at the time TxApiPktInit was called, the application may call TxApiPktInit again (or change the destination in the packet directly).

TxApiPktInit begins by zero-filling the entire packet header area. This includes all fields up to the start of the included data block (which is left as uninitialized data).

The destination portion of the packet will then be initialized based on the associated fields in the TX API handle structure. The destination communications processor number is set (as well as setting the dual port RAM channel number to that used by the Common Management API). Any remote communications processor and remote node address that has been set in the TX API handle will also be set at this time. For more information about the TXAPIHNDL structure, refer to
Appendix C.

See Also

TxApiOpen



(Page 8 of 13 in this chapter)


tech_support@nmss.com
Copyright © 1998, Natural MicroSystems, Inc. All rights reserved.