TianoCore EDK2 master
|
#include "Mtftp4Impl.h"
Go to the source code of this file.
Variables | |
EFI_DRIVER_BINDING_PROTOCOL | gMtftp4DriverBinding |
EFI_SERVICE_BINDING_PROTOCOL | gMtftp4ServiceBindingTemplete |
Implementation of Mtftp drivers.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp4Driver.c.
VOID Mtftp4CleanService | ( | IN MTFTP4_SERVICE * | MtftpSb | ) |
Release all the resource used the MTFTP service binding instance.
MtftpSb | The MTFTP service binding instance. |
Definition at line 235 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4ConfigNullUdp | ( | IN UDP_IO * | UdpIo, |
IN VOID * | Context | ||
) |
Config a NULL UDP that is used to keep the connection between UDP and MTFTP.
Just leave the Udp child unconfigured. When UDP is unloaded, MTFTP will be informed with DriverBinding Stop.
UdpIo | The UDP_IO to configure |
Context | The opaque parameter to the callback |
EFI_SUCCESS | It always return EFI_SUCCESS directly. |
Definition at line 109 of file Mtftp4Driver.c.
EFI_STATUS Mtftp4CreateService | ( | IN EFI_HANDLE | Controller, |
IN EFI_HANDLE | Image, | ||
OUT MTFTP4_SERVICE ** | Service | ||
) |
Create then initialize a MTFTP service binding instance.
Controller | The controller to install the MTFTP service binding on |
Image | The driver binding image of the MTFTP driver |
Service | The variable to receive the created service binding instance. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource to create the instance |
EFI_DEVICE_ERROR | Failed to create a NULL UDP port to keep connection with UDP. |
EFI_SUCCESS | The service instance is created for the controller. |
Definition at line 134 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4DestroyChildEntryInHandleBuffer | ( | IN LIST_ENTRY * | Entry, |
IN VOID * | Context | ||
) |
Callback function which provided by user to remove one node in NetDestroyLinkList process.
[in] | Entry | The entry to be removed. |
[in] | Context | Pointer to the callback context corresponds to the Context in NetDestroyLinkList. |
EFI_SUCCESS | The entry has been removed successfully. |
Others | Fail to remove the entry. |
Definition at line 343 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4DriverBindingStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Start the MTFTP driver on this controller.
MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported controller, which can be used to create/destroy MTFTP children.
This | The MTFTP driver binding protocol. |
Controller | The controller to manage. |
RemainingDevicePath | Remaining device path. |
EFI_ALREADY_STARTED | The MTFTP service binding protocol has been started on the controller. |
EFI_SUCCESS | The MTFTP service binding is installed on the controller. |
Definition at line 263 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4DriverBindingStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN UINTN | NumberOfChildren, | ||
IN EFI_HANDLE * | ChildHandleBuffer | ||
) |
Stop the MTFTP driver on controller. The controller is a UDP child handle.
This | The MTFTP driver binding protocol |
Controller | The controller to stop |
NumberOfChildren | The number of children |
ChildHandleBuffer | The array of the child handle. |
EFI_SUCCESS | The driver is stopped on the controller. |
EFI_DEVICE_ERROR | Failed to stop the driver on the controller. |
Definition at line 384 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4DriverBindingSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Test whether MTFTP driver support this controller.
This | The MTFTP driver binding instance |
Controller | The controller to test |
RemainingDevicePath | The remaining device path |
EFI_SUCCESS | The controller has UDP service binding protocol installed, MTFTP can support it. |
EFI_ALREADY_STARTED | The device specified by ControllerHandle and RemainingDevicePath is already being managed by the driver specified by This. |
EFI_ACCESS_DENIED | The device specified by ControllerHandle and RemainingDevicePath is already being managed by a different driver or an application that requires exclusive access. |
EFI_UNSUPPORTED | The device specified by ControllerHandle and RemainingDevicePath is not supported by the driver specified by This. |
Definition at line 75 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4DriverEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The driver entry point which installs multiple protocols to the ImageHandle.
ImageHandle | The MTFTP's image handle. |
SystemTable | The system table. |
EFI_SUCCESS | The handles are successfully installed on the image. |
others | some EFI_ERROR occurred. |
Definition at line 37 of file Mtftp4Driver.c.
VOID Mtftp4InitProtocol | ( | IN MTFTP4_SERVICE * | MtftpSb, |
OUT MTFTP4_PROTOCOL * | Instance | ||
) |
Initialize a MTFTP protocol instance which is the child of MtftpSb.
MtftpSb | The MTFTP service binding protocol. |
Instance | The MTFTP instance to initialize. |
Definition at line 469 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4ServiceBindingCreateChild | ( | IN EFI_SERVICE_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE * | ChildHandle | ||
) |
Create a MTFTP child for the service binding instance, then install the MTFTP protocol to the ChildHandle.
This | The MTFTP service binding instance. |
ChildHandle | The Child handle to install the MTFTP protocol. |
EFI_INVALID_PARAMETER | The parameter is invalid. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource for the new child. |
EFI_SUCCESS | The child is successfully create. |
Definition at line 499 of file Mtftp4Driver.c.
EFI_STATUS EFIAPI Mtftp4ServiceBindingDestroyChild | ( | IN EFI_SERVICE_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ChildHandle | ||
) |
Destroy one of the service binding's child.
This | The service binding instance |
ChildHandle | The child handle to destroy |
EFI_INVALID_PARAMETER | The parameter is invalid. |
EFI_UNSUPPORTED | The child may have already been destroyed. |
EFI_SUCCESS | The child is destroyed and removed from the parent's child list. |
Definition at line 636 of file Mtftp4Driver.c.
EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding |
Definition at line 11 of file Mtftp4Driver.c.
EFI_SERVICE_BINDING_PROTOCOL gMtftp4ServiceBindingTemplete |
Definition at line 20 of file Mtftp4Driver.c.