iPXE
ManagedNetwork.h
Go to the documentation of this file.
1/** @file
2 EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
3 EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0.
4
5Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 @par Revision Reference:
9 This Protocol is introduced in UEFI Specification 2.0
10
11**/
12
13#ifndef __EFI_MANAGED_NETWORK_PROTOCOL_H__
14#define __EFI_MANAGED_NETWORK_PROTOCOL_H__
15
16FILE_LICENCE ( BSD2_PATENT );
17FILE_SECBOOT ( PERMITTED );
18
20
21#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
22 { \
23 0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } \
24 }
25
26#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
27 { \
28 0x7ab33a91, 0xace5, 0x4326, { 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 } \
29 }
30
32
33typedef struct {
34 ///
35 /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed
36 /// from the MNP receive queue will be dropped if its receive timeout expires.
37 ///
39 ///
40 /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed
41 /// from the MNP transmit queue will be dropped if its receive timeout expires.
42 ///
44 ///
45 /// Ethernet type II 16-bit protocol type in host byte order. Valid
46 /// values are zero and 1,500 to 65,535.
47 ///
49 ///
50 /// Set to TRUE to receive packets that are sent to the network
51 /// device MAC address. The startup default value is FALSE.
52 ///
54 ///
55 /// Set to TRUE to receive packets that are sent to any of the
56 /// active multicast groups. The startup default value is FALSE.
57 ///
59 ///
60 /// Set to TRUE to receive packets that are sent to the network
61 /// device broadcast address. The startup default value is FALSE.
62 ///
64 ///
65 /// Set to TRUE to receive packets that are sent to any MAC address.
66 /// The startup default value is FALSE.
67 ///
69 ///
70 /// Set to TRUE to drop queued packets when the configuration
71 /// is changed. The startup default value is FALSE.
72 ///
74 ///
75 /// Set to TRUE to timestamp all packets when they are received
76 /// by the MNP. Note that timestamps may be unsupported in some
77 /// MNP implementations. The startup default value is FALSE.
78 ///
80 ///
81 /// Set to TRUE to disable background polling in this MNP
82 /// instance. Note that background polling may not be supported in
83 /// all MNP implementations. The startup default value is FALSE,
84 /// unless background polling is not supported.
85 ///
88
105
110
120
121typedef struct {
122 ///
123 /// This Event will be signaled after the Status field is updated
124 /// by the MNP. The type of Event must be
125 /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
126 /// Event must be lower than or equal to TPL_CALLBACK.
127 ///
129 ///
130 /// The status that is returned to the caller at the end of the operation
131 /// to indicate whether this operation completed successfully.
132 ///
134 union {
135 ///
136 /// When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
137 ///
139 ///
140 /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA.
141 ///
143 } Packet;
145
146/**
147 Returns the operational parameters for the current MNP child driver.
148
149 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
150 @param MnpConfigData The pointer to storage for MNP operational parameters.
151 @param SnpModeData The pointer to storage for SNP operational parameters.
152
153 @retval EFI_SUCCESS The operation completed successfully.
154 @retval EFI_INVALID_PARAMETER This is NULL.
155 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
156 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. The default
157 values are returned in MnpConfigData if it is not NULL.
158 @retval Other The mode data could not be read.
159
160**/
161typedef
167 );
168
169/**
170 Sets or clears the operational parameters for the MNP child driver.
171
172 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
173 @param MnpConfigData The pointer to configuration data that will be assigned to the MNP
174 child driver instance. If NULL, the MNP child driver instance is
175 reset to startup defaults and all pending transmit and receive
176 requests are flushed.
177
178 @retval EFI_SUCCESS The operation completed successfully.
179 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
180 @retval EFI_OUT_OF_RESOURCES Required system resources (usually memory) could not be
181 allocated.
182 @retval EFI_UNSUPPORTED The requested feature is unsupported in this [MNP]
183 implementation.
184 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
185 @retval Other The MNP child driver instance has been reset to startup defaults.
186
187**/
188typedef
193 );
194
195/**
196 Translates an IP multicast address to a hardware (MAC) multicast address.
197
198 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
199 @param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
200 Set to FALSE if IpAddress is an IPv4 multicast address.
201 @param IpAddress The pointer to the multicast IP address (in network byte order) to convert.
202 @param MacAddress The pointer to the resulting multicast MAC address.
203
204 @retval EFI_SUCCESS The operation completed successfully.
205 @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
206 - This is NULL.
207 - IpAddress is NULL.
208 - *IpAddress is not a valid multicast IP address.
209 - MacAddress is NULL.
210 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
211 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
212 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
213 @retval Other The address could not be converted.
214
215**/
216typedef
220 IN BOOLEAN Ipv6Flag,
221 IN EFI_IP_ADDRESS *IpAddress,
222 OUT EFI_MAC_ADDRESS *MacAddress
223 );
224
225/**
226 Enables and disables receive filters for multicast address.
227
228 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
229 @param JoinFlag Set to TRUE to join this multicast group.
230 Set to FALSE to leave this multicast group.
231 @param MacAddress The pointer to the multicast MAC group (address) to join or leave.
232
233 @retval EFI_SUCCESS The requested operation completed successfully.
234 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
235 - This is NULL.
236 - JoinFlag is TRUE and MacAddress is NULL.
237 - *MacAddress is not a valid multicast MAC address.
238 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
239 @retval EFI_ALREADY_STARTED The supplied multicast group is already joined.
240 @retval EFI_NOT_FOUND The supplied multicast group is not joined.
241 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
242 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
243 @retval Other The requested operation could not be completed.
244
245**/
246typedef
250 IN BOOLEAN JoinFlag,
251 IN EFI_MAC_ADDRESS *MacAddress OPTIONAL
252 );
253
254/**
255 Places asynchronous outgoing data packets into the transmit queue.
256
257 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
258 @param Token The pointer to a token associated with the transmit data descriptor.
259
260 @retval EFI_SUCCESS The transmit completion token was cached.
261 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
262 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
263 @retval EFI_ACCESS_DENIED The transmit completion token is already in the transmit queue.
264 @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources
265 (usually memory).
266 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
267 @retval EFI_NOT_READY The transmit request could not be queued because the transmit queue is full.
268
269**/
270typedef
275 );
276
277/**
278 Places an asynchronous receiving request into the receiving queue.
279
280 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
281 @param Token The pointer to a token associated with the receive data descriptor.
282
283 @retval EFI_SUCCESS The receive completion token was cached.
284 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
285 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
286 - This is NULL.
287 - Token is NULL.
288 - Token.Event is NULL.
289 @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources
290 (usually memory).
291 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
292 @retval EFI_ACCESS_DENIED The receive completion token was already in the receive queue.
293 @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
294
295**/
296typedef
301 );
302
303/**
304 Aborts an asynchronous transmit or receive request.
305
306 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
307 @param Token The pointer to a token that has been issued by
308 EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
309 EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If
310 NULL, all pending tokens are aborted.
311
312 @retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
313 was signaled. When Token is NULL, all pending requests were
314 aborted and their events were signaled.
315 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
316 @retval EFI_INVALID_PARAMETER This is NULL.
317 @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was
318 not found in the transmit or receive queue. It has either completed
319 or was not issued by Transmit() and Receive().
320
321**/
322typedef
327 );
328
329/**
330 Polls for incoming data packets and processes outgoing data packets.
331
332 @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
333
334 @retval EFI_SUCCESS Incoming or outgoing data was processed.
335 @retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
336 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
337 @retval EFI_NOT_READY No incoming or outgoing data was processed. Consider increasing
338 the polling rate.
339 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
340 Consider increasing the polling rate.
341
342**/
343typedef
347 );
348
349///
350/// The MNP is used by network applications (and drivers) to
351/// perform raw (unformatted) asynchronous network packet I/O.
352///
363
366
367#endif
unsigned short UINT16
2-byte unsigned value.
unsigned char BOOLEAN
Logical Boolean.
#define EFIAPI
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
Definition Base.h:272
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition Base.h:293
EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid
EFI_STATUS(EFIAPI * EFI_MANAGED_NETWORK_GROUPS)(IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN BOOLEAN JoinFlag, IN EFI_MAC_ADDRESS *MacAddress OPTIONAL)
Enables and disables receive filters for multicast address.
struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL
EFI_STATUS(EFIAPI * EFI_MANAGED_NETWORK_TRANSMIT)(IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token)
Places asynchronous outgoing data packets into the transmit queue.
EFI_STATUS(EFIAPI * EFI_MANAGED_NETWORK_CANCEL)(IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL)
Aborts an asynchronous transmit or receive request.
EFI_STATUS(EFIAPI * EFI_MANAGED_NETWORK_RECEIVE)(IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token)
Places an asynchronous receiving request into the receiving queue.
EFI_STATUS(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)
Translates an IP multicast address to a hardware (MAC) multicast address.
EFI_STATUS(EFIAPI * EFI_MANAGED_NETWORK_CONFIGURE)(IN EFI_MANAGED_NETWORK_PROTOCOL *This, IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL)
Sets or clears the operational parameters for the MNP child driver.
EFI_GUID gEfiManagedNetworkProtocolGuid
EFI_STATUS(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)
Returns the operational parameters for the current MNP child driver.
EFI_STATUS(EFIAPI * EFI_MANAGED_NETWORK_POLL)(IN EFI_MANAGED_NETWORK_PROTOCOL *This)
Polls for incoming data packets and processes outgoing data packets.
The EFI_SIMPLE_NETWORK_PROTOCOL provides services to initialize a network interface,...
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define EFI_EVENT
Definition efi.h:54
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
32-byte buffer containing a network Media Access Control address.
EFI_MANAGED_NETWORK_RECEIVE_DATA * RxData
When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
EFI_MANAGED_NETWORK_TRANSMIT_DATA * TxData
When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DAT...
EFI_STATUS Status
The status that is returned to the caller at the end of the operation to indicate whether this operat...
EFI_EVENT Event
This Event will be signaled after the Status field is updated by the MNP.
BOOLEAN EnableBroadcastReceive
Set to TRUE to receive packets that are sent to the network device broadcast address.
BOOLEAN EnableMulticastReceive
Set to TRUE to receive packets that are sent to any of the active multicast groups.
BOOLEAN FlushQueuesOnReset
Set to TRUE to drop queued packets when the configuration is changed.
UINT32 ReceivedQueueTimeoutValue
Timeout value for a UEFI one-shot timer event.
UINT16 ProtocolTypeFilter
Ethernet type II 16-bit protocol type in host byte order.
UINT32 TransmitQueueTimeoutValue
Timeout value for a UEFI one-shot timer event.
BOOLEAN DisableBackgroundPolling
Set to TRUE to disable background polling in this MNP instance.
BOOLEAN EnableUnicastReceive
Set to TRUE to receive packets that are sent to the network device MAC address.
BOOLEAN EnablePromiscuousReceive
Set to TRUE to receive packets that are sent to any MAC address.
BOOLEAN EnableReceiveTimestamps
Set to TRUE to timestamp all packets when they are received by the MNP.
EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1]
EFI Time Abstraction: Year: 1900 - 9999 Month: 1 - 12 Day: 1 - 31 Hour: 0 - 23 Minute: 0 - 59 Second:...
The MNP is used by network applications (and drivers) to perform raw (unformatted) asynchronous netwo...
EFI_MANAGED_NETWORK_POLL Poll
EFI_MANAGED_NETWORK_GROUPS Groups
EFI_MANAGED_NETWORK_CANCEL Cancel
EFI_MANAGED_NETWORK_RECEIVE Receive
EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac
EFI_MANAGED_NETWORK_CONFIGURE Configure
EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData
EFI_MANAGED_NETWORK_TRANSMIT Transmit
16-byte buffer aligned on a 4-byte boundary.