xref: /freebsd/sys/contrib/edk2/Include/Protocol/ManagedNetwork.h (revision f439973d6726c3be929c8fb3b1545b8b1744abc3)
1*f439973dSWarner Losh /** @file
2*f439973dSWarner Losh   EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
3*f439973dSWarner Losh   EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0.
4*f439973dSWarner Losh 
5*f439973dSWarner Losh Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6*f439973dSWarner Losh SPDX-License-Identifier: BSD-2-Clause-Patent
7*f439973dSWarner Losh 
8*f439973dSWarner Losh   @par Revision Reference:
9*f439973dSWarner Losh   This Protocol is introduced in UEFI Specification 2.0
10*f439973dSWarner Losh 
11*f439973dSWarner Losh **/
12*f439973dSWarner Losh 
13*f439973dSWarner Losh #ifndef __EFI_MANAGED_NETWORK_PROTOCOL_H__
14*f439973dSWarner Losh #define __EFI_MANAGED_NETWORK_PROTOCOL_H__
15*f439973dSWarner Losh 
16*f439973dSWarner Losh #include <Protocol/SimpleNetwork.h>
17*f439973dSWarner Losh 
18*f439973dSWarner Losh #define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
19*f439973dSWarner Losh   { \
20*f439973dSWarner Losh     0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } \
21*f439973dSWarner Losh   }
22*f439973dSWarner Losh 
23*f439973dSWarner Losh #define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
24*f439973dSWarner Losh   { \
25*f439973dSWarner Losh     0x7ab33a91, 0xace5, 0x4326, { 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 } \
26*f439973dSWarner Losh   }
27*f439973dSWarner Losh 
28*f439973dSWarner Losh typedef struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL;
29*f439973dSWarner Losh 
30*f439973dSWarner Losh typedef struct {
31*f439973dSWarner Losh   ///
32*f439973dSWarner Losh   /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed
33*f439973dSWarner Losh   /// from the MNP receive queue will be dropped if its receive timeout expires.
34*f439973dSWarner Losh   ///
35*f439973dSWarner Losh   UINT32     ReceivedQueueTimeoutValue;
36*f439973dSWarner Losh   ///
37*f439973dSWarner Losh   /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed
38*f439973dSWarner Losh   /// from the MNP transmit queue will be dropped if its receive timeout expires.
39*f439973dSWarner Losh   ///
40*f439973dSWarner Losh   UINT32     TransmitQueueTimeoutValue;
41*f439973dSWarner Losh   ///
42*f439973dSWarner Losh   /// Ethernet type II 16-bit protocol type in host byte order. Valid
43*f439973dSWarner Losh   /// values are zero and 1,500 to 65,535.
44*f439973dSWarner Losh   ///
45*f439973dSWarner Losh   UINT16     ProtocolTypeFilter;
46*f439973dSWarner Losh   ///
47*f439973dSWarner Losh   /// Set to TRUE to receive packets that are sent to the network
48*f439973dSWarner Losh   /// device MAC address. The startup default value is FALSE.
49*f439973dSWarner Losh   ///
50*f439973dSWarner Losh   BOOLEAN    EnableUnicastReceive;
51*f439973dSWarner Losh   ///
52*f439973dSWarner Losh   /// Set to TRUE to receive packets that are sent to any of the
53*f439973dSWarner Losh   /// active multicast groups. The startup default value is FALSE.
54*f439973dSWarner Losh   ///
55*f439973dSWarner Losh   BOOLEAN    EnableMulticastReceive;
56*f439973dSWarner Losh   ///
57*f439973dSWarner Losh   /// Set to TRUE to receive packets that are sent to the network
58*f439973dSWarner Losh   /// device broadcast address. The startup default value is FALSE.
59*f439973dSWarner Losh   ///
60*f439973dSWarner Losh   BOOLEAN    EnableBroadcastReceive;
61*f439973dSWarner Losh   ///
62*f439973dSWarner Losh   /// Set to TRUE to receive packets that are sent to any MAC address.
63*f439973dSWarner Losh   /// The startup default value is FALSE.
64*f439973dSWarner Losh   ///
65*f439973dSWarner Losh   BOOLEAN    EnablePromiscuousReceive;
66*f439973dSWarner Losh   ///
67*f439973dSWarner Losh   /// Set to TRUE to drop queued packets when the configuration
68*f439973dSWarner Losh   /// is changed. The startup default value is FALSE.
69*f439973dSWarner Losh   ///
70*f439973dSWarner Losh   BOOLEAN    FlushQueuesOnReset;
71*f439973dSWarner Losh   ///
72*f439973dSWarner Losh   /// Set to TRUE to timestamp all packets when they are received
73*f439973dSWarner Losh   /// by the MNP. Note that timestamps may be unsupported in some
74*f439973dSWarner Losh   /// MNP implementations. The startup default value is FALSE.
75*f439973dSWarner Losh   ///
76*f439973dSWarner Losh   BOOLEAN    EnableReceiveTimestamps;
77*f439973dSWarner Losh   ///
78*f439973dSWarner Losh   /// Set to TRUE to disable background polling in this MNP
79*f439973dSWarner Losh   /// instance. Note that background polling may not be supported in
80*f439973dSWarner Losh   /// all MNP implementations. The startup default value is FALSE,
81*f439973dSWarner Losh   /// unless background polling is not supported.
82*f439973dSWarner Losh   ///
83*f439973dSWarner Losh   BOOLEAN    DisableBackgroundPolling;
84*f439973dSWarner Losh } EFI_MANAGED_NETWORK_CONFIG_DATA;
85*f439973dSWarner Losh 
86*f439973dSWarner Losh typedef struct {
87*f439973dSWarner Losh   EFI_TIME     Timestamp;
88*f439973dSWarner Losh   EFI_EVENT    RecycleEvent;
89*f439973dSWarner Losh   UINT32       PacketLength;
90*f439973dSWarner Losh   UINT32       HeaderLength;
91*f439973dSWarner Losh   UINT32       AddressLength;
92*f439973dSWarner Losh   UINT32       DataLength;
93*f439973dSWarner Losh   BOOLEAN      BroadcastFlag;
94*f439973dSWarner Losh   BOOLEAN      MulticastFlag;
95*f439973dSWarner Losh   BOOLEAN      PromiscuousFlag;
96*f439973dSWarner Losh   UINT16       ProtocolType;
97*f439973dSWarner Losh   VOID         *DestinationAddress;
98*f439973dSWarner Losh   VOID         *SourceAddress;
99*f439973dSWarner Losh   VOID         *MediaHeader;
100*f439973dSWarner Losh   VOID         *PacketData;
101*f439973dSWarner Losh } EFI_MANAGED_NETWORK_RECEIVE_DATA;
102*f439973dSWarner Losh 
103*f439973dSWarner Losh typedef struct {
104*f439973dSWarner Losh   UINT32    FragmentLength;
105*f439973dSWarner Losh   VOID      *FragmentBuffer;
106*f439973dSWarner Losh } EFI_MANAGED_NETWORK_FRAGMENT_DATA;
107*f439973dSWarner Losh 
108*f439973dSWarner Losh typedef struct {
109*f439973dSWarner Losh   EFI_MAC_ADDRESS                      *DestinationAddress; // OPTIONAL
110*f439973dSWarner Losh   EFI_MAC_ADDRESS                      *SourceAddress;      // OPTIONAL
111*f439973dSWarner Losh   UINT16                               ProtocolType;        // OPTIONAL
112*f439973dSWarner Losh   UINT32                               DataLength;
113*f439973dSWarner Losh   UINT16                               HeaderLength;     // OPTIONAL
114*f439973dSWarner Losh   UINT16                               FragmentCount;
115*f439973dSWarner Losh   EFI_MANAGED_NETWORK_FRAGMENT_DATA    FragmentTable[1];
116*f439973dSWarner Losh } EFI_MANAGED_NETWORK_TRANSMIT_DATA;
117*f439973dSWarner Losh 
118*f439973dSWarner Losh typedef struct {
119*f439973dSWarner Losh   ///
120*f439973dSWarner Losh   /// This Event will be signaled after the Status field is updated
121*f439973dSWarner Losh   /// by the MNP. The type of Event must be
122*f439973dSWarner Losh   /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
123*f439973dSWarner Losh   /// Event must be lower than or equal to TPL_CALLBACK.
124*f439973dSWarner Losh   ///
125*f439973dSWarner Losh   EFI_EVENT     Event;
126*f439973dSWarner Losh   ///
127*f439973dSWarner Losh   /// The status that is returned to the caller at the end of the operation
128*f439973dSWarner Losh   /// to indicate whether this operation completed successfully.
129*f439973dSWarner Losh   ///
130*f439973dSWarner Losh   EFI_STATUS    Status;
131*f439973dSWarner Losh   union {
132*f439973dSWarner Losh     ///
133*f439973dSWarner Losh     /// When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
134*f439973dSWarner Losh     ///
135*f439973dSWarner Losh     EFI_MANAGED_NETWORK_RECEIVE_DATA     *RxData;
136*f439973dSWarner Losh     ///
137*f439973dSWarner Losh     /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA.
138*f439973dSWarner Losh     ///
139*f439973dSWarner Losh     EFI_MANAGED_NETWORK_TRANSMIT_DATA    *TxData;
140*f439973dSWarner Losh   } Packet;
141*f439973dSWarner Losh } EFI_MANAGED_NETWORK_COMPLETION_TOKEN;
142*f439973dSWarner Losh 
143*f439973dSWarner Losh /**
144*f439973dSWarner Losh   Returns the operational parameters for the current MNP child driver.
145*f439973dSWarner Losh 
146*f439973dSWarner Losh   @param  This          The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
147*f439973dSWarner Losh   @param  MnpConfigData The pointer to storage for MNP operational parameters.
148*f439973dSWarner Losh   @param  SnpModeData   The pointer to storage for SNP operational parameters.
149*f439973dSWarner Losh 
150*f439973dSWarner Losh   @retval EFI_SUCCESS           The operation completed successfully.
151*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER This is NULL.
152*f439973dSWarner Losh   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP implementation.
153*f439973dSWarner Losh   @retval EFI_NOT_STARTED       This MNP child driver instance has not been configured. The default
154*f439973dSWarner Losh                                 values are returned in MnpConfigData if it is not NULL.
155*f439973dSWarner Losh   @retval Other                 The mode data could not be read.
156*f439973dSWarner Losh 
157*f439973dSWarner Losh **/
158*f439973dSWarner Losh typedef
159*f439973dSWarner Losh EFI_STATUS
160*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA)(
161*f439973dSWarner Losh   IN  EFI_MANAGED_NETWORK_PROTOCOL     *This,
162*f439973dSWarner Losh   OUT EFI_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData  OPTIONAL,
163*f439973dSWarner Losh   OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL
164*f439973dSWarner Losh   );
165*f439973dSWarner Losh 
166*f439973dSWarner Losh /**
167*f439973dSWarner Losh   Sets or clears the operational parameters for the MNP child driver.
168*f439973dSWarner Losh 
169*f439973dSWarner Losh   @param  This          The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
170*f439973dSWarner Losh   @param  MnpConfigData The pointer to configuration data that will be assigned to the MNP
171*f439973dSWarner Losh                         child driver instance. If NULL, the MNP child driver instance is
172*f439973dSWarner Losh                         reset to startup defaults and all pending transmit and receive
173*f439973dSWarner Losh                         requests are flushed.
174*f439973dSWarner Losh 
175*f439973dSWarner Losh   @retval EFI_SUCCESS           The operation completed successfully.
176*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
177*f439973dSWarner Losh   @retval EFI_OUT_OF_RESOURCES  Required system resources (usually memory) could not be
178*f439973dSWarner Losh                                 allocated.
179*f439973dSWarner Losh   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this [MNP]
180*f439973dSWarner Losh                                 implementation.
181*f439973dSWarner Losh   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.
182*f439973dSWarner Losh   @retval Other                 The MNP child driver instance has been reset to startup defaults.
183*f439973dSWarner Losh 
184*f439973dSWarner Losh **/
185*f439973dSWarner Losh typedef
186*f439973dSWarner Losh EFI_STATUS
187*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE)(
188*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_PROTOCOL     *This,
189*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData  OPTIONAL
190*f439973dSWarner Losh   );
191*f439973dSWarner Losh 
192*f439973dSWarner Losh /**
193*f439973dSWarner Losh   Translates an IP multicast address to a hardware (MAC) multicast address.
194*f439973dSWarner Losh 
195*f439973dSWarner Losh   @param  This       The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
196*f439973dSWarner Losh   @param  Ipv6Flag   Set to TRUE to if IpAddress is an IPv6 multicast address.
197*f439973dSWarner Losh                      Set to FALSE if IpAddress is an IPv4 multicast address.
198*f439973dSWarner Losh   @param  IpAddress  The pointer to the multicast IP address (in network byte order) to convert.
199*f439973dSWarner Losh   @param  MacAddress The pointer to the resulting multicast MAC address.
200*f439973dSWarner Losh 
201*f439973dSWarner Losh   @retval EFI_SUCCESS           The operation completed successfully.
202*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
203*f439973dSWarner Losh                                 - This is NULL.
204*f439973dSWarner Losh                                 - IpAddress is NULL.
205*f439973dSWarner Losh                                 - *IpAddress is not a valid multicast IP address.
206*f439973dSWarner Losh                                 - MacAddress is NULL.
207*f439973dSWarner Losh   @retval EFI_NOT_STARTED       This MNP child driver instance has not been configured.
208*f439973dSWarner Losh   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP implementation.
209*f439973dSWarner Losh   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.
210*f439973dSWarner Losh   @retval Other                 The address could not be converted.
211*f439973dSWarner Losh 
212*f439973dSWarner Losh **/
213*f439973dSWarner Losh typedef
214*f439973dSWarner Losh EFI_STATUS
215*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC)(
216*f439973dSWarner Losh   IN  EFI_MANAGED_NETWORK_PROTOCOL  *This,
217*f439973dSWarner Losh   IN  BOOLEAN                       Ipv6Flag,
218*f439973dSWarner Losh   IN  EFI_IP_ADDRESS                *IpAddress,
219*f439973dSWarner Losh   OUT EFI_MAC_ADDRESS               *MacAddress
220*f439973dSWarner Losh   );
221*f439973dSWarner Losh 
222*f439973dSWarner Losh /**
223*f439973dSWarner Losh   Enables and disables receive filters for multicast address.
224*f439973dSWarner Losh 
225*f439973dSWarner Losh   @param  This       The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
226*f439973dSWarner Losh   @param  JoinFlag   Set to TRUE to join this multicast group.
227*f439973dSWarner Losh                      Set to FALSE to leave this multicast group.
228*f439973dSWarner Losh   @param  MacAddress The pointer to the multicast MAC group (address) to join or leave.
229*f439973dSWarner Losh 
230*f439973dSWarner Losh   @retval EFI_SUCCESS           The requested operation completed successfully.
231*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
232*f439973dSWarner Losh                                 - This is NULL.
233*f439973dSWarner Losh                                 - JoinFlag is TRUE and MacAddress is NULL.
234*f439973dSWarner Losh                                 - *MacAddress is not a valid multicast MAC address.
235*f439973dSWarner Losh   @retval EFI_NOT_STARTED       This MNP child driver instance has not been configured.
236*f439973dSWarner Losh   @retval EFI_ALREADY_STARTED   The supplied multicast group is already joined.
237*f439973dSWarner Losh   @retval EFI_NOT_FOUND         The supplied multicast group is not joined.
238*f439973dSWarner Losh   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.
239*f439973dSWarner Losh   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP implementation.
240*f439973dSWarner Losh   @retval Other                 The requested operation could not be completed.
241*f439973dSWarner Losh 
242*f439973dSWarner Losh **/
243*f439973dSWarner Losh typedef
244*f439973dSWarner Losh EFI_STATUS
245*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_GROUPS)(
246*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_PROTOCOL  *This,
247*f439973dSWarner Losh   IN BOOLEAN                       JoinFlag,
248*f439973dSWarner Losh   IN EFI_MAC_ADDRESS               *MacAddress  OPTIONAL
249*f439973dSWarner Losh   );
250*f439973dSWarner Losh 
251*f439973dSWarner Losh /**
252*f439973dSWarner Losh   Places asynchronous outgoing data packets into the transmit queue.
253*f439973dSWarner Losh 
254*f439973dSWarner Losh   @param  This  The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
255*f439973dSWarner Losh   @param  Token The pointer to a token associated with the transmit data descriptor.
256*f439973dSWarner Losh 
257*f439973dSWarner Losh   @retval EFI_SUCCESS           The transmit completion token was cached.
258*f439973dSWarner Losh   @retval EFI_NOT_STARTED       This MNP child driver instance has not been configured.
259*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
260*f439973dSWarner Losh   @retval EFI_ACCESS_DENIED     The transmit completion token is already in the transmit queue.
261*f439973dSWarner Losh   @retval EFI_OUT_OF_RESOURCES  The transmit data could not be queued due to a lack of system resources
262*f439973dSWarner Losh                                 (usually memory).
263*f439973dSWarner Losh   @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.
264*f439973dSWarner Losh   @retval EFI_NOT_READY         The transmit request could not be queued because the transmit queue is full.
265*f439973dSWarner Losh 
266*f439973dSWarner Losh **/
267*f439973dSWarner Losh typedef
268*f439973dSWarner Losh EFI_STATUS
269*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT)(
270*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_PROTOCOL          *This,
271*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token
272*f439973dSWarner Losh   );
273*f439973dSWarner Losh 
274*f439973dSWarner Losh /**
275*f439973dSWarner Losh   Places an asynchronous receiving request into the receiving queue.
276*f439973dSWarner Losh 
277*f439973dSWarner Losh   @param  This  The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
278*f439973dSWarner Losh   @param  Token The pointer to a token associated with the receive data descriptor.
279*f439973dSWarner Losh 
280*f439973dSWarner Losh   @retval EFI_SUCCESS           The receive completion token was cached.
281*f439973dSWarner Losh   @retval EFI_NOT_STARTED       This MNP child driver instance has not been configured.
282*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
283*f439973dSWarner Losh                                 - This is NULL.
284*f439973dSWarner Losh                                 - Token is NULL.
285*f439973dSWarner Losh                                 - Token.Event is NULL.
286*f439973dSWarner Losh   @retval EFI_OUT_OF_RESOURCES  The transmit data could not be queued due to a lack of system resources
287*f439973dSWarner Losh                                 (usually memory).
288*f439973dSWarner Losh   @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.
289*f439973dSWarner Losh   @retval EFI_ACCESS_DENIED     The receive completion token was already in the receive queue.
290*f439973dSWarner Losh   @retval EFI_NOT_READY         The receive request could not be queued because the receive queue is full.
291*f439973dSWarner Losh 
292*f439973dSWarner Losh **/
293*f439973dSWarner Losh typedef
294*f439973dSWarner Losh EFI_STATUS
295*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_RECEIVE)(
296*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_PROTOCOL          *This,
297*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token
298*f439973dSWarner Losh   );
299*f439973dSWarner Losh 
300*f439973dSWarner Losh /**
301*f439973dSWarner Losh   Aborts an asynchronous transmit or receive request.
302*f439973dSWarner Losh 
303*f439973dSWarner Losh   @param  This  The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
304*f439973dSWarner Losh   @param  Token The pointer to a token that has been issued by
305*f439973dSWarner Losh                 EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
306*f439973dSWarner Losh                 EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If
307*f439973dSWarner Losh                 NULL, all pending tokens are aborted.
308*f439973dSWarner Losh 
309*f439973dSWarner Losh   @retval  EFI_SUCCESS           The asynchronous I/O request was aborted and Token.Event
310*f439973dSWarner Losh                                  was signaled. When Token is NULL, all pending requests were
311*f439973dSWarner Losh                                  aborted and their events were signaled.
312*f439973dSWarner Losh   @retval  EFI_NOT_STARTED       This MNP child driver instance has not been configured.
313*f439973dSWarner Losh   @retval  EFI_INVALID_PARAMETER This is NULL.
314*f439973dSWarner Losh   @retval  EFI_NOT_FOUND         When Token is not NULL, the asynchronous I/O request was
315*f439973dSWarner Losh                                  not found in the transmit or receive queue. It has either completed
316*f439973dSWarner Losh                                  or was not issued by Transmit() and Receive().
317*f439973dSWarner Losh 
318*f439973dSWarner Losh **/
319*f439973dSWarner Losh typedef
320*f439973dSWarner Losh EFI_STATUS
321*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_CANCEL)(
322*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_PROTOCOL          *This,
323*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token  OPTIONAL
324*f439973dSWarner Losh   );
325*f439973dSWarner Losh 
326*f439973dSWarner Losh /**
327*f439973dSWarner Losh   Polls for incoming data packets and processes outgoing data packets.
328*f439973dSWarner Losh 
329*f439973dSWarner Losh   @param  This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
330*f439973dSWarner Losh 
331*f439973dSWarner Losh   @retval EFI_SUCCESS      Incoming or outgoing data was processed.
332*f439973dSWarner Losh   @retval EFI_NOT_STARTED  This MNP child driver instance has not been configured.
333*f439973dSWarner Losh   @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
334*f439973dSWarner Losh   @retval EFI_NOT_READY    No incoming or outgoing data was processed. Consider increasing
335*f439973dSWarner Losh                            the polling rate.
336*f439973dSWarner Losh   @retval EFI_TIMEOUT      Data was dropped out of the transmit and/or receive queue.
337*f439973dSWarner Losh                             Consider increasing the polling rate.
338*f439973dSWarner Losh 
339*f439973dSWarner Losh **/
340*f439973dSWarner Losh typedef
341*f439973dSWarner Losh EFI_STATUS
342*f439973dSWarner Losh (EFIAPI *EFI_MANAGED_NETWORK_POLL)(
343*f439973dSWarner Losh   IN EFI_MANAGED_NETWORK_PROTOCOL    *This
344*f439973dSWarner Losh   );
345*f439973dSWarner Losh 
346*f439973dSWarner Losh ///
347*f439973dSWarner Losh /// The MNP is used by network applications (and drivers) to
348*f439973dSWarner Losh /// perform raw (unformatted) asynchronous network packet I/O.
349*f439973dSWarner Losh ///
350*f439973dSWarner Losh struct _EFI_MANAGED_NETWORK_PROTOCOL {
351*f439973dSWarner Losh   EFI_MANAGED_NETWORK_GET_MODE_DATA      GetModeData;
352*f439973dSWarner Losh   EFI_MANAGED_NETWORK_CONFIGURE          Configure;
353*f439973dSWarner Losh   EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC    McastIpToMac;
354*f439973dSWarner Losh   EFI_MANAGED_NETWORK_GROUPS             Groups;
355*f439973dSWarner Losh   EFI_MANAGED_NETWORK_TRANSMIT           Transmit;
356*f439973dSWarner Losh   EFI_MANAGED_NETWORK_RECEIVE            Receive;
357*f439973dSWarner Losh   EFI_MANAGED_NETWORK_CANCEL             Cancel;
358*f439973dSWarner Losh   EFI_MANAGED_NETWORK_POLL               Poll;
359*f439973dSWarner Losh };
360*f439973dSWarner Losh 
361*f439973dSWarner Losh extern EFI_GUID  gEfiManagedNetworkServiceBindingProtocolGuid;
362*f439973dSWarner Losh extern EFI_GUID  gEfiManagedNetworkProtocolGuid;
363*f439973dSWarner Losh 
364*f439973dSWarner Losh #endif
365