/* This function searches EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL instance with the given EFI_REDFISH_DISCOVER_NETWORK_INTERFACE. */
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL* GetTargetNetworkInterfaceInternal(IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *TargetNetworkInterface)
/* This function searches EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL instance with the given EFI_REDFISH_DISCOVER_NETWORK_INTERFACE. */
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL* GetTargetNetworkInterfaceInternal(IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *TargetNetworkInterface)
{
  EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL  *ThisNetworkInterface;
  if (IsListEmpty (&mEfiRedfishDiscoverNetworkInterface)) {
    return NULL;
  }
  ThisNetworkInterface = (EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *)GetFirstNode (&mEfiRedfishDiscoverNetworkInterface);
  while (TRUE) {
    if ((MAC_COMPARE (ThisNetworkInterface, TargetNetworkInterface)) &&
        (VALID_TCP6 (TargetNetworkInterface, ThisNetworkInterface) ||
         VALID_TCP4 (TargetNetworkInterface, ThisNetworkInterface)))
    {
      return ThisNetworkInterface;
    }
    if (IsNodeAtEnd (&mEfiRedfishDiscoverNetworkInterface, &ThisNetworkInterface->Entry)) {
      return NULL;
    }
    ThisNetworkInterface = (EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *)GetNextNode (&mEfiRedfishDiscoverNetworkInterface, &ThisNetworkInterface->Entry);
  }
  return NULL;
}