]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
EmulatorPkg: Remove all trailing whitespace
[mirror_edk2.git] / EmulatorPkg / Unix / Host / BerkeleyPacketFilter.c
index 519d394e37254863fe788bd9aa57cf9ee68e54e2..b94da9ee824e65eb07dd9419abbb955d59356347 100644 (file)
@@ -1,19 +1,19 @@
 /**@file\r
- Berkeley Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the \r
+ Berkeley Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the\r
  emulator to get on real networks.\r
 \r
- Tested on Mac OS X. \r
+ Tested on Mac OS X.\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
@@ -87,7 +87,7 @@ EmuSnpCreateMapping (
   Private = EMU_SNP_PRIVATE_DATA_FROM_THIS (This);\r
 \r
   Private->Mode = Mode;\r
-  \r
+\r
   //\r
   // Set the broadcast address.\r
   //\r
@@ -164,11 +164,11 @@ OpenBpfFileDescriptor (
     if (errno == EACCES) {\r
       printf (\r
         "SNP: Permissions on '%s' are incorrect.  Fix with 'sudo chmod 666 %s'.\n",\r
-        BfpDeviceName, \r
-        BfpDeviceName \r
+        BfpDeviceName,\r
+        BfpDeviceName\r
         );\r
     }\r
-    \r
+\r
     if (errno != EBUSY) {\r
       break;\r
     }\r
@@ -234,7 +234,7 @@ EmuSnpStart (
                if (ioctl (Private->BpfFd, BIOCGBLEN, &ReadBufferSize) < 0) {\r
                        goto DeviceErrorExit;\r
                }\r
-               \r
+\r
                //\r
                // Default value from BIOCGBLEN is usually too small, so use a much larger size, if necessary.\r
                //\r
@@ -244,7 +244,7 @@ EmuSnpStart (
                                goto DeviceErrorExit;\r
                        }\r
                }\r
-               \r
+\r
                //\r
     // Associate our interface with this BPF file descriptor.\r
     //\r
@@ -302,7 +302,7 @@ EmuSnpStart (
     if ( FilterProgram == NULL ) {\r
       goto ErrorExit;\r
     }\r
-    \r
+\r
     CopyMem (FilterProgram, &mFilterInstructionTemplate, sizeof (mFilterInstructionTemplate));\r
 \r
     //\r
@@ -330,7 +330,7 @@ EmuSnpStart (
     }\r
 \r
 \r
-    Private->Mode->State = EfiSimpleNetworkStarted;      \r
+    Private->Mode->State = EfiSimpleNetworkStarted;\r
   }\r
 \r
   return Status;\r
@@ -397,8 +397,8 @@ EmuSnpStop (
 \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
@@ -457,8 +457,8 @@ EmuSnpInitialize (
 \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
@@ -500,7 +500,7 @@ EmuSnpReset (
 \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
@@ -701,7 +701,7 @@ EmuSnpMCastIpToMac (
 \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
@@ -737,7 +737,7 @@ EmuSnpNvData (
 }\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
@@ -810,7 +810,7 @@ EmuSnpGetStatus (
 \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
@@ -857,7 +857,7 @@ EmuSnpTransmit (
   if (write  (Private->BpfFd, Buffer, BufferSize) < 0) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -917,13 +917,13 @@ EmuSnpReceive (
   }\r
 \r
        ZeroMem (&BpfStats, sizeof( BpfStats));\r
-       \r
+\r
        if (ioctl (Private->BpfFd, BIOCGSTATS, &BpfStats) == 0) {\r
                Private->ReceivedPackets += BpfStats.bs_recv;\r
                if (BpfStats.bs_drop > Private->DroppedPackets) {\r
                        printf (\r
                          "SNP: STATS: RCVD = %d DROPPED = %d.  Probably need to increase BPF PcdNetworkPacketFilterSize?\n",\r
-                               BpfStats.bs_recv, \r
+                               BpfStats.bs_recv,\r
                                BpfStats.bs_drop - Private->DroppedPackets\r
                                );\r
                        Private->DroppedPackets = BpfStats.bs_drop;\r
@@ -1053,26 +1053,26 @@ EmuSnpThunkOpen (
   )\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
   GetInterfaceMacAddr (Private);\r
-  \r
+\r
   This->Interface = &Private->EmuSnp;\r
   This->Private   = Private;\r
   return EFI_SUCCESS;\r
@@ -1089,10 +1089,10 @@ EmuSnpThunkClose (
   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