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