/* Get the Nic handle using any child handle in the IPv4 stack. */
EFI_HANDLE PxeBcGetNicByIp4Children(IN EFI_HANDLE ControllerHandle)
/* Get the Nic handle using any child handle in the IPv4 stack. */
EFI_HANDLE PxeBcGetNicByIp4Children(IN EFI_HANDLE ControllerHandle)
{
  EFI_HANDLE  NicHandle;
  NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiArpProtocolGuid);
  if (NicHandle == NULL) {
    NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiIp4ProtocolGuid);
    if (NicHandle == NULL) {
      NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiUdp4ProtocolGuid);
      if (NicHandle == NULL) {
        NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiDhcp4ProtocolGuid);
        if (NicHandle == NULL) {
          NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiMtftp4ProtocolGuid);
          if (NicHandle == NULL) {
            return NULL;
          }
        }
      }
    }
  }
  return NicHandle;
}