+/**\r
+ Changes the state of a network interface from "stopped" to "started".\r
+\r
+ @param This Protocol instance pointer.\r
+\r
+ @retval EFI_SUCCESS Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Start (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
+ );\r
+ \r
+/**\r
+ Changes the state of a network interface from "started" to "stopped".\r
+\r
+ @param This Protocol instance pointer.\r
+\r
+ @retval EFI_SUCCESS Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Stop (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
+ );\r
+ \r
+/**\r
+ Resets a network adapter and allocates the transmit and receive buffers \r
+ required by the network interface; optionally, also requests allocation \r
+ of additional transmit and receive buffers.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space\r
+ that the driver should allocate for the network interface.\r
+ Some network interfaces will not be able to use the extra\r
+ buffer, and the caller will not know if it is actually\r
+ being used.\r
+ @param ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space\r
+ that the driver should allocate for the network interface.\r
+ Some network interfaces will not be able to use the extra\r
+ buffer, and the caller will not know if it is actually\r
+ being used.\r
+\r
+ @retval EFI_SUCCESS Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Initialize (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN UINTN ExtraRxBufferSize OPTIONAL,\r
+ IN UINTN ExtraTxBufferSize OPTIONAL\r
+ );\r
+ \r
+/**\r
+ Resets a network adapter and re-initializes it with the parameters that were \r
+ provided in the previous call to Initialize(). \r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Indicates that the driver may perform a more\r
+ exhaustive verification operation of the device\r
+ during reset.\r
+\r
+ @retval EFI_SUCCESS Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Reset (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN BOOLEAN ExtendedVerification\r
+ );\r
+\r
+/**\r
+ Resets a network adapter and leaves it in a state that is safe for \r
+ another driver to initialize.\r
+\r
+ @param This Protocol instance pointer.\r
+\r
+ @retval EFI_SUCCESS Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Shutdown (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
+ );\r
+\r
+/**\r
+ Manages the multicast receive filters of a network interface.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param EnableBits A bit mask of receive filters to enable on the network interface.\r
+ @param DisableBits A bit mask of receive filters to disable on the network interface.\r
+ @param ResetMcastFilter Set to TRUE to reset the contents of the multicast receive\r
+ filters on the network interface to their default values.\r
+ @param McastFilterCount Number of multicast HW MAC addresses in the new\r
+ MCastFilter list. This value must be less than or equal to\r
+ the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This\r
+ field is optional if ResetMCastFilter is TRUE.\r
+ @param McastFilter A pointer to a list of new multicast receive filter HW MAC\r
+ addresses. This list will replace any existing multicast\r
+ HW MAC address list. This field is optional if\r
+ ResetMCastFilter is TRUE.\r
+\r
+ @retval EFI_SUCCESS The multicast receive filter list was updated.\r
+ @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32ReceiveFilters (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN UINT32 EnableBits,\r
+ IN UINT32 DisableBits,\r
+ IN BOOLEAN ResetMcastFilter,\r
+ IN UINTN McastFilterCount OPTIONAL,\r
+ IN EFI_MAC_ADDRESS *McastFilter OPTIONAL\r
+ );\r
+\r
+/**\r
+ Modifies or resets the current station address, if supported.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Reset Flag used to reset the station address to the network interfaces\r
+ permanent address.\r
+ @param NewMacAddr New station address to be used for the network interface.\r
+\r
+ @retval EFI_UNSUPPORTED Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32StationAddress (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN BOOLEAN Reset,\r
+ IN EFI_MAC_ADDRESS *NewMacAddr OPTIONAL\r
+ );\r
+\r
+/**\r
+ Resets or collects the statistics on a network interface.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Reset Set to TRUE to reset the statistics for the network interface.\r
+ @param StatisticsSize On input the size, in bytes, of StatisticsTable. On\r
+ output the size, in bytes, of the resulting table of\r
+ statistics.\r
+ @param StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that\r
+ contains the statistics.\r
+\r
+ @retval EFI_SUCCESS The statistics were collected from the network interface.\r
+ @retval EFI_NOT_STARTED The network interface has not been started.\r
+ @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer\r
+ size needed to hold the statistics is returned in\r
+ StatisticsSize.\r
+ @retval EFI_UNSUPPORTED Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Statistics (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,\r
+ IN BOOLEAN Reset,\r
+ IN OUT UINTN *StatisticsSize OPTIONAL,\r
+ OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL\r
+ );\r
+ \r
+/**\r
+ Converts a multicast IP address to a multicast HW MAC address.\r
+ \r
+ @param This Protocol instance pointer.\r
+ @param Ipv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set\r
+ to FALSE if the multicast IP address is IPv4 [RFC 791].\r
+ @param Ip The multicast IP address that is to be converted to a multicast\r
+ HW MAC address.\r
+ @param Mac The multicast HW MAC address that is to be generated from IP.\r
+\r
+ @retval EFI_SUCCESS The multicast IP address was mapped to the multicast\r
+ HW MAC address.\r
+ @retval EFI_NOT_STARTED The network interface has not been started.\r
+ @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer\r
+ size needed to hold the statistics is returned in\r
+ StatisticsSize.\r
+ @retval EFI_UNSUPPORTED Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32McastIptoMac (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN BOOLEAN Ipv6,\r
+ IN EFI_IP_ADDRESS *Ip,\r
+ OUT EFI_MAC_ADDRESS *Mac\r
+ );\r
+\r
+/**\r
+ Performs read and write operations on the NVRAM device attached to a \r
+ network interface.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ReadOrWrite TRUE for read operations, FALSE for write operations.\r
+ @param Offset Byte offset in the NVRAM device at which to start the read or\r
+ write operation. This must be a multiple of NvRamAccessSize and\r
+ less than NvRamSize.\r
+ @param BufferSize The number of bytes to read or write from the NVRAM device.\r
+ This must also be a multiple of NvramAccessSize.\r
+ @param Buffer A pointer to the data buffer.\r
+\r
+ @retval EFI_UNSUPPORTED Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Nvdata (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN BOOLEAN ReadOrWrite,\r
+ IN UINTN Offset,\r
+ IN UINTN BufferSize,\r
+ IN OUT VOID *Buffer\r
+ );\r
+\r
+/**\r
+ Reads the current interrupt status and recycled transmit buffer status from \r
+ a network interface.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param InterruptStatus A pointer to the bit mask of the currently active interrupts\r
+ If this is NULL, the interrupt status will not be read from\r
+ the device. If this is not NULL, the interrupt status will\r
+ be read from the device. When the interrupt status is read,\r
+ it will also be cleared. Clearing the transmit interrupt\r
+ does not empty the recycled transmit buffer array.\r
+ @param TxBuffer Recycled transmit buffer address. The network interface will\r
+ not transmit if its internal recycled transmit buffer array\r
+ is full. Reading the transmit buffer does not clear the\r
+ transmit interrupt. If this is NULL, then the transmit buffer\r
+ status will not be read. If there are no transmit buffers to\r
+ recycle and TxBuf is not NULL, * TxBuf will be set to NULL.\r
+\r
+ @retval EFI_SUCCESS Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32GetStatus (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ OUT UINT32 *InterruptStatus,\r
+ OUT VOID **TxBuffer\r
+ );\r
+\r
+/**\r
+ Places a packet in the transmit queue of a network interface.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param HeaderSize The size, in bytes, of the media header to be filled in by\r
+ the Transmit() function. If HeaderSize is non-zero, then it\r
+ must be equal to This->Mode->MediaHeaderSize and the DestAddr\r
+ and Protocol parameters must not be NULL.\r
+ @param BufferSize The size, in bytes, of the entire packet (media header and\r
+ data) to be transmitted through the network interface.\r
+ @param Buffer A pointer to the packet (media header followed by data) to be\r
+ transmitted. This parameter cannot be NULL. If HeaderSize is zero,\r
+ then the media header in Buffer must already be filled in by the\r
+ caller. If HeaderSize is non-zero, then the media header will be\r
+ filled in by the Transmit() function.\r
+ @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this parameter\r
+ is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then\r
+ This->Mode->CurrentAddress is used for the source HW MAC address.\r
+ @param DestAddr The destination HW MAC address. If HeaderSize is zero, then this\r
+ parameter is ignored.\r
+ @param Protocol The type of header to build. If HeaderSize is zero, then this\r
+ parameter is ignored. See RFC 1700, section "Ether Types", for\r
+ examples.\r
+\r
+ @retval EFI_SUCCESS The packet was placed on the transmit queue.\r
+ @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
+ @retval EFI_ACCESS_DENIED Error acquire global lock for operation.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Transmit (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ IN UINTN HeaderSize,\r
+ IN UINTN BufferSize,\r
+ IN VOID *Buffer,\r
+ IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,\r
+ IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,\r
+ IN UINT16 *Protocol OPTIONAL\r
+ );\r
+\r
+/**\r
+ Receives a packet from a network interface.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param HeaderSize The size, in bytes, of the media header received on the network\r
+ interface. If this parameter is NULL, then the media header size\r
+ will not be returned.\r
+ @param BuffSize On entry, the size, in bytes, of Buffer. On exit, the size, in\r
+ bytes, of the packet that was received on the network interface.\r
+ @param Buffer A pointer to the data buffer to receive both the media header and\r
+ the data.\r
+ @param SourceAddr The source HW MAC address. If this parameter is NULL, the\r
+ HW MAC source address will not be extracted from the media\r
+ header.\r
+ @param DestinationAddr The destination HW MAC address. If this parameter is NULL,\r
+ the HW MAC destination address will not be extracted from the\r
+ media header.\r
+ @param Protocol The media header type. If this parameter is NULL, then the\r
+ protocol will not be extracted from the media header. See\r
+ RFC 1700 section "Ether Types" for examples.\r
+\r
+ @retval EFI_SUCCESS The received data was stored in Buffer, and BufferSize has\r
+ been updated to the number of bytes received.\r
+ @retval EFI_NOT_READY The network interface is too busy to accept this transmit\r
+ request.\r
+ @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.\r
+ @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
+ @retval EFI_ACCESS_DENIED Error acquire global lock for operation.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SnpNt32Receive (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+ OUT UINTN *HeaderSize,\r
+ IN OUT UINTN *BuffSize,\r
+ OUT VOID *Buffer,\r
+ OUT EFI_MAC_ADDRESS *SourceAddr,\r
+ OUT EFI_MAC_ADDRESS *DestinationAddr,\r
+ OUT UINT16 *Protocol\r
+ );\r
+\r
+SNPNT32_INSTANCE_DATA gSnpNt32InstanceTemplate = {\r
+ SNP_NT32_INSTANCE_SIGNATURE, // Signature\r
+ {\r
+ NULL,\r
+ NULL\r
+ }, // Entry\r
+ NULL, // GlobalData\r
+ NULL, // DeviceHandle\r
+ NULL, // DevicePath\r
+ { // Snp\r
+ EFI_SIMPLE_NETWORK_PROTOCOL_REVISION, // Revision\r
+ SnpNt32Start, // Start\r
+ SnpNt32Stop, // Stop\r
+ SnpNt32Initialize, // Initialize\r
+ SnpNt32Reset, // Reset\r
+ SnpNt32Shutdown, // Shutdown\r
+ SnpNt32ReceiveFilters, // ReceiveFilters\r
+ SnpNt32StationAddress, // StationAddress\r
+ SnpNt32Statistics, // Statistics\r
+ SnpNt32McastIptoMac, // MCastIpToMac\r
+ SnpNt32Nvdata, // NvData\r
+ SnpNt32GetStatus, // GetStatus\r
+ SnpNt32Transmit, // Transmit\r
+ SnpNt32Receive, // Receive\r
+ NULL, // WaitForPacket\r
+ NULL // Mode\r
+ },\r
+ { // Mode\r
+ EfiSimpleNetworkInitialized, // State\r
+ NET_ETHER_ADDR_LEN, // HwAddressSize\r
+ NET_ETHER_HEADER_SIZE, // MediaHeaderSize\r
+ 1500, // MaxPacketSize\r
+ 0, // NvRamSize\r
+ 0, // NvRamAccessSize\r
+ 0, // ReceiveFilterMask\r
+ 0, // ReceiveFilterSetting\r
+ MAX_MCAST_FILTER_CNT, // MaxMCastFilterCount\r
+ 0, // MCastFilterCount\r
+ {\r
+ 0\r
+ }, // MCastFilter\r
+ {\r
+ 0\r
+ }, // CurrentAddress\r
+ {\r
+ 0\r
+ }, // BroadcastAddress\r
+ {\r
+ 0\r
+ }, // PermanentAddress\r
+ NET_IFTYPE_ETHERNET, // IfType\r
+ FALSE, // MacAddressChangeable\r
+ FALSE, // MultipleTxSupported\r
+ FALSE, // MediaPresentSupported\r
+ TRUE // MediaPresent\r
+ },\r
+ {\r
+ 0\r
+ } // InterfaceInfo\r
+};\r