std::string address = fields[0].GetString(); sLog.outString(WORLD_START_CHECKSYS_CHECK);//IP列表已经载入成功,正在验证您的IP,可能需要几分钟
//std::string addressd = Utility::GetLocalAddress()
ACE_INET_Addr *the_addr_array;
size_t count = 0;
if (ACE::get_ip_interfaces (count , the_addr_array) != 0)
{
return false;
}
char addressd[INET6_ADDRSTRLEN];
ACE_INET_Addr *the_addr_array2 = the_addr_array;
while ( count-- )
{
the_addr_array2->addr_to_string(addressd, sizeof(addressd));
printf("%s ", addressd);
address += ":0";
if (addressd!=address)
{
sLog.outError(WORLD_START_NOT_LOCALADDRESS, fields[0].GetString());
break;
}
++the_addr_array2;
}
delete [] the_addr_array;
//ACE_INET_Addr local_address;
//char addressd[30];
//ACE_INET_Addr::addr_to_string(addressd,sizeof(local_address));
if (addressd!=address)//本地IP验证,检查是否是本地IP启动
{
|