]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
5 | \r | |
6 | **/\r | |
7 | \r | |
8 | #ifndef _UDP4_DRIVER_H_\r | |
9 | #define _UDP4_DRIVER_H_\r | |
10 | \r | |
11 | #include <Uefi.h>\r | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
76 | \r | |
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 | |
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 | |
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 | |
96 | /**\r | |
97 | Creates a child handle and installs a protocol.\r | |
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 | |
101 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r | |
102 | \r | |
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 | |
105 | then a new handle is created. If it is a pointer to an existing UEFI handle,\r | |
106 | then the protocol is added to the existing UEFI handle.\r | |
107 | \r | |
108 | @retval EFI_SUCCESS The protocol was added to ChildHandle.\r | |
109 | @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r | |
110 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r | |
111 | the child\r | |
112 | @retval other The child handle was not created\r | |
113 | \r | |
114 | **/\r | |
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 | |
122 | /**\r | |
123 | Destroys a child handle with a protocol installed on it.\r | |
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 | |
127 | last protocol on ChildHandle, then ChildHandle is destroyed.\r | |
128 | \r | |
129 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
130 | @param[in] ChildHandle Handle of the child to destroy\r | |
131 | \r | |
132 | @retval EFI_SUCCESS The protocol was removed from ChildHandle.\r | |
133 | @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r | |
134 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r | |
135 | @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r | |
136 | because its services are being used.\r | |
137 | @retval other The child handle was not destroyed\r | |
138 | \r | |
139 | **/\r | |
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 | |
148 | \r |