Commit initial: GNUWorld servicii IRC cu README.md complet in limba romana - Analiza arhitecturala completa a proiectului - Documentatie ierarhie clase, bucla de evenimente, protocol P10 - Identificare probleme memorie si recomandari modernizare
This commit is contained in:
commit
fcb24f6de9
870 files changed
+311128
No files matched your search
@@ -0,0 +1,17 @@
|
||||
test_stringtokenizer
|
||||
test_signal
|
||||
test_mtrie_perf_summary
|
||||
test_mtrie_perf
|
||||
test_mtrie_load
|
||||
test_mtrie
|
||||
test_match
|
||||
test_kick_transaction
|
||||
test_gThread
|
||||
test_econfig
|
||||
test_burst
|
||||
test_bot
|
||||
Makefile
|
||||
.libs
|
||||
.deps
|
||||
|
||||
.arch-ids
|
||||
@@ -0,0 +1,76 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
## $Id: Makefile.am,v 1.19 2007/09/15 18:03:34 dan_karrels Exp $
|
||||
|
||||
noinst_PROGRAMS = test_burst \
|
||||
test_mtrie_load \
|
||||
test_mtrie_perf_summary \
|
||||
test_mtrie_perf \
|
||||
test_mtrie \
|
||||
test_stringtokenizer \
|
||||
test_econfig \
|
||||
test_gThread \
|
||||
test_signal \
|
||||
test_match \
|
||||
test_bot \
|
||||
test_kick_transaction
|
||||
LDADD = $(LIBGNUWORLD)
|
||||
|
||||
if COND_PCRE
|
||||
noinst_PROGRAMS += test_regex
|
||||
endif
|
||||
|
||||
test_burst_SOURCES = burst.cc
|
||||
test_burst_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_mtrie_SOURCES = mtrie.cc
|
||||
test_mtrie_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_mtrie_load_SOURCES = mtrie_load.cc
|
||||
test_mtrie_load_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_mtrie_perf_SOURCES = mtrie_perf.cc
|
||||
test_mtrie_perf_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_mtrie_perf_summary_SOURCES = mtrie_perf_summary.cc
|
||||
test_mtrie_perf_summary_CXXFLAGS = -I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libgnuworld
|
||||
|
||||
test_stringtokenizer_SOURCES = stringtokenizer.cc
|
||||
test_stringtokenizer_CXXFLAGS = -I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libgnuworld
|
||||
|
||||
test_econfig_SOURCES = econfig.cc
|
||||
test_econfig_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_match_SOURCES = match.cc
|
||||
test_match_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_bot_SOURCES = testbot.cc
|
||||
test_bot_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_kick_transaction_SOURCES = test_kick_transaction.cc
|
||||
test_kick_transaction_CXXFLAGS = -I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libgnuworld
|
||||
|
||||
test_regex_SOURCES = test_regex.cc
|
||||
test_regex_LDFLAGS = -lpcre
|
||||
|
||||
test_gThread_SOURCES = gThread.cc
|
||||
test_gThread_LDFLAGS = $(top_builddir)/libgnuworld/libgnuworld.la \
|
||||
$(threadLib)
|
||||
test_gThread_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
test_signal_SOURCES = signal.cc
|
||||
test_signal_LDFLAGS = $(LIBGNUWORLD) $(threadLib)
|
||||
test_signal_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
|
||||
EXTRA_DIST = testbot.h \
|
||||
README.burst \
|
||||
README.econfig \
|
||||
README.gthread \
|
||||
README.match \
|
||||
README.mtrie \
|
||||
README.signal \
|
||||
README.stringtokenizer \
|
||||
README.testBot \
|
||||
README.test_kick_transaction
|
||||
@@ -0,0 +1,865 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
noinst_PROGRAMS = test_burst$(EXEEXT) test_mtrie_load$(EXEEXT) \
|
||||
test_mtrie_perf_summary$(EXEEXT) test_mtrie_perf$(EXEEXT) \
|
||||
test_mtrie$(EXEEXT) test_stringtokenizer$(EXEEXT) \
|
||||
test_econfig$(EXEEXT) test_gThread$(EXEEXT) \
|
||||
test_signal$(EXEEXT) test_match$(EXEEXT) test_bot$(EXEEXT) \
|
||||
test_kick_transaction$(EXEEXT) $(am__EXEEXT_1)
|
||||
@COND_PCRE_TRUE@am__append_1 = test_regex
|
||||
subdir = test
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/ax_boost_thread.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/defs.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
@COND_PCRE_TRUE@am__EXEEXT_1 = test_regex$(EXEEXT)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_test_bot_OBJECTS = test_bot-testbot.$(OBJEXT)
|
||||
test_bot_OBJECTS = $(am_test_bot_OBJECTS)
|
||||
test_bot_LDADD = $(LDADD)
|
||||
am__DEPENDENCIES_1 =
|
||||
test_bot_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_bot_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_bot_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_burst_OBJECTS = test_burst-burst.$(OBJEXT)
|
||||
test_burst_OBJECTS = $(am_test_burst_OBJECTS)
|
||||
test_burst_LDADD = $(LDADD)
|
||||
test_burst_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_burst_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_burst_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_econfig_OBJECTS = test_econfig-econfig.$(OBJEXT)
|
||||
test_econfig_OBJECTS = $(am_test_econfig_OBJECTS)
|
||||
test_econfig_LDADD = $(LDADD)
|
||||
test_econfig_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_econfig_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_econfig_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_gThread_OBJECTS = test_gThread-gThread.$(OBJEXT)
|
||||
test_gThread_OBJECTS = $(am_test_gThread_OBJECTS)
|
||||
test_gThread_LDADD = $(LDADD)
|
||||
test_gThread_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_gThread_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_gThread_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(test_gThread_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_kick_transaction_OBJECTS = \
|
||||
test_kick_transaction-test_kick_transaction.$(OBJEXT)
|
||||
test_kick_transaction_OBJECTS = $(am_test_kick_transaction_OBJECTS)
|
||||
test_kick_transaction_LDADD = $(LDADD)
|
||||
test_kick_transaction_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_kick_transaction_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(test_kick_transaction_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
am_test_match_OBJECTS = test_match-match.$(OBJEXT)
|
||||
test_match_OBJECTS = $(am_test_match_OBJECTS)
|
||||
test_match_LDADD = $(LDADD)
|
||||
test_match_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_match_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_match_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_mtrie_OBJECTS = test_mtrie-mtrie.$(OBJEXT)
|
||||
test_mtrie_OBJECTS = $(am_test_mtrie_OBJECTS)
|
||||
test_mtrie_LDADD = $(LDADD)
|
||||
test_mtrie_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_mtrie_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_mtrie_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_mtrie_load_OBJECTS = test_mtrie_load-mtrie_load.$(OBJEXT)
|
||||
test_mtrie_load_OBJECTS = $(am_test_mtrie_load_OBJECTS)
|
||||
test_mtrie_load_LDADD = $(LDADD)
|
||||
test_mtrie_load_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_mtrie_load_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(test_mtrie_load_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
am_test_mtrie_perf_OBJECTS = test_mtrie_perf-mtrie_perf.$(OBJEXT)
|
||||
test_mtrie_perf_OBJECTS = $(am_test_mtrie_perf_OBJECTS)
|
||||
test_mtrie_perf_LDADD = $(LDADD)
|
||||
test_mtrie_perf_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_mtrie_perf_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(test_mtrie_perf_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
am_test_mtrie_perf_summary_OBJECTS = \
|
||||
test_mtrie_perf_summary-mtrie_perf_summary.$(OBJEXT)
|
||||
test_mtrie_perf_summary_OBJECTS = \
|
||||
$(am_test_mtrie_perf_summary_OBJECTS)
|
||||
test_mtrie_perf_summary_LDADD = $(LDADD)
|
||||
test_mtrie_perf_summary_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_mtrie_perf_summary_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(test_mtrie_perf_summary_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
am_test_regex_OBJECTS = test_regex.$(OBJEXT)
|
||||
test_regex_OBJECTS = $(am_test_regex_OBJECTS)
|
||||
test_regex_LDADD = $(LDADD)
|
||||
test_regex_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_regex_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(test_regex_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_signal_OBJECTS = test_signal-signal.$(OBJEXT)
|
||||
test_signal_OBJECTS = $(am_test_signal_OBJECTS)
|
||||
test_signal_LDADD = $(LDADD)
|
||||
test_signal_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_signal_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_signal_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(test_signal_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_test_stringtokenizer_OBJECTS = \
|
||||
test_stringtokenizer-stringtokenizer.$(OBJEXT)
|
||||
test_stringtokenizer_OBJECTS = $(am_test_stringtokenizer_OBJECTS)
|
||||
test_stringtokenizer_LDADD = $(LDADD)
|
||||
test_stringtokenizer_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
test_stringtokenizer_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(test_stringtokenizer_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(test_bot_SOURCES) $(test_burst_SOURCES) \
|
||||
$(test_econfig_SOURCES) $(test_gThread_SOURCES) \
|
||||
$(test_kick_transaction_SOURCES) $(test_match_SOURCES) \
|
||||
$(test_mtrie_SOURCES) $(test_mtrie_load_SOURCES) \
|
||||
$(test_mtrie_perf_SOURCES) $(test_mtrie_perf_summary_SOURCES) \
|
||||
$(test_regex_SOURCES) $(test_signal_SOURCES) \
|
||||
$(test_stringtokenizer_SOURCES)
|
||||
DIST_SOURCES = $(test_bot_SOURCES) $(test_burst_SOURCES) \
|
||||
$(test_econfig_SOURCES) $(test_gThread_SOURCES) \
|
||||
$(test_kick_transaction_SOURCES) $(test_match_SOURCES) \
|
||||
$(test_mtrie_SOURCES) $(test_mtrie_load_SOURCES) \
|
||||
$(test_mtrie_perf_SOURCES) $(test_mtrie_perf_summary_SOURCES) \
|
||||
$(test_regex_SOURCES) $(test_signal_SOURCES) \
|
||||
$(test_stringtokenizer_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INCLTDL = @INCLTDL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGNUWORLD = @LIBGNUWORLD@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTDLDEPS = @LTDLDEPS@
|
||||
LTDLINCL = @LTDLINCL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NEW_MODS = @NEW_MODS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pgsql_includedir = @pgsql_includedir@
|
||||
pgsql_libdir = @pgsql_libdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
threadLib = @threadLib@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
LDADD = $(LIBGNUWORLD)
|
||||
test_burst_SOURCES = burst.cc
|
||||
test_burst_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_mtrie_SOURCES = mtrie.cc
|
||||
test_mtrie_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_mtrie_load_SOURCES = mtrie_load.cc
|
||||
test_mtrie_load_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_mtrie_perf_SOURCES = mtrie_perf.cc
|
||||
test_mtrie_perf_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_mtrie_perf_summary_SOURCES = mtrie_perf_summary.cc
|
||||
test_mtrie_perf_summary_CXXFLAGS = -I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libgnuworld
|
||||
|
||||
test_stringtokenizer_SOURCES = stringtokenizer.cc
|
||||
test_stringtokenizer_CXXFLAGS = -I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libgnuworld
|
||||
|
||||
test_econfig_SOURCES = econfig.cc
|
||||
test_econfig_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_match_SOURCES = match.cc
|
||||
test_match_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_bot_SOURCES = testbot.cc
|
||||
test_bot_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_kick_transaction_SOURCES = test_kick_transaction.cc
|
||||
test_kick_transaction_CXXFLAGS = -I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libgnuworld
|
||||
|
||||
test_regex_SOURCES = test_regex.cc
|
||||
test_regex_LDFLAGS = -lpcre
|
||||
test_gThread_SOURCES = gThread.cc
|
||||
test_gThread_LDFLAGS = $(top_builddir)/libgnuworld/libgnuworld.la \
|
||||
$(threadLib)
|
||||
|
||||
test_gThread_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
test_signal_SOURCES = signal.cc
|
||||
test_signal_LDFLAGS = $(LIBGNUWORLD) $(threadLib)
|
||||
test_signal_CXXFLAGS = -I${top_srcdir}/include -I${top_srcdir}/libgnuworld
|
||||
EXTRA_DIST = testbot.h \
|
||||
README.burst \
|
||||
README.econfig \
|
||||
README.gthread \
|
||||
README.match \
|
||||
README.mtrie \
|
||||
README.signal \
|
||||
README.stringtokenizer \
|
||||
README.testBot \
|
||||
README.test_kick_transaction
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cc .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu test/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
test_bot$(EXEEXT): $(test_bot_OBJECTS) $(test_bot_DEPENDENCIES)
|
||||
@rm -f test_bot$(EXEEXT)
|
||||
$(test_bot_LINK) $(test_bot_OBJECTS) $(test_bot_LDADD) $(LIBS)
|
||||
test_burst$(EXEEXT): $(test_burst_OBJECTS) $(test_burst_DEPENDENCIES)
|
||||
@rm -f test_burst$(EXEEXT)
|
||||
$(test_burst_LINK) $(test_burst_OBJECTS) $(test_burst_LDADD) $(LIBS)
|
||||
test_econfig$(EXEEXT): $(test_econfig_OBJECTS) $(test_econfig_DEPENDENCIES)
|
||||
@rm -f test_econfig$(EXEEXT)
|
||||
$(test_econfig_LINK) $(test_econfig_OBJECTS) $(test_econfig_LDADD) $(LIBS)
|
||||
test_gThread$(EXEEXT): $(test_gThread_OBJECTS) $(test_gThread_DEPENDENCIES)
|
||||
@rm -f test_gThread$(EXEEXT)
|
||||
$(test_gThread_LINK) $(test_gThread_OBJECTS) $(test_gThread_LDADD) $(LIBS)
|
||||
test_kick_transaction$(EXEEXT): $(test_kick_transaction_OBJECTS) $(test_kick_transaction_DEPENDENCIES)
|
||||
@rm -f test_kick_transaction$(EXEEXT)
|
||||
$(test_kick_transaction_LINK) $(test_kick_transaction_OBJECTS) $(test_kick_transaction_LDADD) $(LIBS)
|
||||
test_match$(EXEEXT): $(test_match_OBJECTS) $(test_match_DEPENDENCIES)
|
||||
@rm -f test_match$(EXEEXT)
|
||||
$(test_match_LINK) $(test_match_OBJECTS) $(test_match_LDADD) $(LIBS)
|
||||
test_mtrie$(EXEEXT): $(test_mtrie_OBJECTS) $(test_mtrie_DEPENDENCIES)
|
||||
@rm -f test_mtrie$(EXEEXT)
|
||||
$(test_mtrie_LINK) $(test_mtrie_OBJECTS) $(test_mtrie_LDADD) $(LIBS)
|
||||
test_mtrie_load$(EXEEXT): $(test_mtrie_load_OBJECTS) $(test_mtrie_load_DEPENDENCIES)
|
||||
@rm -f test_mtrie_load$(EXEEXT)
|
||||
$(test_mtrie_load_LINK) $(test_mtrie_load_OBJECTS) $(test_mtrie_load_LDADD) $(LIBS)
|
||||
test_mtrie_perf$(EXEEXT): $(test_mtrie_perf_OBJECTS) $(test_mtrie_perf_DEPENDENCIES)
|
||||
@rm -f test_mtrie_perf$(EXEEXT)
|
||||
$(test_mtrie_perf_LINK) $(test_mtrie_perf_OBJECTS) $(test_mtrie_perf_LDADD) $(LIBS)
|
||||
test_mtrie_perf_summary$(EXEEXT): $(test_mtrie_perf_summary_OBJECTS) $(test_mtrie_perf_summary_DEPENDENCIES)
|
||||
@rm -f test_mtrie_perf_summary$(EXEEXT)
|
||||
$(test_mtrie_perf_summary_LINK) $(test_mtrie_perf_summary_OBJECTS) $(test_mtrie_perf_summary_LDADD) $(LIBS)
|
||||
test_regex$(EXEEXT): $(test_regex_OBJECTS) $(test_regex_DEPENDENCIES)
|
||||
@rm -f test_regex$(EXEEXT)
|
||||
$(test_regex_LINK) $(test_regex_OBJECTS) $(test_regex_LDADD) $(LIBS)
|
||||
test_signal$(EXEEXT): $(test_signal_OBJECTS) $(test_signal_DEPENDENCIES)
|
||||
@rm -f test_signal$(EXEEXT)
|
||||
$(test_signal_LINK) $(test_signal_OBJECTS) $(test_signal_LDADD) $(LIBS)
|
||||
test_stringtokenizer$(EXEEXT): $(test_stringtokenizer_OBJECTS) $(test_stringtokenizer_DEPENDENCIES)
|
||||
@rm -f test_stringtokenizer$(EXEEXT)
|
||||
$(test_stringtokenizer_LINK) $(test_stringtokenizer_OBJECTS) $(test_stringtokenizer_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bot-testbot.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_burst-burst.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_econfig-econfig.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gThread-gThread.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kick_transaction-test_kick_transaction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_match-match.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mtrie-mtrie.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mtrie_load-mtrie_load.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mtrie_perf-mtrie_perf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_regex.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_signal-signal.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stringtokenizer-stringtokenizer.Po@am__quote@
|
||||
|
||||
.cc.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cc.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cc.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
test_bot-testbot.o: testbot.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_bot_CXXFLAGS) $(CXXFLAGS) -MT test_bot-testbot.o -MD -MP -MF $(DEPDIR)/test_bot-testbot.Tpo -c -o test_bot-testbot.o `test -f 'testbot.cc' || echo '$(srcdir)/'`testbot.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_bot-testbot.Tpo $(DEPDIR)/test_bot-testbot.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testbot.cc' object='test_bot-testbot.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_bot_CXXFLAGS) $(CXXFLAGS) -c -o test_bot-testbot.o `test -f 'testbot.cc' || echo '$(srcdir)/'`testbot.cc
|
||||
|
||||
test_bot-testbot.obj: testbot.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_bot_CXXFLAGS) $(CXXFLAGS) -MT test_bot-testbot.obj -MD -MP -MF $(DEPDIR)/test_bot-testbot.Tpo -c -o test_bot-testbot.obj `if test -f 'testbot.cc'; then $(CYGPATH_W) 'testbot.cc'; else $(CYGPATH_W) '$(srcdir)/testbot.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_bot-testbot.Tpo $(DEPDIR)/test_bot-testbot.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testbot.cc' object='test_bot-testbot.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_bot_CXXFLAGS) $(CXXFLAGS) -c -o test_bot-testbot.obj `if test -f 'testbot.cc'; then $(CYGPATH_W) 'testbot.cc'; else $(CYGPATH_W) '$(srcdir)/testbot.cc'; fi`
|
||||
|
||||
test_burst-burst.o: burst.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_burst_CXXFLAGS) $(CXXFLAGS) -MT test_burst-burst.o -MD -MP -MF $(DEPDIR)/test_burst-burst.Tpo -c -o test_burst-burst.o `test -f 'burst.cc' || echo '$(srcdir)/'`burst.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_burst-burst.Tpo $(DEPDIR)/test_burst-burst.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='burst.cc' object='test_burst-burst.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_burst_CXXFLAGS) $(CXXFLAGS) -c -o test_burst-burst.o `test -f 'burst.cc' || echo '$(srcdir)/'`burst.cc
|
||||
|
||||
test_burst-burst.obj: burst.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_burst_CXXFLAGS) $(CXXFLAGS) -MT test_burst-burst.obj -MD -MP -MF $(DEPDIR)/test_burst-burst.Tpo -c -o test_burst-burst.obj `if test -f 'burst.cc'; then $(CYGPATH_W) 'burst.cc'; else $(CYGPATH_W) '$(srcdir)/burst.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_burst-burst.Tpo $(DEPDIR)/test_burst-burst.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='burst.cc' object='test_burst-burst.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_burst_CXXFLAGS) $(CXXFLAGS) -c -o test_burst-burst.obj `if test -f 'burst.cc'; then $(CYGPATH_W) 'burst.cc'; else $(CYGPATH_W) '$(srcdir)/burst.cc'; fi`
|
||||
|
||||
test_econfig-econfig.o: econfig.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_econfig_CXXFLAGS) $(CXXFLAGS) -MT test_econfig-econfig.o -MD -MP -MF $(DEPDIR)/test_econfig-econfig.Tpo -c -o test_econfig-econfig.o `test -f 'econfig.cc' || echo '$(srcdir)/'`econfig.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_econfig-econfig.Tpo $(DEPDIR)/test_econfig-econfig.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='econfig.cc' object='test_econfig-econfig.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_econfig_CXXFLAGS) $(CXXFLAGS) -c -o test_econfig-econfig.o `test -f 'econfig.cc' || echo '$(srcdir)/'`econfig.cc
|
||||
|
||||
test_econfig-econfig.obj: econfig.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_econfig_CXXFLAGS) $(CXXFLAGS) -MT test_econfig-econfig.obj -MD -MP -MF $(DEPDIR)/test_econfig-econfig.Tpo -c -o test_econfig-econfig.obj `if test -f 'econfig.cc'; then $(CYGPATH_W) 'econfig.cc'; else $(CYGPATH_W) '$(srcdir)/econfig.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_econfig-econfig.Tpo $(DEPDIR)/test_econfig-econfig.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='econfig.cc' object='test_econfig-econfig.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_econfig_CXXFLAGS) $(CXXFLAGS) -c -o test_econfig-econfig.obj `if test -f 'econfig.cc'; then $(CYGPATH_W) 'econfig.cc'; else $(CYGPATH_W) '$(srcdir)/econfig.cc'; fi`
|
||||
|
||||
test_gThread-gThread.o: gThread.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gThread_CXXFLAGS) $(CXXFLAGS) -MT test_gThread-gThread.o -MD -MP -MF $(DEPDIR)/test_gThread-gThread.Tpo -c -o test_gThread-gThread.o `test -f 'gThread.cc' || echo '$(srcdir)/'`gThread.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_gThread-gThread.Tpo $(DEPDIR)/test_gThread-gThread.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gThread.cc' object='test_gThread-gThread.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gThread_CXXFLAGS) $(CXXFLAGS) -c -o test_gThread-gThread.o `test -f 'gThread.cc' || echo '$(srcdir)/'`gThread.cc
|
||||
|
||||
test_gThread-gThread.obj: gThread.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gThread_CXXFLAGS) $(CXXFLAGS) -MT test_gThread-gThread.obj -MD -MP -MF $(DEPDIR)/test_gThread-gThread.Tpo -c -o test_gThread-gThread.obj `if test -f 'gThread.cc'; then $(CYGPATH_W) 'gThread.cc'; else $(CYGPATH_W) '$(srcdir)/gThread.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_gThread-gThread.Tpo $(DEPDIR)/test_gThread-gThread.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gThread.cc' object='test_gThread-gThread.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gThread_CXXFLAGS) $(CXXFLAGS) -c -o test_gThread-gThread.obj `if test -f 'gThread.cc'; then $(CYGPATH_W) 'gThread.cc'; else $(CYGPATH_W) '$(srcdir)/gThread.cc'; fi`
|
||||
|
||||
test_kick_transaction-test_kick_transaction.o: test_kick_transaction.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kick_transaction_CXXFLAGS) $(CXXFLAGS) -MT test_kick_transaction-test_kick_transaction.o -MD -MP -MF $(DEPDIR)/test_kick_transaction-test_kick_transaction.Tpo -c -o test_kick_transaction-test_kick_transaction.o `test -f 'test_kick_transaction.cc' || echo '$(srcdir)/'`test_kick_transaction.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_kick_transaction-test_kick_transaction.Tpo $(DEPDIR)/test_kick_transaction-test_kick_transaction.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_kick_transaction.cc' object='test_kick_transaction-test_kick_transaction.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kick_transaction_CXXFLAGS) $(CXXFLAGS) -c -o test_kick_transaction-test_kick_transaction.o `test -f 'test_kick_transaction.cc' || echo '$(srcdir)/'`test_kick_transaction.cc
|
||||
|
||||
test_kick_transaction-test_kick_transaction.obj: test_kick_transaction.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kick_transaction_CXXFLAGS) $(CXXFLAGS) -MT test_kick_transaction-test_kick_transaction.obj -MD -MP -MF $(DEPDIR)/test_kick_transaction-test_kick_transaction.Tpo -c -o test_kick_transaction-test_kick_transaction.obj `if test -f 'test_kick_transaction.cc'; then $(CYGPATH_W) 'test_kick_transaction.cc'; else $(CYGPATH_W) '$(srcdir)/test_kick_transaction.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_kick_transaction-test_kick_transaction.Tpo $(DEPDIR)/test_kick_transaction-test_kick_transaction.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_kick_transaction.cc' object='test_kick_transaction-test_kick_transaction.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kick_transaction_CXXFLAGS) $(CXXFLAGS) -c -o test_kick_transaction-test_kick_transaction.obj `if test -f 'test_kick_transaction.cc'; then $(CYGPATH_W) 'test_kick_transaction.cc'; else $(CYGPATH_W) '$(srcdir)/test_kick_transaction.cc'; fi`
|
||||
|
||||
test_match-match.o: match.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_match_CXXFLAGS) $(CXXFLAGS) -MT test_match-match.o -MD -MP -MF $(DEPDIR)/test_match-match.Tpo -c -o test_match-match.o `test -f 'match.cc' || echo '$(srcdir)/'`match.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_match-match.Tpo $(DEPDIR)/test_match-match.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='match.cc' object='test_match-match.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_match_CXXFLAGS) $(CXXFLAGS) -c -o test_match-match.o `test -f 'match.cc' || echo '$(srcdir)/'`match.cc
|
||||
|
||||
test_match-match.obj: match.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_match_CXXFLAGS) $(CXXFLAGS) -MT test_match-match.obj -MD -MP -MF $(DEPDIR)/test_match-match.Tpo -c -o test_match-match.obj `if test -f 'match.cc'; then $(CYGPATH_W) 'match.cc'; else $(CYGPATH_W) '$(srcdir)/match.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_match-match.Tpo $(DEPDIR)/test_match-match.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='match.cc' object='test_match-match.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_match_CXXFLAGS) $(CXXFLAGS) -c -o test_match-match.obj `if test -f 'match.cc'; then $(CYGPATH_W) 'match.cc'; else $(CYGPATH_W) '$(srcdir)/match.cc'; fi`
|
||||
|
||||
test_mtrie-mtrie.o: mtrie.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie-mtrie.o -MD -MP -MF $(DEPDIR)/test_mtrie-mtrie.Tpo -c -o test_mtrie-mtrie.o `test -f 'mtrie.cc' || echo '$(srcdir)/'`mtrie.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie-mtrie.Tpo $(DEPDIR)/test_mtrie-mtrie.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie.cc' object='test_mtrie-mtrie.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie-mtrie.o `test -f 'mtrie.cc' || echo '$(srcdir)/'`mtrie.cc
|
||||
|
||||
test_mtrie-mtrie.obj: mtrie.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie-mtrie.obj -MD -MP -MF $(DEPDIR)/test_mtrie-mtrie.Tpo -c -o test_mtrie-mtrie.obj `if test -f 'mtrie.cc'; then $(CYGPATH_W) 'mtrie.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie-mtrie.Tpo $(DEPDIR)/test_mtrie-mtrie.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie.cc' object='test_mtrie-mtrie.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie-mtrie.obj `if test -f 'mtrie.cc'; then $(CYGPATH_W) 'mtrie.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie.cc'; fi`
|
||||
|
||||
test_mtrie_load-mtrie_load.o: mtrie_load.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_load_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie_load-mtrie_load.o -MD -MP -MF $(DEPDIR)/test_mtrie_load-mtrie_load.Tpo -c -o test_mtrie_load-mtrie_load.o `test -f 'mtrie_load.cc' || echo '$(srcdir)/'`mtrie_load.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie_load-mtrie_load.Tpo $(DEPDIR)/test_mtrie_load-mtrie_load.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie_load.cc' object='test_mtrie_load-mtrie_load.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_load_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie_load-mtrie_load.o `test -f 'mtrie_load.cc' || echo '$(srcdir)/'`mtrie_load.cc
|
||||
|
||||
test_mtrie_load-mtrie_load.obj: mtrie_load.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_load_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie_load-mtrie_load.obj -MD -MP -MF $(DEPDIR)/test_mtrie_load-mtrie_load.Tpo -c -o test_mtrie_load-mtrie_load.obj `if test -f 'mtrie_load.cc'; then $(CYGPATH_W) 'mtrie_load.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie_load.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie_load-mtrie_load.Tpo $(DEPDIR)/test_mtrie_load-mtrie_load.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie_load.cc' object='test_mtrie_load-mtrie_load.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_load_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie_load-mtrie_load.obj `if test -f 'mtrie_load.cc'; then $(CYGPATH_W) 'mtrie_load.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie_load.cc'; fi`
|
||||
|
||||
test_mtrie_perf-mtrie_perf.o: mtrie_perf.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie_perf-mtrie_perf.o -MD -MP -MF $(DEPDIR)/test_mtrie_perf-mtrie_perf.Tpo -c -o test_mtrie_perf-mtrie_perf.o `test -f 'mtrie_perf.cc' || echo '$(srcdir)/'`mtrie_perf.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie_perf-mtrie_perf.Tpo $(DEPDIR)/test_mtrie_perf-mtrie_perf.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie_perf.cc' object='test_mtrie_perf-mtrie_perf.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie_perf-mtrie_perf.o `test -f 'mtrie_perf.cc' || echo '$(srcdir)/'`mtrie_perf.cc
|
||||
|
||||
test_mtrie_perf-mtrie_perf.obj: mtrie_perf.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie_perf-mtrie_perf.obj -MD -MP -MF $(DEPDIR)/test_mtrie_perf-mtrie_perf.Tpo -c -o test_mtrie_perf-mtrie_perf.obj `if test -f 'mtrie_perf.cc'; then $(CYGPATH_W) 'mtrie_perf.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie_perf.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie_perf-mtrie_perf.Tpo $(DEPDIR)/test_mtrie_perf-mtrie_perf.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie_perf.cc' object='test_mtrie_perf-mtrie_perf.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie_perf-mtrie_perf.obj `if test -f 'mtrie_perf.cc'; then $(CYGPATH_W) 'mtrie_perf.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie_perf.cc'; fi`
|
||||
|
||||
test_mtrie_perf_summary-mtrie_perf_summary.o: mtrie_perf_summary.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_summary_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie_perf_summary-mtrie_perf_summary.o -MD -MP -MF $(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Tpo -c -o test_mtrie_perf_summary-mtrie_perf_summary.o `test -f 'mtrie_perf_summary.cc' || echo '$(srcdir)/'`mtrie_perf_summary.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Tpo $(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie_perf_summary.cc' object='test_mtrie_perf_summary-mtrie_perf_summary.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_summary_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie_perf_summary-mtrie_perf_summary.o `test -f 'mtrie_perf_summary.cc' || echo '$(srcdir)/'`mtrie_perf_summary.cc
|
||||
|
||||
test_mtrie_perf_summary-mtrie_perf_summary.obj: mtrie_perf_summary.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_summary_CXXFLAGS) $(CXXFLAGS) -MT test_mtrie_perf_summary-mtrie_perf_summary.obj -MD -MP -MF $(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Tpo -c -o test_mtrie_perf_summary-mtrie_perf_summary.obj `if test -f 'mtrie_perf_summary.cc'; then $(CYGPATH_W) 'mtrie_perf_summary.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie_perf_summary.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Tpo $(DEPDIR)/test_mtrie_perf_summary-mtrie_perf_summary.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mtrie_perf_summary.cc' object='test_mtrie_perf_summary-mtrie_perf_summary.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_mtrie_perf_summary_CXXFLAGS) $(CXXFLAGS) -c -o test_mtrie_perf_summary-mtrie_perf_summary.obj `if test -f 'mtrie_perf_summary.cc'; then $(CYGPATH_W) 'mtrie_perf_summary.cc'; else $(CYGPATH_W) '$(srcdir)/mtrie_perf_summary.cc'; fi`
|
||||
|
||||
test_signal-signal.o: signal.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_signal_CXXFLAGS) $(CXXFLAGS) -MT test_signal-signal.o -MD -MP -MF $(DEPDIR)/test_signal-signal.Tpo -c -o test_signal-signal.o `test -f 'signal.cc' || echo '$(srcdir)/'`signal.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_signal-signal.Tpo $(DEPDIR)/test_signal-signal.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signal.cc' object='test_signal-signal.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_signal_CXXFLAGS) $(CXXFLAGS) -c -o test_signal-signal.o `test -f 'signal.cc' || echo '$(srcdir)/'`signal.cc
|
||||
|
||||
test_signal-signal.obj: signal.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_signal_CXXFLAGS) $(CXXFLAGS) -MT test_signal-signal.obj -MD -MP -MF $(DEPDIR)/test_signal-signal.Tpo -c -o test_signal-signal.obj `if test -f 'signal.cc'; then $(CYGPATH_W) 'signal.cc'; else $(CYGPATH_W) '$(srcdir)/signal.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_signal-signal.Tpo $(DEPDIR)/test_signal-signal.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signal.cc' object='test_signal-signal.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_signal_CXXFLAGS) $(CXXFLAGS) -c -o test_signal-signal.obj `if test -f 'signal.cc'; then $(CYGPATH_W) 'signal.cc'; else $(CYGPATH_W) '$(srcdir)/signal.cc'; fi`
|
||||
|
||||
test_stringtokenizer-stringtokenizer.o: stringtokenizer.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_stringtokenizer_CXXFLAGS) $(CXXFLAGS) -MT test_stringtokenizer-stringtokenizer.o -MD -MP -MF $(DEPDIR)/test_stringtokenizer-stringtokenizer.Tpo -c -o test_stringtokenizer-stringtokenizer.o `test -f 'stringtokenizer.cc' || echo '$(srcdir)/'`stringtokenizer.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_stringtokenizer-stringtokenizer.Tpo $(DEPDIR)/test_stringtokenizer-stringtokenizer.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stringtokenizer.cc' object='test_stringtokenizer-stringtokenizer.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_stringtokenizer_CXXFLAGS) $(CXXFLAGS) -c -o test_stringtokenizer-stringtokenizer.o `test -f 'stringtokenizer.cc' || echo '$(srcdir)/'`stringtokenizer.cc
|
||||
|
||||
test_stringtokenizer-stringtokenizer.obj: stringtokenizer.cc
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_stringtokenizer_CXXFLAGS) $(CXXFLAGS) -MT test_stringtokenizer-stringtokenizer.obj -MD -MP -MF $(DEPDIR)/test_stringtokenizer-stringtokenizer.Tpo -c -o test_stringtokenizer-stringtokenizer.obj `if test -f 'stringtokenizer.cc'; then $(CYGPATH_W) 'stringtokenizer.cc'; else $(CYGPATH_W) '$(srcdir)/stringtokenizer.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_stringtokenizer-stringtokenizer.Tpo $(DEPDIR)/test_stringtokenizer-stringtokenizer.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stringtokenizer.cc' object='test_stringtokenizer-stringtokenizer.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_stringtokenizer_CXXFLAGS) $(CXXFLAGS) -c -o test_stringtokenizer-stringtokenizer.obj `if test -f 'stringtokenizer.cc'; then $(CYGPATH_W) 'stringtokenizer.cc'; else $(CYGPATH_W) '$(srcdir)/stringtokenizer.cc'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstPROGRAMS ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
This is a simple burst server. You connect to it with a gnuworld (or
|
||||
other) server, and it will simply dump an entire log file to you. The log
|
||||
file must be specified on the command line of test_burst, and it has a
|
||||
simple menu driven system accessible by -h.
|
||||
@@ -0,0 +1,4 @@
|
||||
Interactive testing for the EConfig file parser. The menu driven system
|
||||
allows you to find/insert/replace(?) key value pairs in a given (-f)
|
||||
config file.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Simple proof of concept testing for the gThread class.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
A simple program which will match two strings, one with wildcards.
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
The mtrie* suite is used to test the gnuworld matching trie (MTrie).
|
||||
|
||||
mtrie
|
||||
-----
|
||||
Reads a socket file, putting all hostnames found in "N" commands into
|
||||
an MTrie. It then provides an interactive menu system allowing you to
|
||||
search/insert/delete items in the MTrie.
|
||||
|
||||
mtrie_perf
|
||||
----------
|
||||
Reads a socket file, putting all hostnames found in "N" commands into
|
||||
an MTrie. This program will invoke the MTrie's dumpDebug() information
|
||||
into a file like "mtrie_perf_<name of socket file>". This file includes
|
||||
information about each node in the MTrie: level number, number of
|
||||
subtrees (sub nodes), and number of values stored at that node. It is
|
||||
in a syntax that should be easily parsed by some other program.
|
||||
|
||||
mtrie_perf_summary
|
||||
------------------
|
||||
This program reads an mtrie_perf output file and spits out some useful
|
||||
information about the MTrie, like max level, average number of values
|
||||
per node, etc.
|
||||
|
||||
mtrie_load
|
||||
----------
|
||||
Perform load testing of the matching trie, comparing it to a multimap. It
|
||||
reads a file with N (optionally wildcard) strings to search for. The
|
||||
default files are mtrie.match*. This program accepts a handful of command
|
||||
line arguments and should be easy to use. By default a multimap is used,
|
||||
add -t to the command line to use a matching trie instead.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
This program is designed to hammer the signal handling system looking for
|
||||
flaws with GNUWorld's Signal class.
|
||||
|
||||
To do some testing:
|
||||
|
||||
1) run test_signal
|
||||
2) run kill_mult
|
||||
|
||||
kill_test will send a group of known signals to the pid found in
|
||||
signal.pid (the pid file for the signal program from step 1).
|
||||
|
||||
kill_mult just runs kill_test a bunch of times.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Attempts to tokenize a given file. Has a help menu, so it should be
|
||||
pretty easy to use. This program is just used to load test the
|
||||
StringTokenizer class.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
This is a simple test bot that uses the ConnectionManager interface. It
|
||||
is mainly a demonstration of how easy it is to build network apps with CM
|
||||
:)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
This file is used to get some information about how zombies work,
|
||||
primarily for looking for cross server kicks and determining which ones
|
||||
are actually honored.
|
||||
|
||||
Receives a socket.log as input.
|
||||
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* burst.cc
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <cerrno>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include "ConnectionManager.h"
|
||||
#include "ConnectionHandler.h"
|
||||
#include "Connection.h"
|
||||
#include "ELog.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
class localHandler : public ConnectionHandler
|
||||
{
|
||||
public:
|
||||
Connection* listenPtr ;
|
||||
Connection* burstPtr ;
|
||||
|
||||
localHandler()
|
||||
: listenPtr( 0 ),
|
||||
burstPtr( 0 )
|
||||
{}
|
||||
virtual ~localHandler()
|
||||
{}
|
||||
|
||||
virtual void OnDisconnect( Connection* cPtr )
|
||||
{
|
||||
if( cPtr == burstPtr )
|
||||
{
|
||||
burstPtr = 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnConnect( Connection* cPtr )
|
||||
{
|
||||
burstPtr = cPtr ;
|
||||
cout << "OnConnect> Received new connection: "
|
||||
<< *cPtr
|
||||
<< endl ;
|
||||
}
|
||||
} ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << endl
|
||||
<< "Usage: "
|
||||
<< progName
|
||||
<< " [options]"
|
||||
<< endl ;
|
||||
cout << endl
|
||||
<< "Options: "
|
||||
<< endl
|
||||
<< "-b <KB per second>\tNumber of kilobytes per second to "
|
||||
<< "transfer"
|
||||
<< endl
|
||||
<< "-f <socket filename>\tThe socket file name (required)"
|
||||
<< endl
|
||||
<< "-p <port>\t\tPort on which to listen"
|
||||
<< endl
|
||||
<< "-h\t\t\tPrint this help menu"
|
||||
<< endl ;
|
||||
cout << endl ;
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( 1 == argc )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
elog.setStream( &cout ) ;
|
||||
|
||||
size_t numKB = 250 ;
|
||||
unsigned short int portNum = 45678 ;
|
||||
string socketFileName ;
|
||||
|
||||
int c = EOF ;
|
||||
while( (c = ::getopt( argc, argv, "f:hp:b:" )) != EOF )
|
||||
{
|
||||
switch( c )
|
||||
{
|
||||
case 'b':
|
||||
numKB = static_cast< size_t >( atoi( optarg ) ) ;
|
||||
break ;
|
||||
case 'f':
|
||||
socketFileName = optarg ;
|
||||
break ;
|
||||
case 'h':
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
case 'p':
|
||||
portNum = static_cast< unsigned short int >(
|
||||
atoi( optarg ) ) ;
|
||||
break ;
|
||||
default:
|
||||
cout << "Unknown option: "
|
||||
<< (char) c
|
||||
<< endl ;
|
||||
return -1 ;
|
||||
} // switch()
|
||||
} // while( getopt() )
|
||||
|
||||
ConnectionManager cm ;
|
||||
localHandler lh ;
|
||||
|
||||
lh.listenPtr = cm.Listen( &lh, portNum ) ;
|
||||
if( 0 == lh.listenPtr )
|
||||
{
|
||||
cout << "Unable to establish listener on port "
|
||||
<< portNum
|
||||
<< endl ;
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
int inputFileFD = ::open( socketFileName.c_str(), O_RDONLY ) ;
|
||||
if( inputFileFD < 0 )
|
||||
{
|
||||
cout << "Unable to open input file: "
|
||||
<< socketFileName
|
||||
<< ": "
|
||||
<< strerror( errno )
|
||||
<< endl ;
|
||||
cm.Disconnect( &lh, lh.listenPtr ) ;
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
cout << endl
|
||||
<< "Listening for incoming connections on port "
|
||||
<< portNum
|
||||
<< ", processing from burst file: "
|
||||
<< socketFileName
|
||||
<< "..."
|
||||
<< endl ;
|
||||
|
||||
size_t totalReadBytes = 0 ;
|
||||
size_t attemptReadSize = numKB * 1024 ;
|
||||
char* inputBuffer = new (std::nothrow) char[ attemptReadSize ] ;
|
||||
assert( inputBuffer != 0 ) ;
|
||||
|
||||
bool done = false ;
|
||||
while( !done )
|
||||
{
|
||||
if( 0 == lh.burstPtr )
|
||||
{
|
||||
// No connection yet
|
||||
// Let the CM check for new connection,
|
||||
// block indefinitely.
|
||||
cm.Poll( -1 ) ;
|
||||
}
|
||||
|
||||
if( 0 == lh.burstPtr )
|
||||
{
|
||||
// Timed out or event occured
|
||||
continue ;
|
||||
}
|
||||
|
||||
// Poll(), blocking for up to 1 second
|
||||
cm.Poll( 1, 0 ) ;
|
||||
|
||||
if( lh.burstPtr->getOutputBufferSize() >=
|
||||
(4 * attemptReadSize) )
|
||||
{
|
||||
// Don't overfill the output buffer
|
||||
continue ;
|
||||
}
|
||||
|
||||
time_t connectDuration = ::time( 0 ) - lh.burstPtr->getConnectTime() ;
|
||||
if( 0 == connectDuration )
|
||||
{
|
||||
connectDuration = 1 ;
|
||||
}
|
||||
size_t recvRate = lh.burstPtr->getBytesRead() / connectDuration ;
|
||||
size_t sendRate = lh.burstPtr->getBytesWritten()
|
||||
/ connectDuration ;
|
||||
|
||||
cout << "Duration: "
|
||||
<< connectDuration
|
||||
<< " seconds; Read: "
|
||||
<< lh.burstPtr->getBytesRead()
|
||||
<< " bytes total, "
|
||||
<< (recvRate >> 10)
|
||||
<< " KB/sec; Write: "
|
||||
<< lh.burstPtr->getBytesWritten()
|
||||
<< " bytes total, "
|
||||
<< (sendRate >> 10)
|
||||
<< " KB/sec"
|
||||
<< endl ;
|
||||
|
||||
// Connection exists, pass it some input
|
||||
int readBytes = ::read( inputFileFD, inputBuffer, attemptReadSize ) ;
|
||||
if( readBytes <= 0 )
|
||||
{
|
||||
cout << "Done reading input file "
|
||||
<< socketFileName.c_str()
|
||||
<< endl ;
|
||||
done = true ;
|
||||
continue ;
|
||||
}
|
||||
|
||||
totalReadBytes += readBytes ;
|
||||
|
||||
string writeMe( inputBuffer, readBytes ) ;
|
||||
lh.burstPtr->Write( writeMe ) ;
|
||||
|
||||
// cout << "main> Writing "
|
||||
// << readBytes
|
||||
// << " bytes"
|
||||
// << endl ;
|
||||
|
||||
} // while( !done )
|
||||
|
||||
|
||||
delete[] inputBuffer ; inputBuffer = 0 ;
|
||||
::close( inputFileFD ) ;
|
||||
return 0 ;
|
||||
}
|
||||
+362
@@ -0,0 +1,362 @@
|
||||
/**
|
||||
* econfig.cc
|
||||
* Author: Daniel Karrels dan@karrels.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: econfig.cc,v 1.5 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "EConfig.h"
|
||||
#include "ELog.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
void printConfig( const EConfig& ) ;
|
||||
void printMenu() ;
|
||||
|
||||
void findEntry( const EConfig& ) ;
|
||||
void deleteEntry( EConfig& ) ;
|
||||
void addEntry( EConfig& ) ;
|
||||
void replaceEntry( EConfig& ) ;
|
||||
void addComment( EConfig& ) ;
|
||||
|
||||
int main( int argc, const char** argv )
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< argv[ 0 ]
|
||||
<< " <conf file>"
|
||||
<< endl ;
|
||||
return -1 ;
|
||||
}
|
||||
elog.setStream( &cout ) ;
|
||||
|
||||
cout << "Opening file "
|
||||
<< argv[ 1 ]
|
||||
<< "..."
|
||||
<< endl ;
|
||||
|
||||
EConfig conf( argv[ 1 ] ) ;
|
||||
|
||||
bool keepRunning = true ;
|
||||
while( keepRunning )
|
||||
{
|
||||
cout << endl ;
|
||||
printConfig( conf ) ;
|
||||
printMenu() ;
|
||||
|
||||
cout << endl
|
||||
<< "Please enter a choice: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string line ;
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
int choice = ::atoi( line.c_str() ) ;
|
||||
|
||||
switch( choice )
|
||||
{
|
||||
case 0:
|
||||
keepRunning = false ;
|
||||
break ;
|
||||
case 1:
|
||||
findEntry( conf ) ;
|
||||
break ;
|
||||
case 2:
|
||||
deleteEntry( conf ) ;
|
||||
break ;
|
||||
case 3:
|
||||
addEntry( conf ) ;
|
||||
break ;
|
||||
case 4:
|
||||
replaceEntry( conf ) ;
|
||||
break ;
|
||||
case 5:
|
||||
addComment( conf ) ;
|
||||
break ;
|
||||
default:
|
||||
cout << "Unrecognized input: "
|
||||
<< choice
|
||||
<< endl ;
|
||||
break ;
|
||||
} // switch()
|
||||
} // while( keepRunning)
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void printConfig( const EConfig& conf )
|
||||
{
|
||||
cout << "-------- Current Configuration --------"
|
||||
<< endl
|
||||
<< endl ;
|
||||
|
||||
for( EConfig::const_iterator itr = conf.begin() ;
|
||||
itr != conf.end() ; ++itr )
|
||||
{
|
||||
cout << itr->first
|
||||
<< '/'
|
||||
<< itr->second
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
void printMenu()
|
||||
{
|
||||
cout << endl
|
||||
<< "========== Menu =========="
|
||||
<< endl ;
|
||||
cout << "0: Exit"
|
||||
<< endl ;
|
||||
cout << "1: Find an entry"
|
||||
<< endl ;
|
||||
cout << "2: Delete an entry"
|
||||
<< endl ;
|
||||
cout << "3: Add an entry"
|
||||
<< endl ;
|
||||
cout << "4: Replace an entry"
|
||||
<< endl ;
|
||||
cout << "5: Add comment"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
void findEntry( const EConfig& conf )
|
||||
{
|
||||
cout << "Please enter the key to find: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string findMe ;
|
||||
std::getline( cin, findMe ) ;
|
||||
cout << endl ;
|
||||
|
||||
bool foundIt = false ;
|
||||
for( EConfig::const_iterator itr = conf.Find( findMe ) ;
|
||||
(itr != conf.end()) && (itr->first == findMe) ;
|
||||
++itr )
|
||||
{
|
||||
foundIt = true ;
|
||||
|
||||
cout << "Key: "
|
||||
<< itr->first
|
||||
<< ", Value: "
|
||||
<< itr->second
|
||||
<< endl ;
|
||||
}
|
||||
if( !foundIt )
|
||||
{
|
||||
cout << "Unable to find key \""
|
||||
<< findMe
|
||||
<< "\" in the config file"
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
void deleteEntry( EConfig& conf )
|
||||
{
|
||||
cout << endl ;
|
||||
|
||||
// First output all entries with a corresponding zero based
|
||||
// index identifier.
|
||||
unsigned short int counter = 0 ;
|
||||
for( EConfig::const_iterator itr = conf.begin() ; itr != conf.end() ;
|
||||
++itr )
|
||||
{
|
||||
cout << counter
|
||||
<< ": "
|
||||
<< itr->first
|
||||
<< '/'
|
||||
<< itr->second
|
||||
<< endl ;
|
||||
++counter ;
|
||||
}
|
||||
|
||||
cout << endl ;
|
||||
cout << "Please enter the number to remove: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string line ;
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
unsigned int removeMe = ::atoi( line.c_str() ) ;
|
||||
if( removeMe >= conf.size() )
|
||||
{
|
||||
cout << "Invalid number."
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
// Find the entry to remove, and Delete it
|
||||
bool removeOK = true ;
|
||||
EConfig::iterator itr = conf.begin() ;
|
||||
for( ; itr != conf.end() ; ++itr )
|
||||
{
|
||||
if( 0 == removeMe-- )
|
||||
{
|
||||
// Found the one to remove
|
||||
removeOK = conf.Delete( itr ) ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
if( removeOK )
|
||||
{
|
||||
cout << "Successfully removed item"
|
||||
<< endl ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Removal failed."
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
void addEntry( EConfig& conf )
|
||||
{
|
||||
cout << "Please enter key and value to add: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string line ;
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
cout << "addEntry> line: "
|
||||
<< line
|
||||
<< endl ;
|
||||
|
||||
StringTokenizer st( line ) ;
|
||||
if( st.size() < 2 )
|
||||
{
|
||||
cout << "You must enter at least 2 white space delimited "
|
||||
<< "tokens."
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
if( !conf.Add( st[ 0 ], st.assemble( 1 ) ) )
|
||||
{
|
||||
cout << "Unable to add: "
|
||||
<< st[ 0 ]
|
||||
<< '/'
|
||||
<< st.assemble( 1 )
|
||||
<< endl ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Added "
|
||||
<< st[ 0 ]
|
||||
<< '/'
|
||||
<< st.assemble( 1 )
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
void replaceEntry( EConfig& conf )
|
||||
{
|
||||
cout << endl ;
|
||||
|
||||
// First output all entries with a corresponding zero based
|
||||
// index identifier.
|
||||
unsigned short int counter = 0 ;
|
||||
for( EConfig::const_iterator itr = conf.begin() ; itr != conf.end() ;
|
||||
++itr )
|
||||
{
|
||||
cout << counter
|
||||
<< ": "
|
||||
<< itr->first
|
||||
<< '/'
|
||||
<< itr->second
|
||||
<< endl ;
|
||||
++counter ;
|
||||
}
|
||||
|
||||
cout << endl ;
|
||||
cout << "Please enter the number to replace: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string line ;
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
unsigned int replaceMe = ::atoi( line.c_str() ) ;
|
||||
if( replaceMe >= conf.size() )
|
||||
{
|
||||
cout << "Invalid number."
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
cout << "Please enter new value: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string newValue ;
|
||||
std::getline( cin, newValue ) ;
|
||||
|
||||
if( newValue.empty() )
|
||||
{
|
||||
cout << "New value must be non-empty"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
// Find the entry to replace
|
||||
EConfig::iterator itr = conf.begin() ;
|
||||
for( ; itr != conf.end() ; ++itr )
|
||||
{
|
||||
if( 0 == replaceMe-- )
|
||||
{
|
||||
// Found the one to replace
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
if( conf.Replace( itr, newValue ) )
|
||||
{
|
||||
cout << "Successfully replaced item"
|
||||
<< endl ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Replacement failed."
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
void addComment( EConfig& conf )
|
||||
{
|
||||
cout << "Enter new comment line: " ;
|
||||
cout.flush() ;
|
||||
|
||||
string line ;
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
if( !conf.AddComment( line ) )
|
||||
{
|
||||
cout << "Unable to add comment line: "
|
||||
<< line
|
||||
<< endl ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Successfully added comment line: "
|
||||
<< line
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# This is a test =
|
||||
# This is only a test =
|
||||
you = just_heard
|
||||
|
||||
# The signal =
|
||||
you = eat dinner
|
||||
|
||||
moo = not really testing
|
||||
testing = moo 1 2 3
|
||||
testing = moo 1 2 3
|
||||
uplink = 127.0.0.1
|
||||
# comment #1
|
||||
line = after comment
|
||||
|
||||
# comment #2, following empty line
|
||||
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* gThread.cc
|
||||
* Author: Daniel Karrels dan@karrels.com
|
||||
* Copyright (C) 2003 Daniel Karrels <dan@karrels.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "ELog.h"
|
||||
#include "gThread.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
class subThread1 : public gThread
|
||||
{
|
||||
public:
|
||||
virtual void Exec()
|
||||
{ while( keepRunning )
|
||||
{
|
||||
cout << "subThread1" << endl ;
|
||||
sleep( 1 ) ;
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
class subThread2 : public gThread
|
||||
{
|
||||
public:
|
||||
virtual void Exec()
|
||||
{ while( keepRunning )
|
||||
{
|
||||
cout << "subThread2" << endl ;
|
||||
sleep( 2 ) ;
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
class subThread3 : public gThread
|
||||
{
|
||||
public:
|
||||
virtual void Exec()
|
||||
{ while( keepRunning )
|
||||
{
|
||||
cout << "subThread3" << endl ;
|
||||
sleep( 3 ) ;
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
int main()
|
||||
{
|
||||
subThread1 t1 ;
|
||||
subThread2 t2 ;
|
||||
subThread3 t3 ;
|
||||
|
||||
//cout << "Executing t1.Exec()" << endl ;
|
||||
//t1.Exec() ;
|
||||
//t1.Stop() ;
|
||||
|
||||
cout << "Starting threads..." << endl ;
|
||||
t1.Start() ;
|
||||
t2.Start() ;
|
||||
t3.Start() ;
|
||||
|
||||
// Wait for user to hit CTRL-C
|
||||
while( true )
|
||||
{
|
||||
sleep( 1 ) ;
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/tcsh
|
||||
kill_test&
|
||||
kill_test&
|
||||
kill_test&
|
||||
kill_test&
|
||||
kill_test&
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/tcsh
|
||||
kill -HUP `cat signal.pid`
|
||||
kill -INT `cat signal.pid`
|
||||
kill -PIPE `cat signal.pid`
|
||||
kill -TERM `cat signal.pid`
|
||||
kill -POLL `cat signal.pid`
|
||||
kill -USR1 `cat signal.pid`
|
||||
kill -USR2 `cat signal.pid`
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* match.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: match.cc,v 1.4 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "ELog.h"
|
||||
#include "match.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
void getInput( string& s1, string& s2 )
|
||||
{
|
||||
cout << "Please input two strings to match: " ;
|
||||
cout.flush() ;
|
||||
|
||||
cin >> s1 >> s2 ;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
string s1 ;
|
||||
string s2 ;
|
||||
|
||||
getInput( s1, s2 ) ;
|
||||
|
||||
cout << "Matching "
|
||||
<< s1
|
||||
<< " and "
|
||||
<< s2
|
||||
<< ": " ;
|
||||
|
||||
int result = match( s1, s2 ) ;
|
||||
|
||||
if( 0 == result )
|
||||
{
|
||||
cout << "Match" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "No Match" ;
|
||||
}
|
||||
|
||||
cout << endl ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
/**
|
||||
* mtrie.cc
|
||||
*
|
||||
* $Id: mtrie.cc,v 1.6 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include "MTrie.h"
|
||||
#include "ELog.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
void printHelp() ;
|
||||
void handleSearch( const StringTokenizer& ) ;
|
||||
void handleErase( const StringTokenizer& ) ;
|
||||
void handleLevelDebug( const StringTokenizer& ) ;
|
||||
void handleMinLength( const StringTokenizer& ) ;
|
||||
|
||||
MTrie< string > hostTrie ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< " <socket log file>"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ifstream inFile( argv[ 1 ] ) ;
|
||||
if( !inFile )
|
||||
{
|
||||
cout << "Unable to open file: "
|
||||
<< argv[ 1 ]
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
clog << endl
|
||||
<< "Reading "
|
||||
<< argv[ 1 ]
|
||||
<< "..." ;
|
||||
|
||||
string line ;
|
||||
size_t numFound = 0 ;
|
||||
while( getline( inFile, line ) )
|
||||
{
|
||||
if( line.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
//Ay N tealie- 2 1053874792 ~tealie 7-11.sbg.org +i BCXaYv AyADd :Tealie
|
||||
StringTokenizer spaceTokens( line ) ;
|
||||
if( spaceTokens[ 1 ] == "EB" )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
if( spaceTokens.size() < 8 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
if( spaceTokens[ 1 ] != "N" )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
StringTokenizer dotTokens( spaceTokens[ 6 ], '.' ) ;
|
||||
if( dotTokens.size() < 2 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
// Got one
|
||||
hostTrie.insert( spaceTokens[ 6 ], spaceTokens[ 6 ] ) ;
|
||||
++numFound ;
|
||||
|
||||
} // while( getline() )
|
||||
inFile.close() ;
|
||||
|
||||
clog << endl
|
||||
<< "Read "
|
||||
<< numFound
|
||||
<< " hosts"
|
||||
<< endl
|
||||
<< endl ;
|
||||
|
||||
cout << "Entering command line mode, use \"exit\" to end"
|
||||
<< endl
|
||||
<< endl ;
|
||||
|
||||
do
|
||||
{
|
||||
cout << "> " ;
|
||||
cout.flush() ;
|
||||
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
if( line.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
StringTokenizer st( line ) ;
|
||||
if( st.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
if( st[ 0 ] == "help" )
|
||||
{
|
||||
printHelp() ;
|
||||
}
|
||||
else if( st[ 0 ] == "search" )
|
||||
{
|
||||
handleSearch( st ) ;
|
||||
}
|
||||
else if( st[ 0 ] == "erase" )
|
||||
{
|
||||
handleErase( st ) ;
|
||||
}
|
||||
else if( st[ 0 ] == "leveldebug" )
|
||||
{
|
||||
handleLevelDebug( st ) ;
|
||||
}
|
||||
else if( st[ 0 ] == "minlength" )
|
||||
{
|
||||
handleMinLength( st ) ;
|
||||
}
|
||||
else if( st[ 0 ] == "exit" || st[ 0 ] == "quit" )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Unrecognized command: "
|
||||
<< st[ 0 ]
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
cout << endl ;
|
||||
} while( (line != "exit") && (line != "quit") ) ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void printHelp()
|
||||
{
|
||||
cout << endl
|
||||
<< "--- Help menu ---"
|
||||
<< endl
|
||||
<< endl
|
||||
<< "help\t\t\tThis menu"
|
||||
<< endl
|
||||
<< "exit/quit\t\tTerminate program"
|
||||
<< endl
|
||||
<< "search <mask>\t\tSearch for a given mask"
|
||||
<< endl
|
||||
<< "erase <mask>\t\tErase all values matching the given mask"
|
||||
<< endl
|
||||
<< "leveldebug <level num>\tReport information about a given "
|
||||
<< "level"
|
||||
<< endl
|
||||
<< "minlength <min length>\tFind keys with at least <min "
|
||||
<< "length> tokens"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
void handleSearch( const StringTokenizer& st )
|
||||
{
|
||||
//cout << "handleSearch> line: "
|
||||
// << line
|
||||
// << endl ;
|
||||
|
||||
if( st.size() != 2 )
|
||||
{
|
||||
cout << "Error: Search requires exactly 1 argument"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
// st[ 1 ] == key
|
||||
typedef list< MTrie< string >::value_type > valuesListType ;
|
||||
valuesListType values = hostTrie.find( st[ 1 ] ) ;
|
||||
|
||||
for( valuesListType::const_iterator vItr = values.begin() ;
|
||||
vItr != values.end() ; ++vItr )
|
||||
{
|
||||
cout << "Match: "
|
||||
<< vItr->second
|
||||
<< endl ;
|
||||
}
|
||||
cout << "Search found "
|
||||
<< values.size()
|
||||
<< " match"
|
||||
<< ((values.size() != 1) ? "es" : "")
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
void handleErase( const StringTokenizer& st )
|
||||
{
|
||||
if( st.size() != 2 )
|
||||
{
|
||||
cout << "Error: Erase requires exactly 1 argument"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
MTrie< string >::size_type eraseCount = hostTrie.erase( st[ 1 ] ) ;
|
||||
clog << "Erased "
|
||||
<< eraseCount
|
||||
<< " element(s)"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
void handleLevelDebug( const StringTokenizer& st )
|
||||
{
|
||||
if( st.size() != 2 )
|
||||
{
|
||||
cout << "Error: leveldebug requires exactly 1 argument"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
size_t searchLevel = static_cast< size_t >( atoi( st[ 1 ].c_str() ) ) ;
|
||||
|
||||
hostTrie.levelDebug( clog, searchLevel ) ;
|
||||
}
|
||||
|
||||
void handleMinLength( const StringTokenizer& st )
|
||||
{
|
||||
if( st.size() != 2 )
|
||||
{
|
||||
cout << "Error: maxlength requires exactly 1 argument"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
size_t minLength = static_cast< size_t >( atoi( st[ 1 ].c_str() ) ) ;
|
||||
|
||||
list< string > maxLengthStrings = hostTrie.findMinLength( minLength ) ;
|
||||
if( !maxLengthStrings.empty() )
|
||||
{
|
||||
clog << "Found "
|
||||
<< maxLengthStrings.size()
|
||||
<< " hostnames with at least "
|
||||
<< minLength
|
||||
<< " tokens."
|
||||
<< endl
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
for( list< string >::const_iterator itr = maxLengthStrings.begin() ;
|
||||
itr != maxLengthStrings.end() ; ++itr )
|
||||
{
|
||||
StringTokenizer tokens( *itr, '.' ) ;
|
||||
clog << "Length: "
|
||||
<< tokens.size()
|
||||
<< ", key: "
|
||||
<< *itr
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
silant02.silanes.com.mx
|
||||
news.abs.n?t
|
||||
does.not.ex?st.net
|
||||
auksjonerer.ut.sin.pc.paa.trondheim?auksjon.com
|
||||
hurry.?p-and.servebeer.com
|
||||
dat?.adsl.tuxje.net
|
||||
*adsl*.net
|
||||
w*.z?*ca.dsl.cnc.net
|
||||
nikita.*.student.khleuven.be
|
||||
ppp*dsl*.pt.lu
|
||||
@@ -0,0 +1,673 @@
|
||||
209.164.4.114
|
||||
213.164.238.50
|
||||
212.125.143.202
|
||||
213.233.104.92
|
||||
81.196.247.244
|
||||
81.196.91.214
|
||||
213.157.177.123
|
||||
130.67.244.81
|
||||
213.164.238.21
|
||||
193.231.14.226
|
||||
80.97.105.18
|
||||
217.156.40.153
|
||||
80.33.168.55
|
||||
213.233.109.152
|
||||
s01.speed.cugir.ro
|
||||
194.105.3.6
|
||||
80.97.68.36
|
||||
203.92.101.230
|
||||
202.98.7.100
|
||||
210.215.95.18
|
||||
61.215.87.196
|
||||
65.104.164.35
|
||||
217.98.42.39
|
||||
203.69.226.157
|
||||
65.16.94.36
|
||||
216.104.64.152
|
||||
68.12.216.117
|
||||
203.82.35.34
|
||||
66.88.126.230
|
||||
219.63.206.41
|
||||
206.20.14.31
|
||||
216.69.192.203
|
||||
130.39.215.135
|
||||
206.191.92.3
|
||||
219.166.9.10
|
||||
194.65.95.195
|
||||
210.86.28.40
|
||||
212.25.160.245
|
||||
63.195.147.147
|
||||
216.99.213.80
|
||||
212.116.232.4
|
||||
61.97.136.162
|
||||
208.186.134.182
|
||||
65.19.215.95
|
||||
66.70.15.179
|
||||
200.196.12.191
|
||||
203.255.14.118
|
||||
203.126.180.18
|
||||
203.252.144.191
|
||||
203.127.118.29
|
||||
210.186.110.5
|
||||
216.126.204.23
|
||||
203.121.0.8
|
||||
68.32.59.83
|
||||
3eea1a56.cable.wanadoo.nl
|
||||
3eea14ce.cable.wanadoo.nl
|
||||
3eea1a40.cable.wanadoo.nl
|
||||
216.30.205.27
|
||||
216.30.205.2
|
||||
195.39.188.155
|
||||
203.121.0.15
|
||||
203.160.184.172
|
||||
213.42.2.6
|
||||
62.231.95.86
|
||||
200.50.216.20
|
||||
OO7.us
|
||||
212.98.142.143
|
||||
210.169.203.102
|
||||
80.190.48.42
|
||||
66.9.13.174
|
||||
209.129.49.11
|
||||
24.73.230.149
|
||||
148.233.208.218
|
||||
202.30.44.35
|
||||
202.54.1.235
|
||||
64.62.166.158
|
||||
195.80.165.108
|
||||
212.67.202.21
|
||||
24.122.27.111
|
||||
210.196.66.90
|
||||
200.76.163.197
|
||||
64.21.202.30
|
||||
148.233.221.124
|
||||
198.209.29.86
|
||||
217.160.92.210
|
||||
128.134.11.1
|
||||
216.27.152.227
|
||||
200.32.119.116
|
||||
168.188.61.62
|
||||
132.254.218.219
|
||||
203.235.62.131
|
||||
202.208.16.93
|
||||
213.84.20.84
|
||||
161.116.23.180
|
||||
62.95.16.194
|
||||
216.167.110.235
|
||||
203.252.237.220
|
||||
203.87.150.179
|
||||
203.252.5.65
|
||||
128.6.19.84
|
||||
141.223.163.6
|
||||
212.24.140.38
|
||||
203.250.133.86
|
||||
210.52.154.113
|
||||
210.51.9.254
|
||||
12.15.58.10
|
||||
203.249.126.5
|
||||
203.253.12.140
|
||||
132.248.54.31
|
||||
210.158.192.98
|
||||
200.65.39.156
|
||||
216.27.152.*
|
||||
200.163.71.100
|
||||
202.1.201.227
|
||||
203.121.0.11
|
||||
213.150.189.42
|
||||
200.72.130.66
|
||||
192.187.16.164
|
||||
202.100.90.206
|
||||
192.187.16.162
|
||||
24.136.104.219
|
||||
217.46.204.121
|
||||
202.53.236.22
|
||||
67.64.37.253
|
||||
217.127.87.122
|
||||
195.248.33.181
|
||||
211.20.131.241
|
||||
195.2.100.130
|
||||
210.12.54.12
|
||||
12.231.63.199
|
||||
81.2.134.*
|
||||
212.168.18.*
|
||||
213.4.130.205
|
||||
66.227.110.*
|
||||
66.227.108.*
|
||||
66.227.111.15*
|
||||
81.198.76.34
|
||||
61.179.116.190
|
||||
194.27.49.3
|
||||
195.94.0.30
|
||||
140.112.20.*
|
||||
130.88.203.37
|
||||
200.63.217.146
|
||||
62.81.236.243
|
||||
210.0.186.90
|
||||
155.69.5.123
|
||||
202.162.193.114
|
||||
163.28.145.3
|
||||
193.90.130.221
|
||||
81.27.33.51
|
||||
193.216.233.140
|
||||
62.97.174.165
|
||||
193.90.130.182
|
||||
193.90.130.15
|
||||
193.90.130.167
|
||||
193.90.130.22
|
||||
193.90.130.87
|
||||
81.29.36.60
|
||||
80.212.242.123
|
||||
193.90.130.28
|
||||
80.212.243.236
|
||||
193.90.130.186
|
||||
80.212.84.232
|
||||
80.212.84.161
|
||||
193.201.221.69
|
||||
193.90.130.46
|
||||
80.212.69.42
|
||||
193.90.130.67
|
||||
193.90.130.25
|
||||
193.90.130.24
|
||||
80.212.13.105
|
||||
80.212.241.60
|
||||
202.1.201.238
|
||||
66.168.253.142
|
||||
64.115.112.3
|
||||
212.138.64.175
|
||||
205.179.80.*
|
||||
217.156.73.*
|
||||
24.199.19.93
|
||||
63.198.160.196
|
||||
62.138.51.130
|
||||
195.94.0.40
|
||||
205.240.11.90
|
||||
196.23.191.173
|
||||
81.12.247.132
|
||||
217.14.99.131
|
||||
218.104.201.*
|
||||
218.104.60.*
|
||||
218.104.73.*
|
||||
218.104.191.*
|
||||
218.104.76.*
|
||||
218.104.134.*
|
||||
218.104.135.*
|
||||
218.104.42.*
|
||||
218.104.40.*
|
||||
218.104.151.*
|
||||
218.104.203.*
|
||||
218.104.202.*
|
||||
218.104.36.*
|
||||
218.106.112.*
|
||||
218.106.17.*
|
||||
218.106.50.*
|
||||
218.106.96.*
|
||||
218.106.24.*
|
||||
218.106.23.*
|
||||
218.106.22.*
|
||||
218.106.186.*
|
||||
218.106.181.*
|
||||
218.106.182.*
|
||||
211.20.131.242
|
||||
210.69.138.109
|
||||
208.192.153.64
|
||||
63.144.122.*
|
||||
61.222.160.182
|
||||
200.161.16.132
|
||||
202.1.201.232
|
||||
211.213.136.102
|
||||
211.201.127.131
|
||||
219.153.198.20
|
||||
218.165.84.177
|
||||
211.41.136.29
|
||||
211.177.163.40
|
||||
61.187.183.42
|
||||
211.177.154.133
|
||||
211.33.94.125
|
||||
61.74.172.249
|
||||
211.192.107.131
|
||||
218.169.52.58
|
||||
218.68.245.252
|
||||
211.89.2.132
|
||||
211.236.206.194
|
||||
219.248.59.60
|
||||
218.152.61.233
|
||||
211.228.44.201
|
||||
61.48.96.234
|
||||
219.137.19.111
|
||||
218.69.122.181
|
||||
63.198.216.117
|
||||
219.106.97.131
|
||||
219.251.126.46
|
||||
218.165.150.190
|
||||
211.44.25.217
|
||||
218.63.233.122
|
||||
61.48.32.178
|
||||
218.63.238.2
|
||||
211.177.225.155
|
||||
211.134.80.13
|
||||
211.202.225.105
|
||||
61.170.197.205
|
||||
211.212.28.72
|
||||
211.113.142.21
|
||||
211.212.192.243
|
||||
211.225.241.190
|
||||
61.178.195.43
|
||||
219.112.45.90
|
||||
219.248.94.34
|
||||
67.68.200.91
|
||||
219.154.203.239
|
||||
211.249.109.107
|
||||
12.88.195.159
|
||||
211.147.245.212
|
||||
218.68.212.212
|
||||
218.90.227.20
|
||||
219.232.183.1
|
||||
61.200.203.178
|
||||
219.130.1.42
|
||||
218.253.49.239
|
||||
211.74.74.129
|
||||
211.215.146.124
|
||||
133.205.218.228
|
||||
219.251.96.113
|
||||
211.179.20.144
|
||||
67.2.146.53
|
||||
211.219.16.232
|
||||
218.233.249.55
|
||||
219.155.68.91
|
||||
218.87.142.39
|
||||
211.41.204.162
|
||||
211.111.50.218
|
||||
61.177.162.19
|
||||
218.87.155.89
|
||||
219.241.9.113
|
||||
218.148.54.54
|
||||
219.164.54.175
|
||||
61.83.216.171
|
||||
64.231.247.179
|
||||
212.60.54.87
|
||||
218.237.247.181
|
||||
219.251.118.239
|
||||
202.105.72.69
|
||||
219.91.54.144
|
||||
61.202.18.140
|
||||
211.117.78.37
|
||||
219.129.10.128
|
||||
218.24.43.64
|
||||
61.183.82.126
|
||||
219.154.51.214
|
||||
218.49.89.3
|
||||
211.243.164.227
|
||||
61.177.230.129
|
||||
61.231.117.175
|
||||
219.65.81.52
|
||||
210.91.89.225
|
||||
61.191.115.105
|
||||
211.238.229.234
|
||||
61.140.162.9
|
||||
211.215.244.218
|
||||
218.233.163.23
|
||||
211.204.0.212
|
||||
211.193.215.60
|
||||
61.202.114.216
|
||||
211.211.14.205
|
||||
211.200.143.131
|
||||
211.161.77.156
|
||||
211.214.123.158
|
||||
218.71.14.15
|
||||
219.155.0.21
|
||||
218.224.143.43
|
||||
211.117.48.209
|
||||
218.65.109.163
|
||||
211.244.180.209
|
||||
211.148.215.162
|
||||
218.163.87.188
|
||||
211.179.131.211
|
||||
211.211.14.239
|
||||
211.214.223.115
|
||||
211.204.214.239
|
||||
211.117.35.41
|
||||
211.107.229.232
|
||||
203.73.221.216
|
||||
211.154.64.227
|
||||
61.130.172.34
|
||||
218.73.60.14
|
||||
219.155.3.124
|
||||
218.80.45.43
|
||||
61.48.32.198
|
||||
220.162.*
|
||||
220.161.*
|
||||
220.160.*
|
||||
220.191.*
|
||||
220.190.*
|
||||
220.189.*
|
||||
220.188.*
|
||||
220.187.*
|
||||
220.186.*
|
||||
220.185.*
|
||||
220.184.*
|
||||
220.165.*
|
||||
220.164.*
|
||||
220.163.*
|
||||
220.71.*
|
||||
220.70*
|
||||
220.69.*
|
||||
220.68.*
|
||||
220.67.*
|
||||
220.66.*
|
||||
220.65.*
|
||||
220.64.*
|
||||
220.95.*
|
||||
220.94.*
|
||||
220.93.*
|
||||
220.92.*
|
||||
220.91.*
|
||||
220.90.*
|
||||
220.89.*
|
||||
220.88.*
|
||||
220.87.*
|
||||
220.86.*
|
||||
220.85.*
|
||||
220.84.*
|
||||
220.83.*
|
||||
220.82.*
|
||||
220.81.*
|
||||
220.80.*
|
||||
220.79.*
|
||||
220.78.*
|
||||
220.77.*
|
||||
220.76.*
|
||||
220.75.*
|
||||
220.74.*
|
||||
220.73.*
|
||||
220.72.*
|
||||
220.116.*
|
||||
220.117.*
|
||||
220.118.*
|
||||
220.119.*
|
||||
220.120.*
|
||||
220.121.*
|
||||
220.122.*
|
||||
220.123.*
|
||||
220.124.*
|
||||
220.125.*
|
||||
220.126.*
|
||||
220.127.*
|
||||
218.29.*
|
||||
218.27.*
|
||||
218.2.*
|
||||
218.19.*
|
||||
218.23.*
|
||||
218.22.*
|
||||
218.18.*
|
||||
218.17.*
|
||||
218.16.*
|
||||
218.15.*
|
||||
218.14.*
|
||||
218.13.*
|
||||
218.12.*
|
||||
218.11.*
|
||||
218.10.*
|
||||
218.9.*
|
||||
218.8.*
|
||||
218.7.*
|
||||
*sasajima.aichi.ocn.ne.jp
|
||||
210.183.*
|
||||
210.182.*
|
||||
210.180.*
|
||||
210.178.*
|
||||
210.179.*
|
||||
218.154.*
|
||||
219.249.*
|
||||
61.75.*
|
||||
143.248.*
|
||||
218.4.*
|
||||
218.3.*
|
||||
218.5.*
|
||||
218.6.*
|
||||
218.1.*
|
||||
218.0.*
|
||||
81.51.222.238
|
||||
168.226.107.75
|
||||
200.63.162.15
|
||||
213.122.38.222
|
||||
200.138.8.97
|
||||
62.225.35.26
|
||||
212.98.150.51
|
||||
212.71.167.13
|
||||
210.55.127.16
|
||||
65.94.27.109
|
||||
217.132.165.169
|
||||
80.14.175.134
|
||||
202.211.195.123
|
||||
216.221.113.139
|
||||
65.95.66.114
|
||||
65.94.248.25
|
||||
202.68.143.122
|
||||
200.47.81.33
|
||||
81.68.129.234
|
||||
67.69.208.36
|
||||
202.100.66.141
|
||||
66.49.60.82
|
||||
194.213.40.230
|
||||
67.69.155.88
|
||||
207.50.195.162
|
||||
200.158.20.22
|
||||
64.229.43.13
|
||||
80.33.168.55
|
||||
168.226.177.58
|
||||
211.24.141.35
|
||||
67.41.128.105
|
||||
200.71.39.10
|
||||
65.93.16.105
|
||||
64.228.35.144
|
||||
12.2.40.211
|
||||
212.98.150.51
|
||||
212.110.68.87
|
||||
148.233.47.243
|
||||
4.72.72.176
|
||||
80.11.61.251
|
||||
65.95.225.20
|
||||
200.67.234.29
|
||||
24.126.69.229
|
||||
12.225.16.155
|
||||
219.78.0.36
|
||||
80.181.35.58
|
||||
202.108.243.19
|
||||
219.78.0.36
|
||||
213.164.224.61
|
||||
80.11.99.115
|
||||
61.207.174.91
|
||||
80.116.240.68
|
||||
195.250.76.34
|
||||
80.212.119.37
|
||||
172.184.29.66
|
||||
80.35.74.176
|
||||
62.153.208.218
|
||||
195.95.30.140
|
||||
212.120.105.173
|
||||
65.92.96.84
|
||||
64.187.8.149
|
||||
64.233.218.157
|
||||
64.76.56.52
|
||||
24.97.179.162
|
||||
203.113.144.154
|
||||
203.198.164.197
|
||||
194.208.13.3
|
||||
62.128.183.25
|
||||
203.111.194.11
|
||||
62.179.50.56
|
||||
200.78.33.169
|
||||
63.202.232.248
|
||||
62.251.226.68
|
||||
65.80.118.189
|
||||
193.231.14.226
|
||||
64.228.71.152
|
||||
213.164.238.21
|
||||
61.193.45.106
|
||||
80.116.79.63
|
||||
65.92.105.168
|
||||
67.68.0.136
|
||||
64.229.40.229
|
||||
80.97.234.13
|
||||
65.64.155.107
|
||||
62.162.71.71
|
||||
204.32.206.108
|
||||
212.223.44.54
|
||||
80.32.239.22
|
||||
168.226.178.90
|
||||
64.210.5.2
|
||||
200.78.88.225
|
||||
148.223.78.229
|
||||
65.92.132.71
|
||||
200.21.248.131
|
||||
200.30.71.174
|
||||
203.162.56.195
|
||||
200.161.203.135
|
||||
65.94.97.201
|
||||
219.92.222.2
|
||||
80.180.171.189
|
||||
216.222.18.155
|
||||
217.187.102.74
|
||||
216.244.218.63
|
||||
204.186.217.33
|
||||
200.207.158.237
|
||||
65.94.218.4
|
||||
12.221.240.95
|
||||
64.231.158.106
|
||||
200.207.92.4
|
||||
200.207.92.4
|
||||
200.168.105.27
|
||||
168.226.178.126
|
||||
213.154.117.70
|
||||
207.139.1.21
|
||||
213.154.117.71
|
||||
168.226.107.169
|
||||
65.94.218.41
|
||||
216.222.18.155
|
||||
80.198.53.120
|
||||
212.83.140.221
|
||||
217.187.102.74
|
||||
62.72.66.202
|
||||
217.126.138.138
|
||||
195.95.30.141
|
||||
202.133.64.135
|
||||
38.118.143.44
|
||||
80.179.186.85
|
||||
202.64.205.130
|
||||
67.66.62.206
|
||||
193.225.217.254
|
||||
66.54.228.79
|
||||
202.100.66.141
|
||||
200.171.119.84
|
||||
65.93.148.104
|
||||
194.102.250.78
|
||||
65.95.63.40
|
||||
195.95.30.140
|
||||
67.68.161.67
|
||||
61.194.207.238
|
||||
194.126.16.175
|
||||
65.93.99.244
|
||||
148.233.47.243
|
||||
216.244.218.63
|
||||
64.229.179.141
|
||||
200.95.110.210
|
||||
193.95.77.76
|
||||
80.180.87.30
|
||||
81.196.247.244
|
||||
207.172.46.45
|
||||
65.92.132.71
|
||||
80.33.67.142
|
||||
80.137.8.48
|
||||
61.53.30.241
|
||||
65.95.64.197
|
||||
81.196.91.214
|
||||
156.99.62.238
|
||||
213.164.238.50
|
||||
217.172.76.230
|
||||
207.79.221.201
|
||||
195.132.44.119
|
||||
217.40.30.130
|
||||
202.105.219.194
|
||||
81.66.4.215
|
||||
200.161.203.135
|
||||
65.95.216.22
|
||||
65.95.216.136
|
||||
200.48.228.109
|
||||
80.181.123.241
|
||||
67.68.222.148
|
||||
213.122.38.222
|
||||
65.94.168.210
|
||||
141.153.232.75
|
||||
24.206.23.120
|
||||
80.116.41.220
|
||||
66.49.60.82
|
||||
216.221.113.139
|
||||
212.198.128.142
|
||||
200.51.216.185
|
||||
200.47.81.33
|
||||
81.68.129.234
|
||||
64.229.48.166
|
||||
217.132.52.92
|
||||
67.68.84.247
|
||||
62.136.92.199
|
||||
202.100.66.141
|
||||
81.5.166.220
|
||||
62.128.180.194
|
||||
66.49.60.82
|
||||
207.50.195.162
|
||||
193.95.16.34
|
||||
217.154.220.28
|
||||
200.40.181.14
|
||||
211.24.141.35
|
||||
166.114.56.229
|
||||
200.158.36.123
|
||||
200.171.119.163
|
||||
200.158.18.100
|
||||
202.69.34.23
|
||||
64.228.35.144
|
||||
193.231.180.253
|
||||
194.213.40.230
|
||||
67.41.128.105
|
||||
80.11.61.251
|
||||
65.95.49.11
|
||||
195.94.1.122
|
||||
200.67.234.29
|
||||
200.141.90.31
|
||||
24.74.19.207
|
||||
62.225.35.26
|
||||
202.152.232.206
|
||||
219.78.0.36
|
||||
65.94.113.53
|
||||
65.94.216.127
|
||||
64.110.97.242
|
||||
193.95.126.178
|
||||
65.93.189.206
|
||||
217.69.252.136
|
||||
200.168.112.20
|
||||
202.86.192.186
|
||||
24.43.73.215
|
||||
193.225.235.5
|
||||
200.60.217.142
|
||||
65.94.25.254
|
||||
80.116.240.68
|
||||
212.216.22.67
|
||||
195.250.76.34
|
||||
202.68.143.122
|
||||
202.211.195.123
|
||||
210.75.98.35
|
||||
210.55.127.16
|
||||
62.153.208.218
|
||||
211.179.149.146
|
||||
200.71.39.10
|
||||
212.120.105.173
|
||||
65.94.133.96
|
||||
195.95.30.140
|
||||
200.158.190.58
|
||||
213.122.95.28
|
||||
203.113.144.154
|
||||
67.68.167.20
|
||||
200.83.193.252
|
||||
64.233.218.157
|
||||
202.129.12.8
|
||||
200.87.52.178
|
||||
200.85.75.91
|
||||
@@ -0,0 +1,343 @@
|
||||
/**
|
||||
* mtrie_load.cc
|
||||
*
|
||||
* $Id: mtrie_load.cc,v 1.5 2005/01/12 03:50:38 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include <ctime>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include "misc.h"
|
||||
#include "MTrie.h"
|
||||
#include "match.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
MTrie< string >* hostTrie = 0 ;
|
||||
|
||||
typedef multimap< string, string, noCaseCompare > hostMapType ;
|
||||
hostMapType* hostMap = 0 ;
|
||||
|
||||
list< pair< string, string > > mm_find( const string& ) ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< " -f <socket log file> [options]"
|
||||
<< endl ;
|
||||
cout << endl
|
||||
<< "Options: "
|
||||
<< endl
|
||||
<< "-q\tRun quietly"
|
||||
<< endl
|
||||
<< "-n\t<numIterations> Run a given number of "
|
||||
<< "iterations of each host [1]"
|
||||
<< endl
|
||||
<< "-m\t<input match file> File of wildcard strings to lookup"
|
||||
<< endl
|
||||
<< "-t\tUse the matching trie [default is multimap]"
|
||||
<< endl
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( argc < 2 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
bool verbose = true ;
|
||||
bool useTrie = false ;
|
||||
size_t numIterations = 1 ;
|
||||
string socketFileName ;
|
||||
string matchFileName ;
|
||||
vector< string > matchStrings ;
|
||||
|
||||
int c = 0 ;
|
||||
while( (c = getopt( argc, argv, "qn:f:m:t" )) != EOF )
|
||||
{
|
||||
switch( c )
|
||||
{
|
||||
case 'q':
|
||||
verbose = false ;
|
||||
break ;
|
||||
case 'f':
|
||||
socketFileName = optarg ;
|
||||
break ;
|
||||
case 'm':
|
||||
matchFileName = optarg ;
|
||||
break ;
|
||||
case 'n':
|
||||
numIterations = static_cast< size_t >(
|
||||
atoi( optarg ) ) ;
|
||||
break ;
|
||||
case 't':
|
||||
useTrie = true ;
|
||||
break ;
|
||||
default:
|
||||
cout << "Unknown option: "
|
||||
<< c
|
||||
<< endl ;
|
||||
return -1 ;
|
||||
} // switch()
|
||||
} // while()
|
||||
|
||||
if( socketFileName.empty() )
|
||||
{
|
||||
cout << "Error: You must specify a socket file"
|
||||
<< endl ;
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
if( matchFileName.empty() )
|
||||
{
|
||||
cout << "Error: You must specify a match strings file"
|
||||
<< endl ;
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ifstream socketFile( socketFileName.c_str() ) ;
|
||||
if( !socketFile )
|
||||
{
|
||||
cout << "Unable to open socket file: "
|
||||
<< socketFileName
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ifstream matchFile( matchFileName.c_str() ) ;
|
||||
if( !matchFile )
|
||||
{
|
||||
cout << "Unable to open match file: "
|
||||
<< matchFileName
|
||||
<< endl ;
|
||||
socketFile.close() ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
if( useTrie )
|
||||
{
|
||||
hostTrie = new MTrie< string > ;
|
||||
}
|
||||
else
|
||||
{
|
||||
hostMap = new hostMapType ;
|
||||
}
|
||||
|
||||
cout << endl
|
||||
<< "Socket file: "
|
||||
<< socketFileName << endl
|
||||
<< "Match file: "
|
||||
<< matchFileName << endl
|
||||
<< "Number of iterations: "
|
||||
<< numIterations << endl
|
||||
<< "Verbose: "
|
||||
<< (verbose ? "true" : "false")
|
||||
<< endl
|
||||
<< "Using test mode: "
|
||||
<< (useTrie ? "matching trie" : "multimap")
|
||||
<< endl ;
|
||||
|
||||
cout << endl
|
||||
<< "Reading match file "
|
||||
<< matchFileName
|
||||
<< "..." ;
|
||||
cout.flush() ;
|
||||
|
||||
size_t numFound = 0 ;
|
||||
string line ;
|
||||
|
||||
while( getline( matchFile, line ) )
|
||||
{
|
||||
if( line.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
matchStrings.push_back( line ) ;
|
||||
++numFound ;
|
||||
}
|
||||
matchFile.close() ;
|
||||
|
||||
cout << numFound
|
||||
<< " match strings"
|
||||
<< endl ;
|
||||
|
||||
cout << "Reading socket file "
|
||||
<< socketFileName
|
||||
<< "..." ;
|
||||
cout.flush() ;
|
||||
|
||||
numFound = 0 ;
|
||||
while( getline( socketFile, line ) )
|
||||
{
|
||||
if( line.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
//Ay N tealie- 2 1053874792 ~tealie 7-11.sbg.org +i BCXaYv AyADd :Tealie
|
||||
StringTokenizer spaceTokens( line ) ;
|
||||
if( spaceTokens[ 1 ] == "EB" )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
if( spaceTokens.size() < 8 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
if( spaceTokens[ 1 ] != "N" )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
StringTokenizer dotTokens( spaceTokens[ 6 ], '.' ) ;
|
||||
if( dotTokens.size() < 2 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
// Got one
|
||||
if( useTrie )
|
||||
{
|
||||
hostTrie->insert( spaceTokens[ 6 ], spaceTokens[ 6 ] ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
hostMap->insert( make_pair( spaceTokens[ 6 ],
|
||||
spaceTokens[ 6 ] ) ) ;
|
||||
}
|
||||
++numFound ;
|
||||
|
||||
} // while( getline() )
|
||||
socketFile.close() ;
|
||||
|
||||
cout << numFound
|
||||
<< " hosts"
|
||||
<< endl ;
|
||||
|
||||
clock_t startTime = 0 ;
|
||||
clock_t stopTime = 0 ;
|
||||
clock_t totalTime = 0 ;
|
||||
|
||||
cout.flush() ;
|
||||
for( vector< string >::const_iterator vItr = matchStrings.begin() ;
|
||||
vItr != matchStrings.end() ; ++vItr )
|
||||
{
|
||||
string findMe( *vItr ) ;
|
||||
|
||||
if( verbose )
|
||||
{
|
||||
cout << endl
|
||||
<< "Match string: "
|
||||
<< findMe
|
||||
<< endl ;
|
||||
cout.flush() ;
|
||||
}
|
||||
|
||||
if( useTrie )
|
||||
{
|
||||
startTime = clock() ;
|
||||
for( size_t i = 0 ; i < numIterations ; ++i )
|
||||
{
|
||||
hostTrie->find( findMe ) ;
|
||||
} // for( i )
|
||||
stopTime = clock() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTime = clock() ;
|
||||
for( size_t i = 0 ; i < numIterations ; ++i )
|
||||
{
|
||||
mm_find( findMe ) ;
|
||||
} // for( i )
|
||||
stopTime = clock() ;
|
||||
}
|
||||
totalTime += (stopTime - startTime ) ;
|
||||
|
||||
if( verbose )
|
||||
{
|
||||
cout << "Time: "
|
||||
<< (stopTime - startTime)
|
||||
<< " clocks, "
|
||||
<< ((stopTime - startTime) / CLOCKS_PER_SEC)
|
||||
<< " seconds"
|
||||
<< endl ;
|
||||
cout.flush() ;
|
||||
}
|
||||
} // for( vItr )
|
||||
|
||||
cout << endl
|
||||
<< "Performed "
|
||||
<< numIterations
|
||||
<< " iterations"
|
||||
<< endl
|
||||
<< "Total time: "
|
||||
<< totalTime
|
||||
<< " clocks, "
|
||||
<< (totalTime / CLOCKS_PER_SEC)
|
||||
<< " seconds"
|
||||
<< endl
|
||||
<< endl ;
|
||||
|
||||
// delete of NULL is ok, so no worries here
|
||||
delete hostTrie ; hostTrie = 0 ;
|
||||
delete hostMap ; hostMap = 0 ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
list< pair< string, string > > mm_find( const string& findMe )
|
||||
{
|
||||
list< pair< string, string > > returnMe ;
|
||||
|
||||
// Must perform a linear search for
|
||||
// this structure if either '?' or '*'
|
||||
// is present.
|
||||
if( findMe.find( '?' ) != string::npos ||
|
||||
findMe.find( '*' ) != string::npos )
|
||||
{
|
||||
for( hostMapType::const_iterator hmItr =
|
||||
hostMap->begin() ;
|
||||
hmItr != hostMap->end() ;
|
||||
++hmItr )
|
||||
{
|
||||
if( !match( findMe, hmItr->first ) )
|
||||
{
|
||||
returnMe.push_back( make_pair(
|
||||
hmItr->first, hmItr->second ) ) ;
|
||||
}
|
||||
} // for( hmItr )
|
||||
} // if( '?' || '*' )
|
||||
else
|
||||
{
|
||||
hostMapType::const_iterator hmItr = hostMap->find( findMe ) ;
|
||||
for( ; (hmItr != hostMap->end()) && (hmItr->first == findMe) ;
|
||||
++hmItr )
|
||||
{
|
||||
returnMe.push_back( make_pair(
|
||||
hmItr->first, hmItr->second ) ) ;
|
||||
}
|
||||
} // else()
|
||||
|
||||
return returnMe ;
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* mtrie_perf.cc
|
||||
*
|
||||
* $Id: mtrie_perf.cc,v 1.3 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include "MTrie.h"
|
||||
#include "ELog.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
MTrie< string > hostTrie ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< " <socket log file>"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ifstream inFile( argv[ 1 ] ) ;
|
||||
if( !inFile )
|
||||
{
|
||||
cout << "Unable to open file: "
|
||||
<< argv[ 1 ]
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
string outputFileName( "mtrie_perf_" ) ;
|
||||
StringTokenizer fileTokens( argv[ 1 ], '/' ) ;
|
||||
outputFileName += fileTokens[ fileTokens.size() - 1 ] ;
|
||||
|
||||
ofstream outFile( outputFileName.c_str() ) ;
|
||||
if( !outFile )
|
||||
{
|
||||
cout << "Unable to open output file: "
|
||||
<< outputFileName
|
||||
<< endl ;
|
||||
inFile.close() ;
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
clog << endl
|
||||
<< "Reading "
|
||||
<< argv[ 1 ]
|
||||
<< "..." ;
|
||||
|
||||
string line ;
|
||||
size_t numFound = 0 ;
|
||||
while( getline( inFile, line ) )
|
||||
{
|
||||
if( line.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
//Ay N tealie- 2 1053874792 ~tealie 7-11.sbg.org +i BCXaYv AyADd :Tealie
|
||||
StringTokenizer spaceTokens( line ) ;
|
||||
if( spaceTokens[ 1 ] == "EB" )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
if( spaceTokens.size() < 8 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
if( spaceTokens[ 1 ] != "N" )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
StringTokenizer dotTokens( spaceTokens[ 6 ], '.' ) ;
|
||||
if( dotTokens.size() < 2 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
// Got one
|
||||
hostTrie.insert( spaceTokens[ 6 ], spaceTokens[ 6 ] ) ;
|
||||
++numFound ;
|
||||
|
||||
} // while( getline() )
|
||||
inFile.close() ;
|
||||
|
||||
clog << endl
|
||||
<< "Read "
|
||||
<< numFound
|
||||
<< " hosts"
|
||||
<< endl
|
||||
<< endl ;
|
||||
|
||||
clog << "Writing debug information to "
|
||||
<< outputFileName
|
||||
<< "..." ;
|
||||
clog.flush() ;
|
||||
|
||||
hostTrie.dumpDebug( outFile ) ;
|
||||
clog << "done"
|
||||
<< endl ;
|
||||
|
||||
outFile.close() ;
|
||||
return 0 ;
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* mtrie_perf_summary.cc
|
||||
*
|
||||
* $Id: mtrie_perf_summary.cc,v 1.4 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#include "ELog.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< " <mtrie performance file>"
|
||||
<< endl ;
|
||||
cout << "This program accepts any number of performance files "
|
||||
<< "as input"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( argc < 2 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
size_t numFiles = static_cast< size_t >( argc - 1 ) ;
|
||||
|
||||
size_t totalNodes = 0 ;
|
||||
size_t totalValues = 0 ;
|
||||
size_t totalSubtrees = 0 ;
|
||||
|
||||
size_t maxLevel = 0 ;
|
||||
size_t maxNumSubtrees = 0 ;
|
||||
size_t maxNumValues = 0 ;
|
||||
|
||||
// strip off ".log"
|
||||
StringTokenizer fileTokens( argv[ 1 ], '.' ) ;
|
||||
string fileNameBase( fileTokens[ 0 ] ) ;
|
||||
|
||||
if( argc > 2 )
|
||||
{
|
||||
fileNameBase = "mtrie_perf_summary" ;
|
||||
}
|
||||
|
||||
string levelFileName( fileNameBase + "_level.dat" ) ;
|
||||
string valueFileName( fileNameBase + "_value.dat" ) ;
|
||||
string subtreeFileName( fileNameBase + "_subtree.dat" ) ;
|
||||
|
||||
ofstream levelFile( levelFileName.c_str() ) ;
|
||||
if( !levelFile )
|
||||
{
|
||||
clog << "Unable to open output file: "
|
||||
<< levelFileName
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ofstream valueFile( valueFileName.c_str() ) ;
|
||||
if( !valueFile )
|
||||
{
|
||||
clog << "Unable to open output file: "
|
||||
<< valueFileName
|
||||
<< endl ;
|
||||
levelFile.close() ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ofstream subtreeFile( subtreeFileName.c_str() ) ;
|
||||
if( !subtreeFile )
|
||||
{
|
||||
clog << "Unable to open output file: "
|
||||
<< "mtrie_subtree.dat"
|
||||
<< endl ;
|
||||
levelFile.close() ;
|
||||
valueFile.close() ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
clog << endl
|
||||
<< "Writing level information to: "
|
||||
<< levelFileName << endl
|
||||
<< "Writing value information to: "
|
||||
<< valueFileName << endl
|
||||
<< "Writing subtree information to: "
|
||||
<< subtreeFileName
|
||||
<< endl ;
|
||||
|
||||
typedef vector< size_t > vectorType ;
|
||||
vectorType levelVec ;
|
||||
vectorType subtreeVec ;
|
||||
vectorType valueVec ;
|
||||
|
||||
for( int i = 1 ; i < argc ; ++i )
|
||||
{
|
||||
ifstream inFile( argv[ i ] ) ;
|
||||
if( !inFile )
|
||||
{
|
||||
cout << "Unable to open file: "
|
||||
<< argv[ i ]
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
clog << endl
|
||||
<< "Reading "
|
||||
<< argv[ i ]
|
||||
<< "..." ;
|
||||
|
||||
string line ;
|
||||
while( getline( inFile, line ) )
|
||||
{
|
||||
if( line.empty() )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
StringTokenizer st( line ) ;
|
||||
if( st.size() != 3 )
|
||||
{
|
||||
clog << "Error: Invalid number of tokens in line: "
|
||||
<< line
|
||||
<< endl ;
|
||||
inFile.close() ;
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
size_t theLevel =
|
||||
static_cast< size_t >( atoi( st[ 0 ].c_str() ) ) ;
|
||||
size_t numSubtrees =
|
||||
static_cast< size_t >( atoi( st[ 1 ].c_str() ) ) ;
|
||||
size_t numValues =
|
||||
static_cast< size_t >( atoi( st[ 2 ].c_str() ) ) ;
|
||||
|
||||
levelVec.push_back( theLevel ) ;
|
||||
subtreeVec.push_back( numSubtrees ) ;
|
||||
valueVec.push_back( numValues ) ;
|
||||
|
||||
++totalNodes ;
|
||||
totalValues += numValues ;
|
||||
totalSubtrees += numSubtrees ;
|
||||
|
||||
if( numValues > maxNumValues )
|
||||
{
|
||||
maxNumValues = numValues ;
|
||||
}
|
||||
if( theLevel > maxLevel )
|
||||
{
|
||||
maxLevel = theLevel ;
|
||||
}
|
||||
if( numSubtrees > maxNumSubtrees )
|
||||
{
|
||||
maxNumSubtrees = numSubtrees ;
|
||||
}
|
||||
} // while( getline() )
|
||||
|
||||
inFile.close() ;
|
||||
} // for( i )
|
||||
|
||||
|
||||
std::copy( levelVec.begin(), levelVec.end(),
|
||||
std::ostream_iterator< size_t >( levelFile, " " ) ) ;
|
||||
std::copy( valueVec.begin(), valueVec.end(),
|
||||
std::ostream_iterator< size_t >( valueFile, " " ) ) ;
|
||||
std::copy( subtreeVec.begin(), subtreeVec.end(),
|
||||
std::ostream_iterator< size_t >( subtreeFile, " " ) ) ;
|
||||
|
||||
levelFile.close() ;
|
||||
valueFile.close() ;
|
||||
subtreeFile.close() ;
|
||||
|
||||
clog << endl
|
||||
<< endl
|
||||
<< "Information for all "
|
||||
<< numFiles
|
||||
<< " input files" << endl
|
||||
<< endl
|
||||
<< "Number of hosts: "
|
||||
<< totalValues << endl
|
||||
<< "Number of hosts per file: "
|
||||
<< (totalValues / numFiles) << endl
|
||||
<< "Number of nodes: "
|
||||
<< totalNodes << endl
|
||||
<< "Number of nodes per file: "
|
||||
<< (totalNodes / numFiles) << endl
|
||||
<< "Max level: "
|
||||
<< maxLevel << endl
|
||||
<< "Maximum number of subtrees: "
|
||||
<< maxNumSubtrees << endl
|
||||
<< "Maximum number of values: "
|
||||
<< maxNumValues << endl
|
||||
<< "Average number of values per node: "
|
||||
<< ((double) totalValues / (double) totalNodes) << endl
|
||||
<< "Average number of subtrees per node: "
|
||||
<< ((double) totalSubtrees / (double) totalNodes) << endl
|
||||
<< endl ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
/**
|
||||
* signal.cc
|
||||
* Author: Daniel Karrels dan@karrels.com
|
||||
* Copyright (C) 2003 Daniel Karrels <dan@karrels.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: signal.cc,v 1.5 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
#include "Signal.h"
|
||||
#include "ELog.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
struct sigInfo
|
||||
{
|
||||
int signalID ;
|
||||
} ;
|
||||
|
||||
static const sigInfo sigArray[] =
|
||||
{
|
||||
#ifdef SIGINT
|
||||
{ SIGINT },
|
||||
#endif
|
||||
#ifdef SIGHUP
|
||||
{ SIGHUP },
|
||||
#endif
|
||||
#ifdef SIGPIPE
|
||||
{ SIGPIPE },
|
||||
#endif
|
||||
#ifdef SIGTERM
|
||||
{ SIGTERM },
|
||||
#endif
|
||||
#ifdef SIGPOLL
|
||||
{ SIGPOLL },
|
||||
#endif
|
||||
#ifdef SIGUSR1
|
||||
{ SIGUSR1 },
|
||||
#endif
|
||||
#ifdef SIGUSR2
|
||||
{ SIGUSR2 },
|
||||
#endif
|
||||
{ -31337 }
|
||||
} ;
|
||||
|
||||
// Includes the -31337 element
|
||||
size_t signalCount ;
|
||||
|
||||
void handleChild() ;
|
||||
void handleParent( pid_t childPID, int numSignals ) ;
|
||||
void setupSignals() ;
|
||||
int randomSignal() ;
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< argv[ 0 ]
|
||||
<< " <num signals>"
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
elog.setStream( &std::clog ) ;
|
||||
|
||||
::srand( ::time( 0 ) ) ;
|
||||
setupSignals() ;
|
||||
|
||||
cout << "Parent PID: "
|
||||
<< getpid()
|
||||
<< endl ;
|
||||
|
||||
int numSignals = ::atoi( argv[ 1 ] ) ;
|
||||
|
||||
// Fork a child
|
||||
pid_t thePID = fork() ;
|
||||
if( 0 == thePID )
|
||||
{
|
||||
clog << "Child PID: "
|
||||
<< getpid()
|
||||
<< endl ;
|
||||
|
||||
handleChild() ;
|
||||
|
||||
clog << "Child exiting..."
|
||||
<< endl ;
|
||||
|
||||
::exit( 0 ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Parent
|
||||
sleep( 2 ) ;
|
||||
|
||||
handleParent( thePID, numSignals ) ;
|
||||
|
||||
clog << "Parent exiting..."
|
||||
<< endl ;
|
||||
|
||||
::exit( 0 ) ;
|
||||
}
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void handleChild()
|
||||
{
|
||||
// Instantiate the singleton, which will configure itself to
|
||||
// catch all signals
|
||||
Signal::getInstance() ;
|
||||
|
||||
size_t totalSignalsCaught = 0 ;
|
||||
while( true )
|
||||
{
|
||||
::sleep( 1 ) ;
|
||||
|
||||
int theSignal = -1 ;
|
||||
while( Signal::getSignal( theSignal ) )
|
||||
{
|
||||
if( theSignal < 0 )
|
||||
{
|
||||
// Error
|
||||
clog << "handleChild> Error"
|
||||
<< endl ;
|
||||
continue ;
|
||||
}
|
||||
|
||||
++totalSignalsCaught ;
|
||||
clog << "Child> Got signal: "
|
||||
<< theSignal
|
||||
<< ", total signals caught: "
|
||||
<< totalSignalsCaught
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
clog << "Child> Caught "
|
||||
<< totalSignalsCaught
|
||||
<< " signals"
|
||||
<< endl ;
|
||||
|
||||
} // handleChild()
|
||||
|
||||
void handleParent( pid_t childPID, int numSignals )
|
||||
{
|
||||
size_t totalSignalsSent = 0 ;
|
||||
|
||||
for( ; totalSignalsSent < static_cast< size_t >( numSignals ) ; )
|
||||
{
|
||||
for( size_t i = 0 ; i < (signalCount - 1) ; ++i )
|
||||
{
|
||||
++totalSignalsSent ;
|
||||
clog << "Parent> Sending signal: "
|
||||
<< sigArray[ i ].signalID
|
||||
<< endl ;
|
||||
::kill( childPID, sigArray[ i ].signalID ) ;
|
||||
}
|
||||
sleep( 2 ) ;
|
||||
}
|
||||
|
||||
/*
|
||||
for( int i = 0 ; i < numSignals ; ++i )
|
||||
{
|
||||
int theSig = randomSignal() ;
|
||||
clog << "Parent> Sending signal "
|
||||
<< theSig
|
||||
<< endl ;
|
||||
|
||||
kill( childPID, theSig ) ;
|
||||
} // for( i )
|
||||
*/
|
||||
clog << "Parent> Sent "
|
||||
<< totalSignalsSent
|
||||
<< " signals"
|
||||
<< endl ;
|
||||
|
||||
sleep( 10 ) ;
|
||||
|
||||
//::kill( childPID, SIGKILL ) ;
|
||||
}
|
||||
|
||||
void setupSignals()
|
||||
{
|
||||
// Count the number of signals
|
||||
for( size_t i = 0 ; sigArray[ i ].signalID != -31337 ;
|
||||
++i, ++signalCount )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
int randomSignal()
|
||||
{
|
||||
return (sigArray[ rand() % signalCount ].signalID) ;
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
/**
|
||||
* stringtokenizer.cc
|
||||
* Copyright (C) 2002 Daniel Karrels <dan@karrels.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: stringtokenizer.cc,v 1.8 2005/01/12 03:50:38 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
#include "ELog.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
void usage( const string& ) ;
|
||||
bool getData( ifstream& inputFile, vector< string >& ) ;
|
||||
|
||||
size_t maxLines = 10000 ;
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
int c = EOF ;
|
||||
bool verbose = false ;
|
||||
size_t totalLines = 0 ;
|
||||
string inputFileName ;
|
||||
|
||||
if( argc < 3 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
while( (c = getopt( argc, argv, "f:hn:v" )) != EOF )
|
||||
{
|
||||
switch( c )
|
||||
{
|
||||
case 'f':
|
||||
inputFileName = optarg ;
|
||||
break ;
|
||||
case 'h':
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
case 'n':
|
||||
maxLines = atoi( optarg ) ;
|
||||
break ;
|
||||
case 'v':
|
||||
verbose = true ;
|
||||
break ;
|
||||
default:
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
if( maxLines < 1 )
|
||||
{
|
||||
cout << "Error: Please specify a positive number "
|
||||
<< "for maximum lines to read from file"
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ifstream inputFile( inputFileName.c_str() ) ;
|
||||
if( !inputFile )
|
||||
{
|
||||
cout << "Error opening input file: "
|
||||
<< inputFileName
|
||||
<< endl ;
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
cout << "Running in verbose mode"
|
||||
<< endl ;
|
||||
|
||||
cout << endl
|
||||
<< "Reading "
|
||||
<< maxLines
|
||||
<< " lines of text at a time from "
|
||||
<< inputFileName
|
||||
<< endl ;
|
||||
|
||||
cout << "Working" ;
|
||||
cout.flush() ;
|
||||
|
||||
// Read the entire file into memory
|
||||
vector< string > lines ;
|
||||
clock_t begin, end, totalClocks1 = 0 ;
|
||||
|
||||
while( getData( inputFile, lines ) )
|
||||
{
|
||||
for( vector< string >::const_iterator ptr = lines.begin(),
|
||||
endPtr = lines.end() ; ptr != endPtr ; ++ptr )
|
||||
{
|
||||
begin = clock() ;
|
||||
StringTokenizer st( *ptr ) ;
|
||||
end = clock() ;
|
||||
|
||||
totalClocks1 += (end - begin) ;
|
||||
|
||||
++totalLines ;
|
||||
|
||||
if( verbose )
|
||||
{
|
||||
cout << "[DATA] "
|
||||
<< *ptr
|
||||
<< endl ;
|
||||
cout << "[TOKENIZED] ("
|
||||
<< st.size()
|
||||
<< ") "
|
||||
<< st
|
||||
<< endl ;
|
||||
}
|
||||
}
|
||||
|
||||
cout << "." ;
|
||||
cout.flush() ;
|
||||
|
||||
} // while()
|
||||
|
||||
cout << "Done!"
|
||||
<< endl ;
|
||||
|
||||
cout << "Tokenized "
|
||||
<< totalLines
|
||||
<< " lines in "
|
||||
<< (totalClocks1 / CLOCKS_PER_SEC)
|
||||
<< " seconds"
|
||||
<< endl ;
|
||||
cout << endl ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< "[options]"
|
||||
<< endl ;
|
||||
cout << "Options:"
|
||||
<< endl ;
|
||||
cout << "-f <filename> (required)"
|
||||
<< endl ;
|
||||
cout << "-h Prints this menu"
|
||||
<< endl ;
|
||||
cout << "-n <number of lines> Reads <number of lines> lines of "
|
||||
<< "text from the given input "
|
||||
<< endl
|
||||
<< " file at a time. ("
|
||||
<< maxLines
|
||||
<< ")"
|
||||
<< endl ;
|
||||
cout << "-v (false) Run in verbose, be careful of this :)"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
bool getData( ifstream& inputFile, vector< string >& lines )
|
||||
{
|
||||
size_t i = 0 ;
|
||||
string line ;
|
||||
|
||||
lines.clear() ;
|
||||
|
||||
for( ; getline( inputFile, line ) && (i <= maxLines) ; ++i )
|
||||
{
|
||||
lines.push_back( line ) ;
|
||||
}
|
||||
|
||||
return (i != 0) ;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
username = dan
|
||||
nickname = _ripper_
|
||||
realname = testBot 0.1a
|
||||
|
||||
uplinkname = princeton.nj.us.undernet.org
|
||||
uplinkport = 6667
|
||||
|
||||
debugfile = "debug.log"
|
||||
|
||||
channel = #c++
|
||||
channel = #c
|
||||
@@ -0,0 +1,199 @@
|
||||
/**
|
||||
* test_kick_transaction.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: test_kick_transaction.cc,v 1.3 2004/05/18 16:51:05 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
#include "ELog.h"
|
||||
|
||||
using namespace std ;
|
||||
using namespace gnuworld ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< " <socket log file>"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
struct kick
|
||||
{
|
||||
string destNumeric ;
|
||||
string srcNumeric ;
|
||||
string chan ;
|
||||
size_t lineNumber ;
|
||||
|
||||
kick( const string& destNumeric,
|
||||
const string& srcNumeric,
|
||||
const string& chan,
|
||||
const size_t& lineNumber )
|
||||
: destNumeric( destNumeric ),
|
||||
srcNumeric( srcNumeric ),
|
||||
chan( chan ),
|
||||
lineNumber( lineNumber )
|
||||
{}
|
||||
|
||||
inline bool operator()( const kick& lhs, const kick& rhs ) const
|
||||
{ return (lhs.destNumeric < rhs.destNumeric) ; }
|
||||
|
||||
friend ostream& operator<<( ostream& out, const kick& rhs )
|
||||
{
|
||||
out << rhs.lineNumber << ":"
|
||||
<< rhs.srcNumeric
|
||||
<< " K "
|
||||
<< rhs.destNumeric << " "
|
||||
<< rhs.chan ;
|
||||
return out ;
|
||||
}
|
||||
} ;
|
||||
|
||||
typedef multimap< string, kick > kickMapType ;
|
||||
kickMapType kickMap ;
|
||||
size_t lineNumber = 0 ;
|
||||
|
||||
void checkCorrespondingKick( const StringTokenizer& ) ;
|
||||
void pruneKickMap( size_t ) ;
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
ifstream inFile( argv[ 1 ] ) ;
|
||||
if( !inFile )
|
||||
{
|
||||
cout << "Unable to open input file: "
|
||||
<< argv[ 1 ]
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
string line ;
|
||||
|
||||
cout << "Reading input file..."
|
||||
<< endl ;
|
||||
|
||||
while( std::getline( inFile, line ) )
|
||||
{
|
||||
++lineNumber ;
|
||||
|
||||
if( (lineNumber > 0) && (0 == (lineNumber % 100000) ) )
|
||||
{
|
||||
cout << "Line "
|
||||
<< lineNumber
|
||||
<< ", kickMap.size(): "
|
||||
<< kickMap.size()
|
||||
<< endl ;
|
||||
|
||||
pruneKickMap( lineNumber - 25000 ) ;
|
||||
}
|
||||
|
||||
// abcde K fghij #chan :reason
|
||||
StringTokenizer st( line ) ;
|
||||
if( st.size() < 5 )
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
if( st[ 1 ] == "K" )
|
||||
{
|
||||
// Found kick
|
||||
// Add to the kickMap for comparing later
|
||||
kickMap.insert( make_pair( st[ 0 ],
|
||||
kick( st[ 3 ], // destNumeric
|
||||
st[ 0 ], // srcNumeric
|
||||
st[ 2 ], // chan
|
||||
lineNumber ) ) ) ;
|
||||
}
|
||||
|
||||
if( st[ 1 ] == "L" )
|
||||
{
|
||||
// See if this part corresponds to a previous
|
||||
// kick
|
||||
checkCorrespondingKick( st ) ;
|
||||
}
|
||||
|
||||
} // while()
|
||||
|
||||
inFile.close() ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void checkCorrespondingKick( const StringTokenizer& st )
|
||||
{
|
||||
// st[ 0 ] is the numeric if the client parting the channel
|
||||
// Check for matching clients that have been kicked
|
||||
kickMapType::iterator kItr = kickMap.find( st[ 0 ] ) ;
|
||||
if( kItr == kickMap.end() )
|
||||
{
|
||||
// Not found
|
||||
return ;
|
||||
}
|
||||
|
||||
// Found the numeric in the kick map
|
||||
for( ; (kItr != kickMap.end()) && (kItr->first == st[ 0 ]) ; ++kItr )
|
||||
{
|
||||
// cout << "Found destNumerics: "
|
||||
// << kItr->second
|
||||
// << " and "
|
||||
// << lineNumber << ":"
|
||||
// << st[ 0 ] << " L "
|
||||
// << st[ 2 ]
|
||||
// << endl ;
|
||||
|
||||
if( kItr->second.chan != st[ 2 ] )
|
||||
{
|
||||
// Different channel
|
||||
continue ;
|
||||
}
|
||||
|
||||
// Else, possible match
|
||||
cout << "Possible match: "
|
||||
<< kItr->second
|
||||
<< " with "
|
||||
<< lineNumber << ":"
|
||||
<< st[ 0 ] << " L "
|
||||
<< st[ 2 ]
|
||||
<< endl ;
|
||||
} // for()
|
||||
|
||||
}
|
||||
|
||||
// Remove any kicks from the kickMap if they are at least
|
||||
// as old as "age"
|
||||
void pruneKickMap( size_t age )
|
||||
{
|
||||
for( kickMapType::iterator kItr = kickMap.begin() ;
|
||||
kItr != kickMap.end() ; ++kItr )
|
||||
{
|
||||
if( kItr->second.lineNumber <= age )
|
||||
{
|
||||
kickMap.erase( kItr ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <pcre.h>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
int main()
|
||||
{
|
||||
string line ;
|
||||
|
||||
cout << "Enter the regex to compile: " ;
|
||||
cout.flush() ;
|
||||
std::getline( cin, line ) ;
|
||||
|
||||
int errorOffset = 0 ;
|
||||
const char* errorBuf = 0 ;
|
||||
|
||||
pcre* pPtr = pcre_compile( line.c_str(),
|
||||
PCRE_EXTENDED,
|
||||
&errorBuf,
|
||||
&errorOffset,
|
||||
0 ) ;
|
||||
if( 0 == pPtr )
|
||||
{
|
||||
cout << "Unable to compile: "
|
||||
<< errorBuf
|
||||
<< endl ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
cout << "Input string to match: " ;
|
||||
cout.flush() ;
|
||||
|
||||
while( std::getline( cin, line ) )
|
||||
{
|
||||
int ovector[ 30 ] ;
|
||||
memset( &ovector, 0, sizeof( ovector ) ) ;
|
||||
|
||||
int rc = pcre_exec( pPtr,
|
||||
NULL,
|
||||
line.c_str(),
|
||||
line.size(),
|
||||
0,
|
||||
0,
|
||||
ovector,
|
||||
30 ) ;
|
||||
if( rc < 0 )
|
||||
{
|
||||
cout << "NO Match"
|
||||
<< endl ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Match, ovector[0]: "
|
||||
<< ovector[0]
|
||||
<< ", ovector[1]: "
|
||||
<< ovector[1]
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
cout << "Input string to match: " ;
|
||||
cout.flush() ;
|
||||
|
||||
} // while( getline() )
|
||||
return 0 ;
|
||||
}
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
/**
|
||||
* testbot.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: testbot.cc,v 1.5 2005/01/12 04:36:47 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include <cstdlib> // atoi()
|
||||
|
||||
#include "testbot.h"
|
||||
#include "ELog.h"
|
||||
#include "ConnectionManager.h"
|
||||
#include "ConnectionHandler.h"
|
||||
#include "EConfig.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
using namespace gnuworld ;
|
||||
|
||||
using std::string ;
|
||||
using std::cout ;
|
||||
using std::endl ;
|
||||
|
||||
void usage( const string& progName )
|
||||
{
|
||||
cout << "Usage: "
|
||||
<< progName
|
||||
<< " <conf file>"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
int main( int argc, const char** argv )
|
||||
{
|
||||
if( argc != 2 )
|
||||
{
|
||||
usage( argv[ 0 ] ) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
testBot bot( argv[ 1 ] ) ;
|
||||
bot.Run() ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
testBot::testBot( const string& fileName )
|
||||
: keepRunning( true ),
|
||||
uplinkPort( 0 ),
|
||||
myConnect( 0 )
|
||||
{
|
||||
EConfig conf( fileName ) ;
|
||||
setUplinkName( conf.Require( "uplinkname" )->second ) ;
|
||||
setUplinkPort( static_cast< unsigned short int >(
|
||||
atoi( conf.Require( "uplinkport" )->second.c_str() ) ) ) ;
|
||||
setUserName( conf.Require( "username" )->second ) ;
|
||||
setNickName( conf.Require( "nickName" )->second ) ;
|
||||
setRealName( conf.Require( "realname" )->second ) ;
|
||||
|
||||
for( EConfig::const_iterator chanItr = conf.Find( "channel" ) ;
|
||||
(chanItr != conf.end()) &&
|
||||
(chanItr->first == "channel") ; ++chanItr )
|
||||
{
|
||||
channels.push_back( chanItr->second ) ;
|
||||
}
|
||||
|
||||
elog.setStream( &cout ) ;
|
||||
}
|
||||
|
||||
testBot::~testBot()
|
||||
{}
|
||||
|
||||
void testBot::Run()
|
||||
{
|
||||
myConnect = cm.Connect( this, uplinkName, uplinkPort ) ;
|
||||
if( !myConnect )
|
||||
{
|
||||
cout << "Run> Failed to connect"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
login() ;
|
||||
|
||||
// This is the main loop of the program
|
||||
// Pretty complicated eh?
|
||||
while( keepRunning )
|
||||
{
|
||||
// Poll() will release control to this method at least
|
||||
// every 100milliseconds.
|
||||
cm.Poll( 100 ) ;
|
||||
}
|
||||
|
||||
cout << "Run> Out of main loop, shutting down"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
void testBot::OnDisconnect( Connection* )
|
||||
{
|
||||
keepRunning = false ;
|
||||
}
|
||||
|
||||
void testBot::OnConnectFail( Connection* )
|
||||
{
|
||||
keepRunning = false ;
|
||||
}
|
||||
|
||||
void testBot::OnTimeout( Connection* )
|
||||
{
|
||||
keepRunning = false ;
|
||||
}
|
||||
|
||||
void testBot::OnConnect( Connection* )
|
||||
{
|
||||
cout << "Connected"
|
||||
<< endl ;
|
||||
}
|
||||
|
||||
void testBot::OnRead( Connection*, const string& line )
|
||||
{
|
||||
// New data from the uplink arrives here
|
||||
// It is a complete \n delimited command
|
||||
|
||||
// Trim any trailing \r or \n
|
||||
size_t len = line.size() - 1 ;
|
||||
while( ('\r' == line[ len ]) ||
|
||||
('\n' == line[ len ]) )
|
||||
{
|
||||
--len ;
|
||||
}
|
||||
|
||||
// Prepare the data to be processed
|
||||
string processMe = line.substr( 0, len + 1 ) ;
|
||||
|
||||
// Output what was read
|
||||
cout << "[IN]: "
|
||||
<< processMe
|
||||
<< endl ;
|
||||
|
||||
// Handle the command
|
||||
processInput( processMe ) ;
|
||||
}
|
||||
|
||||
void testBot::login()
|
||||
{
|
||||
// This is called when a new connection is established
|
||||
// NICK <nick>
|
||||
// USER ident host server :realname
|
||||
string writeMe( "NICK " ) ;
|
||||
writeMe += getNickName() ;
|
||||
writeMe += "\r\n" ;
|
||||
myConnect->Write( writeMe ) ;
|
||||
|
||||
writeMe = "USER " ;
|
||||
writeMe += getUserName() ;
|
||||
writeMe += " dummy.host.name dummy.server.name :" ;
|
||||
writeMe += getRealName() ;
|
||||
writeMe += "\r\n" ;
|
||||
|
||||
myConnect->Write( writeMe ) ;
|
||||
}
|
||||
|
||||
void testBot::processInput( const string& line )
|
||||
{
|
||||
// PING :1834576261
|
||||
StringTokenizer st( line ) ;
|
||||
if( st.empty() )
|
||||
{
|
||||
cout << "processInput> Empty tokenizer"
|
||||
<< endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
if( st[ 0 ] == "PING" )
|
||||
{
|
||||
string writeMe( "PONG " ) ;
|
||||
writeMe += st[ 1 ] + "\r\n" ;
|
||||
|
||||
myConnect->Write( writeMe ) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
// :Princeton.NJ.US.Undernet.org 376 _ripper_ :End of /MOTD command.
|
||||
if( st.size() < 2 )
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
if( st[ 1 ] == "376" )
|
||||
{
|
||||
// Fully connected, MOTD and other stuff has completed
|
||||
// sending.
|
||||
joinChannels() ;
|
||||
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
void testBot::joinChannels()
|
||||
{
|
||||
for( std::list< string >::const_iterator chanItr = channels.begin() ;
|
||||
chanItr != channels.end() ; ++chanItr )
|
||||
{
|
||||
string writeMe( "JOIN " ) ;
|
||||
writeMe += *chanItr + "\r\n" ;
|
||||
myConnect->Write( writeMe ) ;
|
||||
}
|
||||
}
|
||||
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
/**
|
||||
* testBot.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* $Id: testbot.h,v 1.4 2005/01/12 04:36:48 dan_karrels Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TESTBOT_H
|
||||
#define __TESTBOT_H "$Id: testbot.h,v 1.4 2005/01/12 04:36:48 dan_karrels Exp $"
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
#include "ConnectionManager.h"
|
||||
#include "ConnectionHandler.h"
|
||||
#include "Connection.h"
|
||||
|
||||
using namespace gnuworld ;
|
||||
|
||||
/**
|
||||
* This is a little client bot that connects to an irc server
|
||||
* like all normal bots. This is just a proof of concept for
|
||||
* the ConnectionManager subsystem. It is clean and small, just
|
||||
* for fun :).
|
||||
*/
|
||||
class testBot : public ConnectionHandler
|
||||
{
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new testBot with the given configuration file
|
||||
* name.
|
||||
*/
|
||||
testBot( const std::string& ) ;
|
||||
|
||||
/**
|
||||
* Do the usual destructor stuff.
|
||||
*/
|
||||
virtual ~testBot() ;
|
||||
|
||||
/* The following connection method are called by the
|
||||
* ConnectionManager subsystem, there is no need to call
|
||||
* them directly.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This method is called when a connection is established.
|
||||
*/
|
||||
virtual void OnConnect( Connection* ) ;
|
||||
|
||||
/**
|
||||
* This method is invoked when a connection attempt fails.
|
||||
*/
|
||||
virtual void OnConnectFail( Connection* ) ;
|
||||
|
||||
/**
|
||||
* This method is called when a line of data is read from
|
||||
* the connection. No need to buffer this data any
|
||||
* further, this is a complete '\n' delimited command.
|
||||
*/
|
||||
virtual void OnRead( Connection*, const std::string& ) ;
|
||||
|
||||
/**
|
||||
* This method is called when the connection terminates
|
||||
* on the other end.
|
||||
*/
|
||||
virtual void OnDisconnect( Connection* ) ;
|
||||
|
||||
/**
|
||||
* This method is called if a timeout occurs during
|
||||
* connection attempt.
|
||||
*/
|
||||
virtual void OnTimeout( Connection* ) ;
|
||||
|
||||
/**
|
||||
* This method contains the main loop of the testbot.
|
||||
*/
|
||||
virtual void Run() ;
|
||||
|
||||
/**
|
||||
* Return the name of the current uplink.
|
||||
*/
|
||||
inline const std::string& getUplinkName() const
|
||||
{ return uplinkName ; }
|
||||
|
||||
/**
|
||||
* Return the current uplink's port.
|
||||
*/
|
||||
inline unsigned short int getUplinkPort() const
|
||||
{ return uplinkPort ; }
|
||||
|
||||
/**
|
||||
* Return the bot's current nickname.
|
||||
*/
|
||||
inline const std::string& getNickName() const
|
||||
{ return nickName ; }
|
||||
|
||||
/**
|
||||
* Return the bot's username.
|
||||
*/
|
||||
inline const std::string& getUserName() const
|
||||
{ return userName ; }
|
||||
|
||||
/**
|
||||
* Return the bot's real name.
|
||||
*/
|
||||
inline const std::string& getRealName() const
|
||||
{ return realName ; }
|
||||
|
||||
/**
|
||||
* Set the name of the uplink.
|
||||
*/
|
||||
inline void setUplinkName( const std::string& newVal )
|
||||
{ uplinkName = newVal ; }
|
||||
|
||||
/**
|
||||
* Set the port on the uplink to which the bot is
|
||||
* connected or connecting.
|
||||
*/
|
||||
inline void setUplinkPort( unsigned short int newVal )
|
||||
{ uplinkPort = newVal ; }
|
||||
|
||||
/**
|
||||
* Set the bot's nickname.
|
||||
*/
|
||||
inline void setNickName( const std::string& newVal )
|
||||
{ nickName = newVal ; }
|
||||
|
||||
/**
|
||||
* Set the bot's username.
|
||||
*/
|
||||
inline void setUserName( const std::string& newVal )
|
||||
{ userName = newVal ; }
|
||||
|
||||
/**
|
||||
* Set the bot's real name.
|
||||
*/
|
||||
inline void setRealName( const std::string& newVal )
|
||||
{ realName = newVal ; }
|
||||
|
||||
protected:
|
||||
|
||||
/// This method outputs the NICK/USER lines when the
|
||||
/// bot is first connected.
|
||||
virtual void login() ;
|
||||
|
||||
/// This method is called when a 376 is read from the
|
||||
/// uplink, and it attempts to join all channels found
|
||||
/// in the configuration file.
|
||||
virtual void joinChannels() ;
|
||||
|
||||
/// processInput() attempts to parse the line of data
|
||||
/// received in OnRead(), and interpret some basic
|
||||
/// IRC commands.
|
||||
virtual void processInput( const std::string& ) ;
|
||||
|
||||
/// The bot will continue running while this variable is
|
||||
/// true. Setting it to false will cause the bot to
|
||||
/// terminate.
|
||||
bool keepRunning ;
|
||||
|
||||
/// The name of the current uplink server
|
||||
std::string uplinkName ;
|
||||
|
||||
/// The port on the uplink server to which we are connected
|
||||
/// or connecting.
|
||||
unsigned short int uplinkPort ;
|
||||
|
||||
/// The bot's current nickname.
|
||||
std::string nickName ;
|
||||
|
||||
/// The bot's userrname.
|
||||
std::string userName ;
|
||||
|
||||
/// The bot's realname.
|
||||
std::string realName ;
|
||||
|
||||
/// Pointer to the uplink connection
|
||||
Connection* myConnect ;
|
||||
|
||||
/// The ConnectionManager subsystem instance for this
|
||||
/// testbot.
|
||||
ConnectionManager cm ;
|
||||
|
||||
/// The list of channels the bot will attempt to join.
|
||||
std::list< std::string > channels ;
|
||||
} ;
|
||||
|
||||
#endif // __TESTBOT_H
|
||||
Reference in new issue
Block a user