TianoCore EDK2 master
Loading...
Searching...
No Matches
EmuSnpDxe.c
Go to the documentation of this file.
1
16#include "EmuSnpDxe.h"
17
18EFI_SIMPLE_NETWORK_PROTOCOL gEmuSnpTemplate = {
19 EFI_SIMPLE_NETWORK_PROTOCOL_REVISION,
33 NULL, // WaitForPacket
34 NULL // Mode
35};
36
37EFI_SIMPLE_NETWORK_MODE gEmuSnpModeTemplate = {
38 EfiSimpleNetworkStopped, // State
39 NET_ETHER_ADDR_LEN, // HwAddressSize
40 NET_ETHER_HEADER_SIZE, // MediaHeaderSize
41 1500, // MaxPacketSize
42 0, // NvRamSize
43 0, // NvRamAccessSize
44 0, // ReceiveFilterMask
45 0, // ReceiveFilterSetting
46 MAX_MCAST_FILTER_CNT, // MaxMCastFilterCount
47 0, // MCastFilterCount
48 {
49 {
50 { 0 }
51 }
52 }, // MCastFilter
53 {
54 { 0 }
55 }, // CurrentAddress
56 {
57 { 0 }
58 }, // BroadcastAddress
59 {
60 { 0 }
61 }, // PermanentAddress
62 NET_IFTYPE_ETHERNET, // IfType
63 FALSE, // MacAddressChangeable
64 FALSE, // MultipleTxSupported
65 FALSE, // MediaPresentSupported
66 TRUE // MediaPresent
67};
68
78EFIAPI
81 )
82{
83 EFI_STATUS Status;
84 EMU_SNP_PRIVATE_DATA *Private;
85
86 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
87
88 Status = Private->Io->Start (Private->Io);
89 return Status;
90}
91
101EFIAPI
104 )
105{
106 EFI_STATUS Status;
107 EMU_SNP_PRIVATE_DATA *Private;
108
109 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
110
111 Status = Private->Io->Stop (Private->Io);
112 return Status;
113}
114
136EFIAPI
139 IN UINTN ExtraRxBufferSize OPTIONAL,
140 IN UINTN ExtraTxBufferSize OPTIONAL
141 )
142{
143 EFI_STATUS Status;
144 EMU_SNP_PRIVATE_DATA *Private;
145
146 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
147
148 Status = Private->Io->Initialize (Private->Io, ExtraRxBufferSize, ExtraTxBufferSize);
149 return Status;
150}
151
165EFIAPI
168 IN BOOLEAN ExtendedVerification
169 )
170{
171 EFI_STATUS Status;
172 EMU_SNP_PRIVATE_DATA *Private;
173
174 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
175
176 Status = Private->Io->Reset (Private->Io, ExtendedVerification);
177 return Status;
178}
179
190EFIAPI
193 )
194{
195 EFI_STATUS Status;
196 EMU_SNP_PRIVATE_DATA *Private;
197
198 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
199
200 Status = Private->Io->Shutdown (Private->Io);
201 return Status;
202}
203
226EFIAPI
229 IN UINT32 EnableBits,
230 IN UINT32 DisableBits,
231 IN BOOLEAN ResetMcastFilter,
232 IN UINTN McastFilterCount OPTIONAL,
233 IN EFI_MAC_ADDRESS *McastFilter OPTIONAL
234 )
235{
236 EFI_STATUS Status;
237 EMU_SNP_PRIVATE_DATA *Private;
238
239 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
240
241 Status = Private->Io->ReceiveFilters (
242 Private->Io,
243 EnableBits,
244 DisableBits,
245 ResetMcastFilter,
246 McastFilterCount,
247 McastFilter
248 );
249 return Status;
250}
251
264EFIAPI
267 IN BOOLEAN Reset,
268 IN EFI_MAC_ADDRESS *NewMacAddr OPTIONAL
269 )
270{
271 EFI_STATUS Status;
272 EMU_SNP_PRIVATE_DATA *Private;
273
274 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
275
276 Status = Private->Io->StationAddress (Private->Io, Reset, NewMacAddr);
277 return Status;
278}
279
300EFIAPI
303 IN BOOLEAN Reset,
304 IN OUT UINTN *StatisticsSize OPTIONAL,
305 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
306 )
307{
308 EFI_STATUS Status;
309 EMU_SNP_PRIVATE_DATA *Private;
310
311 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
312
313 Status = Private->Io->Statistics (Private->Io, Reset, StatisticsSize, StatisticsTable);
314 return Status;
315}
316
337EFIAPI
340 IN BOOLEAN Ipv6,
341 IN EFI_IP_ADDRESS *Ip,
343 )
344{
345 EFI_STATUS Status;
346 EMU_SNP_PRIVATE_DATA *Private;
347
348 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
349
350 Status = Private->Io->MCastIpToMac (Private->Io, Ipv6, Ip, Mac);
351 return Status;
352}
353
371EFIAPI
374 IN BOOLEAN ReadOrWrite,
375 IN UINTN Offset,
376 IN UINTN BufferSize,
377 IN OUT VOID *Buffer
378 )
379{
380 EFI_STATUS Status;
381 EMU_SNP_PRIVATE_DATA *Private;
382
383 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
384
385 Status = Private->Io->NvData (Private->Io, ReadOrWrite, Offset, BufferSize, Buffer);
386 return Status;
387}
388
411EFIAPI
414 OUT UINT32 *InterruptStatus,
415 OUT VOID **TxBuffer
416 )
417{
418 EFI_STATUS Status;
419 EMU_SNP_PRIVATE_DATA *Private;
420
421 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
422
423 Status = Private->Io->GetStatus (Private->Io, InterruptStatus, TxBuffer);
424 return Status;
425}
426
458EFIAPI
461 IN UINTN HeaderSize,
462 IN UINTN BufferSize,
463 IN VOID *Buffer,
464 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
465 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
466 IN UINT16 *Protocol OPTIONAL
467 )
468{
469 EFI_STATUS Status;
470 EMU_SNP_PRIVATE_DATA *Private;
471
472 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
473
474 Status = Private->Io->Transmit (
475 Private->Io,
476 HeaderSize,
477 BufferSize,
478 Buffer,
479 SrcAddr,
480 DestAddr,
481 Protocol
482 );
483 return Status;
484}
485
517EFIAPI
520 OUT UINTN *HeaderSize OPTIONAL,
521 IN OUT UINTN *BuffSize,
522 OUT VOID *Buffer,
523 OUT EFI_MAC_ADDRESS *SourceAddr OPTIONAL,
524 OUT EFI_MAC_ADDRESS *DestinationAddr OPTIONAL,
525 OUT UINT16 *Protocol OPTIONAL
526 )
527{
528 EFI_STATUS Status;
529 EMU_SNP_PRIVATE_DATA *Private;
530
531 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (This);
532
533 Status = Private->Io->Receive (
534 Private->Io,
535 HeaderSize,
536 BuffSize,
537 Buffer,
538 SourceAddr,
539 DestinationAddr,
540 Protocol
541 );
542 return Status;
543}
544
563EFIAPI
566 IN EFI_HANDLE ControllerHandle,
567 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
568 )
569{
570 EFI_STATUS Status;
571 EMU_IO_THUNK_PROTOCOL *EmuIoThunk;
573 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
574
575 if (RemainingDevicePath != NULL) {
576 if (!IsDevicePathEnd (RemainingDevicePath)) {
577 Node = (MAC_ADDR_DEVICE_PATH *)RemainingDevicePath;
578 if ((Node->Header.Type != MESSAGING_DEVICE_PATH) ||
579 (Node->Header.SubType != MSG_MAC_ADDR_DP))
580 {
581 // If the remaining device path does not match we don't support the request
582 return EFI_UNSUPPORTED;
583 }
584 }
585 }
586
587 //
588 // Open the IO Abstraction(s) needed to perform the supported test
589 //
590 Status = gBS->OpenProtocol (
591 ControllerHandle,
592 &gEmuIoThunkProtocolGuid,
593 (VOID **)&EmuIoThunk,
594 This->DriverBindingHandle,
595 ControllerHandle,
596 EFI_OPEN_PROTOCOL_BY_DRIVER
597 );
598 if (EFI_ERROR (Status)) {
599 return Status;
600 }
601
602 //
603 // Close the I/O Abstraction(s) used to perform the supported test
604 //
605 gBS->CloseProtocol (
606 ControllerHandle,
607 &gEmuIoThunkProtocolGuid,
608 This->DriverBindingHandle,
609 ControllerHandle
610 );
611
612 //
613 // Open the EFI Device Path protocol needed to perform the supported test
614 //
615 Status = gBS->OpenProtocol (
616 ControllerHandle,
617 &gEfiDevicePathProtocolGuid,
618 (VOID **)&ParentDevicePath,
619 This->DriverBindingHandle,
620 ControllerHandle,
621 EFI_OPEN_PROTOCOL_BY_DRIVER
622 );
623 if (Status == EFI_ALREADY_STARTED) {
624 return EFI_SUCCESS;
625 }
626
627 if (EFI_ERROR (Status)) {
628 return Status;
629 }
630
631 //
632 // Make sure GUID is for a SNP handle.
633 //
634 Status = EFI_UNSUPPORTED;
635 if (CompareGuid (EmuIoThunk->Protocol, &gEmuSnpProtocolGuid)) {
636 Status = EFI_SUCCESS;
637 }
638
639 //
640 // Close protocol, don't use device path protocol in the Support() function
641 //
642 gBS->CloseProtocol (
643 ControllerHandle,
644 &gEfiDevicePathProtocolGuid,
645 This->DriverBindingHandle,
646 ControllerHandle
647 );
648
649 return Status;
650}
651
669EFIAPI
672 IN EFI_HANDLE ControllerHandle,
673 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
674 )
675{
676 EFI_STATUS Status;
677 EMU_IO_THUNK_PROTOCOL *EmuIoThunk;
678 EMU_SNP_PRIVATE_DATA *Private;
680 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
681
682 Private = NULL;
683
684 //
685 // Grab the protocols we need
686 //
687 Status = gBS->OpenProtocol (
688 ControllerHandle,
689 &gEfiDevicePathProtocolGuid,
690 (VOID **)&ParentDevicePath,
691 This->DriverBindingHandle,
692 ControllerHandle,
693 EFI_OPEN_PROTOCOL_BY_DRIVER
694 );
695 if (EFI_ERROR (Status) && Status) {
696 return Status;
697 }
698
699 Status = gBS->OpenProtocol (
700 ControllerHandle,
701 &gEmuIoThunkProtocolGuid,
702 (VOID **)&EmuIoThunk,
703 This->DriverBindingHandle,
704 ControllerHandle,
705 EFI_OPEN_PROTOCOL_BY_DRIVER
706 );
707 if (EFI_ERROR (Status)) {
708 return Status;
709 }
710
711 if (!CompareGuid (EmuIoThunk->Protocol, &gEmuSnpProtocolGuid)) {
712 return EFI_UNSUPPORTED;
713 }
714
715 Status = EmuIoThunk->Open (EmuIoThunk);
716 if (EFI_ERROR (Status)) {
717 goto Done;
718 }
719
720 //
721 // Allocate the private data.
722 //
723 Private = AllocateZeroPool (sizeof (EMU_SNP_PRIVATE_DATA));
724 if (Private == NULL) {
725 Status = EFI_OUT_OF_RESOURCES;
726 goto Done;
727 }
728
729 CopyMem (&Private->Snp, &gEmuSnpTemplate, sizeof (EFI_SIMPLE_NETWORK_PROTOCOL));
730 CopyMem (&Private->Mode, &gEmuSnpModeTemplate, sizeof (EFI_SIMPLE_NETWORK_MODE));
731
732 Private->Signature = EMU_SNP_PRIVATE_DATA_SIGNATURE;
733 Private->IoThunk = EmuIoThunk;
734 Private->Io = EmuIoThunk->Interface;
735 Private->EfiHandle = ControllerHandle;
736 Private->DeviceHandle = NULL;
737 Private->Snp.Mode = &Private->Mode;
738 Private->ControllerNameTable = NULL;
739
740 Status = Private->Io->CreateMapping (Private->Io, &Private->Mode);
741 if (EFI_ERROR (Status)) {
742 goto Done;
743 }
744
745 //
746 // Build the device path by appending the MAC node to the ParentDevicePath
747 // from the EmuIo handle.
748 //
749 ZeroMem (&Node, sizeof (MAC_ADDR_DEVICE_PATH));
750
751 Node.Header.Type = MESSAGING_DEVICE_PATH;
752 Node.Header.SubType = MSG_MAC_ADDR_DP;
753 Node.IfType = Private->Mode.IfType;
754
756
757 CopyMem (&Node.MacAddress, &Private->Mode.CurrentAddress, sizeof (EFI_MAC_ADDRESS));
758
759 //
760 // Build the device path by appending the MAC node to the ParentDevicePath from the EmuIo handle.
761 //
762 Private->DevicePath = AppendDevicePathNode (ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&Node);
763 if ( Private->DevicePath == NULL ) {
764 Status = EFI_OUT_OF_RESOURCES;
765 goto Done;
766 }
767
769 "eng",
770 gEmuSnpDriverComponentName.SupportedLanguages,
771 &Private->ControllerNameTable,
772 EmuIoThunk->ConfigString,
773 TRUE
774 );
775
777 "en",
778 gEmuSnpDriverComponentName2.SupportedLanguages,
779 &Private->ControllerNameTable,
780 EmuIoThunk->ConfigString,
781 FALSE
782 );
783
784 //
785 // Create Child Handle
786 //
787 Status = gBS->InstallMultipleProtocolInterfaces (
788 &Private->DeviceHandle,
789 &gEfiSimpleNetworkProtocolGuid,
790 &Private->Snp,
791 &gEfiDevicePathProtocolGuid,
792 Private->DevicePath,
793 NULL
794 );
795 if (EFI_ERROR (Status)) {
796 goto Done;
797 }
798
799 //
800 // Open For Child Device
801 //
802 Status = gBS->OpenProtocol (
803 ControllerHandle,
804 &gEmuIoThunkProtocolGuid,
805 (VOID **)&EmuIoThunk,
806 This->DriverBindingHandle,
807 Private->DeviceHandle,
808 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
809 );
810
811Done:
812 if (EFI_ERROR (Status)) {
813 if (Private != NULL) {
814 FreePool (Private);
815 }
816
817 if (ParentDevicePath != NULL) {
818 gBS->CloseProtocol (
819 ControllerHandle,
820 &gEfiDevicePathProtocolGuid,
821 This->DriverBindingHandle,
822 ControllerHandle
823 );
824 }
825 }
826
827 return Status;
828}
829
848EFIAPI
851 IN EFI_HANDLE ControllerHandle,
852 IN UINTN NumberOfChildren,
853 IN EFI_HANDLE *ChildHandleBuffer
854 )
855{
856 EFI_STATUS Status;
857 EMU_SNP_PRIVATE_DATA *Private = NULL;
859 VOID *EmuIoThunk;
860
861 //
862 // Complete all outstanding transactions to Controller.
863 // Don't allow any new transaction to Controller to be started.
864 //
865 if (NumberOfChildren == 0) {
866 //
867 // Close the bus driver
868 //
869 Status = gBS->CloseProtocol (
870 ControllerHandle,
871 &gEmuIoThunkProtocolGuid,
872 This->DriverBindingHandle,
873 ControllerHandle
874 );
875
876 Status = gBS->CloseProtocol (
877 ControllerHandle,
878 &gEfiDevicePathProtocolGuid,
879 This->DriverBindingHandle,
880 ControllerHandle
881 );
882 return Status;
883 }
884
885 ASSERT (NumberOfChildren == 1);
886
887 //
888 // Get our context back.
889 //
890 Status = gBS->OpenProtocol (
891 ChildHandleBuffer[0],
892 &gEfiSimpleNetworkProtocolGuid,
893 (VOID **)&Snp,
894 This->DriverBindingHandle,
895 ControllerHandle,
896 EFI_OPEN_PROTOCOL_GET_PROTOCOL
897 );
898 if (EFI_ERROR (Status)) {
899 return EFI_DEVICE_ERROR;
900 }
901
902 Private = EMU_SNP_PRIVATE_DATA_FROM_SNP_THIS (Snp);
903 ASSERT (Private->DeviceHandle == ChildHandleBuffer[0]);
904 ASSERT (Private->EfiHandle == ControllerHandle);
905
906 Status = gBS->CloseProtocol (
907 ControllerHandle,
908 &gEmuIoThunkProtocolGuid,
909 This->DriverBindingHandle,
910 Private->DeviceHandle
911 );
912 ASSERT_EFI_ERROR (Status);
913
914 Status = gBS->UninstallMultipleProtocolInterfaces (
915 Private->DeviceHandle,
916 &gEfiSimpleNetworkProtocolGuid,
917 &Private->Snp,
918 &gEfiDevicePathProtocolGuid,
919 Private->DevicePath,
920 NULL
921 );
922 if (EFI_ERROR (Status)) {
923 gBS->OpenProtocol (
924 ControllerHandle,
925 &gEmuIoThunkProtocolGuid,
926 &EmuIoThunk,
927 This->DriverBindingHandle,
928 Private->DeviceHandle,
929 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
930 );
931 } else {
932 Status = Private->IoThunk->Close (Private->IoThunk);
933 ASSERT_EFI_ERROR (Status);
934
935 FreePool (Private->DevicePath);
936 FreeUnicodeStringTable (Private->ControllerNameTable);
937 FreePool (Private);
938 }
939
940 return Status;
941}
942
943EFI_DRIVER_BINDING_PROTOCOL gEmuSnpDriverBinding = {
947 0xA,
948 NULL,
949 NULL
950};
951
965EFIAPI
967 IN EFI_HANDLE ImageHandle,
968 IN EFI_SYSTEM_TABLE *SystemTable
969 )
970{
971 EFI_STATUS Status;
972
973 //
974 // Install the Driver Protocols
975 //
977 ImageHandle,
978 SystemTable,
979 &gEmuSnpDriverBinding,
980 ImageHandle,
981 &gEmuSnpDriverComponentName,
982 &gEmuSnpDriverComponentName2
983 );
984
985 return Status;
986}
UINT64 UINTN
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define MSG_MAC_ADDR_DP
Definition: DevicePath.h:550
#define MESSAGING_DEVICE_PATH
Definition: DevicePath.h:321
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
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
EFI_STATUS EFIAPI InitializeEmuSnpDriver(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: EmuSnpDxe.c:966
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
EFI_STATUS EFIAPI AddUnicodeString2(IN CONST CHAR8 *Language, IN CONST CHAR8 *SupportedLanguages, IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, IN CONST CHAR16 *UnicodeString, IN BOOLEAN Iso639Language)
Definition: UefiLib.c:1087
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
Definition: UefiLib.c:1257
EFI_SIMPLE_NETWORK_MODE * Mode
CHAR16 * ConfigString
Only be valid after Open() is called.
Definition: EmuIoThunk.h:33
EFI_MAC_ADDRESS CurrentAddress
EFI_MAC_ADDRESS MacAddress
Definition: DevicePath.h:556