3 //=============================================================================
7 * $Id: TLI.h 80826 2008-03-04 14:51:23Z wotte $
11 //=============================================================================
16 #include /**/ "ace/pre.h"
18 #include "ace/config-lite.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/OS_TLI.h"
26 #if defined (ACE_HAS_TLI)
28 #include "ace/IPC_SAP.h"
30 #include "ace/os_include/os_fcntl.h"
32 // There's not a universal device name for TLI devices. If the platform
33 // needs something other than /dev/tcp, it needs to be set up in the config.h
34 // file as ACE_TLI_TCP_DEVICE.
35 #ifndef ACE_TLI_TCP_DEVICE
36 #define ACE_TLI_TCP_DEVICE "/dev/tcp"
39 // There's not a universal device name for XTI/ATM devices. If the platform
40 // needs something other than /dev/xtisvc0, it needs to be set up in the
41 // config.h file as ACE_XTI_ATM_DEVICE. This may be FORE vendor specific and
42 // there may be no good default.
43 #ifndef ACE_XTI_ATM_DEVICE
44 #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
47 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
52 * @brief Defines the member functions for the base class of the
53 * ACE_TLI abstraction.
55 class ACE_Export ACE_TLI
: public ACE_IPC_SAP
58 // = Initialization and termination methods.
59 /// Initialize a TLI endpoint.
60 ACE_HANDLE
open (const char device
[],
62 struct t_info
*info
= 0);
64 /// Close a TLI endpoint and release resources.
67 /// Set underlying protocol options.
68 int set_option (int level
, int option
, void *optval
, int optlen
);
70 /// Get underlying protocol options.
71 int get_option (int level
, int option
, void *optval
, int &optlen
);
73 // = Calls to underlying TLI operations.
74 int look (void) const;
75 int rcvdis (struct t_discon
* = 0) const;
76 int snddis (struct t_call
* = 0) const;
77 int sndrel (void) const;
78 int rcvrel (void) const;
80 /// Return our local endpoint address.
81 int get_local_addr (ACE_Addr
&) const;
83 /// Dump the state of an object.
84 void dump (void) const;
86 /// Declare the dynamic allocation hooks.
87 ACE_ALLOC_HOOK_DECLARE
;
90 // = Ensure we are an abstract class.
91 /// Default constructor.
97 /// Initialize a TLI endpoint.
98 ACE_TLI (const char device
[], int oflag
= O_RDWR
, struct t_info
*info
= 0);
101 #if defined (ACE_HAS_SVR4_TLI)
102 // XTI/TLI option management.
103 struct t_optmgmt so_opt_req
;
104 struct t_optmgmt so_opt_ret
;
105 #endif /* ACE_HAS_SVR4_TLI */
108 ACE_END_VERSIONED_NAMESPACE_DECL
110 #if defined (__ACE_INLINE__)
111 #include "ace/TLI.inl"
112 #endif /* __ACE_INLINE__ */
114 #endif /* ACE_HAS_TLI */
115 #include /**/ "ace/post.h"
116 #endif /* ACE_TLI_H */