2 Mtftp drivers function header.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef __EFI_MTFTP4_DRIVER_H__
10 #define __EFI_MTFTP4_DRIVER_H__
14 #include <Protocol/ServiceBinding.h>
16 #include <Library/NetLib.h>
17 #include <Library/UefiLib.h>
18 #include <Library/UefiDriverEntryPoint.h>
20 extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName
;
21 extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp4ComponentName2
;
22 extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding
;
23 extern EFI_UNICODE_STRING_TABLE
*gMtftp4ControllerNameTable
;
26 Test whether MTFTP driver support this controller.
28 @param This The MTFTP driver binding instance
29 @param Controller The controller to test
30 @param RemainingDevicePath The remaining device path
32 @retval EFI_SUCCESS The controller has UDP service binding protocol
33 installed, MTFTP can support it.
34 @retval Others MTFTP can't support the controller.
39 Mtftp4DriverBindingSupported (
40 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
41 IN EFI_HANDLE Controller
,
42 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
46 Start the MTFTP driver on this controller.
48 MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported
49 controller, which can be used to create/destroy MTFTP children.
51 @param This The MTFTP driver binding protocol.
52 @param Controller The controller to manage.
53 @param RemainingDevicePath Remaining device path.
55 @retval EFI_ALREADY_STARTED The MTFTP service binding protocol has been
56 started on the controller.
57 @retval EFI_SUCCESS The MTFTP service binding is installed on the
63 Mtftp4DriverBindingStart (
64 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
65 IN EFI_HANDLE Controller
,
66 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
70 Stop the MTFTP driver on controller. The controller is a UDP
73 @param This The MTFTP driver binding protocol
74 @param Controller The controller to stop
75 @param NumberOfChildren The number of children
76 @param ChildHandleBuffer The array of the child handle.
78 @retval EFI_SUCCESS The driver is stopped on the controller.
79 @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.
84 Mtftp4DriverBindingStop (
85 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
86 IN EFI_HANDLE Controller
,
87 IN UINTN NumberOfChildren
,
88 IN EFI_HANDLE
*ChildHandleBuffer
92 Create a MTFTP child for the service binding instance, then
93 install the MTFTP protocol to the ChildHandle.
95 @param This The MTFTP service binding instance.
96 @param ChildHandle The Child handle to install the MTFTP protocol.
98 @retval EFI_INVALID_PARAMETER The parameter is invalid.
99 @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for the new child.
100 @retval EFI_SUCCESS The child is successfully create.
105 Mtftp4ServiceBindingCreateChild (
106 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
107 IN EFI_HANDLE
*ChildHandle
111 Destroy one of the service binding's child.
113 @param This The service binding instance
114 @param ChildHandle The child handle to destroy
116 @retval EFI_INVALID_PARAMETER The parameter is invalid.
117 @retval EFI_UNSUPPORTED The child may have already been destroyed.
118 @retval EFI_SUCCESS The child is destroyed and removed from the
124 Mtftp4ServiceBindingDestroyChild (
125 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
126 IN EFI_HANDLE ChildHandle