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

ATM_Addr.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 // $Id: ATM_Addr.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:20 chad Exp $
00003 
00004 // Defines the Internet domain address family address format.
00005 
00006 #include "ace/ATM_Addr.h"
00007 #if defined (ACE_HAS_ATM)
00008 
00009 #include "ace/Log_Msg.h"
00010 
00011 #if defined (ACE_HAS_FORE_ATM_WS2)
00012 #include /**/ "forews2.h"
00013 #endif /* ACE_HAS_FORE_ATM_WS2 */
00014 
00015 #if !defined (__ACE_INLINE__)
00016 #include "ace/ATM_Addr.i"
00017 #endif /* __ACE_INLINE__ */
00018 
00019 ACE_RCSID(ace, ATM_Addr, "$Id: ATM_Addr.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:20 chad Exp $")
00020 
00021 ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Addr)
00022 
00023 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00024 #define BHLI_MAGIC "FORE_ATM"
00025 // This is line rate in cells/s for an OC-3 MM interface.
00026 const long ACE_ATM_Addr::LINE_RATE = 353207;
00027 const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0x1;
00028 const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0x2;
00029 const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x99;
00030 #elif defined (ACE_HAS_LINUX_ATM)
00031 //pbrandao:for Linux:
00032 //pbrandao:for now stick with current definitions
00033 //pbrandao:see if later need to change
00034 const long ACE_ATM_Addr::LINE_RATE = 353207;
00035 const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0;
00036 const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0;
00037 const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x99;
00038 #else
00039 const long ACE_ATM_Addr::LINE_RATE = 0L;
00040 const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0;
00041 const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0;
00042 const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x0;
00043 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00044 
00045 // Default constructor
00046 
00047 ACE_ATM_Addr::ACE_ATM_Addr (u_char selector)
00048 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00049   : ACE_Addr (AF_ATM,
00050 #elif defined (ACE_HAS_LINUX_ATM)
00051   : ACE_Addr (PF_ATMSVC,
00052 #else
00053   : ACE_Addr (AF_UNSPEC,
00054 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00055               sizeof this->atm_addr_)
00056 {
00057   // ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
00058  (void) ACE_OS::memset ((void *) &this->atm_addr_,
00059                          0,
00060                          sizeof this->atm_addr_);
00061   this->init (selector);
00062 }
00063 
00064 // Copy constructor.
00065 
00066 ACE_ATM_Addr::ACE_ATM_Addr (const ACE_ATM_Addr &sap,
00067                             u_char selector)
00068 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00069   : ACE_Addr (AF_ATM,
00070 #elif defined (ACE_HAS_LINUX_ATM)
00071   : ACE_Addr (PF_ATMSVC,
00072 #else
00073   : ACE_Addr (AF_UNSPEC,
00074 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00075               sizeof this->atm_addr_)
00076 {
00077   ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
00078   this->set (sap, selector);
00079 #if defined (ACE_HAS_LINUX_ATM)
00080   this->atm_addr_.sockaddratmsvc.sas_family = PF_ATMSVC;
00081   this->atm_addr_.atmsap.blli[0].l3_proto = ATM_L3_NONE;
00082   this->atm_addr_.atmsap.blli[0].l2_proto = ATM_L2_NONE;
00083   this->atm_addr_.atmsap.bhli.hl_type = ATM_HL_NONE;
00084 #endif /* ACE_HAS_LINUX_ATM */
00085 }
00086 
00087 ACE_ATM_Addr::ACE_ATM_Addr (const ATM_Addr *sap,
00088                             u_char selector)
00089 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00090   : ACE_Addr (AF_ATM,
00091 #elif defined (ACE_HAS_LINUX_ATM)
00092   : ACE_Addr (PF_ATMSVC,
00093 #else
00094   : ACE_Addr (AF_UNSPEC,
00095 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00096               sizeof this->atm_addr_)
00097 {
00098   ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
00099   this->set (sap, selector);
00100 }
00101 
00102 
00103 ACE_ATM_Addr::ACE_ATM_Addr (const ACE_TCHAR sap[],
00104                             u_char selector)
00105 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00106   : ACE_Addr (AF_ATM,
00107 #elif defined (ACE_HAS_LINUX_ATM)
00108   : ACE_Addr (PF_ATMSVC,
00109 #else
00110   : ACE_Addr (AF_UNSPEC,
00111 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00112               sizeof this->atm_addr_)
00113 {
00114   ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
00115   this->set (sap, selector);
00116 }
00117 
00118 void
00119 ACE_ATM_Addr::init (u_char selector)
00120 {
00121 #if defined (ACE_HAS_FORE_ATM_XTI)
00122   // Note: this approach may be FORE implementation-specific.  When we
00123   // bind with tag_addr ABSENT and tag_selector PRESENT, only the
00124   // selector (i.e. address[19]) is used by the TP.  The rest of the
00125   // local address is filled in by the TP and can be obtained via the
00126   // 'ret' parameter or with t_getname ()/t_getprotaddr ().
00127 
00128   atm_addr_.addressType = (u_int16_t) AF_ATM;
00129 
00130   atm_addr_.sap.t_atm_sap_addr.SVE_tag_addr = (int8_t) T_ATM_ABSENT;
00131   atm_addr_.sap.t_atm_sap_addr.SVE_tag_selector = (int8_t) T_ATM_PRESENT;
00132 
00133   atm_addr_.sap.t_atm_sap_addr.address_format = (u_int8_t) T_ATM_ENDSYS_ADDR;
00134   atm_addr_.sap.t_atm_sap_addr.address_length = ATMNSAP_ADDR_LEN;
00135   atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1] = selector;
00136 
00137   atm_addr_.sap.t_atm_sap_layer2.SVE_tag = (int8_t) T_ATM_ABSENT;
00138   atm_addr_.sap.t_atm_sap_layer3.SVE_tag = (int8_t) T_ATM_ABSENT;
00139 
00140   atm_addr_.sap.t_atm_sap_appl.SVE_tag = (int8_t) T_ATM_PRESENT;
00141   atm_addr_.sap.t_atm_sap_appl.ID_type = (u_int8_t) T_ATM_USER_APP_ID;
00142 
00143   ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_appl.ID.user_defined_ID,
00144                   BHLI_MAGIC,
00145                   sizeof atm_addr_.sap.t_atm_sap_appl.ID);
00146 #elif defined (ACE_HAS_FORE_ATM_WS2)
00147   ACE_OS::memset ((void *)&atm_addr_, 0, sizeof atm_addr_);
00148   atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ] = (char)selector;
00149   atm_addr_.satm_family = AF_ATM;
00150   atm_addr_.satm_number.AddressType = ATM_NSAP;
00151   atm_addr_.satm_number.NumofDigits = ATM_ADDR_SIZE;
00152   atm_addr_.satm_blli.Layer2Protocol = SAP_FIELD_ABSENT;
00153   atm_addr_.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT;
00154   atm_addr_.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT;
00155 
00156   // Need to know the correspondence.
00157   //atm_addr_.sap.t_atm_sap_appl.SVE_tag = (int8_t) T_ATM_PRESENT;
00158   //atm_addr_.sap.t_atm_sap_appl.ID_type = (u_int8_t) T_ATM_USER_APP_ID;
00159   //ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_appl.ID.user_defined_ID,
00160   //                BHLI_MAGIC,
00161   //                sizeof atm_addr_.sap.t_atm_sap_appl.ID);
00162 #elif defined (ACE_HAS_LINUX_ATM)
00163   atm_addr_.sockaddratmsvc.sas_family = AF_ATMSVC;
00164   atm_addr_.sockaddratmsvc.sas_addr.prv[ATM_ESA_LEN - 1] = (char)selector;
00165   atm_addr_.atmsap.blli[0].l3_proto = ATM_L3_NONE;
00166   atm_addr_.atmsap.blli[0].l2_proto = ATM_L2_NONE;
00167   atm_addr_.atmsap.bhli.hl_type = ATM_HL_NONE;
00168 #else
00169   ACE_UNUSED_ARG (selector);
00170 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00171 }
00172 
00173 int
00174 ACE_ATM_Addr::set (const ACE_ATM_Addr &sap,
00175                    u_char selector)
00176 {
00177   ACE_TRACE ("ACE_ATM_Addr::set");
00178 
00179   this->init (selector);
00180 
00181   this->ACE_Addr::base_set (sap.get_type (),
00182                             sap.get_size ());
00183 
00184 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00185   ACE_ASSERT (sap.get_type () == AF_ATM);
00186 #elif defined (ACE_HAS_LINUX_ATM)
00187   ACE_ASSERT (sap.get_type () == PF_ATMSVC);
00188 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
00189 
00190  (void) ACE_OS::memcpy ((void *) &this->atm_addr_,
00191  (void *) &sap.atm_addr_,
00192                          sizeof this->atm_addr_);
00193   return 0;
00194 }
00195 
00196 int
00197 ACE_ATM_Addr::set (const ATM_Addr *sap,
00198                    u_char selector)
00199 {
00200   ACE_TRACE ("ACE_ATM_Addr::set");
00201 
00202   this->init (selector);
00203 
00204 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00205   this->ACE_Addr::base_set (AF_ATM,
00206 #elif defined (ACE_HAS_LINUX_ATM)
00207   this->ACE_Addr::base_set (PF_ATMSVC,
00208 #else
00209   this->ACE_Addr::base_set (AF_UNSPEC,
00210 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
00211                             sizeof (*sap));
00212 
00213  (void) ACE_OS::memcpy ((void *) &this->atm_addr_,
00214  (void *) sap,
00215                          sizeof this->atm_addr_);
00216   return 0;
00217 }
00218 
00219 int
00220 ACE_ATM_Addr::set (const ACE_TCHAR address[],
00221                    u_char selector)
00222 {
00223   ACE_TRACE ("ACE_ATM_Addr::set");
00224   int ret;
00225 
00226   this->init (selector);
00227 
00228 #if defined (ACE_HAS_FORE_ATM_XTI)
00229   atm_addr_.sap.t_atm_sap_addr.SVE_tag_addr =
00230  (int8_t) T_ATM_PRESENT;
00231 #endif /* ACE_HAS_FORE_ATM_XTI */
00232 
00233   ret = this -> string_to_addr (address);
00234   this -> set_selector (selector);
00235   return ret;
00236 }
00237 
00238 // Transform the string into the current addressing format.
00239 
00240 int
00241 ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
00242 {
00243   ACE_TRACE ("ACE_ATM_Addr::string_to_addr");
00244 
00245 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00246   this->ACE_Addr::base_set (AF_ATM,
00247 #elif defined (ACE_HAS_LINUX_ATM)
00248   this->ACE_Addr::base_set (PF_ATMSVC,
00249 #else
00250   this->ACE_Addr::base_set (AF_UNSPEC,
00251 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00252                             sizeof this->atm_addr_);
00253 #if defined (ACE_HAS_FORE_ATM_XTI)
00254   struct hostent *entry;
00255   struct atmnsap_addr *nsap;
00256 
00257   // Yow, someone gave us a NULL ATM address!
00258   if (sap == 0)
00259     {
00260       errno = EINVAL;
00261       return -1;
00262     }
00263   else if ((entry = gethostbyname_atmnsap ((ACE_TCHAR *)sap)) != 0)
00264     {
00265       ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address, 
00266                       entry->h_addr_list[0],
00267                       ATMNSAP_ADDR_LEN - 1);
00268     }
00269   else if ((nsap = atmnsap_addr (sap)) != 0)
00270     {
00271       ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address,
00272                       nsap->atmnsap,
00273                       ATMNSAP_ADDR_LEN);
00274     }
00275   else {
00276       errno = EINVAL;
00277       return -1;
00278     }
00279 #elif defined (ACE_HAS_FORE_ATM_WS2)
00280    DWORD dwValue;
00281    HANDLE hLookup;
00282    WSAQUERYSETW qsRestrictions;
00283    CSADDR_INFO  csaBuffer;
00284    WCHAR  tmpWStr[100];
00285 
00286    MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, sap, -1, tmpWStr, 100);  
00287 
00288    csaBuffer.LocalAddr.iSockaddrLength = sizeof (struct sockaddr_atm);
00289    csaBuffer.LocalAddr.lpSockaddr = (struct sockaddr *)&atm_addr_;
00290    csaBuffer.RemoteAddr.iSockaddrLength = sizeof (struct sockaddr_atm);
00291    csaBuffer.RemoteAddr.lpSockaddr = (struct sockaddr *)&atm_addr_;
00292 
00293    qsRestrictions.dwSize                  = sizeof (WSAQUERYSETW);
00294    qsRestrictions.lpszServiceInstanceName = 0;
00295    qsRestrictions.lpServiceClassId        = &FORE_NAME_CLASS;
00296    qsRestrictions.lpVersion               = 0;
00297    qsRestrictions.lpszComment             = 0;
00298    qsRestrictions.dwNameSpace             = FORE_NAME_SPACE;
00299    qsRestrictions.lpNSProviderId          = 0;
00300    qsRestrictions.lpszContext             = L"";
00301    qsRestrictions.dwNumberOfProtocols     = 0;
00302    qsRestrictions.lpafpProtocols          = 0;
00303    qsRestrictions.lpszQueryString         = tmpWStr;
00304    qsRestrictions.dwNumberOfCsAddrs       = 1;
00305    qsRestrictions.lpcsaBuffer             = &csaBuffer;
00306    qsRestrictions.lpBlob                  = 0; //&blob;
00307 
00308    if (::WSALookupServiceBeginW (&qsRestrictions, LUP_RETURN_ALL, &hLookup) 
00309         == SOCKET_ERROR) {
00310      ACE_OS::printf ("Error: WSALookupServiceBeginW failed! %d\n",
00311                      ::WSAGetLastError ());
00312            return -1;
00313    }                
00314 
00315    dwValue = sizeof (WSAQUERYSETW);
00316 
00317    if (::WSALookupServiceNextW (hLookup, 0, &dwValue, &qsRestrictions) 
00318         == SOCKET_ERROR) {
00319      if (WSAGetLastError () != WSA_E_NO_MORE) {
00320        ACE_OS::printf ("Error: WSALookupServiceNextW failed! %d\n", 
00321                        ::WSAGetLastError ());
00322              return -1;
00323      }
00324    }
00325 
00326    if (WSALookupServiceEnd (hLookup) == SOCKET_ERROR) {
00327      ACE_OS::printf ("Error : WSALookupServiceEnd failed! %d \n", 
00328                      ::WSAGetLastError ());
00329       errno = EINVAL;
00330       return -1;
00331    }
00332 #elif defined (ACE_HAS_LINUX_ATM)
00333    if (sap == 0 || !ACE_OS::strcmp (sap,"")) {
00334      errno = EINVAL;
00335      return -1;
00336    }
00337 
00338    if (text2atm ((ACE_TCHAR *)sap, 
00339  (struct sockaddr *)& (atm_addr_.sockaddratmsvc), 
00340                  sizeof (atm_addr_.sockaddratmsvc), 
00341                  T2A_SVC | T2A_NAME) < 0) {
00342      ACE_DEBUG (LM_DEBUG,
00343                "Error : text2atm failed!\n");
00344      errno = EINVAL;
00345      return -1;
00346    }
00347 #else
00348   ACE_UNUSED_ARG (sap);
00349   
00350   return 0;
00351 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
00352 
00353 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM)
00354   return 0;
00355 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
00356 }
00357 
00358 // Transform the current address into string format.
00359 
00360 int
00361 ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[],
00362                               size_t addrlen) const
00363 {
00364   ACE_TRACE ("ACE_ATM_Addr::addr_to_string");
00365 
00366 #if defined (ACE_HAS_FORE_ATM_XTI)
00367   ACE_TCHAR buffer[MAXNAMELEN + 1];
00368   struct atmnsap_addr nsap;
00369   ACE_OS::memcpy (nsap.atmnsap,
00370                   atm_addr_.sap.t_atm_sap_addr.address,
00371                   ATMNSAP_ADDR_LEN);
00372   ACE_OS::sprintf (buffer,
00373                    ACE_LIB_TEXT ("%s"),
00374                    atmnsap_ntoa (nsap));
00375 
00376   size_t total_len = ACE_OS::strlen (buffer) + sizeof ('\0');
00377 
00378   if (addrlen < total_len)
00379     return -1;
00380   else
00381     ACE_OS::strcpy (addr, buffer);
00382 
00383   return 0;
00384 #elif defined (ACE_HAS_FORE_ATM_WS2)
00385   ACE_TCHAR buffer[MAXNAMELEN + 1];
00386   int i;
00387 
00388   if (addrlen < ATM_ADDR_SIZE + 1) 
00389           return -1;
00390 
00391   for (i = 0; i < ATM_ADDR_SIZE; i++) {
00392     buffer[ i * 3 ] = '\0';
00393           ACE_OS::sprintf (buffer, ACE_LIB_TEXT ("%s%02x."), 
00394                      buffer, 
00395                      atm_addr_.satm_number.Addr[ i ]);
00396   }
00397 
00398   buffer[ ATM_ADDR_SIZE * 3 - 1 ] = '\0';
00399   ACE_OS::strcpy (addr, buffer);
00400 
00401   return 0;
00402 #elif defined (ACE_HAS_LINUX_ATM)
00403   ACE_TCHAR buffer[MAX_ATM_ADDR_LEN + 1];
00404   int total_len;
00405   if ((total_len = atm2text (buffer,
00406                             sizeof buffer,
00407  (struct sockaddr *)& (atm_addr_.sockaddratmsvc), 
00408                             A2T_PRETTY)) < 0) {
00409     ACE_DEBUG ((LM_DEBUG,"ACE_ATM_Addr (addr_to_string): atm2text failed\n"));
00410     return -1;
00411   }
00412   if (addrlen < (size_t)total_len)
00413     return -1;
00414   else
00415     ACE_OS::strcpy (addr,
00416                    buffer);
00417 
00418   return 0;
00419 #else
00420   ACE_UNUSED_ARG (addr);
00421   ACE_UNUSED_ARG (addrlen);
00422   return -1;
00423 #endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
00424 }
00425 
00426 const ACE_TCHAR *
00427 ACE_ATM_Addr::addr_to_string (void) const
00428 {
00429   ACE_TRACE ("ACE_ATM_Addr::addr_to_string");
00430 
00431   static ACE_TCHAR addr[MAXHOSTNAMELEN + 1];
00432   if (this->addr_to_string (addr,
00433                             MAXHOSTNAMELEN + 1) < 0)
00434     return 0;
00435 
00436   return addr;
00437 }
00438 
00439 // Set a pointer to the address.
00440 void
00441 ACE_ATM_Addr::set_addr (void *addr, int len)
00442 {
00443   ACE_TRACE ("ACE_ATM_Addr::set_addr");
00444 
00445 #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
00446   this->ACE_Addr::base_set (AF_ATM,
00447 #elif defined (ACE_HAS_LINUX_ATM)
00448   this->ACE_Addr::base_set (PF_ATMSVC,
00449 #else
00450   this->ACE_Addr::base_set (AF_UNSPEC,
00451 #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_WS2 */
00452                             len);
00453   ACE_OS::memcpy ((void *) &this->atm_addr_,
00454  (void *) addr, len);
00455 }
00456 
00457 // Compare two addresses for inequality.
00458 
00459 int
00460 ACE_ATM_Addr::operator != (const ACE_ATM_Addr &sap) const
00461 {
00462   ACE_TRACE ("ACE_ATM_Addr::operator !=");
00463   return ! ((*this) == sap);
00464 }
00465 
00466 // Compare two addresses for equality.
00467 
00468 int
00469 ACE_ATM_Addr::operator == (const ACE_ATM_Addr &sap) const
00470 {
00471   ACE_TRACE ("ACE_ATM_Addr::operator ==");
00472 
00473 #if defined (ACE_HAS_LINUX_ATM)
00474   return (atm_equal ((const struct sockaddr *)& (this->atm_addr_.sockaddratmsvc),
00475  (const struct sockaddr *)& (sap.atm_addr_.sockaddratmsvc),
00476                     0,
00477                     0)
00478           &&
00479           sap_equal (& (this->atm_addr_.atmsap),
00480                     & (sap.atm_addr_.atmsap),
00481                     0));
00482 #else
00483   return ACE_OS::memcmp (&atm_addr_,
00484                          &sap.atm_addr_,
00485                          sizeof (ATM_Addr)) == 0;
00486 #endif /*  ACE_HAS_LINUX_ATM */
00487 }
00488 
00489 void
00490 ACE_ATM_Addr::dump (void) const
00491 {
00492   ACE_TRACE ("ACE_ATM_Addr::dump");
00493 
00494   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00495 
00496   ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
00497   ACE_OS::sprintf (s,
00498                    ACE_LIB_TEXT ("%s"),
00499                    this->addr_to_string ());
00500   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("%s"), s));
00501   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00502 }
00503 
00504 #endif /* ACE_HAS_ATM */

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