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