/* The GetModeData() function copies the current operational settings of this EFI UDPv4 Protocol instance into user-supplied buffers. This function is used optionally to retrieve the operational mode data of underlying networks or drivers. */
EFI_STATUS EFIAPI Udp4GetModeData(IN EFI_UDP4_PROTOCOL *This, OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL, OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
/* The GetModeData() function copies the current operational settings of this EFI UDPv4 Protocol instance into user-supplied buffers. This function is used optionally to retrieve the operational mode data of underlying networks or drivers. */
EFI_STATUS EFIAPI Udp4GetModeData(IN EFI_UDP4_PROTOCOL *This, OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL, OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
{
  UDP4_INSTANCE_DATA  *Instance;
  EFI_IP4_PROTOCOL    *Ip;
  EFI_TPL             OldTpl;
  EFI_STATUS          Status;
  if (This == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
  if (!Instance->Configured && (Udp4ConfigData != NULL)) {
    return EFI_NOT_STARTED;
  }
  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
  if (Udp4ConfigData != NULL) {
    CopyMem (Udp4ConfigData, &Instance->ConfigData, sizeof (*Udp4ConfigData));
  }
  Ip = Instance->IpInfo->Ip.Ip4;
  Status = Ip->GetModeData (Ip, Ip4ModeData, MnpConfigData, SnpModeData);
  gBS->RestoreTPL (OldTpl);
  return Status;
}