add utils function for get network info.