Back to home page

Enduro/X

 
 

    


0001 TPSETCALLINFO(3)
0002 ================
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpsetcallinfo - Set call headers for the primary data buffer
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpsetcallinfo(const char *'msg', UBFH *'cibuf', long flags)
0016 
0017 Link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 DESCRIPTION
0020 -----------
0021 Function is used to associate UBF format based meta data storage buffer in present
0022 in variable 'cibuf' to the main XATMI buffer given in 'msg' field. 'msg' buffer
0023 must be allocated with *tpalloc(3)*.
0024 
0025 When using the 'msg' buffer for calling services, the associated call info buffer
0026 will be transported to other processes too. Deallocation of associated meta
0027 data is performed in the same time when 'msg' buffer is freed.
0028 
0029 'cibuf' may be used for purposes like storing header data (like headers for HTTP
0030 protocol) or other call relevant data, which shall travel with original call
0031 through the system (i.e. *tpcall(3)*, *tpacall(3)*, *tpconnect(3)*, *tpforward(3)*, 
0032 *tpnotify(3)*, *tpbroadcast(3)*, *tpsent(3)*, *tprecv(3)*, *tpenqueue(3)*, *tpdequeue(3)*,
0033 *tpgetrply(3)*).
0034 
0035 'flags' parameter is reserved for future use and shall be set to *0*.
0036 
0037 For *NULL* buffers ('msg' is *NULL*), call info cannot be set.
0038 
0039 When receiving data which has the call infos over the XATMI buffer for which 
0040 also have the call info associated (for example *tpgetrply(3)* call), the existing
0041 call info are replaced with received call info. If receiving data has not call
0042 info, the existing association continues to exist.
0043 
0044 When  using smart cache, the call info data not cached.
0045 
0046 RETURN VALUE
0047 ------------
0048 On success, *tpsetcallinfo()* return zero; on error, -1 is returned, with 
0049 *tperrno* set to indicate the error.
0050 
0051 ERRORS
0052 ------
0053 Note that *tpstrerror()* returns generic error message plus custom message with 
0054 debug info from last function call.
0055 
0056 *TPEINVAL* 'cibuf' is not UBF format. Flags is not *0*. 'msg' is NULL. 'msg'
0057 does not point to XATMI allocated buffer.
0058 
0059 *TPEOS* Failed to malloc or System failure occurred during serving. 
0060 See logs i.e. user log, or debugs for more info.
0061 
0062 EXAMPLE
0063 -------
0064 See *atmitest/test000_system/atmiunit0.c* for sample code.
0065 
0066 BUGS
0067 ----
0068 Report bugs to support@mavimax.com
0069 
0070 SEE ALSO
0071 --------
0072 *tpgetcallinfo(3)* *tpcall(3)* *tpacall(3)* *tpgetrply(3)* *tpforward(3)* 
0073 *tpnotify(3)* *tpbroadcast(3)* *tpenqueue(3)* *tpdequeue(3)* *tpconnect(3)* 
0074 *tpsent(3)* *tprecv(3)* 
0075 
0076 COPYING
0077 -------
0078 (C) Mavimax, Ltd
0079