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
12Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
13SPDX-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
23FILE_LICENCE ( BSD2_PATENT );
24FILE_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///
41typedef 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///
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
165typedef 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**/
263typedef
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**/
281typedef
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**/
313typedef
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**/
337typedef
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**/
357typedef
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**/
387typedef
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**/
413typedef
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**/
442typedef
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**/
472typedef
476 IN BOOLEAN IPv6,
477 IN EFI_IP_ADDRESS *IP,
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**/
501typedef
505 IN BOOLEAN ReadWrite,
506 IN UINTN Offset,
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**/
536typedef
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**/
577typedef
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**/
621typedef
625 OUT UINTN *HeaderSize OPTIONAL,
627 OUT VOID *Buffer,
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
unsigned short UINT16
2-byte unsigned value.
unsigned char BOOLEAN
Logical Boolean.
UINT64 UINTN
Unsigned value of native width.
unsigned long long UINT64
8-byte unsigned value.
#define EFIAPI
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
Definition Base.h:272
#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_GUID gEfiSimpleNetworkProtocolGuid
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.
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.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_START)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Changes the state of a network interface from "stopped" to "started".
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.
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_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.
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_SIMPLE_NETWORK_STATE
The state of the network interface.
@ EfiSimpleNetworkInitialized
@ EfiSimpleNetworkStarted
@ EfiSimpleNetworkStopped
@ EfiSimpleNetworkMaxState
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...
struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL
EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK
Protocol defined in EFI1.1.
#define MAX_MCAST_FILTER_CNT
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_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.
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.
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.
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STOP)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Changes the state of a network interface from "started" to "stopped".
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define EFI_EVENT
Definition efi.h:54
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
UINT16_t BufferSize
Buffer size.
Definition pxe_api.h:7
UINT8_t Protocol
Protocol.
Definition pxe_api.h:7
SEGOFF16_t Buffer
Buffer address.
Definition pxe_api.h:8
SEGOFF16_t DestAddr
Destination MAC address.
Definition pxe_api.h:13
32-byte buffer containing a network Media Access Control address.
Simple Network Protocol data structures.
UINT64 TxErrorFrames
Number of frames that failed to transmit after exceeding the retry limit.
UINT64 RxTotalFrames
Total number of frames received.
UINT64 RxTotalBytes
Total number of bytes received.
UINT64 RxDroppedFrames
Valid frames that were dropped because receive buffers were full.
UINT64 TxRetryFrames
Number of frames transmitted successfully after more than one attempt.
UINT64 TxTotalFrames
Transmit statistics.
UINT64 RxDuplicatedFrames
Number of valid frames received that were duplicated.
UINT64 RxCrcErrorFrames
Number of frames w/ CRC or alignment errors.
UINT64 RxGoodFrames
Number of valid frames received and copied into receive buffers.
UINT64 UnsupportedProtocol
Number of frames destined for unsupported protocol.
UINT64 RxOversizeFrames
Number of frames longer than the maxminum length for the media.
UINT64 RxMulticastFrames
Number of valid mutlicast frames received and not dropped.
UINT64 RxUndersizeFrames
Number of frames below the minimum length for the media.
UINT64 Collisions
Number of collisions detection on this subnet.
UINT64 RxUnicastFrames
Number of valid unicast frames received and not dropped.
UINT64 RxBroadcastFrames
Number of valid broadcast frames received and not dropped.
UINT64 RxDecryptErrorFrames
Number of encrypted frames received that failed to decrypt.
BOOLEAN MacAddressChangeable
TRUE if the HW MAC address can be changed.
EFI_MAC_ADDRESS CurrentAddress
The current HW MAC address for the network interface.
EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]
Array containing the addresses of the current multicast address receive filters.
UINT32 NvRamAccessSize
The size that must be used for all NVRAM reads and writes.
BOOLEAN MultipleTxSupported
TRUE if the network interface can transmit more than one packet at a time.
UINT32 ReceiveFilterMask
The multicast receive filter settings supported by the network interface.
UINT32 NvRamSize
The size, in bytes, of the NVRAM device attached to the network interface.
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.
UINT8 IfType
The interface type of the network interface.
UINT32 State
Reports the current state of the network interface.
UINT32 MaxMCastFilterCount
The maximum number of multicast address receive filters supported by the driver.
BOOLEAN MediaPresentSupported
TRUE if the presence of media can be determined; otherwise FALSE.
EFI_MAC_ADDRESS PermanentAddress
The permanent HW MAC address for the network interface.
UINT32 MCastFilterCount
The current number of multicast address receive filters.
UINT32 MaxPacketSize
The maximum size, in bytes, of the packets supported by the network interface.
EFI_MAC_ADDRESS BroadcastAddress
The current HW MAC address for broadcast packets.
UINT32 HwAddressSize
The size, in bytes, of the network interface's HW address.
UINT32 ReceiveFilterSetting
The current multicast receive filter settings.
The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access to a network adapter.
EFI_SIMPLE_NETWORK_INITIALIZE Initialize
UINT64 Revision
Revision of the EFI_SIMPLE_NETWORK_PROTOCOL.
EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac
EFI_SIMPLE_NETWORK_RECEIVE Receive
EFI_SIMPLE_NETWORK_STATISTICS Statistics
EFI_SIMPLE_NETWORK_NVDATA NvData
EFI_SIMPLE_NETWORK_START Start
EFI_EVENT WaitForPacket
Event used with WaitForEvent() to wait for a packet to be received.
EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters
EFI_SIMPLE_NETWORK_MODE * Mode
Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown
EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress
EFI_SIMPLE_NETWORK_TRANSMIT Transmit
EFI_SIMPLE_NETWORK_STOP Stop
EFI_SIMPLE_NETWORK_GET_STATUS GetStatus
EFI_SIMPLE_NETWORK_RESET Reset
16-byte buffer aligned on a 4-byte boundary.