src/main/src/netsrvmgrUtiles.cpp
//Check  IP string(IPv4 and IPv6) is link local address
// Check for 169.254 since it will be come as Global scope.
Check  IP string(IPv4 and IPv6) is link local address
Check for 169.254 since it will be come as Global scope.
Check IP string ( IPv4 and IPv6 ) is link local address Check for 169 . 254 since it will be come as Global scope .
bool netSrvMgrUtiles::chk_ipaddr_linklocal(const char *stbip,unsigned int family)
{
    LOG_ENTRY_EXIT;
    struct sockaddr_in6 sa6;
    struct sockaddr_in sa;
    switch(family)
    {
        case AF_INET:
            inet_pton(AF_INET, stbip, &(sa.sin_addr));
            return IN_IS_ADDR_LINKLOCAL(sa.sin_addr.s_addr);
        case AF_INET6:
            inet_pton(AF_INET6, stbip, &(sa6.sin6_addr));
            return IN6_IS_ADDR_LINKLOCAL(&sa6.sin6_addr);
            break;
        default:
            RDK_LOG(RDK_LOG_ERROR, LOG_NMGR,"[%s:%d] interface family not supported %d \n", __FUNCTION__, __LINE__,family);
            return false;
    }
}
bool netSrvMgrUtiles :: chk_ipaddr_linklocal ( const char * stbip , unsigned int family ) { LOG_ENTRY_EXIT ; struct sockaddr_in6 sa6 ; struct sockaddr_in sa ; switch ( family ) { case AF_INET : inet_pton ( AF_INET , stbip , & ( sa . sin_addr ) ) ; return IN_IS_ADDR_LINKLOCAL ( sa . sin_addr . s_addr ) ; case AF_INET6 : inet_pton ( AF_INET6 , stbip , & ( sa6 . sin6_addr ) ) ; return IN6_IS_ADDR_LINKLOCAL ( & sa6 . sin6_addr ) ; break ; default : RDK_LOG ( RDK_LOG_ERROR , LOG_NMGR , " \n " , __FUNCTION__ , __LINE__ , family ) ; return false ; } }
Check  IP string(IPv4 and IPv6) is link local address
Check for 169.254 since it will be come as Global scope.
Check IP string ( IPv4 and IPv6 ) is link local address Check for 169 . 254 since it will be come as Global scope .