'\"macro stdmacro
.if n .pH g3n.nlsgetcall @(#)nlsgetcall	40.6 of 1/29/90
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} nlsgetcall 3N "Networking Support Utilities" "\&"
.if \nX=1 .ds x} nlsgetcall 3N "Network Support Utilities"
.if \nX=2 .ds x} nlsgetcall 3N "" "\&"
.if \nX=3 .ds x} nlsgetcall "" "" "\&"
.TH \*(x}
.SH NAME
\f4nlsgetcall\fP \- get client's data passed via the listener
.SH SYNOPSIS
.PP
\f4#include <sys/tiuser.h>\f1
.PP
\f4struct t_call \(**nlsgetcall (int fd);\f1
.SH DESCRIPTION
\f4nlsgetcall\fP allows server processes started by the
listener process to access the client's \f4t_call\f1
structure, that is, the \f2sndcall\f1 argument of \f4t_connect\f1(3N).
.PP
The \f4t_call\f1 structure returned by \f4nlsgetcall\fP can be released 
using \f4t_free\f1(3N).
.PP
\f4nlsgetcall\fP returns the
address of an allocated \f4t_call\f1 structure or
\s-1NULL\s+1 if a \f4t_call\f1 structure cannot be allocated.
If the \f4t_alloc\fP succeeds, undefined
environment variables are indicated
by a negative \f2len\f1 field in the appropriate \f4netbuf\f1 structure.  
A \f2len\f1 field of zero in the \f4netbuf\f1 structure is valid and means
that the original buffer in the listener's \f4t_call\f1 structure was \s-1NULL\s+1.
.SH WARNING
The \f2len\f1 field in the \f4netbuf\f1 structure is defined as being unsigned.
In order to check for error returns, it should first be cast to an int.
.P
The listener process limits the amount of user data (\f2udata\f1)
and options data (\f2opt\f1) to 128 bytes each.  
Address data \f2addr\f1 is limited to 64 bytes.
If the original data was longer, 
no indication of overflow is given.
.SH DIAGNOSTICS
A \s-1NULL\s+1 pointer is returned if a \f4t_call\f1 structure cannot be allocated
by \f4t_alloc\fP.  
\f4t_errno\f1 can be inspected for further error information.
Undefined environment variables are indicated by a negative length
field (\f2len\f1) in the appropriate \f4netbuf\f1 structure.
.SH FILES
\f4/usr/lib/libnsl_s.a
.br
/usr/lib/libslan.a
.br
/usr/lib/libnls.a\f1
.SH SEE ALSO
\f4nlsadmin\fP(1), \f4getenv\fP(3),
t_\f4connect\fP(3N), t_\f4alloc\fP(3N), t_\f4free\fP(3N), t_\f4error\fP(3N).
.SH NOTES
Server processes must call \f4t_sync\f1(3N) before calling this
routine.
