TianoCore EDK2 master
Loading...
Searching...
No Matches
SnpReceive.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI VirtioNetReceive (IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINTN *HeaderSize OPTIONAL, IN OUT UINTN *BufferSize, OUT VOID *Buffer, OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL, OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL, OUT UINT16 *Protocol OPTIONAL)
 

Detailed Description

Implementation of the SNP.Receive() function and its private helpers if any.

Copyright (C) 2013, Red Hat, Inc. Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SnpReceive.c.

Function Documentation

◆ VirtioNetReceive()

EFI_STATUS EFIAPI VirtioNetReceive ( IN EFI_SIMPLE_NETWORK_PROTOCOL This,
OUT UINTN *HeaderSize  OPTIONAL,
IN OUT UINTN BufferSize,
OUT VOID *  Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr  OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr  OPTIONAL,
OUT UINT16 *Protocol  OPTIONAL 
)

Receives a packet from a network interface.

Parameters
ThisThe protocol instance pointer.
HeaderSizeThe size, in bytes, of the media header received on the network interface. If this parameter is NULL, then the media header size will not be returned.
BufferSizeOn entry, the size, in bytes, of Buffer. On exit, the size, in bytes, of the packet that was received on the network interface.
BufferA pointer to the data buffer to receive both the media header and the data.
SrcAddrThe source HW MAC address. If this parameter is NULL, the HW MAC source address will not be extracted from the media header.
DestAddrThe destination HW MAC address. If this parameter is NULL, the HW MAC destination address will not be extracted from the media header.
ProtocolThe media header type. If this parameter is NULL, then the protocol will not be extracted from the media header. See RFC 1700 section "Ether Types" for examples.
Return values
EFI_SUCCESSThe received data was stored in Buffer, and BufferSize has been updated to the number of bytes received.
EFI_NOT_STARTEDThe network interface has not been started.
EFI_NOT_READYThe network interface is too busy to accept this transmit request.
EFI_BUFFER_TOO_SMALLThe BufferSize parameter is too small.
EFI_INVALID_PARAMETEROne or more of the parameters has an unsupported value.
EFI_DEVICE_ERRORThe command could not be sent to the network interface.
EFI_UNSUPPORTEDThis function is not supported by the network interface.

Definition at line 57 of file SnpReceive.c.