]>
Commit | Line | Data |
---|---|---|
83cbd279 | 1 | /** @file\r |
dab714aa | 2 | Mtftp drivers function header.\r |
d1102dba LG |
3 | \r |
4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
9d510e61 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
83cbd279 | 6 | \r |
83cbd279 | 7 | **/\r |
8 | \r | |
9 | #ifndef __EFI_MTFTP4_DRIVER_H__\r | |
10 | #define __EFI_MTFTP4_DRIVER_H__\r | |
11 | \r | |
dab714aa | 12 | #include <Uefi.h>\r |
83cbd279 | 13 | \r |
14 | #include <Protocol/ServiceBinding.h>\r | |
15 | \r | |
16 | #include <Library/NetLib.h>\r | |
17 | #include <Library/UefiLib.h>\r | |
dab714aa | 18 | #include <Library/UefiDriverEntryPoint.h>\r |
19 | \r | |
20 | extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName;\r | |
21 | extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp4ComponentName2;\r | |
22 | extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding;\r | |
216f7970 | 23 | extern EFI_UNICODE_STRING_TABLE *gMtftp4ControllerNameTable;\r |
83cbd279 | 24 | \r |
dab714aa | 25 | /**\r |
26 | Test whether MTFTP driver support this controller.\r | |
83cbd279 | 27 | \r |
dab714aa | 28 | @param This The MTFTP driver binding instance\r |
29 | @param Controller The controller to test\r | |
30 | @param RemainingDevicePath The remaining device path\r | |
31 | \r | |
32 | @retval EFI_SUCCESS The controller has UDP service binding protocol\r | |
33 | installed, MTFTP can support it.\r | |
34 | @retval Others MTFTP can't support the controller.\r | |
35 | \r | |
36 | **/\r | |
83cbd279 | 37 | EFI_STATUS\r |
dab714aa | 38 | EFIAPI\r |
83cbd279 | 39 | Mtftp4DriverBindingSupported (\r |
dab714aa | 40 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r |
41 | IN EFI_HANDLE Controller,\r | |
42 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
83cbd279 | 43 | );\r |
44 | \r | |
dab714aa | 45 | /**\r |
d1102dba LG |
46 | Start the MTFTP driver on this controller.\r |
47 | \r | |
dab714aa | 48 | MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported\r |
49 | controller, which can be used to create/destroy MTFTP children.\r | |
50 | \r | |
51 | @param This The MTFTP driver binding protocol.\r | |
52 | @param Controller The controller to manage.\r | |
53 | @param RemainingDevicePath Remaining device path.\r | |
54 | \r | |
55 | @retval EFI_ALREADY_STARTED The MTFTP service binding protocol has been\r | |
56 | started on the controller.\r | |
57 | @retval EFI_SUCCESS The MTFTP service binding is installed on the\r | |
58 | controller.\r | |
59 | \r | |
60 | **/\r | |
83cbd279 | 61 | EFI_STATUS\r |
dab714aa | 62 | EFIAPI\r |
83cbd279 | 63 | Mtftp4DriverBindingStart (\r |
64 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
65 | IN EFI_HANDLE Controller,\r | |
66 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
67 | );\r | |
68 | \r | |
dab714aa | 69 | /**\r |
70 | Stop the MTFTP driver on controller. The controller is a UDP\r | |
71 | child handle.\r | |
72 | \r | |
73 | @param This The MTFTP driver binding protocol\r | |
74 | @param Controller The controller to stop\r | |
75 | @param NumberOfChildren The number of children\r | |
76 | @param ChildHandleBuffer The array of the child handle.\r | |
77 | \r | |
78 | @retval EFI_SUCCESS The driver is stopped on the controller.\r | |
79 | @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.\r | |
80 | \r | |
81 | **/\r | |
83cbd279 | 82 | EFI_STATUS\r |
dab714aa | 83 | EFIAPI\r |
83cbd279 | 84 | Mtftp4DriverBindingStop (\r |
dab714aa | 85 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r |
86 | IN EFI_HANDLE Controller,\r | |
87 | IN UINTN NumberOfChildren,\r | |
88 | IN EFI_HANDLE *ChildHandleBuffer\r | |
83cbd279 | 89 | );\r |
90 | \r | |
dab714aa | 91 | /**\r |
92 | Create a MTFTP child for the service binding instance, then\r | |
93 | install the MTFTP protocol to the ChildHandle.\r | |
94 | \r | |
95 | @param This The MTFTP service binding instance.\r | |
96 | @param ChildHandle The Child handle to install the MTFTP protocol.\r | |
97 | \r | |
98 | @retval EFI_INVALID_PARAMETER The parameter is invalid.\r | |
99 | @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for the new child.\r | |
100 | @retval EFI_SUCCESS The child is successfully create.\r | |
101 | \r | |
102 | **/\r | |
83cbd279 | 103 | EFI_STATUS\r |
dab714aa | 104 | EFIAPI\r |
83cbd279 | 105 | Mtftp4ServiceBindingCreateChild (\r |
dab714aa | 106 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r |
107 | IN EFI_HANDLE *ChildHandle\r | |
83cbd279 | 108 | );\r |
109 | \r | |
dab714aa | 110 | /**\r |
75dce340 | 111 | Destroy one of the service binding's child.\r |
dab714aa | 112 | \r |
113 | @param This The service binding instance\r | |
75dce340 | 114 | @param ChildHandle The child handle to destroy\r |
dab714aa | 115 | \r |
116 | @retval EFI_INVALID_PARAMETER The parameter is invaid.\r | |
75dce340 | 117 | @retval EFI_UNSUPPORTED The child may have already been destroyed.\r |
118 | @retval EFI_SUCCESS The child is destroyed and removed from the\r | |
dab714aa | 119 | parent's child list.\r |
120 | \r | |
121 | **/\r | |
83cbd279 | 122 | EFI_STATUS\r |
dab714aa | 123 | EFIAPI\r |
83cbd279 | 124 | Mtftp4ServiceBindingDestroyChild (\r |
125 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
126 | IN EFI_HANDLE ChildHandle\r | |
127 | );\r | |
128 | \r | |
dab714aa | 129 | \r |
83cbd279 | 130 | \r |
131 | #endif\r |