/* Create an IP_ARP_QUE structure to request ARP service. */
IP4_ARP_QUE* Ip4CreateArpQue(IN IP4_INTERFACE *Interface, IN IP4_ADDR DestIp)
/* Create an IP_ARP_QUE structure to request ARP service. */
IP4_ARP_QUE* Ip4CreateArpQue(IN IP4_INTERFACE *Interface, IN IP4_ADDR DestIp)
{
  IP4_ARP_QUE  *ArpQue;
  EFI_STATUS   Status;
  ArpQue = AllocatePool (sizeof (IP4_ARP_QUE));
  if (ArpQue == NULL) {
    return NULL;
  }
  ArpQue->Signature = IP4_FRAME_ARP_SIGNATURE;
  InitializeListHead (&ArpQue->Link);
  InitializeListHead (&ArpQue->Frames);
  ArpQue->Interface = Interface;
  Status = gBS->CreateEvent (
                  EVT_NOTIFY_SIGNAL,
                  TPL_NOTIFY,
                  Ip4OnArpResolved,
                  ArpQue,
                  &ArpQue->OnResolved
                  );
  if (EFI_ERROR (Status)) {
    FreePool (ArpQue);
    return NULL;
  }
  ArpQue->Ip = DestIp;
  CopyMem (&ArpQue->Mac, &mZeroMacAddress, sizeof (ArpQue->Mac));
  return ArpQue;
}