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 #include "ace/pre.h"
00017
00018 #include "ace/config-all.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00025
00026 #include "ace/Addr.h"
00027 #include "ace/Log_Msg.h"
00028 #include "ace/ACE.h"
00029
00030
00031
00032
00033
00034
00035 class ACE_Export ACE_UNIX_Addr : public ACE_Addr
00036 {
00037 public:
00038
00039
00040 ACE_UNIX_Addr (void);
00041
00042
00043 ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
00044
00045
00046 ACE_UNIX_Addr (const char rendezvous_point[]);
00047
00048
00049 ACE_UNIX_Addr (const sockaddr_un *, int len);
00050
00051
00052 int set (const ACE_UNIX_Addr &sa);
00053
00054
00055 int set (const char rendezvous_point[]);
00056
00057
00058 int set (const sockaddr_un *, int len);
00059
00060
00061 virtual void *get_addr (void) const;
00062
00063
00064 virtual void set_addr (void *addr, int len);
00065
00066
00067 virtual int addr_to_string (char addr[], size_t) const;
00068
00069
00070 virtual int string_to_addr (const char addr[]);
00071
00072
00073 int operator == (const ACE_UNIX_Addr &SAP) const;
00074
00075
00076 int operator != (const ACE_UNIX_Addr &SAP) const;
00077
00078
00079 const char *get_path_name (void) const;
00080
00081
00082 virtual u_long hash (void) const;
00083
00084
00085 void dump (void) const;
00086
00087
00088 ACE_ALLOC_HOOK_DECLARE;
00089
00090 private:
00091
00092 sockaddr_un unix_addr_;
00093 };
00094
00095 #if defined (__ACE_INLINE__)
00096 #include "ace/UNIX_Addr.i"
00097 #endif
00098
00099 #endif
00100 #include "ace/post.h"
00101 #endif