2 EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
3 EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0.
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _EFI_MANAGED_NETWORK_PROTOCOL_H
17 #define _EFI_MANAGED_NETWORK_PROTOCOL_H
19 #include <Protocol/SimpleNetwork.h>
21 #define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
23 0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } \
26 #define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
28 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x7, 0x8, 0x92, 0xe0, 0x5e } \
31 typedef struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL
;
34 UINT32 ReceivedQueueTimeoutValue
;
35 UINT32 TransmitQueueTimeoutValue
;
36 UINT16 ProtocolTypeFilter
;
37 BOOLEAN EnableUnicastReceive
;
38 BOOLEAN EnableMulticastReceive
;
39 BOOLEAN EnableBroadcastReceive
;
40 BOOLEAN EnablePromiscuousReceive
;
41 BOOLEAN FlushQueuesOnReset
;
42 BOOLEAN EnableReceiveTimestamps
;
43 BOOLEAN DisableBackgroundPolling
;
44 } EFI_MANAGED_NETWORK_CONFIG_DATA
;
48 EFI_EVENT RecycleEvent
;
53 BOOLEAN BroadcastFlag
;
54 BOOLEAN MulticastFlag
;
55 BOOLEAN PromiscuousFlag
;
57 VOID
*DestinationAddress
;
61 } EFI_MANAGED_NETWORK_RECEIVE_DATA
;
64 UINT32 FragmentLength
;
66 } EFI_MANAGED_NETWORK_FRAGMENT_DATA
;
69 EFI_MAC_ADDRESS
*DestinationAddress
; //OPTIONAL
70 EFI_MAC_ADDRESS
*SourceAddress
; //OPTIONAL
71 UINT16 ProtocolType
; //OPTIONAL
73 UINT16 HeaderLength
; //OPTIONAL
75 EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable
[1];
76 } EFI_MANAGED_NETWORK_TRANSMIT_DATA
;
83 EFI_MANAGED_NETWORK_RECEIVE_DATA
*RxData
;
84 EFI_MANAGED_NETWORK_TRANSMIT_DATA
*TxData
;
86 } EFI_MANAGED_NETWORK_COMPLETION_TOKEN
;
89 Returns the operational parameters for the current MNP child driver.
91 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
92 @param MnpConfigData Pointer to storage for MNP operational parameters.
93 @param SnpModeData Pointer to storage for SNP operational parameters.
95 @retval EFI_SUCCESS The operation completed successfully.
96 @retval EFI_INVALID_PARAMETER This is NULL.
97 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
98 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. The default
99 values are returned in MnpConfigData if it is not NULL.
100 @retval Other The mode data could not be read.
105 (EFIAPI
*EFI_MANAGED_NETWORK_GET_MODE_DATA
) (
106 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
107 OUT EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
,
108 OUT EFI_SIMPLE_NETWORK_MODE
*SnpModeData OPTIONAL
113 Sets or clears the operational parameters for the MNP child driver.
115 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
116 @param MnpConfigData Pointer to configuration data that will be assigned to the MNP
117 child driver instance. If NULL, the MNP child driver instance is
118 reset to startup defaults and all pending transmit and receive
119 requests are flushed.
121 @retval EFI_SUCCESS The operation completed successfully.
122 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
123 @retval EFI_OUT_OF_RESOURCES Required system resources (usually memory) could not be
125 @retval EFI_UNSUPPORTED The requested feature is unsupported in this [MNP]
127 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
128 @retval Other The MNP child driver instance has been reset to startup defaults.
133 (EFIAPI
*EFI_MANAGED_NETWORK_CONFIGURE
) (
134 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
135 IN EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
140 Translates an IP multicast address to a hardware (MAC) multicast address.
142 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
143 @param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
144 Set to FALSE if IpAddress is an IPv4 multicast address.
145 @param IpAddress Pointer to the multicast IP address (in network byte order) to convert.
146 @param MacAddress Pointer to the resulting multicast MAC address.
148 @retval EFI_SUCCESS The operation completed successfully.
149 @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
152 - *IpAddress is not a valid multicast IP address.
153 - MacAddress is NULL.
154 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
155 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
156 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
157 @retval Other The address could not be converted.
162 (EFIAPI
*EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC
) (
163 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
165 IN EFI_IP_ADDRESS
*IpAddress
,
166 OUT EFI_MAC_ADDRESS
*MacAddress
171 Enables and disables receive filters for multicast address.
173 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
174 @param JoinFlag Set to TRUE to join this multicast group.
175 Set to FALSE to leave this multicast group.
176 @param MacAddress Pointer to the multicast MAC group (address) to join or leave.
178 @retval EFI_SUCCESS The requested operation completed successfully.
179 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
181 - JoinFlag is TRUE and MacAddress is NULL.
182 - *MacAddress is not a valid multicast MAC address.
183 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
184 @retval EFI_ALREADY_STARTED The supplied multicast group is already joined.
185 @retval EFI_NOT_FOUND The supplied multicast group is not joined.
186 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
187 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
188 @retval Other The requested operation could not be completed.
193 (EFIAPI
*EFI_MANAGED_NETWORK_GROUPS
) (
194 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
196 IN EFI_MAC_ADDRESS
*MacAddress OPTIONAL
201 Places asynchronous outgoing data packets into the transmit queue.
203 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
204 @param Token Pointer to a token associated with the transmit data descriptor.
206 @retval EFI_SUCCESS The transmit completion token was cached.
207 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
208 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
209 @retval EFI_ACCESS_DENIED The transmit completion token is already in the transmit queue.
210 @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources
212 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
213 @retval EFI_NOT_READY The transmit request could not be queued because the transmit queue is full.
218 (EFIAPI
*EFI_MANAGED_NETWORK_TRANSMIT
) (
219 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
220 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token
225 Places an asynchronous receiving request into the receiving queue.
227 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
228 @param Token Pointer to a token associated with the receive data descriptor.
230 @retval EFI_SUCCESS The receive completion token was cached.
231 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
232 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
235 - Token.Event is NULL
236 @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources
238 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
239 @retval EFI_ACCESS_DENIED The receive completion token was already in the receive queue.
240 @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
245 (EFIAPI
*EFI_MANAGED_NETWORK_RECEIVE
) (
246 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
247 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token
253 Aborts an asynchronous transmit or receive request.
255 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
256 @param Token Pointer to a token that has been issued by
257 EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
258 EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If
259 NULL, all pending tokens are aborted.
261 @retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
262 was signaled. When Token is NULL, all pending requests were
263 aborted and their events were signaled.
264 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
265 @retval EFI_INVALID_PARAMETER This is NULL.
266 @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was
267 not found in the transmit or receive queue. It has either completed
268 or was not issued by Transmit() and Receive().
273 (EFIAPI
*EFI_MANAGED_NETWORK_CANCEL
) (
274 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
275 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token OPTIONAL
280 Polls for incoming data packets and processes outgoing data packets.
282 @param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
284 @retval EFI_SUCCESS Incoming or outgoing data was processed.
285 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
286 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
287 @retval EFI_NOT_READY No incoming or outgoing data was processed. Consider increasing
289 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
290 Consider increasing the polling rate.
295 (EFIAPI
*EFI_MANAGED_NETWORK_POLL
) (
296 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
300 struct _EFI_MANAGED_NETWORK_PROTOCOL
{
301 EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData
;
302 EFI_MANAGED_NETWORK_CONFIGURE Configure
;
303 EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac
;
304 EFI_MANAGED_NETWORK_GROUPS Groups
;
305 EFI_MANAGED_NETWORK_TRANSMIT Transmit
;
306 EFI_MANAGED_NETWORK_RECEIVE Receive
;
307 EFI_MANAGED_NETWORK_CANCEL Cancel
;
308 EFI_MANAGED_NETWORK_POLL Poll
;
311 extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid
;
312 extern EFI_GUID gEfiManagedNetworkProtocolGuid
;