Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

cabal_address.cpp

00001 /*
00002    cabal_address.cpp
00003    Address module for cabal - for throw statements.
00004 
00005    $Id: cabal_address.cpp,v 1.4 2004/03/26 20:48:14 jonnymind Exp $
00006 ---------------------------------------------
00007    Begin      :
00008    Author     : Giancarlo Niccolai
00009 
00010    Last modified because:
00011 
00012 */
00013 
00014 #include <cabal_address.h>
00015 #include <string>
00016 
00017 namespace Cabal {
00018 
00019 StringList *Address::listOfIps() const 
00020 {
00021    StringList *data = 0;
00022    char buf[CABAL_MAX_IP_SIZE];
00023    SockAddrInet addr;
00024    
00025    if ( m_ip_alias[0] != CABAL_INVALID_ADDR ) 
00026    {
00027       data = new StringList;
00028       int i = 0;
00029       while ( m_ip_alias[i] != CABAL_INVALID_ADDR && i < CABAL_MAX_ALIASES ) 
00030       {
00031          Net::initSockAddr( addr, m_ip_alias[i], 0 );
00032          if ( Net::addrToString( addr, buf ) ) {
00033             data->push_back( buf ); // self conversion in a new string
00034          }
00035          i++;
00036       }
00037    }
00038    
00039    return data;
00040 }
00041 
00042 
00043 }

Generated on Sat Apr 10 17:41:48 2004 for Cabal by doxygen 1.3.5