X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FManagedNetwork.h;h=3f2d05ea7c1d75306e83d8dd72a85270d5b7f09b;hb=0c323d071d8951fe0c8f41fad08939722d436b12;hp=040c363dc8d1a40b5f54b6b2518e2cc347321432;hpb=842f5579c7e2a313f56c576e4c5150f7f4793079;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/ManagedNetwork.h b/MdePkg/Include/Protocol/ManagedNetwork.h index 040c363dc8..3f2d05ea7c 100644 --- a/MdePkg/Include/Protocol/ManagedNetwork.h +++ b/MdePkg/Include/Protocol/ManagedNetwork.h @@ -2,19 +2,19 @@ EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0. EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0. - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2006 - 2008, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef _EFI_MANAGED_NETWORK_PROTOCOL_H -#define _EFI_MANAGED_NETWORK_PROTOCOL_H +#ifndef __EFI_MANAGED_NETWORK_PROTOCOL_H__ +#define __EFI_MANAGED_NETWORK_PROTOCOL_H__ #include @@ -25,21 +25,64 @@ #define EFI_MANAGED_NETWORK_PROTOCOL_GUID \ { \ - 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x7, 0x8, 0x92, 0xe0, 0x5e } \ + 0x7ab33a91, 0xace5, 0x4326, { 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 } \ } typedef struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL; typedef struct { + /// + /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed + /// from the MNP receive queue will be dropped if its receive timeout expires. + /// UINT32 ReceivedQueueTimeoutValue; + /// + /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed + /// from the MNP transmit queue will be dropped if its receive timeout expires. + /// UINT32 TransmitQueueTimeoutValue; + /// + /// Ethernet type II 16-bit protocol type in host byte order. Valid + /// values are zero and 1,500 to 65,535. + /// UINT16 ProtocolTypeFilter; + /// + /// Set to TRUE to receive packets that are sent to the network + /// device MAC address. The startup default value is FALSE. + /// BOOLEAN EnableUnicastReceive; + /// + /// Set to TRUE to receive packets that are sent to any of the + /// active multicast groups. The startup default value is FALSE. + /// BOOLEAN EnableMulticastReceive; + /// + /// Set to TRUE to receive packets that are sent to the network + /// device broadcast address. The startup default value is FALSE. + /// BOOLEAN EnableBroadcastReceive; + /// + /// Set to TRUE to receive packets that are sent to any MAC address. + /// The startup default value is FALSE. + /// BOOLEAN EnablePromiscuousReceive; + /// + /// Set to TRUE to drop queued packets when the configuration + /// is changed. The startup default value is FALSE. + /// BOOLEAN FlushQueuesOnReset; + /// + /// Set to TRUE to timestamp all packets when they are received + /// by the MNP. Note that timestamps may be unsupported in some + /// MNP implementations. The startup default value is FALSE. + /// BOOLEAN EnableReceiveTimestamps; + /// + /// Set to TRUE to disable background polling in this MNP + /// instance. Note that background polling may not be supported in + /// all MNP implementations. The startup default value is FALSE, + /// unless background polling is not supported. + /// BOOLEAN DisableBackgroundPolling; } EFI_MANAGED_NETWORK_CONFIG_DATA; @@ -77,10 +120,26 @@ typedef struct { typedef struct { + /// + /// This Event will be signaled after the Status field is updated + /// by the MNP. The type of Event must be + /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of + /// Event must be lower than or equal to TPL_CALLBACK. + /// EFI_EVENT Event; + /// + /// The status that is returned to the caller at the end of the operation + /// to indicate whether this operation completed successfully. + /// EFI_STATUS Status; union { + /// + /// When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA. + /// EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData; + /// + /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA. + /// EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData; } Packet; } EFI_MANAGED_NETWORK_COMPLETION_TOKEN; @@ -102,12 +161,11 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA) ( +(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, - OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL - ) -; + OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL + ); /** Sets or clears the operational parameters for the MNP child driver. @@ -130,12 +188,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE) ( +(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL - ) -; - + IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL + ); + /** Translates an IP multicast address to a hardware (MAC) multicast address. @@ -159,13 +216,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC) ( +(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN BOOLEAN Ipv6Flag, IN EFI_IP_ADDRESS *IpAddress, - OUT EFI_MAC_ADDRESS *MacAddress - ) -; + OUT EFI_MAC_ADDRESS *MacAddress + ); /** Enables and disables receive filters for multicast address. @@ -183,20 +239,19 @@ EFI_STATUS @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. @retval EFI_ALREADY_STARTED The supplied multicast group is already joined. @retval EFI_NOT_FOUND The supplied multicast group is not joined. - @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. + @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation. @retval Other The requested operation could not be completed. **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_GROUPS) ( +(EFIAPI *EFI_MANAGED_NETWORK_GROUPS)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN BOOLEAN JoinFlag, - IN EFI_MAC_ADDRESS *MacAddress OPTIONAL - ) -; - + IN EFI_MAC_ADDRESS *MacAddress OPTIONAL + ); + /** Places asynchronous outgoing data packets into the transmit queue. @@ -215,12 +270,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT) ( +(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token - ) -; - + IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token + ); + /** Places an asynchronous receiving request into the receiving queue. @@ -242,12 +296,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE) ( +(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token - ) -; - + IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token + ); + /** Aborts an asynchronous transmit or receive request. @@ -270,11 +323,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_CANCEL) ( +(EFIAPI *EFI_MANAGED_NETWORK_CANCEL)( IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL - ) -; + IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL + ); /** Polls for incoming data packets and processes outgoing data packets. @@ -292,11 +344,14 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_POLL) ( - IN EFI_MANAGED_NETWORK_PROTOCOL *This - ) -; - +(EFIAPI *EFI_MANAGED_NETWORK_POLL)( + IN EFI_MANAGED_NETWORK_PROTOCOL *This + ); + +/// +/// The MNP is used by network applications (and drivers) to +/// perform raw (unformatted) asynchronous network packet I/O. +/// struct _EFI_MANAGED_NETWORK_PROTOCOL { EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData; EFI_MANAGED_NETWORK_CONFIGURE Configure;