]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/Ip4.h
ab598484af3d95234aa55e4e1e10cdd275518364
[mirror_edk2.git] / MdePkg / Include / Protocol / Ip4.h
1 /** @file
2
3 This file defines the EFI IPv4 (Internet Protocol version 4)
4 Protocol interface. It is split into the following three main
5 sections:
6 - EFI IPv4 Service Binding Protocol
7 - EFI IPv4 Variable
8 - EFI IPv4 Protocol The EFI IPv4 Protocol provides basic
9 network IPv4 packet I/O services, which includes support for
10 a subset of the Internet Control Message Protocol (ICMP) and
11 may include support for the Internet Group Management
12 Protocol (IGMP).
13
14 Copyright (c) 2006 - 2008, Intel Corporation
15 All rights reserved. This program and the accompanying materials
16 are licensed and made available under the terms and conditions of the BSD License
17 which accompanies this distribution. The full text of the license may be found at
18 http://opensource.org/licenses/bsd-license.php
19
20 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
21 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22
23 **/
24
25 #ifndef __EFI_IP4_PROTOCOL_H__
26 #define __EFI_IP4_PROTOCOL_H__
27
28 #include <Protocol/ManagedNetwork.h>
29
30 #define EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID \
31 { \
32 0xc51711e7, 0xb4bf, 0x404a, {0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } \
33 }
34
35 #define EFI_IP4_PROTOCOL_GUID \
36 { \
37 0x41d94cd2, 0x35b6, 0x455a, {0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } \
38 }
39
40 typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL;
41
42 typedef struct {
43 EFI_HANDLE InstanceHandle;
44 EFI_IPv4_ADDRESS Ip4Address;
45 EFI_IPv4_ADDRESS SubnetMask;
46 } EFI_IP4_ADDRESS_PAIR;
47
48 typedef struct {
49 EFI_HANDLE DriverHandle;
50 UINT32 AddressCount;
51 EFI_IP4_ADDRESS_PAIR AddressPairs[1];
52 } EFI_IP4_VARIABLE_DATA;
53
54 typedef struct {
55 ///
56 /// The default IPv4 protocol packets to send and receive. Ignored
57 /// when AcceptPromiscuous is TRUE.
58 ///
59 UINT8 DefaultProtocol;
60 ///
61 /// Set to TRUE to receive all IPv4 packets that get through the receive filters.
62 /// Set to FALSE to receive only the DefaultProtocol IPv4
63 /// packets that get through the receive filters.
64 ///
65 BOOLEAN AcceptAnyProtocol;
66 ///
67 /// Set to TRUE to receive ICMP error report packets. Ignored when
68 /// AcceptPromiscuous or AcceptAnyProtocol is TRUE.
69 ///
70 BOOLEAN AcceptIcmpErrors;
71 ///
72 /// Set to TRUE to receive broadcast IPv4 packets. Ignored when
73 /// AcceptPromiscuous is TRUE.
74 /// Set to FALSE to stop receiving broadcast IPv4 packets.
75 ///
76 BOOLEAN AcceptBroadcast;
77 ///
78 /// Set to TRUE to receive all IPv4 packets that are sent to any
79 /// hardware address or any protocol address.
80 /// Set to FALSE to stop receiving all promiscuous IPv4 packets
81 ///
82 BOOLEAN AcceptPromiscuous;
83 ///
84 /// Set to TRUE to use the default IPv4 address and default routing table.
85 ///
86 BOOLEAN UseDefaultAddress;
87 ///
88 /// The station IPv4 address that will be assigned to this EFI IPv4Protocol instance.
89 ///
90 EFI_IPv4_ADDRESS StationAddress;
91 ///
92 /// The subnet address mask that is associated with the station address.
93 ///
94 EFI_IPv4_ADDRESS SubnetMask;
95 ///
96 /// TypeOfService field in transmitted IPv4 packets.
97 ///
98 UINT8 TypeOfService;
99 ///
100 /// TimeToLive field in transmitted IPv4 packets.
101 ///
102 UINT8 TimeToLive;
103 ///
104 /// State of the DoNotFragment bit in transmitted IPv4 packets.
105 ///
106 BOOLEAN DoNotFragment;
107 ///
108 /// Set to TRUE to send and receive unformatted packets. The other
109 /// IPv4 receive filters are still applied. Fragmentation is disabled for RawData mode.
110 ///
111 BOOLEAN RawData;
112 ///
113 /// The timer timeout value (number of microseconds) for the
114 /// receive timeout event to be associated with each assembled
115 /// packet. Zero means do not drop assembled packets.
116 ///
117 UINT32 ReceiveTimeout;
118 ///
119 /// The timer timeout value (number of microseconds) for the
120 /// transmit timeout event to be associated with each outgoing
121 /// packet. Zero means do not drop outgoing packets.
122 ///
123 UINT32 TransmitTimeout;
124 } EFI_IP4_CONFIG_DATA;
125
126
127 typedef struct {
128 EFI_IPv4_ADDRESS SubnetAddress;
129 EFI_IPv4_ADDRESS SubnetMask;
130 EFI_IPv4_ADDRESS GatewayAddress;
131 } EFI_IP4_ROUTE_TABLE;
132
133 typedef struct {
134 UINT8 Type;
135 UINT8 Code;
136 } EFI_IP4_ICMP_TYPE;
137
138 typedef struct {
139 ///
140 /// Set to TRUE after this EFI IPv4 Protocol instance has been successfully configured.
141 ///
142 BOOLEAN IsStarted;
143 ///
144 /// Current configuration settings.
145 ///
146 EFI_IP4_CONFIG_DATA ConfigData;
147 ///
148 /// Set to TRUE when the EFI IPv4 Protocol instance has a station address and subnet mask.
149 ///
150 BOOLEAN IsConfigured;
151 ///
152 /// Number of joined multicast groups.
153 ///
154 UINT32 GroupCount;
155 ///
156 /// List of joined multicast group addresses.
157 ///
158 EFI_IPv4_ADDRESS *GroupTable;
159 ///
160 /// Number of entries in the routing table.
161 ///
162 UINT32 RouteCount;
163 ///
164 /// Routing table entries.
165 ///
166 EFI_IP4_ROUTE_TABLE *RouteTable;
167 ///
168 /// Number of entries in the supported ICMP types list.
169 ///
170 UINT32 IcmpTypeCount;
171 ///
172 /// Array of ICMP types and codes that are supported by this EFI IPv4 Protocol driver
173 ///
174 EFI_IP4_ICMP_TYPE *IcmpTypeList;
175 } EFI_IP4_MODE_DATA;
176
177 #pragma pack(1)
178
179 typedef struct {
180 UINT8 HeaderLength:4;
181 UINT8 Version:4;
182 UINT8 TypeOfService;
183 UINT16 TotalLength;
184 UINT16 Identification;
185 UINT16 Fragmentation;
186 UINT8 TimeToLive;
187 UINT8 Protocol;
188 UINT16 Checksum;
189 EFI_IPv4_ADDRESS SourceAddress;
190 EFI_IPv4_ADDRESS DestinationAddress;
191 } EFI_IP4_HEADER;
192 #pragma pack()
193
194
195 typedef struct {
196 UINT32 FragmentLength;
197 VOID *FragmentBuffer;
198 } EFI_IP4_FRAGMENT_DATA;
199
200
201 typedef struct {
202 EFI_TIME TimeStamp;
203 EFI_EVENT RecycleSignal;
204 UINT32 HeaderLength;
205 EFI_IP4_HEADER *Header;
206 UINT32 OptionsLength;
207 VOID *Options;
208 UINT32 DataLength;
209 UINT32 FragmentCount;
210 EFI_IP4_FRAGMENT_DATA FragmentTable[1];
211 } EFI_IP4_RECEIVE_DATA;
212
213
214 typedef struct {
215 EFI_IPv4_ADDRESS SourceAddress;
216 EFI_IPv4_ADDRESS GatewayAddress;
217 UINT8 Protocol;
218 UINT8 TypeOfService;
219 UINT8 TimeToLive;
220 BOOLEAN DoNotFragment;
221 } EFI_IP4_OVERRIDE_DATA;
222
223 typedef struct {
224 EFI_IPv4_ADDRESS DestinationAddress;
225 EFI_IP4_OVERRIDE_DATA *OverrideData; //OPTIONAL
226 UINT32 OptionsLength; //OPTIONAL
227 VOID *OptionsBuffer; //OPTIONAL
228 UINT32 TotalDataLength;
229 UINT32 FragmentCount;
230 EFI_IP4_FRAGMENT_DATA FragmentTable[1];
231 } EFI_IP4_TRANSMIT_DATA;
232
233 typedef struct {
234 ///
235 /// This Event will be signaled after the Status field is updated
236 /// by the EFI IPv4 Protocol driver. The type of Event must be
237 /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
238 /// Event must be lower than or equal to TPL_CALLBACK.
239 ///
240 EFI_EVENT Event;
241 ///
242 /// The status that is returned to the caller at the end of the operation
243 /// to indicate whether this operation completed successfully.
244 ///
245 EFI_STATUS Status;
246 union {
247 ///
248 /// When this token is used for receiving, RxData is a pointer to the EFI_IP4_RECEIVE_DATA.
249 ///
250 EFI_IP4_RECEIVE_DATA *RxData;
251 ///
252 /// When this token is used for transmitting, TxData is a pointer to the EFI_IP4_TRANSMIT_DATA.
253 ///
254 EFI_IP4_TRANSMIT_DATA *TxData;
255 } Packet;
256 } EFI_IP4_COMPLETION_TOKEN;
257
258 /**
259 Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.
260
261 The GetModeData() function returns the current operational mode data for this
262 driver instance. The data fields in EFI_IP4_MODE_DATA are read only. This
263 function is used optionally to retrieve the operational mode data of underlying
264 networks or drivers.
265
266 @param This Pointer to the EFI_IP4_PROTOCOL instance.
267 @param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
268 @param MnpConfigData Pointer to the managed network configuration data structure.
269 @param SnpModeData Pointer to the simple network mode data structure.
270
271 @retval EFI_SUCCESS The operation completed successfully.
272 @retval EFI_INVALID_PARAMETER This is NULL.
273 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
274
275 **/
276 typedef
277 EFI_STATUS
278 (EFIAPI *EFI_IP4_GET_MODE_DATA)(
279 IN CONST EFI_IP4_PROTOCOL *This,
280 OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
281 OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
282 OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
283 );
284
285 /**
286 Assigns an IPv4 address and subnet mask to this EFI IPv4 Protocol driver instance.
287
288 The Configure() function is used to set, change, or reset the operational
289 parameters and filter settings for this EFI IPv4 Protocol instance. Until these
290 parameters have been set, no network traffic can be sent or received by this
291 instance. Once the parameters have been reset (by calling this function with
292 IpConfigData set to NULL), no more traffic can be sent or received until these
293 parameters have been set again. Each EFI IPv4 Protocol instance can be started
294 and stopped independently of each other by enabling or disabling their receive
295 filter settings with the Configure() function.
296
297 When IpConfigData.UseDefaultAddress is set to FALSE, the new station address will
298 be appended as an alias address into the addresses list in the EFI IPv4 Protocol
299 driver. While set to TRUE, Configure() will trigger the EFI_IP4_CONFIG_PROTOCOL
300 to retrieve the default IPv4 address if it is not available yet. Clients could
301 frequently call GetModeData() to check the status to ensure that the default IPv4
302 address is ready.
303
304 If operational parameters are reset or changed, any pending transmit and receive
305 requests will be cancelled. Their completion token status will be set to EFI_ABORTED
306 and their events will be signaled.
307
308 @param This Pointer to the EFI_IP4_PROTOCOL instance.
309 @param IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
310
311 @retval EFI_SUCCESS The driver instance was successfully opened.
312 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
313 RARP, etc.) is not finished yet.
314 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
315 @retval EFI_UNSUPPORTED One or more of the following conditions is TRUE:
316 A configuration protocol (DHCP, BOOTP, RARP, etc.) could
317 not be located when clients choose to use the default IPv4
318 address. This EFI IPv4 Protocol implementation does not
319 support this requested filter or timeout setting.
320 @retval EFI_OUT_OF_RESOURCES The EFI IPv4 Protocol driver instance data could not be allocated.
321 @retval EFI_ALREADY_STARTED The interface is already open and must be stopped before the
322 IPv4 address or subnet mask can be changed. The interface must
323 also be stopped when switching to/from raw packet mode.
324 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI IPv4
325 Protocol driver instance is not opened.
326
327 **/
328 typedef
329 EFI_STATUS
330 (EFIAPI *EFI_IP4_CONFIGURE)(
331 IN EFI_IP4_PROTOCOL *This,
332 IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL
333 );
334
335 /**
336 Joins and leaves multicast groups.
337
338 The Groups() function is used to join and leave multicast group sessions. Joining
339 a group will enable reception of matching multicast packets. Leaving a group will
340 disable the multicast packet reception.
341
342 If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.
343
344 @param This Pointer to the EFI_IP4_PROTOCOL instance.
345 @param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
346 @param GroupAddress Pointer to the IPv4 multicast address.
347
348 @retval EFI_SUCCESS The operation completed successfully.
349 @retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
350 - This is NULL.
351 - JoinFlag is TRUE and GroupAddress is NULL.
352 - GroupAddress is not NULL and *GroupAddress is
353 not a multicast IPv4 address.
354 @retval EFI_NOT_STARTED This instance has not been started.
355 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
356 RARP, etc.) is not finished yet.
357 @retval EFI_OUT_OF_RESOURCES System resources could not be allocated.
358 @retval EFI_UNSUPPORTED This EFI IPv4 Protocol implementation does not support multicast groups.
359 @retval EFI_ALREADY_STARTED The group address is already in the group table (when
360 JoinFlag is TRUE).
361 @retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is FALSE).
362 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
363
364 **/
365 typedef
366 EFI_STATUS
367 (EFIAPI *EFI_IP4_GROUPS)(
368 IN EFI_IP4_PROTOCOL *This,
369 IN BOOLEAN JoinFlag,
370 IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
371 );
372
373 /**
374 Adds and deletes routing table entries.
375
376 The Routes() function adds a route to or deletes a route from the routing table.
377
378 Routes are determined by comparing the SubnetAddress with the destination IPv4
379 address arithmetically AND-ed with the SubnetMask. The gateway address must be
380 on the same subnet as the configured station address.
381
382 The default route is added with SubnetAddress and SubnetMask both set to 0.0.0.0.
383 The default route matches all destination IPv4 addresses that do not match any
384 other routes.
385
386 A GatewayAddress that is zero is a nonroute. Packets are sent to the destination
387 IP address if it can be found in the ARP cache or on the local subnet. One automatic
388 nonroute entry will be inserted into the routing table for outgoing packets that
389 are addressed to a local subnet (gateway address of 0.0.0.0).
390
391 Each EFI IPv4 Protocol instance has its own independent routing table. Those EFI
392 IPv4 Protocol instances that use the default IPv4 address will also have copies
393 of the routing table that was provided by the EFI_IP4_CONFIG_PROTOCOL, and these
394 copies will be updated whenever the EIF IPv4 Protocol driver reconfigures its
395 instances. As a result, client modification to the routing table will be lost.
396
397 @param This Pointer to the EFI_IP4_PROTOCOL instance.
398 @param DeleteRoute Set to TRUE to delete this route from the routing table. Set to
399 FALSE to add this route to the routing table. SubnetAddress
400 and SubnetMask are used as the key to each route entry.
401 @param SubnetAddress The address of the subnet that needs to be routed.
402 @param SubnetMask The subnet mask of SubnetAddress.
403 @param GatewayAddress The unicast gateway IPv4 address for this route.
404
405 @retval EFI_SUCCESS The operation completed successfully.
406 @retval EFI_NOT_STARTED The driver instance has not been started.
407 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
408 RARP, etc.) is not finished yet.
409 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
410 - This is NULL.
411 - SubnetAddress is NULL.
412 - SubnetMask is NULL.
413 - GatewayAddress is NULL.
414 - *SubnetAddress is not a valid subnet address.
415 - *SubnetMask is not a valid subnet mask.
416 - *GatewayAddress is not a valid unicast IPv4 address.
417 @retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table.
418 @retval EFI_NOT_FOUND This route is not in the routing table (when DeleteRoute is TRUE).
419 @retval EFI_ACCESS_DENIED The route is already defined in the routing table (when
420 DeleteRoute is FALSE).
421
422 **/
423 typedef
424 EFI_STATUS
425 (EFIAPI *EFI_IP4_ROUTES)(
426 IN EFI_IP4_PROTOCOL *This,
427 IN BOOLEAN DeleteRoute,
428 IN EFI_IPv4_ADDRESS *SubnetAddress,
429 IN EFI_IPv4_ADDRESS *SubnetMask,
430 IN EFI_IPv4_ADDRESS *GatewayAddress
431 );
432
433 /**
434 Places outgoing data packets into the transmit queue.
435
436 The Transmit() function places a sending request in the transmit queue of this
437 EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some
438 errors occur, the event in the token will be signaled and the status is updated.
439
440 @param This Pointer to the EFI_IP4_PROTOCOL instance.
441 @param Token Pointer to the transmit token.
442
443 @retval EFI_SUCCESS The data has been queued for transmission.
444 @retval EFI_NOT_STARTED This instance has not been started.
445 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
446 RARP, etc.) is not finished yet.
447 @retval EFI_INVALID_PARAMETER One or more pameters are invalid.
448 @retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event
449 was already in the transmit queue.
450 @retval EFI_NOT_READY The completion token could not be queued because the transmit
451 queue is full.
452 @retval EFI_NOT_FOUND Not route is found to destination address.
453 @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.
454 @retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too
455 short to transmit.
456 @retval EFI_BAD_BUFFER_SIZE The length of the IPv4 header + option length + total data length is
457 greater than MTU (or greater than the maximum packet size if
458 Token.Packet.TxData.OverrideData.
459 DoNotFragment is TRUE.)
460
461 **/
462 typedef
463 EFI_STATUS
464 (EFIAPI *EFI_IP4_TRANSMIT)(
465 IN EFI_IP4_PROTOCOL *This,
466 IN EFI_IP4_COMPLETION_TOKEN *Token
467 );
468
469 /**
470 Places a receiving request into the receiving queue.
471
472 The Receive() function places a completion token into the receive packet queue.
473 This function is always asynchronous.
474
475 The Token.Event field in the completion token must be filled in by the caller
476 and cannot be NULL. When the receive operation completes, the EFI IPv4 Protocol
477 driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
478 is signaled.
479
480 @param This Pointer to the EFI_IP4_PROTOCOL instance.
481 @param Token Pointer to a token that is associated with the receive data descriptor.
482
483 @retval EFI_SUCCESS The receive completion token was cached.
484 @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
485 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, RARP, etc.)
486 is not finished yet.
487 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
488 - This is NULL.
489 - Token is NULL.
490 - Token.Event is NULL.
491 @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system
492 resources (usually memory).
493 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
494 The EFI IPv4 Protocol instance has been reset to startup defaults.
495 EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already
496 in the receive queue.
497 @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
498 @retval EFI_ICMP_ERROR An ICMP error packet was received.
499
500 **/
501 typedef
502 EFI_STATUS
503 (EFIAPI *EFI_IP4_RECEIVE)(
504 IN EFI_IP4_PROTOCOL *This,
505 IN EFI_IP4_COMPLETION_TOKEN *Token
506 );
507
508 /**
509 Abort an asynchronous transmit or receive request.
510
511 The Cancel() function is used to abort a pending transmit or receive request.
512 If the token is in the transmit or receive request queues, after calling this
513 function, Token->Status will be set to EFI_ABORTED and then Token->Event will
514 be signaled. If the token is not in one of the queues, which usually means the
515 asynchronous operation has completed, this function will not signal the token
516 and EFI_NOT_FOUND is returned.
517
518 @param This Pointer to the EFI_IP4_PROTOCOL instance.
519 @param Token Pointer to a token that has been issued by
520 EFI_IP4_PROTOCOL.Transmit() or
521 EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
522 tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
523 defined in EFI_IP4_PROTOCOL.Transmit().
524
525 @retval EFI_SUCCESS The asynchronous I/O request was aborted and
526 Token.->Event was signaled. When Token is NULL, all
527 pending requests were aborted and their events were signaled.
528 @retval EFI_INVALID_PARAMETER This is NULL.
529 @retval EFI_NOT_STARTED This instance has not been started.
530 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
531 RARP, etc.) is not finished yet.
532 @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was
533 not found in the transmit or receive queue. It has either completed
534 or was not issued by Transmit() and Receive().
535
536 **/
537 typedef
538 EFI_STATUS
539 (EFIAPI *EFI_IP4_CANCEL)(
540 IN EFI_IP4_PROTOCOL *This,
541 IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
542 );
543
544 /**
545 Polls for incoming data packets and processes outgoing data packets.
546
547 The Poll() function polls for incoming data packets and processes outgoing data
548 packets. Network drivers and applications can call the EFI_IP4_PROTOCOL.Poll()
549 function to increase the rate that data packets are moved between the communications
550 device and the transmit and receive queues.
551
552 In some systems the periodic timer event may not poll the underlying communications
553 device fast enough to transmit and/or receive all data packets without missing
554 incoming packets or dropping outgoing packets. Drivers and applications that are
555 experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function
556 more often.
557
558 @param This Pointer to the EFI_IP4_PROTOCOL instance.
559
560 @retval EFI_SUCCESS Incoming or outgoing data was processed.
561 @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
562 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
563 RARP, etc.) is not finished yet.
564 @retval EFI_INVALID_PARAMETER This is NULL.
565 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
566 @retval EFI_NOT_READY No incoming or outgoing data is processed.
567 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
568 Consider increasing the polling rate.
569
570 **/
571 typedef
572 EFI_STATUS
573 (EFIAPI *EFI_IP4_POLL)(
574 IN EFI_IP4_PROTOCOL *This
575 );
576
577 ///
578 /// The EFI IPv4 Protocol implements a simple packet-oriented interface that can be
579 /// used by drivers, daemons, and applications to transmit and receive network packets.
580 ///
581 struct _EFI_IP4_PROTOCOL {
582 EFI_IP4_GET_MODE_DATA GetModeData;
583 EFI_IP4_CONFIGURE Configure;
584 EFI_IP4_GROUPS Groups;
585 EFI_IP4_ROUTES Routes;
586 EFI_IP4_TRANSMIT Transmit;
587 EFI_IP4_RECEIVE Receive;
588 EFI_IP4_CANCEL Cancel;
589 EFI_IP4_POLL Poll;
590 };
591
592 extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid;
593 extern EFI_GUID gEfiIp4ProtocolGuid;
594
595 #endif