summaryrefslogtreecommitdiff
path: root/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-28 16:50:26 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-28 16:50:26 +0000
commitd18d8a1d0e370f8ce6ccc2725f4170586d457e53 (patch)
tree7e852b6f4c4277a38734d09870eae180a113b7e9 /EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
parentbb89ec1a7ec2f8d35033df9e47b3604925da3bd3 (diff)
downloadedk2-platforms-d18d8a1d0e370f8ce6ccc2725f4170586d457e53.tar.xz
EmulatorPkg: Remove all trailing whitespace
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11919 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c')
-rw-r--r--EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
index 519d394e37..b94da9ee82 100644
--- a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
+++ b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
@@ -1,19 +1,19 @@
/**@file
- Berkeley Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the
+ Berkeley Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the
emulator to get on real networks.
- Tested on Mac OS X.
+ Tested on Mac OS X.
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
Portitions copyright (c) 2011, Apple Inc. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -87,7 +87,7 @@ EmuSnpCreateMapping (
Private = EMU_SNP_PRIVATE_DATA_FROM_THIS (This);
Private->Mode = Mode;
-
+
//
// Set the broadcast address.
//
@@ -164,11 +164,11 @@ OpenBpfFileDescriptor (
if (errno == EACCES) {
printf (
"SNP: Permissions on '%s' are incorrect. Fix with 'sudo chmod 666 %s'.\n",
- BfpDeviceName,
- BfpDeviceName
+ BfpDeviceName,
+ BfpDeviceName
);
}
-
+
if (errno != EBUSY) {
break;
}
@@ -234,7 +234,7 @@ EmuSnpStart (
if (ioctl (Private->BpfFd, BIOCGBLEN, &ReadBufferSize) < 0) {
goto DeviceErrorExit;
}
-
+
//
// Default value from BIOCGBLEN is usually too small, so use a much larger size, if necessary.
//
@@ -244,7 +244,7 @@ EmuSnpStart (
goto DeviceErrorExit;
}
}
-
+
//
// Associate our interface with this BPF file descriptor.
//
@@ -302,7 +302,7 @@ EmuSnpStart (
if ( FilterProgram == NULL ) {
goto ErrorExit;
}
-
+
CopyMem (FilterProgram, &mFilterInstructionTemplate, sizeof (mFilterInstructionTemplate));
//
@@ -330,7 +330,7 @@ EmuSnpStart (
}
- Private->Mode->State = EfiSimpleNetworkStarted;
+ Private->Mode->State = EfiSimpleNetworkStarted;
}
return Status;
@@ -397,8 +397,8 @@ EmuSnpStop (
/**
- Resets a network adapter and allocates the transmit and receive buffers
- required by the network interface; optionally, also requests allocation
+ Resets a network adapter and allocates the transmit and receive buffers
+ required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers.
@param This The protocol instance pointer.
@@ -457,8 +457,8 @@ EmuSnpInitialize (
/**
- Resets a network adapter and re-initializes it with the parameters that were
- provided in the previous call to Initialize().
+ Resets a network adapter and re-initializes it with the parameters that were
+ provided in the previous call to Initialize().
@param This The protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more
@@ -500,7 +500,7 @@ EmuSnpReset (
/**
- Resets a network adapter and leaves it in a state that is safe for
+ Resets a network adapter and leaves it in a state that is safe for
another driver to initialize.
@param This Protocol instance pointer.
@@ -701,7 +701,7 @@ EmuSnpMCastIpToMac (
/**
- Performs read and write operations on the NVRAM device attached to a
+ Performs read and write operations on the NVRAM device attached to a
network interface.
@param This The protocol instance pointer.
@@ -737,7 +737,7 @@ EmuSnpNvData (
}
/**
- Reads the current interrupt status and recycled transmit buffer status from
+ Reads the current interrupt status and recycled transmit buffer status from
a network interface.
@param This The protocol instance pointer.
@@ -810,7 +810,7 @@ EmuSnpGetStatus (
@retval EFI_SUCCESS The packet was placed on the transmit queue.
@retval EFI_NOT_STARTED The network interface has not been started.
- @retval EFI_NOT_READY The network interface is too busy to accept this transmit request.
+ @retval EFI_NOT_READY The network interface is too busy to accept this transmit request.
@retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@@ -857,7 +857,7 @@ EmuSnpTransmit (
if (write (Private->BpfFd, Buffer, BufferSize) < 0) {
return EFI_DEVICE_ERROR;
}
-
+
return EFI_SUCCESS;
}
@@ -917,13 +917,13 @@ EmuSnpReceive (
}
ZeroMem (&BpfStats, sizeof( BpfStats));
-
+
if (ioctl (Private->BpfFd, BIOCGSTATS, &BpfStats) == 0) {
Private->ReceivedPackets += BpfStats.bs_recv;
if (BpfStats.bs_drop > Private->DroppedPackets) {
printf (
"SNP: STATS: RCVD = %d DROPPED = %d. Probably need to increase BPF PcdNetworkPacketFilterSize?\n",
- BpfStats.bs_recv,
+ BpfStats.bs_recv,
BpfStats.bs_drop - Private->DroppedPackets
);
Private->DroppedPackets = BpfStats.bs_drop;
@@ -1053,26 +1053,26 @@ EmuSnpThunkOpen (
)
{
EMU_SNP_PRIVATE *Private;
-
+
if (This->Private != NULL) {
return EFI_ALREADY_STARTED;
}
-
+
if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = malloc (sizeof (EMU_SNP_PRIVATE));
if (Private == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
Private->Signature = EMU_SNP_PRIVATE_SIGNATURE;
Private->Thunk = This;
CopyMem (&Private->EmuSnp, &gEmuSnpProtocol, sizeof (gEmuSnpProtocol));
GetInterfaceMacAddr (Private);
-
+
This->Interface = &Private->EmuSnp;
This->Private = Private;
return EFI_SUCCESS;
@@ -1089,10 +1089,10 @@ EmuSnpThunkClose (
if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = This->Private;
free (Private);
-
+
return EFI_SUCCESS;
}