summaryrefslogtreecommitdiff
path: root/AppPkg/Applications/Sockets/OobRx
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2019-04-19 17:22:39 -0700
committerMichael D Kinney <michael.d.kinney@intel.com>2019-04-29 13:06:36 -0700
commit964f432b9b0afe103c41c7613fade3e699118afe (patch)
treec2b2dbbd67a93c1e07c8ebd148d9f4fe3f118967 /AppPkg/Applications/Sockets/OobRx
parente2d3a25f1a3135221a9c8061e1b8f90245d727eb (diff)
downloadedk2-964f432b9b0afe103c41c7613fade3e699118afe.zip
edk2-964f432b9b0afe103c41c7613fade3e699118afe.tar.gz
edk2-964f432b9b0afe103c41c7613fade3e699118afe.tar.bz2
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
https://bugzilla.tianocore.org/show_bug.cgi?id=1734 Remove the following packages and move them to the new edk2-libc repository * AppPkg * StdLib * StdLibPrivateInternalFiles Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Daryl McDaniel <edk2-lists@mc2research.org> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'AppPkg/Applications/Sockets/OobRx')
-rw-r--r--AppPkg/Applications/Sockets/OobRx/Main.c38
-rw-r--r--AppPkg/Applications/Sockets/OobRx/OobRx.c247
-rw-r--r--AppPkg/Applications/Sockets/OobRx/OobRx.h91
-rw-r--r--AppPkg/Applications/Sockets/OobRx/OobRx.inf51
-rw-r--r--AppPkg/Applications/Sockets/OobRx/Windows/OobRx.sln20
-rw-r--r--AppPkg/Applications/Sockets/OobRx/Windows/OobRx.suobin23040 -> 0 bytes
-rw-r--r--AppPkg/Applications/Sockets/OobRx/Windows/OobRx.vcproj211
-rw-r--r--AppPkg/Applications/Sockets/OobRx/Windows/main.c50
8 files changed, 0 insertions, 708 deletions
diff --git a/AppPkg/Applications/Sockets/OobRx/Main.c b/AppPkg/Applications/Sockets/OobRx/Main.c
deleted file mode 100644
index abbe03a..0000000
--- a/AppPkg/Applications/Sockets/OobRx/Main.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/** @file
- Out-of-band receive test application
-
- Copyright (c) 2011-2012, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <OobRx.h>
-
-
-/**
- Receive out-of-band messages from the remote system.
-
- @param [in] Argc The number of arguments
- @param [in] Argv The argument value array
-
- @retval 0 The application exited normally.
- @retval Other An error occurred.
-**/
-int
-main (
- IN int Argc,
- IN char **Argv
- )
-{
- int RetVal;
-
- //
- // Run the application
- //
- RetVal = OobRx ( Argc, Argv );
-
- //
- // Return the operation status
- //
- return RetVal;
-}
diff --git a/AppPkg/Applications/Sockets/OobRx/OobRx.c b/AppPkg/Applications/Sockets/OobRx/OobRx.c
deleted file mode 100644
index 28e10d8..0000000
--- a/AppPkg/Applications/Sockets/OobRx/OobRx.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/** @file
- Windows version of the OOB Receive application
-
- Copyright (c) 2011-2012, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <OobRx.h>
-
-UINT8 mBuffer[65536];
-
-
-/**
- Run the OOB receive application
-
- @param [in] ArgC Argument count
- @param [in] ArgV Argument value array
-
- @retval 0 Successfully operation
- **/
-int
-OobRx (
- IN int ArgC,
- IN char **ArgV
- )
-{
- SOCKET a;
- ssize_t BytesReceived;
- struct sockaddr_in LocalPort;
- UINT32 OobInLine;
- UINT16 PortNumber;
- struct timeval ReceiveTimeout;
- struct sockaddr_in RemotePort;
- socklen_t RemotePortLength;
- int RetVal;
- SOCKET s;
- UINT32 TransmittedBefore;
- UINT32 TransmittedDuring;
- UINT32 TransmittedOob;
- UINT32 TransmittedAfter;
- UINT32 * pTransmittedBytes;
-
- //
- // Create the socket
- //
- s = socket ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
- if ( -1 == s ) {
- RetVal = GET_ERRNO;
- printf ( "ERROR - socket error, errno: %d\r\n", RetVal );
- }
- else {
- //
- // Use for/break; instead of goto
- //
- for ( ; ; ) {
- //
- // Bind the socket to a known port
- //
- PortNumber = OOB_RX_PORT;
- memset ( &LocalPort, 0, sizeof ( LocalPort ));
- SIN_LEN ( LocalPort ) = sizeof ( LocalPort );
- SIN_FAMILY ( LocalPort ) = AF_INET;
- SIN_ADDR ( LocalPort ) = 0;
- SIN_PORT ( LocalPort ) = htons ( PortNumber );
- RetVal = bind ( s,
- (struct sockaddr *)&LocalPort,
- sizeof ( LocalPort ));
- if ( -1 == RetVal ) {
- RetVal = GET_ERRNO;
- printf ( "ERROR - bind error, errno: %d\r\n", RetVal );
- break;
- }
-
- //
- // Make the port available on the server
- //
- RetVal = listen ( s, 2 );
- if ( -1 == RetVal ) {
- RetVal = GET_ERRNO;
- printf ( "ERROR - listen error, errno: %d\r\n", RetVal );
- break;
- }
-
- //
- // Wait for a connection to the known port
- //
- RemotePortLength = sizeof ( RemotePort );
- a = accept ( s,
- (struct sockaddr *)&RemotePort,
- &RemotePortLength );
- if ( -1 == a ) {
- RetVal = GET_ERRNO;
- printf ( "ERROR - accept error, errno: %d\r\n", RetVal );
- break;
- }
-
- //
- // Use for/break instead of goto
- //
- for ( ; ; ) {
- //
- // Set the receive timeout
- //
- ReceiveTimeout.tv_sec = 0;
- ReceiveTimeout.tv_usec = 20 * 1000;
- RetVal = setsockopt ( a,
- SOL_SOCKET,
- SO_RCVTIMEO,
- (char *)&ReceiveTimeout,
- sizeof ( ReceiveTimeout ));
- if ( -1 == RetVal ) {
- RetVal = GET_ERRNO;
- printf ( "ERROR - setsockopt RCVTIMEO error, errno: %d\r\n", RetVal );
- break;
- }
-
- //
- // Select the OOB processing
- //
- OobInLine = ( 1 < ArgC );
- RetVal = setsockopt ( s,
- SOL_SOCKET,
- SO_OOBINLINE,
- (char *)&OobInLine,
- sizeof ( OobInLine ));
- if ( -1 == RetVal ) {
- RetVal = GET_ERRNO;
- printf ( "ERROR - setsockopt OOBINLINE error, errno: %d\r\n", RetVal );
- break;
- }
- printf ( "%s\r\n", ( 0 != OobInLine ) ? "OOB messages are in-line"
- : "OOB messages move to the head of the queue" );
-
- //
- // Receive data from the remote system
- //
- TransmittedBefore = 0;
- TransmittedOob = 0;
- TransmittedDuring = 0;
- TransmittedAfter = 0;
- pTransmittedBytes = &TransmittedBefore;
- do {
- //
- // Attempt to receive OOB data
- //
- BytesReceived = recv ( a, &mBuffer[0], sizeof ( mBuffer ), MSG_OOB );
- RetVal = (UINT32)BytesReceived;
- if ( 0 < BytesReceived ) {
- //
- // Display the received OOB data
- //
- printf ( "%5Ld OOB bytes received\r\n", (UINT64)BytesReceived );
-
- //
- // Account for the bytes received
- //
- TransmittedOob += RetVal;
- *pTransmittedBytes += TransmittedAfter;
- TransmittedAfter = 0;
- pTransmittedBytes = &TransmittedDuring;
- }
- else if ( -1 == BytesReceived ) {
- //
- // Check for connection timeout
- //
- RetVal = GET_ERRNO;
- if ( RX_TIMEOUT_ERROR != RetVal ) {
- //
- // Receive error
- //
- printf ( "ERROR - recv OOB error, errno: %d\r\n", RetVal );
- break;
- }
-
- //
- // Ignore the timeout
- // Try to receive normal data instead
- //
- BytesReceived = recv ( a, &mBuffer[0], sizeof ( mBuffer ), 0 );
- RetVal = (UINT32)BytesReceived;
- if ( 0 < BytesReceived ) {
- //
- // Display the received data
- //
- printf ( "%4Ld bytes received\r\n", (UINT64)BytesReceived );
-
- //
- // Account for the bytes received
- //
- TransmittedAfter += RetVal;
- }
- else if ( -1 == BytesReceived ) {
- //
- // Check for a timeout
- //
- RetVal = GET_ERRNO;
- if ( RX_TIMEOUT_ERROR != RetVal ) {
- printf ( "ERROR - recv error, errno: %d\r\n", RetVal );
- break;
- }
- }
- }
- } while ( 0 != RetVal );
-
- //
- // Display the bytes received
- //
- if ( 0 == RetVal ) {
- printf ( "Bytes before OOB: %8d\r\n", TransmittedBefore );
- if ( 0 != TransmittedDuring ) {
- printf ( "Bytes during OOB: %8d\r\n", TransmittedDuring );
- }
- printf ( "Out-of-band bytes: %8d\r\n", TransmittedOob );
- printf ( "Bytes after OOB: %8d\r\n", TransmittedAfter );
- printf ( " --------\r\n" );
- printf ( "Total Bytes: %8d\r\n", TransmittedBefore
- + TransmittedDuring
- + TransmittedOob
- + TransmittedAfter );
- }
-
- //
- // Test complete
- //
- break;
- }
-
- //
- // Close the test socket
- //
- CLOSE_SOCKET ( a );
- break;
- }
-
- //
- // Close the socket
- //
- CLOSE_SOCKET ( s );
- printf ( "Socket closed\r\n" );
- }
-
- //
- // Return the operation status
- //
- return RetVal;
-}
diff --git a/AppPkg/Applications/Sockets/OobRx/OobRx.h b/AppPkg/Applications/Sockets/OobRx/OobRx.h
deleted file mode 100644
index 13b6539..0000000
--- a/AppPkg/Applications/Sockets/OobRx/OobRx.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/** @file
- Definitions for the OOB Receive application
-
- Copyright (c) 2011-2012, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _OOB_RX_H_
-#define _OOB_RX_H_
-
-//------------------------------------------------------------------------------
-// Include Files
-//------------------------------------------------------------------------------
-
-#ifdef BUILD_FOR_WINDOWS
-//
-// Build for Windows environment
-//
-
-#include <winsock2.h>
-
-#define CLOSE_SOCKET closesocket
-#define SIN_ADDR(port) port.sin_addr.S_un.S_addr
-#define SIN_FAMILY(port) port.sin_family
-#define SIN_LEN(port) port.sin_family
-#define SIN_PORT(port) port.sin_port
-#define GET_ERRNO WSAGetLastError ( )
-
-#define RX_TIMEOUT_ERROR WSAETIMEDOUT
-#define ssize_t int
-#define socklen_t int
-
-#else // BUILD_FOR_WINDOWS
-//
-// Build for EFI environment
-//
-
-#include <Uefi.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <netinet/in.h>
-
-#include <sys/EfiSysCall.h>
-#include <sys/endian.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-
-#define CLOSE_SOCKET close
-#define SIN_ADDR(port) port.sin_addr.s_addr
-#define SIN_FAMILY(port) port.sin_family
-#define SIN_LEN(port) port.sin_len
-#define SIN_PORT(port) port.sin_port
-#define SOCKET int
-#define GET_ERRNO errno
-#define RX_TIMEOUT_ERROR ETIMEDOUT
-
-#endif // BUILD_FOR_WINDOWS
-
-#include <stdio.h>
-
-//------------------------------------------------------------------------------
-// Constants
-//------------------------------------------------------------------------------
-
-#define OOB_RX_PORT 12344
-
-//------------------------------------------------------------------------------
-// API
-//------------------------------------------------------------------------------
-
-/**
- Run the OOB receive application
-
- @param [in] ArgC Argument count
- @param [in] ArgV Argument value array
-
- @retval 0 Successfully operation
- **/
-
-int
-OobRx (
- IN int ArgC,
- IN char **ArgV
- );
-
-//------------------------------------------------------------------------------
-
-#endif // _OOB_RX_H_
diff --git a/AppPkg/Applications/Sockets/OobRx/OobRx.inf b/AppPkg/Applications/Sockets/OobRx/OobRx.inf
deleted file mode 100644
index ce1d918..0000000
--- a/AppPkg/Applications/Sockets/OobRx/OobRx.inf
+++ /dev/null
@@ -1,51 +0,0 @@
-## @file
-# OobRx Application
-#
-# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = OobRx
- FILE_GUID = 79DED328-7FCE-4909-9AFD-D66176AF97A6
- MODULE_TYPE = UEFI_APPLICATION
- VERSION_STRING = 1.0
- ENTRY_POINT = ShellCEntryLib
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 EBC
-#
-
-[Sources]
- Main.c
- OobRx.c
-
-
-[Packages]
- MdePkg/MdePkg.dec
- ShellPkg/ShellPkg.dec
- StdLib/StdLib.dec
-
-
-[LibraryClasses]
- BaseMemoryLib
- BsdSocketLib
- DebugLib
- EfiSocketLib
- LibC
- LibMath
- ShellCEntryLib
- UefiBootServicesTableLib
- UefiLib
-# UseSocketDxe
-
-[BuildOptions]
- INTEL:*_*_*_CC_FLAGS = /Qdiag-disable:181,186
- MSFT:*_*_*_CC_FLAGS = /Od
- GCC:*_*_*_CC_FLAGS = -O0 -Wno-unused-variable
-
diff --git a/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.sln b/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.sln
deleted file mode 100644
index f9c7825..0000000
--- a/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OobRx", "OobRx.vcproj", "{FA34A77A-5034-4065-B4BD-B74984DEB2F7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FA34A77A-5034-4065-B4BD-B74984DEB2F7}.Debug|Win32.ActiveCfg = Debug|Win32
- {FA34A77A-5034-4065-B4BD-B74984DEB2F7}.Debug|Win32.Build.0 = Debug|Win32
- {FA34A77A-5034-4065-B4BD-B74984DEB2F7}.Release|Win32.ActiveCfg = Release|Win32
- {FA34A77A-5034-4065-B4BD-B74984DEB2F7}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.suo b/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.suo
deleted file mode 100644
index 025aa47..0000000
--- a/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.suo
+++ /dev/null
Binary files differ
diff --git a/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.vcproj b/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.vcproj
deleted file mode 100644
index e5ca534..0000000
--- a/AppPkg/Applications/Sockets/OobRx/Windows/OobRx.vcproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="OobRx"
- ProjectGUID="{FA34A77A-5034-4065-B4BD-B74984DEB2F7}"
- RootNamespace="OobRx"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".."
- PreprocessorDefinitions="BUILD_FOR_WINDOWS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- BrowseInformation="1"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".."
- PreprocessorDefinitions="BUILD_FOR_WINDOWS"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- BrowseInformation="1"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\main.c"
- >
- </File>
- <File
- RelativePath="..\OobRx.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\OobRx.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/AppPkg/Applications/Sockets/OobRx/Windows/main.c b/AppPkg/Applications/Sockets/OobRx/Windows/main.c
deleted file mode 100644
index 9aa89b5..0000000
--- a/AppPkg/Applications/Sockets/OobRx/Windows/main.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/** @file
- Windows version of the OOB Receive application
-
- Copyright (c) 2011-2012, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <OobRx.h>
-
-
-/**
- Receive out-of-band messages from the remote system.
-
- @param [in] argc The number of arguments
- @param [in] argv The argument value array
-
- @retval 0 The application exited normally.
- @retval Other An error occurred.
-**/
-int
-main(
- int argc,
- char ** argv
- )
-{
- int RetVal;
- WSADATA WsaData;
-
- //
- // Initialize the WinSock layer
- //
- RetVal = WSAStartup ( MAKEWORD ( 2, 2 ), &WsaData );
- if ( 0 == RetVal ) {
- //
- // Start the application
- //
- RetVal = OobRx ( argc, argv );
-
- //
- // Done with the WinSock layer
- //
- WSACleanup ( );
- }
-
- //
- // Return the final result
- //
- return RetVal;
-}