]>
Commit | Line | Data |
---|---|---|
83cbd279 | 1 | /** @file\r |
2 | \r | |
d1102dba | 3 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
83cbd279 | 5 | \r |
83cbd279 | 6 | **/\r |
7 | \r | |
8 | #ifndef _UDP4_DRIVER_H_\r | |
9 | #define _UDP4_DRIVER_H_\r | |
10 | \r | |
2517435c | 11 | #include <Uefi.h>\r |
83cbd279 | 12 | #include <Library/BaseLib.h>\r |
13 | #include <Library/NetLib.h>\r | |
14 | #include <Protocol/DriverBinding.h>\r | |
15 | #include <Protocol/ServiceBinding.h>\r | |
16 | \r | |
ce904bae | 17 | /**\r |
18 | Test to see if this driver supports ControllerHandle. This service\r | |
19 | is called by the EFI boot service ConnectController(). In\r | |
20 | order to make drivers as small as possible, there are a few calling\r | |
21 | restrictions for this service. ConnectController() must\r | |
22 | follow these calling restrictions. If any other agent wishes to call\r | |
23 | Supported() it must also follow these calling restrictions.\r | |
24 | \r | |
3e8c18da | 25 | @param[in] This Protocol instance pointer.\r |
26 | @param[in] ControllerHandle Handle of device to test\r | |
27 | @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r | |
28 | device to start.\r | |
ce904bae | 29 | \r |
30 | @retval EFI_SUCCESS This driver supports this device\r | |
31 | @retval EFI_ALREADY_STARTED This driver is already running on this device\r | |
32 | @retval other This driver does not support this device\r | |
33 | \r | |
34 | **/\r | |
83cbd279 | 35 | EFI_STATUS\r |
36 | EFIAPI\r | |
37 | Udp4DriverBindingSupported (\r | |
38 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
39 | IN EFI_HANDLE ControllerHandle,\r | |
40 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
41 | );\r | |
42 | \r | |
ce904bae | 43 | /**\r |
44 | Start this driver on ControllerHandle. This service is called by the\r | |
45 | EFI boot service ConnectController(). In order to make\r | |
46 | drivers as small as possible, there are a few calling restrictions for\r | |
47 | this service. ConnectController() must follow these\r | |
48 | calling restrictions. If any other agent wishes to call Start() it\r | |
49 | must also follow these calling restrictions.\r | |
50 | \r | |
3e8c18da | 51 | @param[in] This Protocol instance pointer.\r |
52 | @param[in] ControllerHandle Handle of device to bind driver to\r | |
53 | @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r | |
54 | device to start.\r | |
ce904bae | 55 | \r |
56 | @retval EFI_SUCCESS This driver is added to ControllerHandle\r | |
57 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r | |
58 | @retval other This driver does not support this device\r | |
59 | \r | |
60 | **/\r | |
83cbd279 | 61 | EFI_STATUS\r |
62 | EFIAPI\r | |
63 | Udp4DriverBindingStart (\r | |
64 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
65 | IN EFI_HANDLE ControllerHandle,\r | |
66 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
67 | );\r | |
68 | \r | |
ce904bae | 69 | /**\r |
70 | Stop this driver on ControllerHandle. This service is called by the\r | |
71 | EFI boot service DisconnectController(). In order to\r | |
72 | make drivers as small as possible, there are a few calling\r | |
73 | restrictions for this service. DisconnectController()\r | |
74 | must follow these calling restrictions. If any other agent wishes\r | |
75 | to call Stop() it must also follow these calling restrictions.\r | |
d1102dba | 76 | \r |
3e8c18da | 77 | @param[in] This Protocol instance pointer.\r |
78 | @param[in] ControllerHandle Handle of device to stop driver on\r | |
79 | @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r | |
80 | children is zero stop the entire bus driver.\r | |
81 | @param[in] ChildHandleBuffer List of Child Handles to Stop.\r | |
ce904bae | 82 | \r |
83 | @retval EFI_SUCCESS This driver is removed ControllerHandle\r | |
84 | @retval other This driver was not removed from this device\r | |
85 | \r | |
86 | **/\r | |
83cbd279 | 87 | EFI_STATUS\r |
88 | EFIAPI\r | |
89 | Udp4DriverBindingStop (\r | |
90 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
91 | IN EFI_HANDLE ControllerHandle,\r | |
92 | IN UINTN NumberOfChildren,\r | |
93 | IN EFI_HANDLE *ChildHandleBuffer\r | |
94 | );\r | |
95 | \r | |
ce904bae | 96 | /**\r |
3e8c18da | 97 | Creates a child handle and installs a protocol.\r |
d1102dba LG |
98 | \r |
99 | The CreateChild() function installs a protocol on ChildHandle.\r | |
100 | If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r | |
3e8c18da | 101 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r |
ce904bae | 102 | \r |
47c75f64 | 103 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r |
104 | @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r | |
d1102dba | 105 | then a new handle is created. If it is a pointer to an existing UEFI handle,\r |
47c75f64 | 106 | then the protocol is added to the existing UEFI handle.\r |
ce904bae | 107 | \r |
f7c4d224 | 108 | @retval EFI_SUCCESS The protocol was added to ChildHandle.\r |
ce904bae | 109 | @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r |
2048c585 | 110 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r |
ce904bae | 111 | the child\r |
112 | @retval other The child handle was not created\r | |
113 | \r | |
114 | **/\r | |
83cbd279 | 115 | EFI_STATUS\r |
116 | EFIAPI\r | |
117 | Udp4ServiceBindingCreateChild (\r | |
118 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
119 | IN EFI_HANDLE *ChildHandle\r | |
120 | );\r | |
121 | \r | |
ce904bae | 122 | /**\r |
3e8c18da | 123 | Destroys a child handle with a protocol installed on it.\r |
d1102dba LG |
124 | \r |
125 | The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r | |
126 | that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r | |
3e8c18da | 127 | last protocol on ChildHandle, then ChildHandle is destroyed.\r |
ce904bae | 128 | \r |
47c75f64 | 129 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r |
130 | @param[in] ChildHandle Handle of the child to destroy\r | |
ce904bae | 131 | \r |
f7c4d224 | 132 | @retval EFI_SUCCESS The protocol was removed from ChildHandle.\r |
3e8c18da | 133 | @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r |
284ee2e8 | 134 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r |
3e8c18da | 135 | @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r |
136 | because its services are being used.\r | |
ce904bae | 137 | @retval other The child handle was not destroyed\r |
138 | \r | |
139 | **/\r | |
83cbd279 | 140 | EFI_STATUS\r |
141 | EFIAPI\r | |
142 | Udp4ServiceBindingDestroyChild (\r | |
143 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
144 | IN EFI_HANDLE ChildHandle\r | |
145 | );\r | |
146 | \r | |
147 | #endif\r |