00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_TLI_H
00015 #define ACE_TLI_H
00016 #include "ace/pre.h"
00017
00018 #include "ace/config-lite.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "ace/OS_TLI.h"
00025
00026 #if defined (ACE_HAS_TLI)
00027
00028 #include "ace/IPC_SAP.h"
00029 #include "ace/Addr.h"
00030 #include "ace/os_include/os_fcntl.h"
00031
00032
00033
00034
00035 #ifndef ACE_TLI_TCP_DEVICE
00036 #define ACE_TLI_TCP_DEVICE "/dev/tcp"
00037 #endif
00038
00039
00040
00041
00042
00043 #ifndef ACE_XTI_ATM_DEVICE
00044 #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
00045 #endif
00046
00047 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00048
00049
00050
00051
00052
00053
00054
00055 class ACE_Export ACE_TLI : public ACE_IPC_SAP
00056 {
00057 public:
00058
00059
00060 ACE_HANDLE open (const char device[],
00061 int oflag = O_RDWR,
00062 struct t_info *info = 0);
00063
00064
00065 int close (void);
00066
00067
00068 int set_option (int level, int option, void *optval, int optlen);
00069
00070
00071 int get_option (int level, int option, void *optval, int &optlen);
00072
00073
00074 int look (void) const;
00075 int rcvdis (struct t_discon * = 0) const;
00076 int snddis (struct t_call * = 0) const;
00077 int sndrel (void) const;
00078 int rcvrel (void) const;
00079
00080
00081 int get_local_addr (ACE_Addr &) const;
00082
00083
00084 void dump (void) const;
00085
00086
00087 ACE_ALLOC_HOOK_DECLARE;
00088
00089 protected:
00090
00091
00092 ACE_TLI (void);
00093
00094
00095 ~ACE_TLI (void);
00096
00097
00098 ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0);
00099
00100 private:
00101 #if defined (ACE_HAS_SVR4_TLI)
00102
00103 struct t_optmgmt so_opt_req;
00104 struct t_optmgmt so_opt_ret;
00105 #endif
00106 };
00107
00108 ACE_END_VERSIONED_NAMESPACE_DECL
00109
00110 #if defined (__ACE_INLINE__)
00111 #include "ace/TLI.inl"
00112 #endif
00113
00114 #endif
00115 #include "ace/post.h"
00116 #endif