BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo C Function Reference

tpexport(3c)

Name

tpexport() - convert a typed message buffer into an exportable, machine-independent string representation, that includes digital signatures and encryption envelopes

Synopsis

#include <atmi.h>
int tpexport(char *ibuf, long ilen, char *ostr, long *olen,
long flags)

Description

tpexport() converts a typed message buffer into an externalized representation. An externalized representation is a message buffer that does not include any BEA Tuxedo header information that is normally added to a message buffer just before the buffer is transmitted.

The externalized representation may be transmitted between processes, machines, or BEA Tuxedo applications via any communication mechanism. It may be archived on permanent storage, and remains valid after a system shutdown and reboot.

An externalized representation includes:

ibuf 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. ilen specifies how much of ibuf to export. Note that if ibuf points to a buffer type for which a length need not be specified (for example, an FML fielded buffer), then ilen is ignored (and may be 0).

ostr is a pointer to the output area that will hold an externalized representation of the buffer's content and associated properties. If TPEX_STRING is set in flags, then the externalized format will be a string type. Otherwise, the output length is determined by *olen and may contain embedded null bytes.

On input, *olen specifies the maximum storage size available at ostr. On output *olen is set to the actual number of bytes written to ostr (including a terminating null character if TPEX_STRING is set in flags).

The flags argument may be set to TPEX_STRING if string format (base 64 encoded) is desired for the output buffer. Otherwise, the output will be binary.

Return Values

On failure, this function returns -1 and sets tperrno() to indicate the error condition.

Errors

[TPEINVAL]

Invalid arguments were given. For example, the value of ibuf is NULL or the value of flags is not set correctly.

[TPEPERM]

Permission failure. The cryptographic service provider was not able to access a private key necessary to produce a digital signature.

[TPESYSTEM]

An error occurred. Consult the system error log file for details.

[TPELIMIT]

Insufficient output storage was provided. *olen is set to the necessary amount of space.

See Also

tpimport(3c)