A.3.10 SimpleNetwork.c File

Example A-22-Simple Network Protocol implementation template

/** @file
<<BriefDescription>>
<<DetailedDescription>>
<<Copyright>>
<<License>>
**/
#include "<<DriverName>>.h"
///
/// Simple Network Protocol instance
///
GLOBAL_REMOVE_IF_UNREFERENCED
EFI_SIMPLE_NETWORK_PROTOCOL g<<DriverName>>SimpleNetwork = {
EFI_SIMPLE_NETWORK_PROTOCOL_REVISION, // Revision
<<DriverName>>SimpleNetworkStart, // Start
<<DriverName>>SimpleNetworkStop, // Stop
<<DriverName>>SimpleNetworkInitialize, // Initialize
<<DriverName>>SimpleNetworkReset, // Reset
<<DriverName>>SimpleNetworkShutdown, // Shutdown
<<DriverName>>SimpleNetworkReceiveFilters, // ReceiveFilters
<<DriverName>>SimpleNetworkStationAddress, // StationAddress
<<DriverName>>SimpleNetworkStatistics, // Statistics
<<DriverName>>SimpleNetworkMCastIpToMac, // MCastIpToMac
<<DriverName>>SimpleNetworkNvData, // NvData
<<DriverName>>SimpleNetworkGetStatus, // GetStatus
<<DriverName>>SimpleNetworkTransmit, // Transmit
<<DriverName>>SimpleNetworkReceive, // Receive
NULL, // WaitForPacket
NULL // Mode
};
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkStart (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkStop (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkInitialize (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN ExtraRxBufferSize, OPTIONAL
IN UINTN ExtraTxBufferSize OPTIONAL
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkReset (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
IN BOOLEAN ExtendedVerification
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkShutdown (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkReceiveFilters (
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
<<DriverName>>SimpleNetworkStationAddress (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN EFI_MAC_ADDRESS *New OPTIONAL
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkStatistics (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN OUT UINTN *StatisticsSize, OPTIONAL
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkMCastIpToMac (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN IPv6,
IN EFI_IP_ADDRESS *IP,
OUT EFI_MAC_ADDRESS *MAC
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkNvData (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ReadWrite,
IN UINTN Offset
IN UINTN BufferSize,
IN OUT VOID *Buffer
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkGetStatus (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINT32 *InterruptStatus, OPTIONAL
OUT VOID **TxBuf OPTIONAL
)
{
}
EFI_STATUS
EFIAPI
<<DriverName>>SimpleNetworkTransmit (
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
<<DriverName>>SimpleNetworkReceive (
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
)
{
}