src/main/src/netsrvmgrUtiles.cpp
//Check if v6 address is ULA; If the IPv6 address begins with fd or fc, it is a ULA
Check if v6 address is ULA; If the IPv6 address begins with fd or fc, it is a ULA
Check if v6 address is ULA ; If the IPv6 address begins with fd or fc it is a ULA
bool netSrvMgrUtiles::check_global_v6_ula_address(std::string ipv6Addr)
{
    LOG_ENTRY_EXIT;
    if(ipv6Addr.empty())
    {
        RDK_LOG(RDK_LOG_ERROR, LOG_NMGR,"[%s:%d] ipv6 addr is empty \n", __FUNCTION__, __LINE__);
        return false;
    }
    std::string tmpIpv6Str(ipv6Addr);
    if ((tmpIpv6Str.rfind("fd", 0) != std::string::npos) || (tmpIpv6Str.rfind("fc", 0) != std::string::npos))
    {
        RDK_LOG(RDK_LOG_INFO, LOG_NMGR,"[%s:%d] ULA v6 address %s \n", __FUNCTION__, __LINE__,ipv6Addr.c_str());
        return true;
    }
    return false;
}
bool netSrvMgrUtiles :: check_global_v6_ula_address ( std :: string ipv6Addr ) { LOG_ENTRY_EXIT ; if ( ipv6Addr . empty ( ) ) { RDK_LOG ( RDK_LOG_ERROR , LOG_NMGR , " \n " , __FUNCTION__ , __LINE__ ) ; return false ; } std :: string tmpIpv6Str ( ipv6Addr ) ; if ( ( tmpIpv6Str . rfind ( " " , 0 ) != std :: string :: npos ) || ( tmpIpv6Str . rfind ( " " , 0 ) != std :: string :: npos ) ) { RDK_LOG ( RDK_LOG_INFO , LOG_NMGR , " \n " , __FUNCTION__ , __LINE__ , ipv6Addr . c_str ( ) ) ; return true ; } return false ; }
Check if v6 address is ULA; If the IPv6 address begins with fd or fc, it is a ULA
Check if v6 address is ULA ; If the IPv6 address begins with fd or fc it is a ULA