+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiIp4Routes (\r
+ IN EFI_IP4_PROTOCOL *This,\r
+ IN BOOLEAN DeleteRoute,\r
+ IN EFI_IPv4_ADDRESS *SubnetAddress,\r
+ IN EFI_IPv4_ADDRESS *SubnetMask,\r
+ IN EFI_IPv4_ADDRESS *GatewayAddress\r
+ );\r
+\r
+/**\r
+ Places outgoing data packets into the transmit queue.\r
+\r
+ The Transmit() function places a sending request in the transmit queue of this\r
+ EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some\r
+ errors occur, the event in the token will be signaled and the status is updated.\r
+\r
+ @param[in] This Pointer to the EFI_IP4_PROTOCOL instance.\r
+ @param[in] Token Pointer to the transmit token.\r
+\r
+ @retval EFI_SUCCESS The data has been queued for transmission.\r
+ @retval EFI_NOT_STARTED This instance has not been started.\r
+ @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,\r
+ RARP, etc.) is not finished yet.\r
+ @retval EFI_INVALID_PARAMETER One or more pameters are invalid.\r
+ @retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event\r
+ was already in the transmit queue.\r
+ @retval EFI_NOT_READY The completion token could not be queued because the transmit\r
+ queue is full.\r
+ @retval EFI_NOT_FOUND Not route is found to destination address.\r
+ @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.\r
+ @retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too\r
+ short to transmit.\r
+ @retval EFI_BAD_BUFFER_SIZE The length of the IPv4 header + option length + total data length is\r
+ greater than MTU (or greater than the maximum packet size if\r
+ Token.Packet.TxData.OverrideData.\r
+ DoNotFragment is TRUE.)\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiIp4Transmit (\r
+ IN EFI_IP4_PROTOCOL *This,\r
+ IN EFI_IP4_COMPLETION_TOKEN *Token\r
+ );\r
+\r
+/**\r
+ Places a receiving request into the receiving queue.\r
+\r
+ The Receive() function places a completion token into the receive packet queue.\r
+ This function is always asynchronous.\r
+\r
+ The Token.Event field in the completion token must be filled in by the caller\r
+ and cannot be NULL. When the receive operation completes, the EFI IPv4 Protocol\r
+ driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event\r
+ is signaled.\r
+\r
+ @param[in] This Pointer to the EFI_IP4_PROTOCOL instance.\r
+ @param[in] Token Pointer to a token that is associated with the receive data descriptor.\r
+\r
+ @retval EFI_SUCCESS The receive completion token was cached.\r
+ @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.\r
+ @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, RARP, etc.)\r
+ is not finished yet.\r
+ @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+ - This is NULL.\r
+ - Token is NULL.\r
+ - Token.Event is NULL.\r
+ @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system\r
+ resources (usually memory).\r
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
+ The EFI IPv4 Protocol instance has been reset to startup defaults.\r
+ EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already\r
+ in the receive queue.\r
+ @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.\r
+ @retval EFI_ICMP_ERROR An ICMP error packet was received.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiIp4Receive (\r
+ IN EFI_IP4_PROTOCOL *This,\r
+ IN EFI_IP4_COMPLETION_TOKEN *Token\r
+ );\r
+\r
+/**\r
+ Abort an asynchronous transmit or receive request.\r
+\r
+ The Cancel() function is used to abort a pending transmit or receive request.\r
+ If the token is in the transmit or receive request queues, after calling this\r
+ function, Token->Status will be set to EFI_ABORTED and then Token->Event will\r
+ be signaled. If the token is not in one of the queues, which usually means the\r
+ asynchronous operation has completed, this function will not signal the token\r
+ and EFI_NOT_FOUND is returned.\r
+\r
+ @param[in] This Pointer to the EFI_IP4_PROTOCOL instance.\r
+ @param[in] Token Pointer to a token that has been issued by\r
+ EFI_IP4_PROTOCOL.Transmit() or\r
+ EFI_IP4_PROTOCOL.Receive(). If NULL, all pending\r
+ tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is\r
+ defined in EFI_IP4_PROTOCOL.Transmit().\r
+\r
+ @retval EFI_SUCCESS The asynchronous I/O request was aborted and\r
+ Token.->Event was signaled. When Token is NULL, all\r
+ pending requests were aborted and their events were signaled.\r
+ @retval EFI_INVALID_PARAMETER This is NULL.\r
+ @retval EFI_NOT_STARTED This instance has not been started.\r
+ @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,\r
+ RARP, etc.) is not finished yet.\r
+ @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was\r
+ not found in the transmit or receive queue. It has either completed\r
+ or was not issued by Transmit() and Receive().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiIp4Cancel (\r
+ IN EFI_IP4_PROTOCOL *This,\r
+ IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL\r
+ );\r
+\r
+/**\r
+ Polls for incoming data packets and processes outgoing data packets.\r
+\r
+ The Poll() function polls for incoming data packets and processes outgoing data\r
+ packets. Network drivers and applications can call the EFI_IP4_PROTOCOL.Poll()\r
+ function to increase the rate that data packets are moved between the communications\r
+ device and the transmit and receive queues.\r
+\r
+ In some systems the periodic timer event may not poll the underlying communications\r
+ device fast enough to transmit and/or receive all data packets without missing\r
+ incoming packets or dropping outgoing packets. Drivers and applications that are\r
+ experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function\r
+ more often.\r
+\r
+ @param[in] This Pointer to the EFI_IP4_PROTOCOL instance.\r
+\r
+ @retval EFI_SUCCESS Incoming or outgoing data was processed.\r
+ @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.\r
+ @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,\r
+ RARP, etc.) is not finished yet.\r
+ @retval EFI_INVALID_PARAMETER This is NULL.\r
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
+ @retval EFI_NOT_READY No incoming or outgoing data is processed.\r
+ @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r
+ Consider increasing the polling rate.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiIp4Poll (\r
+ IN EFI_IP4_PROTOCOL *This\r
+ );\r
+\r
+EFI_IP4_PROTOCOL\r
+mEfiIp4ProtocolTemplete = {\r
+ EfiIp4GetModeData,\r
+ EfiIp4Configure,\r
+ EfiIp4Groups,\r
+ EfiIp4Routes,\r
+ EfiIp4Transmit,\r
+ EfiIp4Receive,\r
+ EfiIp4Cancel,\r
+ EfiIp4Poll\r
+};\r
+\r
+/**\r
+ Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.\r
+\r
+ The GetModeData() function returns the current operational mode data for this\r
+ driver instance. The data fields in EFI_IP4_MODE_DATA are read only. This\r
+ function is used optionally to retrieve the operational mode data of underlying\r
+ networks or drivers.\r
+\r
+ @param[in] This Pointer to the EFI_IP4_PROTOCOL instance.\r
+ @param[out] Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.\r
+ @param[out] MnpConfigData Pointer to the managed network configuration data structure.\r
+ @param[out] SnpModeData Pointer to the simple network mode data structure.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_INVALID_PARAMETER This is NULL.\r
+ @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.\r