]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Driver.h
1 /** @file
2 Mtftp drivers function header.
3
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>
9
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.
12
13 **/
14
15 #ifndef __EFI_MTFTP4_DRIVER_H__
16 #define __EFI_MTFTP4_DRIVER_H__
17
18 #include <Uefi.h>
19
20 #include <Protocol/ServiceBinding.h>
21
22 #include <Library/NetLib.h>
23 #include <Library/UefiLib.h>
24 #include <Library/UefiDriverEntryPoint.h>
25
26 extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName;
27 extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp4ComponentName2;
28 extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding;
29
30 /**
31 Test whether MTFTP driver support this controller.
32
33 @param This The MTFTP driver binding instance
34 @param Controller The controller to test
35 @param RemainingDevicePath The remaining device path
36
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.
40
41 **/
42 EFI_STATUS
43 EFIAPI
44 Mtftp4DriverBindingSupported (
45 IN EFI_DRIVER_BINDING_PROTOCOL *This,
46 IN EFI_HANDLE Controller,
47 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
48 );
49
50 /**
51 Start the MTFTP driver on this controller.
52
53 MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported
54 controller, which can be used to create/destroy MTFTP children.
55
56 @param This The MTFTP driver binding protocol.
57 @param Controller The controller to manage.
58 @param RemainingDevicePath Remaining device path.
59
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
63 controller.
64
65 **/
66 EFI_STATUS
67 EFIAPI
68 Mtftp4DriverBindingStart (
69 IN EFI_DRIVER_BINDING_PROTOCOL *This,
70 IN EFI_HANDLE Controller,
71 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
72 );
73
74 /**
75 Stop the MTFTP driver on controller. The controller is a UDP
76 child handle.
77
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.
82
83 @retval EFI_SUCCESS The driver is stopped on the controller.
84 @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.
85
86 **/
87 EFI_STATUS
88 EFIAPI
89 Mtftp4DriverBindingStop (
90 IN EFI_DRIVER_BINDING_PROTOCOL *This,
91 IN EFI_HANDLE Controller,
92 IN UINTN NumberOfChildren,
93 IN EFI_HANDLE *ChildHandleBuffer
94 );
95
96 /**
97 Create a MTFTP child for the service binding instance, then
98 install the MTFTP protocol to the ChildHandle.
99
100 @param This The MTFTP service binding instance.
101 @param ChildHandle The Child handle to install the MTFTP protocol.
102
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.
106
107 **/
108 EFI_STATUS
109 EFIAPI
110 Mtftp4ServiceBindingCreateChild (
111 IN EFI_SERVICE_BINDING_PROTOCOL *This,
112 IN EFI_HANDLE *ChildHandle
113 );
114
115 /**
116 Destroy one of the service binding's child.
117
118 @param This The service binding instance
119 @param ChildHandle The child handle to destroy
120
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
124 parent's child list.
125
126 **/
127 EFI_STATUS
128 EFIAPI
129 Mtftp4ServiceBindingDestroyChild (
130 IN EFI_SERVICE_BINDING_PROTOCOL *This,
131 IN EFI_HANDLE ChildHandle
132 );
133
134
135
136 #endif