Retrieve the record for the IP address.

Return TypeFunction nameArguments
hzIpStatusGetStatusIP(hzIpaddr,)

Declared in file: hzIpaddr.h
Defined in file : hzIpServer.cpp

Function Logic:

0:START 1:ips 2:unknown 3:Return HZ_IPSTATUS_NULL 4:now ipi 5:unknown 6:ips 7:unknown 8:ips 9:Return (hzIpStatus)ips

Function body:

hzIpStatus GetStatusIP (hzIpaddr ipa)
{
   //  Category: Internet Server
   //  
   //  Retrieve the record for the IP address.
   _hzfunc(__func__) ;
   hzIpinfo    ipi ;       //  IP test blocker
   uint32_t    now ;       //  Epoch time
   uint32_t    ips ;       //  IP status as it currently applies
   ips = (uint32_t) HZ_IPSTATUS_NULL ;
   if (!_hzGlobal_StatusIP.Exists(ipa))
       return HZ_IPSTATUS_NULL ;
   //  We have info on the IP address, but does it still apply?
   now = time(0);
   ipi = _hzGlobal_StatusIP[ipa] ;
   if (ipi.m_bInfo & HZ_IPSTATUS_WHITE)    //  && (!ipi.m_tWhite || ipi.m_tWhite > now))
       ips |= HZ_IPSTATUS_WHITE ;
   //  if (ipi.m_bInfo & HZ_IPSTATUS_BLACK && (!ipi.m_tWhite || ipi.m_tBlack > now))
   if (ipi.m_bInfo & HZ_IPSTATUS_BLACK && (ipi.m_tBlack > now))
       ips |= HZ_IPSTATUS_BLACK ;
   return (hzIpStatus) ips ;
}