--- /dev/null
+/** @file\r
+ EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.\r
+ EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: ManagedNetwork.h\r
+\r
+**/\r
+\r
+#ifndef _EFI_MANAGED_NETWORK_PROTOCOL_H\r
+#define _EFI_MANAGED_NETWORK_PROTOCOL_H\r
+\r
+#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \\r
+ { \\r
+ 0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } \\r
+ }\r
+\r
+#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \\r
+ { \\r
+ 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x7, 0x8, 0x92, 0xe0, 0x5e } \\r
+ }\r
+\r
+typedef struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL;\r
+\r
+typedef struct {\r
+ UINT32 ReceivedQueueTimeoutValue;\r
+ UINT32 TransmitQueueTimeoutValue;\r
+ UINT16 ProtocolTypeFilter;\r
+ BOOLEAN EnableUnicastReceive;\r
+ BOOLEAN EnableMulticastReceive;\r
+ BOOLEAN EnableBroadcastReceive;\r
+ BOOLEAN EnablePromiscuousReceive;\r
+ BOOLEAN FlushQueuesOnReset;\r
+ BOOLEAN EnableReceiveTimestamps;\r
+ BOOLEAN DisableBackgroundPolling;\r
+} EFI_MANAGED_NETWORK_CONFIG_DATA;\r
+\r
+typedef struct {\r
+ EFI_TIME Timestamp;\r
+ EFI_EVENT RecycleEvent;\r
+ UINT32 PacketLength;\r
+ UINT32 HeaderLength;\r
+ UINT32 AddressLength;\r
+ UINT32 DataLength;\r
+ BOOLEAN BroadcastFlag;\r
+ BOOLEAN MulticastFlag;\r
+ BOOLEAN PromiscuousFlag;\r
+ UINT16 ProtocolType;\r
+ VOID *DestinationAddress;\r
+ VOID *SourceAddress;\r
+ VOID *MediaHeader;\r
+ VOID *PacketData;\r
+} EFI_MANAGED_NETWORK_RECEIVE_DATA;\r
+\r
+typedef struct {\r
+ UINT32 FragmentLength;\r
+ VOID *FragmentBuffer;\r
+} EFI_MANAGED_NETWORK_FRAGMENT_DATA;\r
+\r
+typedef struct {\r
+ EFI_MAC_ADDRESS *DestinationAddress; //OPTIONAL\r
+ EFI_MAC_ADDRESS *SourceAddress; //OPTIONAL\r
+ UINT16 ProtocolType; //OPTIONAL\r
+ UINT32 DataLength;\r
+ UINT16 HeaderLength; //OPTIONAL\r
+ UINT16 FragmentCount;\r
+ EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1];\r
+} EFI_MANAGED_NETWORK_TRANSMIT_DATA;\r
+\r
+\r
+typedef struct {\r
+ EFI_EVENT Event;\r
+ EFI_STATUS Status;\r
+ union {\r
+ EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData;\r
+ EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData;\r
+ } Packet;\r
+} EFI_MANAGED_NETWORK_COMPLETION_TOKEN;\r
+\r
+/**\r
+ Returns the operational parameters for the current MNP child driver.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param MnpConfigData Pointer to storage for MNP operational parameters.\r
+ @param SnpModeData Pointer to storage for SNP operational parameters.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_INVALID_PARAMETER This is NULL.\r
+ @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. The default\r
+ values are returned in MnpConfigData if it is not NULL.\r
+ @retval Other The mode data could not be read.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,\r
+ OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL \r
+ )\r
+; \r
+\r
+/**\r
+ Sets or clears the operational parameters for the MNP child driver.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param MnpConfigData Pointer to configuration data that will be assigned to the MNP\r
+ child driver instance. If NULL, the MNP child driver instance is\r
+ reset to startup defaults and all pending transmit and receive\r
+ requests are flushed.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+ @retval EFI_OUT_OF_RESOURCES Required system resources (usually memory) could not be\r
+ allocated.\r
+ @retval EFI_UNSUPPORTED The requested feature is unsupported in this [MNP]\r
+ implementation.\r
+ @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.\r
+ @retval Other The MNP child driver instance has been reset to startup defaults.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL \r
+ )\r
+; \r
+ \r
+/**\r
+ Translates an IP multicast address to a hardware (MAC) multicast address.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.\r
+ Set to FALSE if IpAddress is an IPv4 multicast address.\r
+ @param IpAddress Pointer to the multicast IP address (in network byte order) to convert.\r
+ @param MacAddress Pointer to the resulting multicast MAC address.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:\r
+ - This is NULL.\r
+ - IpAddress is NULL.\r
+ - *IpAddress is not a valid multicast IP address.\r
+ - MacAddress is NULL.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.\r
+ @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.\r
+ @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.\r
+ @retval Other The address could not be converted.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ IN BOOLEAN Ipv6Flag,\r
+ IN EFI_IP_ADDRESS *IpAddress,\r
+ OUT EFI_MAC_ADDRESS *MacAddress \r
+ )\r
+; \r
+\r
+/**\r
+ Enables and disables receive filters for multicast address.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param JoinFlag Set to TRUE to join this multicast group.\r
+ Set to FALSE to leave this multicast group.\r
+ @param MacAddress Pointer to the multicast MAC group (address) to join or leave.\r
+\r
+ @retval EFI_SUCCESS The requested operation completed successfully.\r
+ @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+ - This is NULL.\r
+ - JoinFlag is TRUE and MacAddress is NULL.\r
+ - *MacAddress is not a valid multicast MAC address.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.\r
+ @retval EFI_ALREADY_STARTED The supplied multicast group is already joined.\r
+ @retval EFI_NOT_FOUND The supplied multicast group is not joined.\r
+ @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. \r
+ @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.\r
+ @retval Other The requested operation could not be completed.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_GROUPS) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ IN BOOLEAN JoinFlag,\r
+ IN EFI_MAC_ADDRESS *MacAddress OPTIONAL \r
+ )\r
+; \r
+ \r
+/**\r
+ Places asynchronous outgoing data packets into the transmit queue.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param Token Pointer to a token associated with the transmit data descriptor.\r
+\r
+ @retval EFI_SUCCESS The transmit completion token was cached.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.\r
+ @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+ @retval EFI_ACCESS_DENIED The transmit completion token is already in the transmit queue.\r
+ @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources\r
+ (usually memory).\r
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
+ @retval EFI_NOT_READY The transmit request could not be queued because the transmit queue is full.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token \r
+ )\r
+; \r
+ \r
+/**\r
+ Places an asynchronous receiving request into the receiving queue.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param Token Pointer to a token associated with the receive data descriptor.\r
+\r
+ @retval EFI_SUCCESS The receive completion token was cached.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.\r
+ @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+ - This is NULL.\r
+ - Token is NULL.\r
+ - Token.Event is NULL\r
+ @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources\r
+ (usually memory).\r
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
+ @retval EFI_ACCESS_DENIED The receive completion token was already in the receive queue.\r
+ @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token \r
+ )\r
+; \r
+ \r
+\r
+/**\r
+ Aborts an asynchronous transmit or receive request.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+ @param Token Pointer to a token that has been issued by\r
+ EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or\r
+ EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If\r
+ NULL, all pending tokens are aborted.\r
+\r
+ @retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event\r
+ was signaled. When Token is NULL, all pending requests were\r
+ aborted and their events were signaled.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.\r
+ @retval EFI_INVALID_PARAMETER This is NULL.\r
+ @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was\r
+ not found in the transmit or receive queue. It has either completed\r
+ or was not issued by Transmit() and Receive().\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_CANCEL) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,\r
+ IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL \r
+ )\r
+; \r
+\r
+/**\r
+ Polls for incoming data packets and processes outgoing data packets.\r
+\r
+ @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+\r
+ @retval EFI_SUCCESS Incoming or outgoing data was processed.\r
+ @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.\r
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
+ @retval EFI_NOT_READY No incoming or outgoing data was processed. Consider increasing\r
+ the polling rate.\r
+ @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r
+ Consider increasing the polling rate.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MANAGED_NETWORK_POLL) (\r
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This \r
+ )\r
+; \r
+\r
+struct _EFI_MANAGED_NETWORK_PROTOCOL {\r
+ EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData;\r
+ EFI_MANAGED_NETWORK_CONFIGURE Configure;\r
+ EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac;\r
+ EFI_MANAGED_NETWORK_GROUPS Groups;\r
+ EFI_MANAGED_NETWORK_TRANSMIT Transmit;\r
+ EFI_MANAGED_NETWORK_RECEIVE Receive;\r
+ EFI_MANAGED_NETWORK_CANCEL Cancel;\r
+ EFI_MANAGED_NETWORK_POLL Poll;\r
+};\r
+\r
+extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid;\r
+extern EFI_GUID gEfiManagedNetworkProtocolGuid;\r
+\r
+#endif\r