/* The GetModeData() function returns the current operating mode and cached data packet for the MTFTP6 instance. */
EFI_STATUS EFIAPI EfiMtftp6GetModeData(IN EFI_MTFTP6_PROTOCOL *This, OUT EFI_MTFTP6_MODE_DATA *ModeData)
/* The GetModeData() function returns the current operating mode and cached data packet for the MTFTP6 instance. */
EFI_STATUS EFIAPI EfiMtftp6GetModeData(IN EFI_MTFTP6_PROTOCOL *This, OUT EFI_MTFTP6_MODE_DATA *ModeData)
{
  MTFTP6_INSTANCE  *Instance;
  EFI_TPL          OldTpl;
  if ((This == NULL) || (ModeData == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  OldTpl   = gBS->RaiseTPL (TPL_CALLBACK);
  Instance = MTFTP6_INSTANCE_FROM_THIS (This);
  if (Instance->Config != NULL) {
    CopyMem (
      &ModeData->ConfigData,
      Instance->Config,
      sizeof (EFI_MTFTP6_CONFIG_DATA)
      );
  } else {
    ZeroMem (
      &ModeData->ConfigData,
      sizeof (EFI_MTFTP6_CONFIG_DATA)
      );
  }
  ModeData->SupportedOptionCount = MTFTP6_SUPPORTED_OPTIONS_NUM;
  ModeData->SupportedOptions     = (UINT8 **)mMtftp6SupportedOptions;
  gBS->RestoreTPL (OldTpl);
  return EFI_SUCCESS;
}