static bool allowLocalNetworksegment(uint32 uSourceIP )
{
//*允许192.168.x.x网段
//*43200由inet_addr( "192.168" ) 得到整型值,然后计算取其低16位得到
if ( 43200 == (uSourceIP&0x0000ffff) )
{
return true;
}
return false;
}
static bool allowSpecialNetWorksegment(uint32 uSourceIP )
{
//*允许配置文件里写的网段
for ( uint32 i=0; i < CConfigFile::instance()->m_uIPNum ; ++i)
{
if (uSourceIP == CConfigFile::instance()->m_uIP[i] )
{
return true;
}
}
return false;
}