]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
4ca9b6c4 | 2 | UDP4 Service Binding Protocol as defined in UEFI specification.\r |
842f5579 | 3 | \r |
9095d37b LG |
4 | The EFI UDPv4 Protocol provides simple packet-oriented services\r |
5 | to transmit and receive UDP packets.\r | |
4ca9b6c4 | 6 | \r |
9095d37b | 7 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 8 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
9095d37b LG |
9 | \r |
10 | @par Revision Reference:\r | |
11 | This Protocol is introduced in UEFI Specification 2.0.\r | |
d1f95000 | 12 | \r |
d1f95000 | 13 | **/\r |
14 | \r | |
15 | #ifndef __EFI_UDP4_PROTOCOL_H__\r | |
16 | #define __EFI_UDP4_PROTOCOL_H__\r | |
17 | \r | |
18 | #include <Protocol/Ip4.h>\r | |
19 | //\r | |
20 | //GUID definitions\r | |
21 | //\r | |
22 | #define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \\r | |
23 | { \\r | |
24 | 0x83f01464, 0x99bd, 0x45e5, {0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6 } \\r | |
25 | }\r | |
26 | \r | |
27 | #define EFI_UDP4_PROTOCOL_GUID \\r | |
28 | { \\r | |
29 | 0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } \\r | |
30 | }\r | |
31 | \r | |
9095d37b LG |
32 | typedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL;\r |
33 | \r | |
d551cc64 FS |
34 | ///\r |
35 | /// EFI_UDP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.\r | |
36 | /// The definition in here is only present to provide backwards compatability.\r | |
37 | ///\r | |
d1f95000 | 38 | typedef struct {\r |
39 | EFI_HANDLE InstanceHandle;\r | |
40 | EFI_IPv4_ADDRESS LocalAddress;\r | |
41 | UINT16 LocalPort;\r | |
42 | EFI_IPv4_ADDRESS RemoteAddress;\r | |
43 | UINT16 RemotePort;\r | |
9095d37b | 44 | } EFI_UDP4_SERVICE_POINT;\r |
d1f95000 | 45 | \r |
d551cc64 FS |
46 | ///\r |
47 | /// EFI_UDP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r | |
48 | /// The definition in here is only present to provide backwards compatability.\r | |
49 | ///\r | |
d1f95000 | 50 | typedef struct {\r |
51 | EFI_HANDLE DriverHandle;\r | |
52 | UINT32 ServiceCount;\r | |
53 | EFI_UDP4_SERVICE_POINT Services[1];\r | |
54 | } EFI_UDP4_VARIABLE_DATA;\r | |
55 | \r | |
d1f95000 | 56 | typedef struct {\r |
57 | UINT32 FragmentLength;\r | |
58 | VOID *FragmentBuffer;\r | |
59 | } EFI_UDP4_FRAGMENT_DATA;\r | |
60 | \r | |
61 | typedef struct {\r | |
62 | EFI_IPv4_ADDRESS SourceAddress;\r | |
63 | UINT16 SourcePort;\r | |
64 | EFI_IPv4_ADDRESS DestinationAddress;\r | |
65 | UINT16 DestinationPort;\r | |
66 | } EFI_UDP4_SESSION_DATA;\r | |
67 | typedef struct {\r | |
68 | //\r | |
69 | // Receiving Filters\r | |
70 | //\r | |
71 | BOOLEAN AcceptBroadcast;\r | |
72 | BOOLEAN AcceptPromiscuous;\r | |
73 | BOOLEAN AcceptAnyPort;\r | |
74 | BOOLEAN AllowDuplicatePort;\r | |
75 | //\r | |
76 | // I/O parameters\r | |
77 | //\r | |
78 | UINT8 TypeOfService;\r | |
79 | UINT8 TimeToLive;\r | |
80 | BOOLEAN DoNotFragment;\r | |
81 | UINT32 ReceiveTimeout;\r | |
82 | UINT32 TransmitTimeout;\r | |
83 | //\r | |
84 | // Access Point\r | |
85 | //\r | |
86 | BOOLEAN UseDefaultAddress;\r | |
87 | EFI_IPv4_ADDRESS StationAddress;\r | |
88 | EFI_IPv4_ADDRESS SubnetMask;\r | |
89 | UINT16 StationPort;\r | |
90 | EFI_IPv4_ADDRESS RemoteAddress;\r | |
91 | UINT16 RemotePort;\r | |
92 | } EFI_UDP4_CONFIG_DATA;\r | |
93 | \r | |
94 | typedef struct {\r | |
95 | EFI_UDP4_SESSION_DATA *UdpSessionData; //OPTIONAL\r | |
96 | EFI_IPv4_ADDRESS *GatewayAddress; //OPTIONAL\r | |
97 | UINT32 DataLength;\r | |
9095d37b | 98 | UINT32 FragmentCount;\r |
d1f95000 | 99 | EFI_UDP4_FRAGMENT_DATA FragmentTable[1];\r |
100 | } EFI_UDP4_TRANSMIT_DATA;\r | |
101 | \r | |
102 | typedef struct {\r | |
103 | EFI_TIME TimeStamp;\r | |
104 | EFI_EVENT RecycleSignal;\r | |
105 | EFI_UDP4_SESSION_DATA UdpSession;\r | |
106 | UINT32 DataLength;\r | |
107 | UINT32 FragmentCount;\r | |
108 | EFI_UDP4_FRAGMENT_DATA FragmentTable[1];\r | |
109 | } EFI_UDP4_RECEIVE_DATA;\r | |
110 | \r | |
111 | \r | |
112 | typedef struct {\r | |
113 | EFI_EVENT Event;\r | |
114 | EFI_STATUS Status;\r | |
115 | union {\r | |
116 | EFI_UDP4_RECEIVE_DATA *RxData;\r | |
117 | EFI_UDP4_TRANSMIT_DATA *TxData;\r | |
118 | } Packet;\r | |
119 | } EFI_UDP4_COMPLETION_TOKEN;\r | |
120 | \r | |
121 | /**\r | |
122 | Reads the current operational settings.\r | |
123 | \r | |
30c99a72 | 124 | The GetModeData() function copies the current operational settings of this EFI\r |
125 | UDPv4 Protocol instance into user-supplied buffers. This function is used\r | |
126 | optionally to retrieve the operational mode data of underlying networks or\r | |
127 | drivers.\r | |
128 | \r | |
af2dc6a7 | 129 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
130 | @param Udp4ConfigData The pointer to the buffer to receive the current configuration data.\r | |
131 | @param Ip4ModeData The pointer to the EFI IPv4 Protocol mode data structure.\r | |
132 | @param MnpConfigData The pointer to the managed network configuration data structure.\r | |
133 | @param SnpModeData The pointer to the simple network mode data structure.\r | |
d1f95000 | 134 | \r |
135 | @retval EFI_SUCCESS The mode data was read.\r | |
136 | @retval EFI_NOT_STARTED When Udp4ConfigData is queried, no configuration data is\r | |
137 | available because this instance has not been started.\r | |
138 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
139 | \r | |
140 | **/\r | |
141 | typedef\r | |
142 | EFI_STATUS\r | |
8b13229b | 143 | (EFIAPI *EFI_UDP4_GET_MODE_DATA)(\r |
d1f95000 | 144 | IN EFI_UDP4_PROTOCOL *This,\r |
145 | OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL,\r | |
146 | OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,\r | |
147 | OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,\r | |
148 | OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL\r | |
9095d37b LG |
149 | );\r |
150 | \r | |
d1f95000 | 151 | \r |
152 | /**\r | |
153 | Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4\r | |
154 | Protocol.\r | |
9095d37b | 155 | \r |
30c99a72 | 156 | The Configure() function is used to do the following:\r |
157 | * Initialize and start this instance of the EFI UDPv4 Protocol.\r | |
158 | * Change the filtering rules and operational parameters.\r | |
159 | * Reset this instance of the EFI UDPv4 Protocol.\r | |
160 | Until these parameters are initialized, no network traffic can be sent or\r | |
161 | received by this instance. This instance can be also reset by calling Configure()\r | |
162 | with UdpConfigData set to NULL. Once reset, the receiving queue and transmitting\r | |
163 | queue are flushed and no traffic is allowed through this instance.\r | |
164 | With different parameters in UdpConfigData, Configure() can be used to bind\r | |
165 | this instance to specified port.\r | |
d1f95000 | 166 | \r |
af2dc6a7 | 167 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
168 | @param Udp4ConfigData The pointer to the buffer to receive the current configuration data.\r | |
d1f95000 | 169 | \r |
170 | @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.\r | |
171 | @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r | |
172 | RARP, etc.) is not finished yet.\r | |
a89fa50c | 173 | @retval EFI_INVALID_PARAMETER This is NULL.\r |
174 | @retval EFI_INVALID_PARAMETER UdpConfigData.StationAddress is not a valid unicast IPv4 address.\r | |
852d8911 | 175 | @retval EFI_INVALID_PARAMETER UdpConfigData.SubnetMask is not a valid IPv4 address mask. The subnet\r |
176 | mask must be contiguous.\r | |
177 | @retval EFI_INVALID_PARAMETER UdpConfigData.RemoteAddress is not a valid unicast IPv4 address if it\r | |
178 | is not zero.\r | |
d1f95000 | 179 | @retval EFI_ALREADY_STARTED The EFI UDPv4 Protocol instance is already started/configured\r |
180 | and must be stopped/reset before it can be reconfigured.\r | |
181 | @retval EFI_ACCESS_DENIED UdpConfigData. AllowDuplicatePort is FALSE\r | |
182 | and UdpConfigData.StationPort is already used by\r | |
183 | other instance.\r | |
184 | @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this\r | |
185 | EFI UDPv4 Protocol instance.\r | |
186 | @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance\r | |
9095d37b | 187 | was not opened.\r |
d1f95000 | 188 | \r |
189 | **/\r | |
190 | typedef\r | |
191 | EFI_STATUS\r | |
8b13229b | 192 | (EFIAPI *EFI_UDP4_CONFIGURE)(\r |
d1f95000 | 193 | IN EFI_UDP4_PROTOCOL *This,\r |
194 | IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL\r | |
9095d37b | 195 | );\r |
d1f95000 | 196 | \r |
197 | /**\r | |
198 | Joins and leaves multicast groups.\r | |
9095d37b | 199 | \r |
30c99a72 | 200 | The Groups() function is used to enable and disable the multicast group\r |
201 | filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all\r | |
202 | currently joined groups are left.\r | |
d1f95000 | 203 | \r |
af2dc6a7 | 204 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
d1f95000 | 205 | @param JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one\r |
206 | or all multicast groups.\r | |
af2dc6a7 | 207 | @param MulticastAddress The pointer to multicast group address to join or leave.\r |
d1f95000 | 208 | \r |
209 | @retval EFI_SUCCESS The operation completed successfully.\r | |
210 | @retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.\r | |
211 | @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r | |
212 | RARP, etc.) is not finished yet.\r | |
213 | @retval EFI_OUT_OF_RESOURCES Could not allocate resources to join the group.\r | |
214 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
215 | - This is NULL.\r | |
216 | - JoinFlag is TRUE and MulticastAddress is NULL.\r | |
217 | - JoinFlag is TRUE and *MulticastAddress is not\r | |
218 | a valid multicast address.\r | |
219 | @retval EFI_ALREADY_STARTED The group address is already in the group table (when\r | |
220 | JoinFlag is TRUE).\r | |
221 | @retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is\r | |
222 | FALSE).\r | |
223 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
224 | \r | |
225 | **/\r | |
226 | typedef\r | |
227 | EFI_STATUS\r | |
8b13229b | 228 | (EFIAPI *EFI_UDP4_GROUPS)(\r |
d1f95000 | 229 | IN EFI_UDP4_PROTOCOL *This,\r |
230 | IN BOOLEAN JoinFlag,\r | |
231 | IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL\r | |
9095d37b | 232 | );\r |
d1f95000 | 233 | \r |
234 | /**\r | |
235 | Adds and deletes routing table entries.\r | |
9095d37b | 236 | \r |
30c99a72 | 237 | The Routes() function adds a route to or deletes a route from the routing table.\r |
238 | Routes are determined by comparing the SubnetAddress with the destination IP\r | |
239 | address and arithmetically AND-ing it with the SubnetMask. The gateway address\r | |
240 | must be on the same subnet as the configured station address.\r | |
241 | The default route is added with SubnetAddress and SubnetMask both set to 0.0.0.0.\r | |
242 | The default route matches all destination IP addresses that do not match any\r | |
243 | other routes.\r | |
244 | A zero GatewayAddress is a nonroute. Packets are sent to the destination IP\r | |
245 | address if it can be found in the Address Resolution Protocol (ARP) cache or\r | |
246 | on the local subnet. One automatic nonroute entry will be inserted into the\r | |
247 | routing table for outgoing packets that are addressed to a local subnet\r | |
248 | (gateway address of 0.0.0.0).\r | |
249 | Each instance of the EFI UDPv4 Protocol has its own independent routing table.\r | |
250 | Instances of the EFI UDPv4 Protocol that use the default IP address will also\r | |
251 | have copies of the routing table provided by the EFI_IP4_CONFIG_PROTOCOL. These\r | |
252 | copies will be updated automatically whenever the IP driver reconfigures its\r | |
253 | instances; as a result, the previous modification to these copies will be lost.\r | |
d1f95000 | 254 | \r |
af2dc6a7 | 255 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
d1f95000 | 256 | @param DeleteRoute Set to TRUE to delete this route from the routing table.\r |
257 | Set to FALSE to add this route to the routing table.\r | |
258 | @param SubnetAddress The destination network address that needs to be routed.\r | |
259 | @param SubnetMask The subnet mask of SubnetAddress.\r | |
260 | @param GatewayAddress The gateway IP address for this route.\r | |
261 | \r | |
262 | @retval EFI_SUCCESS The operation completed successfully.\r | |
263 | @retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.\r | |
264 | @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r | |
265 | - RARP, etc.) is not finished yet.\r | |
266 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
267 | @retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table.\r | |
268 | @retval EFI_NOT_FOUND This route is not in the routing table.\r | |
269 | @retval EFI_ACCESS_DENIED The route is already defined in the routing table.\r | |
270 | \r | |
271 | **/\r | |
272 | typedef\r | |
273 | EFI_STATUS\r | |
8b13229b | 274 | (EFIAPI *EFI_UDP4_ROUTES)(\r |
d1f95000 | 275 | IN EFI_UDP4_PROTOCOL *This,\r |
276 | IN BOOLEAN DeleteRoute,\r | |
277 | IN EFI_IPv4_ADDRESS *SubnetAddress,\r | |
278 | IN EFI_IPv4_ADDRESS *SubnetMask,\r | |
279 | IN EFI_IPv4_ADDRESS *GatewayAddress\r | |
9095d37b | 280 | );\r |
d1f95000 | 281 | \r |
282 | /**\r | |
283 | Polls for incoming data packets and processes outgoing data packets.\r | |
9095d37b | 284 | \r |
30c99a72 | 285 | The Poll() function can be used by network drivers and applications to increase\r |
286 | the rate that data packets are moved between the communications device and the\r | |
287 | transmit and receive queues.\r | |
288 | In some systems, the periodic timer event in the managed network driver may not\r | |
289 | poll the underlying communications device fast enough to transmit and/or receive\r | |
290 | all data packets without missing incoming packets or dropping outgoing packets.\r | |
291 | Drivers and applications that are experiencing packet loss should try calling\r | |
292 | the Poll() function more often.\r | |
d1f95000 | 293 | \r |
af2dc6a7 | 294 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
d1f95000 | 295 | \r |
296 | @retval EFI_SUCCESS Incoming or outgoing data was processed.\r | |
297 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
298 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
299 | @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r | |
300 | \r | |
301 | **/\r | |
302 | typedef\r | |
303 | EFI_STATUS\r | |
8b13229b | 304 | (EFIAPI *EFI_UDP4_POLL)(\r |
d1f95000 | 305 | IN EFI_UDP4_PROTOCOL *This\r |
9095d37b | 306 | );\r |
d1f95000 | 307 | \r |
308 | /**\r | |
309 | Places an asynchronous receive request into the receiving queue.\r | |
9095d37b | 310 | \r |
30c99a72 | 311 | The Receive() function places a completion token into the receive packet queue.\r |
312 | This function is always asynchronous.\r | |
313 | The caller must fill in the Token.Event field in the completion token, and this\r | |
314 | field cannot be NULL. When the receive operation completes, the EFI UDPv4 Protocol\r | |
315 | driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event\r | |
316 | is signaled. Providing a proper notification function and context for the event\r | |
317 | will enable the user to receive the notification and receiving status. That\r | |
318 | notification function is guaranteed to not be re-entered.\r | |
d1f95000 | 319 | \r |
af2dc6a7 | 320 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
321 | @param Token The pointer to a token that is associated with the receive data\r | |
d1f95000 | 322 | descriptor.\r |
323 | \r | |
324 | @retval EFI_SUCCESS The receive completion token was cached.\r | |
325 | @retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.\r | |
326 | @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.)\r | |
327 | is not finished yet.\r | |
a89fa50c | 328 | @retval EFI_INVALID_PARAMETER This is NULL.\r |
852d8911 | 329 | @retval EFI_INVALID_PARAMETER Token is NULL.\r |
330 | @retval EFI_INVALID_PARAMETER Token.Event is NULL.\r | |
d1f95000 | 331 | @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system\r |
332 | resources (usually memory).\r | |
333 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
334 | @retval EFI_ACCESS_DENIED A receive completion token with the same Token.Event was already in\r | |
335 | the receive queue.\r | |
336 | @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.\r | |
337 | \r | |
338 | **/\r | |
339 | typedef\r | |
340 | EFI_STATUS\r | |
8b13229b | 341 | (EFIAPI *EFI_UDP4_RECEIVE)(\r |
d1f95000 | 342 | IN EFI_UDP4_PROTOCOL *This,\r |
343 | IN EFI_UDP4_COMPLETION_TOKEN *Token\r | |
9095d37b | 344 | );\r |
d1f95000 | 345 | \r |
346 | /**\r | |
347 | Queues outgoing data packets into the transmit queue.\r | |
9095d37b | 348 | \r |
30c99a72 | 349 | The Transmit() function places a sending request to this instance of the EFI\r |
350 | UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever\r | |
351 | the packet in the token is sent out or some errors occur, the Token.Event will\r | |
352 | be signaled and Token.Status is updated. Providing a proper notification function\r | |
353 | and context for the event will enable the user to receive the notification and\r | |
354 | transmitting status.\r | |
d1f95000 | 355 | \r |
af2dc6a7 | 356 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
357 | @param Token The pointer to the completion token that will be placed into the\r | |
d1f95000 | 358 | transmit queue.\r |
359 | \r | |
360 | @retval EFI_SUCCESS The data has been queued for transmission.\r | |
361 | @retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.\r | |
362 | @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r | |
363 | RARP, etc.) is not finished yet.\r | |
364 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
365 | @retval EFI_ACCESS_DENIED The transmit completion token with the same\r | |
366 | Token.Event was already in the transmit queue.\r | |
367 | @retval EFI_NOT_READY The completion token could not be queued because the\r | |
368 | transmit queue is full.\r | |
369 | @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.\r | |
370 | @retval EFI_NOT_FOUND There is no route to the destination network or address.\r | |
371 | @retval EFI_BAD_BUFFER_SIZE The data length is greater than the maximum UDP packet\r | |
372 | size. Or the length of the IP header + UDP header + data\r | |
373 | length is greater than MTU if DoNotFragment is TRUE.\r | |
374 | \r | |
375 | **/\r | |
376 | typedef\r | |
377 | EFI_STATUS\r | |
8b13229b | 378 | (EFIAPI *EFI_UDP4_TRANSMIT)(\r |
d1f95000 | 379 | IN EFI_UDP4_PROTOCOL *This,\r |
380 | IN EFI_UDP4_COMPLETION_TOKEN *Token\r | |
9095d37b | 381 | );\r |
d1f95000 | 382 | \r |
383 | /**\r | |
384 | Aborts an asynchronous transmit or receive request.\r | |
9095d37b | 385 | \r |
30c99a72 | 386 | The Cancel() function is used to abort a pending transmit or receive request.\r |
387 | If the token is in the transmit or receive request queues, after calling this\r | |
388 | function, Token.Status will be set to EFI_ABORTED and then Token.Event will be\r | |
389 | signaled. If the token is not in one of the queues, which usually means that\r | |
390 | the asynchronous operation has completed, this function will not signal the\r | |
391 | token and EFI_NOT_FOUND is returned.\r | |
d1f95000 | 392 | \r |
af2dc6a7 | 393 | @param This The pointer to the EFI_UDP4_PROTOCOL instance.\r |
394 | @param Token The pointer to a token that has been issued by\r | |
d1f95000 | 395 | EFI_UDP4_PROTOCOL.Transmit() or\r |
396 | EFI_UDP4_PROTOCOL.Receive().If NULL, all pending\r | |
397 | tokens are aborted.\r | |
398 | \r | |
399 | @retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event\r | |
400 | was signaled. When Token is NULL, all pending requests are\r | |
401 | aborted and their events are signaled.\r | |
402 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
403 | @retval EFI_NOT_STARTED This instance has not been started.\r | |
404 | @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,\r | |
405 | RARP, etc.) is not finished yet.\r | |
406 | @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was\r | |
407 | not found in the transmit or receive queue. It has either completed\r | |
408 | or was not issued by Transmit() and Receive().\r | |
409 | \r | |
410 | **/\r | |
411 | typedef\r | |
412 | EFI_STATUS\r | |
413 | (EFIAPI *EFI_UDP4_CANCEL)(\r | |
414 | IN EFI_UDP4_PROTOCOL *This,\r | |
415 | IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL\r | |
9095d37b | 416 | );\r |
d1f95000 | 417 | \r |
44717a39 | 418 | ///\r |
9095d37b LG |
419 | /// The EFI_UDP4_PROTOCOL defines an EFI UDPv4 Protocol session that can be used\r |
420 | /// by any network drivers, applications, or daemons to transmit or receive UDP packets.\r | |
421 | /// This protocol instance can either be bound to a specified port as a service or\r | |
422 | /// connected to some remote peer as an active client. Each instance has its own settings,\r | |
44717a39 | 423 | /// such as the routing table and group table, which are independent from each other.\r |
424 | ///\r | |
d1f95000 | 425 | struct _EFI_UDP4_PROTOCOL {\r |
426 | EFI_UDP4_GET_MODE_DATA GetModeData;\r | |
427 | EFI_UDP4_CONFIGURE Configure;\r | |
428 | EFI_UDP4_GROUPS Groups;\r | |
429 | EFI_UDP4_ROUTES Routes;\r | |
430 | EFI_UDP4_TRANSMIT Transmit;\r | |
431 | EFI_UDP4_RECEIVE Receive;\r | |
432 | EFI_UDP4_CANCEL Cancel;\r | |
433 | EFI_UDP4_POLL Poll;\r | |
434 | };\r | |
435 | \r | |
436 | extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid;\r | |
437 | extern EFI_GUID gEfiUdp4ProtocolGuid;\r | |
438 | \r | |
439 | #endif\r |