![]() |
![]() |
|
|
tpimport(3c)
Name
tpimport()—Converts an externalized representation of a message buffer into a typed message buffer.
Synopsis
#include <atmi.h>
int tpimport(char *istr, long ilen, char **obuf, long *olen,
long flags)
Description
tpimport() converts an externalized representation of a message buffer into a typed message buffer. An externalized representation is a message buffer that does not include any BEA Tuxedo ATMI header information that is normally added to a message buffer just before the buffer is transmitted. A process converts a typed message buffer into an externalized representation by calling the tpexport() function.
Any digital signatures associated with istr are verified when the buffer is imported, and are available for examination after importing via tpenvelope().
If the istr buffer representation is encrypted, the importing process must have access to a valid private key for decryption. Decryption is performed automatically during the importing process.
If TPEX_STRING is not set in flags, then ilen contains the length of the binary data contained in istr. If ilen is 0, istr is assumed to point to a NULL-terminated string, and the TPEX_STRING flag is inferred.
*obuf must point to a valid typed message buffer either (1) previously allocated by a process calling tpalloc() or (2) delivered by the system to a receiving process. The buffer will be reallocated as necessary to accommodate the result, and its buffer type or subtype may change.
*olen is set to the amount of valid data contained in the output buffer. If olen is NULL on input, it is ignored.
The flags argument should be set to TPEX_STRING if the input externalized representation is in string format (base 64 encoded). Otherwise, the input is in binary format of length ilen.
Return Values
On failure, this function returns -1 and sets tperrno() to indicate the error condition.
Errors
See Also
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|