From fc83b6ccbcbd697a3afc82cf3d9f4053f0bbadb1 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 14 Feb 2007 14:44:51 +0000 Subject: [PATCH] updates. --- CHANGES | 46 +++++++++++++++++++++++++++++ TODO | 20 +++++++++---- configure.ad | 2 +- lib/doc/notifyargs.html | 6 ++-- lib/silcutil/tests/test_silcmutex.c | 35 ++++++++++------------ 5 files changed, 81 insertions(+), 28 deletions(-) diff --git a/CHANGES b/CHANGES index c8a43fb7..ca4646c8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,49 @@ +Wed Feb 14 17:05:38 EET 2007 Pekka Riikonen + + * Fixed packet wrapper stream API to support encoder/decoder + for packets, and to handle partial reading correctly. Fixed + also inbuf size checking in reading to have enough space before + reading. Affected files are lib/silccore/silcpacket.[ch]. + + * Rewrote file transfer in client library. Affected files are + in lib/silcclient/. + + * Added TCP/UDP listener (internal) API to client library to have + generic way of dealing with listeners. Fixed Key Agreement and + file transfer to use it. Affected files are in lib/silcclient/. + + * Fixed SKE to process SUCCESS packets synchronously and to call + completion synchronously. Affected file is lib/silcske/silske.c. + + * Fixed pthread rwlock detection. Affected file includes/silc.h.in. + + * Implemented SILC_ATTRIBYUTE_PHONE_NUMBER. Affected files are + lib/silccore/silcattrs.[ch]. SILC Protocol version 1.3 change. + +Fri Feb 2 22:24:11 EET 2007 Pekka Riikonen + + * Added support for SILC protocol version 1.3 NEW_CLIENT packet + to client library. Affected file is + lib/silcclient/client_register.c. + + * Serialize NICK and JOIN commands to avoid problems locally + with changing ID while joining to channel. Affected file is + lib/silcclient/command.c. + + * Fixed entry resolving while handling incoming JOIN notify. + Handle properly cases, in re-processing of notify packets, where + the IDs may become invalid while resolving the entry (like nick + change). Entry is invalid if it doesn't have nickname, and such + entries are not delivered to application anymore. These fixes + problems of not seeing JOINs when remote user changes nickname + at the same time. Affected files are in lib/silcclient/. + +Thu Feb 1 18:35:58 EET 2007 Pekka Riikonen + + * Added support for computing message payload MAC in new way + (SILC Protocol version 1.3). Bakcwards support for old way + remains. Affected files are lib/silccore/silcmessage.[ch]. + Sat Jan 27 22:37:30 EET 2007 Pekka Riikonen * Added SilcRwLock API, a read/write lock. Affected files are diff --git a/TODO b/TODO index 5e7ca9a2..8f748cfe 100644 --- a/TODO +++ b/TODO @@ -9,7 +9,7 @@ tested. SILC Client ****PARTLY DONE**** =========== - o Porting to new Toolkit API and new Client Library API + o Porting to new Toolkit API and new Client Library API (***TESTING NEEDED) o Improve help files, especially /cmode, /cumode and /key. @@ -21,11 +21,15 @@ lib/silcclient, The Client Library ***PARTLY DONE**** o silcclient_entry.h finishing, all entry relates APIs to this header. - o SilcChannelEntry, SilcServerEntry, SilcChannelUser, allocating, - freeing, finding, etc. rewrite. Also making them reference counted for + o SilcChannelEntry, SilcServerEntry, SilcChannelUser, allocating, + freeing, finding, etc. rewrite. Also making them reference counted for multi threads use. (***DONE) - o Finish all the missing SILC packet processings, rewrites. + o Rewrite silc_client_get_clients_by_channel. + + o Rewrite client side WHOIS command (for whois -details). + + o Finish all the missing SILC packet processings, rewrites. (***DONE) o The client_notify.c rewrite. (***TESTING NEEDED) @@ -36,7 +40,9 @@ lib/silcclient, The Client Library ***PARTLY DONE**** o Remove protocol.[ch]. (***DONE) - o File transfer rewrite. + o File transfer rewrite. (***TESTING NEEDED) + + o File transfer API documentation. o Connection auth request. (***DONE) @@ -44,7 +50,7 @@ lib/silcclient, The Client Library ***PARTLY DONE**** o Starting key exchange directly, rewrite. (***DONE) - o Channel messages, channel private keys, channel entires, channel + o Channel messages, channel private keys, channel entires, channel search, etc. rewrite. o For many APIs leave the hash context allocations to the caller instead @@ -142,6 +148,8 @@ lib/silccrypt ****PARTLY DONE**** o Implement SILC Public Key Version 2 handling in sign/verify. Implement Version (V) identifier (***DONE) + o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h. + o Implement PKCS #1 sign/verify with hash OID. (***TESTING NEEDED) o Implement the defined SilcDH API. The definition is in diff --git a/configure.ad b/configure.ad index 2dbd9bdd..221edd9a 100644 --- a/configure.ad +++ b/configure.ad @@ -179,7 +179,7 @@ AC_CHECK_FUNCS(poll select listen bind shutdown close connect setsockopt) AC_CHECK_FUNCS(setrlimit time ctime utime gettimeofday getrusage) AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror) AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid) -AC_CHECK_FUNCS(setgroups initgroups nl_langinfo epoll_wait) +AC_CHECK_FUNCS(setgroups initgroups nl_langinfo epoll_wait nanosleep) AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove) #ifdef SILC_DIST_SIM diff --git a/lib/doc/notifyargs.html b/lib/doc/notifyargs.html index 20ba2677..1751f47a 100644 --- a/lib/doc/notifyargs.html +++ b/lib/doc/notifyargs.html @@ -209,9 +209,11 @@ safely ignore it when received. Sent when a server quits the network. The 'clients' is a list of SilcClientEntry pointers. Each client in the entry is one client signing -off from the SILC network. The library will free the list. +off from the SILC network. The library will free the list. The `server' +is the quitting server, and it is NULL if the server isn't cached in the +client library. -NULL, SilcClientEntry *clients, SilcUInt32 clients_count +SilcServerEntry server, SilcDList clients diff --git a/lib/silcutil/tests/test_silcmutex.c b/lib/silcutil/tests/test_silcmutex.c index 1b4da618..4b1a732b 100644 --- a/lib/silcutil/tests/test_silcmutex.c +++ b/lib/silcutil/tests/test_silcmutex.c @@ -11,7 +11,7 @@ typedef struct { #define MAX_ROUND 8 #define MAX_MUL 4 #define MAX_THREADS 4 -#define MAX_LOCKS 271234567 +#define MAX_LOCKS 471234567 SilcMutex mutex; SilcUInt64 cpu_freq = 0; @@ -90,13 +90,9 @@ void *mutex_thread_hold(void *context) silc_mutex_lock(mutex); hval2 = i; hval3 = 0; - hval += hval; + hval++; hval3 = hval2 + i; - if (hval > max_locks) - hval = 0; - if (hval < max_locks) - hval = max_locks; - hval += hval; + hval += hval2; hval3 += hval; if (silc_unlikely(hval3 != hval2 + i + hval)) { fprintf(stderr, "MUTEX CORRUPT 1\n"); @@ -179,8 +175,9 @@ int main(int argc, char **argv) fprintf(stderr, "Spinning/holding lock, lock/unlock per second\n"); - sleep(16); - for (j = 0; j < MAX_ROUND; j++) { + max_locks /= 2; + sleep(5); + for (j = 0; j < MAX_ROUND / 2; j++) { for (i = 0; i < 1; i++) c[i].thread = silc_thread_create(mutex_thread_hold, &c[i], TRUE); @@ -190,32 +187,32 @@ int main(int argc, char **argv) val += c[i].time; } fprintf(stderr, "%llu mutex lock/unlock per second (%d threads)\n", - (1000LL * (max_locks / 4)) / val, 1); + (1000LL * (max_locks / 4) * 1) / val, 1); } puts(""); max_locks2 = max_locks; + max_locks2 /= 2; for (k = 0; k < MAX_MUL; k++) { - sleep(16); + sleep(2); max_locks = max_locks2 / (k + 1); - for (j = 0; j < MAX_ROUND; j++) { + for (j = 0; j < MAX_ROUND / 2; j++) { hval = hval2 = 1; for (i = 0; i < MAX_THREADS * (k + 1); i++) - c[i].thread = silc_thread_create(mutex_thread, &c[i], TRUE); + c[i].thread = silc_thread_create(mutex_thread_hold, &c[i], TRUE); val = 0; for (i = 0; i < MAX_THREADS * (k + 1); i++) { - silc_thread_wait(c[i].thread, NULL); - val += c[i].time; + silc_thread_wait(c[i].thread, NULL); + val += c[i].time; } fprintf(stderr, "%llu mutex lock/unlock per second (%d threads)\n", - (1000LL * (max_locks / 4) * - (MAX_THREADS * (k + 1))) / val, - MAX_THREADS * (k + 1)); + (1000LL * (max_locks / 4) * + (MAX_THREADS * (k + 1))) / val, + MAX_THREADS * (k + 1)); } puts(""); } - max_locks = max_locks2; success = TRUE; -- 2.24.0