dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libc / port / nsl / tli_wrappers.c
blob1b3eb0f68e947788980bf702d0be883458f3ae5a
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
29 #include "mt.h"
30 #include <tiuser.h>
31 #include <unistd.h>
32 #include <stropts.h>
35 * TLI_WRAPPERS is defined below, before inclusion of "tx.h". This is
36 * done so that the function prototypes and associated data structure
37 * definitions of new interfaces introduced in XNS 5 are not seen
38 * in this file.
40 #define TLI_WRAPPERS
41 #include "tx.h"
43 int
44 t_accept(int fd, int resfd, struct t_call *call)
46 return (_tx_accept(fd, resfd, call, TX_TLI_API));
49 char *
50 t_alloc(int fd, int struct_type, int fields)
52 return (_tx_alloc(fd, struct_type, fields, TX_TLI_API));
55 int
56 t_bind(int fd, struct t_bind *req, struct t_bind *ret)
58 return (_tx_bind(fd, req, ret, TX_TLI_API));
61 int
62 t_close(int fd)
64 return (_tx_close(fd, TX_TLI_API));
67 int
68 t_connect(int fd, struct t_call *sndcall, struct t_call *rcvcall)
70 return (_tx_connect(fd, sndcall, rcvcall, TX_TLI_API));
74 * Note t_error() return type changed by XTI to be char *. The spec should
75 * probably be fixed to make it void *
77 void
78 t_error(const char *s)
80 (void) _tx_error(s, TX_TLI_API);
83 int
84 t_free(char *ptr, int struct_type)
86 return (_tx_free(ptr, struct_type, TX_TLI_API));
90 * Note: The "struct t_info" parameter here refers to XTI one which
91 * added a field. The implmentation should not reference it. The applications
92 * will pass the shorter TLI one.
94 int
95 t_getinfo(int fd, struct t_info *info)
97 return (_tx_getinfo(fd, info, TX_TLI_API));
101 t_getstate(int fd)
103 return (_tx_getstate(fd, TX_TLI_API));
107 t_listen(int fd, struct t_call *call)
109 return (_tx_listen(fd, call, TX_TLI_API));
113 t_look(int fd)
115 return (_tx_look(fd, TX_TLI_API));
119 * Note: The "struct t_info" parameter here refers to XTI one which
120 * added a field. The implmentation should not reference it. The applications
121 * will pass the shorter TLI one.
124 t_open(const char *path, int flags, struct t_info *info)
126 return (_tx_open(path, flags, info, TX_TLI_API));
130 t_optmgmt(int fd, struct t_optmgmt *req, struct t_optmgmt *ret)
132 return (_tx_optmgmt(fd, req, ret, TX_TLI_API));
136 t_rcv(int fd, char *buf, unsigned int nbytes, int *flags)
138 return (_tx_rcv(fd, buf, nbytes, flags, TX_TLI_API));
142 t_rcvconnect(int fd, struct t_call *call)
144 return (_tx_rcvconnect(fd, call, TX_TLI_API));
148 t_rcvdis(int fd, struct t_discon *discon)
150 return (_tx_rcvdis(fd, discon, TX_TLI_API));
154 t_rcvrel(int fd)
156 return (_tx_rcvrel(fd, TX_TLI_API));
160 t_rcvudata(int fd, struct t_unitdata *unitdata, int *flags)
162 return (_tx_rcvudata(fd, unitdata, flags, TX_TLI_API));
166 t_rcvuderr(int fd, struct t_uderr *uderr)
168 return (_tx_rcvuderr(fd, uderr, TX_TLI_API));
172 t_snd(int fd, char *buf, unsigned int nbytes, int flags)
174 return (_tx_snd(fd, buf, nbytes, flags, TX_TLI_API));
178 t_snddis(int fd, struct t_call *call)
180 return (_tx_snddis(fd, call, TX_TLI_API));
184 t_sndrel(int fd)
186 return (_tx_sndrel(fd, TX_TLI_API));
190 t_sndudata(int fd, struct t_unitdata *unitdata)
192 return (_tx_sndudata(fd, unitdata, TX_TLI_API));
195 char *
196 t_strerror(int errnum)
198 return (_tx_strerror(errnum, TX_TLI_API));
202 t_sync(int fd)
204 return (_tx_sync(fd, TX_TLI_API));
208 t_unbind(int fd)
210 return (_tx_unbind(fd, TX_TLI_API));
214 t_getname(int fd, struct netbuf *name, int type)
216 return (_tx_getname(fd, name, type, TX_TLI_API));