- This is the SNP interface routine for receiving network data.\r
- This routine basically retrieves snp structure, checks the SNP state and\r
- calls the pxe_receive routine to actually do the receive!\r
-\r
- @param this context pointer\r
- @param HeaderSizePtr optional parameter and is a pointer to the header\r
- portion of the data received.\r
- @param BuffSizePtr is a pointer to the length of the buffer on entry and\r
- contains the length of the received data on return\r
- @param BufferPtr pointer to the memory for the received data\r
- @param SourceAddrPtr optional parameter, is a pointer to contain the\r
- source ethernet address on return\r
- @param DestinationAddrPtr optional parameter, is a pointer to contain the\r
- destination ethernet address on return\r
- @param ProtocolPtr optional parameter, is a pointer to contain the\r
- protocol type from the ethernet header on return\r
-\r
+ Receives a packet from a network interface.\r
+\r
+ This function retrieves one packet from the receive queue of a network interface.\r
+ If there are no packets on the receive queue, then EFI_NOT_READY will be \r
+ returned. If there is a packet on the receive queue, and the size of the packet\r
+ is smaller than BufferSize, then the contents of the packet will be placed in\r
+ Buffer, and BufferSize will be updated with the actual size of the packet.\r
+ In addition, if SrcAddr, DestAddr, and Protocol are not NULL, then these values\r
+ will be extracted from the media header and returned. EFI_SUCCESS will be \r
+ returned if a packet was successfully received.\r
+ If BufferSize is smaller than the received packet, then the size of the receive\r
+ packet will be placed in BufferSize and EFI_BUFFER_TOO_SMALL will be returned.\r
+ If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.\r
+\r
+ @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.\r
+ @param HeaderSize The size, in bytes, of the media header received on the network \r
+ interface. If this parameter is NULL, then the media header size \r
+ will not be returned.\r
+ @param BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in \r
+ bytes, of the packet that was received on the network interface.\r
+ @param Buffer A pointer to the data buffer to receive both the media\r
+ header and the data.\r
+ @param SrcAddr The source HW MAC address. If this parameter is NULL, the HW\r
+ MAC source address will not be extracted from the media header. \r
+ @param DestAddr The destination HW MAC address. If this parameter is NULL, \r
+ the HW MAC destination address will not be extracted from \r
+ the media header.\r
+ @param Protocol The media header type. If this parameter is NULL, then the \r
+ protocol will not be extracted from the media header. See \r
+ RFC 1700 section "Ether Types" for examples.\r
+\r
+ @retval EFI_SUCCESS The received data was stored in Buffer, and \r
+ BufferSize has been updated to the number of \r
+ bytes received.\r
+ @retval EFI_NOT_STARTED The network interface has not been started.\r
+ @retval EFI_NOT_READY No packets have been received on the network interface.\r
+ @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the received packets. \r
+ BufferSize has been updated to the required size.\r
+ @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+ * The This parameter is NULL\r
+ * The This parameter does not point to a valid \r
+ EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
+ * The BufferSize parameter is NULL\r
+ * The Buffer parameter is NULL\r
+ @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r