1 | /** @file
|
---|
2 |
|
---|
3 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
4 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
5 |
|
---|
6 | **/
|
---|
7 |
|
---|
8 | #ifndef _UDP4_DRIVER_H_
|
---|
9 | #define _UDP4_DRIVER_H_
|
---|
10 |
|
---|
11 | #include <Uefi.h>
|
---|
12 | #include <Library/BaseLib.h>
|
---|
13 | #include <Library/NetLib.h>
|
---|
14 | #include <Protocol/DriverBinding.h>
|
---|
15 | #include <Protocol/ServiceBinding.h>
|
---|
16 |
|
---|
17 | /**
|
---|
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.
|
---|
24 |
|
---|
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
|
---|
28 | device to start.
|
---|
29 |
|
---|
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
|
---|
33 |
|
---|
34 | **/
|
---|
35 | EFI_STATUS
|
---|
36 | EFIAPI
|
---|
37 | Udp4DriverBindingSupported (
|
---|
38 | IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
---|
39 | IN EFI_HANDLE ControllerHandle,
|
---|
40 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
---|
41 | );
|
---|
42 |
|
---|
43 | /**
|
---|
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.
|
---|
50 |
|
---|
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
|
---|
54 | device to start.
|
---|
55 |
|
---|
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
|
---|
59 |
|
---|
60 | **/
|
---|
61 | EFI_STATUS
|
---|
62 | EFIAPI
|
---|
63 | Udp4DriverBindingStart (
|
---|
64 | IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
---|
65 | IN EFI_HANDLE ControllerHandle,
|
---|
66 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
---|
67 | );
|
---|
68 |
|
---|
69 | /**
|
---|
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.
|
---|
76 |
|
---|
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.
|
---|
82 |
|
---|
83 | @retval EFI_SUCCESS This driver is removed ControllerHandle
|
---|
84 | @retval other This driver was not removed from this device
|
---|
85 |
|
---|
86 | **/
|
---|
87 | EFI_STATUS
|
---|
88 | EFIAPI
|
---|
89 | Udp4DriverBindingStop (
|
---|
90 | IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
---|
91 | IN EFI_HANDLE ControllerHandle,
|
---|
92 | IN UINTN NumberOfChildren,
|
---|
93 | IN EFI_HANDLE *ChildHandleBuffer
|
---|
94 | );
|
---|
95 |
|
---|
96 | /**
|
---|
97 | Creates a child handle and installs a protocol.
|
---|
98 |
|
---|
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.
|
---|
102 |
|
---|
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.
|
---|
107 |
|
---|
108 | @retval EFI_SUCCES 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
|
---|
111 | the child
|
---|
112 | @retval other The child handle was not created
|
---|
113 |
|
---|
114 | **/
|
---|
115 | EFI_STATUS
|
---|
116 | EFIAPI
|
---|
117 | Udp4ServiceBindingCreateChild (
|
---|
118 | IN EFI_SERVICE_BINDING_PROTOCOL *This,
|
---|
119 | IN EFI_HANDLE *ChildHandle
|
---|
120 | );
|
---|
121 |
|
---|
122 | /**
|
---|
123 | Destroys a child handle with a protocol installed on it.
|
---|
124 |
|
---|
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.
|
---|
128 |
|
---|
129 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
---|
130 | @param[in] ChildHandle Handle of the child to destroy
|
---|
131 |
|
---|
132 | @retval EFI_SUCCES 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
|
---|
138 |
|
---|
139 | **/
|
---|
140 | EFI_STATUS
|
---|
141 | EFIAPI
|
---|
142 | Udp4ServiceBindingDestroyChild (
|
---|
143 | IN EFI_SERVICE_BINDING_PROTOCOL *This,
|
---|
144 | IN EFI_HANDLE ChildHandle
|
---|
145 | );
|
---|
146 |
|
---|
147 | #endif
|
---|
148 |
|
---|