Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nlsgetcall(3nsl) [x11r4 man page]

nlsgetcall(3NSL)				       Networking Services Library Functions					  nlsgetcall(3NSL)

NAME
nlsgetcall - get client's data passed via the listener SYNOPSIS
#include <sys/tiuser.h> struct t_call *nlsgetcall(int fildes); DESCRIPTION
nlsgetcall() allows server processes started by the listener process to access the client's t_call structure, that is, the sndcall argument of t_connect(3NSL). The t_call structure returned by nlsgetcall() can be released using t_free(3NSL). nlsgetcall() returns the address of an allocated t_call structure or NULL if a t_call structure cannot be allocated. If the t_alloc() suc- ceeds, undefined environment variables are indicated by a negative len field in the appropriate netbuf structure. A len field of zero in the netbuf structure is valid and means that the original buffer in the listener's t_call structure was NULL. RETURN VALUES
A NULL pointer is returned if a t_call structure cannot be allocated by t_alloc(). t_errno can be inspected for further error information. Undefined environment variables are indicated by a negative length field (len) in the appropriate netbuf structure. FILES
/usr/lib/libnls.so.1 shared object ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
nlsadmin(1M), getenv(3C), t_alloc(3NSL), t_connect(3NSL), t_error(3NSL), t_free(3NSL), t_sync(3NSL), attributes(5) WARNINGS
The len field in the netbuf structure is defined as being unsigned. In order to check for error returns, it should first be cast to an int. The listener process limits the amount of user data (udata) and options data (opt) to 128 bytes each. Address data addr is limited to 64 bytes. If the original data was longer, no indication of overflow is given. NOTES
Server processes must call t_sync(3NSL) before calling this routine. This interface is unsafe in multithreaded applications. Unsafe interfaces should be called only from the main thread. SunOS 5.10 14 Nov 2002 nlsgetcall(3NSL)

Check Out this Related Man Page

t_free(3NSL)					       Networking Services Library Functions					      t_free(3NSL)

NAME
t_free - free a library structure SYNOPSIS
#include <xti.h> int t_free(void *ptr, int struct_type); DESCRIPTION
This routine is part of the XTI interfaces which evolved from the TLI interfaces. XTI represents the future evolution of these interfaces. However, TLI interfaces are supported for compatibility. When using a TLI routine that has the same name as an XTI routine, the tiuser.h header file must be used. Refer to the TLI COMPATIBILITY section for a description of differences between the two interfaces. The t_free() function frees memory previously allocated by t_alloc(3NSL). This function will free memory for the specified structure, and will also free memory for buffers referenced by the structure. The argument ptr points to one of the seven structure types described for t_alloc(3NSL), and struct_type identifies the type of that struc- ture which must be one of the following: T_BIND struct t_bind T_CALL struct t_call T_OPTMGMT struct t_optmgmt T_DIS struct t_discon T_UNITDATA struct t_unitdata T_UDERROR struct t_uderr T_INFO struct t_info where each of these structures is used as an argument to one or more transport functions. The function t_free() will check the addr, opt and udata fields of the given structure, as appropriate, and free the buffers pointed to by the buf field of the netbuf structure. If buf is a null pointer, t_free() will not attempt to free memory. After all buffers are freed, t_free() will free the memory associated with the structure pointed to by ptr. Undefined results will occur if ptr or any of the buf pointers points to a block of memory that was not previously allocated by t_alloc(3NSL). RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and t_errno is set to indicate an error. VALID STATES
ALL - apart from T_UNINIT. ERRORS
On failure, t_errno is set to the following: TNOSTRUCTYPE Unsupported struct_type requested. TPROTO This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI error (t_errno). TSYSERR A system error has occurred during execution of this function. TLI COMPATIBILITY
The XTI and TLI interface definitions have common names but use different header files. This, and other semantic differences between the two interfaces are described in the subsections below. Interface Header The XTI interfaces use the header file, xti.h. TLI interfaces should not use this header. They should use the header: #include <tiuser.h> Error Description Values The t_errno value that can be set by the XTI interface and cannot be set by the TLI interface is: TPROTO ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
t_alloc(3NSL), attributes(5) SunOS 5.11 7 May 1998 t_free(3NSL)
Man Page