-/** @file
-
-Copyright (c) 2006 - 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- Mtftp4Driver.h
-
-Abstract:
-
-
-**/
-
-#ifndef __EFI_MTFTP4_DRIVER_H__
-#define __EFI_MTFTP4_DRIVER_H__
-
-#include <PiDxe.h>
-
-#include <Protocol/ServiceBinding.h>
-
-#include <Library/NetLib.h>
-#include <Library/UefiLib.h>
-
-
-EFI_STATUS
-Mtftp4DriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-Mtftp4DriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-Mtftp4DriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-EFI_STATUS
-Mtftp4ServiceBindingCreateChild (
- IN EFI_SERVICE_BINDING_PROTOCOL *This,
- IN OUT EFI_HANDLE *ChildHandle
- );
-
-EFI_STATUS
-Mtftp4ServiceBindingDestroyChild (
- IN EFI_SERVICE_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ChildHandle
- );
-
-extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName;
-extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding;
-
-#endif
+/** @file\r
+ Mtftp drivers function header.\r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef __EFI_MTFTP4_DRIVER_H__\r
+#define __EFI_MTFTP4_DRIVER_H__\r
+\r
+#include <Uefi.h>\r
+\r
+#include <Protocol/ServiceBinding.h>\r
+\r
+#include <Library/NetLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+\r
+extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp4ComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding;\r
+extern EFI_UNICODE_STRING_TABLE *gMtftp4ControllerNameTable;\r
+\r
+/**\r
+ Test whether MTFTP driver support this controller.\r
+\r
+ @param This The MTFTP driver binding instance\r
+ @param Controller The controller to test\r
+ @param RemainingDevicePath The remaining device path\r
+\r
+ @retval EFI_SUCCESS The controller has UDP service binding protocol\r
+ installed, MTFTP can support it.\r
+ @retval Others MTFTP can't support the controller.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Mtftp4DriverBindingSupported (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE Controller,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
+ );\r
+\r
+/**\r
+ Start the MTFTP driver on this controller.\r
+\r
+ MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported\r
+ controller, which can be used to create/destroy MTFTP children.\r
+\r
+ @param This The MTFTP driver binding protocol.\r
+ @param Controller The controller to manage.\r
+ @param RemainingDevicePath Remaining device path.\r
+\r
+ @retval EFI_ALREADY_STARTED The MTFTP service binding protocol has been\r
+ started on the controller.\r
+ @retval EFI_SUCCESS The MTFTP service binding is installed on the\r
+ controller.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Mtftp4DriverBindingStart (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE Controller,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
+ );\r
+\r
+/**\r
+ Stop the MTFTP driver on controller. The controller is a UDP\r
+ child handle.\r
+\r
+ @param This The MTFTP driver binding protocol\r
+ @param Controller The controller to stop\r
+ @param NumberOfChildren The number of children\r
+ @param ChildHandleBuffer The array of the child handle.\r
+\r
+ @retval EFI_SUCCESS The driver is stopped on the controller.\r
+ @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Mtftp4DriverBindingStop (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE Controller,\r
+ IN UINTN NumberOfChildren,\r
+ IN EFI_HANDLE *ChildHandleBuffer\r
+ );\r
+\r
+/**\r
+ Create a MTFTP child for the service binding instance, then\r
+ install the MTFTP protocol to the ChildHandle.\r
+\r
+ @param This The MTFTP service binding instance.\r
+ @param ChildHandle The Child handle to install the MTFTP protocol.\r
+\r
+ @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for the new child.\r
+ @retval EFI_SUCCESS The child is successfully create.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Mtftp4ServiceBindingCreateChild (\r
+ IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE *ChildHandle\r
+ );\r
+\r
+/**\r
+ Destroy one of the service binding's child.\r
+\r
+ @param This The service binding instance\r
+ @param ChildHandle The child handle to destroy\r
+\r
+ @retval EFI_INVALID_PARAMETER The parameter is invaid.\r
+ @retval EFI_UNSUPPORTED The child may have already been destroyed.\r
+ @retval EFI_SUCCESS The child is destroyed and removed from the\r
+ parent's child list.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Mtftp4ServiceBindingDestroyChild (\r
+ IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE ChildHandle\r
+ );\r
+\r
+\r
+\r
+#endif\r