Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

TLI.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    TLI.h
00006  *
00007  *  $Id: TLI.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Doug Schmidt
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 /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/Addr.h"
00025 
00026 #if defined (ACE_HAS_TLI)
00027 
00028 // There's not a universal device name for TLI devices.  If the platform
00029 // needs something other than /dev/tcp, it needs to be set up in the config.h
00030 // file as ACE_TLI_TCP_DEVICE.
00031 #ifndef ACE_TLI_TCP_DEVICE
00032 #define ACE_TLI_TCP_DEVICE "/dev/tcp"
00033 #endif
00034 
00035 // There's not a universal device name for XTI/ATM devices.  If the platform
00036 // needs something other than /dev/xtisvc0, it needs to be set up in the
00037 // config.h file as ACE_XTI_ATM_DEVICE. This may be FORE vendor specific and
00038 // there may be no good default.
00039 #ifndef ACE_XTI_ATM_DEVICE
00040 #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
00041 #endif
00042 
00043 /**
00044  * @class ACE_TLI
00045  *
00046  * @brief Defines the member functions for the base class of the
00047  * ACE_TLI  abstraction.
00048  */
00049 class ACE_Export ACE_TLI : public ACE_IPC_SAP
00050 {
00051 public:
00052   // = Initialization and termination methods.
00053   /// Initialize a TLI endpoint.
00054   ACE_HANDLE open (const char device[],
00055                    int oflag = O_RDWR,
00056                    struct t_info *info = 0);
00057 
00058   /// Close a TLI endpoint and release resources.
00059   int close (void);
00060 
00061   /// Set underlying protocol options.
00062   int set_option (int level, int option, void *optval, int optlen);
00063 
00064   /// Get underlying protocol options.
00065   int get_option (int level, int option, void *optval, int &optlen);
00066 
00067   // = Calls to underlying TLI operations.
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   /// Return our local endpoint address.
00075   int get_local_addr (ACE_Addr &) const;
00076 
00077   /// Dump the state of an object.
00078   void dump (void) const;
00079 
00080   /// Declare the dynamic allocation hooks.
00081   ACE_ALLOC_HOOK_DECLARE;
00082 
00083 protected:
00084   // = Ensure we are an abstract class.
00085   /// Default constructor.
00086   ACE_TLI (void);
00087 
00088   /// Destructor.
00089   ~ACE_TLI (void);
00090 
00091   /// Initialize a TLI endpoint.
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   // Insane TLI option management.
00097   struct t_optmgmt so_opt_req;
00098   struct t_optmgmt so_opt_ret;
00099 #endif /* ACE_HAS_SVR4_TLI */
00100 };
00101 
00102 #if defined (__ACE_INLINE__)
00103 #include "ace/TLI.i"
00104 #endif /* __ACE_INLINE__ */
00105 
00106 #endif /* ACE_HAS_TLI */
00107 #include "ace/post.h"
00108 #endif /* ACE_TLI_H */

Generated on Mon Jun 16 11:21:54 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002