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

Go to the source code of this file.

Functions

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

Detailed Description

Implementation of the SNP.Transmit() 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 SnpTransmit.c.

Function Documentation

◆ VirtioNetTransmit()

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

Places a packet in the transmit queue of a network interface.

Parameters
ThisThe protocol instance pointer.
HeaderSizeThe size, in bytes, of the media header to be filled in by the Transmit() function. If HeaderSize is non-zero, then it must be equal to This->Mode->MediaHeaderSize and the DestAddr and Protocol parameters must not be NULL.
BufferSizeThe size, in bytes, of the entire packet (media header and data) to be transmitted through the network interface.
BufferA pointer to the packet (media header followed by data) to be transmitted. This parameter cannot be NULL. If HeaderSize is zero, then the media header in Buffer must already be filled in by the caller. If HeaderSize is non-zero, then the media header will be filled in by the Transmit() function.
SrcAddrThe source HW MAC address. If HeaderSize is zero, then this parameter is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then This->Mode->CurrentAddress is used for the source HW MAC address.
DestAddrThe destination HW MAC address. If HeaderSize is zero, then this parameter is ignored.
ProtocolThe type of header to build. If HeaderSize is zero, then this parameter is ignored. See RFC 1700, section "Ether Types", for examples.
Return values
EFI_SUCCESSThe packet was placed on the transmit queue.
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 59 of file SnpTransmit.c.