00001 /** @file00002 This file defines the EFI IPv4 (Internet Protocol version 4)00003 Protocol interface. It is split into the following three main00004 sections:00005 - EFI IPv4 Service Binding Protocol00006 - EFI IPv4 Variable (deprecated in UEFI 2.4B)00007 - EFI IPv4 Protocol.00008 The EFI IPv4 Protocol provides basic network IPv4 packet I/O services,00009 which includes support foR a subset of the Internet Control Message00010 Protocol (ICMP) and may include support for the Internet Group Management00011 Protocol (IGMP).00012 00013 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>00014 This program and the accompanying materials are licensed and made available under00015 the terms and conditions of the BSD License that accompanies this distribution.00016 The full text of the license may be found at00017 http://opensource.org/licenses/bsd-license.php.00018 00019 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,00020 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.00021 00022 @par Revision Reference:00023 This Protocol is introduced in UEFI Specification 2.0.00024 00025 **/00026
00027 #ifndef __EFI_IP4_PROTOCOL_H__00028 #define __EFI_IP4_PROTOCOL_H__00029 00030 FILE_LICENCE ( BSD3 );
00031
00032 #include <ipxe/efi/Protocol/ManagedNetwork.h>00033
00034#define EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID \00035 { \00036 0xc51711e7, 0xb4bf, 0x404a, {0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } \00037 }00038 00039#define EFI_IP4_PROTOCOL_GUID \00040 { \00041 0x41d94cd2, 0x35b6, 0x455a, {0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } \00042 }00043 00044typedefstruct _EFI_IP4_PROTOCOLEFI_IP4_PROTOCOL;
00045 00046 ///00047 /// EFI_IP4_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more.00048 /// The definition in here is only present to provide backwards compatability.00049 ///00050typedefstruct {
00051EFI_HANDLEInstanceHandle;
00052EFI_IPv4_ADDRESSIp4Address;
00053EFI_IPv4_ADDRESSSubnetMask;
00054 } EFI_IP4_ADDRESS_PAIR;
00055 00056 ///00057 /// EFI_IP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.00058 /// The definition in here is only present to provide backwards compatability.00059 ///00060typedefstruct {
00061EFI_HANDLEDriverHandle;
00062UINT32AddressCount;
00063EFI_IP4_ADDRESS_PAIR AddressPairs[1];
00064 } EFI_IP4_VARIABLE_DATA;
00065
00066typedefstruct {00067 ///00068 /// The default IPv4 protocol packets to send and receive. Ignored00069 /// when AcceptPromiscuous is TRUE.00070 ///00071UINT8DefaultProtocol;00072 ///00073 /// Set to TRUE to receive all IPv4 packets that get through the receive filters.00074 /// Set to FALSE to receive only the DefaultProtocol IPv400075 /// packets that get through the receive filters.00076 ///00077BOOLEANAcceptAnyProtocol;00078 ///00079 /// Set to TRUE to receive ICMP error report packets. Ignored when00080 /// AcceptPromiscuous or AcceptAnyProtocol is TRUE.00081 ///00082BOOLEANAcceptIcmpErrors;00083 ///00084 /// Set to TRUE to receive broadcast IPv4 packets. Ignored when00085 /// AcceptPromiscuous is TRUE.00086 /// Set to FALSE to stop receiving broadcast IPv4 packets.00087 ///00088BOOLEANAcceptBroadcast;00089 ///00090 /// Set to TRUE to receive all IPv4 packets that are sent to any00091 /// hardware address or any protocol address.00092 /// Set to FALSE to stop receiving all promiscuous IPv4 packets00093 ///00094BOOLEANAcceptPromiscuous;00095 ///00096 /// Set to TRUE to use the default IPv4 address and default routing table.00097 ///00098BOOLEANUseDefaultAddress;00099 ///00100 /// The station IPv4 address that will be assigned to this EFI IPv4Protocol instance.00101 ///00102EFI_IPv4_ADDRESSStationAddress;00103 ///00104 /// The subnet address mask that is associated with the station address.00105 ///00106EFI_IPv4_ADDRESSSubnetMask;00107 ///00108 /// TypeOfService field in transmitted IPv4 packets.00109 ///00110UINT8TypeOfService;00111 ///00112 /// TimeToLive field in transmitted IPv4 packets.00113 ///00114UINT8TimeToLive;00115 ///00116 /// State of the DoNotFragment bit in transmitted IPv4 packets.00117 ///00118BOOLEANDoNotFragment;00119 ///00120 /// Set to TRUE to send and receive unformatted packets. The other00121 /// IPv4 receive filters are still applied. Fragmentation is disabled for RawData mode.00122 ///00123BOOLEANRawData;00124 ///00125 /// The timer timeout value (number of microseconds) for the00126 /// receive timeout event to be associated with each assembled00127 /// packet. Zero means do not drop assembled packets.00128 ///00129UINT32ReceiveTimeout;00130 ///00131 /// The timer timeout value (number of microseconds) for the00132 /// transmit timeout event to be associated with each outgoing00133 /// packet. Zero means do not drop outgoing packets.00134 ///00135UINT32TransmitTimeout;
00136 } EFI_IP4_CONFIG_DATA;
00137
00138
00139typedefstruct {
00140EFI_IPv4_ADDRESSSubnetAddress;
00141EFI_IPv4_ADDRESSSubnetMask;
00142EFI_IPv4_ADDRESSGatewayAddress;
00143 } EFI_IP4_ROUTE_TABLE;
00144
00145typedefstruct {
00146UINT8Type;
00147UINT8Code;
00148 } EFI_IP4_ICMP_TYPE;
00149
00150typedefstruct {00151 ///00152 /// Set to TRUE after this EFI IPv4 Protocol instance has been successfully configured.00153 ///00154BOOLEANIsStarted;00155 ///00156 /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed.00157 ///00158UINT32MaxPacketSize;00159 ///00160 /// Current configuration settings.00161 ///00162EFI_IP4_CONFIG_DATAConfigData;00163 ///00164 /// Set to TRUE when the EFI IPv4 Protocol instance has a station address and subnet mask.00165 ///00166BOOLEANIsConfigured;00167 ///00168 /// Number of joined multicast groups.00169 ///00170UINT32GroupCount;00171 ///00172 /// List of joined multicast group addresses.00173 ///00174EFI_IPv4_ADDRESS *GroupTable;00175 ///00176 /// Number of entries in the routing table.00177 ///00178UINT32RouteCount;00179 ///00180 /// Routing table entries.00181 ///00182EFI_IP4_ROUTE_TABLE *RouteTable;00183 ///00184 /// Number of entries in the supported ICMP types list.00185 ///00186UINT32IcmpTypeCount;00187 ///00188 /// Array of ICMP types and codes that are supported by this EFI IPv4 Protocol driver00189 ///00190EFI_IP4_ICMP_TYPE *IcmpTypeList;
00191 } EFI_IP4_MODE_DATA;
00192
00193 #pragma pack(1)00194 00195typedefstruct {
00196UINT8 HeaderLength:4;
00197UINT8Version:4;
00198UINT8TypeOfService;
00199UINT16TotalLength;
00200UINT16Identification;
00201UINT16Fragmentation;
00202UINT8TimeToLive;
00203UINT8Protocol;
00204UINT16Checksum;
00205EFI_IPv4_ADDRESSSourceAddress;
00206EFI_IPv4_ADDRESSDestinationAddress;
00207 } EFI_IP4_HEADER;
00208 #pragma pack()00209 00210
00211typedefstruct {
00212UINT32FragmentLength;
00213VOID *FragmentBuffer;
00214 } EFI_IP4_FRAGMENT_DATA;
00215
00216
00217typedefstruct {
00218EFI_TIMETimeStamp;
00219EFI_EVENTRecycleSignal;
00220UINT32HeaderLength;
00221EFI_IP4_HEADER *Header;
00222UINT32OptionsLength;
00223VOID *Options;
00224UINT32DataLength;
00225UINT32FragmentCount;
00226EFI_IP4_FRAGMENT_DATA FragmentTable[1];
00227 } EFI_IP4_RECEIVE_DATA;
00228
00229
00230typedefstruct {
00231EFI_IPv4_ADDRESSSourceAddress;
00232EFI_IPv4_ADDRESSGatewayAddress;
00233UINT8Protocol;
00234UINT8TypeOfService;
00235UINT8TimeToLive;
00236BOOLEANDoNotFragment;
00237 } EFI_IP4_OVERRIDE_DATA;
00238
00239typedefstruct {
00240EFI_IPv4_ADDRESSDestinationAddress;
00241EFI_IP4_OVERRIDE_DATA *OverrideData; //OPTIONAL00242UINT32OptionsLength; //OPTIONAL00243VOID *OptionsBuffer; //OPTIONAL00244UINT32TotalDataLength;
00245UINT32FragmentCount;
00246EFI_IP4_FRAGMENT_DATA FragmentTable[1];
00247 } EFI_IP4_TRANSMIT_DATA;
00248
00249typedefstruct {00250 ///00251 /// This Event will be signaled after the Status field is updated00252 /// by the EFI IPv4 Protocol driver. The type of Event must be00253 /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of00254 /// Event must be lower than or equal to TPL_CALLBACK.00255 ///00256EFI_EVENTEvent;00257 ///00258 /// The status that is returned to the caller at the end of the operation00259 /// to indicate whether this operation completed successfully.00260 ///00261EFI_STATUSStatus;
00262 union {00263 ///00264 /// When this token is used for receiving, RxData is a pointer to the EFI_IP4_RECEIVE_DATA.00265 ///00266EFI_IP4_RECEIVE_DATA *RxData;00267 ///00268 /// When this token is used for transmitting, TxData is a pointer to the EFI_IP4_TRANSMIT_DATA.00269 ///00270EFI_IP4_TRANSMIT_DATA *TxData;
00271 } Packet;
00272 } EFI_IP4_COMPLETION_TOKEN;
00273 00274 /**00275 Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.00276 00277 The GetModeData() function returns the current operational mode data for this00278 driver instance. The data fields in EFI_IP4_MODE_DATA are read only. This00279 function is used optionally to retrieve the operational mode data of underlying00280 networks or drivers.00281 00282 @param This The pointer to the EFI_IP4_PROTOCOL instance.00283 @param Ip4ModeData The pointer to the EFI IPv4 Protocol mode data structure.00284 @param MnpConfigData The pointer to the managed network configuration data structure.00285 @param SnpModeData The pointer to the simple network mode data structure.00286 00287 @retval EFI_SUCCESS The operation completed successfully.00288 @retval EFI_INVALID_PARAMETER This is NULL.00289 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.00290 00291 **/00292 typedef00293 EFI_STATUS00294 (EFIAPI *EFI_IP4_GET_MODE_DATA)(
00295 INCONSTEFI_IP4_PROTOCOL *This,
00296 OUTEFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
00297 OUTEFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
00298 OUTEFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL00299 );
00300 00301 /**00302 Assigns an IPv4 address and subnet mask to this EFI IPv4 Protocol driver instance.00303 00304 The Configure() function is used to set, change, or reset the operational00305 parameters and filter settings for this EFI IPv4 Protocol instance. Until these00306 parameters have been set, no network traffic can be sent or received by this00307 instance. Once the parameters have been reset (by calling this function with00308 IpConfigData set to NULL), no more traffic can be sent or received until these00309 parameters have been set again. Each EFI IPv4 Protocol instance can be started00310 and stopped independently of each other by enabling or disabling their receive00311 filter settings with the Configure() function.00312 00313 When IpConfigData.UseDefaultAddress is set to FALSE, the new station address will00314 be appended as an alias address into the addresses list in the EFI IPv4 Protocol00315 driver. While set to TRUE, Configure() will trigger the EFI_IP4_CONFIG_PROTOCOL00316 to retrieve the default IPv4 address if it is not available yet. Clients could00317 frequently call GetModeData() to check the status to ensure that the default IPv400318 address is ready.00319 00320 If operational parameters are reset or changed, any pending transmit and receive00321 requests will be cancelled. Their completion token status will be set to EFI_ABORTED00322 and their events will be signaled.00323 00324 @param This The pointer to the EFI_IP4_PROTOCOL instance.00325 @param IpConfigData The pointer to the EFI IPv4 Protocol configuration data structure.00326 00327 @retval EFI_SUCCESS The driver instance was successfully opened.00328 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,00329 RARP, etc.) is not finished yet.00330 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:00331 This is NULL.00332 IpConfigData.StationAddress is not a unicast IPv4 address.00333 IpConfigData.SubnetMask is not a valid IPv4 subnet00334 @retval EFI_UNSUPPORTED One or more of the following conditions is TRUE:00335 A configuration protocol (DHCP, BOOTP, RARP, etc.) could00336 not be located when clients choose to use the default IPv400337 address. This EFI IPv4 Protocol implementation does not00338 support this requested filter or timeout setting.00339 @retval EFI_OUT_OF_RESOURCES The EFI IPv4 Protocol driver instance data could not be allocated.00340 @retval EFI_ALREADY_STARTED The interface is already open and must be stopped before the00341 IPv4 address or subnet mask can be changed. The interface must00342 also be stopped when switching to/from raw packet mode.00343 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI IPv400344 Protocol driver instance is not opened.00345 00346 **/00347 typedef00348 EFI_STATUS00349 (EFIAPI *EFI_IP4_CONFIGURE)(
00350 INEFI_IP4_PROTOCOL *This,
00351 INEFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL00352 );
00353 00354 /**00355 Joins and leaves multicast groups.00356 00357 The Groups() function is used to join and leave multicast group sessions. Joining00358 a group will enable reception of matching multicast packets. Leaving a group will00359 disable the multicast packet reception.00360 00361 If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.00362 00363 @param This The pointer to the EFI_IP4_PROTOCOL instance.00364 @param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.00365 @param GroupAddress The pointer to the IPv4 multicast address.00366 00367 @retval EFI_SUCCESS The operation completed successfully.00368 @retval EFI_INVALID_PARAMETER One or more of the following is TRUE:00369 - This is NULL.00370 - JoinFlag is TRUE and GroupAddress is NULL.00371 - GroupAddress is not NULL and *GroupAddress is00372 not a multicast IPv4 address.00373 @retval EFI_NOT_STARTED This instance has not been started.00374 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,00375 RARP, etc.) is not finished yet.00376 @retval EFI_OUT_OF_RESOURCES System resources could not be allocated.00377 @retval EFI_UNSUPPORTED This EFI IPv4 Protocol implementation does not support multicast groups.00378 @retval EFI_ALREADY_STARTED The group address is already in the group table (when00379 JoinFlag is TRUE).00380 @retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is FALSE).00381 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.00382 00383 **/00384 typedef00385 EFI_STATUS00386 (EFIAPI *EFI_IP4_GROUPS)(
00387 INEFI_IP4_PROTOCOL *This,
00388 INBOOLEAN JoinFlag,
00389 INEFI_IPv4_ADDRESS *GroupAddress OPTIONAL00390 );
00391 00392 /**00393 Adds and deletes routing table entries.00394 00395 The Routes() function adds a route to or deletes a route from the routing table.00396 00397 Routes are determined by comparing the SubnetAddress with the destination IPv400398 address arithmetically AND-ed with the SubnetMask. The gateway address must be00399 on the same subnet as the configured station address.00400 00401 The default route is added with SubnetAddress and SubnetMask both set to 0.0.0.0.00402 The default route matches all destination IPv4 addresses that do not match any00403 other routes.00404 00405 A GatewayAddress that is zero is a nonroute. Packets are sent to the destination00406 IP address if it can be found in the ARP cache or on the local subnet. One automatic00407 nonroute entry will be inserted into the routing table for outgoing packets that00408 are addressed to a local subnet (gateway address of 0.0.0.0).00409 00410 Each EFI IPv4 Protocol instance has its own independent routing table. Those EFI00411 IPv4 Protocol instances that use the default IPv4 address will also have copies00412 of the routing table that was provided by the EFI_IP4_CONFIG_PROTOCOL, and these00413 copies will be updated whenever the EIF IPv4 Protocol driver reconfigures its00414 instances. As a result, client modification to the routing table will be lost.00415 00416 @param This The pointer to the EFI_IP4_PROTOCOL instance.00417 @param DeleteRoute Set to TRUE to delete this route from the routing table. Set to00418 FALSE to add this route to the routing table. SubnetAddress00419 and SubnetMask are used as the key to each route entry.00420 @param SubnetAddress The address of the subnet that needs to be routed.00421 @param SubnetMask The subnet mask of SubnetAddress.00422 @param GatewayAddress The unicast gateway IPv4 address for this route.00423 00424 @retval EFI_SUCCESS The operation completed successfully.00425 @retval EFI_NOT_STARTED The driver instance has not been started.00426 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,00427 RARP, etc.) is not finished yet.00428 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:00429 - This is NULL.00430 - SubnetAddress is NULL.00431 - SubnetMask is NULL.00432 - GatewayAddress is NULL.00433 - *SubnetAddress is not a valid subnet address.00434 - *SubnetMask is not a valid subnet mask.00435 - *GatewayAddress is not a valid unicast IPv4 address.00436 @retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table.00437 @retval EFI_NOT_FOUND This route is not in the routing table (when DeleteRoute is TRUE).00438 @retval EFI_ACCESS_DENIED The route is already defined in the routing table (when00439 DeleteRoute is FALSE).00440 00441 **/00442 typedef00443 EFI_STATUS00444 (EFIAPI *EFI_IP4_ROUTES)(
00445 INEFI_IP4_PROTOCOL *This,
00446 INBOOLEAN DeleteRoute,
00447 INEFI_IPv4_ADDRESS *SubnetAddress,
00448 INEFI_IPv4_ADDRESS *SubnetMask,
00449 INEFI_IPv4_ADDRESS *GatewayAddress
00450 );
00451 00452 /**00453 Places outgoing data packets into the transmit queue.00454 00455 The Transmit() function places a sending request in the transmit queue of this00456 EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some00457 errors occur, the event in the token will be signaled and the status is updated.00458 00459 @param This The pointer to the EFI_IP4_PROTOCOL instance.00460 @param Token The pointer to the transmit token.00461 00462 @retval EFI_SUCCESS The data has been queued for transmission.00463 @retval EFI_NOT_STARTED This instance has not been started.00464 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,00465 RARP, etc.) is not finished yet.00466 @retval EFI_INVALID_PARAMETER One or more pameters are invalid.00467 @retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event00468 was already in the transmit queue.00469 @retval EFI_NOT_READY The completion token could not be queued because the transmit00470 queue is full.00471 @retval EFI_NOT_FOUND Not route is found to destination address.00472 @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.00473 @retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too00474 short to transmit.00475 @retval EFI_BAD_BUFFER_SIZE The length of the IPv4 header + option length + total data length is00476 greater than MTU (or greater than the maximum packet size if00477 Token.Packet.TxData.OverrideData.00478 DoNotFragment is TRUE.)00479 00480 **/00481 typedef00482 EFI_STATUS00483 (EFIAPI *EFI_IP4_TRANSMIT)(
00484 INEFI_IP4_PROTOCOL *This,
00485 INEFI_IP4_COMPLETION_TOKEN *Token00486 );
00487 00488 /**00489 Places a receiving request into the receiving queue.00490 00491 The Receive() function places a completion token into the receive packet queue.00492 This function is always asynchronous.00493 00494 The Token.Event field in the completion token must be filled in by the caller00495 and cannot be NULL. When the receive operation completes, the EFI IPv4 Protocol00496 driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event00497 is signaled.00498 00499 @param This The pointer to the EFI_IP4_PROTOCOL instance.00500 @param Token The pointer to a token that is associated with the receive data descriptor.00501 00502 @retval EFI_SUCCESS The receive completion token was cached.00503 @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.00504 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, RARP, etc.)00505 is not finished yet.00506 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:00507 - This is NULL.00508 - Token is NULL.00509 - Token.Event is NULL.00510 @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system00511 resources (usually memory).00512 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.00513 The EFI IPv4 Protocol instance has been reset to startup defaults.00514 @retval EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already00515 in the receive queue.00516 @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.00517 @retval EFI_ICMP_ERROR An ICMP error packet was received.00518 00519 **/00520 typedef00521 EFI_STATUS00522 (EFIAPI *EFI_IP4_RECEIVE)(
00523 INEFI_IP4_PROTOCOL *This,
00524 INEFI_IP4_COMPLETION_TOKEN *Token00525 );
00526 00527 /**00528 Abort an asynchronous transmit or receive request.00529 00530 The Cancel() function is used to abort a pending transmit or receive request.00531 If the token is in the transmit or receive request queues, after calling this00532 function, Token->Status will be set to EFI_ABORTED and then Token->Event will00533 be signaled. If the token is not in one of the queues, which usually means the00534 asynchronous operation has completed, this function will not signal the token00535 and EFI_NOT_FOUND is returned.00536 00537 @param This The pointer to the EFI_IP4_PROTOCOL instance.00538 @param Token The pointer to a token that has been issued by00539 EFI_IP4_PROTOCOL.Transmit() or00540 EFI_IP4_PROTOCOL.Receive(). If NULL, all pending00541 tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is00542 defined in EFI_IP4_PROTOCOL.Transmit().00543 00544 @retval EFI_SUCCESS The asynchronous I/O request was aborted and00545 Token->Event was signaled. When Token is NULL, all00546 pending requests were aborted and their events were signaled.00547 @retval EFI_INVALID_PARAMETER This is NULL.00548 @retval EFI_NOT_STARTED This instance has not been started.00549 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,00550 RARP, etc.) is not finished yet.00551 @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was00552 not found in the transmit or receive queue. It has either completed00553 or was not issued by Transmit() and Receive().00554 00555 **/00556 typedef00557 EFI_STATUS00558 (EFIAPI *EFI_IP4_CANCEL)(
00559 INEFI_IP4_PROTOCOL *This,
00560 INEFI_IP4_COMPLETION_TOKEN *TokenOPTIONAL00561 );
00562 00563 /**00564 Polls for incoming data packets and processes outgoing data packets.00565 00566 The Poll() function polls for incoming data packets and processes outgoing data00567 packets. Network drivers and applications can call the EFI_IP4_PROTOCOL.Poll()00568 function to increase the rate that data packets are moved between the communications00569 device and the transmit and receive queues.00570 00571 In some systems the periodic timer event may not poll the underlying communications00572 device fast enough to transmit and/or receive all data packets without missing00573 incoming packets or dropping outgoing packets. Drivers and applications that are00574 experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function00575 more often.00576 00577 @param This The pointer to the EFI_IP4_PROTOCOL instance.00578 00579 @retval EFI_SUCCESS Incoming or outgoing data was processed.00580 @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.00581 @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,00582 RARP, etc.) is not finished yet.00583 @retval EFI_INVALID_PARAMETER This is NULL.00584 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.00585 @retval EFI_NOT_READY No incoming or outgoing data is processed.00586 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.00587 Consider increasing the polling rate.00588 00589 **/00590 typedef00591 EFI_STATUS00592 (EFIAPI *EFI_IP4_POLL)(
00593 INEFI_IP4_PROTOCOL *This
00594 );
00595 00596 ///00597 /// The EFI IPv4 Protocol implements a simple packet-oriented interface that can be00598 /// used by drivers, daemons, and applications to transmit and receive network packets.00599 ///00600struct _EFI_IP4_PROTOCOL {
00601 EFI_IP4_GET_MODE_DATA GetModeData;
00602 EFI_IP4_CONFIGURE Configure;
00603 EFI_IP4_GROUPS Groups;
00604 EFI_IP4_ROUTES Routes;
00605 EFI_IP4_TRANSMIT Transmit;
00606 EFI_IP4_RECEIVE Receive;
00607 EFI_IP4_CANCEL Cancel;
00608 EFI_IP4_POLL Poll;
00609 };
00610
00611 externEFI_GUIDgEfiIp4ServiceBindingProtocolGuid;
00612 externEFI_GUIDgEfiIp4ProtocolGuid;
00613
00614 #endif