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
;
29 extern EFI_UNICODE_STRING_TABLE
*gMtftp4ControllerNameTable
;
32 Test whether MTFTP driver support this controller.
34 @param This The MTFTP driver binding instance
35 @param Controller The controller to test
36 @param RemainingDevicePath The remaining device path
38 @retval EFI_SUCCESS The controller has UDP service binding protocol
39 installed, MTFTP can support it.
40 @retval Others MTFTP can't support the controller.
45 Mtftp4DriverBindingSupported (
46 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
47 IN EFI_HANDLE Controller
,
48 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
52 Start the MTFTP driver on this controller.
54 MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported
55 controller, which can be used to create/destroy MTFTP children.
57 @param This The MTFTP driver binding protocol.
58 @param Controller The controller to manage.
59 @param RemainingDevicePath Remaining device path.
61 @retval EFI_ALREADY_STARTED The MTFTP service binding protocol has been
62 started on the controller.
63 @retval EFI_SUCCESS The MTFTP service binding is installed on the
69 Mtftp4DriverBindingStart (
70 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
71 IN EFI_HANDLE Controller
,
72 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
76 Stop the MTFTP driver on controller. The controller is a UDP
79 @param This The MTFTP driver binding protocol
80 @param Controller The controller to stop
81 @param NumberOfChildren The number of children
82 @param ChildHandleBuffer The array of the child handle.
84 @retval EFI_SUCCESS The driver is stopped on the controller.
85 @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.
90 Mtftp4DriverBindingStop (
91 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
92 IN EFI_HANDLE Controller
,
93 IN UINTN NumberOfChildren
,
94 IN EFI_HANDLE
*ChildHandleBuffer
98 Create a MTFTP child for the service binding instance, then
99 install the MTFTP protocol to the ChildHandle.
101 @param This The MTFTP service binding instance.
102 @param ChildHandle The Child handle to install the MTFTP protocol.
104 @retval EFI_INVALID_PARAMETER The parameter is invalid.
105 @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for the new child.
106 @retval EFI_SUCCESS The child is successfully create.
111 Mtftp4ServiceBindingCreateChild (
112 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
113 IN EFI_HANDLE
*ChildHandle
117 Destroy one of the service binding's child.
119 @param This The service binding instance
120 @param ChildHandle The child handle to destroy
122 @retval EFI_INVALID_PARAMETER The parameter is invaid.
123 @retval EFI_UNSUPPORTED The child may have already been destroyed.
124 @retval EFI_SUCCESS The child is destroyed and removed from the
130 Mtftp4ServiceBindingDestroyChild (
131 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
132 IN EFI_HANDLE ChildHandle