20 #ifndef __SIMPLE_NETWORK_H__ 21 #define __SIMPLE_NETWORK_H__ 25 #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ 27 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \ 152 #define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01 153 #define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02 154 #define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04 155 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 156 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10 158 #define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 159 #define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 160 #define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 161 #define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 163 #define MAX_MCAST_FILTER_CNT 16 632 #define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000 637 #define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION #define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress
UINT32 NvRamSize
The size, in bytes, of the NVRAM device attached to the network interface.
The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access to a network adapter.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_START)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Changes the state of a network interface from "stopped" to "started".
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.
128 bit buffer containing a unique identifier value.
32-byte buffer containing a network Media Access Control address.
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.
VOID * EFI_EVENT
Handle to an event structure.
UINT64 RxDuplicatedFrames
Number of valid frames received that were duplicated.
UINT64 RxUnicastFrames
Number of valid unicast frames received and not dropped.
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.
UINT64 RxOversizeFrames
Number of frames longer than the maxminum length for the media.
UINT64 RxTotalBytes
Total number of bytes received.
UINT16_t BufferSize
Buffer size.
BOOLEAN MediaPresentSupported
TRUE if the presence of media can be determined; otherwise FALSE.
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.
UINT32 State
Reports the current state of the network interface.
EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK
Protocol defined in EFI1.1.
FILE_LICENCE(BSD2_PATENT)
EFI_MAC_ADDRESS CurrentAddress
The current HW MAC address for the 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_SIMPLE_NETWORK_MODE * Mode
Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
EFI_MAC_ADDRESS BroadcastAddress
The current HW MAC address for broadcast packets.
UINT64 RxGoodFrames
Number of valid frames received and copied into receive buffers.
BOOLEAN MultipleTxSupported
TRUE if the network interface can transmit more than one packet at a time.
UINT8 IfType
The interface type of the network interface.
UINT32 MaxPacketSize
The maximum size, in bytes, of the packets supported by the network interface.
UINT64 Collisions
Number of collisions detection on this subnet.
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...
UINT32 ReceiveFilterSetting
The current multicast receive filter settings.
UINT64 TxRetryFrames
Number of frames transmitted successfully after more than one attempt.
UINT32 MCastFilterCount
The current number of multicast address receive filters.
EFI_SIMPLE_NETWORK_INITIALIZE Initialize
EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac
16-byte buffer aligned on a 4-byte boundary.
EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown
UINT64 TxErrorFrames
Number of frames that failed to transmit after exceeding the retry limit.
EFI_SIMPLE_NETWORK_GET_STATUS GetStatus
UINT64 TxTotalFrames
Transmit statistics.
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.
#define MAX_MCAST_FILTER_CNT
SEGOFF16_t DestAddr
Destination MAC address.
EFI_SIMPLE_NETWORK_TRANSMIT Transmit
UINT64 RxDroppedFrames
Valid frames that were dropped because receive buffers were full.
UINT64 RxBroadcastFrames
Number of valid broadcast frames received and not dropped.
BOOLEAN MacAddressChangeable
TRUE if the HW MAC address can be changed.
UINT64 RxDecryptErrorFrames
Number of encrypted frames received that failed to decrypt.
UINT64 RxTotalFrames
Total number of frames received.
UINT8_t Protocol
Protocol.
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_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.
SEGOFF16_t Buffer
Buffer address.
UINT32 NvRamAccessSize
The size that must be used for all NVRAM reads and writes.
UINT64 UINTN
Unsigned value of native width.
EFI_SIMPLE_NETWORK_START Start
#define VOID
Undeclared type.
unsigned long long UINT64
EFI_GUID gEfiSimpleNetworkProtocolGuid
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STOP)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Changes the state of a network interface from "started" to "stopped".
EFI_SIMPLE_NETWORK_RECEIVE Receive
UINT32 HwAddressSize
The size, in bytes, of the network interface's HW address.
UINT32 MaxMCastFilterCount
The maximum number of multicast address receive filters supported by the driver.
EFI_SIMPLE_NETWORK_RESET Reset
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
UINT32 ReceiveFilterMask
The multicast receive filter settings supported by the network interface.
UINT64 Revision
Revision of the EFI_SIMPLE_NETWORK_PROTOCOL.
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.
UINT64 RxCrcErrorFrames
Number of frames w/ CRC or alignment errors.
EFI_SIMPLE_NETWORK_STATE
The state of the network interface.
UINT64 RxMulticastFrames
Number of valid mutlicast frames received and not dropped.
EFI_SIMPLE_NETWORK_STATISTICS Statistics
EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters
EFI_SIMPLE_NETWORK_STOP Stop
EFI_SIMPLE_NETWORK_NVDATA NvData
Simple Network Protocol data structures.
EFI_EVENT WaitForPacket
Event used with WaitForEvent() to wait for a packet to be received.
UINT64 RxUndersizeFrames
Number of frames below the minimum length for the media.
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_MAC_ADDRESS PermanentAddress
The permanent HW MAC address for the network interface.
UINT64 UnsupportedProtocol
Number of frames destined for unsupported protocol.
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.