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 - 2018, Intel Corporation. All rights reserved.<BR>
13 SPDX-License-Identifier: BSD-2-Clause-Patent
14 
15  @par Revision Reference:
16  This Protocol is introduced in EFI Specification 1.10.
17 
18 **/
19 
20 #ifndef __SIMPLE_NETWORK_H__
21 #define __SIMPLE_NETWORK_H__
22 
23 FILE_LICENCE ( BSD2_PATENT );
24 FILE_SECBOOT ( PERMITTED );
25 
26 #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
27  { \
28  0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
29  }
30 
32 
33 ///
34 /// Protocol defined in EFI1.1.
35 ///
37 
38 ///
39 /// Simple Network Protocol data structures.
40 ///
41 typedef struct {
42  ///
43  /// Total number of frames received. Includes frames with errors and
44  /// dropped frames.
45  ///
47 
48  ///
49  /// Number of valid frames received and copied into receive buffers.
50  ///
52 
53  ///
54  /// Number of frames below the minimum length for the media.
55  /// This would be <64 for ethernet.
56  ///
58 
59  ///
60  /// Number of frames longer than the maxminum length for the
61  /// media. This would be >1500 for ethernet.
62  ///
64 
65  ///
66  /// Valid frames that were dropped because receive buffers were full.
67  ///
69 
70  ///
71  /// Number of valid unicast frames received and not dropped.
72  ///
74 
75  ///
76  /// Number of valid broadcast frames received and not dropped.
77  ///
79 
80  ///
81  /// Number of valid mutlicast frames received and not dropped.
82  ///
84 
85  ///
86  /// Number of frames w/ CRC or alignment errors.
87  ///
89 
90  ///
91  /// Total number of bytes received. Includes frames with errors
92  /// and dropped frames.
93  //
95 
96  ///
97  /// Transmit statistics.
98  ///
109 
110  ///
111  /// Number of collisions detection on this subnet.
112  ///
114 
115  ///
116  /// Number of frames destined for unsupported protocol.
117  ///
119 
120  ///
121  /// Number of valid frames received that were duplicated.
122  ///
124 
125  ///
126  /// Number of encrypted frames received that failed to decrypt.
127  ///
129 
130  ///
131  /// Number of frames that failed to transmit after exceeding the retry limit.
132  ///
134 
135  ///
136  /// Number of frames transmitted successfully after more than one attempt.
137  ///
140 
141 ///
142 /// The state of the network interface.
143 /// When an EFI_SIMPLE_NETWORK_PROTOCOL driver initializes a
144 /// network interface, the network interface is left in the EfiSimpleNetworkStopped state.
145 ///
146 typedef enum {
152 
153 #define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
154 #define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
155 #define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
156 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
157 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
158 
159 #define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
160 #define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
161 #define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
162 #define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
163 
164 #define MAX_MCAST_FILTER_CNT 16
165 typedef struct {
166  ///
167  /// Reports the current state of the network interface.
168  ///
170  ///
171  /// The size, in bytes, of the network interface's HW address.
172  ///
174  ///
175  /// The size, in bytes, of the network interface's media header.
176  ///
178  ///
179  /// The maximum size, in bytes, of the packets supported by the network interface.
180  ///
182  ///
183  /// The size, in bytes, of the NVRAM device attached to the network interface.
184  ///
186  ///
187  /// The size that must be used for all NVRAM reads and writes. The
188  /// start address for NVRAM read and write operations and the total
189  /// length of those operations, must be a multiple of this value. The
190  /// legal values for this field are 0, 1, 2, 4, and 8.
191  ///
193  ///
194  /// The multicast receive filter settings supported by the network interface.
195  ///
197  ///
198  /// The current multicast receive filter settings.
199  ///
201  ///
202  /// The maximum number of multicast address receive filters supported by the driver.
203  ///
205  ///
206  /// The current number of multicast address receive filters.
207  ///
209  ///
210  /// Array containing the addresses of the current multicast address receive filters.
211  ///
213  ///
214  /// The current HW MAC address for the network interface.
215  ///
217  ///
218  /// The current HW MAC address for broadcast packets.
219  ///
221  ///
222  /// The permanent HW MAC address for the network interface.
223  ///
225  ///
226  /// The interface type of the network interface.
227  ///
229  ///
230  /// TRUE if the HW MAC address can be changed.
231  ///
233  ///
234  /// TRUE if the network interface can transmit more than one packet at a time.
235  ///
237  ///
238  /// TRUE if the presence of media can be determined; otherwise FALSE.
239  ///
241  ///
242  /// TRUE if media are connected to the network interface; otherwise FALSE.
243  ///
246 
247 //
248 // Protocol Member Functions
249 //
250 
251 /**
252  Changes the state of a network interface from "stopped" to "started".
253 
254  @param This Protocol instance pointer.
255 
256  @retval EFI_SUCCESS The network interface was started.
257  @retval EFI_ALREADY_STARTED The network interface is already in the started state.
258  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
259  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
260  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
261 
262 **/
263 typedef
267  );
268 
269 /**
270  Changes the state of a network interface from "started" to "stopped".
271 
272  @param This Protocol instance pointer.
273 
274  @retval EFI_SUCCESS The network interface was stopped.
275  @retval EFI_ALREADY_STARTED The network interface is already in the stopped state.
276  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
277  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
278  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
279 
280 **/
281 typedef
285  );
286 
287 /**
288  Resets a network adapter and allocates the transmit and receive buffers
289  required by the network interface; optionally, also requests allocation
290  of additional transmit and receive buffers.
291 
292  @param This The protocol instance pointer.
293  @param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space
294  that the driver should allocate for the network interface.
295  Some network interfaces will not be able to use the extra
296  buffer, and the caller will not know if it is actually
297  being used.
298  @param ExtraTxBufferSize The size, in bytes, of the extra transmit 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 
304  @retval EFI_SUCCESS The network interface was initialized.
305  @retval EFI_NOT_STARTED The network interface has not been started.
306  @retval EFI_OUT_OF_RESOURCES There was not enough memory for the transmit and
307  receive buffers.
308  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
309  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
310  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
311 
312 **/
313 typedef
317  IN UINTN ExtraRxBufferSize OPTIONAL,
318  IN UINTN ExtraTxBufferSize OPTIONAL
319  );
320 
321 /**
322  Resets a network adapter and re-initializes it with the parameters that were
323  provided in the previous call to Initialize().
324 
325  @param This The protocol instance pointer.
326  @param ExtendedVerification Indicates that the driver may perform a more
327  exhaustive verification operation of the device
328  during reset.
329 
330  @retval EFI_SUCCESS The network interface was reset.
331  @retval EFI_NOT_STARTED The network interface has not been started.
332  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
333  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
334  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
335 
336 **/
337 typedef
341  IN BOOLEAN ExtendedVerification
342  );
343 
344 /**
345  Resets a network adapter and leaves it in a state that is safe for
346  another driver to initialize.
347 
348  @param This Protocol instance pointer.
349 
350  @retval EFI_SUCCESS The network interface was shutdown.
351  @retval EFI_NOT_STARTED The network interface has not been started.
352  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
353  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
354  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
355 
356 **/
357 typedef
361  );
362 
363 /**
364  Manages the multicast receive filters of a network interface.
365 
366  @param This The protocol instance pointer.
367  @param Enable A bit mask of receive filters to enable on the network interface.
368  @param Disable A bit mask of receive filters to disable on the network interface.
369  @param ResetMCastFilter Set to TRUE to reset the contents of the multicast receive
370  filters on the network interface to their default values.
371  @param McastFilterCnt Number of multicast HW MAC addresses in the new
372  MCastFilter list. This value must be less than or equal to
373  the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This
374  field is optional if ResetMCastFilter is TRUE.
375  @param MCastFilter A pointer to a list of new multicast receive filter HW MAC
376  addresses. This list will replace any existing multicast
377  HW MAC address list. This field is optional if
378  ResetMCastFilter is TRUE.
379 
380  @retval EFI_SUCCESS The multicast receive filter list was updated.
381  @retval EFI_NOT_STARTED The network interface has not been started.
382  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
383  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
384  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
385 
386 **/
387 typedef
391  IN UINT32 Enable,
392  IN UINT32 Disable,
393  IN BOOLEAN ResetMCastFilter,
394  IN UINTN MCastFilterCnt OPTIONAL,
395  IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
396  );
397 
398 /**
399  Modifies or resets the current station address, if supported.
400 
401  @param This The protocol instance pointer.
402  @param Reset Flag used to reset the station address to the network interfaces
403  permanent address.
404  @param New The new station address to be used for the network interface.
405 
406  @retval EFI_SUCCESS The network interfaces station address was updated.
407  @retval EFI_NOT_STARTED The network interface has not been started.
408  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
409  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
410  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
411 
412 **/
413 typedef
417  IN BOOLEAN Reset,
419  );
420 
421 /**
422  Resets or collects the statistics on a network interface.
423 
424  @param This Protocol instance pointer.
425  @param Reset Set to TRUE to reset the statistics for the network interface.
426  @param StatisticsSize On input the size, in bytes, of StatisticsTable. On
427  output the size, in bytes, of the resulting table of
428  statistics.
429  @param StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that
430  contains the statistics.
431 
432  @retval EFI_SUCCESS The statistics were collected from the network interface.
433  @retval EFI_NOT_STARTED The network interface has not been started.
434  @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer
435  size needed to hold the statistics is returned in
436  StatisticsSize.
437  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
438  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
439  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
440 
441 **/
442 typedef
446  IN BOOLEAN Reset,
447  IN OUT UINTN *StatisticsSize OPTIONAL,
448  OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
449  );
450 
451 /**
452  Converts a multicast IP address to a multicast HW MAC address.
453 
454  @param This The protocol instance pointer.
455  @param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set
456  to FALSE if the multicast IP address is IPv4 [RFC 791].
457  @param IP The multicast IP address that is to be converted to a multicast
458  HW MAC address.
459  @param MAC The multicast HW MAC address that is to be generated from IP.
460 
461  @retval EFI_SUCCESS The multicast IP address was mapped to the multicast
462  HW MAC address.
463  @retval EFI_NOT_STARTED The network interface has not been started.
464  @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer
465  size needed to hold the statistics is returned in
466  StatisticsSize.
467  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
468  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
469  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
470 
471 **/
472 typedef
476  IN BOOLEAN IPv6,
477  IN EFI_IP_ADDRESS *IP,
478  OUT EFI_MAC_ADDRESS *MAC
479  );
480 
481 /**
482  Performs read and write operations on the NVRAM device attached to a
483  network interface.
484 
485  @param This The protocol instance pointer.
486  @param ReadWrite TRUE for read operations, FALSE for write operations.
487  @param Offset Byte offset in the NVRAM device at which to start the read or
488  write operation. This must be a multiple of NvRamAccessSize and
489  less than NvRamSize.
490  @param BufferSize The number of bytes to read or write from the NVRAM device.
491  This must also be a multiple of NvramAccessSize.
492  @param Buffer A pointer to the data buffer.
493 
494  @retval EFI_SUCCESS The NVRAM access was performed.
495  @retval EFI_NOT_STARTED The network interface has not been started.
496  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
497  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
498  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
499 
500 **/
501 typedef
505  IN BOOLEAN ReadWrite,
506  IN UINTN Offset,
508  IN OUT VOID *Buffer
509  );
510 
511 /**
512  Reads the current interrupt status and recycled transmit buffer status from
513  a network interface.
514 
515  @param This The protocol instance pointer.
516  @param InterruptStatus A pointer to the bit mask of the currently active interrupts
517  If this is NULL, the interrupt status will not be read from
518  the device. If this is not NULL, the interrupt status will
519  be read from the device. When the interrupt status is read,
520  it will also be cleared. Clearing the transmit interrupt
521  does not empty the recycled transmit buffer array.
522  @param TxBuf Recycled transmit buffer address. The network interface will
523  not transmit if its internal recycled transmit buffer array
524  is full. Reading the transmit buffer does not clear the
525  transmit interrupt. If this is NULL, then the transmit buffer
526  status will not be read. If there are no transmit buffers to
527  recycle and TxBuf is not NULL, * TxBuf will be set to NULL.
528 
529  @retval EFI_SUCCESS The status of the network interface was retrieved.
530  @retval EFI_NOT_STARTED The network interface has not been started.
531  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
532  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
533  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
534 
535 **/
536 typedef
540  OUT UINT32 *InterruptStatus OPTIONAL,
541  OUT VOID **TxBuf OPTIONAL
542  );
543 
544 /**
545  Places a packet in the transmit queue of a network interface.
546 
547  @param This The protocol instance pointer.
548  @param HeaderSize The size, in bytes, of the media header to be filled in by
549  the Transmit() function. If HeaderSize is non-zero, then it
550  must be equal to This->Mode->MediaHeaderSize and the DestAddr
551  and Protocol parameters must not be NULL.
552  @param BufferSize The size, in bytes, of the entire packet (media header and
553  data) to be transmitted through the network interface.
554  @param Buffer A pointer to the packet (media header followed by data) to be
555  transmitted. This parameter cannot be NULL. If HeaderSize is zero,
556  then the media header in Buffer must already be filled in by the
557  caller. If HeaderSize is non-zero, then the media header will be
558  filled in by the Transmit() function.
559  @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this parameter
560  is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then
561  This->Mode->CurrentAddress is used for the source HW MAC address.
562  @param DestAddr The destination HW MAC address. If HeaderSize is zero, then this
563  parameter is ignored.
564  @param Protocol The type of header to build. If HeaderSize is zero, then this
565  parameter is ignored. See RFC 1700, section "Ether Types", for
566  examples.
567 
568  @retval EFI_SUCCESS The packet was placed on the transmit queue.
569  @retval EFI_NOT_STARTED The network interface has not been started.
570  @retval EFI_NOT_READY The network interface is too busy to accept this transmit request.
571  @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.
572  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
573  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
574  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
575 
576 **/
577 typedef
581  IN UINTN HeaderSize,
583  IN VOID *Buffer,
584  IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
587  );
588 
589 /**
590  Receives a packet from a network interface.
591 
592  @param This The protocol instance pointer.
593  @param HeaderSize The size, in bytes, of the media header received on the network
594  interface. If this parameter is NULL, then the media header size
595  will not be returned.
596  @param BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in
597  bytes, of the packet that was received on the network interface.
598  @param Buffer A pointer to the data buffer to receive both the media header and
599  the data.
600  @param SrcAddr The source HW MAC address. If this parameter is NULL, the
601  HW MAC source address will not be extracted from the media
602  header.
603  @param DestAddr The destination HW MAC address. If this parameter is NULL,
604  the HW MAC destination address will not be extracted from the
605  media header.
606  @param Protocol The media header type. If this parameter is NULL, then the
607  protocol will not be extracted from the media header. See
608  RFC 1700 section "Ether Types" for examples.
609 
610  @retval EFI_SUCCESS The received data was stored in Buffer, and BufferSize has
611  been updated to the number of bytes received.
612  @retval EFI_NOT_STARTED The network interface has not been started.
613  @retval EFI_NOT_READY The network interface is too busy to accept this transmit
614  request.
615  @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.
616  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
617  @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
618  @retval EFI_UNSUPPORTED This function is not supported by the network interface.
619 
620 **/
621 typedef
625  OUT UINTN *HeaderSize OPTIONAL,
627  OUT VOID *Buffer,
628  OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
631  );
632 
633 #define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000
634 
635 //
636 // Revision defined in EFI1.1
637 //
638 #define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
639 
640 ///
641 /// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access
642 /// to a network adapter. Once the network adapter initializes,
643 /// the EFI_SIMPLE_NETWORK_PROTOCOL protocol provides services that
644 /// allow packets to be transmitted and received.
645 ///
647  ///
648  /// Revision of the EFI_SIMPLE_NETWORK_PROTOCOL. All future revisions must
649  /// be backwards compatible. If a future version is not backwards compatible
650  /// it is not the same GUID.
651  ///
666  ///
667  /// Event used with WaitForEvent() to wait for a packet to be received.
668  ///
670  ///
671  /// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
672  ///
674 };
675 
677 
678 #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:293
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:216
Definition: efi.h:63
32-byte buffer containing a network Media Access Control address.
Definition: UefiBaseType.h:98
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.
unsigned char BOOLEAN
UINT64 RxDuplicatedFrames
Number of valid frames received that were duplicated.
UINT64 RxUnicastFrames
Number of valid unicast frames received and not dropped.
Definition: SimpleNetwork.h:73
unsigned int UINT32
Definition: ProcessorBind.h:99
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:63
UINT64 RxTotalBytes
Total number of bytes received.
Definition: SimpleNetwork.h:94
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:36
FILE_LICENCE(BSD2_PATENT)
unsigned char UINT8
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:51
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:106
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.
Definition: SimpleNetwork.h:99
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:68
UINT64 RxBroadcastFrames
Number of valid broadcast frames received and not dropped.
Definition: SimpleNetwork.h:78
unsigned short UINT16
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:46
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.
FILE_SECBOOT(PERMITTED)
EFI_SIMPLE_NETWORK_START Start
#define VOID
Undeclared type.
Definition: Base.h:272
unsigned long long UINT64
Definition: ProcessorBind.h:97
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.
EFI_SIMPLE_NETWORK_RESET Reset
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:32
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:88
EFI_SIMPLE_NETWORK_STATE
The state of the network interface.
UINT64 RxMulticastFrames
Number of valid mutlicast frames received and not dropped.
Definition: SimpleNetwork.h:83
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:41
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:57
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.