]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r | |
4 | This program and the accompanying materials\r | |
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 | |
12 | **/\r | |
13 | \r | |
14 | #ifndef _UDP4_DRIVER_H_\r | |
15 | #define _UDP4_DRIVER_H_\r | |
16 | \r | |
17 | #include <Uefi.h>\r | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
82 | \r | |
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 | |
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 | |
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 | |
102 | /**\r | |
103 | Creates a child handle and installs a protocol.\r | |
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 | |
107 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r | |
108 | \r | |
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 | |
111 | then a new handle is created. If it is a pointer to an existing UEFI handle, \r | |
112 | then the protocol is added to the existing UEFI handle.\r | |
113 | \r | |
114 | @retval EFI_SUCCES The protocol was added to ChildHandle.\r | |
115 | @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r | |
116 | @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r | |
117 | the child\r | |
118 | @retval other The child handle was not created\r | |
119 | \r | |
120 | **/\r | |
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 | |
128 | /**\r | |
129 | Destroys a child handle with a protocol installed on it.\r | |
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 | |
133 | last protocol on ChildHandle, then ChildHandle is destroyed.\r | |
134 | \r | |
135 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
136 | @param[in] ChildHandle Handle of the child to destroy\r | |
137 | \r | |
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 | |
140 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r | |
141 | @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r | |
142 | because its services are being used.\r | |
143 | @retval other The child handle was not destroyed\r | |
144 | \r | |
145 | **/\r | |
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 |