//std::cout << "found matching IP for device " << (*i).getName() << std::endl;
//printf("index %d port %d %016lx:%016lx\n", (int)app->SGIDIndex_, (int)app->portNumber_, bswap_64(gid.global.subnet_prefix), bswap_64(gid.global.interface_id));
context_=context;
app->iaName_=(*i).getName();
LOG4CPLUS_INFO(app->getApplicationLogger(),"found matching interface "<<app->networkInterface_.toString()<<" for device "<<(*i).getName()<<" at index "<<app->SGIDIndex_<<" port "<<app->portNumber_<<" GID "<<std::hex<<bswap_64(gid.global.subnet_prefix)<<":"<<bswap_64(gid.global.interface_id));
break;
}
}
}
catch(ibvla::exception::Exception&e)
{
XCEPT_RETHROW(pt::ibv::exception::Exception,"failed to create IB context ",e);
}
ibvla::destroyContext(context);
}
if(i==devices.end())
{
ibvla::freeDeviceList(devices);
std::stringstreammsg;
msg<<"Could not find device '"<<app->iaName_.toString()<<"', peer transport configuration failure"<<std::endl;
msg<<"Available devices :"<<std::endl;
for(i=devices.begin();i!=devices.end();i++)
{
msg<<(*i).getName()<<std::endl;
}
msg<<"Could not find device for interface '"<<app->networkInterface_.toString()<<"' index "<<app->SGIDIndex_<<" port "<<app->portNumber_<<std::endl;