1t_rcvconnect(3NSL)   Networking Services Library Functions  t_rcvconnect(3NSL)
2
3
4

NAME

6       t_rcvconnect - receive the confirmation from a connection request
7

SYNOPSIS

9       #include <xti.h>
10
11
12
13       int t_rcvconnect(int fd, struct t_call *call);
14
15

DESCRIPTION

17       This  routine  is part of the XTI interfaces which evolved from the TLI
18       interfaces. XTI represents the future evolution  of  these  interfaces.
19       However,  TLI  interfaces are supported for compatibility. When using a
20       TLI routine that has the same name as an  XTI  routine,  the   tiuser.h
21       header  file must be used.  Refer to the  TLI COMPATIBILITY section for
22       a description of differences between the two interfaces.
23
24
25       This function enables a calling transport user to determine the  status
26       of a previously sent connection request and is used in conjunction with
27       t_connect(3NSL) to establish a connection in asynchronous mode, and  to
28       complete  a synchronous  t_connect(3NSL) call that was interrupted by a
29       signal. The connection will be established on successful completion  of
30       this function.
31
32
33       The  argument fd identifies the local transport endpoint where communi‐
34       cation will be established, and call  contains  information  associated
35       with  the  newly  established connection. The argument call points to a
36       t_call structure which contains the following members:
37
38         struct netbuf addr;
39         struct netbuf opt;
40         struct netbuf udata;
41         int sequence;
42
43
44
45       In call, addr returns the protocol address associated with the respond‐
46       ing  transport  endpoint,  opt presents any options associated with the
47       connection, udata points to optional user data that may be returned  by
48       the  destination  transport  user  during connection establishment, and
49       sequence has no meaning for this function.
50
51
52       The maxlen field of each argument must be set before issuing this func‐
53       tion  to  indicate  the  maximum  size of the buffer for each. However,
54       maxlen can be set to zero, in which case no information  to  this  spe‐
55       cific argument is given to the user on the return from  t_rcvconnect().
56       If  call is set to   NULL,  no  information  at  all  is  returned.  By
57       default,  t_rcvconnect() executes in synchronous mode and waits for the
58       connection to be established before returning. On return, the addr, opt
59       and udata fields reflect values associated with the connection.
60
61
62       If   O_NONBLOCK  is set by means of t_open(3NSL) or fcntl(2), t_rcvcon‐
63       nect() executes in asynchronous mode, and reduces to a poll for  exist‐
64       ing  connection  confirmations.  If  none are available, t_rcvconnect()
65       fails and returns immediately without waiting for the connection to  be
66       established.  See  TNODATA  below. In this case, t_rcvconnect() must be
67       called  again  to  complete  the  connection  establishment  phase  and
68       retrieve the information returned in call.
69

RETURN VALUES

71       Upon  successful  completion,  a value of  0 is returned.  Otherwise, a
72       value of  -1 is returned and t_errno is set to indicate an error.
73

VALID STATES

75       T_OUTCON.
76

ERRORS

78       On failure, t_errno is set to one of the following:
79
80       TBADF          The specified file descriptor does not refer to a trans‐
81                      port endpoint.
82
83
84       TBUFOVFLW      The  number  of bytes allocated for an incoming argument
85                      (maxlen) is greater than  0 but not sufficient to  store
86                      the  value of that argument, and the connection informa‐
87                      tion to be returned  in  call  will  be  discarded.  The
88                      provider's  state,  as seen by the user, will be changed
89                      to  T_DATAXFER.
90
91
92       TLOOK          An asynchronous event has  occurred  on  this  transport
93                      connection and requires immediate attention.
94
95
96       TNODATA        O_NONBLOCK  was  set,  but a connection confirmation has
97                      not yet arrived.
98
99
100       TNOTSUPPORT    This function is not supported by the underlying  trans‐
101                      port provider.
102
103
104       TOUTSTATE      The  communications endpoint referenced by  fd is not in
105                      one of the states in which a call to  this  function  is
106                      valid.
107
108
109       TPROTO         This  error  indicates  that a communication problem has
110                      been detected between XTI and the transport provider for
111                      which there is no other suitable XTI error (t_errno).
112
113
114       TSYSERR        A  system  error  has  occurred during execution of this
115                      function.
116
117

TLI COMPATIBILITY

119       The XTI and TLI interface definitions have common names but use differ‐
120       ent  header files. This, and other semantic differences between the two
121       interfaces are described in the subsections below.
122
123   Interface Header
124       The XTI interfaces use the header file, xti.h.  TLI  interfaces  should
125       not use this header.  They should use the header:
126         #include<tiuser.h>
127
128   Error Description Values
129       The t_errno value TPROTO can be set by the XTI interface but not by the
130       TLI interface.
131
132
133       A t_errno value that this routine can return  under  different  circum‐
134       stances  than its XTI counterpart is TBUFOVFLW. It can be returned even
135       when the maxlen field of the corresponding buffer has been set to zero.
136

ATTRIBUTES

138       See attributes(5)  for descriptions of the following attributes:
139
140
141
142
143       ┌─────────────────────────────┬─────────────────────────────┐
144       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
145       ├─────────────────────────────┼─────────────────────────────┤
146       │MT Level                     │Safe                         │
147       └─────────────────────────────┴─────────────────────────────┘
148

SEE ALSO

150       fcntl(2), t_accept(3NSL), t_alloc(3NSL), t_bind(3NSL), t_connect(3NSL),
151       t_listen(3NSL), t_open(3NSL), t_optmgmt(3NSL), attributes(5)
152
153
154
155SunOS 5.11                        7 May 1998                t_rcvconnect(3NSL)
Impressum