/* Extract the decimal index from the network interface name. */
UINTN NicNameToIndex(IN CHAR16 *Name)
/* Extract the decimal index from the network interface name. */
UINTN NicNameToIndex(IN CHAR16 *Name)
{
  CHAR16  *Str;
  Str = Name + 3;
  if ((StrnCmp (Name, L"eth", 3) != 0) || (*Str == 0)) {
    return INVALID_NIC_INDEX;
  }
  while (*Str != 0) {
    if ((*Str < L'0') || (*Str > L'9')) {
      return INVALID_NIC_INDEX;
    }
    Str++;
  }
  return (UINT16)StrDecimalToUintn (Name + 3);
}