20#ifndef __SIMPLE_NETWORK_H__
21#define __SIMPLE_NETWORK_H__
26#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
28 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
153#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
154#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
155#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
156#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
157#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
159#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
160#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
161#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
162#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
164#define MAX_MCAST_FILTER_CNT 16
633#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000
638#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
unsigned short UINT16
2-byte unsigned value.
unsigned char BOOLEAN
Logical Boolean.
UINT64 UINTN
Unsigned value of native width.
unsigned long long UINT64
8-byte unsigned value.
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
EFI_GUID gEfiSimpleNetworkProtocolGuid
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_RECEIVE_FILTERS)(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)
Manages the multicast receive filters of a network interface.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_SHUTDOWN)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Resets a network adapter and leaves it in a state that is safe for another driver to initialize.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_START)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Changes the state of a network interface from "stopped" to "started".
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_GET_STATUS)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINT32 *InterruptStatus OPTIONAL, OUT VOID **TxBuf OPTIONAL)
Reads the current interrupt status and recycled transmit buffer status from a network interface.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_NVDATA)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ReadWrite, IN UINTN Offset, IN UINTN BufferSize, IN OUT VOID *Buffer)
Performs read and write operations on the NVRAM device attached to a network interface.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STATION_ADDRESS)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL)
Modifies or resets the current station address, if supported.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_RESET)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
Resets a network adapter and re-initializes it with the parameters that were provided in the previous...
EFI_SIMPLE_NETWORK_STATE
The state of the network interface.
@ EfiSimpleNetworkInitialized
@ EfiSimpleNetworkStarted
@ EfiSimpleNetworkStopped
@ EfiSimpleNetworkMaxState
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_INITIALIZE)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraTxBufferSize OPTIONAL)
Resets a network adapter and allocates the transmit and receive buffers required by the network inter...
struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL
EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK
Protocol defined in EFI1.1.
#define MAX_MCAST_FILTER_CNT
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STATISTICS)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN OUT UINTN *StatisticsSize OPTIONAL, OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL)
Resets or collects the statistics on a network interface.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_TRANSMIT)(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.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN IPv6, IN EFI_IP_ADDRESS *IP, OUT EFI_MAC_ADDRESS *MAC)
Converts a multicast IP address to a multicast HW MAC address.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_RECEIVE)(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.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STOP)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Changes the state of a network interface from "started" to "stopped".
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
UINT16_t BufferSize
Buffer size.
UINT8_t Protocol
Protocol.
SEGOFF16_t Buffer
Buffer address.
SEGOFF16_t DestAddr
Destination MAC address.
32-byte buffer containing a network Media Access Control address.
Simple Network Protocol data structures.
UINT64 TxErrorFrames
Number of frames that failed to transmit after exceeding the retry limit.
UINT64 RxTotalFrames
Total number of frames received.
UINT64 RxTotalBytes
Total number of bytes received.
UINT64 RxDroppedFrames
Valid frames that were dropped because receive buffers were full.
UINT64 TxRetryFrames
Number of frames transmitted successfully after more than one attempt.
UINT64 TxTotalFrames
Transmit statistics.
UINT64 RxDuplicatedFrames
Number of valid frames received that were duplicated.
UINT64 RxCrcErrorFrames
Number of frames w/ CRC or alignment errors.
UINT64 RxGoodFrames
Number of valid frames received and copied into receive buffers.
UINT64 UnsupportedProtocol
Number of frames destined for unsupported protocol.
UINT64 RxOversizeFrames
Number of frames longer than the maxminum length for the media.
UINT64 RxMulticastFrames
Number of valid mutlicast frames received and not dropped.
UINT64 RxUndersizeFrames
Number of frames below the minimum length for the media.
UINT64 Collisions
Number of collisions detection on this subnet.
UINT64 RxUnicastFrames
Number of valid unicast frames received and not dropped.
UINT64 RxBroadcastFrames
Number of valid broadcast frames received and not dropped.
UINT64 RxDecryptErrorFrames
Number of encrypted frames received that failed to decrypt.
BOOLEAN MacAddressChangeable
TRUE if the HW MAC address can be changed.
EFI_MAC_ADDRESS CurrentAddress
The current HW MAC address for the network interface.
EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]
Array containing the addresses of the current multicast address receive filters.
UINT32 NvRamAccessSize
The size that must be used for all NVRAM reads and writes.
BOOLEAN MultipleTxSupported
TRUE if the network interface can transmit more than one packet at a time.
UINT32 ReceiveFilterMask
The multicast receive filter settings supported by the network interface.
UINT32 NvRamSize
The size, in bytes, of the NVRAM device attached to the network interface.
UINT32 MediaHeaderSize
The size, in bytes, of the network interface's media header.
BOOLEAN MediaPresent
TRUE if media are connected to the network interface; otherwise FALSE.
UINT8 IfType
The interface type of the network interface.
UINT32 State
Reports the current state of the network interface.
UINT32 MaxMCastFilterCount
The maximum number of multicast address receive filters supported by the driver.
BOOLEAN MediaPresentSupported
TRUE if the presence of media can be determined; otherwise FALSE.
EFI_MAC_ADDRESS PermanentAddress
The permanent HW MAC address for the network interface.
UINT32 MCastFilterCount
The current number of multicast address receive filters.
UINT32 MaxPacketSize
The maximum size, in bytes, of the packets supported by the network interface.
EFI_MAC_ADDRESS BroadcastAddress
The current HW MAC address for broadcast packets.
UINT32 HwAddressSize
The size, in bytes, of the network interface's HW address.
UINT32 ReceiveFilterSetting
The current multicast receive filter settings.
The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access to a network adapter.
EFI_SIMPLE_NETWORK_INITIALIZE Initialize
UINT64 Revision
Revision of the EFI_SIMPLE_NETWORK_PROTOCOL.
EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac
EFI_SIMPLE_NETWORK_RECEIVE Receive
EFI_SIMPLE_NETWORK_STATISTICS Statistics
EFI_SIMPLE_NETWORK_NVDATA NvData
EFI_SIMPLE_NETWORK_START Start
EFI_EVENT WaitForPacket
Event used with WaitForEvent() to wait for a packet to be received.
EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters
EFI_SIMPLE_NETWORK_MODE * Mode
Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown
EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress
EFI_SIMPLE_NETWORK_TRANSMIT Transmit
EFI_SIMPLE_NETWORK_STOP Stop
EFI_SIMPLE_NETWORK_GET_STATUS GetStatus
EFI_SIMPLE_NETWORK_RESET Reset
16-byte buffer aligned on a 4-byte boundary.