/**@file\r
- Linux Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the \r
+ Linux Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the\r
emulator to get on real networks.\r
\r
Currently only the Berkeley Packet Filter is fully implemented and this file\r
- is just a template that needs to get filled in. \r
+ is just a template that needs to get filled in.\r
\r
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
Portitions copyright (c) 2011, Apple Inc. All rights reserved.\r
\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
\r
\r
-#include "SecMain.h"\r
+#include "Host.h"\r
\r
#ifndef __APPLE__\r
\r
Private = EMU_SNP_PRIVATE_DATA_FROM_THIS (This);\r
\r
Private->Mode = Mode;\r
- \r
+\r
return EFI_SUCCESS;\r
}\r
\r
}\r
\r
/**\r
- Resets a network adapter and allocates the transmit and receive buffers \r
- required by the network interface; optionally, also requests allocation \r
+ Resets a network adapter and allocates the transmit and receive buffers\r
+ required by the network interface; optionally, also requests allocation\r
of additional transmit and receive buffers.\r
\r
@param This The protocol instance pointer.\r
}\r
\r
/**\r
- Resets a network adapter and re-initializes it with the parameters that were \r
- provided in the previous call to Initialize(). \r
+ Resets a network adapter and re-initializes it with the parameters that were\r
+ provided in the previous call to Initialize().\r
\r
@param This The protocol instance pointer.\r
@param ExtendedVerification Indicates that the driver may perform a more\r
}\r
\r
/**\r
- Resets a network adapter and leaves it in a state that is safe for \r
+ Resets a network adapter and leaves it in a state that is safe for\r
another driver to initialize.\r
\r
@param This Protocol instance pointer.\r
}\r
\r
/**\r
- Performs read and write operations on the NVRAM device attached to a \r
+ Performs read and write operations on the NVRAM device attached to a\r
network interface.\r
\r
@param This The protocol instance pointer.\r
}\r
\r
/**\r
- Reads the current interrupt status and recycled transmit buffer status from \r
+ Reads the current interrupt status and recycled transmit buffer status from\r
a network interface.\r
\r
@param This The protocol instance pointer.\r
\r
@retval EFI_SUCCESS The packet was placed on the transmit queue.\r
@retval EFI_NOT_STARTED The network interface has not been started.\r
- @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. \r
+ @retval EFI_NOT_READY The network interface is too busy to accept this transmit request.\r
@retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.\r
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
)\r
{\r
EMU_SNP_PRIVATE *Private;\r
- \r
+\r
if (This->Private != NULL) {\r
return EFI_ALREADY_STARTED;\r
}\r
- \r
+\r
if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {\r
return EFI_UNSUPPORTED;\r
}\r
- \r
+\r
Private = malloc (sizeof (EMU_SNP_PRIVATE));\r
if (Private == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- \r
+\r
Private->Signature = EMU_SNP_PRIVATE_SIGNATURE;\r
Private->Thunk = This;\r
CopyMem (&Private->EmuSnp, &gEmuSnpProtocol, sizeof (gEmuSnpProtocol));\r
- \r
+\r
This->Interface = &Private->EmuSnp;\r
This->Private = Private;\r
return EFI_SUCCESS;\r
if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {\r
return EFI_UNSUPPORTED;\r
}\r
- \r
+\r
Private = This->Private;\r
free (Private);\r
- \r
+\r
return EFI_SUCCESS;\r
}\r
\r