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 ACE_OSCALL_RETURN (::t_accept (handle, reshandle, call), int, -1);
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 *, 0, result);
33 ACE_OSCALL_RETURN (::t_alloc (handle, struct_type, fields),
35 # endif /* XPG4 vs XPG5 */
37 ACE_UNUSED_ARG (fields);
38 ACE_UNUSED_ARG (struct_type);
39 ACE_UNUSED_ARG (handle);
41 ACE_NOTSUP_RETURN (0);
42 #endif /* ACE_HAS_TLI */
46 t_bind (ACE_HANDLE handle, ACE_TBIND *req, ACE_TBIND *ret)
48 #if defined (ACE_HAS_TLI)
49 ACE_OSCALL_RETURN (::t_bind (handle, req, ret), int, -1);
53 ACE_UNUSED_ARG (handle);
55 ACE_NOTSUP_RETURN (-1);
56 #endif /* ACE_HAS_TLI */
60 t_close (ACE_HANDLE handle)
62 #if defined (ACE_HAS_TLI)
63 ACE_OSCALL_RETURN (::t_close (handle), int, -1);
65 ACE_UNUSED_ARG (handle);
67 ACE_NOTSUP_RETURN (-1);
68 #endif /* ACE_HAS_TLI */
72 t_connect(ACE_HANDLE fildes,
73 struct t_call *sndcall,
74 struct t_call *rcvcall)
76 #if defined (ACE_HAS_TLI)
77 ACE_OSCALL_RETURN (::t_connect (fildes, sndcall, rcvcall), int, -1);
79 ACE_UNUSED_ARG (fildes);
80 ACE_UNUSED_ARG (sndcall);
81 ACE_UNUSED_ARG (rcvcall);
83 ACE_NOTSUP_RETURN (-1);
84 #endif /* ACE_HAS_TLI */
88 t_error (const char *errmsg)
90 #if defined (ACE_HAS_TLI)
91 #if defined (ACE_HAS_BROKEN_T_ERROR)
92 ::t_error (const_cast<char *> (errmsg));
95 #endif /* ACE_HAS_BROKEN_T_ERROR */
97 ACE_UNUSED_ARG (errmsg);
98 #endif /* ACE_HAS_TLI */
102 t_free (char *ptr, int struct_type)
104 #if defined (ACE_HAS_TLI)
107 ACE_OSCALL_RETURN (::t_free (ptr, struct_type), int, -1);
109 ACE_UNUSED_ARG (struct_type);
110 ACE_UNUSED_ARG (ptr);
112 ACE_NOTSUP_RETURN (-1);
113 #endif /* ACE_HAS_TLI */
117 t_getinfo (ACE_HANDLE handle, struct t_info *info)
119 #if defined (ACE_HAS_TLI)
120 ACE_OSCALL_RETURN (::t_getinfo (handle, info), int, -1);
122 ACE_UNUSED_ARG (info);
123 ACE_UNUSED_ARG (handle);
125 ACE_NOTSUP_RETURN (-1);
126 #endif /* ACE_HAS_TLI */
130 t_getname (ACE_HANDLE handle, struct netbuf *namep, int type)
132 #if defined (ACE_HAS_XTI)
133 ACE_TBIND bound, peer;
134 // Depending on which address the caller wants, fill caller's values
135 // into one of the t_bind netbufs. The other is set up to ignore that
140 bound.addr.buf = namep->buf;
141 bound.addr.maxlen = namep->maxlen;
144 peer.addr.maxlen = 0;
149 bound.addr.maxlen = 0;
151 peer.addr.buf = namep->buf;
152 peer.addr.maxlen = namep->maxlen;
156 ACE_OS::last_error (EINVAL);
159 if (t_getprotaddr (handle, &bound, &peer) == -1)
161 // Call succeeded; put the caller's desired address length in his netbuf.
162 if (type == LOCALNAME)
163 namep->len = bound.addr.len;
165 namep->len = peer.addr.len;
168 #elif defined (ACE_HAS_SVR4_TLI)
169 ACE_OSCALL_RETURN (::t_getname (handle, namep, type), int, -1);
171 ACE_UNUSED_ARG (handle);
172 ACE_UNUSED_ARG (namep);
173 ACE_UNUSED_ARG (type);
175 ACE_NOTSUP_RETURN (-1);
176 #endif /* ACE_HAS_SVR4_TLI */
180 t_getstate (ACE_HANDLE handle)
182 #if defined (ACE_HAS_TLI)
183 ACE_OSCALL_RETURN (::t_getstate (handle), int, -1);
185 ACE_UNUSED_ARG (handle);
187 ACE_NOTSUP_RETURN (-1);
188 #endif /* ACE_HAS_TLI */
192 t_listen (ACE_HANDLE handle, struct t_call *call)
194 #if defined (ACE_HAS_TLI)
195 ACE_OSCALL_RETURN (::t_listen (handle, call), int, -1);
197 ACE_UNUSED_ARG (handle);
198 ACE_UNUSED_ARG (call);
200 ACE_NOTSUP_RETURN (-1);
201 #endif /* ACE_HAS_TLI */
205 t_look (ACE_HANDLE handle)
207 #if defined (ACE_HAS_TLI)
208 ACE_OSCALL_RETURN (::t_look (handle), int, -1);
210 ACE_UNUSED_ARG (handle);
212 ACE_NOTSUP_RETURN (-1);
213 #endif /* ACE_HAS_TLI */
216 ACE_INLINE ACE_HANDLE
217 t_open (char *path, int oflag, struct t_info *info)
219 #if defined (ACE_HAS_TLI)
220 ACE_OSCALL_RETURN (::t_open (path, oflag, info), ACE_HANDLE, ACE_INVALID_HANDLE);
222 ACE_UNUSED_ARG (path);
223 ACE_UNUSED_ARG (oflag);
224 ACE_UNUSED_ARG (info);
226 ACE_NOTSUP_RETURN (ACE_INVALID_HANDLE);
227 #endif /* ACE_HAS_TLI */
231 t_optmgmt (ACE_HANDLE handle, ACE_TOPTMGMT *req, ACE_TOPTMGMT *ret)
233 #if defined (ACE_HAS_TLI)
234 ACE_OSCALL_RETURN (::t_optmgmt (handle, req, ret), int, -1);
236 ACE_UNUSED_ARG (handle);
237 ACE_UNUSED_ARG (req);
238 ACE_UNUSED_ARG (ret);
240 ACE_NOTSUP_RETURN (-1);
241 #endif /* ACE_HAS_TLI */
245 t_rcv (ACE_HANDLE handle,
250 #if defined (ACE_HAS_TLI)
251 ACE_OSCALL_RETURN (::t_rcv (handle, buf, nbytes, flags),
254 ACE_UNUSED_ARG (handle);
255 ACE_UNUSED_ARG (buf);
256 ACE_UNUSED_ARG (nbytes);
257 ACE_UNUSED_ARG (flags);
259 ACE_NOTSUP_RETURN (-1);
260 #endif /* ACE_HAS_TLI */
264 t_rcvdis (ACE_HANDLE handle, struct t_discon *discon)
266 #if defined (ACE_HAS_TLI)
267 ACE_OSCALL_RETURN (::t_rcvdis (handle, discon), int, -1);
269 ACE_UNUSED_ARG (handle);
270 ACE_UNUSED_ARG (discon);
272 ACE_NOTSUP_RETURN (-1);
273 #endif /* ACE_HAS_TLI */
277 t_rcvrel (ACE_HANDLE handle)
279 #if defined (ACE_HAS_TLI)
280 ACE_OSCALL_RETURN (::t_rcvrel (handle), int, -1);
282 ACE_UNUSED_ARG (handle);
284 ACE_NOTSUP_RETURN (-1);
285 #endif /* ACE_HAS_TLI */
289 t_rcvudata (ACE_HANDLE handle,
290 struct t_unitdata *unitdata,
293 #if defined (ACE_HAS_TLI)
294 ACE_OSCALL_RETURN (::t_rcvudata (handle, unitdata, flags),
297 ACE_UNUSED_ARG (handle);
298 ACE_UNUSED_ARG (unitdata);
299 ACE_UNUSED_ARG (flags);
301 ACE_NOTSUP_RETURN (-1);
302 #endif /* ACE_HAS_TLI */
306 t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr)
308 #if defined (ACE_HAS_TLI)
309 ACE_OSCALL_RETURN (::t_rcvuderr (handle, uderr), int, -1);
311 ACE_UNUSED_ARG (handle);
312 ACE_UNUSED_ARG (uderr);
314 ACE_NOTSUP_RETURN (-1);
315 #endif /* ACE_HAS_TLI */
319 t_snd (ACE_HANDLE handle,
324 #if defined (ACE_HAS_TLI)
325 ACE_OSCALL_RETURN (::t_snd (handle, (char *) buf, nbytes, flags), int, -1);
327 ACE_UNUSED_ARG (handle);
328 ACE_UNUSED_ARG (buf);
329 ACE_UNUSED_ARG (nbytes);
330 ACE_UNUSED_ARG (flags);
332 ACE_NOTSUP_RETURN (-1);
333 #endif /* ACE_HAS_TLI */
337 t_snddis (ACE_HANDLE handle, struct t_call *call)
339 #if defined (ACE_HAS_TLI)
340 ACE_OSCALL_RETURN (::t_snddis (handle, call), int, -1);
342 ACE_UNUSED_ARG (handle);
343 ACE_UNUSED_ARG (call);
345 ACE_NOTSUP_RETURN (-1);
346 #endif /* ACE_HAS_TLI */
350 t_sndrel (ACE_HANDLE handle)
352 #if defined (ACE_HAS_TLI)
353 ACE_OSCALL_RETURN (::t_sndrel (handle), int, -1);
355 ACE_UNUSED_ARG (handle);
357 ACE_NOTSUP_RETURN (-1);
358 #endif /* ACE_HAS_TLI */
362 t_sync (ACE_HANDLE handle)
364 #if defined (ACE_HAS_TLI)
365 ACE_OSCALL_RETURN (::t_sync (handle), int, -1);
367 ACE_UNUSED_ARG (handle);
369 ACE_NOTSUP_RETURN (-1);
370 #endif /* ACE_HAS_TLI */
374 t_unbind (ACE_HANDLE handle)
376 #if defined (ACE_HAS_TLI)
377 ACE_OSCALL_RETURN (::t_unbind (handle), int, -1);
379 ACE_UNUSED_ARG (handle);
381 ACE_NOTSUP_RETURN (-1);
382 #endif /* ACE_HAS_TLI */
385 } /* end namespace ACE_OS */
387 ACE_END_VERSIONED_NAMESPACE_DECL