Adding function in ip.c for getting all interface IDs