(Page 5 of 13 in this chapter)
TxApiIoInit
Description
- Initializes the IO packet portion of a TX API packet to the type of request indicated by pktssnum.
Prototype
- unsigned char *TxApiIoInit (TXMNGPKT *req,
unsigned char pktssnum,
char *pktfname )
- req Pointer to packet for which to set IO portion.
- pktssnum Type of IO packet (from definitions in cpkuser.h).
- Example:
CREATE_
- pktfname Pointer to destination entity name (may be NULL). Example:
tpx:routes
Return Values
- Pointer to next available byte in management packet's data block area. This will either be the first byte of data (if pktfname was NULL) or MAXFNA + 2 bytes into the data block (see discussion above).
- The entire IO packet area is zero-filled. The internal IO packet area is then set to be an IO packet (pktsvnum set to IO_) and pktssnum is set to the value indicated.
- If the destination string (pktfname) is non-NULL, pktfnsiz (in the IO packet area) is set to the length of pktfname. The top of the management packet's datablk is then zero-filled for the maximum destination string size (plus room for NULL-terminator and additional byte to return to even word boundary: MAXFNA + 2). The destination string is then copied to the first byte of the management packet's data area.
Note: pktfname in the IO packet area is left as zero since that is always the offset into the data block where the destination entity name can be found.
- The maximum destination string size is always reserved by TxApiIoInit so that the request may be re-issued to other destinations (of different destination string lengths) without having to re-build all following data blocks.
See Also
- TxApiPktInit
(Page 5 of 13 in this chapter)
tech_support@nmss.com
Copyright © 1998, Natural MicroSystems, Inc. All rights
reserved.