2 Mtftp drivers function header.
4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php<BR>
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __EFI_MTFTP4_DRIVER_H__
16 #define __EFI_MTFTP4_DRIVER_H__
20 #include <Protocol/ServiceBinding.h>
22 #include <Library/NetLib.h>
23 #include <Library/UefiLib.h>
24 #include <Library/UefiDriverEntryPoint.h>
26 extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName
;
27 extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp4ComponentName2
;
28 extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding
;
31 Test whether MTFTP driver support this controller.
33 @param This The MTFTP driver binding instance
34 @param Controller The controller to test
35 @param RemainingDevicePath The remaining device path
37 @retval EFI_SUCCESS The controller has UDP service binding protocol
38 installed, MTFTP can support it.
39 @retval Others MTFTP can't support the controller.
44 Mtftp4DriverBindingSupported (
45 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
46 IN EFI_HANDLE Controller
,
47 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
51 Start the MTFTP driver on this controller.
53 MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported
54 controller, which can be used to create/destroy MTFTP children.
56 @param This The MTFTP driver binding protocol.
57 @param Controller The controller to manage.
58 @param RemainingDevicePath Remaining device path.
60 @retval EFI_ALREADY_STARTED The MTFTP service binding protocol has been
61 started on the controller.
62 @retval EFI_SUCCESS The MTFTP service binding is installed on the
68 Mtftp4DriverBindingStart (
69 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
70 IN EFI_HANDLE Controller
,
71 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
75 Stop the MTFTP driver on controller. The controller is a UDP
78 @param This The MTFTP driver binding protocol
79 @param Controller The controller to stop
80 @param NumberOfChildren The number of children
81 @param ChildHandleBuffer The array of the child handle.
83 @retval EFI_SUCCESS The driver is stopped on the controller.
84 @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.
89 Mtftp4DriverBindingStop (
90 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
91 IN EFI_HANDLE Controller
,
92 IN UINTN NumberOfChildren
,
93 IN EFI_HANDLE
*ChildHandleBuffer
97 Create a MTFTP child for the service binding instance, then
98 install the MTFTP protocol to the ChildHandle.
100 @param This The MTFTP service binding instance.
101 @param ChildHandle The Child handle to install the MTFTP protocol.
103 @retval EFI_INVALID_PARAMETER The parameter is invalid.
104 @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for the new child.
105 @retval EFI_SUCCESS The child is successfully create.
110 Mtftp4ServiceBindingCreateChild (
111 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
112 IN EFI_HANDLE
*ChildHandle
116 Destroy one of the service binding's child.
118 @param This The service binding instance
119 @param ChildHandle The child handle to destroy
121 @retval EFI_INVALID_PARAMETER The parameter is invaid.
122 @retval EFI_UNSUPPORTED The child may have already been destroyed.
123 @retval EFI_SUCCESS The child is destroyed and removed from the
129 Mtftp4ServiceBindingDestroyChild (
130 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
131 IN EFI_HANDLE ChildHandle