tptypes — Return type information from given buffer pointer
#include <atmi.h>
long tptypes(char *ptr, char *type, char *subtype);
For XATMI client link with -latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm
For XATMI server link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm
Function returns type information from given buffer pointer in ptr. If paramter type is not NULL, then in case of success buffer type is coppied to. If buffer sub-type is used and argument subtype is not NULL, then sub-type code is coppied to.
On success, tptypes() return buffer allocated length; on error, -1 is returned, with tperrno set to indicate the error.
Note that tpstrerror() returns generic error message plus custom message with debug info from last function call.
TPEINVAL Enduro/X is not configured or buffer pointer is NULL or not allocated by tpalloc().
TPESYSTEM System failure occurred during serving. See logs i.e. user log, or debugs for more info.
TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info.