SimpleNetwork.h revision 4ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086
1/** @file
2  Simple Network protocol as defined in the UEFI 2.0 specification.
3
4  Basic network device abstraction.
5
6  Rx    - Received
7  Tx    - Transmit
8  MCast - MultiCast
9  ...
10
11  Copyright (c) 2006 - 2008, Intel Corporation
12  All rights reserved. This program and the accompanying materials
13  are licensed and made available under the terms and conditions of the BSD License
14  which accompanies this distribution.  The full text of the license may be found at
15  http://opensource.org/licenses/bsd-license.php
16
17  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
18  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19
20**/
21
22#ifndef __SIMPLE_NETWORK_H__
23#define __SIMPLE_NETWORK_H__
24
25#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
26  { \
27    0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
28  }
29
30typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL  EFI_SIMPLE_NETWORK_PROTOCOL;
31
32
33//
34// Protocol defined in EFI1.1.
35//
36typedef EFI_SIMPLE_NETWORK_PROTOCOL   EFI_SIMPLE_NETWORK;
37
38//
39// Simple Network Protocol data structures
40//
41typedef struct {
42  //
43  // Total number of frames received.  Includes frames with errors and
44  // dropped frames.
45  //
46  UINT64  RxTotalFrames;
47
48  //
49  // Number of valid frames received and copied into receive buffers.
50  //
51  UINT64  RxGoodFrames;
52
53  //
54  // Number of frames below the minimum length for the media.
55  // This would be <64 for ethernet.
56  //
57  UINT64  RxUndersizeFrames;
58
59  //
60  // Number of frames longer than the maxminum length for the
61  // media.  This would be >1500 for ethernet.
62  //
63  UINT64  RxOversizeFrames;
64
65  //
66  // Valid frames that were dropped because receive buffers were full.
67  //
68  UINT64  RxDroppedFrames;
69
70  //
71  // Number of valid unicast frames received and not dropped.
72  //
73  UINT64  RxUnicastFrames;
74
75  //
76  // Number of valid broadcast frames received and not dropped.
77  //
78  UINT64  RxBroadcastFrames;
79
80  //
81  // Number of valid mutlicast frames received and not dropped.
82  //
83  UINT64  RxMulticastFrames;
84
85  //
86  // Number of frames w/ CRC or alignment errors.
87  //
88  UINT64  RxCrcErrorFrames;
89
90  //
91  // Total number of bytes received.  Includes frames with errors
92  // and dropped frames.
93  //
94  UINT64  RxTotalBytes;
95
96  //
97  // Transmit statistics.
98  //
99  UINT64  TxTotalFrames;
100  UINT64  TxGoodFrames;
101  UINT64  TxUndersizeFrames;
102  UINT64  TxOversizeFrames;
103  UINT64  TxDroppedFrames;
104  UINT64  TxUnicastFrames;
105  UINT64  TxBroadcastFrames;
106  UINT64  TxMulticastFrames;
107  UINT64  TxCrcErrorFrames;
108  UINT64  TxTotalBytes;
109
110  //
111  // Number of collisions detection on this subnet.
112  //
113  UINT64  Collisions;
114
115  //
116  // Number of frames destined for unsupported protocol.
117  //
118  UINT64  UnsupportedProtocol;
119
120} EFI_NETWORK_STATISTICS;
121
122typedef enum {
123  EfiSimpleNetworkStopped,
124  EfiSimpleNetworkStarted,
125  EfiSimpleNetworkInitialized,
126  EfiSimpleNetworkMaxState
127} EFI_SIMPLE_NETWORK_STATE;
128
129#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST                0x01
130#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST              0x02
131#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST              0x04
132#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS            0x08
133#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST  0x10
134
135#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT              0x01
136#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT             0x02
137#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT              0x04
138#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT             0x08
139
140#define MAX_MCAST_FILTER_CNT                              16
141typedef struct {
142  UINT32          State;
143  UINT32          HwAddressSize;
144  UINT32          MediaHeaderSize;
145  UINT32          MaxPacketSize;
146  UINT32          NvRamSize;
147  UINT32          NvRamAccessSize;
148  UINT32          ReceiveFilterMask;
149  UINT32          ReceiveFilterSetting;
150  UINT32          MaxMCastFilterCount;
151  UINT32          MCastFilterCount;
152  EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
153  EFI_MAC_ADDRESS CurrentAddress;
154  EFI_MAC_ADDRESS BroadcastAddress;
155  EFI_MAC_ADDRESS PermanentAddress;
156  UINT8           IfType;
157  BOOLEAN         MacAddressChangeable;
158  BOOLEAN         MultipleTxSupported;
159  BOOLEAN         MediaPresentSupported;
160  BOOLEAN         MediaPresent;
161} EFI_SIMPLE_NETWORK_MODE;
162
163//
164// Protocol Member Functions
165//
166/**
167  Changes the state of a network interface from "stopped" to "started".
168
169  @param  This Protocol instance pointer.
170
171  @retval EFI_SUCCESS           The network interface was started.
172  @retval EFI_ALREADY_STARTED   The network interface is already in the started state.
173  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
174  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
175  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
176
177**/
178typedef
179EFI_STATUS
180(EFIAPI *EFI_SIMPLE_NETWORK_START)(
181  IN EFI_SIMPLE_NETWORK_PROTOCOL  *This
182  )
183;
184
185/**
186  Changes the state of a network interface from "started" to "stopped".
187
188  @param  This Protocol instance pointer.
189
190  @retval EFI_SUCCESS           The network interface was stopped.
191  @retval EFI_ALREADY_STARTED   The network interface is already in the stopped state.
192  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
193  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
194  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
195
196**/
197typedef
198EFI_STATUS
199(EFIAPI *EFI_SIMPLE_NETWORK_STOP)(
200  IN EFI_SIMPLE_NETWORK_PROTOCOL  *This
201  )
202;
203
204/**
205  Resets a network adapter and allocates the transmit and receive buffers
206  required by the network interface; optionally, also requests allocation
207  of additional transmit and receive buffers.
208
209  @param  This              Protocol instance pointer.
210  @param  ExtraRxBufferSize The size, in bytes, of the extra receive buffer space
211                            that the driver should allocate for the network interface.
212                            Some network interfaces will not be able to use the extra
213                            buffer, and the caller will not know if it is actually
214                            being used.
215  @param  ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space
216                            that the driver should allocate for the network interface.
217                            Some network interfaces will not be able to use the extra
218                            buffer, and the caller will not know if it is actually
219                            being used.
220
221  @retval EFI_SUCCESS           The network interface was initialized.
222  @retval EFI_NOT_STARTED       The network interface has not been started
223  @retval EFI_OUT_OF_RESOURCES  There was not enough memory for the transmit and
224                                receive buffers.   .
225  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
226  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
227  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
228
229**/
230typedef
231EFI_STATUS
232(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE)(
233  IN EFI_SIMPLE_NETWORK_PROTOCOL                    *This,
234  IN UINTN                                          ExtraRxBufferSize  OPTIONAL,
235  IN UINTN                                          ExtraTxBufferSize  OPTIONAL
236  )
237;
238
239/**
240  Resets a network adapter and re-initializes it with the parameters that were
241  provided in the previous call to Initialize().
242
243  @param  This                 Protocol instance pointer.
244  @param  ExtendedVerification Indicates that the driver may perform a more
245                               exhaustive verification operation of the device
246                               during reset.
247
248  @retval EFI_SUCCESS           The network interface was reset.
249  @retval EFI_NOT_STARTED       The network interface has not been started
250  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
251  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
252  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
253
254**/
255typedef
256EFI_STATUS
257(EFIAPI *EFI_SIMPLE_NETWORK_RESET)(
258  IN EFI_SIMPLE_NETWORK_PROTOCOL   *This,
259  IN BOOLEAN                       ExtendedVerification
260  )
261;
262
263/**
264  Resets a network adapter and leaves it in a state that is safe for
265  another driver to initialize.
266
267  @param  This Protocol instance pointer.
268
269  @retval EFI_SUCCESS           The network interface was shutdown.
270  @retval EFI_NOT_STARTED       The network interface has not been started
271  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
272  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
273  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
274
275**/
276typedef
277EFI_STATUS
278(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN)(
279  IN EFI_SIMPLE_NETWORK_PROTOCOL  *This
280  )
281;
282
283/**
284  Manages the multicast receive filters of a network interface.
285
286  @param  This             Protocol instance pointer.
287  @param  Enable           A bit mask of receive filters to enable on the network interface.
288  @param  Disable          A bit mask of receive filters to disable on the network interface.
289  @param  ResetMCastFilter Set to TRUE to reset the contents of the multicast receive
290                           filters on the network interface to their default values.
291  @param  McastFilterCnt   Number of multicast HW MAC addresses in the new
292                           MCastFilter list. This value must be less than or equal to
293                           the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This
294                           field is optional if ResetMCastFilter is TRUE.
295  @param  MCastFilter      A pointer to a list of new multicast receive filter HW MAC
296                           addresses. This list will replace any existing multicast
297                           HW MAC address list. This field is optional if
298                           ResetMCastFilter is TRUE.
299
300  @retval EFI_SUCCESS           The multicast receive filter list was updated.
301  @retval EFI_NOT_STARTED       The network interface has not been started
302  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
303  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
304  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
305
306**/
307typedef
308EFI_STATUS
309(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS)(
310  IN EFI_SIMPLE_NETWORK_PROTOCOL                             *This,
311  IN UINT32                                                  Enable,
312  IN UINT32                                                  Disable,
313  IN BOOLEAN                                                 ResetMCastFilter,
314  IN UINTN                                                   MCastFilterCnt     OPTIONAL,
315  IN EFI_MAC_ADDRESS                                         *MCastFilter OPTIONAL
316  )
317;
318
319/**
320  Modifies or resets the current station address, if supported.
321
322  @param  This  Protocol instance pointer.
323  @param  Reset Flag used to reset the station address to the network interfaces
324                permanent address.
325  @param  New   New station address to be used for the network interface.
326
327  @retval EFI_SUCCESS           The network interfaces station address was updated.
328  @retval EFI_NOT_STARTED       The network interface has not been started
329  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
330  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
331  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
332
333**/
334typedef
335EFI_STATUS
336(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS)(
337  IN EFI_SIMPLE_NETWORK_PROTOCOL            *This,
338  IN BOOLEAN                                Reset,
339  IN EFI_MAC_ADDRESS                        *New OPTIONAL
340  )
341;
342
343/**
344  Resets or collects the statistics on a network interface.
345
346  @param  This            Protocol instance pointer.
347  @param  Reset           Set to TRUE to reset the statistics for the network interface.
348  @param  StatisticsSize  On input the size, in bytes, of StatisticsTable. On
349                          output the size, in bytes, of the resulting table of
350                          statistics.
351  @param  StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that
352                          contains the statistics.
353
354  @retval EFI_SUCCESS           The statistics were collected from the network interface.
355  @retval EFI_NOT_STARTED       The network interface has not been started.
356  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The current buffer
357                                size needed to hold the statistics is returned in
358                                StatisticsSize.
359  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
360  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
361  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
362
363**/
364typedef
365EFI_STATUS
366(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS)(
367  IN EFI_SIMPLE_NETWORK_PROTOCOL          *This,
368  IN BOOLEAN                              Reset,
369  IN OUT UINTN                            *StatisticsSize   OPTIONAL,
370  OUT EFI_NETWORK_STATISTICS              *StatisticsTable  OPTIONAL
371  )
372;
373
374/**
375  Converts a multicast IP address to a multicast HW MAC address.
376
377  @param  This Protocol instance pointer.
378  @param  IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set
379               to FALSE if the multicast IP address is IPv4 [RFC 791].
380  @param  IP   The multicast IP address that is to be converted to a multicast
381               HW MAC address.
382  @param  MAC  The multicast HW MAC address that is to be generated from IP.
383
384  @retval EFI_SUCCESS           The multicast IP address was mapped to the multicast
385                                HW MAC address.
386  @retval EFI_NOT_STARTED       The network interface has not been started.
387  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The current buffer
388                                size needed to hold the statistics is returned in
389                                StatisticsSize.
390  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
391  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
392  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
393
394**/
395typedef
396EFI_STATUS
397(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC)(
398  IN EFI_SIMPLE_NETWORK_PROTOCOL          *This,
399  IN BOOLEAN                              IPv6,
400  IN EFI_IP_ADDRESS                       *IP,
401  OUT EFI_MAC_ADDRESS                     *MAC
402  )
403;
404
405/**
406  Performs read and write operations on the NVRAM device attached to a
407  network interface.
408
409  @param  This       Protocol instance pointer.
410  @param  ReadWrite  TRUE for read operations, FALSE for write operations.
411  @param  Offset     Byte offset in the NVRAM device at which to start the read or
412                     write operation. This must be a multiple of NvRamAccessSize and
413                     less than NvRamSize.
414  @param  BufferSize The number of bytes to read or write from the NVRAM device.
415                     This must also be a multiple of NvramAccessSize.
416  @param  Buffer     A pointer to the data buffer.
417
418  @retval EFI_SUCCESS           The NVRAM access was performed.
419  @retval EFI_NOT_STARTED       The network interface has not been started.
420  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
421  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
422  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
423
424**/
425typedef
426EFI_STATUS
427(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA)(
428  IN EFI_SIMPLE_NETWORK_PROTOCOL          *This,
429  IN BOOLEAN                              ReadWrite,
430  IN UINTN                                Offset,
431  IN UINTN                                BufferSize,
432  IN OUT VOID                             *Buffer
433  )
434;
435
436/**
437  Reads the current interrupt status and recycled transmit buffer status from
438  a network interface.
439
440  @param  This            Protocol instance pointer.
441  @param  InterruptStatus A pointer to the bit mask of the currently active interrupts
442                          If this is NULL, the interrupt status will not be read from
443                          the device. If this is not NULL, the interrupt status will
444                          be read from the device. When the  interrupt status is read,
445                          it will also be cleared. Clearing the transmit  interrupt
446                          does not empty the recycled transmit buffer array.
447  @param  TxBuf           Recycled transmit buffer address. The network interface will
448                          not transmit if its internal recycled transmit buffer array
449                          is full. Reading the transmit buffer does not clear the
450                          transmit interrupt. If this is NULL, then the transmit buffer
451                          status will not be read. If there are no transmit buffers to
452                          recycle and TxBuf is not NULL, * TxBuf will be set to NULL.
453
454  @retval EFI_SUCCESS           The status of the network interface was retrieved.
455  @retval EFI_NOT_STARTED       The network interface has not been started.
456  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
457  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
458  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
459
460**/
461typedef
462EFI_STATUS
463(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS)(
464  IN EFI_SIMPLE_NETWORK_PROTOCOL          *This,
465  OUT UINT32                              *InterruptStatus OPTIONAL,
466  OUT VOID                                **TxBuf OPTIONAL
467  )
468;
469
470/**
471  Places a packet in the transmit queue of a network interface.
472
473  @param  This       Protocol instance pointer.
474  @param  HeaderSize The size, in bytes, of the media header to be filled in by
475                     the Transmit() function. If HeaderSize is non-zero, then it
476                     must be equal to This->Mode->MediaHeaderSize and the DestAddr
477                     and Protocol parameters must not be NULL.
478  @param  BufferSize The size, in bytes, of the entire packet (media header and
479                     data) to be transmitted through the network interface.
480  @param  Buffer     A pointer to the packet (media header followed by data) to be
481                     transmitted. This parameter cannot be NULL. If HeaderSize is zero,
482                     then the media header in Buffer must already be filled in by the
483                     caller. If HeaderSize is non-zero, then the media header will be
484                     filled in by the Transmit() function.
485  @param  SrcAddr    The source HW MAC address. If HeaderSize is zero, then this parameter
486                     is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then
487                     This->Mode->CurrentAddress is used for the source HW MAC address.
488  @param  DsetAddr   The destination HW MAC address. If HeaderSize is zero, then this
489                     parameter is ignored.
490  @param  Protocol   The type of header to build. If HeaderSize is zero, then this
491                     parameter is ignored. See RFC 1700, section "Ether Types", for
492                     examples.
493
494  @retval EFI_SUCCESS           The packet was placed on the transmit queue.
495  @retval EFI_NOT_STARTED       The network interface has not been started.
496  @retval EFI_NOT_READY         The network interface is too busy to accept this transmit request.
497  @retval EFI_BUFFER_TOO_SMALL  The BufferSize parameter is too small.
498  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
499  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
500  @retval EFI_UNSUPPORTED       This function is not supported by the network interface.
501
502**/
503typedef
504EFI_STATUS
505(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT)(
506  IN EFI_SIMPLE_NETWORK_PROTOCOL          *This,
507  IN UINTN                                HeaderSize,
508  IN UINTN                                BufferSize,
509  IN VOID                                 *Buffer,
510  IN EFI_MAC_ADDRESS                      *SrcAddr  OPTIONAL,
511  IN EFI_MAC_ADDRESS                      *DestAddr OPTIONAL,
512  IN UINT16                               *Protocol OPTIONAL
513  )
514;
515
516/**
517  Receives a packet from a network interface.
518
519  @param  This       Protocol instance pointer.
520  @param  HeaderSize The size, in bytes, of the media header received on the network
521                     interface. If this parameter is NULL, then the media header size
522                     will not be returned.
523  @param  BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in
524                     bytes, of the packet that was received on the network interface.
525  @param  Buffer     A pointer to the data buffer to receive both the media header and
526                     the data.
527  @param  SrcAddr    The source HW MAC address. If this parameter is NULL, the
528                     HW MAC source address will not be extracted from the media
529                     header.
530  @param  DsetAddr   The destination HW MAC address. If this parameter is NULL,
531                     the HW MAC destination address will not be extracted from the
532                     media header.
533  @param  Protocol   The media header type. If this parameter is NULL, then the
534                     protocol will not be extracted from the media header. See
535                     RFC 1700 section "Ether Types" for examples.
536
537  @retval  EFI_SUCCESS           The received data was stored in Buffer, and BufferSize has
538                                 been updated to the number of bytes received.
539  @retval  EFI_NOT_STARTED       The network interface has not been started.
540  @retval  EFI_NOT_READY         The network interface is too busy to accept this transmit
541                                 request.
542  @retval  EFI_BUFFER_TOO_SMALL  The BufferSize parameter is too small.
543  @retval  EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
544  @retval  EFI_DEVICE_ERROR      The command could not be sent to the network interface.
545  @retval  EFI_UNSUPPORTED       This function is not supported by the network interface.
546
547**/
548typedef
549EFI_STATUS
550(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE)(
551  IN EFI_SIMPLE_NETWORK_PROTOCOL          *This,
552  OUT UINTN                               *HeaderSize OPTIONAL,
553  IN OUT UINTN                            *BufferSize,
554  OUT VOID                                *Buffer,
555  OUT EFI_MAC_ADDRESS                     *SrcAddr    OPTIONAL,
556  OUT EFI_MAC_ADDRESS                     *DestAddr   OPTIONAL,
557  OUT UINT16                              *Protocol   OPTIONAL
558  )
559;
560
561#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION  0x00010000
562
563//
564// Revision defined in EFI1.1
565//
566#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION   EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
567
568/**
569  @par Protocol Description:
570  The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access
571  to a network adapter. Once the network adapter initializes,
572  the EFI_SIMPLE_NETWORK_PROTOCOL protocol provides services that
573  allow packets to be transmitted and received.
574
575  @param Revision
576  Revision of the EFI_SIMPLE_NETWORK_PROTOCOL. All future revisions must
577  be backwards compatible. If a future version is not backwards compatible
578  it is not the same GUID.
579
580  @param Start
581  Prepares the network interface for further command operations.
582  No other EFI_SIMPLE_NETWORK_PROTOCOL interface functions will operate
583  until this call is made.
584
585  @param Stop
586  Stops further network interface command processing.
587  No other EFI_SIMPLE_NETWORK_PROTOCOL interface functions will operate
588  after this call is made until another Start() call is made.
589
590  @param Initialize
591  Resets the network adapter and allocates the transmit and receive buffers.
592
593  @param Reset
594  Resets the network adapter and reinitializes it with the parameters
595  provided in the previous call to Initialize().
596
597  @param Shutdown
598  Resets the network adapter and leaves it in a state safe for another driver
599  to initialize. The memory buffers assigned in the Initialize() call are released.
600  After this call, only the Initialize() or Stop() calls may be used.
601
602  @param ReceiveFilters
603  Enables and disables the receive filters for the network interface and,
604  if supported, manages the filtered multicast
605  HW MAC (Hardware Media Access Control) address list.
606
607  @param StationAddress
608  Modifies or resets the current station address, if supported.
609
610  @param Statistics
611  Collects statistics from the network interface and allows the statistics to be reset.
612
613  @param MCastIpToMac
614  Maps a multicast IP address to a multicast HW MAC address.
615
616  @param NvData
617  Reads and writes the contents of the NVRAM devices attached to the network interface.
618
619  @param GetStatus
620  Reads the current interrupt status and the list of recycled transmit
621  buffers from the network interface.
622
623  @param Transmit
624  Places a packet in the transmit queue.
625
626  @param Receive
627  Retrieves a packet from the receive queue, along with the status
628  flags that describe the packet type.
629
630  @param WaitForPacket
631  Event used with WaitForEvent() to wait for a packet to be received.
632
633  @param Mode
634  Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
635
636**/
637struct _EFI_SIMPLE_NETWORK_PROTOCOL {
638  UINT64                              Revision;
639  EFI_SIMPLE_NETWORK_START            Start;
640  EFI_SIMPLE_NETWORK_STOP             Stop;
641  EFI_SIMPLE_NETWORK_INITIALIZE       Initialize;
642  EFI_SIMPLE_NETWORK_RESET            Reset;
643  EFI_SIMPLE_NETWORK_SHUTDOWN         Shutdown;
644  EFI_SIMPLE_NETWORK_RECEIVE_FILTERS  ReceiveFilters;
645  EFI_SIMPLE_NETWORK_STATION_ADDRESS  StationAddress;
646  EFI_SIMPLE_NETWORK_STATISTICS       Statistics;
647  EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC  MCastIpToMac;
648  EFI_SIMPLE_NETWORK_NVDATA           NvData;
649  EFI_SIMPLE_NETWORK_GET_STATUS       GetStatus;
650  EFI_SIMPLE_NETWORK_TRANSMIT         Transmit;
651  EFI_SIMPLE_NETWORK_RECEIVE          Receive;
652  EFI_EVENT                           WaitForPacket;
653  EFI_SIMPLE_NETWORK_MODE             *Mode;
654};
655
656extern EFI_GUID gEfiSimpleNetworkProtocolGuid;
657
658#endif
659