From e560176616195fe50363b1264fcab56831abbe98 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 13 Sep 2000 17:50:26 +0000 Subject: [PATCH] Updates to comly with new source tree. --- CHANGES | 58 ++++++++++++++++++++++++ TODO | 4 -- apps/silcd/Makefile.am | 4 +- apps/silcd/server.c | 9 ++-- apps/silcd/server_version.c | 3 +- configure.in | 4 +- doc/draft-riikonen-silc-ke-auth-00.nroff | 8 ++-- doc/draft-riikonen-silc-pp-00.nroff | 8 ++-- doc/draft-riikonen-silc-spec-00.nroff | 8 ++-- includes/clientincludes.h | 8 ++-- includes/silcincludes.h | 8 ++-- includes/version.h | 6 ++- lib/Makefile.am | 35 ++++++++++++-- lib/contrib/Makefile.am | 2 +- lib/silccrypt/Makefile.am | 2 +- lib/silcmath/Makefile.am | 2 +- lib/silcsim/Makefile.am | 2 +- lib/silcske/Makefile.am | 2 +- prepare | 7 +++ prepare-clean | 5 +- 20 files changed, 142 insertions(+), 43 deletions(-) diff --git a/CHANGES b/CHANGES index 3cbade92..75e0eb52 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,61 @@ +Wed Sep 13 18:10:14 EEST 2000 Pekka Riikonen + + * Splitted core library. Core library (lib/silccore) includes + now only SILC protocol specific core (and common) components. + Created new utility library (lib/silcutil) that includes more + generic purpose stuff. The stuff for util library was taken + from the old core library. This was minor and easy split. + + * Created SILC Client Library (lib/silcclient) that includes + implementation of the SILC client without user interface. This + was major move from silc/ directory. The code has been changed + so that it is transparent towards the user interface. The + silc/ directory includes now the same user interface as before + and it uses the new client library. Read lib/silcclient/README. + Basicly, the client library performs everything else related + to SILC except user interface handling. Also, configuration + files are considered to be part of user interface and library + does not handle them. + + This change also changed a lot of structures, function naming etc. + Most important change was that SilcClientWindow object was + renamed to SilcClientConnection in the client library. Created + also new file lib/silcclient/ops.h. Also added new files + silc/local_command.[ch] and silc/client_ops.[ch]. + + All these changes were made to make it easier for user interface + designers to create what ever user interface for the SILC client + they want. + + It is also expected that the server will be moved to lib + directory as well and SILC Server Library will be created; + sometimes in the future. + + * Removed Local commands from lib/silccore/silccommand.h as + they are application specific and new client library does not + handle any of those anymore. + + * Several functions moved to lib/silcutil/silcutilc.[ch] from + old client implementation in silc/. + + * Added support for callback functions in SILC_LOG_* macros. + Application can now set its own callbacks that will be called + instead of using the default functions that will always print + the debug messages to stderr (or stdout). Also, debugging can + now be disabled by setting silc_debug to FALSE and re-enabled by + setting it to TRUE. Note, that logging will still work even + if debugging is disabled. + + New functions in lib/silcutil/silclog.[ch]: silc_log_set_callbacks, + silc_log_reset_callbacks, silc_log_set_debug_callbacks and + silc_log_reset_debug_callbacks. + + * To enable debugging in silc client one must give now -d + option on command line. + + * Changed silc_schedule_init to automatically allocate task queues + if they are not allocated before calling it. + Thu Sep 7 10:49:33 EEST 2000 Pekka Riikonen * Added GMP 3.1 into math library. diff --git a/TODO b/TODO index 464e8704..9dacbbb6 100644 --- a/TODO +++ b/TODO @@ -233,10 +233,6 @@ TODO In SILC Libraries cleaner. Introducing silc_cipher_encrypt/decrypt/set_key etc. functions (I actually don't understand why have I left these un-done). - o Scheduler should automatically allocate task queues if NULL pointers - are passed to the silc_schedule_init. Would make initialization - cleaner. - o Packet processing routines in client and server are actually pretty much generic and should be moved from the client/server to the library as generic routines (silc__packet_decrypt_rest* etc). diff --git a/apps/silcd/Makefile.am b/apps/silcd/Makefile.am index 9310116e..6709db5b 100644 --- a/apps/silcd/Makefile.am +++ b/apps/silcd/Makefile.am @@ -32,11 +32,13 @@ silcd_SOURCES = \ silcd.c \ server_version.c +silcd_DEPENDENCIES = ../lib/libsilc.a + LDADD = -L. -L.. -L../lib -lsilc EXTRA_DIST = *.h INCLUDES = -I. -I.. -I../lib/silccore -I../lib/silccrypt \ -I../lib/silcmath -I../lib/silcske -I../lib/silcsim \ - -I../includes \ + -I../includes -I../lib/silcutil \ -I../lib/silcmath/gmp diff --git a/apps/silcd/server.c b/apps/silcd/server.c index e652099d..a8d0fc3a 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -25,6 +25,9 @@ /* * $Id$ * $Log$ + * Revision 1.14 2000/09/13 17:50:26 priikone + * Updates to comly with new source tree. + * * Revision 1.13 2000/08/21 14:21:21 priikone * Fixed channel joining and channel message sending inside a * SILC cell. Added silc_server_send_remove_channel_user and @@ -97,7 +100,7 @@ SILC_TASK_CALLBACK(silc_server_packet_process); SILC_TASK_CALLBACK(silc_server_packet_parse_real); SILC_TASK_CALLBACK(silc_server_timeout_remote); -extern char server_version[]; +extern char *server_version; /* Allocates a new SILC server object. This has to be done before the server can be used. After allocation one must call silc_server_init to initialize @@ -336,8 +339,8 @@ int silc_server_init(SilcServer server) silc_server_protocols_register(); /* Initialize the scheduler */ - silc_schedule_init(server->io_queue, server->timeout_queue, - server->generic_queue, + silc_schedule_init(&server->io_queue, &server->timeout_queue, + &server->generic_queue, SILC_SERVER_MAX_CONNECTIONS); /* Add the first task to the queue. This is task that is executed by diff --git a/apps/silcd/server_version.c b/apps/silcd/server_version.c index d648e8a6..34992677 100644 --- a/apps/silcd/server_version.c +++ b/apps/silcd/server_version.c @@ -19,5 +19,6 @@ */ #include "serverincludes.h" +#include "version_internal.h" -const char server_version[] = "26072000"; +const char *server_version = SILC_VERSION_STRING; diff --git a/configure.in b/configure.in index b983c1eb..20904a52 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,7 @@ case "$target" in ;; esac -AM_INIT_AUTOMAKE(silc, 26072000) +AM_INIT_AUTOMAKE(silc, 14092000) AC_PREREQ(2.3) AM_CONFIG_HEADER(includes/silcdefs.h) @@ -239,11 +239,13 @@ doc/Makefile includes/Makefile lib/Makefile lib/contrib/Makefile +lib/silcclient/Makefile lib/silccore/Makefile lib/silccrypt/Makefile lib/silcmath/Makefile lib/silcsim/Makefile lib/silcsim/modules/Makefile lib/silcske/Makefile +lib/silcutil/Makefile silc/Makefile silcd/Makefile) diff --git a/doc/draft-riikonen-silc-ke-auth-00.nroff b/doc/draft-riikonen-silc-ke-auth-00.nroff index 9dc849ed..18d604b3 100644 --- a/doc/draft-riikonen-silc-ke-auth-00.nroff +++ b/doc/draft-riikonen-silc-ke-auth-00.nroff @@ -8,7 +8,7 @@ .ds RF FORMFEED[Page %] .ds CF .ds LH INTERNET-DRAFT -.ds RH 28 June 2000 +.ds RH 13 September 2000 .ds CH .na .hy 0 @@ -16,8 +16,8 @@ .nf Network Working Group P. Riikonen INTERNET-DRAFT -draft-riikonen-silc-ke-auth-00.txt 28 June 2000 -Expires: 28 Jan 2001 +draft-riikonen-silc-ke-auth-00.txt 13 September 2000 +Expires: 13 May 2001 .in 3 @@ -1051,5 +1051,5 @@ Finland EMail: priikone@poseidon.pspt.fi -This Internet-Draft expires 28 Jan 2001 +This Internet-Draft expires 13 May 2001 diff --git a/doc/draft-riikonen-silc-pp-00.nroff b/doc/draft-riikonen-silc-pp-00.nroff index 10516d0a..d246a145 100644 --- a/doc/draft-riikonen-silc-pp-00.nroff +++ b/doc/draft-riikonen-silc-pp-00.nroff @@ -8,7 +8,7 @@ .ds RF FORMFEED[Page %] .ds CF .ds LH Internet Draft -.ds RH 28 June 2000 +.ds RH 13 September 2000 .ds CH .na .hy 0 @@ -16,8 +16,8 @@ .nf Network Working Group P. Riikonen Internet-Draft -draft-riikonen-silc-pp-00.txt 28 June 2000 -Expires: 28 Jan 2001 +draft-riikonen-silc-pp-00.txt 13 September 2000 +Expires: 13 May 2001 .in 3 @@ -2434,4 +2434,4 @@ Finland EMail: priikone@poseidon.pspt.fi -This Internet-Draft expires 28 Jan 2001 +This Internet-Draft expires 13 May 2001 diff --git a/doc/draft-riikonen-silc-spec-00.nroff b/doc/draft-riikonen-silc-spec-00.nroff index 9c1128a9..5bd3c04c 100644 --- a/doc/draft-riikonen-silc-spec-00.nroff +++ b/doc/draft-riikonen-silc-spec-00.nroff @@ -8,7 +8,7 @@ .ds RF FORMFEED[Page %] .ds CF .ds LH Internet Draft -.ds RH 28 June 2000 +.ds RH 13 September 2000 .ds CH .na .hy 0 @@ -16,8 +16,8 @@ .nf Network Working Group P. Riikonen Internet-Draft -draft-riikonen-silc-spec-00.txt 28 June 2000 -Expires: 28 Jan 2001 +draft-riikonen-silc-spec-00.txt 13 September 2000 +Expires: 13 May 2001 .in 3 @@ -3091,4 +3091,4 @@ Finland EMail: priikone@poseidon.pspt.fi -This Internet-Draft expires 28 Jan 2001 +This Internet-Draft expires 13 May 2001 diff --git a/includes/clientincludes.h b/includes/clientincludes.h index 23841663..d579b127 100644 --- a/includes/clientincludes.h +++ b/includes/clientincludes.h @@ -33,16 +33,14 @@ /* Generic includes */ #include "silcincludes.h" +#include "clientlibincludes.h" /* SILC Client includes */ #include "screen.h" #include "clientconfig.h" -#include "client.h" -#include "command.h" -#include "command_reply.h" -#include "idlist.h" +#include "local_command.h" #include "clientutil.h" -#include "protocol.h" #include "silc.h" +#include "client_ops.h" #endif diff --git a/includes/silcincludes.h b/includes/silcincludes.h index 0358befd..d5fe7449 100644 --- a/includes/silcincludes.h +++ b/includes/silcincludes.h @@ -130,7 +130,7 @@ #include "silcrng.h" #include "silcpkcs.h" -/* SILC core library includes */ +/* SILC util library includes */ #include "silclog.h" #include "silcmemory.h" #include "silcbuffer.h" @@ -139,10 +139,12 @@ #include "silcnet.h" #include "silcutil.h" #include "silcconfig.h" -#include "id.h" -#include "idcache.h" #include "silctask.h" #include "silcschedule.h" + +/* SILC core library includes */ +#include "id.h" +#include "idcache.h" #include "silcprotocol.h" #include "silcsockconn.h" #include "silccommand.h" diff --git a/includes/version.h b/includes/version.h index d724ec32..a878e25d 100644 --- a/includes/version.h +++ b/includes/version.h @@ -21,6 +21,8 @@ #ifndef VERSION_H #define VERSION_H +#include "version_internal.h" + /* Version type definition */ typedef unsigned char SilcVersion; @@ -33,8 +35,8 @@ typedef unsigned char SilcVersion; #define SILC_VERSION_1 '\1' /* SILC version string */ -const char *silc_version = "26072000"; -const char *silc_version_string = "SILC-1.0-26072000"; +const char *silc_version = SILC_VERSION_STRING; +const char *silc_version_string = SILC_PROTOCOL_VERSION_STRING; const char *silc_name = "SILC"; const char *silc_fullname = "Secure Internet Live Conferencing"; diff --git a/lib/Makefile.am b/lib/Makefile.am index e67620e3..dd537292 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -24,14 +24,39 @@ SUBDIRS = \ silccrypt \ silcsim \ silcmath \ - silcske + silcske \ + silcutil \ + silcclient # zlib -CLEANFILES = libsilc.a -DISTCLEANFILES = libsilc.a +# SILC Library dirs +SILCLIB_DIRS = \ + contrib \ + silccore \ + silccrypt \ + silcsim \ + silcmath \ + silcske \ + silcutil -all: libsilc.a +# SILC Client Library dirs +SILCCLIENTLIB_DIRS = \ + silcclient + +CLEANFILES = libsilc.a libsilcclient.a +DISTCLEANFILES = libsilc.a libsilcclient.a + +all: remove libsilc.a libsilcclient.a + +remove: + -rm -rf libsilc.a + -rm -rf libsilcclient.a libsilc.a: - find . -type f -name *.o | xargs $(AR) cru libsilc.a + find $(SILCLIB_DIRS) -type f -name *.o | xargs $(AR) cru libsilc.a ranlib libsilc.a + +libsilcclient.a: + find $(SILCCLIENTLIB_DIRS) -type f -name *.o | xargs $(AR) cru libsilcclient.a + ranlib libsilcclient.a + diff --git a/lib/contrib/Makefile.am b/lib/contrib/Makefile.am index 343a02e8..b8bde5f0 100644 --- a/lib/contrib/Makefile.am +++ b/lib/contrib/Makefile.am @@ -27,5 +27,5 @@ libcontrib_a_SOURCES = \ EXTRA_DIST = *.h INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \ - -I../silcsim -I../.. -I../../includes -I../silccore \ + -I../silcsim -I../.. -I../../includes -I../silccore -I../silcutil \ -I../silcmath/gmp diff --git a/lib/silccrypt/Makefile.am b/lib/silccrypt/Makefile.am index 6e7514e3..5af41719 100644 --- a/lib/silccrypt/Makefile.am +++ b/lib/silccrypt/Makefile.am @@ -40,5 +40,5 @@ libsilccrypt_a_SOURCES = \ EXTRA_DIST = *.h INCLUDES = -I. -I.. -I../silccore -I../silcmath -I../silcske \ - -I../silcsim -I../.. -I../../includes \ + -I../silcsim -I../.. -I../silcutil -I../../includes \ -I../silcmath/gmp diff --git a/lib/silcmath/Makefile.am b/lib/silcmath/Makefile.am index c9aaf66b..fd3ebd7b 100644 --- a/lib/silcmath/Makefile.am +++ b/lib/silcmath/Makefile.am @@ -30,5 +30,5 @@ libsilcmath_a_SOURCES = \ EXTRA_DIST = *.h INCLUDES = -I. -I.. -I../silccrypt -I../silccore -I../silcske \ - -I../silcsim -I../.. -I../../includes \ + -I../silcsim -I../.. -I../silcutil -I../../includes \ -I./gmp diff --git a/lib/silcsim/Makefile.am b/lib/silcsim/Makefile.am index 64dfa862..0c4f30bf 100644 --- a/lib/silcsim/Makefile.am +++ b/lib/silcsim/Makefile.am @@ -71,5 +71,5 @@ CLEANFILES = $(SIM_MODULES_DIR)/*.sim.so EXTRA_DIST = *.h INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \ - -I../silccore -I../.. -I../../includes \ + -I../silccore -I../.. -I../silcutil -I../../includes \ -I../silcmath/gmp diff --git a/lib/silcske/Makefile.am b/lib/silcske/Makefile.am index c2ac3a96..eb4e5f1a 100644 --- a/lib/silcske/Makefile.am +++ b/lib/silcske/Makefile.am @@ -27,6 +27,6 @@ libsilcske_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silccore \ +INCLUDES = -I. -I.. -I../silccrypt -I../silccore -I../silcutil \ -I../silcsim -I../silcmath -I../.. -I../../includes \ -I../silcmath/gmp diff --git a/prepare b/prepare index 7ac2ad60..02bc7756 100755 --- a/prepare +++ b/prepare @@ -30,4 +30,11 @@ aclocal autoconf autoheader automake + +version=`date +%d%m%Y` +file=includes/version_internal.h +echo "/* Automatically generated by ./prepare */" >$file +echo "#define SILC_VERSION_STRING \"$version\"" >>$file +echo "#define SILC_PROTOCOL_VERSION_STRING \"SILC-1.0-$version\"" >>$file + echo "Done, now run ./configure and make." diff --git a/prepare-clean b/prepare-clean index b7a92bb6..bdd83b42 100755 --- a/prepare-clean +++ b/prepare-clean @@ -28,19 +28,22 @@ echo "All errors and warnings may be safely ignored." make distclean rm -f includes/stamp-* rm -f includes/silcconfig.* +rm -f includes/version_internal.h rm -f Makefile.in rm -f doc/draft-*.txt rm -f doc/Makefile.in rm -f includes/Makefile.in rm -f lib/Makefile.in rm -f lib/contrib/Makefile.in +rm -f lib/silcclient/Makefile.in rm -f lib/silccore/Makefile.in +rm -f lib/silcutil/Makefile.in rm -f lib/silccrypt/Makefile.in rm -f lib/silcmath/Makefile.in rm -f lib/silcsim/Makefile.in rm -f lib/silcsim/modules/Makefile.in rm -f lib/silcske/Makefile.in -rm -f lib/silcmath/gmp/.deps +rm -rf lib/silcmath/gmp/.deps rm -f silcd/Makefile.in silcd/log* silcd/*.log rm -f silc/Makefile.in silc/log* silc/*.log rm -f aclocal.m4 -- 2.43.0