12#ifndef _VIRTIO_NET_DXE_H_
13#define _VIRTIO_NET_DXE_H_
25#define VNET_SIG SIGNATURE_32 ('V', 'N', 'E', 'T')
30#define VNET_MAX_PENDING 64
111#define VIRTIO_NET_FROM_SNP(SnpPointer) \
112 CR (SnpPointer, VNET_DEV, Snp, VNET_SIG)
114#define VIRTIO_CFG_WRITE(Dev, Field, Value) ((Dev)->VirtIo->WriteDevice ( \
116 OFFSET_OF_VNET (Field), \
117 SIZE_OF_VNET (Field), \
121#define VIRTIO_CFG_READ(Dev, Field, Pointer) ((Dev)->VirtIo->ReadDevice ( \
123 OFFSET_OF_VNET (Field), \
124 SIZE_OF_VNET (Field), \
159 IN UINTN ExtraRxBufferSize OPTIONAL,
160 IN UINTN ExtraTxBufferSize OPTIONAL
167 IN BOOLEAN ExtendedVerification
182 IN BOOLEAN ResetMCastFilter,
183 IN UINTN MCastFilterCnt OPTIONAL,
217 IN BOOLEAN ReadWrite,
227 OUT UINT32 *InterruptStatus OPTIONAL,
228 OUT VOID **TxBuf OPTIONAL
240 IN UINT16 *Protocol OPTIONAL
252 OUT UINT16 *Protocol OPTIONAL
UINT64 EFI_PHYSICAL_ADDRESS
EFI_STATUS EFIAPI VirtioNetStationAddress(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL)
EFI_STATUS EFIAPI VirtioNetMapTxBuf(IN VNET_DEV *Dev, IN VOID *Buffer, IN UINTN NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress)
EFI_STATUS EFIAPI VirtioNetInitialize(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraTxBufferSize OPTIONAL)
INTN EFIAPI VirtioNetTxBufMapInfoCompare(IN CONST VOID *UserStruct1, IN CONST VOID *UserStruct2)
EFI_STATUS EFIAPI VirtioNetReceiveFilters(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINT32 Enable, IN UINT32 Disable, IN BOOLEAN ResetMCastFilter, IN UINTN MCastFilterCnt OPTIONAL, IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL)
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)
EFI_STATUS EFIAPI VirtioNetStatistics(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN OUT UINTN *StatisticsSize OPTIONAL, OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL)
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)
EFI_STATUS EFIAPI VirtioNetStop(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
VOID EFIAPI VirtioNetIsPacketAvailable(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI VirtioNetStart(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
VOID EFIAPI VirtioNetShutdownRx(IN OUT VNET_DEV *Dev)
EFI_STATUS EFIAPI VirtioNetNvData(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ReadWrite, IN UINTN Offset, IN UINTN BufferSize, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI VirtioNetMcastIpToMac(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN IPv6, IN EFI_IP_ADDRESS *Ip, OUT EFI_MAC_ADDRESS *Mac)
EFI_STATUS EFIAPI VirtioNetUnmapTxBuf(IN VNET_DEV *Dev, OUT VOID **Buffer, IN EFI_PHYSICAL_ADDRESS DeviceAddress)
INTN EFIAPI VirtioNetTxBufDeviceAddressCompare(IN CONST VOID *StandaloneKey, IN CONST VOID *UserStruct)
VOID EFIAPI VirtioNetUninitRing(IN OUT VNET_DEV *Dev, IN OUT VRING *Ring, IN VOID *RingMap)
EFI_STATUS EFIAPI VirtioNetShutdown(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
EFI_STATUS EFIAPI VirtioNetReset(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI VirtioNetGetStatus(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINT32 *InterruptStatus OPTIONAL, OUT VOID **TxBuf OPTIONAL)