Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Networking Services Library Functionsnlsgetcall(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() succeeds, 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/libnsl_s.a
/usr/lib/libslan.a
/usr/lib/libnls.a

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelUnsafe

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.9Go To TopLast Changed 30 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.