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/IPC_SAP.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "ace/Addr.h"
00025
00026 #if defined (ACE_HAS_TLI)
00027
00028
00029
00030
00031 #ifndef ACE_TLI_TCP_DEVICE
00032 #define ACE_TLI_TCP_DEVICE "/dev/tcp"
00033 #endif
00034
00035
00036
00037
00038
00039 #ifndef ACE_XTI_ATM_DEVICE
00040 #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
00041 #endif
00042
00043
00044
00045
00046
00047
00048
00049 class ACE_Export ACE_TLI : public ACE_IPC_SAP
00050 {
00051 public:
00052
00053
00054 ACE_HANDLE open (const char device[],
00055 int oflag = O_RDWR,
00056 struct t_info *info = 0);
00057
00058
00059 int close (void);
00060
00061
00062 int set_option (int level, int option, void *optval, int optlen);
00063
00064
00065 int get_option (int level, int option, void *optval, int &optlen);
00066
00067
00068 int look (void) const;
00069 int rcvdis (struct t_discon * = 0) const;
00070 int snddis (struct t_call * = 0) const;
00071 int sndrel (void) const;
00072 int rcvrel (void) const;
00073
00074
00075 int get_local_addr (ACE_Addr &) const;
00076
00077
00078 void dump (void) const;
00079
00080
00081 ACE_ALLOC_HOOK_DECLARE;
00082
00083 protected:
00084
00085
00086 ACE_TLI (void);
00087
00088
00089 ~ACE_TLI (void);
00090
00091
00092 ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0);
00093
00094 private:
00095 #if defined (ACE_HAS_SVR4_TLI)
00096
00097 struct t_optmgmt so_opt_req;
00098 struct t_optmgmt so_opt_ret;
00099 #endif
00100 };
00101
00102 #if defined (__ACE_INLINE__)
00103 #include "ace/TLI.i"
00104 #endif
00105
00106 #endif
00107 #include "ace/post.h"
00108 #endif