00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 #ifndef ACE_UNIX_ADDR_H
00015 #define ACE_UNIX_ADDR_H
00016 
00017 #include  "ace/pre.h"
00018 
00019 #include  "ace/ACE_export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif 
00024 
00025 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00026 
00027 #include "ace/Addr.h"
00028 #include "ace/Log_Msg.h"
00029 #include "ace/ACE.h"
00030 #include "ace/os_include/sys/os_un.h"
00031 
00032 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00033 
00034 
00035 
00036 
00037 
00038 
00039 class ACE_Export ACE_UNIX_Addr : public ACE_Addr
00040 {
00041 public:
00042   
00043 
00044   ACE_UNIX_Addr (void);
00045 
00046 
00047   ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
00048 
00049 
00050   ACE_UNIX_Addr (const char rendezvous_point[]);
00051 
00052 
00053   ACE_UNIX_Addr (const sockaddr_un *, int len);
00054 
00055 
00056   int set (const ACE_UNIX_Addr &sa);
00057 
00058 
00059   int set (const char rendezvous_point[]);
00060 
00061 
00062   int set (const sockaddr_un *, int len);
00063 
00064 
00065   virtual void *get_addr (void) const;
00066 
00067 
00068   virtual void set_addr (void *addr, int len);
00069 
00070 
00071   virtual int addr_to_string (ACE_TCHAR addr[], size_t) const;
00072 
00073 
00074   virtual int string_to_addr (const char addr[]);
00075 
00076 #if defined (ACE_HAS_WCHAR)
00077 
00078   ACE_UNIX_Addr (const wchar_t rendezvous_point[]);
00079 
00080 
00081   int set (const wchar_t rendezvous_point[]);
00082 #endif 
00083 
00084 
00085   bool operator == (const ACE_UNIX_Addr &SAP) const;
00086 
00087 
00088   bool operator != (const ACE_UNIX_Addr &SAP) const;
00089 
00090 
00091   const char *get_path_name (void) const;
00092 
00093 
00094   virtual u_long hash (void) const;
00095 
00096 
00097   void dump (void) const;
00098 
00099 
00100   ACE_ALLOC_HOOK_DECLARE;
00101 
00102 private:
00103 
00104   sockaddr_un unix_addr_;
00105 };
00106 
00107 ACE_END_VERSIONED_NAMESPACE_DECL
00108 
00109 #if defined (__ACE_INLINE__)
00110 #include "ace/UNIX_Addr.inl"
00111 #endif 
00112 
00113 #endif 
00114 
00115 #include  "ace/post.h"
00116 
00117 #endif