TianoCore EDK2 master
Loading...
Searching...
No Matches
EmuSnpDxe.h
Go to the documentation of this file.
1
15#ifndef _EMU_SNP_H_
16#define _EMU_SNP_H_
17
18#include <Uefi.h>
19
21#include <Protocol/DevicePath.h>
22#include <Protocol/EmuIoThunk.h>
23#include <Protocol/EmuSnp.h>
24
25#include <Library/BaseLib.h>
26#include <Library/DebugLib.h>
29#include <Library/UefiLib.h>
32#include <Library/NetLib.h>
33
34#define NET_ETHER_HEADER_SIZE 14
35
36//
37// Private data for driver.
38//
39#define EMU_SNP_PRIVATE_DATA_SIGNATURE SIGNATURE_32( 'U', 'S', 'N', 'P' )
40
41typedef struct {
42 UINTN Signature;
43 EMU_IO_THUNK_PROTOCOL *IoThunk;
45 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
46
47 EFI_HANDLE EfiHandle;
48 EFI_HANDLE DeviceHandle;
49
52
53 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
55
56#define EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS(a) \
57 CR( a, EMU_SNP_PRIVATE_DATA, Snp, EMU_SNP_PRIVATE_DATA_SIGNATURE )
58
59extern EFI_DRIVER_BINDING_PROTOCOL gEmuSnpDriverBinding;
60extern EFI_COMPONENT_NAME_PROTOCOL gEmuSnpDriverComponentName;
61extern EFI_COMPONENT_NAME2_PROTOCOL gEmuSnpDriverComponentName2;
62
81EFIAPI
84 IN EFI_HANDLE ControllerHandle,
85 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
86 );
87
105EFIAPI
108 IN EFI_HANDLE ControllerHandle,
109 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
110 );
111
130EFIAPI
133 IN EFI_HANDLE ControllerHandle,
134 IN UINTN NumberOfChildren,
135 IN EFI_HANDLE *ChildHandleBuffer
136 );
137
147EFIAPI
150 );
151
161EFIAPI
164 );
165
187EFIAPI
190 IN UINTN ExtraRxBufferSize OPTIONAL,
191 IN UINTN ExtraTxBufferSize OPTIONAL
192 );
193
207EFIAPI
210 IN BOOLEAN ExtendedVerification
211 );
212
223EFIAPI
226 );
227
250EFIAPI
253 IN UINT32 EnableBits,
254 IN UINT32 DisableBits,
255 IN BOOLEAN ResetMcastFilter,
256 IN UINTN McastFilterCount OPTIONAL,
257 IN EFI_MAC_ADDRESS *McastFilter OPTIONAL
258 );
259
272EFIAPI
275 IN BOOLEAN Reset,
276 IN EFI_MAC_ADDRESS *NewMacAddr OPTIONAL
277 );
278
299EFIAPI
302 IN BOOLEAN Reset,
303 IN OUT UINTN *StatisticsSize OPTIONAL,
304 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
305 );
306
327EFIAPI
330 IN BOOLEAN Ipv6,
331 IN EFI_IP_ADDRESS *Ip,
333 );
334
352EFIAPI
355 IN BOOLEAN ReadOrWrite,
356 IN UINTN Offset,
357 IN UINTN BufferSize,
358 IN OUT VOID *Buffer
359 );
360
383EFIAPI
386 OUT UINT32 *InterruptStatus,
387 OUT VOID **TxBuffer
388 );
389
420EFIAPI
423 IN UINTN HeaderSize,
424 IN UINTN BufferSize,
425 IN VOID *Buffer,
426 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
427 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
428 IN UINT16 *Protocol OPTIONAL
429 );
430
462EFIAPI
465 OUT UINTN *HeaderSize OPTIONAL,
466 IN OUT UINTN *BuffSize,
467 OUT VOID *Buffer,
468 OUT EFI_MAC_ADDRESS *SourceAddr OPTIONAL,
469 OUT EFI_MAC_ADDRESS *DestinationAddr OPTIONAL,
470 OUT UINT16 *Protocol OPTIONAL
471 );
472
473VOID
474EFIAPI
475EmuSnpWaitForPacketNotify (
476 IN EFI_EVENT Event,
477 IN VOID *Private
478 );
479
480#endif // _EMU_SNP_H_
UINT64 UINTN
EFI_STATUS EFIAPI EmuSnpReceive(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINTN *HeaderSize OPTIONAL, IN OUT UINTN *BuffSize, OUT VOID *Buffer, OUT EFI_MAC_ADDRESS *SourceAddr OPTIONAL, OUT EFI_MAC_ADDRESS *DestinationAddr OPTIONAL, OUT UINT16 *Protocol OPTIONAL)
Definition: EmuSnpDxe.c:518
EFI_STATUS EFIAPI EmuSnpShutdown(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Definition: EmuSnpDxe.c:191
EFI_STATUS EFIAPI EmuSnpGetStatus(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINT32 *InterruptStatus, OUT VOID **TxBuffer)
Definition: EmuSnpDxe.c:412
EFI_STATUS EFIAPI EmuSnpDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: EmuSnpDxe.c:564
EFI_STATUS EFIAPI EmuSnpReset(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
Definition: EmuSnpDxe.c:166
EFI_STATUS EFIAPI EmuSnpTransmit(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)
Definition: EmuSnpDxe.c:459
EFI_STATUS EFIAPI EmuSnpDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: EmuSnpDxe.c:670
EFI_STATUS EFIAPI EmuSnpStart(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Definition: EmuSnpDxe.c:79
EFI_STATUS EFIAPI EmuSnpStatistics(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN OUT UINTN *StatisticsSize OPTIONAL, OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL)
Definition: EmuSnpDxe.c:301
EFI_STATUS EFIAPI EmuSnpStop(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Definition: EmuSnpDxe.c:102
EFI_STATUS EFIAPI EmuSnpNvdata(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ReadOrWrite, IN UINTN Offset, IN UINTN BufferSize, IN OUT VOID *Buffer)
Definition: EmuSnpDxe.c:372
EFI_STATUS EFIAPI EmuSnpDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: EmuSnpDxe.c:849
EFI_STATUS EFIAPI EmuSnpInitialize(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraTxBufferSize OPTIONAL)
Definition: EmuSnpDxe.c:137
EFI_STATUS EFIAPI EmuSnpMcastIptoMac(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Ipv6, IN EFI_IP_ADDRESS *Ip, OUT EFI_MAC_ADDRESS *Mac)
Definition: EmuSnpDxe.c:338
EFI_STATUS EFIAPI EmuSnpStationAddress(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *NewMacAddr OPTIONAL)
Definition: EmuSnpDxe.c:265
EFI_STATUS EFIAPI EmuSnpReceiveFilters(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINT32 EnableBits, IN UINT32 DisableBits, IN BOOLEAN ResetMcastFilter, IN UINTN McastFilterCount OPTIONAL, IN EFI_MAC_ADDRESS *McastFilter OPTIONAL)
Definition: EmuSnpDxe.c:227
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33