/* Return the interface name for the netif matching index or NULL if not found/on error */
char* netif_index_to_name(u8_t idx, char *name)
/* Return the interface name for the netif matching index or NULL if not found/on error */
char* netif_index_to_name(u8_t idx, char *name)
{
  struct netif *netif = netif_get_by_index(idx);
  if (netif != NULL) {
    name[0] = netif->name[0];
    name[1] = netif->name[1];
    lwip_itoa(&name[2], NETIF_NAMESIZE - 2, netif_index_to_num(idx));
    return name;
  }
  return NULL;
}