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