00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_OS_TLI_H
00015 # define ACE_OS_TLI_H
00016 # include "ace/pre.h"
00017
00018 # include "ace/config-all.h"
00019
00020 # if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 # endif
00023
00024 # include "ace/OS_Errno.h"
00025 # include "ace/ACE_export.h"
00026
00027 # if defined (ACE_EXPORT_MACRO)
00028 # undef ACE_EXPORT_MACRO
00029 # endif
00030 # define ACE_EXPORT_MACRO ACE_Export
00031
00032 # if !(defined(ACE_HAS_TLI) || defined(ACE_HAS_XTI))
00033
00034 struct t_call { };
00035 struct t_bind { };
00036 struct t_info { };
00037 struct t_optmgmt { };
00038 struct t_discon { };
00039 struct t_unitdata { };
00040 struct t_uderr { };
00041 struct netbuf { };
00042
00043 # else
00044
00045 # if defined (ACE_HAS_CONFLICTING_XTI_MACROS)
00046
00047 # include "ace/os_include/netinet/os_tcp.h"
00048 # undef TCP_NODELAY
00049 # undef TCP_MAXSEG
00050 # endif
00051
00052 # if defined (ACE_HAS_XTI)
00053 # if defined (ACE_HAS_SYS_XTI_H)
00054 # define class ace_xti_class
00055 # include <sys/xti.h>
00056 # undef class
00057 # elif defined (ACE_HAS_FORE_ATM_XTI)
00058 # include <fore_xti/xti_user_types.h>
00059 # include <fore_xti/xti.h>
00060 # include <fore_xti/xti_atm.h>
00061 # include <fore_xti/netatm/atm.h>
00062 # include <fore_xti/ans.h>
00063 # else
00064 # include <xti.h>
00065 # endif
00066
00067
00068
00069
00070 # if defined (ACE_REDEFINES_XTI_FUNCTIONS)
00071 # include <xti.h>
00072 # if defined (UNIXWARE_2_0)
00073 extern "C" int _xti_error(char *);
00074 # endif
00075 # endif
00076
00077
00078
00079
00080
00081
00082
00083
00084 # if !defined (LOCALNAME)
00085 # define LOCALNAME 0
00086 # endif
00087 # if !defined (REMOTENAME)
00088 # define REMOTENAME 1
00089 # endif
00090
00091 # else
00092 # if !defined (ACE_HAS_TLI_PROTOTYPES)
00093
00094
00095 extern "C"
00096 {
00097 int t_accept(int fildes, int resfd, struct t_call *call);
00098 char *t_alloc(int fildes, int struct_type, int fields);
00099 int t_bind(int fildes, struct t_bind *req, struct t_bind *ret);
00100 int t_close(int fildes);
00101 int t_connect(int fildes, struct t_call *sndcall,
00102 struct t_call *rcvcall);
00103 void t_error(const char *errmsg);
00104 int t_free(char *ptr, int struct_type);
00105 int t_getinfo(int fildes, struct t_info *info);
00106 int t_getname (int fildes, struct netbuf *namep, int type);
00107 int t_getstate(int fildes);
00108 int t_listen(int fildes, struct t_call *call);
00109 int t_look(int fildes);
00110 int t_open(char *path, int oflag, struct t_info *info);
00111 int t_optmgmt(int fildes, struct t_optmgmt *req,
00112 struct t_optmgmt *ret);
00113 int t_rcv(int fildes, char *buf, unsigned int nbytes, int *flags);
00114 int t_rcvconnect(int fildes, struct t_call *call);
00115 int t_rcvdis(int fildes, struct t_discon *discon);
00116 int t_rcvrel(int fildes);
00117 int t_rcvudata(int fildes, struct t_unitdata *unitdata, int *flags);
00118 int t_rcvuderr(int fildes, struct t_uderr *uderr);
00119 int t_snd(int fildes, const char *buf, unsigned int nbytes, int flags);
00120 int t_snddis(int fildes, struct t_call *call);
00121 int t_sndrel(int fildes);
00122 int t_sndudata(int fildes, struct t_unitdata *unitdata);
00123 int t_sync(int fildes);
00124 int t_unbind(int fildes);
00125 }
00126 # endif
00127
00128 # if defined (ACE_HAS_TIUSER_H_BROKEN_EXTERN_C)
00129 extern "C" {
00130 # endif
00131 # if defined (ACE_HAS_TIUSER_H)
00132 # include <tiuser.h>
00133 # else
00134
00135 # endif
00136 # if defined (ACE_HAS_TIUSER_H_BROKEN_EXTERN_C)
00137 }
00138 # endif
00139
00140 # if defined (ACE_HAS_SVR4_TLI)
00141
00142
00143
00144 extern "C" int t_getname (int, struct netbuf *, int);
00145 # endif
00146 # endif
00147
00148 # endif
00149
00150 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163 #if defined (__HP_aCC) && (__HP_aCC <= 36500)
00164 typedef extern "C" struct t_optmgmt ACE_TOPTMGMT;
00165 #else
00166 typedef struct t_optmgmt ACE_TOPTMGMT;
00167 #endif
00168
00169
00170
00171
00172
00173
00174
00175 namespace ACE_OS
00176 {
00177
00178 ACE_NAMESPACE_INLINE_FUNCTION
00179 int t_accept (ACE_HANDLE fildes,
00180 ACE_HANDLE resfd,
00181 struct t_call
00182 *call);
00183
00184 ACE_NAMESPACE_INLINE_FUNCTION
00185 char *t_alloc (ACE_HANDLE fildes,
00186 int struct_type,
00187 int
00188 fields);
00189
00190 ACE_NAMESPACE_INLINE_FUNCTION
00191 int t_bind (ACE_HANDLE fildes,
00192 struct t_bind *req,
00193 struct t_bind *ret);
00194
00195 ACE_NAMESPACE_INLINE_FUNCTION
00196 int t_close (ACE_HANDLE fildes);
00197
00198 ACE_NAMESPACE_INLINE_FUNCTION
00199 int t_connect (ACE_HANDLE fildes,
00200 struct t_call *sndcall,
00201 struct t_call *rcvcall);
00202
00203 ACE_NAMESPACE_INLINE_FUNCTION
00204 void t_error (const char *errmsg);
00205
00206 ACE_NAMESPACE_INLINE_FUNCTION
00207 int t_free (char *ptr,
00208 int struct_type);
00209
00210 ACE_NAMESPACE_INLINE_FUNCTION
00211 int t_getinfo (ACE_HANDLE fildes,
00212 struct t_info *info);
00213
00214 ACE_NAMESPACE_INLINE_FUNCTION
00215 int t_getname (ACE_HANDLE fildes,
00216 struct netbuf *namep,
00217 int type);
00218
00219 ACE_NAMESPACE_INLINE_FUNCTION
00220 int t_getstate (ACE_HANDLE fildes);
00221
00222 ACE_NAMESPACE_INLINE_FUNCTION
00223 int t_listen (ACE_HANDLE fildes,
00224 struct t_call *call);
00225
00226 ACE_NAMESPACE_INLINE_FUNCTION
00227 int t_look (ACE_HANDLE fildes);
00228
00229 ACE_NAMESPACE_INLINE_FUNCTION
00230 ACE_HANDLE t_open (char *path,
00231 int oflag,
00232 struct t_info *info);
00233
00234 ACE_NAMESPACE_INLINE_FUNCTION
00235 int t_optmgmt (ACE_HANDLE handle,
00236 ACE_TOPTMGMT *req,
00237 ACE_TOPTMGMT *ret);
00238
00239 ACE_NAMESPACE_INLINE_FUNCTION
00240 int t_rcv (ACE_HANDLE fildes,
00241 char *buf,
00242 unsigned int nbytes,
00243 int *flags);
00244
00245 ACE_NAMESPACE_INLINE_FUNCTION
00246 int t_rcvdis (ACE_HANDLE fildes,
00247 struct t_discon *discon);
00248
00249 ACE_NAMESPACE_INLINE_FUNCTION
00250 int t_rcvrel (ACE_HANDLE fildes);
00251
00252 ACE_NAMESPACE_INLINE_FUNCTION
00253 int t_rcvudata (ACE_HANDLE fildes,
00254 struct t_unitdata *unitdata,
00255 int *flags);
00256
00257 ACE_NAMESPACE_INLINE_FUNCTION
00258 int t_rcvuderr (ACE_HANDLE fildes,
00259 struct t_uderr *uderr);
00260
00261 ACE_NAMESPACE_INLINE_FUNCTION
00262 int t_snd (ACE_HANDLE fildes,
00263 const char *buf,
00264 unsigned int nbytes,
00265 int flags);
00266
00267 ACE_NAMESPACE_INLINE_FUNCTION
00268 int t_snddis (ACE_HANDLE fildes,
00269 struct t_call *call);
00270
00271 ACE_NAMESPACE_INLINE_FUNCTION
00272 int t_sndrel (ACE_HANDLE fildes);
00273
00274 ACE_NAMESPACE_INLINE_FUNCTION
00275 int t_sync (ACE_HANDLE fildes);
00276
00277 ACE_NAMESPACE_INLINE_FUNCTION
00278 int t_unbind (ACE_HANDLE fildes);
00279
00280 }
00281
00282 ACE_END_VERSIONED_NAMESPACE_DECL
00283
00284 # if defined (ACE_HAS_INLINED_OSCALLS)
00285 # if defined (ACE_INLINE)
00286 # undef ACE_INLINE
00287 # endif
00288 # define ACE_INLINE inline
00289 # include "ace/OS_TLI.inl"
00290 # endif
00291
00292 #include "ace/post.h"
00293 #endif