TianoCore EDK2 master
Loading...
Searching...
No Matches
SimpleNetwork.h
Go to the documentation of this file.
1
20#ifndef __SIMPLE_NETWORK_H__
21#define __SIMPLE_NETWORK_H__
22
23#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
24 { \
25 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
26 }
27
29
34
38typedef struct {
44
49
55
61
66
71
76
81
86
90 //
92
97 UINT64 TxGoodFrames;
98 UINT64 TxUndersizeFrames;
99 UINT64 TxOversizeFrames;
100 UINT64 TxDroppedFrames;
101 UINT64 TxUnicastFrames;
102 UINT64 TxBroadcastFrames;
103 UINT64 TxMulticastFrames;
104 UINT64 TxCrcErrorFrames;
105 UINT64 TxTotalBytes;
106
111
116
121
126
131
137
143typedef enum {
144 EfiSimpleNetworkStopped,
145 EfiSimpleNetworkStarted,
146 EfiSimpleNetworkInitialized,
147 EfiSimpleNetworkMaxState
149
150#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
151#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
152#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
153#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
154#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
155
156#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
157#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
158#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
159#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
160
161#define MAX_MCAST_FILTER_CNT 16
162typedef struct {
166 UINT32 State;
182 UINT32 NvRamSize;
209 EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
225 UINT8 IfType;
243
244//
245// Protocol Member Functions
246//
247
260typedef
264 );
265
278typedef
282 );
283
310typedef
314 IN UINTN ExtraRxBufferSize OPTIONAL,
315 IN UINTN ExtraTxBufferSize OPTIONAL
316 );
317
334typedef
338 IN BOOLEAN ExtendedVerification
339 );
340
354typedef
358 );
359
384typedef
388 IN UINT32 Enable,
389 IN UINT32 Disable,
390 IN BOOLEAN ResetMCastFilter,
391 IN UINTN MCastFilterCnt OPTIONAL,
392 IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
393 );
394
410typedef
414 IN BOOLEAN Reset,
416 );
417
439typedef
443 IN BOOLEAN Reset,
444 IN OUT UINTN *StatisticsSize OPTIONAL,
445 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
446 );
447
469typedef
473 IN BOOLEAN IPv6,
474 IN EFI_IP_ADDRESS *IP,
476 );
477
498typedef
502 IN BOOLEAN ReadWrite,
503 IN UINTN Offset,
504 IN UINTN BufferSize,
505 IN OUT VOID *Buffer
506 );
507
533typedef
537 OUT UINT32 *InterruptStatus OPTIONAL,
538 OUT VOID **TxBuf OPTIONAL
539 );
540
574typedef
578 IN UINTN HeaderSize,
579 IN UINTN BufferSize,
580 IN VOID *Buffer,
581 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
582 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
583 IN UINT16 *Protocol OPTIONAL
584 );
585
618typedef
622 OUT UINTN *HeaderSize OPTIONAL,
623 IN OUT UINTN *BufferSize,
624 OUT VOID *Buffer,
626 OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
627 OUT UINT16 *Protocol OPTIONAL
628 );
629
630#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000
631
632//
633// Revision defined in EFI1.1
634//
635#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
636
649 UINT64 Revision;
671};
672
673extern EFI_GUID gEfiSimpleNetworkProtocolGuid;
674
675#endif
UINT64 UINTN
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
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)
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_SHUTDOWN)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_START)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_GET_STATUS)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINT32 *InterruptStatus OPTIONAL, OUT VOID **TxBuf OPTIONAL)
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)
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STATION_ADDRESS)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL)
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_RESET)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_SIMPLE_NETWORK_STATE
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_INITIALIZE)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraTxBufferSize OPTIONAL)
EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK
Definition: SimpleNetwork.h:33
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)
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)
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)
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)
EFI_STATUS(EFIAPI * EFI_SIMPLE_NETWORK_STOP)(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
EFI_SIMPLE_NETWORK_MODE * Mode
EFI_MAC_ADDRESS CurrentAddress
EFI_MAC_ADDRESS PermanentAddress
EFI_MAC_ADDRESS BroadcastAddress
Definition: Base.h:213