/* Create a template DHCPv4 packet as a seed. */
VOID PxeBcSeedDhcp4Packet(OUT EFI_DHCP4_PACKET *Seed, IN EFI_UDP4_PROTOCOL *Udp4)
/* Create a template DHCPv4 packet as a seed. */
VOID PxeBcSeedDhcp4Packet(OUT EFI_DHCP4_PACKET *Seed, IN EFI_UDP4_PROTOCOL *Udp4)
{
  EFI_SIMPLE_NETWORK_MODE  Mode;
  EFI_DHCP4_HEADER         *Header;
  Udp4->GetModeData (Udp4, NULL, NULL, NULL, &Mode);
  Seed->Size   = sizeof (EFI_DHCP4_PACKET);
  Seed->Length = sizeof (Seed->Dhcp4);
  Header       = &Seed->Dhcp4.Header;
  ZeroMem (Header, sizeof (EFI_DHCP4_HEADER));
  Header->OpCode    = PXEBC_DHCP4_OPCODE_REQUEST;
  Header->HwType    = Mode.IfType;
  Header->HwAddrLen = (UINT8)Mode.HwAddressSize;
  CopyMem (Header->ClientHwAddr, &Mode.CurrentAddress, Header->HwAddrLen);
  Seed->Dhcp4.Magik     = PXEBC_DHCP4_MAGIC;
  Seed->Dhcp4.Option[0] = DHCP4_TAG_EOP;
}