4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
34 #include <sys/stream.h>
40 * The _xti_ prefix is the default prefix for these functions. A function
41 * having the _xti_ prefix means one of the following.
42 * a. This interface remains unchanged in all versions of XTI, starting
43 * with the version of XTI in which it was first introduced.
44 * Consequently there is no other entry point, with a different
45 * prefix for this interface.
46 * b. This interface has changed subsequent to when it was first. This
47 * function is meant for compatibility and provides the semantics of
48 * the XTI version when it was first introduced.
50 * The _xti_xns5_ prefix is used for functions that provide XNS Issue 5
51 * (UNIX98) semantics. It means the following.
52 * The UNIX98 version of this interface has different semantics
53 * as compared to UNIX95, and this function provides UNIX98 semantics
58 _xti_accept(int fd
, int resfd
, const struct t_call
*call
)
60 return (_tx_accept(fd
, resfd
, call
, TX_XTI_API
));
64 _xti_xns5_accept(int fd
, int resfd
, const struct t_call
*call
)
66 return (_tx_accept(fd
, resfd
, call
, TX_XTI_XNS5_API
));
70 _xti_alloc(int fd
, int struct_type
, int fields
)
72 return (_tx_alloc(fd
, struct_type
, fields
, TX_XTI_API
));
76 _xti_bind(int fd
, const struct t_bind
*req
, struct t_bind
*ret
)
78 return (_tx_bind(fd
, req
, ret
, TX_XTI_API
));
84 return (_tx_close(fd
, TX_XTI_API
));
88 _xti_connect(int fd
, const struct t_call
*sndcall
, struct t_call
*rcvcall
)
90 return (_tx_connect(fd
, sndcall
, rcvcall
, TX_XTI_API
));
94 * Note: The TLI version of t_error has return type void. XTI has "int".
95 * The spec probably needs to change to void *
98 _xti_error(const char *errmsg
)
100 return (_tx_error(errmsg
, TX_XTI_API
));
104 _xti_free(void *ptr
, int struct_type
)
106 return (_tx_free(ptr
, struct_type
, TX_XTI_API
));
110 _xti_getinfo(int fd
, struct t_info
*info
)
112 return (_tx_getinfo(fd
, info
, TX_XTI_API
));
116 _xti_getprotaddr(int fd
, struct t_bind
*boundaddr
, struct t_bind
*peeraddr
)
118 return (_tx_getprotaddr(fd
, boundaddr
, peeraddr
, TX_XTI_API
));
122 _xti_getstate(int fd
)
124 return (_tx_getstate(fd
, TX_XTI_API
));
128 _xti_listen(int fd
, struct t_call
*call
)
130 return (_tx_listen(fd
, call
, TX_XTI_API
));
136 return (_tx_look(fd
, TX_XTI_API
));
140 _xti_open(const char *path
, int flags
, struct t_info
*info
)
142 return (_tx_open(path
, flags
, info
, TX_XTI_API
));
146 _xti_optmgmt(int fd
, const struct t_optmgmt
*req
, struct t_optmgmt
*ret
)
148 return (_tx_optmgmt(fd
, req
, ret
, TX_XTI_API
));
152 _xti_rcv(int fd
, void *buf
, unsigned int nbytes
, int *flags
)
154 return (_tx_rcv(fd
, buf
, nbytes
, flags
, TX_XTI_API
));
158 _xti_rcvconnect(int fd
, struct t_call
*call
)
160 return (_tx_rcvconnect(fd
, call
, TX_XTI_API
));
164 _xti_rcvdis(int fd
, struct t_discon
*discon
)
166 return (_tx_rcvdis(fd
, discon
, TX_XTI_API
));
172 return (_tx_rcvrel(fd
, TX_XTI_API
));
176 _xti_rcvreldata(int fd
, struct t_discon
*discon
)
178 return (_tx_rcvreldata(fd
, discon
, TX_XTI_XNS5_API
));
182 _xti_rcvudata(int fd
, struct t_unitdata
*unitdata
, int *flags
)
184 return (_tx_rcvudata(fd
, unitdata
, flags
, TX_XTI_API
));
188 _xti_rcvuderr(int fd
, struct t_uderr
*uderr
)
190 return (_tx_rcvuderr(fd
, uderr
, TX_XTI_API
));
194 _xti_rcvv(int fd
, struct t_iovec
*tiov
, unsigned int tiovcount
, int *flags
)
196 return (_tx_rcvv(fd
, tiov
, tiovcount
, flags
, TX_XTI_XNS5_API
));
200 _xti_rcvvudata(int fd
, struct t_unitdata
*unitdata
, struct t_iovec
*tiov
,
201 unsigned int tiovcount
, int *flags
)
203 return (_tx_rcvvudata(fd
, unitdata
, tiov
, tiovcount
, flags
,
208 _xti_snd(int fd
, void *buf
, unsigned int nbytes
, int flags
)
210 return (_tx_snd(fd
, buf
, nbytes
, flags
, TX_XTI_API
));
214 _xti_xns5_snd(int fd
, void *buf
, unsigned int nbytes
, int flags
)
216 return (_tx_snd(fd
, buf
, nbytes
, flags
, TX_XTI_XNS5_API
));
220 _xti_snddis(int fd
, const struct t_call
*call
)
222 return (_tx_snddis(fd
, call
, TX_XTI_API
));
229 return (_tx_sndrel(fd
, TX_XTI_API
));
233 _xti_sndreldata(int fd
, struct t_discon
*discon
)
235 return (_tx_sndreldata(fd
, discon
, TX_XTI_XNS5_API
));
239 _xti_sndudata(int fd
, const struct t_unitdata
*unitdata
)
241 return (_tx_sndudata(fd
, unitdata
, TX_XTI_API
));
245 _xti_sndv(int fd
, const struct t_iovec
*tiov
, unsigned int tiovcount
, int flags
)
247 return (_tx_sndv(fd
, tiov
, tiovcount
, flags
, TX_XTI_XNS5_API
));
251 _xti_sndvudata(int fd
, struct t_unitdata
*unitdata
, struct t_iovec
*tiov
,
252 unsigned int tiovcount
)
254 return (_tx_sndvudata(fd
, unitdata
, tiov
, tiovcount
, TX_XTI_XNS5_API
));
258 _xti_strerror(int errnum
)
260 return (_tx_strerror(errnum
, TX_XTI_API
));
266 return (_tx_sync(fd
, TX_XTI_API
));
270 _xti_sysconf(int name
)
272 return (_tx_sysconf(name
, TX_XTI_XNS5_API
));
278 return (_tx_unbind(fd
, TX_XTI_API
));