3 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
8 #ifndef _UDP4_DRIVER_H_
9 #define _UDP4_DRIVER_H_
12 #include <Library/BaseLib.h>
13 #include <Library/NetLib.h>
14 #include <Protocol/DriverBinding.h>
15 #include <Protocol/ServiceBinding.h>
18 Test to see if this driver supports ControllerHandle. This service
19 is called by the EFI boot service ConnectController(). In
20 order to make drivers as small as possible, there are a few calling
21 restrictions for this service. ConnectController() must
22 follow these calling restrictions. If any other agent wishes to call
23 Supported() it must also follow these calling restrictions.
25 @param[in] This Protocol instance pointer.
26 @param[in] ControllerHandle Handle of device to test
27 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
30 @retval EFI_SUCCESS This driver supports this device
31 @retval EFI_ALREADY_STARTED This driver is already running on this device
32 @retval other This driver does not support this device
37 Udp4DriverBindingSupported (
38 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
39 IN EFI_HANDLE ControllerHandle
,
40 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
44 Start this driver on ControllerHandle. This service is called by the
45 EFI boot service ConnectController(). In order to make
46 drivers as small as possible, there are a few calling restrictions for
47 this service. ConnectController() must follow these
48 calling restrictions. If any other agent wishes to call Start() it
49 must also follow these calling restrictions.
51 @param[in] This Protocol instance pointer.
52 @param[in] ControllerHandle Handle of device to bind driver to
53 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
56 @retval EFI_SUCCESS This driver is added to ControllerHandle
57 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
58 @retval other This driver does not support this device
63 Udp4DriverBindingStart (
64 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
65 IN EFI_HANDLE ControllerHandle
,
66 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
70 Stop this driver on ControllerHandle. This service is called by the
71 EFI boot service DisconnectController(). In order to
72 make drivers as small as possible, there are a few calling
73 restrictions for this service. DisconnectController()
74 must follow these calling restrictions. If any other agent wishes
75 to call Stop() it must also follow these calling restrictions.
77 @param[in] This Protocol instance pointer.
78 @param[in] ControllerHandle Handle of device to stop driver on
79 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
80 children is zero stop the entire bus driver.
81 @param[in] ChildHandleBuffer List of Child Handles to Stop.
83 @retval EFI_SUCCESS This driver is removed ControllerHandle
84 @retval other This driver was not removed from this device
89 Udp4DriverBindingStop (
90 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
91 IN EFI_HANDLE ControllerHandle
,
92 IN UINTN NumberOfChildren
,
93 IN EFI_HANDLE
*ChildHandleBuffer
97 Creates a child handle and installs a protocol.
99 The CreateChild() function installs a protocol on ChildHandle.
100 If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
101 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
103 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
104 @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
105 then a new handle is created. If it is a pointer to an existing UEFI handle,
106 then the protocol is added to the existing UEFI handle.
108 @retval EFI_SUCCESS The protocol was added to ChildHandle.
109 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.
110 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
112 @retval other The child handle was not created
117 Udp4ServiceBindingCreateChild (
118 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
119 IN EFI_HANDLE
*ChildHandle
123 Destroys a child handle with a protocol installed on it.
125 The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
126 that was installed by CreateChild() from ChildHandle. If the removed protocol is the
127 last protocol on ChildHandle, then ChildHandle is destroyed.
129 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
130 @param[in] ChildHandle Handle of the child to destroy
132 @retval EFI_SUCCESS The protocol was removed from ChildHandle.
133 @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
134 @retval EFI_INVALID_PARAMETER Child handle is NULL.
135 @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
136 because its services are being used.
137 @retval other The child handle was not destroyed
142 Udp4ServiceBindingDestroyChild (
143 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
144 IN EFI_HANDLE ChildHandle