//================================================================================ // Copyright (C) 1997 Microsoft Corporation // Author: RameshV // Description: Download and Upload related code. //================================================================================ //================================================================================ // includes //================================================================================ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //================================================================================ // utilities //================================================================================ BOOL _inline AddressFoundInHostent( IN DHCP_IP_ADDRESS AddrToSearch, // Host-Order addr IN HOSTENT *ServerEntry // entry to search for.. ) { ULONG nAddresses, ThisAddress; if( NULL == ServerEntry ) return FALSE; // no address to search in nAddresses = 0; // have a host entry to compare for addresses while( ServerEntry->h_addr_list[nAddresses] ) { ThisAddress = ntohl(*(DHCP_IP_ADDRESS*)ServerEntry->h_addr_list[nAddresses++] ); if( ThisAddress == AddrToSearch ) { return TRUE; // yeah address matched. } } return FALSE; } //================================================================================ // end of file //================================================================================