first commit

This commit is contained in:
Jose Caban
2025-06-07 01:59:34 -04:00
commit 388ac241f0
3558 changed files with 9116289 additions and 0 deletions

View File

@@ -0,0 +1 @@
bin

View File

@@ -0,0 +1,11 @@
D/asn////
D/client////
D/server////
D/proxy_server////
D/common////
/.cvsignore/1.1/Thu Mar 9 01:33:40 2006//
/cleanup.sh/1.1/Tue Mar 21 23:20:54 2006//
D/docs////
D/test_files////
D/Report////
/Caban_Lotfi_proj2.zip/1.3/Tue Mar 28 04:12:23 2006/-kb/

View File

@@ -0,0 +1,11 @@
D/asn///////
D/client///////
D/server///////
D/proxy_server///////
D/common///////
/.cvsignore////*///
/cleanup.sh////*///
D/docs///////
D/test_files///////
D/Report///////
/Caban_Lotfi_proj2.zip////*///

View File

@@ -0,0 +1,11 @@
D/asn///////
D/client///////
D/server///////
D/proxy_server///////
D/common///////
/.cvsignore////*///
/cleanup.sh////*///
D/docs///////
D/test_files///////
D/Report///////
/Caban_Lotfi_proj2.zip////*///

View File

@@ -0,0 +1,11 @@
D/asn////
D/client////
D/server////
D/proxy_server////
D/common////
/.cvsignore/1.1/Thu Mar 9 01:33:40 2006//
/cleanup.sh/1.1/Tue Mar 21 23:20:54 2006//
D/docs////
D/test_files////
D/Report////
/Caban_Lotfi_proj2.zip/1.2/Tue Mar 28 04:05:14 2006/-kb/

View File

@@ -0,0 +1 @@
CS4210/Project 2

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

Binary file not shown.

View File

@@ -0,0 +1,3 @@
/Report.doc/1.3/Tue Mar 28 03:48:24 2006/-kb/
/Report.pdf/1.1/Tue Mar 28 03:48:21 2006/-kb/
D

View File

@@ -0,0 +1,2 @@
/Report.doc////*///
/Report.pdf////*///

View File

@@ -0,0 +1,2 @@
/Report.doc////*///
/Report.pdf////*///

View File

@@ -0,0 +1,3 @@
/Report.doc/1.2/Tue Mar 28 03:06:25 2006/-kb/
/Report.pdf/0/dummy timestamp/-kb/
D

View File

@@ -0,0 +1 @@
CS4210/Project 2/Report

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,2 @@
/Project2.pdf/1.1/Fri Feb 24 02:14:17 2006/-kb/
D

View File

@@ -0,0 +1 @@
/Project2.pdf////*///

View File

@@ -0,0 +1 @@
/Project2.pdf////*///

View File

@@ -0,0 +1,2 @@
/Project2.pdf/0/dummy timestamp/-kb/
D

View File

@@ -0,0 +1 @@
CS4210/Project 2/asn

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

Binary file not shown.

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# This script will cleanup the keys in memory from a
# kill that was unmasked and thus left stuff in memory
ipcrm -M 7890
ipcrm -M 7891
ipcrm -M 7892
ipcrm -M 7893
ipcrm -S 7892
ipcrm -S 7891

View File

@@ -0,0 +1,11 @@
client.vcproj.CRYSTAL.AssKoala.user
client.suo
client.ncb
Debug
Release
pthreadVC2.dll
pthreadVSE2.dll
pthreadVC2.lib
pthreadVSE2.lib
pthreadGC2.dll
pthreadGCE2.dll

View File

@@ -0,0 +1,7 @@
D/src////
/.cvsignore/1.1/Mon Feb 20 16:12:03 2006//
/client.sln/1.1/Tue Feb 14 00:39:47 2006//
/client.vcproj/1.1/Sun Feb 19 00:51:40 2006//
/Makefile/1.2/Tue Mar 28 00:07:53 2006//
D/results////
D/tests////

View File

@@ -0,0 +1,7 @@
D/src///////
/.cvsignore////*///
/client.sln////*///
/client.vcproj////*///
/Makefile////*///
D/results///////
D/tests///////

View File

@@ -0,0 +1,5 @@
D/src///////
/.cvsignore////*///
/client.sln////*///
/client.vcproj////*///
/Makefile////*///

View File

@@ -0,0 +1,5 @@
D/src////
/.cvsignore/1.1/Mon Feb 20 16:12:03 2006//
/client.sln/1.1/Tue Feb 14 00:39:47 2006//
/client.vcproj/1.1/Sun Feb 19 00:51:40 2006//
/Makefile/1.2/Tue Mar 28 00:07:53 2006//

View File

@@ -0,0 +1 @@
CS4210/Project 2/client

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

View File

@@ -0,0 +1,35 @@
CC = gcc
OPT = -O3 -fomit-frame-pointer -march=i686
LIBS = -lpthread
TARGET = l33t_client
MISC = makefile
INCDIR = src/include
SRCDIR = src
BINDIR = bin
all: $(TARGET)
$(TARGET): $(BINDIR)/ezxml.o $(BINDIR)/parser.o $(BINDIR)/networking.o $(BINDIR)/threads.o $(BINDIR)/main.o
$(CC) $(OPT) $(LIBS) -o $(BINDIR)/$(TARGET) $(BINDIR)/*.o
$(BINDIR)/ezxml.o: $(SRCDIR)/ezxml/ezxml.h $(SRCDIR)/ezxml/ezxml.c
-mkdir bin > /dev/null
$(CC) $(OPT) $(LIBS) -c -o $(BINDIR)/ezxml.o $(SRCDIR)/ezxml/ezxml.c
$(BINDIR)/parser.o: $(SRCDIR)/parser.c $(INCDIR)/parser.h
$(CC) $(OPT) -c -o $(BINDIR)/parser.o $(SRCDIR)/parser.c
$(BINDIR)/networking.o: $(SRCDIR)/networking.c $(INCDIR)/networking.h
$(CC) $(OPT) -c -o $(BINDIR)/networking.o $(SRCDIR)/networking.c
$(BINDIR)/threads.o: $(SRCDIR)/threads.c $(INCDIR)/threads.h
$(CC) $(OPT) -c -o $(BINDIR)/threads.o $(SRCDIR)/threads.c
$(BINDIR)/main.o: $(SRCDIR)/main.c $(INCDIR)/test.h
$(CC) $(OPT) $(LIBS) -c -o $(BINDIR)/main.o $(SRCDIR)/main.c
$(BINDIR):
mkdir -p bin
clean:
rm -rf $(BINDIR)/*.o $(BINDIR)/$(TARGET) $(BINDIR)

View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{A49BA143-0CB7-4DF3-8165-0B2F0A2D40F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FC3C6AB5-9365-43AA-9A75-95F5599A7609}"
ProjectSection(SolutionItems) = preProject
testFile.xml = testFile.xml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A49BA143-0CB7-4DF3-8165-0B2F0A2D40F6}.Debug|Win32.ActiveCfg = Debug|Win32
{A49BA143-0CB7-4DF3-8165-0B2F0A2D40F6}.Debug|Win32.Build.0 = Debug|Win32
{A49BA143-0CB7-4DF3-8165-0B2F0A2D40F6}.Release|Win32.ActiveCfg = Release|Win32
{A49BA143-0CB7-4DF3-8165-0B2F0A2D40F6}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,204 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="client"
ProjectGUID="{A49BA143-0CB7-4DF3-8165-0B2F0A2D40F6}"
RootNamespace="client"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)src\pthreads\include&quot;"
PreprocessorDefinitions="&quot;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE&quot;"
EnableFunctionLevelLinking="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib pthreadVSE2.lib wsock32.lib"
AdditionalLibraryDirectories="&quot;$(ProjectDir)src\pthreads\lib&quot;"
GenerateDebugInformation="true"
/>
<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"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableFunctionLevelLinking="false"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="false"
/>
<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=".\src\ezxml\ezxml.c"
>
</File>
<File
RelativePath=".\src\main.c"
>
</File>
<File
RelativePath=".\src\snprintf.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\src\include\defs.h"
>
</File>
<File
RelativePath=".\src\ezxml\ezxml.h"
>
</File>
<File
RelativePath=".\src\include\snprintf.h"
>
</File>
<File
RelativePath=".\src\include\test.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>

View File

@@ -0,0 +1,3 @@
D/Faye////
D/Titanium////
D/sock////

View File

@@ -0,0 +1,3 @@
D/Faye///////
D/Titanium///////
D/sock///////

View File

@@ -0,0 +1,4 @@
D/Faye///////
D/Titanium///////
D/sock///////
D/shmem///////

View File

@@ -0,0 +1,4 @@
D/Faye////
D/Titanium////
D/sock////
D/shmem////

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/results

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

View File

@@ -0,0 +1,6 @@
/advSocketResults.txt/1.1/Tue Mar 28 01:04:55 2006//
/simpleShmemResults.txt/1.1/Tue Mar 28 01:04:55 2006//
/simpleSocketResults.txt/1.1/Tue Mar 28 01:04:55 2006//
/advShmemResults.txt/1.2/Tue Mar 28 02:40:31 2006//
/results.xls/1.1/Tue Mar 28 02:50:19 2006/-kb/
D

View File

@@ -0,0 +1,5 @@
/advSocketResults.txt////*///
/simpleShmemResults.txt////*///
/simpleSocketResults.txt////*///
/advShmemResults.txt////*///
/results.xls////*///

View File

@@ -0,0 +1,5 @@
/advSocketResults.txt////*///
/simpleShmemResults.txt////*///
/simpleSocketResults.txt////*///
/advShmemResults.txt////*///
/results.xls////*///

View File

@@ -0,0 +1,6 @@
/advSocketResults.txt/1.1/Tue Mar 28 01:04:55 2006//
/simpleShmemResults.txt/1.1/Tue Mar 28 01:04:55 2006//
/simpleSocketResults.txt/1.1/Tue Mar 28 01:04:55 2006//
/advShmemResults.txt/1.2/Tue Mar 28 02:40:31 2006//
/results.xls/0/dummy timestamp/-kb/
D

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/results/Faye

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

View File

@@ -0,0 +1,82 @@
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/adv/advanced_small_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 4, 0, 149753, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 158486, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 162705, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 178594, 0, 5120
http://localhost/test_files/test_small0, 4, 0, 186840, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 193940, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 199539, 0, 5120
http://localhost/test_files/test_small0, 4, 0, 198303, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 206067, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 208261, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 210648, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 215367, 0, 5120
http://localhost/test_files/test_small0, 4, 0, 223023, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 224318, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 226265, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 227451, 0, 5120
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/adv/advanced_med_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med2, 4, 12, 768492, 0, 512000
http://localhost/test_files/test_med1, 4, 12, 779857, 0, 512000
http://localhost/test_files/test_med0, 4, 12, 796663, 0, 512000
http://localhost/test_files/test_med3, 4, 13, 504046, 0, 512000
http://localhost/test_files/test_med0, 4, 13, 702920, 0, 512000
http://localhost/test_files/test_med2, 4, 13, 740593, 0, 512000
http://localhost/test_files/test_med0, 4, 13, 826168, 0, 512000
http://localhost/test_files/test_med2, 4, 14, 603528, 0, 512000
http://localhost/test_files/test_med1, 4, 14, 663320, 0, 512000
http://localhost/test_files/test_med0, 4, 14, 787584, 0, 512000
http://localhost/test_files/test_med2, 4, 14, 889211, 0, 512000
http://localhost/test_files/test_med1, 4, 15, 435950, 0, 512000
http://localhost/test_files/test_med3, 4, 15, 564955, 0, 512000
http://localhost/test_files/test_med3, 4, 15, 741950, 0, 512000
http://localhost/test_files/test_med3, 4, 15, 759165, 0, 512000
http://localhost/test_files/test_med1, 4, 15, 903985, 0, 512000
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/throughput_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_larger3, 3, 123, 406541, 0, 10240000
http://localhost/test_files/test_larger1, 3, 126, 801497, 0, 10240000
http://localhost/test_files/test_larger2, 3, 129, 135426, 0, 10240000
http://localhost/test_files/test_larger0, 3, 129, 866697, 0, 10240000
http://localhost/test_files/test_larger0, 3, 141, 286887, 0, 10240000
http://localhost/test_files/test_larger0, 3, 145, 677553, 0, 10240000
http://localhost/test_files/test_larger2, 3, 147, 380607, 0, 10240000
http://localhost/test_files/test_larger2, 3, 149, 70179, 0, 10240000
http://localhost/test_files/test_larger1, 3, 159, 897071, 0, 10240000
http://localhost/test_files/test_larger3, 3, 162, 63243, 0, 10240000
http://localhost/test_files/test_larger1, 3, 163, 518701, 0, 10240000
http://localhost/test_files/test_larger3, 3, 163, 699238, 0, 10240000
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/latency_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small1, 4, 0, 105234, 0, 5120
http://localhost/test_files/test_small0, 4, 0, 124800, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 144979, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 147518, 0, 5120
http://localhost/test_files/test_small0, 4, 0, 157569, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 162790, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 171829, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 184307, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 190186, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 195583, 0, 5120
http://localhost/test_files/test_small0, 4, 0, 201693, 0, 5120
http://localhost/test_files/test_small2, 4, 0, 200330, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 211117, 0, 5120
http://localhost/test_files/test_small3, 4, 0, 215983, 0, 5120
http://localhost/test_files/test_small1, 4, 0, 220414, 0, 5120
http://localhost/test_files/test_small0, 4, 3, 15765, 0, 5120

View File

@@ -0,0 +1,79 @@
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/adv/advanced_small_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 4, 0, 165547, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 177407, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 183312, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 168779, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 203546, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 177450, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 206361, 0, 5334
http://localhost/test_files/test_small3, 4, 0, 177987, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 180696, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 45235, 0, 5334
http://localhost/test_files/test_small2, 4, 3, 125056, 0, 5334
http://localhost/test_files/test_small1, 4, 3, 125231, 0, 5334
http://localhost/test_files/test_small2, 4, 3, 131145, 0, 5334
http://localhost/test_files/test_small0, 4, 3, 155570, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 130253, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 157050, 0, 5334
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/adv/advanced_med_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med0, 4, 17, 353320, 0, 512216
http://localhost/test_files/test_med2, 4, 19, 32461, 0, 512216
http://localhost/test_files/test_med0, 4, 19, 316604, 0, 512216
http://localhost/test_files/test_med1, 4, 19, 272314, 0, 512216
http://localhost/test_files/test_med2, 4, 19, 425204, 0, 512216
http://localhost/test_files/test_med3, 4, 19, 800284, 0, 512216
http://localhost/test_files/test_med3, 4, 20, 13045, 0, 512216
http://localhost/test_files/test_med1, 4, 20, 268940, 0, 512216
http://localhost/test_files/test_med2, 4, 20, 607724, 0, 512216
http://localhost/test_files/test_med2, 4, 20, 797128, 0, 512216
http://localhost/test_files/test_med1, 4, 21, 157740, 0, 512216
http://localhost/test_files/test_med3, 4, 21, 4956, 0, 512216
http://localhost/test_files/test_med1, 4, 21, 295429, 0, 512216
http://localhost/test_files/test_med0, 4, 21, 407722, 0, 512216
http://localhost/test_files/test_med3, 4, 21, 484389, 0, 512216
http://localhost/test_files/test_med0, 4, 21, 433249, 0, 512216
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/throughput_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_larger2, 3, 234, 529952, 0, 10240218
http://localhost/test_files/test_larger1, 3, 237, 862041, 0, 10240218
http://localhost/test_files/test_larger2, 3, 241, 166945, 0, 10240218
http://localhost/test_files/test_larger0, 3, 241, 616926, 0, 10240218
http://localhost/test_files/test_larger0, 3, 244, 67274, 0, 10240218
http://localhost/test_files/test_larger3, 3, 245, 648100, 0, 10240218
http://localhost/test_files/test_larger3, 3, 246, 568406, 0, 10240218
http://localhost/test_files/test_larger3, 3, 248, 377218, 0, 10240218
http://localhost/test_files/test_larger2, 3, 250, 94213, 0, 10240218
http://localhost/test_files/test_larger1, 3, 250, 598535, 0, 10240218
http://localhost/test_files/test_larger0, 3, 250, 733630, 0, 10240218
http://localhost/test_files/test_larger1, 3, 251, 494354, 0, 10240218
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/latency_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small1, 4, 0, 179208, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 205928, 0, 5334
http://localhost/test_files/test_small3, 4, 0, 185085, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 213278, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 197073, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 196578, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 196569, 0, 5334
http://localhost/test_files/test_small3, 4, 0, 193305, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 198458, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 216471, 0, 5334
http://localhost/test_files/test_small2, 4, 3, 58844, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 68360, 0, 5334
http://localhost/test_files/test_small1, 4, 3, 72841, 0, 5334
http://localhost/test_files/test_small2, 4, 3, 151059, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 146341, 0, 5334
http://localhost/test_files/test_small1, 4, 3, 138746, 0, 5334

Binary file not shown.

View File

@@ -0,0 +1,27 @@
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/simple/simple_small_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 1, 0, 11841, 0, 5120
http://localhost/test_files/test_small1, 1, 0, 13190, 0, 5120
http://localhost/test_files/test_small2, 1, 0, 13067, 0, 5120
http://localhost/test_files/test_small3, 1, 0, 13398, 0, 5120
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/simple/simple_med_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med1, 1, 1, 188425, 0, 512000
http://localhost/test_files/test_med3, 1, 1, 191419, 0, 512000
http://localhost/test_files/test_med2, 1, 1, 197758, 0, 512000
http://localhost/test_files/test_med0, 1, 1, 201668, 0, 512000
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/simple/simple_large_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_large3, 1, 12, 13466, 0, 5112860
http://localhost/test_files/test_large0, 1, 12, 18822, 0, 5127140
http://localhost/test_files/test_large1, 1, 12, 20793, 0, 5112860
http://localhost/test_files/test_large2, 1, 12, 34970, 0, 5127140

View File

@@ -0,0 +1,25 @@
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/simple/simple_small_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 1, 0, 21255, 0, 5334
http://localhost/test_files/test_small1, 1, 0, 21123, 0, 5334
http://localhost/test_files/test_small2, 1, 0, 23883, 0, 5334
http://localhost/test_files/test_small3, 1, 0, 26714, 0, 5334
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/simple/simple_med_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med0, 1, 1, 295427, 0, 512216
http://localhost/test_files/test_med3, 1, 1, 450439, 0, 512216
http://localhost/test_files/test_med1, 1, 1, 499044, 0, 512216
http://localhost/test_files/test_med2, 1, 1, 565367, 0, 512216
asskoala@Faye client % bin/l33t_client 127.0.0.1 1338 tests/simple/simple_large_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_large3, 1, 12, 550242, 0, 5120217
http://localhost/test_files/test_large0, 1, 14, 98615, 0, 5120217
http://localhost/test_files/test_large1, 1, 14, 635036, 0, 5120217
http://localhost/test_files/test_large2, 1, 15, 251210, 0, 5120217

View File

@@ -0,0 +1,4 @@
/simpleShmemResults.txt/1.1/Tue Mar 28 01:32:48 2006//
/simpleSocketResults.txt/1.1/Tue Mar 28 01:33:41 2006//
/results.xls/1.1/Tue Mar 28 01:56:14 2006/-kb/
D

View File

@@ -0,0 +1,3 @@
/simpleShmemResults.txt////*///
/simpleSocketResults.txt////*///
/results.xls////*///

View File

@@ -0,0 +1,3 @@
/simpleShmemResults.txt////*///
/simpleSocketResults.txt////*///
/results.xls////*///

View File

@@ -0,0 +1,4 @@
/simpleShmemResults.txt/1.1/Tue Mar 28 01:32:48 2006//
/simpleSocketResults.txt/1.1/Tue Mar 28 01:33:41 2006//
/results.xls/0/dummy timestamp/-kb/
D

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/results/Titanium

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

Binary file not shown.

View File

@@ -0,0 +1,26 @@
[puyan@nayup:client]% bin/l33t_client 127.0.0.1 1338 tests/simple/simple_small_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 1, 0, 4622, 0, 5120
http://localhost/test_files/test_small3, 1, 0, 10025, 0, 5120
http://localhost/test_files/test_small2, 1, 0, 13687, 0, 5120
http://localhost/test_files/test_small1, 1, 0, 14245, 0, 5120
[puyan@nayup:client]% bin/l33t_client 127.0.0.1 1338 tests/simple/simple_med_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med3, 1, 1, 115143, 0, 495680
http://localhost/test_files/test_med1, 1, 1, 135876, 0, 528320
http://localhost/test_files/test_med0, 1, 1, 166964, 0, 512000
http://localhost/test_files/test_med2, 1, 1, 168358, 0, 512000
[puyan@nayup:client]% bin/l33t_client 127.0.0.1 1338 tests/simple/simple_large_test_proxy.xml
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_large3, 1, 11, 702539, 0, 5110820
http://localhost/test_files/test_large0, 1, 11, 721345, 0, 5127140
http://localhost/test_files/test_large1, 1, 11, 721263, 0, 5121020
http://localhost/test_files/test_large2, 1, 11, 721751, 0, 5121020

View File

@@ -0,0 +1,25 @@
small:
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 1, 0, 7778, 0, 5334
http://localhost/test_files/test_small1, 1, 0, 7480, 0, 5334
http://localhost/test_files/test_small2, 1, 0, 7489, 0, 5334
http://localhost/test_files/test_small3, 1, 0, 7453, 0, 5334
med:
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med3, 1, 6, 491775, 0, 512216
http://localhost/test_files/test_med1, 1, 6, 980490, 0, 512216
http://localhost/test_files/test_med0, 1, 6, 996066, 0, 512216
http://localhost/test_files/test_med2, 1, 7, 45100, 0, 512216
large:
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_large0, 1, 73, 123997, 0, 5120217
http://localhost/test_files/test_large3, 1, 75, 970855, 0, 5120217
http://localhost/test_files/test_large1, 1, 76, 599534, 0, 5120217
http://localhost/test_files/test_large2, 1, 77, 99854, 0, 5120217

View File

@@ -0,0 +1,6 @@
/latency_test_proxy_16_16_U/1.1/Mon Mar 27 23:43:00 2006//
/simple_large_test_proxy_16_16_U/1.1/Mon Mar 27 23:43:00 2006//
/simple_med_test_proxy_16_16_U/1.1/Mon Mar 27 23:43:00 2006//
/simple_small_test_proxy_16_16_U/1.1/Mon Mar 27 23:43:00 2006//
/throughput_test_proxy_16_16_U/1.1/Mon Mar 27 23:43:00 2006//
D

View File

@@ -0,0 +1,5 @@
/latency_test_proxy_16_16_U////*///
/simple_large_test_proxy_16_16_U////*///
/simple_med_test_proxy_16_16_U////*///
/simple_small_test_proxy_16_16_U////*///
/throughput_test_proxy_16_16_U////*///

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/results/sock

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

View File

@@ -0,0 +1,18 @@
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 4, 0, 389603, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 406970, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 413013, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 421193, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 433122, 0, 5334
http://localhost/test_files/test_small0, 4, 0, 433385, 0, 5334
http://localhost/test_files/test_small1, 4, 0, 398009, 0, 5334
http://localhost/test_files/test_small2, 4, 0, 401768, 0, 5334
http://localhost/test_files/test_small0, 4, 3, 389993, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 439706, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 387273, 0, 5334
http://localhost/test_files/test_small2, 4, 3, 422889, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 436829, 0, 5334
http://localhost/test_files/test_small0, 4, 3, 429526, 0, 5334
http://localhost/test_files/test_small1, 4, 3, 429020, 0, 5334
http://localhost/test_files/test_small3, 4, 3, 427607, 0, 5334

View File

@@ -0,0 +1,6 @@
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_large0, 1, 73, 123997, 0, 5120217
http://localhost/test_files/test_large3, 1, 75, 970855, 0, 5120217
http://localhost/test_files/test_large1, 1, 76, 599534, 0, 5120217
http://localhost/test_files/test_large2, 1, 77, 99854, 0, 5120217

View File

@@ -0,0 +1,6 @@
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_med3, 1, 6, 491775, 0, 512216
http://localhost/test_files/test_med1, 1, 6, 980490, 0, 512216
http://localhost/test_files/test_med0, 1, 6, 996066, 0, 512216
http://localhost/test_files/test_med2, 1, 7, 45100, 0, 512216

View File

@@ -0,0 +1,6 @@
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_small0, 1, 0, 7778, 0, 5334
http://localhost/test_files/test_small1, 1, 0, 7480, 0, 5334
http://localhost/test_files/test_small2, 1, 0, 7489, 0, 5334
http://localhost/test_files/test_small3, 1, 0, 7453, 0, 5334

View File

@@ -0,0 +1,14 @@
Accessing 127.0.0.1:1338
fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv
http://localhost/test_files/test_larger2, 3, 556, 824686, 0, 10240218
http://localhost/test_files/test_larger0, 3, 556, 918115, 0, 10240218
http://localhost/test_files/test_larger2, 3, 557, 561528, 0, 10240218
http://localhost/test_files/test_larger3, 3, 557, 624147, 0, 10240218
http://localhost/test_files/test_larger1, 3, 559, 446154, 0, 10240218
http://localhost/test_files/test_larger0, 3, 560, 588366, 0, 10240218
http://localhost/test_files/test_larger3, 3, 561, 253755, 0, 10240218
http://localhost/test_files/test_larger0, 3, 561, 383240, 0, 10240218
http://localhost/test_files/test_larger1, 3, 561, 385663, 0, 10240218
http://localhost/test_files/test_larger2, 3, 562, 131541, 0, 10240218
http://localhost/test_files/test_larger1, 3, 562, 678546, 0, 10240218
http://localhost/test_files/test_larger3, 3, 563, 402743, 0, 10240218

View File

@@ -0,0 +1,8 @@
D/ezxml////
D/include////
D/pthreads////
/snprintf.c/1.1/Tue Feb 14 00:39:47 2006//
/main.c/1.3/Tue Mar 28 00:07:54 2006//
/networking.c/1.2/Tue Mar 28 00:07:54 2006//
/parser.c/1.2/Tue Mar 28 00:07:54 2006//
/threads.c/1.6/Tue Mar 28 00:07:54 2006//

View File

@@ -0,0 +1,8 @@
D/ezxml///////
D/include///////
D/pthreads///////
/snprintf.c////*///
/main.c////*///
/networking.c////*///
/parser.c////*///
/threads.c////*///

View File

@@ -0,0 +1,8 @@
D/ezxml///////
D/include///////
D/pthreads///////
/snprintf.c////*///
/main.c////*///
/networking.c////*///
/parser.c////*///
/threads.c////*///

View File

@@ -0,0 +1,8 @@
D/ezxml////
D/include////
D/pthreads////
/snprintf.c/1.1/Tue Feb 14 00:39:47 2006//
/main.c/1.2/Thu Mar 9 01:14:39 2006//
/networking.c/1.1/Tue Mar 7 01:00:35 2006//
/parser.c/1.1/Tue Mar 7 01:00:35 2006//
/threads.c/1.1/Tue Mar 7 01:00:35 2006//

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/src

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

View File

@@ -0,0 +1,3 @@
/ezxml.c/1.1/Tue Feb 14 01:54:26 2006//
/ezxml.h/1.1/Tue Feb 14 00:39:47 2006//
D

View File

@@ -0,0 +1,2 @@
/ezxml.c////*///
/ezxml.h////*///

View File

@@ -0,0 +1,2 @@
/ezxml.c////*///
/ezxml.h////*///

View File

@@ -0,0 +1,3 @@
/ezxml.c/0/dummy timestamp//
/ezxml.h/0/dummy timestamp//
D

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/src/ezxml

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,157 @@
/* ezxml.h
*
* Copyright 2004, 2005 Aaron Voisine <aaron@voisine.org>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _EZXML_H
#define _EZXML_H
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <fcntl.h>
#ifdef __cplusplus
extern "C" {
#endif
#define EZXML_BUFSIZE 1024 // size of internal memory buffers
#define EZXML_NAMEM 0x80 // name is malloced
#define EZXML_TXTM 0x40 // txt is malloced
#define EZXML_DUP 0x20 // attribute name and value are strduped
typedef struct ezxml *ezxml_t;
struct ezxml {
char *name; // tag name
char **attr; // tag attributes { name, value, name, value, ... NULL }
char *txt; // tag character content, empty string if none
size_t off; // tag offset from start of parent tag character content
ezxml_t next; // next tag with same name in this section at this depth
ezxml_t sibling; // next tag with different name in same section and depth
ezxml_t ordered; // next tag, same section and depth, in original order
ezxml_t child; // head of sub tag list, NULL if none
ezxml_t parent; // parent tag, NULL if current tag is root tag
short flags; // additional information
};
// Given a string of xml data and its length, parses it and creates an ezxml
// structure. For efficiency, modifies the data by adding null terminators
// and decoding ampersand sequences. If you don't want this, copy the data and
// pass in the copy. Returns NULL on failure.
ezxml_t ezxml_parse_str(char *s, size_t len);
// A wrapper for ezxml_parse_str() that accepts a file descriptor. First
// attempts to mem map the file. Failing that, reads the file into memory.
// Returns NULL on failure.
ezxml_t ezxml_parse_fd(int fd);
// a wrapper for ezxml_parse_fd() that accepts a file name
ezxml_t ezxml_parse_file(const char *file);
// Wrapper for ezxml_parse_str() that accepts a file stream. Reads the entire
// stream into memory and then parses it. For xml files, use ezxml_parse_file()
// or ezxml_parse_fd()
ezxml_t ezxml_parse_fp(FILE *fp);
// returns the first child tag (one level deeper) with the given name or NULL
// if not found
ezxml_t ezxml_child(ezxml_t xml, const char *name);
// returns the next tag of the same name in the same section and depth or NULL
// if not found
#define ezxml_next(xml) ((xml) ? xml->next : NULL)
// Returns the Nth tag with the same name in the same section at the same depth
// or NULL if not found. An index of 0 returns the tag given.
ezxml_t ezxml_idx(ezxml_t xml, int idx);
// returns the name of the given tag
#define ezxml_name(xml) ((xml) ? xml->name : NULL)
// returns the given tag's character content or empty string if none
#define ezxml_txt(xml) ((xml) ? xml->txt : "")
// returns the value of the requested tag attribute, or NULL if not found
const char *ezxml_attr(ezxml_t xml, const char *attr);
// Traverses the ezxml sturcture to retrieve a specific subtag. Takes a
// variable length list of tag names and indexes. The argument list must be
// terminated by either an index of -1 or an empty string tag name. Example:
// title = ezxml_get(library, "shelf", 0, "book", 2, "title", -1);
// This retrieves the title of the 3rd book on the 1st shelf of library.
// Returns NULL if not found.
ezxml_t ezxml_get(ezxml_t xml, ...);
// Converts an ezxml structure back to xml. Returns a string of xml data that
// must be freed.
char *ezxml_toxml(ezxml_t xml);
// returns a NULL terminated array of processing instructions for the given
// target
const char **ezxml_pi(ezxml_t xml, const char *target);
// frees the memory allocated for an ezxml structure
void ezxml_free(ezxml_t xml);
// returns parser error message or empty string if none
const char *ezxml_error(ezxml_t xml);
// returns a new empty ezxml structure with the given root tag name
ezxml_t ezxml_new(const char *name);
// wrapper for ezxml_new() that strdup()s name
#define ezxml_new_d(name) ezxml_set_flag(ezxml_new(strdup(name)), EZXML_NAMEM)
// Adds a child tag. off is the offset of the child tag relative to the start
// of the parent tag's character content. Returns the child tag.
ezxml_t ezxml_add_child(ezxml_t xml, const char *name, size_t off);
// wrapper for ezxml_add_child() that strdup()s name
#define ezxml_add_child_d(xml, name, off) \
ezxml_set_flag(ezxml_add_child(xml, strdup(name), off), EZXML_NAMEM)
// sets the character content for the given tag and returns the tag
ezxml_t ezxml_set_txt(ezxml_t xml, const char *txt);
// wrapper for ezxml_set_txt() that strdup()s txt
#define ezxml_set_txt_d(xml, txt) \
ezxml_set_flag(ezxml_set_txt(xml, strdup(txt)), EZXML_TXTM)
// Sets the given tag attribute or adds a new attribute if not found. A value
// of NULL will remove the specified attribute.
void ezxml_set_attr(ezxml_t xml, const char *name, const char *value);
// Wrapper for ezxml_set_attr() that strdup()s name/value. Value cannot be NULL
#define ezxml_set_attr_d(xml, name, value) \
ezxml_set_attr(ezxml_set_flag(xml, EZXML_DUP), strdup(name), strdup(value))
// sets a flag for the given tag and returns the tag
ezxml_t ezxml_set_flag(ezxml_t xml, short flag);
// removes a tag along with all its subtags
void ezxml_remove(ezxml_t xml);
#ifdef __cplusplus
}
#endif
#endif // _EZXML_H

View File

@@ -0,0 +1,7 @@
/snprintf.h/1.1/Tue Feb 14 00:39:47 2006//
/test.h/1.1/Fri Feb 17 23:35:17 2006//
/defs.h/1.1/Tue Mar 7 01:00:37 2006//
/networking.h/1.1/Tue Mar 7 01:00:37 2006//
/parser.h/1.1/Tue Mar 7 01:00:37 2006//
/threads.h/1.1/Tue Mar 7 01:00:37 2006//
D

View File

@@ -0,0 +1,6 @@
/snprintf.h////*///
/test.h////*///
/defs.h////*///
/networking.h////*///
/parser.h////*///
/threads.h////*///

View File

@@ -0,0 +1,2 @@
/snprintf.h////*///
/test.h////*///

View File

@@ -0,0 +1,3 @@
/snprintf.h/1.1/Tue Feb 14 00:39:47 2006//
/test.h/1.1/Fri Feb 17 23:35:17 2006//
D

View File

@@ -0,0 +1 @@
CS4210/Project 2/client/src/include

View File

@@ -0,0 +1 @@
:ext:asskoala@192.168.0.3:/usr/_CVS

View File

@@ -0,0 +1,15 @@
#ifndef _DEFS_H_
#define _DEFS_H_
/* Turn off deprecation warnings to avoid use of "safe" strings in Win32 */
#define _CRT_SECURE_NO_DEPRECATE 1
#define _CRT_NONSTDC_NO_DEPRECATE 1
#define HTTP_REQUEST_SIZE 2024
#define RECV_SIZE 64
#define timenormal(sec,usec) if(0>usec){sec--; usec+=1000000;}
#define DieWithError(msg) { \
fprintf(stderr, "%s: PwnT! Error on line %d.\n", (msg), __LINE__); \
perror(msg); \
exit(EXIT_FAILURE);}
#endif

View File

@@ -0,0 +1,11 @@
#ifndef _NETWORKING_H_
#define _NETWORKING_H_
/*
* Open a TCP Socket connection with:
* ipaddr: Remote IP Address
* server_port: Port to open on
*/
int createTCPSocket(char *ipaddr, unsigned short server_port);
#endif

View File

@@ -0,0 +1,16 @@
#ifndef _PARSER_H_
#define _PARSER_H_
#include "test.h"
/*
* Parse the Tests from the testFile
*/
int parseTests(Test** testListPtr, char* fileName);
/*
* Print the tests that were read in
*/
void printTests(Test* testList, int count);
#endif

View File

@@ -0,0 +1,29 @@
#ifndef _PORTABLE_SNPRINTF_H_
#define _PORTABLE_SNPRINTF_H_
#define PORTABLE_SNPRINTF_VERSION_MAJOR 2
#define PORTABLE_SNPRINTF_VERSION_MINOR 2
#include <stddef.h>
#include <stdarg.h>
#ifdef HAVE_SNPRINTF
#include <stdio.h>
#else
extern int snprintf(char *, size_t, const char *, /*args*/ ...);
extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
extern int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
#define snprintf portable_snprintf
#define vsnprintf portable_vsnprintf
#endif
extern int asprintf (char **ptr, const char *fmt, /*args*/ ...);
extern int vasprintf (char **ptr, const char *fmt, va_list ap);
extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
#endif

View File

@@ -0,0 +1,20 @@
#ifndef _TEST_H_
#define _TEST_H_
typedef struct {
char** fileList;
char* name;
int numThreads;
int iterations;
int fileCount;
} Test;
typedef struct {
char *fileName;
char *hostName;
unsigned short port_number;
int iterations;
} Request;
#endif

View File

@@ -0,0 +1,9 @@
#ifndef _THREADS_H_
#define _THREADS_H_
#include "test.h"
void init_threads(int numThreads, Request** rList, int numFiles);
extern int threads;
#endif

View File

@@ -0,0 +1,60 @@
// ANSI C89 Stuff
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// l33t_client Stuff
#include "include/test.h"
#include "include/parser.h"
#include "include/networking.h"
#include "include/defs.h"
/*
* l33t_client Main, builds Requests and sends them to the threads
*/
int main(int argc, char** argv) {
Test* testList = NULL;
int numTests;
int i, j, k;
Request *r = malloc(sizeof(Request));
Request **rList = NULL;
// Scan command line
if (argc < 3) {
printf("Improper usage\n");
printf(" ./l33t_client IP_ADDRESS PORT_NUM TESTFILE\n");
return EXIT_SUCCESS;
} else {
r->hostName = argv[1];
r->port_number = atoi(argv[2]);
printf("Accessing %s:%d\n",r->hostName, r->port_number);
fflush(stdout);
}
numTests = parseTests(&testList, (argc > 3) ? argv[3] : "testFile.xml");
// Create the requests
for (i=0; i<testList[0].fileCount; i++) {
rList = realloc(rList, sizeof(Request*)*(i+1));
rList[i] = malloc(sizeof(Request));
memcpy(rList[i], r, sizeof(Request));
rList[i]->fileName = testList[0].fileList[i];
rList[i]->iterations = testList[0].iterations;
}
// TODO: Alter this such that the threads wait
init_threads(testList[0].numThreads, rList, testList[0].fileCount);
printf(" fileName | iterations | diff_secs | diff_usecs | sock fails | total_bytes_recv\n");
// TODO: Wait for threads to exit properly
for(;getchar()!='q';) {
}
return EXIT_SUCCESS;
}

View File

@@ -0,0 +1,44 @@
#include "include/networking.h"
#include "include/defs.h"
//C89 stuff
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//Networking Stuff
#ifdef _WIN32
#include <winsock.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
int createTCPSocket(char *ipaddr, unsigned short server_port)
{
int sock; /* Socket descriptor */
struct sockaddr_in ServAddr; /* Address Structure */
#ifdef _WIN32
WSADATA wsaData; /* Winsock struct. */
if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0)/* Winsock 2.0 DLL. */
DieWithError("WSAStartup() failed");
#endif
if((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
DieWithError("socket() failed");
memset(&ServAddr, 0, sizeof(ServAddr));
ServAddr.sin_family = AF_INET;
ServAddr.sin_addr.s_addr = inet_addr(ipaddr);
ServAddr.sin_port = htons(server_port);
if (connect(sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)) < 0) {
return -1;
} else {
return sock;
}
}

View File

@@ -0,0 +1,91 @@
#include "include/parser.h"
#include "include/test.h"
#include "ezxml/ezxml.h"
#include <stdio.h>
#include <string.h>
int parseTests(Test** testListPtr, char* fileName) {
ezxml_t xmlFile = ezxml_parse_file(fileName);
ezxml_t current;
Test* testList;
int index;
if (!xmlFile) {
printf("Couldn't load testFile.xml\n");
exit(1);
}
current = xmlFile->child;
for (index = 0 ;current; index++, current = current->sibling ) {
ezxml_t child;
*testListPtr = realloc(*testListPtr, (index+1)*sizeof(Test));
testList = *testListPtr;
//No Checks!!!! Buffer Overflow capable!!!!
testList[index].name = malloc(sizeof(char)*(strlen(current->name)+1));
strcpy(testList[index].name, current->name);
for (child = current->child; child; child = child->sibling ) {
if (!strcmp(child->name,"numthreads")) {
testList[index].numThreads = atoi(child->txt);
} else if (!strcmp(child->name, "iterations")) {
testList[index].iterations = atoi(child->txt);
} else if (!strcmp(child->name, "filesToRetrieve")) {
ezxml_t files = child->child;
int* fileCount = &(testList[index].fileCount);
*fileCount = 0;
testList[index].fileList = NULL;
while (files) {
//Increase length of flleList
testList[index].fileList
= realloc(testList[index].fileList
, sizeof(char*) * (*fileCount+1));
//Allocate space for contents
testList[index].fileList[*fileCount]
= malloc(sizeof(char) * (strlen(files->txt)+1));
//Copy contents into structure
strcpy(testList[index].fileList[*fileCount], files->txt);
files = files->next;
(*fileCount)++;
}
}
} // end while(child)
} //end for(current)
ezxml_free(xmlFile);
return index;
}
void printTests(Test* testList, int count) {
int index;
for (index = 0; index < count; index++) {
printf("\n-- Test: %s \n", testList[index].name);
printf("--- number of threads: %d \n",
testList[index].numThreads);
printf("--- number of iterations: %d \n",
testList[index].iterations);
{
int i;
for (i=0; i<testList[index].fileCount; i++) {
printf("--- Load File: %s \n",
testList[index].fileList[i]);
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More