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