2 #include "ace/OS_NS_errno.h"
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
9 t_accept (ACE_HANDLE handle, ACE_HANDLE reshandle, struct t_call *call)
11 #if defined (ACE_HAS_TLI)
12 return ::t_accept (handle, reshandle, call);
14 ACE_UNUSED_ARG (call);
15 ACE_UNUSED_ARG (reshandle);
16 ACE_UNUSED_ARG (handle);
18 ACE_NOTSUP_RETURN (-1);
19 #endif /* ACE_HAS_TLI */
23 t_alloc (ACE_HANDLE handle, int struct_type, int fields)
25 #if defined (ACE_HAS_TLI)
26 # if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)
27 // XPG5 changes t_alloc() return from char* to void*, so ACE_OSCALL_RETURN
28 // doesn't compile correctly.
30 ACE_OSCALL (::t_alloc (handle, struct_type, fields), char *, result);
33 return ::t_alloc (handle, struct_type, fields);
34 # endif /* XPG4 vs XPG5 */
36 ACE_UNUSED_ARG (fields);
37 ACE_UNUSED_ARG (struct_type);
38 ACE_UNUSED_ARG (handle);
40 ACE_NOTSUP_RETURN (0);
41 #endif /* ACE_HAS_TLI */
45 t_bind (ACE_HANDLE handle, ACE_TBIND *req, ACE_TBIND *ret)
47 #if defined (ACE_HAS_TLI)
48 return ::t_bind (handle, req, ret);
52 ACE_UNUSED_ARG (handle);
54 ACE_NOTSUP_RETURN (-1);
55 #endif /* ACE_HAS_TLI */
59 t_close (ACE_HANDLE handle)
61 #if defined (ACE_HAS_TLI)
62 return ::t_close (handle);
64 ACE_UNUSED_ARG (handle);
66 ACE_NOTSUP_RETURN (-1);
67 #endif /* ACE_HAS_TLI */
71 t_connect(ACE_HANDLE fildes,
72 struct t_call *sndcall,
73 struct t_call *rcvcall)
75 #if defined (ACE_HAS_TLI)
76 return ::t_connect (fildes, sndcall, rcvcall);
78 ACE_UNUSED_ARG (fildes);
79 ACE_UNUSED_ARG (sndcall);
80 ACE_UNUSED_ARG (rcvcall);
82 ACE_NOTSUP_RETURN (-1);
83 #endif /* ACE_HAS_TLI */
87 t_error (const char *errmsg)
89 #if defined (ACE_HAS_TLI)
92 ACE_UNUSED_ARG (errmsg);
93 #endif /* ACE_HAS_TLI */
97 t_free (char *ptr, int struct_type)
99 #if defined (ACE_HAS_TLI)
102 return ::t_free (ptr, struct_type);
104 ACE_UNUSED_ARG (struct_type);
105 ACE_UNUSED_ARG (ptr);
107 ACE_NOTSUP_RETURN (-1);
108 #endif /* ACE_HAS_TLI */
112 t_getinfo (ACE_HANDLE handle, struct t_info *info)
114 #if defined (ACE_HAS_TLI)
115 return ::t_getinfo (handle, info);
117 ACE_UNUSED_ARG (info);
118 ACE_UNUSED_ARG (handle);
120 ACE_NOTSUP_RETURN (-1);
121 #endif /* ACE_HAS_TLI */
125 t_getname (ACE_HANDLE handle, struct netbuf *namep, int type)
127 #if defined (ACE_HAS_XTI)
128 ACE_TBIND bound, peer;
129 // Depending on which address the caller wants, fill caller's values
130 // into one of the t_bind netbufs. The other is set up to ignore that
135 bound.addr.buf = namep->buf;
136 bound.addr.maxlen = namep->maxlen;
139 peer.addr.maxlen = 0;
144 bound.addr.maxlen = 0;
146 peer.addr.buf = namep->buf;
147 peer.addr.maxlen = namep->maxlen;
151 ACE_OS::last_error (EINVAL);
154 if (t_getprotaddr (handle, &bound, &peer) == -1)
156 // Call succeeded; put the caller's desired address length in his netbuf.
157 if (type == LOCALNAME)
158 namep->len = bound.addr.len;
160 namep->len = peer.addr.len;
163 ACE_UNUSED_ARG (handle);
164 ACE_UNUSED_ARG (namep);
165 ACE_UNUSED_ARG (type);
167 ACE_NOTSUP_RETURN (-1);
168 #endif /* ACE_HAS_XTI */
172 t_getstate (ACE_HANDLE handle)
174 #if defined (ACE_HAS_TLI)
175 return ::t_getstate (handle);
177 ACE_UNUSED_ARG (handle);
179 ACE_NOTSUP_RETURN (-1);
180 #endif /* ACE_HAS_TLI */
184 t_listen (ACE_HANDLE handle, struct t_call *call)
186 #if defined (ACE_HAS_TLI)
187 return ::t_listen (handle, call);
189 ACE_UNUSED_ARG (handle);
190 ACE_UNUSED_ARG (call);
192 ACE_NOTSUP_RETURN (-1);
193 #endif /* ACE_HAS_TLI */
197 t_look (ACE_HANDLE handle)
199 #if defined (ACE_HAS_TLI)
200 return ::t_look (handle);
202 ACE_UNUSED_ARG (handle);
204 ACE_NOTSUP_RETURN (-1);
205 #endif /* ACE_HAS_TLI */
208 ACE_INLINE ACE_HANDLE
209 t_open (char *path, int oflag, struct t_info *info)
211 #if defined (ACE_HAS_TLI)
212 return ::t_open (path, oflag, info);
214 ACE_UNUSED_ARG (path);
215 ACE_UNUSED_ARG (oflag);
216 ACE_UNUSED_ARG (info);
218 ACE_NOTSUP_RETURN (ACE_INVALID_HANDLE);
219 #endif /* ACE_HAS_TLI */
223 t_optmgmt (ACE_HANDLE handle, ACE_TOPTMGMT *req, ACE_TOPTMGMT *ret)
225 #if defined (ACE_HAS_TLI)
226 return ::t_optmgmt (handle, req, ret);
228 ACE_UNUSED_ARG (handle);
229 ACE_UNUSED_ARG (req);
230 ACE_UNUSED_ARG (ret);
232 ACE_NOTSUP_RETURN (-1);
233 #endif /* ACE_HAS_TLI */
237 t_rcv (ACE_HANDLE handle,
242 #if defined (ACE_HAS_TLI)
243 return ::t_rcv (handle, buf, nbytes, flags);
245 ACE_UNUSED_ARG (handle);
246 ACE_UNUSED_ARG (buf);
247 ACE_UNUSED_ARG (nbytes);
248 ACE_UNUSED_ARG (flags);
250 ACE_NOTSUP_RETURN (-1);
251 #endif /* ACE_HAS_TLI */
255 t_rcvdis (ACE_HANDLE handle, struct t_discon *discon)
257 #if defined (ACE_HAS_TLI)
258 return ::t_rcvdis (handle, discon);
260 ACE_UNUSED_ARG (handle);
261 ACE_UNUSED_ARG (discon);
263 ACE_NOTSUP_RETURN (-1);
264 #endif /* ACE_HAS_TLI */
268 t_rcvrel (ACE_HANDLE handle)
270 #if defined (ACE_HAS_TLI)
271 return ::t_rcvrel (handle);
273 ACE_UNUSED_ARG (handle);
275 ACE_NOTSUP_RETURN (-1);
276 #endif /* ACE_HAS_TLI */
280 t_rcvudata (ACE_HANDLE handle,
281 struct t_unitdata *unitdata,
284 #if defined (ACE_HAS_TLI)
285 return ::t_rcvudata (handle, unitdata, flags);
287 ACE_UNUSED_ARG (handle);
288 ACE_UNUSED_ARG (unitdata);
289 ACE_UNUSED_ARG (flags);
291 ACE_NOTSUP_RETURN (-1);
292 #endif /* ACE_HAS_TLI */
296 t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr)
298 #if defined (ACE_HAS_TLI)
299 return ::t_rcvuderr (handle, uderr);
301 ACE_UNUSED_ARG (handle);
302 ACE_UNUSED_ARG (uderr);
304 ACE_NOTSUP_RETURN (-1);
305 #endif /* ACE_HAS_TLI */
309 t_snd (ACE_HANDLE handle,
314 #if defined (ACE_HAS_TLI)
315 return ::t_snd (handle, (char *) buf, nbytes, flags);
317 ACE_UNUSED_ARG (handle);
318 ACE_UNUSED_ARG (buf);
319 ACE_UNUSED_ARG (nbytes);
320 ACE_UNUSED_ARG (flags);
322 ACE_NOTSUP_RETURN (-1);
323 #endif /* ACE_HAS_TLI */
327 t_snddis (ACE_HANDLE handle, struct t_call *call)
329 #if defined (ACE_HAS_TLI)
330 return ::t_snddis (handle, call);
332 ACE_UNUSED_ARG (handle);
333 ACE_UNUSED_ARG (call);
335 ACE_NOTSUP_RETURN (-1);
336 #endif /* ACE_HAS_TLI */
340 t_sndrel (ACE_HANDLE handle)
342 #if defined (ACE_HAS_TLI)
343 return ::t_sndrel (handle);
345 ACE_UNUSED_ARG (handle);
347 ACE_NOTSUP_RETURN (-1);
348 #endif /* ACE_HAS_TLI */
352 t_sync (ACE_HANDLE handle)
354 #if defined (ACE_HAS_TLI)
355 return ::t_sync (handle);
357 ACE_UNUSED_ARG (handle);
359 ACE_NOTSUP_RETURN (-1);
360 #endif /* ACE_HAS_TLI */
364 t_unbind (ACE_HANDLE handle)
366 #if defined (ACE_HAS_TLI)
367 return ::t_unbind (handle);
369 ACE_UNUSED_ARG (handle);
371 ACE_NOTSUP_RETURN (-1);
372 #endif /* ACE_HAS_TLI */
375 } /* end namespace ACE_OS */
377 ACE_END_VERSIONED_NAMESPACE_DECL