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

UNIX_Addr.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    UNIX_Addr.h
00006  *
00007  *  $Id: UNIX_Addr.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_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 /* ACE_LACKS_PRAGMA_ONCE */
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  * @class ACE_UNIX_Addr
00032  *
00033  * @brief Defines the ``UNIX domain address family'' address format.
00034  */
00035 class ACE_Export ACE_UNIX_Addr : public ACE_Addr
00036 {
00037 public:
00038   // = Initialization methods.
00039   /// Default constructor.
00040   ACE_UNIX_Addr (void);
00041 
00042   /// Copy constructor.
00043   ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
00044 
00045   /// Creates an ACE_UNIX_Addr from a string.
00046   ACE_UNIX_Addr (const char rendezvous_point[]);
00047 
00048   /// Creates an ACE_INET_Addr from a sockaddr_un structure.
00049   ACE_UNIX_Addr (const sockaddr_un *, int len);
00050 
00051   /// Creates an ACE_UNIX_Addr from another ACE_UNIX_Addr.
00052   int set (const ACE_UNIX_Addr &sa);
00053 
00054   /// Creates an ACE_UNIX_Addr from a string.
00055   int set (const char rendezvous_point[]);
00056 
00057   /// Creates an ACE_UNIX_Addr from a sockaddr_un structure.
00058   int set (const sockaddr_un *, int len);
00059 
00060   /// Return a pointer to the underlying network address.
00061   virtual void *get_addr (void) const;
00062 
00063   /// Set a pointer to the underlying network address.
00064   virtual void set_addr (void *addr, int len);
00065 
00066   /// Transform the current address into string format.
00067   virtual int addr_to_string (char addr[], size_t) const;
00068 
00069   /// Transform the string into the current addressing format.
00070   virtual int string_to_addr (const char addr[]);
00071 
00072   /// Compare two addresses for equality.
00073   int operator == (const ACE_UNIX_Addr &SAP) const;
00074 
00075   /// Compare two addresses for inequality.
00076   int  operator != (const ACE_UNIX_Addr &SAP) const;
00077 
00078   /// Return the path name of the underlying rendezvous point.
00079   const char *get_path_name (void) const;
00080 
00081   /// Computes and returns hash value.
00082   virtual u_long hash (void) const;
00083 
00084   /// Dump the state of an object.
00085   void dump (void) const;
00086 
00087   /// Declare the dynamic allocation hooks.
00088   ACE_ALLOC_HOOK_DECLARE;
00089 
00090 private:
00091   /// Underlying socket address.
00092   sockaddr_un unix_addr_;
00093 };
00094 
00095 #if defined (__ACE_INLINE__)
00096 #include "ace/UNIX_Addr.i"
00097 #endif /* __ACE_INLINE__ */
00098 
00099 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00100 #include "ace/post.h"
00101 #endif /* ACE_UNIX_ADDR_H */

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