/* If Map is NULL, then ASSERT(). If Key is NULL, then ASSERT(). */
EFI_STATUS EFIAPI NetMapInsertTail(IN OUT NET_MAP *Map, IN VOID *Key, IN VOID *Value OPTIONAL)
/* If Map is NULL, then ASSERT(). If Key is NULL, then ASSERT(). */
EFI_STATUS EFIAPI NetMapInsertTail(IN OUT NET_MAP *Map, IN VOID *Key, IN VOID *Value OPTIONAL)
{
  NET_MAP_ITEM  *Item;
  ASSERT (Map != NULL && Key != NULL);
  Item = NetMapAllocItem (Map);
  if (Item == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  Item->Key   = Key;
  Item->Value = Value;
  InsertTailList (&Map->Used, &Item->Link);
  Map->Count++;
  return EFI_SUCCESS;
}