updates.
[silc.git] / CHANGES
1 Fri Apr 20 18:58:43 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2
3         * Fixed buffer overflow in silc_string_compare in the file
4           lib/silcutil/silcutil.c.
5
6         * Fixed double free in silc_server_command_leave in the file
7           silcd/command.c.
8
9 Fri Apr 20 14:00:11 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
10
11         * Fixed the version checking in the server.  Affected file is
12           silcd/protocol.c.
13
14 Thu Apr 19 19:52:46 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
15
16         * Fixed the configuration data fetching when accepting new
17           connections in the server.  Affected file silcd/server.c.
18
19 Thu Apr 19 11:40:20 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
20
21         * Added `sender_entry' argument to the function
22           silc_server_packet_relay_to_channel so that we can check
23           whether some destination actually belongs to the same route
24           the sender belongs (ie, we must not resend the packet to the
25           sender).  Affected file silcd/packet_send.[ch].
26
27         * Added `servername' field to the SilcClientEntry in the server
28           to hold the name of the server where client is from.  Affected
29           file is silcd/idlist.h.
30
31 Wed Apr 18 22:19:03 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
32
33         * Moved the channel message encrypting in the router betwen
34           router connections from silc_server_channel_message to the
35           silc_server_packet_relay_to_channel since we want to check
36           whether we have anybody channel before encrypting anything.
37           Affected files silcd/packet_[receive/send].c.
38
39 Tue Apr 17 21:18:19 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
40
41         * Fixed the [AdminConnection] server config section to support
42           multiple entries.  Affected file silcd/serverconfig.c.
43
44         * Added support into the server to check the validity of the
45           incoming connection before executing any KE or authentication
46           protocols.
47
48         * The connection configuration is now saved to the KE and 
49           connection auth protocol contexts and not fetched anymore in 
50           the protocol.  Affected files silcd/server.c, silcd/protocol.[ch].
51
52         * The local hosts listenning address and port is also resolved
53           now when starting the server.  We want to have the socket object
54           to include the real address and port for the listener.  Added
55           new function silc_net_check_local_by_sock into the files
56           lib/silcutil/silcnet.[ch].
57
58         * Fixed a broadcast bug in server -> do not broadcast if we
59           are standalone.
60
61         * Fixed a routing bug.  Do not route broadcast packets ever.
62           Broadcast packets must be processed always and not routed since
63           they may be destined to some other host than yourself and thus
64           would get routed without no good reason.  Affected file is
65           silcd/server.c.
66
67         * Added function silc_server_config_is_primary_route to check
68           whether primary router connection has been configured (a router
69           configuration that we are initiating).  If there is not, we 
70           will assume that there is only two routers in the SILC network
71           and we will use the incoming router connection as our primary
72           route.  Affected files silcd/serverconfig.[ch], silcd/server.c.
73
74         * Changed the order of the broadcasting.  Broadcast _after_ the
75           packet has been processed not before.  Affected file is
76           silcd/server.c.
77
78         * Fixed a [ClientConnection] parsing bug.  The port was never
79           parsed correctly thus resulting to port 0.  Affected file
80           silcd/serverconfig.c.
81
82         * Fixed silc_server_send_notify_args -> it ignored the `broadcast'
83           argument and did not set the broadcast packet flag.  Affected
84           file silcd/packet_send.c.  Fixed same bug in the function
85           silc_server_send_notify as well.
86
87         * If we receive NEW_ID packet for our own ID in the server, ignore
88           the packet.
89
90 Mon Apr 16 12:10:33 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
91
92         * Updated TODO.
93
94         * Removed the nickname from the Private Message Payload.
95           Updated the code and the protocol specs.
96
97         * Updated protocol specs for submitting to the IETF.
98
99         * Tweaked the Random Number Generator a bit.  Affected file
100           lib/silccrypt/silcrng.c.  Exported a new function
101           silc_rng_[global]_add_noise which can be used to add more
102           noise to the RNG.
103
104 Sat Apr 14 16:21:32 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
105
106         * Do not parse packets with different timeout when protocol
107           is active -> may cause problem with rekey.  Affected file
108           silcd/server.c.
109
110         * When server receives signoff notify it must not create
111           new channel key if the client is on any channels since the
112           sender of the signoff notify will create it.
113
114 Fri Apr 13 17:12:46 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
115
116         * Added printing of error messages during SKE protocol from the
117           failure packet sent by server during SKE.  Affected file
118           silc/client_ops.c.
119
120         * Removed the client's failure_callback handling with timeout
121           and handle it immediately when received.
122
123         * The SKE library returned wrong type in SUCCESS and FAILURE 
124           packets.  They must be 32 bit MSB not 16 bit MSB.
125
126 Fri Apr 13 00:09:08 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
127
128         * Ok, rewrote the logic of the re-key and now it seems to work.
129           I tested it on high traffic with frequent re-keys without
130           problems.  Added hmac_receive (and renamed hmac to hmac_send)
131           in SilcClientConnection in lib/silcclient/client.h and
132           in SilcIDListData in silcd/idlist.h.  Also, removed the
133           SilcPacketParserContext's cipher and hmac fields as they are
134           not needed anymore and actually caused some problems when
135           the ciphers and hmac's changed underneath the packet parser.
136
137 Thu Apr 12 14:42:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
138
139         * If re-key protocol is active then process the incoming packets
140           synchronously since we must assure that icoming packets encrypted
141           with the old key is processed before the new keys is set to
142           use.  This is true other packets than for REKEY packets.
143           Affected file silcd/server.c.  The same was done to client library
144           as well, affected file lib/silcclient/client.c.
145
146 Thu Apr 12 12:01:52 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
147
148         * Fixed bug in client and server to accept the force send if
149           the packet is send from silc_[server/client]_packet_process
150           function.  Otherwise the packets are never delivered, oops.
151
152 Wed Apr 11 22:10:15 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
153
154         * Disable force sending of packets when REKEY protocol is active.
155           We must assure that no packet is sent directly when rekey is
156           performed.  All packets must be sent through packet queue.
157           Added macro SILC_SERVER_IS_REKEY to silcd/server.h and
158           SILC_CLIENT_IS_REKEY to lib/silcclient/client.h.  Affected
159           function is silc_[server/client]_packet_send_real to check
160           the situation.
161
162         * Replaced the SIM paths from example config files to 
163           /usr/local/modules.  Also, make install creates now
164           /usr/local/silc/logs directory to hold all the SILC server
165           logs.
166
167 Wed Apr 11 16:59:59 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
168
169         * Made the configure.in.pre work on Solaris.  Patch by salo.
170
171         * Made all ciphers compatible with non-x86 machines.  Defined
172           CBC mode macros into lib/silccrypt/ciphers_def.h.
173
174 Tue Apr 10 20:32:44 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
175
176         * Fixed the make install.
177
178 Tue Apr 10 16:20:34 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
179
180         * When MAC computation fails the silc_packet_decrypt returned 0
181           even though it was supposed to return -1.  Fixed this.  The
182           affected file is lib/silccore/silcpacket.c.
183
184         * Do not replace the config files in /etc/silc (in make install)
185           if they already exist.  Affected file ./Makefile.am.
186
187         * Do not send re-key packets immediately but through packet queue.
188           Affected file silcd/protocol.c and lib/silcclient/protocol.c.
189
190         * Changed silc_net_check_host_by_sock to return FALSE if the
191           IP/DNS could not be resolved.  Though, it returns the IP address
192           now even if it could not resolve it (but returns also FALSE).
193           Affected file lib/silcutil/silcnet.[ch].
194
195 Mon Apr  9 21:54:44 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
196
197         * Added silc_pkcs_decode_identifier to decode the public key's
198           identifier.  Affected file lib/silccrypt/silpkcs.[ch].
199           Added also silc_pkcs_free_identifier.  Added also new context
200           SilcPublicKeyIdentifier.
201
202         * Added -S option to the silc client.  It is used to dump the
203           contents of the specified public key file.
204
205         * Changed the PKCS api to return the public key length when
206           setting the public key.
207
208         * Fixed a fatal bug in the public and private key file loading.
209           Affected file lib/silccrypt/silcpkcs.c.
210
211         * Execute the packet parsing for client with zero (0) timeout
212           if the protocol is active.  Affected file silcd/server.c.
213
214 Sun Apr  8 19:30:56 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
215
216         * Made the key generation options to the silcd program.  Added
217           -C option, equivalent to client's option.
218
219         * Added new [ServerKeys] config section to the server.  It
220           configures the server's public and private key.
221
222         * Defined generic Public Key Payload into the protocol
223           specification to send specific type of public keys and
224           certificates.
225
226         * Defined new command SILC_COMMAND_GETKEY to fetch a client's
227           public key or certificate.
228
229         * Implemented the GETKEY command to the server and to the
230           client library and on user interface.
231
232 Sun Apr  8 01:37:21 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
233
234         * Made preliminary `make install' work.
235
236 Thu Apr  5 17:42:30 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
237
238         * Added SilcServerRekey context into silcd/idlist.h.
239
240         * Added the PFS support as defined in the specification to the
241           SKE protocol.  Affected files lib/silcske/*.c.
242
243         * Added `ske_group' field to the SilcServerRekey context to hold
244           the number of the SKE group that is used with PFS in re-key.
245           Affected file silcd/idlist.h.
246
247         * Added PFS re-key support to the server.  Affected file is
248           silcd/protocol.c.
249
250         * Added silc_protocol_cancel to cancel execution of the next
251           state of the protocol.  Affected file is
252           lib/silccore/silcprotocol.[ch].
253
254         * Added the re-key support with and without PFS to the client
255           library.  Re-key is performed once in an hour, by default.
256
257           Added new protocol type SILC_PROTOCOL_CLIENT_REKEY.
258           Added silc_client_rekey_callback and silc_client_rekey_final.
259           Affected files are lib/silcclient/protocol.[ch] and
260           lib/silcclient/client.[ch].
261
262         * Removed the `hmac_key' and `hmac_key_len' fields from the
263           SilcClientConnection structure; not needed.  Affected file is
264           lib/silcclient/client.h.
265
266         * Updated TODO.
267
268 Wed Apr  4 16:32:31 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
269
270         * Do not ask whether user wants to use the negotiated private key
271           for private messages, just use it.  Affected file is 
272           silc/local_command.c.
273
274         * Added `send_enc_key' and `enc_key_len' fields to the 
275           SilcIDListData structure since they are needed in the re-key
276           phase.  Affected file is silcd/idlist.[ch].
277
278         * Implemented the simple re-key protocol into the server.
279           Affected files silcd/server.c and silcd/protocol.[ch].  The
280           re-key will be performed once in an hour, by default.
281
282           Added new protocol type SILC_PROTOCOL_SERVER_REKEY.
283           Added silc_server_rekey, silc_server_rekey_callback and
284           silc_server_rekey_final.
285
286         * Removed Tunneled flag from the protocol.  Updated the code
287           and the specifications.
288
289         * Adde `pfs' field to the SilcIDListData to indicate whether
290           the PFS is to be performed in the re-key.  Affected file is
291           silcd/idlist.h.
292
293 Tue Apr  3 21:52:42 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
294
295         * Defined uint8, int8, uint16, int16, uint32, int32, uint64 and
296           int64 of at least the xintXX size.  If void * is less that 4
297           bytes uint32 * will be used.  Defined bool as boolean.
298
299         * Changed _ALL_ unsigned long and unsigned int to uint32, 
300           unsgined short to uint16 in the source tree.
301
302         * Fixed a fatal bug in silc_server_remove_clients_by_server.  Do
303           not handle clients that has entry->data.registered == FALSE.
304           They are not in the network anymore.  Affected file is
305           silcd/server.c.
306
307 Tue Apr  3 16:39:19 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
308
309         * Implemented the sending of the SERVER_SIGNOFF notify in the
310           server.  Affected file is silcd/server.c.
311
312         * Added silc_server_send_notify_args into silcd/packet_send.[ch].
313           Added also silc_notify_payload_encode_args into the
314           lib/silccore/silcnotify.[ch].
315
316         * Implemented ther SERVER_SIGNOFF notify handling in the server.
317           Affected file silcd/packet_receive.c.
318
319         * Implemented the SERVER_SIGNOFF notify handling in the client
320           library.  Affected file lib/silcclient/client_notify.c.  Also,
321           implemnted the printing of the SERVER_SIGNOFF info to the
322           application.  Affected file silc/client_ops.c.
323
324         * The silc_idlist_del_server now returns TRUE or FALSE to indicate
325           if the deleting was successful.  Affected file silcd/idlist.[ch].
326
327         * Added support for public key authentication in the connection
328           authentication protocol in the client library.  Affected file
329           lib/silcclient/protocol.c.
330
331         * Changed the server's silc_idlist_get_clients_by_* interface
332           to support already allocated array so that new entries may be
333           added to pre-allocated array.  Affected file silcd/idlist.[ch].
334           This fixes some bugs with WHOIS, WHOWAS and IDENTIFY commands
335           and command replies.
336
337         * All command reply functions in the server now calls the 
338           pending command callback even if error occured.  This way the
339           error will be delivered to the client as well.  Affected files
340           silcd/command.c and silcd/command_reply.c.
341
342         * Fixed INFO command to return local server's info if no server
343           was provided.  Affected file lib/silcclient/command.c.
344
345         * Removed RESTART command for good.  Updated the code and the
346           protocol specs.
347
348         * Rewrote parts of the task system.  It is a bit simpler now.
349           Removed unsued task priorities. The affected files are
350           lib/silcutil/silctask.[ch].
351
352 Mon Apr  2 20:02:33 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
353
354         * Moved the USERS printing from the library to the application.
355           Affected files lib/silcclient/command.c and silc/client_ops.c.
356
357 Mon Apr  2 13:13:23 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
358
359         * Updated TODO.
360
361         * Added channel key re-key support.  The re-key is perfomed
362           only by the router and is done once in an hour.  Added `rekey'
363           field to the SilcChannelEntry in the server.  Affected files
364           silcd/server.c and silcd/idlist.h.
365
366         * Added silc_task_unregister_by_context into the file
367           lib/silcutil/silctask.[ch].
368
369 Sun Apr  1 19:49:34 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
370
371         * Added SILC_UMODE_GONE mode to indicate when the client is not
372           present in the SILC network.  Added also support to the local
373           command AWAY that will set this mode.  Added support of showing
374           "xxx is gone" in WHOIS command.  The USERS command shows the
375           gone status as well.
376
377         * Fixed setting server and router operator privileges in the
378           server's UMODE command.  Affected file silcd/command.c.
379
380         * Merged the SKE KE1 and KE2 payloads into one payload.  The
381           new KE payload is equivalent to the old KE2 payload.
382
383           Cleaned up the SKE Start Payload parsing.  It now uses the
384           simple buffer unformatting to do the parsing.  A lot faster
385           now.
386
387           Added new Mutual Authentication flag (SILC_SKE_SP_FLAG_MUTUAL)
388           to the SKE that is used to indicate whether both of the SKE
389           parties should perform authentication.  By default only the
390           responder performs authentication.  By setting this flag also
391           the initiator must do authentication.  By default it is unset
392           since in normal SKE case, client to server connection, only
393           the responder should do authentication.  When doing SKE between
394           two clients both should perform authentication.  Updated the
395           code and the protocol specs.
396
397         * A little fix to IDENTIFY command in the server.  Search the
398           client first by hash not nickname.  Affected file is 
399           silcd/command.c.
400
401         * Fixed the silc_client_close_connection to support closing
402           the client to client connections wihtout deleting too much
403           data.  Affected file lib/silcclient/client.c.
404
405         * Fixed a fatal bug in server and client; if KE1 or KE2 packets
406           are received if protocol used to be active but is not anymore
407           the application would crash due to NULL pointer dereference.
408           Affected files silcd/server.c and lib/silcclient/client.c.
409
410         * Added `hash' field to the SilcClientConnection to include
411           the hash function negotiated in the SKE protocol.
412
413         * Added new channel mode SILC_CMODE_FOUNDER_AUTH that is used
414           to set the channel founder authentication data.  A client can
415           claim the founder rights later by providing the authentication
416           data to the CUMODE command using SILC_CUMODE_FOUNDER mode.
417           This way the channel founder can regain the channel founder
418           privileges even it is left the channel.  This works only on
419           local server and the client must be connected to the same
420           server to be able to regain the founder rights.  Updated the
421           protocol specs accordingly.
422
423           Added support to the CMODE command in the client to set the
424           founder auth data.  Read the README to see how to set it.
425
426           Added support to the CUMODE command to claim the founder
427           rights.  Read the README to see how to do it.
428
429           Added support for the founder authentication to the Channel
430           Entry in the server.  Affected file silcd/idlist.h.
431
432           Added support for the SILC_CMODE_FOUNDER_AUTH mode in the
433           server's CMODE command.  Affected file silcd/command.c.
434
435         * Added the following new functions into lib/silccore/silcauth.[ch]:
436           silc_auth_get_method and silc_auth_get_data.    
437
438         * The server now saves the remote hosts public key to the
439           SilcIDListData pointer.  Affected file silcd/protocol.c.
440
441         * The normal server now does not remove the channel entry from
442           the cache if the founder authentication data is set.  It used
443           to remove it if the founder was the last one on the channel on 
444           the server and left the channel.  The auth data is saved and
445           if the channel is re-joined later the old entry is used with
446           the old auth data.  Affected files silcd/command_reply.c and
447           silcd/server.c.
448
449         * Removed the `pkcs' field from the SilcIDListData structure
450           in the server; it is not used.  Affected file silcd/idlist.h.
451
452 Sat Mar 31 15:38:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
453
454         * Fixed packet processing on slow links.  Partial packets were
455           never re-processed because the incoming data buffer was cleared
456           by the application.  Application must not directly clear the
457           sock->inbuf, the packet processing routines handle it.  Fixed
458           this in client library and in server.
459
460 Fri Mar 30 16:35:27 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
461
462         * Fixed the WHOIS and IDENTIFY send reply function to really
463           check whether to send list or just one entry.  Affected file
464           silcd/command.c.
465
466         * Cleaned up the LEAVE command's channel key distribution.  The
467           affected file silcd/command.c.
468
469         * Changed CMODE_CHANGE's <Client ID> to <ID Payload> as server
470           can enforce the channel mode as well.  In that case the ID
471           includes the ID of the server.  The code now enforces the
472           mode change if the router have different mode than the server.
473
474         * The notify client operation with CMODE_CHANGE notify can now
475           return NULL client_entry pointer if the CMODE was not changed
476           by client.  Application must check for this.
477
478         * Added <Server ID> argument to INFO command to support server
479           info fetching by Server ID.
480
481         * Added silc_server_announce_get_channel_users to get assembled
482           packets of channel users of the specified channel.  Affected
483           file silcd/server.[ch].
484
485         * Fixed bug in CHANNEL_CHANGE notify in the server.  The new ID
486           was freed underneath the ID Cache.
487
488         * Re-announce clients when the server received CHANNEL_CHANGE
489           notify from the router.  Affected file silcd/packet_send.c.
490
491 Thu Mar 29 19:10:28 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
492
493         * Fixed a fatal bug when client does /join 1 2 3 4 5 6 the server
494           crashed since it did not handle the fact that there is no cipher
495           called "3" and didn't check the error condition.  Now fixed.
496
497         * Added SILC_MESSAGE_FLAG_REQUEST message flag as generic request
498           flag.  It can be used to send message requests.
499
500 Thu Mar 29 12:26:25 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
501
502         * Implemented the RESTART command in the client.
503
504         * Added SILC_MESSAGE_FLAG_NOTICE message flag for informational
505           notice type messages.  Added notice printing to the user
506           interface.
507
508         * The channel keys are not re-generated if the channel's mode
509           is PRIVKEY, ie private key on the channel exists.  Affected
510           files silcd/server.c and silcd/command.c.
511
512         * Fixed a little bug in channel message delivery when channel
513           private keys are set in the server.  Affected file is
514           silcd/packet_send.c.
515
516         * Changed the setting on channel->on_channel = TRUE from the
517           silc_client_save_channel_key to the JOIN command reply.  The
518           key payload is not received if the private channel key is set.
519           Affected file lib/silcclient/command_reply.c and the
520           lib/silcclient/client_channel.c.
521
522         * When the CMODE_CHANGE notify is sent and the channel private
523           key mode is removed the channel key must be re-generated in
524           other cells as well.  Added this support for the router in the
525           silcd/packet_receive.c.
526
527         * Added new local command NOTICE to send notice message on
528           channel.  Affected file silc/local_command.[ch].
529
530 Wed Mar 28 23:55:54 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
531
532         * Added new local command ME to the client.  It is used to send
533           message to a channel with SILC_MESSAGE_FLAG_ACTION to indicate
534           some action.  Affected file silc/local_command.[ch].
535
536         * Changed channel_message and private_message client operations 
537           to deliver the message flags to the application.  Added also
538           the `flags' arguments to the silc_client_send_channel_message
539           and silc_client_send_private_message functions.  Affected file
540           silcapi.h.
541
542 Wed Mar 28 20:50:47 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
543
544         * Redefined the Private Message Payload to support private message
545           keys and to support the new private message flags.  Updated
546           the protocol specs.  Flags makes it possible to have for example
547           CTCP style messages.
548
549         * Added new type SilcPrivateMessagePayload and defined an API
550           for it in the lib/silcclient/silcprivate.[ch].
551
552         * Tested private message private keys successfully.  Tested the
553           private message key set, unset and list commands with the new
554           KEY command.
555
556         * Redefined the Channel Message Payload to include the channel
557           message flags (equal with private message flags) to support
558           for example CTCP style messages.
559
560         * Defined some of the message (for channel and private message)
561           flags.  Updated the protocol specs and added the flags to the
562           lib/silccore/silcchannel.h.  The type is SilcMessageFlags.
563
564 Wed Mar 28 15:52:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
565
566         * Added SilcKeyAgreementStatus type to the key agreement routines
567           to indicate the current status and error if one occured.
568           The status types are defined in the lib/silcclient/silcapi.h.
569
570         * Added new local command KEY that is used to set and unset private
571           keys for channels, set and unset private keys for private messages
572           with remote clients and to send key agreement requests and
573           negotiate the key agreement protocol with remote client.  The
574           key agreement is supported only to negotiate private message keys,
575           it currently cannot be used to negotiate private keys for channels,
576           as it is not convenient for that purpose.
577
578         * Fixed a minor pending callback setting bug in the function
579           silc_client_get_client_by_id_resolve, now the function works.
580           Affected file lib/silcclient/idlist.c.
581
582         * Added function silc_net_get_local_port to get local bound
583           port by socket.  Added to lib/silcutil/silcnet.[ch].
584
585         * Added `sockets' and `sockets_count' fields to the SilcClient
586           object.  They hold the sockets of the listenning sockets in
587           the client.  Listenning sockets may be for example the key 
588           agreement server.  Affected file lib/silcclient/client.[ch].
589           Added functions the silc_client_add_socket and the
590           silc_client_del_socket.  They are exported to the application
591           as well.
592
593         * Added ~./silc/clientkeys to support other client's public keys.
594
595         * Renamed verify_server_key client operation to verify_public_key
596           and added one argument to indicate the type of the connection
597           (server, client etc.).
598
599 Tue Mar 27 22:22:38 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
600
601         * Added silc_server_connection_auth_request to handle the
602           incoming CONNECTION_AUTH_REQUEST packet.  Affected file is
603           silcd/packet_receive.[ch].
604
605         * Added silc_server_send_connection_auth_request into the
606           silcd/packet_send.c to send the connection auth request packet.
607
608         * Cleaned up the silcd/protocol.c a bit and fixed some memory
609           leaks.
610
611         * Fixed the public key authentication in responder side in the
612           server.  The `auth_data' pointer includes the SilcPublicKey
613           not the path to the public key.  Affected file silcd/protocol.c.
614
615         * Implemented the public key authentication in the initiator side
616           in the server.  Affected file silcd/protocol.c.
617
618         * Removed the [RedirectClient] config section from the server
619           configuration.  Is not needed and I don't want to implement it.
620
621 Tue Mar 27 12:49:56 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
622
623         * Cleaned up the CMODE command in the server.  It now works
624           correctly and supports all the modes defined in the protocol.
625           Affected file is silcd/command.c.
626
627         * Added `hmac_name' field to the SilcChannelEntry in the server
628           to hold the default HMAC of the channel.  It can be set when
629           creating the channel (with JOIN command).  Affected files
630           silcd/idlist.[ch].
631
632         * Added <cipher> and <hmac> argument to the CMODE_CHANGE notify
633           type to indicate the change of the current cipher and hmac
634           on the channel.  Client can safely ignore the <cipher> argument
635           (if it chooses to do so) since the CHANNEL_KEY packet will 
636           force the channel key change anyway.  The <hmac> argument is
637           important since the client is responsible of setting the new
638           HMAC and the hmac key into use.
639
640         * Fixed the CMODE command in the client library as well.
641
642         * Tested CMODE command in router environment successfully.
643
644 Mon Mar 26 14:39:48 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
645
646         * Show the version of the remote client (or server) when connecting
647           to the server.  It is logged to the log file.  Affected file
648           is silcd/protocol.c.
649
650         * Fixed the KILLED notify handling in the client library.  The
651           client must be removed from all channels when receiving the
652           KILLED notify.
653
654           Also, do not remove the client entry when giving the KILL 
655           command but when the KILLED notify is received.
656
657         * Removed silc_idlist_find_client_by_nickname from the server.
658           Not needed anymore.  Affected files silcd/idlist.[ch].
659
660         * Implemented the CHANNEL_CHANGE notify type handling to the
661           server.  Affected file silcd/server.c.
662
663         * Updated TODO.
664
665 Mon Mar 26 12:11:14 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
666
667         * Added silc_server_send_notify_invite to send the INVITE
668           notify between routers.
669
670         * Implemented the INVITE command correctly to the server.
671
672         * Implemented the INVITE notify type handling in the server.
673
674         * Implemented the INVITE command to the client library and on the
675           user interface.
676
677 Sun Mar 25 20:27:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
678
679         * Added function silc_server_get_client_resolve to find the
680           client entry by ID from all ID lists and then resolve it
681           (using WHOIS) if it cannot be found.  Affected file is
682           silcd/server.[ch].
683
684 Sun Mar 25 13:52:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
685
686         * Implemented the BAN command to the client library.
687
688         * The JOIN command in the server now checks the invite list
689           and the ban list.
690
691         * Changed the silc_command_reply_payload_encode_va and the
692           silc_command_payload_encode_va to support that if argument is
693           NULL it ignores and checks the next argument.  Affected file
694           lib/silccore/silccommand.c.
695
696         * Added silc_server_send_notify_ban to send the BAN notify
697           type between routers.
698
699         * Chaned the silc_notify_payload_encode to support that if 
700           argument is NULL it ignores and checks the next argument.
701           Affected file lib/silccore/silcnotify.c.
702
703         * Tested ban lists in router environment successfully.
704
705 Sat Mar 24 14:47:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
706
707         * Implemented BAN command to the server, in silcd/command.[ch].
708
709         * Removed the BAN and INVITE_LIST modes from the CMODE command
710           in the server code.
711
712         * Added function silc_string_match to regex match two strings.
713           Affected files lib/silcutil/silcutil.[ch].
714
715 Fri Mar 23 22:02:40 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
716
717         * Redefined parts of the SilcChannelEntry in the server to support
718           the new ban and invite lists.
719
720 Fri Mar 23 16:25:11 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
721
722         * Redefined the INVITE command.  The same command can be used to
723           invite individuals to the channel but also to manage the invite
724           list of the channel (to add to and remove from the invite list).
725           Updated the protocol specs.
726
727         * Added new command SILC_COMMAND_BAN that can be used to manage
728           the ban list of the channel.  Updated the protocol specs.
729
730         * Removed the channel modes: the SILC_CMODE_BAN and the 
731           SILC_CMODE_INVITE_LIST as they were a bit kludge to be included
732           in the CMODE command.  The equivalent features are now available
733           using INVITE and BAN commands.  Updated the protocol specs.
734
735         * Added new SILC_NOTIFY_TYPE_BAN notify type to notify routers
736           in the network about change in the current ban list.  The notify
737           type is not used by the client.
738
739         * Redefined parts of the SILC_NOTIFY_TYPE_INVITE command to 
740           support the invite lists.
741
742 Thu Mar 22 22:52:23 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
743
744         * Added new function silc_string_regexify that converts string
745           including wildcard characters into regex string that can
746           be used by the GNU regex library.  Added into the file
747           lib/silcutil/silcutil.[ch].
748
749           Added silc_string_regex_combine to combine to regex strings
750           into one so that they can be used as one regex string by
751           the GNU regex library.  Added into the file
752           lib/silcutil/silcutil.[ch].
753
754           Added silc_string_regex_match to match two strings.  It returns
755           TRUE if the strings match.  Added into lib/silcutil/silcutil.[ch].
756
757 Thu Mar 22 15:29:42 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
758
759         * Imported GNU regex to the soruce tree into lib/contrib.
760           Fixed some compiler warning from the regex.c.
761
762 Wed Mar 21 15:27:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
763
764         * Fixed MOTD command in the server to work in router environment.
765
766         * Fixed the MOTD command in the client library to support
767           the server argument in the command.
768
769         * Added `nickname_len' argument to the silc_idlist_add_client
770           in the server, as the `nickname' argument may be binary data
771           (it may be hash).
772
773         * Added silc_idlist_get_channels to return all channels from
774           the ID list.
775
776         * Implemented LIST command to the server.  Affected file is
777           silcd/command.c.
778
779         * Implemented the LIST command to the client library and on the
780           user interface.
781
782         * Added [<user count>] argument to the LIST command reply.
783           With private channels the user count is not shown.
784
785         * Updated TODO and README.
786
787 Tue Mar 20 21:05:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
788
789         * The client entry's data.registered must be TRUE even with
790           global client entry on global client list.  The data.registered
791           is used to check whether the client is anymore in the network,
792           for example with WHOWAS command so it must be valid.
793
794         * Fixed the WHOWAS command in the server.  It now actually works
795           in router environment.  Added function into silcd/command_reply.c
796           silc_server_command_reply_whowas_save.
797
798         * Added silc_idlist_purge function to the silcd/idlist.c
799           to periodically purge the ID Cache.
800
801         * Fixed INFO command in the server.  It works now in router
802           environment.  Added <server name> argument to the INFO command
803           reply.  Updated the protocol specs.
804
805         * Fixed minor bug in silc_idcache_purge to not purge if the
806           expire value is zero.
807
808         * Fixed various bugs in WHOIS and IDENTIFY command handling as
809           they were buggy because of the WHOWAS information.
810
811         * Fixed local command MSG to handle the async resolving of 
812           the remote client properly.  It used to fail the first MSG.
813           Affected file silc/local_command.c.
814
815         * Added `data_len' field to SilcIDCache context.
816
817 Tue Mar 20 16:29:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
818
819         * Update TODO.  Todo in commands in the server.
820
821 Tue Mar 20 15:45:14 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
822
823         * Added new notify type SILC_NOTIFY_TYPE_UMODE_CHANGE that is
824           used by routers as broadcast packet to inform other routers
825           about the changed user mode.
826
827           Implemented the notify handling in the server.  Affected file is
828           silcd/packet_receive.c.  Added the function 
829           silc_server_send_notify_umode to the silcd/packet_send.[ch].
830
831         * Added new generic Channel Payload and deprecated the New Channel
832           Payload.  The New Channel Payload is now the generic Channel
833           Payload.
834
835         * Added new argument `mode' to the silc_server_send_new_channel
836           as it is required in the Channel Payload now.
837
838         * Renamed the SilcChannelPayload to SilcChannelMessagePayload
839           and created a new and real SilChannelPayload to represent the
840           new generic Channel Payload.  Implemented the encode/decode
841           for Channel Payload.  Affected file lib/silccore/silcchannel.[ch].
842
843         * Added silc_server_get_client_channel_list to return the list
844           of channels the client has joined for WHOIS command reply.
845           Affected file silcd/server.[ch].
846
847         * Implemented the channel list sending in the WHOIS command reply
848           in server and in the client.
849
850           Implemented the channel list displaying on the user interface
851           as well.  Affected file silc/client_ops.c.
852
853         * Added silc_channel_payload_parse_list to parse list of Channel
854           Payloads.  It returns SilcDList list of SilcChannelPayloads.
855           Client for example can use this function to parse the list of
856           channels it receives in the WHOIS command reply.  The caller
857           must free the list by calling silc_channel_payload_list_free.
858           Affected files lib/silccore/silcchannel.[ch].
859
860 Mon Mar 19 21:39:15 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
861
862         * Added one new argument <user mode> to the WHOIS command reply
863           to return the mode of the user in SILC.  Updated the protocol
864           specs.
865
866           Implemented it to the server and client.
867
868 Mon Mar 19 18:43:06 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
869
870         * Fixed the mode printing on the user interface on joining.
871           Affected file silc/client_ops.c.
872
873         * Implemented the UMODE command and user modes in general to the
874           client library and to the user interface.
875
876         * Implemented the UMODE command to the server.
877
878         * The server now sends UNKNOWN_COMMAND error status if client sends
879           unknown command.  Affected file silcd/command.c.
880
881         * All server commands now handle the command identifier the right
882           way when sending the command reply to the client.  The client can
883           use to identify the command replies with the identifier.
884
885 Mon Mar 19 16:13:07 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
886
887         * Added silc_server_get_client_route to resolve the route to
888           the client indicated by the client ID.  Affected file is
889           silcd/server.[ch].
890
891         * Added silc_server_relay_packet as general function to relay
892           packet to arbitrary destination.  This deprecates functions
893           like _send_private_message_key, _relay_notify etc.  Affected
894           file is silcd/packet_send.[ch].
895
896           Removed silc_server_send_key_agreement, 
897           silc_server_send_private_message_key and
898           silc_server_packet_relay_notify functions from the file
899           silcd/packet_send.[ch].
900
901         * Updated TODO.
902
903         * Implemented the SILC_NOTIFY_TYPE_KILLED notify handling in the
904           server.  Affected file silcd/packet_receive.[ch].
905
906         * Implemented the KILL command to the client.  Implemented the
907           SILC_NOTIFY_TYPE_KILLED notify handling in the client library.
908           Affected files lib/silcclient/command[_reply].c and
909           lib/silcclient/client_notify.c.  Implemented the KILL notify
910           printing in the user inteface.
911
912         * Fixed a lot silc_parse_nick memory leaks from the client
913           library in the file lib/silcclient/command.c.
914
915         * Changed the silc_server_send_notify_on_channels's `sender'
916           argument from SilcSocketConnection to SilcClientEntry to 
917           check the sender as entry and not as connection object and not
918           to send to the client provided as argument.  The affected file
919           is silcd/packet_send.[ch].
920
921         * The notify packets that are destined directly to the client used
922           to not to be processed by the server.  Now changed that and the
923           server processes all notify packets.  After relaying the packet
924           to the client the notify packet is processed in the server.
925
926         * The silc_server_free_client_data now checks whether there is
927           pending outgoing traffic for the client and purges the data to
928           the network before removing the client entry.
929
930 Sun Mar 18 21:02:47 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
931
932         * Added SILC_NOTIFY_TYPE_KILLED notify type.  It is sent when
933           an client is killed from the SILC Network.  Updated the protocol
934           specs accordingly.
935
936           Added new function silc_server_send_notify_killed to the
937           silcd/packet_send.[ch].
938
939         * Added function silc_server_packet_relay_notify to relay notify
940           packets that are destined directly to a client.  In this case
941           the server does not process the notify packets but merely relays
942           it to the client.  Affected file silcd/packet_send.[ch].
943
944           Added also silc_server_packet_process_relay_notify to check
945           whereto relay the notify.  Affected file is 
946           silcd/packet_receive.[ch].
947
948         * Implemented the KILL command to the server.
949
950         * Updated TODO.
951
952         * Added the backup schema desgined last fall to the protocol
953           specs for everyone to see.  The specification is in the
954           *-spec-xx.txt draft and the packet type definitions for the
955           backup routers is in *-pp-xx.txt draft.  Thusly, added also
956           new packet type SILC_PACKET_CELL_ROUTERS.
957
958         * A big security problem in the implementation discovered.  The
959           signoff of an client did not cause new channel key generation
960           which it of course should've done.  The channel keys must be
961           always re-generated when client leaves (or signoffs) the channel.
962           The silc_server_remove_from_channels funtion now handles
963           the channel key re-generation.
964
965         * Added `sender' argument to the silc_server_send_notify_on_channels
966           to not to send the client provided as argument.  Affected file
967           silcd/packet_send.[ch].
968
969 Fri Mar 16 15:52:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
970
971         * Implemented OPER and SILCOPER commands into the server and
972           the client library.
973
974         * Added silc_auth_verify and silc_auth_verify_data to verify
975           the authentication directly from the authentication payload.
976           It supports verifying both passphrase and public key based
977           authentication.  Affected file lib/silccore/silcauth.[ch].
978
979         * Added `hash' field to the SilcIDListData structure.  It is the
980           hash negotiated in the SKE protocol.  Affected file is
981           silcd/idlist.[ch].
982
983         * Slight redesigning of the SilcAuthPayload handling routines.
984           Do not send SilcPKCS but SilcPublicKey as argument.
985
986         * Implemented the public key authentication support to the
987           serverconfig.  The public key is loaded from the provided path
988           and saved as authentication data to void * pointer.  Thus,
989           changed the unsigned char *auth_data to void *auth_data;
990
991         * Fixed SHUTDOWN command to send the reply before the server
992           is shutdown. :)  Affected file silcd/command.c.
993
994         * Fixed fatal bug in CONNECT command.  The hostname was invalid
995           memory and server crashed.  Affected file silcd/command.c.
996
997         * Fixed fatal bug in CLOSE command.  The server_entry became
998           invalid but was referenced later in the command.  Affected file
999           silcd/command.c.
1000
1001 Thu Mar 15 12:46:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1002
1003         * Fixed fatal bug in failure packet handling.  Server ignored
1004           the failure and thus crashed when it came.
1005
1006         * Updated TODO.
1007
1008 Wed Mar 14 20:37:35 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1009
1010         * Added new SILC_CF_LAG_STRICT command flag that strictly forces
1011           that the command may be executed only once in (about) 2 seconds.
1012           The old SILC_CF_LAG flag is same but allows command bursts up
1013           to five before limiting.
1014
1015           Added the support for CF_LAG and CF_LAG_STRICT flags to the
1016           server code.  Various commands now includes the CF_LAG_STRICT
1017           flag to disallow any kind of miss-use of the command.
1018
1019         * Fixed the silc_buffer_unformat to not to allocate any data
1020           if the length of the data is zero.  It used to allocate the
1021           length + 1.  Affected file lib/silcutil/silcbuffmt.c.
1022
1023 Wed Mar 14 16:10:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1024
1025         * Changed the format of AdminConnection configuration section
1026           in the server.  Added username of the admin to the format.
1027           Affected files silcd/serverconfig.[ch].
1028
1029           Added silc_server_config_find_admin into silcd/serverconfig.[ch]
1030           to return admin configuration data by host, username and/or
1031           nickname.
1032
1033 Wed Mar 14 13:18:16 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1034
1035         * Implemented WHOWAS command to the server.  Added the functions:
1036
1037           silc_server_command_whowas_parse,
1038           silc_server_command_whowas_send_reply,
1039           silc_server_command_whowas_from_client and
1040           silc_server_command_whowas_from_server
1041
1042         * Added <Client ID> argument to the WHOWAS command reply.  Updated
1043           the protocol specs accordingly.
1044
1045         * Implemented WHOWAS command and command_reply to the client
1046           library.
1047
1048           Implemented the WHOWAS printing on the user interface.
1049
1050 Tue Mar 13 22:17:34 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1051
1052         * Added new argument to the WHOWAS command reply, the real name.
1053           It is an optional argument.  Updated the protocol specs.
1054
1055         * Added SilcIDCacheDestructor callback that is registered when
1056           the SilcIDCache is allocated.  The callback is called when
1057           an cache entry in the ID Cache expires, or is purged from the
1058           cache.  Added into lib/silccore/idcache.[ch].
1059
1060           Added silc_idlist_client_destructor to the silcd/idlist.[ch]
1061           to destruct the client entries when the cache entry expires.
1062           Other ID Cache's in server and in the client library ignores
1063           the destructor.
1064
1065         * If the ID Cache entry's `expire' field is zero then the entry
1066           never expires.  Added boolean `expire' argument to the
1067           silc_idcache_add function in the lib/silccore/idcache.[ch].
1068           If it is TRUE the default expiry value is used.
1069
1070         * Added silc_server_free_client_data_timeout that is registered
1071           when client disconnects.  By default for 5 minutes we preserve
1072           the client entry for history - for WHOWAS command.
1073
1074 Tue Mar 13 13:26:18 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1075
1076         * Added support to the server to enforce that commands are not
1077           executed more than once in 2 seconds.  If server receives 
1078           commands from client more frequently, timeout is registered
1079           to process the commands.  Affected file silcd/command.c.
1080           Added new function silc_server_command_process_timeout.
1081
1082         * Changed NICK_NOTIFY handling in client library to check that
1083           if the client's nickname was changed, so there is no need to
1084           resolve anything from the server.
1085
1086         * Removed error printing from the WHOIS and IDENTIFY commands.
1087           If error occurs then it is ignored silently in the client library.
1088           The application, however, may map the received error to 
1089           human readable error string.  The application currently maps
1090           the NO_SUCH_NICKNAME error to string.
1091
1092         * Made the command status message public to the application.  Moved
1093           them from lib/silcclient/command_reply.c to 
1094           lib/silcclient/command_reply.h.  The application can map the
1095           received command status to the string with the
1096           silc_client_command_status_message function.
1097
1098         * Added check to the server to check that client's ID is same
1099           as the Source ID in the packet the client sent.  They must
1100           match.
1101
1102 Tue Mar 13 12:49:21 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1103
1104         * Added dist-bzip hook to the Makefile.am to make bzip2
1105           compressed distributions.
1106
1107 Mon Mar 12 18:43:38 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1108
1109         * Server now enforces the maximum length for the nickname and
1110           the channel as protocol specification dictates.  128 bytes for
1111           nickname and 256 bytes for channel name.
1112
1113         * Moved the WHOIS printing to the application.  The client libary
1114           does not print out the WHOIS information anymore, the application
1115           must do it.  Renamed silc_client_command_reply_whois_print to
1116           the silc_client_command_reply_whois_save.
1117
1118           The client's idle time is also sent to the application now, and
1119           the idle is shown on screen.
1120
1121         * Added silc_client_command_reply_identify_save to save the
1122           received IDENTIFY entries.
1123
1124         * Do not check for channel private keys in message sending and
1125           reception if the channel does not have the PRIVKEY mode set.
1126           Affected file lib/silclient/client_channel.c.
1127
1128 Sun Mar 11 20:25:06 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1129
1130         * Fixed a minor bug if WHOIS and IDENTIFY command parsing that
1131           just surfaced after chaning the JOIN procedure.
1132
1133 Sun Mar 11 14:59:05 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1134
1135         * Added silc_client_get_clients_by_list to get client entries
1136           from Client ID list, that is returned for example by JOIN
1137           and USERS command replies.  The application should use this
1138           function for example when JOIN command reply is received to
1139           resolve the clients already on the channel (library does not
1140           do that anymore as USERS command reply is not used in the JOIN
1141           procedure anymore).  Affected files lib/silcclient/silcapi.h and
1142           lib/silcclient/idlist.c.
1143
1144         * JOIN command reply and USERS command reply returns now SilcBuffer
1145           pointers instead of unsigned char pointers when returning
1146           the client list and mode list.
1147
1148         * Added <Client ID> argument to the JOIN command reply, mainly
1149           for the server to identify for which client the command was
1150           originally sent.  Updated protocol specs accordingly.
1151
1152         * Added SilcDlist private_key pointer to the SilcChannelEntry
1153           in the client to support the channel private keys.  Affected
1154           file is lib/silcclient/idlist.h.
1155
1156         * Added SilcChannelPrivateKey argument to the function
1157           silc_client_send_channel_message so that application can choose
1158           to use specific private ke if it wants to.  If it is not provided,
1159           the normal channel key is used, unless private keys are set. 
1160           In this case the first (key that was added first) is used 
1161           as the encryption key.
1162
1163         * Implemented the support for channel private key handling.
1164           Implemented the following functions:
1165
1166           silc_client_add_channel_private_key,
1167           silc_client_del_channel_private_keys,
1168           silc_client_del_channel_private_key,
1169           silc_client_list_channel_private_keys and
1170           silc_client_free_channel_private_keys
1171
1172           Affected file lib/silcclient/client_channel.c.
1173
1174         * Added the support for the private keys in the channel message
1175           sending and encryption and in the message reception and
1176           decryption.  Affected funtions are
1177           silc_client_send_channel_message and silc_client_channel_message.
1178
1179 Sat Mar 10 21:36:22 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1180
1181         * Added SKE's key verify callback to the client library's
1182           KE protocol context. Affected files lib/silcclient/protocol.[ch].
1183
1184         * Removed the statement that server (or router) must send USERS
1185           command reply when joining to the channel so that the client
1186           knows who are on the channel.  Instead, the client list and 
1187           client's mode list is now sent in the JOIN command reply to the
1188           client who joined channel.  This is better solution.
1189
1190         * Added function silc_server_get_users_on_channel and function
1191           silc_server_save_users_on_channel to the silcd/server.[ch].
1192
1193         * Removed function silc_server_command_send_users from the
1194           silcd/command.c.
1195
1196         * Do not show topic on the client library anymore.  The topic is
1197           sent in the command reply notify to the application and the
1198           application must show the topic now.
1199
1200 Sat Mar 10 00:07:37 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1201
1202         * Added client searching by nickname hash into the IDENTIFY and
1203           WHOIS commands in the server as they were clearly missing from
1204           them.  Affected file is silcd/command.c.
1205
1206         * Fixed a bug in private message receiving in the client library.
1207           The remote ID was freed and it wasn't supposed, now it is
1208           duplicated.
1209
1210 Fri Mar  9 12:40:42 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1211
1212         * Minor fix to the channel payload; allocate the data area, as it
1213           needs to be of specific length.
1214
1215         * If the key agreement port is zero then the operating
1216           system will define the bound port.  Affected files are
1217           lib/silcclient/silcapi.h and lib/silcclient/client_keyagr.c.
1218
1219         * Added new function silc_channel_payload_decrypt into the file
1220           lib/silccore/silcchannel.[ch].
1221
1222         * Moved the channel message etc, check from silc_packet_decrypt
1223           to applications.  The library calls now a generic 
1224           SilcPacketCheckDecrypt callback which is to return TRUE or FALSE
1225           when the packet is either normal or special.  This was done to
1226           allow more wide range of checking that was not allowed when
1227           the code was in library.  Now applications can do virtually any
1228           checks to the packet and return to the library the decision how
1229           the packet should be processed.  Affected files are
1230           lib/silccore/silcpacket.[ch].
1231
1232           Added silc_server_packet_decrypt_check to the server and
1233           silc_client_packet_decrypt_check to the client library.
1234
1235         * Added silc_server_packet_send_srcdest into silcd/packet_send.[ch]
1236           to send with specified source and destination information.
1237
1238         * Channel message delivery between routers was broken after the
1239           channel key distribution was fixed earlier.  The channel key
1240           was used be to distributed to other routers as well which is not
1241           allowed by the protocol.  Now this is fixed and channel keys
1242           really are cell specific and the channel message delivery between
1243           routers comply with the protocol specification.
1244
1245         * Fixed various commands in server to check also the global list
1246           for the channel entry and not just the local list.  The affected
1247           file silcd/command.c.
1248
1249 Thu Mar  8 21:39:03 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1250
1251         * Added assert()s to buffer formatting and unformatting routines
1252           to assert (if --enable-debug) when error occurs.  Affected
1253           file: lib/silcutil/silcbuffmt.c.
1254
1255         * Changed to auto-reconnect to check whether the remote host is
1256           router and register the re-connect timeout if it is.  It used 
1257           to check that whether we are normal server, but router must do
1258           auto-reconnect with another router as well.  Affected file
1259           silcd/server.c.
1260
1261         * Removed the [<key len>] option from CMODE command as the cipher
1262           name decides the key length, nowadays.  See the defined ciphers
1263           from the protocol specification.
1264
1265         * Added [<hmac>] option to the CMODE command to define the HMAC
1266           for the channel.  Added SILC_CMODE_HMAC channel mode.
1267
1268         * Added [<hmac>] option for the JOIN command so that user can
1269           select which HMAC is used to compute the MACs of the channel
1270           messages.
1271
1272         * Added Hmac field to the Channel Message Payload.  The integrity
1273           of plaintext channel messages are now protected by computing
1274           MAC of the message and attaching the MAC to the payload.  The
1275           MAC is encrypted.  Now, it is clear that this causes some
1276           overhead to the size of the packet but rationale for this is that
1277           now the receiver can verify whether the channel message decrypted
1278           correctly and also when private keys are set for the channel the
1279           receiver can decrypt the packet with several keys and check from
1280           the MAC which key decrypted the message correctly.
1281
1282         * Added silc_cipher_encrypt and silc_cipher_decrypt into the
1283           lib/silccrypt/silccipher.[ch].
1284
1285         * Added silc_hash_len to return the digest length into the
1286           lib/silcrypt/silchash.[ch].
1287
1288         * Rewrote parts of Silc Channel Payload interface in the
1289           lib/silccore/silcchannel.[ch].  The encode function now also
1290           encrypts the packet and parse function decrypts it.
1291
1292 Wed Mar  7 20:58:50 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1293
1294         * Fixed a minor formatting bug in the SKE's key material processing.
1295           It actually might have processed the keys wrong way resulting
1296           into wrong keys.
1297
1298         * Redefined the mandatory HMAC algorithms and added new algorithms.
1299           Added hmac-sha1-96 and hmac-md5-96 which are normal hmac-sha1
1300           and hmac-md5 truncated to 96 bits.  The mandatory is now 
1301           hmac-sha1-96.  Rest are optional (including the one that used
1302           to be mandatory).  Rationale for this is that the truncated HMAC
1303           length is sufficient from security point of view and can actually
1304           make the attack against the HMAC harder.  Also, the truncated
1305           HMAC causes less overhead to the packets.  See the RFC2104 for
1306           more information.
1307
1308         * Added new [hmac] configuration section.  The SKE used to use
1309           the hash names (md5 and sha1) in the SKE proposal as HMCAS which
1310           is of course wrong.  The official names that must be proposed in
1311           the SKE are the ones defined in the protocol specification
1312           (hmac-sha1-96 for example).  The user can configure any hmac
1313           using any hash function configured in the [hash] section.  At
1314           least, the mandatory must be configured.
1315
1316           Rewrote the HMAC interface in lib/silccrypt/silchmac.[ch].
1317
1318         * Added HMAC list to the SKE proposal list.  It has now both
1319           hash algorithm list and HMAC list.  This makes the protocol
1320           incompatible with previous versions.  The SKE now seems to work
1321           the way it is supposed to work, for the first time actually.
1322
1323         * Defined plain Hash algorithms to the protocol specification.
1324           Added sha1 and md5.
1325
1326 Tue Mar  6 15:36:11 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1327
1328         * Implemented support for key agreement packets into the server.
1329           Added functions silc_server_key_agreement and
1330           silc_server_send_key_agreement.  Other than these functions,
1331           server has nothing to do with this packet.
1332
1333         * Added support for private message key packets into the server.
1334           Added functions silc_server_private_message_key and
1335           silc_server_send_private_message_key.
1336
1337         * Updated TODO.
1338
1339         * Changed the silc_[client|server]_protocol_ke_set_keys to be
1340           called in the protocol's final callback instead in the END
1341           protocol state.  This makes a little more sense and in the same
1342           time in client we can use the same protocol routines for normal
1343           key exchange and to key agreement packet handling as well.
1344
1345         * Added to both client's and server's KE protocol context the
1346           SilcSKEKeyMaterial pointer to save the key material.  We will
1347           bring the key material to the protocol's final callback by doing
1348           this.  The final callback must free the key material.
1349
1350         * Added SKE's packet_send callback into client's KE protocol
1351           context so that the caller can choose what packet sending function
1352           is used.  This way we can use different packet sending when
1353           doing normal SKE when doing key agreement packet handling (in
1354           the key agreement packet handling we do not want to encrypt
1355           the packets).
1356
1357         * Implemented the responder side of the key agreement routines
1358           in the client.  The client can now bind to specified port and
1359           accept incoming key negotiation.  The key material is passed
1360           to the application after the protocol is over.
1361
1362         * Implemented the processing of incoming Key Agreement packet
1363           in the client.  Added function silc_client_key_agreement to
1364           process the packet.
1365
1366         * Implemented the intiator side of the key agreement routines
1367           in the client.  The client can now initiate key agreement with
1368           another remote client.  The key material is passed to the
1369           application after the protocol is over.
1370
1371         * Created client_keyagr.c to include all the key agreement 
1372           routines.
1373
1374         * Added macro SILC_TASK_CALLBACK_GLOBAL which is equal to the
1375           SILC_TASK_CALLBACK except that it is not static.
1376
1377         * Created client_notify.c and moved the Notify packet handling
1378           from the client.[ch] into that file.
1379
1380         * Created client_prvmsg.c and moved all private message and
1381           private message key routines from the client.[ch] into that file.
1382
1383         * Create client_channel.c and moved all channel message and
1384           channel private key routines from the client.[ch] into that file.
1385
1386         * Changed silc_client_get_client_by_id_resolve to resolve with
1387           WHOIS command instead of IDENTIFY command, in the file
1388           lib/silclient/idlist.c.
1389
1390 Mon Mar  5 18:39:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1391
1392         * Implemented the SKE's responder side to the Client library.
1393
1394         * When FAILURE is received to the protocol do not trust it
1395           blindly.  Register a timeout to wait whether the remote closes
1396           the connection as it should do it, only after that process the
1397           actual failure.  This was changed to both client and server.
1398
1399         * Added client_internal.h to include some of the structures
1400           there instead of client.h in lib/silcclient/.
1401
1402         * Added function silc_task_unregister_by_callback to unregister
1403           timeouts by the callback function.
1404
1405 Sat Mar  3 19:15:43 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1406
1407         * Some "Incomplete WHOIS info" errors has been appearing on the
1408           log files.  Took away the entry->userinfo check from WHOIS
1409           reply sending.  The entry->userinfo is now " " if client did not
1410           provide one.  I thought this was fixed earlier but something
1411           is wrong still.  Let's see if the error still appears.
1412
1413 Wed Feb 28 20:56:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1414
1415         * Fixed a minor bug in the login when the channel key is
1416           re-generated in the server.  It used to generate the key in
1417           wrong order and thus caused problems in the channel traffic.
1418
1419         * Fixed a minor bug in channel key distsribution after
1420           KICK command.  The key was not sent to the router even though
1421           it should've been.
1422
1423 Tue Feb 27 20:24:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1424
1425         * Added silc_ske_process_key_material_data as generic routine
1426           to process any key material as the SILC protocol dictates.  The
1427           function is used by the actual SKE library but can be used by
1428           applications as well.  This relates to the private message keys
1429           and the channel private keys since they must be processed the
1430           same way the normal SILC session keys.  The protocol dictates
1431           this.  Affected files: lib/silcske/silcske.[ch].
1432
1433           Added also silc_ske_free_key_material to free the
1434           SilcSKEKeyMaterial structure.
1435
1436         * Defined silc_cipher_set_key function to set the key for
1437           cipher without using the object's method function.  The affected
1438           files: lib/silccrypt/silccipher.[ch].
1439
1440         * Implemented silc silc_client_add_private_message_key,
1441           silc_client_add_private_message_key_ske, 
1442           silc_client_del_private_message_key,
1443           silc_client_list_private_message_keys and
1444           silc_client_free_private_message_keys functions in the
1445           client library.
1446
1447           Added functions silc_client_send_private_message_key to send
1448           the Private Message Key payload and silc_client_private_message_key
1449           to handle incoming Private Message Key payload.
1450
1451         * Added Cipher field to the Private Message Key payload to set
1452           the cipher to be used.  If ignored, the default cipher defined
1453           in the SILC protocol (aes-256-cbc) is used.
1454
1455 Tue Feb 27 13:30:52 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1456
1457         * Removed lib/silcclient/ops.h file.
1458
1459           Redefined parts of the SILC Client Library API. Created new
1460           file silcapi.h that deprecates the ops.h file and defines the
1461           published Client Library API.  Defined also private message key
1462           API and channel private key API into the file.
1463
1464           This is the file that the application must include from the
1465           SILC Client Library.  Other files need not be included by
1466           the application anymore.
1467
1468         * Added new key_agreement client operation callback and also
1469           defined the Key Agreement library API for the application.
1470
1471 Tue Feb 27 11:28:31 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1472
1473         * Added new packet type: SILC_PACKET_KEY_AGREEMENT.  This packet
1474           is used by clients to request key negotiation  between another
1475           client in the SILC network.  If the negotiation is started it
1476           is performed using the SKE protocol.  The result of the
1477           negotiation, the secret key material, can be used for example
1478           as private message key.
1479
1480           Implemented the Key Agreement payload into the files
1481           lib/silccore/silauth.[ch].
1482
1483 Mon Feb 26 12:13:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1484
1485         * Redefined ciphers for the SILC protocol.  Added some new ciphers
1486           and defined the key lengths for the algorithms.  Changed the
1487           code accordingly.  The default key length is now 256 bits.
1488
1489         * Fixed SKE key distribution function silc_ske_process_key_material
1490           when the key length is more than 128 bits.  The default key 
1491           length in SILC is now 256 bits.
1492
1493         * Added new command status type: SILC_STATUS_ERR_UNKOWN_ALGORITHM
1494           to indicate unsupported algorithm.
1495
1496         * Renamed rijndael.c to aes.c and all functions as well.
1497
1498         * Fixed a long standing channel key setting bug in client library.
1499           Weird that it has never surfaced before.
1500
1501         * Fixed bug in channel deletion.  If the entire channel is removed
1502           then it must also delete the references of the channel entry
1503           from the client's channel list as the client's channel entry and
1504           the channel's client entry share same memory.
1505
1506 Sun Feb 25 20:47:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1507
1508         * Implemented CONNECT and SHUTDOWN commands in the client.
1509
1510         * Implemented CLOSE command to the client.
1511
1512         * Added the function silc_idlist_find_server_by_name into the
1513           files silcd/idlist.[ch].
1514
1515           Added the function silc_idlist_find_server_by_conn into the
1516           files silcd/idlist.[ch].
1517
1518 Sat Feb 24 23:45:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1519
1520         * DIE command was renamed to SHUTDOWN.  Updated the both code
1521           and protocol specs.
1522
1523         * Defined SILC_UMODE_NONE, SILC_UMODE_SERVER_OPERATOR and
1524           SILC_UMODE_ROUTER_OPERATOR modes into lib/silccore/silcmode.h.
1525
1526         * Implemented CONNECT, CLOSE and SHUTDOWN commands to the server
1527           side.
1528
1529         * Added function silc_server_create_connection function to create
1530           connection to remote router.  My server implementation actually
1531           does not allow router to connect to normal server (it expects
1532           that normal server always initiates the connection to the router)
1533           so the CONNECT command is only good for connecting to another
1534           router.
1535
1536 Sat Feb 24 16:03:45 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1537
1538         * Added SILC_NOTIFY_TYPE_KICKED to indicate that the client
1539           or some other client was kicked from the channel.
1540
1541           Implemented the handling of the notify type to both client
1542           and server.
1543
1544           Implemented silc_server_send_notify_kicked to send the KICKED
1545           notify.  It is used to send it to the server's primary router.
1546
1547         * Implemented the KICK command into server and client.
1548
1549         * Added `query' argument to the silc_idlist_get_client function
1550           to indicate whether to query the client from server or not if
1551           it was not found.
1552
1553         * Added new command status type SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
1554           to indicate that the client is not channel founder.
1555
1556         * Updated TODO.
1557
1558 Sat Feb 24 00:00:55 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1559
1560         * Removed the rng context from SilcPacketContext structure and
1561           changed that the packet routine uses the Global RNG API.
1562
1563 Fri Feb 23 11:22:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1564
1565         * Added support for quit message that client can "leave" on the
1566           channel when it quits the SILC.  It is ditributed inside the
1567           SILC_NOTIFY_TYPE_SIGNOFF notify type.
1568
1569           Added silc_server_free_client_data that will take the
1570           signoff message as argument.
1571
1572         * Changed SKE routines to use the silc_pkcs_sign/verify routines.
1573
1574 Thu Feb 22 23:05:36 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1575
1576         * Updated parts of the protocol specification to keep it up
1577           to date.
1578
1579 Thu Feb 22 15:08:20 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1580
1581         * Added List flag (SILC_PACKET_FLAG_LIST) to indicate list of
1582           payloads in one packet.
1583
1584         * Deprecated following packet types: NEW_ID_LIST, NEW_CHANNEL_LIST,
1585           NEW_CHANNEL_USER_LIST, SET_MODE and SET_MODE_LIST.  List packets
1586           use now the new List flag.
1587
1588         * Also deprecated the following packet types: REPLACE_ID,
1589           NEW_CHANNEL_USER and REMOVE_CHANNEL_USER packet types.
1590          
1591         * Added list support for Notify packet in server.
1592
1593         * Added silc_server_send_notify_channel_change to send the
1594           CHANNEL_CHANGE notify type to replace channel ID's.  Deprecates
1595           the silc_server_send_replace_id.
1596
1597         * Added silc_server_send_notify_nick_change to send the
1598           NICK_CHANGE notify type.  Deprecates the function
1599           silc_server_send_replace_id.
1600
1601         * Added silc_server_send_notify_join to send the JOIN notify type.
1602           Deprecates the function silc_server_send_new_channel_user.
1603
1604         * Added silc_server_send_notify_leave to send LEAVE notify type.
1605           Deprecates the function silc_server_send_remove_channel_user.
1606
1607         * Added silc_server_send_notify_cmode and 
1608           silc_server_send_notify_cumode to send CMODE and CUMODE notify
1609           types.  Deprecates the silc_server_send_set_mode function.
1610
1611         * Added SERVER_SIGNOFF notify type to indicate that server has
1612           quit.  This means that all clients on the channel from that 
1613           server will drop.  This can be also used when netsplit happens.
1614
1615           Deprecated REMOVE_ID packet type since it is not needed anymore
1616           even from server.
1617
1618           Added silc_server_send_notify_server_signoff to send the
1619           SERVER_SIGNOFF notify type.  Deprecates the function
1620           silc_server_send_remove_id.
1621
1622           Added also silc_server_send_notify_signoff to send the
1623           SIGNOFF notify type.
1624
1625         * Employed the PKCS #1. It is the mandatory way to do RSA in the
1626           SILC protocol from this day on.  Changed the protocol 
1627           specification as well.
1628
1629         * Added silc_server_send_notify_topic_set to send TOPIC_SET
1630           notify type.  It is used between routers to notify about
1631           topic changes on a channel.
1632
1633         * Added silc_id_dup into lib/silccore/id.[ch] to duplicate
1634           ID data.
1635
1636         * Partly updated the protocol specification to comply with the
1637           changes now made.  It is still though a bit outdated.
1638
1639         * The JOIN notify type now takes one extra argument <Channel ID>.
1640           The packet used to be destined to the channel but now the
1641           JOIN type may be sent as list thus it is impossible to 
1642           destine it to any specific channel.  By adding this argument
1643           it is again possible.
1644
1645 Wed Feb 21 22:39:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1646
1647         * Added CREDITS file.  The CHANGES and CREDITS file will appear
1648           in the distribution as well.
1649
1650 Wed Feb 21 14:17:04 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1651
1652         * Implemented CMODE_CHANGE, CUMODE_CHANGE and TOPIC_SET notify
1653           types in the server's silcd/packet_receive.c.
1654
1655         * Implemented CMODE and CUMODE to work in router environment.
1656
1657         * Fixed minor encoding and decoding buglet from the
1658           lib/silccore/silcmode.c.
1659
1660         * Fixed buffer overflow from lib/silcclient/command.c in USERS
1661           command parsing.
1662
1663 Wed Feb 21 12:44:00 EET 2001  Mika Boström <bostik@lut.fi>
1664
1665         * Changed all SilcConfigServer* and silc_config_server* to
1666           SilcServerConfig* and silc_server_config*, respectively.
1667           Patch by Bostik.
1668
1669 Wed Feb 21 00:10:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1670
1671         * Associated the ID (client or server ID) to the Authentication
1672           Payload to avoid any possibility of forging.  Updated the
1673           protocol specification and the code accordingly.
1674
1675 Tue Feb 20 14:14:14 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1676
1677         * The RSA key length is now save to the RsaKey context in the
1678           key generation process in lib/silccrypt/rsa.c.  The key length
1679           is now used to figure out the maximum size of the block allowed
1680           to be encrypted/signed.
1681
1682         * Added silc_mp_mp2bin_noalloc into lib/silcmath/mpbin.[ch].  It
1683           is equivalent to the silc_mp_mp2bin but does not allocate any
1684           memory.
1685
1686         * Changed silc_mp_mp2bin API to take length argument.  If it is
1687           non-zero then the buffer is allocated that large.  If zero, then
1688           the size is approximated using silc_mp_sizeinbase, which however
1689           is not relieable.
1690
1691         * Created Global RNG API which is global RNG that application can
1692           initialize.  After initializing, any routine anywhere in the
1693           code (including library) can use RNG without allocating a new
1694           RNG object.  This was done to allow this sort of use of the 
1695           RNG in code that has no chance to allocate RNG object.  All
1696           applications currently allocate this and many routines in the
1697           library use this.  Affected file lib/silccrypt/silcrng.[ch].
1698
1699         * Removed the RNG kludge from lib/silcmath/primegen.c and changed
1700           it to use the Global RNG API.
1701
1702         * Defined Authentication Payload into protocol specification that
1703           is used during SILC session to authenticate entities.  It is
1704           used for example by client to authenticate itself to the server
1705           to obtain server operator privileges.
1706
1707           Implemented this payload into the lib/silccore/silcauth.[ch].
1708           Implemented also routines for public key based authentication
1709           as the new protocol specification dictates.
1710
1711           Moved definitions of different authentication methods from
1712           lib/silccore/silcprotocol.h into lib/silccore/silcauth.h.
1713
1714         * Added silc_pkcs_encrypt, silc_pkcs_decrypt, silc_pkcs_sign,
1715           silc_pkcs_verify and silc_pkcs_sign_with_hash and
1716           silc_pkcs_verify_with_hash functions into the file 
1717           lib/silccrypt/silcpkcs.[ch].
1718
1719 Mon Feb 19 19:59:28 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1720
1721         * The client entry's userinfo pointer must be always valid. 
1722           Otherwise the [<unknown>] bug will surface beacuse the WHOIS
1723           will fail since it requires the userinfo.  Now, the userinfo
1724           is allocated as "" if actual userinfo does not exist.  Actually,
1725           it must exist and it is totally Ok to drop client connections
1726           that does not announce the userinfo.  However, we will make
1727           this workaround for now.
1728
1729         * Added silc_net_get_remote_port into lib/silcutil/silcnet.[ch]
1730           to return the remote port by socket.
1731
1732 Mon Feb 19 14:26:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1733
1734         * Changed SILC_SERVER_COMMAND_EXEC_PENDING macro to the name
1735           SILC_SERVER_PENDING_EXEC and added an new macro
1736           SILC_SERVER_PENDING_DESTRUCTOR which is called to free the
1737           data or when error occurs while processing the pending command.
1738
1739           Added new argument `destructor' into silc_server_command_pending
1740           and to the SilcServerCommandPending object.  This destructor is
1741           now called after calling the pending callback or if error occurs
1742           immediately.  If error occurs the actual pending callback won't
1743           be called at all - only the destructor.  The destructor may be
1744           NULL if destructor is not needed.
1745
1746           All this applies for client library code as well.  Similar
1747           changes were made there as well for the pending commands.
1748
1749           In the client, the application must now allocate the 
1750           SilcClientCommandContext with the silc_client_command_alloc
1751           function.
1752
1753         * Added reference counter to the SilcServerCommandContext.  Added
1754           function silc_server_command_alloc and silc_server_command_dup 
1755           functions.
1756
1757           Same type of functions added to the client library for the same
1758           purpose as well.
1759
1760         * Removed the cmd_ident from IDListData away since it is now 
1761           global for all connections.  It is the command identifier used
1762           in command sending and with pending commands.  The affected file
1763           is silcd/idlist.h.
1764
1765         * Added reference counter to the SilcSocketConnection objecet to
1766           indicate the usage count of the object.  The object won't be
1767           freed untill the reference counter hits zero.  Currently only
1768           server uses this, and client ignores it.  The client must be
1769           set to use this too later.  The affected files are
1770           lib/silccore/silcsockconn.[ch].  Added also the function
1771           silc_socket_dup to increase the reference counter.
1772
1773           This was mainly added because it is possible that the socket
1774           is removed underneath of pending command or other async
1775           operation.  Now it won't be free'd and proper DISCONNECTING
1776           flags, etc. can be set to avoid sending data to connection that
1777           is not valid anymore.
1778
1779         * Added SILC_SET_DISCONNECTING to server.c when EOF is read from
1780           the connection.  After that it sets SILC_SET_DISCONNECTED.
1781           It is, however, possible that the socket data is not still freed.
1782           The silc_server_packet_process now checks that data is not
1783           read or written to connection that is DISCONNECTED.  The socket
1784           get's freed when the reference counter hits zero.
1785
1786 Mon Feb 19 00:50:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1787
1788         * Changed the client operation API: channel_message operation's
1789           `sender' is now the client entry of the sender, not the nickname
1790           and the `channel' is the channel entry, not the channel name.
1791
1792           In the private_message operation the `sender' is now also the
1793           client entry of the sender not the nickname.
1794
1795           Affected file is lib/silcclient/ops.h and all applications
1796           using the client operations.
1797
1798 Sat Feb 17 22:11:50 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1799
1800         * Moved the calling of ops->connect() from connect_to_server_final
1801           into receive_new_id functin since that is the point when the
1802           client is actually allowed to send traffic to network.  The
1803           affected file is lib/silcclient/client.c.
1804
1805 Sat Feb 17 13:15:35 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1806
1807         * When receiving NEW_CHANNEL_LIST, NEW_CHANNEL_USER_LIST,
1808           NEW_ID_LIST and SET_MODE_LIST packets, broadcast the list packet
1809           (if needs broadcasting) instead of broadcasting the packets one
1810           by one which would make a burst in the network traffic.
1811
1812         * Added `broadcast' argument to the functions in silcd/server.[ch]
1813           silc_server_create_new_channel[_with_id] to indicate whether
1814           to send New Channel packet to primary router.
1815
1816 Sat Feb 17 01:06:44 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1817
1818         * Added new function into the silcd/server.[ch] files:
1819           silc_server_create_new_channel_with_id to create new channel with
1820           already existing Channel ID.
1821
1822         * Added new packet type SILC_PACKET_SET_MODE_LIST into the file
1823           lib/silccore/silcpacket.h.  This packet is used t send list of
1824           Set Mode payloads inside one packet.  Server uses this to set
1825           the modes for the channels and clients on those channels, that it
1826           announced to the router when it connected to it.  The protocol
1827           specification has been updated accordingly.
1828
1829         * The silc_server_new_channel did not handle the packet coming
1830           from normal server as it normally does not send that.  However,
1831           when it announces its channels it does send it.  Implemented
1832           the support for that.
1833
1834         * Added SILC_ID_CHANNEL_COMPARE macro to compare to Channel ID's
1835           into the file lib/silccore/id.h.
1836
1837 Fri Feb 16 23:57:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1838
1839         * Fixed memory leaks in the functions silc_idlist_del_client,
1840           silc_idlist_del_channel and silc_idlist_del_server in the file
1841           silcd/idlist.c.  All of those leaked like a sieve.
1842
1843         * Fixed some small memory leaks in the client's function
1844           silc_client_notify_by_server.
1845
1846         * Added functions into silcd/server.c: silc_server_announce_clients,
1847           silc_server_announce_channels and silc_server_announce_server.
1848           These functions are used by normal and router server to announce
1849           to its primary router about clients, channels and servers (when
1850           router) that we own.  This is done after we've connected to the
1851           router.
1852
1853           These functions effectively implements the following packet types:
1854           SILC_PACKET_NEW_CHANNEL_LIST, SILC_PACKET_NEW_CHANNEL_USER_LIST
1855           and SILC_PACKET_NEW_ID_LIST.
1856
1857         * Added new functions into the silcd/packet_receive.[ch]:
1858           silc_server_new_id_list, silc_server_new_channel_list and
1859           silc_server_new_channel_user_list to handle the incoming 
1860           NEW_ID_LIST, NEW_CHANNEL_LIST and NEW_CHANNEL_USER_LIST packets.
1861
1862         * Added support of changing Channel ID in the function
1863           silc_server_replace_id.  If the server that announces a channel
1864           to the router already exists in the router (with same name but
1865           with different Channel ID), router is responsible to send
1866           Replace ID packet to the server and force the server to change
1867           the Channel ID to the one router has.
1868
1869         * Added new notify type SILC_NOTIFY_TYPE_CHANNEL_CHANGE to notify
1870           client that the Channel ID has been changed by the router.  The
1871           normal server sends this to the client.  Client must start using
1872           the new Channel ID as the channel's ID.
1873
1874           Implemented handling of this new type into lib/silcclient/client.c
1875           into the function silc_client_notify_by_server.
1876
1877         * Added new function silc_idlist_replace_channel_id into the files
1878           silcd/idlist.[ch] to replace the Channel ID.
1879
1880 Fri Feb 16 14:14:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1881
1882         * Call silc_server_command_identify_check always when processing
1883           the IDENTIFY command in silcd/command.c
1884
1885 Thu Feb 15 20:07:37 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1886
1887         * Added new packet type SILC_PACKET_HEARTBEAT that is used to
1888           send keepalive packets.  The packet can be sent by clients, 
1889           servers and routers.
1890
1891           Added function silc_socket_set_heartbeat into the file
1892           lib/silccore/silcsockconn.[ch] to set the heartbeat timeout.
1893           If not set, the heartbeat is not performed.  The actual 
1894           heartbeat is implemented in the low level socket connection
1895           library.  However, application is responsible of actually
1896           sending the packet.
1897
1898           Added silc_server_send_heartbeat to send the actual heartbeat
1899           packet into silcd/packet_send.[ch].  Server now performs
1900           keepalive with all connections.
1901
1902         * Added silc_task_get_first function into lib/silcutil/silctask.c
1903           to return the timeout task with shortest timeout.  There was a bug
1904           in task unregistration that caused problems.  TODO has been
1905           updated to include that task system must be rewritten.
1906
1907         * The client library will now resolve the client information when
1908           receiving JOIN notify from server for client that we know but
1909           have incomplete information.
1910
1911         * Rewrote parts of silc_server_remove_from_channels and
1912           silc_server_remove_from_one_channel as they did not remove the
1913           channel in some circumstances even though they should've.
1914
1915         * Encryption problem encountered in server:
1916
1917           The LEAVE command used to send the Channel Key packet to the
1918           router immediately after generating it.  However, the code
1919           had earlier sent Remove Channel user packet but not immediately,
1920           ie. it was put to queue.  The order of packets in the router
1921           was that Channel Key packet was first and Remove Channel User
1922           packet was second, even though they were encrypted in the
1923           reverse order.  For this reason, MAC check failed.  Now, this
1924           is fixed by not sending the Channel Key packet immediately but
1925           putting it to queue.  However, this is more fundamental problem:
1926           packets that are in queue should actually not be encrypted 
1927           because packets that are sent immediately gets encrypted
1928           actually with wrong IV (and thus MAC check fails).  So, packets
1929           that are in queue should be encrypted when they are sent to
1930           the wire and not when they put to the queue.
1931
1932           However, the problem is that the current system has not been
1933           designed to work that way.  Instead, the packet is encrypted
1934           as soon as possible and left to the queue.  The queue is then
1935           just purged into wire.  There won't be any fixes for this
1936           any time soon.  So, the current semantic for packet sending
1937           is as follows:
1938
1939           o If you send packet to remote host and do not force the send
1940           (the packet will be in queue) then all subsequent packets to the
1941           same remote host must also be put to the queue.  Only after the
1942           queue has been purged is it safe again to force the packet
1943           send immediately.
1944
1945           o If you send all packets immediately then it safe to send
1946           any of subsequent packets through the queue, however, after
1947           the first packet is put to queue then any subsequent packets
1948           must also be put to the queue.
1949
1950           Follow these rules and everything works fine.
1951
1952 Thu Feb 15 14:24:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1953
1954         * Added new function silc_server_remove_clients_by_server to
1955           remove all client entries from ID list when the server connection
1956           is lost.  In this case it is also important to invalidate all
1957           client entires as they hold the invalid server entry.  This
1958           fixes fatal bug when server has lost connection and will reconnect
1959           again.
1960
1961 Wed Feb 14 16:03:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1962
1963         * Made some sanity checks to silc_server_daemonise like to check
1964           whether the requested user and group actually exists.
1965
1966         * Added sanity check to SKE's silc_ske_responder_finish to check
1967           that the public and private key actually is valid. 
1968
1969         * Invalidate the client's nickname when receiving Replace ID
1970           packet and the Client ID is being replaced.  This means that the
1971           server will query the nickname if someone needs it (client)
1972           a bit later.
1973
1974         * Sort the ID Cache in client library when the ID Cache data
1975           has changed (needs sorting).
1976
1977         * Do not allow for SILC client to create several connections to
1978           several servers.  The client does not support windows right now
1979           and generating multiple connections causes weird behaviour.
1980
1981           Irssi-silc client does support windows and can handle several
1982           connections without problems, see: www.irssi.org and SILC plugin.
1983
1984         * Fixed some places where client was added to the IDList.  The
1985           rule of thumb is following (in order to get everything right):
1986           If the client is directly connected local client then the 
1987           `connection' argument must be set and `router' argument must be 
1988           NULL to silc_idlist_add_client function.  If the client is not
1989           directly connected client then the `router' argument must
1990           bet set and the `connection' argument must be NULL to the
1991           silc_idlist_add_client function.
1992
1993         * The funtion silc_server_packet_send_local_channel actually did
1994           not check whether the client was locally connected or not.  It
1995           does that now.  Fixed a bug related to LEAVE command.
1996
1997         * Fixed Remove Channel User payload parsing bug in server's
1998           silcd/packet_receive.c.  Fixed a bug related to LEAVE command.
1999
2000         * The server's silc_server_save_channel_key now checks also the
2001           global ID list for the channel as it might not be in the local
2002           list.  Fixed a bug related to LEAVE command.
2003
2004         * Is this the end of the [<unknown>] buglet that has been lurking
2005           around for a long time?  A little for loop fix in server's
2006           silc_server_command_whois_parse that is used by both IDENTIFY
2007           and WHOIS command.  At least, this was a clear bug and a cause
2008           of one type of [<unknown>] buglet.
2009
2010         * WHOIS and IDENTIFY commands call the function
2011           silc_server_command_[whois/identify]_check function even if
2012           we are not router server.
2013
2014 Tue Feb 13 19:55:59 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2015
2016         * Added --with-gmp configuration option.  If set the GMP
2017           is always compiled in the SILC source tree.  If not set then
2018           it is checked whether the system has the GMP3 installed.  If
2019           it has then the GMP won't be compiled (the system's headers
2020           and library is used), if it doesn't have it then the GMP is
2021           compiled in the SILC source tree.
2022
2023 Mon Feb 12 11:20:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2024
2025         * Changed RSA private exponent generation to what PKCS #1
2026           suggests.  We try to find the smallest possible d by doing
2027           modinv(e, lcm(phi)) instead of modinv(e, phi).  Note: this is
2028           not security fix but optimization.
2029
2030 Sun Feb 11 18:19:51 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2031
2032         * Added new config entry [Identity] to fork the server and run
2033           it as specific user and group.  A patch from Bostik.
2034
2035         * Imported Dotconf configuration library into lib/dotconf.
2036           This will be used to create the SILC configuration files later.
2037           It will appear in the distsribution after this commit.
2038
2039 Sat Feb 10 21:13:45 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2040
2041         * A big code auditing weekend happening.  Auditing code for 
2042           obvious mistakes, bugs and errors.  Also, removing any code
2043           that is obsolete.
2044
2045           Removed files for being obsolete:
2046
2047           o lib/silcutil/silcbuffer.c (the buffer interface is entirely in
2048           inline in the file lib/silcutil/silcbuffer.h)
2049
2050           o lib/silcutil/silcbufutil.c (the header has inline versions)
2051
2052           Changed code to fix possible error conditions:
2053
2054           o The buffer formatting routines now check that the destination
2055           buffer really has enough space to add the data.  This applies for
2056           both buffer formatting and unformatting 
2057           (lib/silcutil/silcbuffmt.[ch]).  Also, the entire buffer
2058           unformatting was changed to accomodate following rules: 
2059           XXX_*STRING_ALLOC will allocate space for the data into the pointer
2060           sent to the function while XXX_*STRING will not allocate or copy 
2061           the data into the buffer.  Instead it sets the pointer from the
2062           buffer into the pointer sent as argument (XXX_*STRING used to
2063           require that the pointer must be allocated already).  This change
2064           makes this whole thing a bit more consistent and more optimized
2065           (note that the data returned in the unformatting with XXX_*STRING
2066           must not be freed now).  The routines return now -1 on error.
2067
2068           o Tried to find all code that use buffer_format and buffer_unformat
2069           and added return value checking to prevent formatting and
2070           especially unformatting errors and possible subsequent fatal
2071           errors.
2072
2073           o Changed ske->x and ske->KEY to mallocated pointers in
2074           lib/silcske/silcske.h.  Fixed possible data and memory leak.
2075
2076           o Added return value checking to all *_parse* functions.  Fixed
2077           many memory leaks as well.
2078
2079           o Added length argument to silc_id_str2id in lib/silccore/id.[ch]
2080           so that buffer overflows would not happen.  All code now also
2081           checks the return value as it can fail.
2082
2083 Mon Feb  5 20:08:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2084
2085         * Added reconnection support to server if the normal server looses
2086           its connection to the router (for example if router is rebooted).
2087           The server performs normal reconnection strategy implemented
2088           to the server.  Affected file silcd/server.c.
2089
2090 Sun Feb  4 13:18:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2091
2092         * Added new packet type SILC_PACKET_SET_MODE that is used to
2093           distribute the information about changed modes (for clients,
2094           channels and clients channel modes) to all routers in the
2095           network.  Updated the protocol specification accordingly.
2096
2097           Added functions into silcd/packet_send.c and 
2098           silcd/packet_receive.c: silc_server_send_set_mode, 
2099           silc_server_set_mode.
2100
2101           Added new files silcmode.[ch] into lib/silccore that implements
2102           the encoding and decoding of Set Mode Payload.  Added new type
2103           SilcSetModePayload.  Moved the definitions of different modes
2104           from lib/silccore/silcchannel.h into lib/silccore/silcmode.h.
2105
2106 Sat Feb  3 15:44:54 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2107
2108         * Oops, a little mistake in server's connection authentication 
2109           protocol.  The protocol is not ended with FAILURE but with
2110           SUCCESS if the authentication is Ok. :)  Affected file is
2111           silcd/protocol.c.
2112
2113         * Implemented NICK_CHANGE notify handling in server in the file
2114           silcd/packet_receive.c  The NICK_CHANGE notify is distributed to
2115           the local clients on the channel.  After the changing nickname
2116           in router environment snhould work and the [<unknown>] nickname
2117           should appear no more.
2118  
2119           The silc_server_replace_id function that receives the Replace ID
2120           payload now sends the NICK_CHANGE notify type also in the file
2121           silcd/packet_receive.c
2122
2123         * Changed WHOIS and IDENTIFY command to support the maximum amount
2124           of arguments defined in protocol specs (3328 arguments).  This 
2125           fixed a bug that caused problems when there were more than three
2126           users on a channel.
2127
2128 Fri Feb  2 11:42:56 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2129
2130         * Added extra parameter, command identifier, to the
2131           silc_client_send_command so that explicit command identifier
2132           can be defined.
2133
2134           Changed that ID list routines uses specific command identifier
2135           when sending WHOIS/IDENTIFY requests to the server so that they
2136           can be identified when the reply comes back.
2137
2138           Affected files lib/silcclient/command.[ch],
2139           lib/silcclient/client.c and lib/silcclient/idlist.[ch].
2140
2141         * Added `sender' argument to silc_server_packet_send_to_channel
2142           to indicaet the sender who originally sent the packet to us
2143           that we are now re-sending.  Ignored if NULL.  Affected file
2144           silcd/packet_send.[ch].
2145
2146         * Added some server statistics support in silcd/server_internal.h
2147           SilcServerStatistics structure and around the server code.  Also
2148           send some nice statistics information when client is connecting
2149           to the client.
2150
2151 Thu Feb  1 23:31:21 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2152
2153         * Fixed channel ID decoding in server's JOIN command reply in
2154           silcd/command_reply.c
2155
2156         * Fixed braodcasting of replace ID payload to not to send it if
2157           we are standalone server in silcd/packet_receive.c.
2158
2159         * Fixed all channel message sending routines to not to send
2160           packets to clients that has router set, since they are routed
2161           separately in the same function earlier.  Affects file
2162           silcd/packet_send.c and all channel packet sending functions.
2163
2164         * In USERS reply, res_argv[i] are not allocated, the table
2165           is allocated.  Thus changed that free the table, not its
2166           internals.
2167
2168         * In server's whois_check and identify_check if the client is
2169           locally connected do not send any WHOIS commands - they are not
2170           needed.
2171
2172 Thu Feb  1 21:32:27 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2173
2174         * Fixed some minor bugs in client when sending WHOIS command.  The
2175           arguments was in wrong order.
2176
2177         * Removed statis function add_to_channel from server in 
2178           silcd/command.c that was previously used with the joining but
2179           is obsolete now.
2180
2181         * Tested USERS command in router environment successfully with two
2182           routers, two servers and two clients.
2183
2184 Thu Feb  1 00:54:26 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2185
2186         * Reorganized the USERS command and command reply in client library
2187           in lib/silcclient/command.c and lib/silcclient/command_reply.c.
2188           When the command is given by user we register a pending command
2189           callback that will reprocess the command after the reply has been
2190           received from the server.  When reprocessing the packet we then
2191           display the information.  Thus, the USERS information is displayed
2192           now in the command callback instead of in the command reply
2193           callback.  The processing of the command is same as previously
2194           when server has sent the command reply in the JOINing process.
2195
2196         * Added to USERS command in silcd/command_reply.c to join the client,
2197           we didn't use to know about, to the channel after we've created
2198           a client entry for it.  Also, for clienet we did know already still
2199           check whether it is on the channel or not and add it if not.
2200
2201         * Removed silc_server_command_join_notify as the function and its
2202           use was obsolete.
2203
2204 Tue Jan 30 22:39:15 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2205
2206         * Changed the client's pending command handling to the same as the
2207           server's pending command handling.  It is also now possible to
2208           execute command reply functions from other command reply
2209           function as the function callbacks for commands and command
2210           replies are one and same.  The pending commands are not static
2211           list anymore, it is mallocated SilcDList in lib/silcclient/client.h
2212           in client connection context.  Thus, pending commands are server
2213           connection specific as it is convenient.
2214
2215           Changed the function silc_client_command_pending and
2216           silc_client_command_pending_del and added new function
2217           silc_client_command_pending_check.  Removed the 
2218           SILC_CLIENT_CMD_REPLY_EXEC, and SILC_CLIENT_PENDING_COMMAND_CHECK
2219           macros.
2220
2221         * Added cmd_ident, current command identifier, to the client
2222           connection context in lib/silcclient/client.h to keep track on
2223           command identifiers used in command sending.  Client's command reply
2224           function handling now supports the mandatory command identifiers.
2225
2226         * Added SILC_CLIENT_COMMAND_EXEC_PENDING macros to all command reply
2227           funtions in client to fully support pending command callbacks.
2228
2229         * NOTE: the name_list in USERS (old NAMES) command is NOT sent anymore
2230           as one of the arguments to the application in the command reply
2231           client operation.
2232
2233         * NOTE: The FORWARDED flag is depracated.  It used to be depracated
2234           before first releasing SILC but came back.  Now it is removed again
2235           and should come back nomore.  The FORWARDED flag was used only
2236           by the JOINing procedure by forwarding the command packet to router.
2237           Now, the JOINing procedure has been changed to more generic (due
2238           to various router environment issues) and FORWARDED is not needed
2239           anymore for anything.  The protocol specification is yet to be
2240           updated.
2241
2242           Now, removed silc_server_packet_forward from server and the flag
2243           SILC_PACKET_FORWARDED from lib/silccore/silcpacket.h.
2244
2245 Tue Jan 30 00:05:05 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2246
2247         * Renamed NAMES command to USERS command.  The NAMES was named that
2248           due to historical reasons.  Now it is renamed.  Also, rewrote
2249           parts of the USERS command.  The nickname list is not sent anymore
2250           by the server.  Only Client ID and mode lists are sent in the USERS
2251           command.  Changed this also to the protocol specification.
2252
2253           The client now resolves the names and stuff after it receives
2254           the USERS list from the server when joining to the channel.
2255
2256         * WHOIS and IDENTIFY commands has been changed to support multiple
2257           Client ID's per command.  One can now search for multiple users
2258           in the network by sending only one WHOIS or IDENTIFY command.
2259           Changed the code and the protocol specifications.
2260
2261         * Removed silc_server_command_identify_parse and changed that IDENTIFY
2262           uses silc_server_command_whois_parse to parse the request. */
2263
2264         * If normal server, do not parse the WHOIS and IDENTIFY requests
2265           before sending it to the router.  Saves some time.
2266
2267 Sun Jan 28 16:19:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2268
2269         * Fixed JOIN command on client library.  Wrong number of arguments
2270           used to crash the client.
2271
2272         * Added silc_server_channel_has_global function to check whether
2273           channel has global users or not.
2274
2275         * Added silc_server_channel_has_local function to check whether channel
2276           has locally connected clients on the channel.
2277
2278         * The silc_server_remove_from_one_channel now checks whether the
2279           channel has global users or not after given client was removed from
2280           the channel.  It also checks whether the channel has local clients
2281           on the channel anymore.  If it does not have then the channel entry
2282           is removed as it is not needed anymore.
2283
2284         * The silc_server_notify now checks on JOIN notify whether the joining
2285           client is one of locally connected or global.  If it is global then
2286           the channel has now global users on the channel and that is marked
2287           to the channel entry.  Also, it now saves the global client to
2288           global list who is joining and JOINs it to the channel.  This is
2289           for normal server, that is.
2290
2291           Changed silc_server_send_notify_on_channel, 
2292           silc_server_packet_relay_to_channel and 
2293           silc_server_packet_send_to_channel check if we are normal server
2294           and client has router set (ie. global client) do not send the
2295           message to that client, as it is already routed to our router.
2296
2297         * Implemented LEAVE notify type handling in silc_server_notify 
2298           function.
2299
2300         * Tested LEAVE command in router environment successfully.  Tested
2301           with two routers, two servers and two clients.
2302
2303         * Updated TODO.
2304
2305         * idlist_find_xxx_by_id routines now dumps the ID on the debug mode.
2306
2307         * Implemented SIGNOFF notify type handling in silc_server_notify
2308           function.
2309
2310         * silc_server_remove_id now removes the client entry from all channels
2311           it has joined and thusly sends SIGNOFF notify type.
2312
2313         * Rewrote the NAMES list generation in server by removing two excess
2314           loops.  The lists are created now inside one loop.
2315
2316 Sat Jan 27 22:34:56 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2317
2318         * silc_server_remove_channel_user checks now also global list
2319           for channel and client.
2320
2321         * silc_server_new_channel_user checks now both local and global
2322           list for channel and client.  Fixed a bug in client id decoding.
2323           Used to decode wrong buffer.
2324
2325         * silc_server_channel_message checks now both local and global
2326           list for channel entry.
2327
2328         * Tested channel joining (hence JOIN) in router environment
2329           successfully.  Tested with two routers, two servers and two
2330           clients.
2331
2332         * Tested channel message sending in router environment successfully.
2333
2334 Thu Jan 11 03:22:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2335
2336         * Added silc_server_save_channel_key into server.[ch] to save the
2337           received channel key in Channel Key payload processing. It is
2338           also used in JOIN command reply handling.
2339
2340           Equivalent function silc_client_save_channel_key added into
2341           client.[ch] into client library.
2342
2343         * Changed JOIN command reply to send information whether the channel
2344           was created or not (is existing already) and the channel key 
2345           payload.  Changed protocol specs accordingly.
2346
2347         * Fixed bugs in WHOIS and IDENTIFY command reply sending when
2348           the request was sent by ID and not by nickname.  Crashed on
2349           NULL dereference.
2350
2351 Sat Dec 23 21:55:07 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2352
2353         * Fixed a bug in Client library.  IDENTIFY and WHOIS reply functions
2354           now correctly save the received data.
2355
2356         * silc_server_free_sock_user_data now notifies routers in the 
2357           network about entities leaving the network.
2358
2359           At the same time implemented functions silc_server_remove_id
2360           and silc_server_send_remove_id to receive and send REMOVE_ID
2361           packets.  The packet is used to notify routers in the network
2362           about leaving entities.  The ID removed will become invalid in
2363           the network.
2364
2365         * Added function silc_idlist_del_server into server. Removes and
2366           free's server entry from ID list.
2367
2368         * silc_server_private_message function now checks, if we are router,
2369           that the destination ID really is valid ID, naturally.
2370
2371         * In router when NEW_ID packet is received (for new client) the
2372           hash of the Client ID is saved in the ID Cache but the
2373           client->nickname is set to NULL, instead of putting the hash
2374           to it as well.
2375
2376           IDENTIFY command now also checks that client->nickname must be
2377           valid. If it is not if will request the data from the server who
2378           owns the client.  Added new function 
2379           silc_server_command_identify_check.
2380
2381         * Added silc_command_set_command into lib/silccore/silcommand.[ch]
2382           to set the command to already allocated Command Payload.
2383
2384         * Tested private message sending in router environment with two
2385           routers, two servers and two clients.  Fixed minor bugs and now
2386           it works fine.
2387
2388         * Fixed segfault from client's NAMES command. Used to crash if
2389           not on any channel.
2390
2391         * Forwarded packets must not be routed even if it is not destined
2392           to the receiver.  Changed server code comply with this.
2393
2394 Sun Dec 17 14:40:08 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2395
2396         * Added `require_reverse_mapping' boolean value to ServerParams
2397           structure. If TRUE (not default) the server will require that
2398           the connecting host has fully qualified domain name.
2399
2400           If the reverse mapping is not required and hostname could not be
2401           found the IP address is used as hostname.
2402
2403 Sat Dec 16 17:39:54 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2404
2405         * Implemented version string checking to both client and server.
2406           The check is incomplete currently due to the abnormal version 
2407           strings used in development version of SILC.
2408
2409         * Changed all command functions in server to use the new
2410           CHECK_ARGS macro.
2411
2412 Fri Dec 15 15:55:12 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2413
2414         * Changed char *data to unsigned char *data in ID Cache system to
2415           support binary data as ID Cache data. Changed code to support
2416           binary data in lib/silccore/idcache.c.
2417
2418         * Renamed silc_server_packet_relay_command_reply to 
2419           silc_server_command_reply as it is normal packet receiving
2420           function. Rewrote the function to accept command replys for
2421           servers and not only for clients.
2422
2423         * Mark remote router always as registered server if we are connecting
2424           to it.  Otherwise, commands sent by the router to us are ignored.
2425
2426         * All ID List find routines now returns the ID Cache Entry pointer
2427           as well if requested.
2428
2429         * WHOIS command works now in router environment, tested with two
2430           routers, two servers and two clients.
2431
2432         * Cleaned up and rewrote IDENTIFY command. IDENTIFY should work now
2433           in router environment (as it is almost equivalent to WHOIS) but
2434           hasn't been tested thoroughly.  Added new functions:
2435
2436           silc_server_command_identify_parse
2437           silc_server_command_identify_send_reply
2438           silc_server_command_identify_from_client
2439           silc_server_command_identify_from_server
2440
2441         * Disabled route cache adding because adding two different ID's with
2442           same IP replaces the old cache entry thus giving wrong route.
2443           The entry->router->connection is always the fastest route anyway
2444           so route cache may not be needed.  Of course, new routes maybe
2445           established after receiving the ID when the entry->router->connection
2446           might not be anymore the most optimal.
2447
2448 Thu Dec 14 15:55:35 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2449
2450         * Add route cache for received ID for fast routing.
2451
2452         * Added silc_server_packet_route to route received packet on router
2453           that is not destined to us.
2454
2455         * Renamed silc_server_get_route to silc_server_route_get.
2456
2457         * Added id_string and id_string_len fields into SilcServer to
2458           include encoded ServerID for fast comparing without excess
2459           encoding of the ID's.
2460
2461         * Cleaned up WHOIS command on server side. Added following static
2462           functions:
2463
2464           silc_server_command_whois_parse
2465           silc_server_command_whois_check
2466           silc_server_command_whois_send_reply
2467           silc_server_command_whois_from_client
2468           silc_server_command_whois_from_server
2469
2470         * Added macro SILC_SERVER_COMMAND_CHECK_ARGC to check mandatory
2471           arguments in command replies. All command functions should be
2472           updated to use this macro.
2473
2474 Sun Dec 10 23:52:00 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2475
2476         * Minor typo fixes on command reply handling on server.
2477
2478 Tue Nov 28 11:05:39 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2479
2480         * Added silc_server_command_add_to_channel internal routine to add
2481           the client to the channel after router has created the channel and
2482           sent command reply to the server.
2483
2484         * Added generic silc_server_send_command to send any command from
2485           server.
2486
2487         * Use static buffer with ID rendering instead of duplicating data.
2488
2489 Mon Nov 27 21:39:40 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2490
2491         * Fixed a channel user mode bug when joining to a channel server gave
2492           everybody channel founder rights, oops.
2493
2494         * We mark ourselves as the router of the incoming server connection
2495           if we are router ourselves.  This way we can check in some packet
2496           sending functions whether it is locally connected server.  For
2497           incoming router connections we put NULL.
2498
2499         * For router sending packets locally means now always sending the
2500           packet cell wide; to local clients and local servers.  For normal
2501           server sending packet locally means sending it to only local
2502           clients.
2503
2504         * Fixed the JOIN command to really work in router environment.  If the
2505           channel is created it is always created by the router.  Router is
2506           also responsible of making the initial joining to the channel,
2507           sending JOIN notify to the sending server and distributing 
2508           NEW_CHANNEL and NEW_CHANNEL_USER packets.  Hence, if the channel
2509           does not exist server doesn't do anything else but forward the
2510           command to the router which performs everything.
2511
2512         * Added silc_server_send_channel_key function to send the Channel Key
2513           payload.
2514
2515         * Added silc_server_create_channel_key to create new channel key.  The
2516           channel key is now re-generated everytime someone joins or leaves
2517           a channel, as protocol dictates.  Note: channel->key_len is the
2518           key length in bits.
2519
2520 Wed Nov 22 22:14:19 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2521
2522         * Splitted server.[ch] finally.  Created now packet_send.[ch] and
2523           packet_receive.[ch] to separate packet sending and receiving
2524           routines.  The server.[ch] now includes everything else including
2525           actual packet processing (writing and reading data) and other
2526           server issues.
2527
2528           Renamed silc_server_private_message_send_internal to
2529           silc_server_send_private_message.  The routine is still though
2530           used only to relay private messages as server does not send
2531           private messages itself.
2532
2533           Renamed silc_server_new_channel to silc_server_create_new_channel
2534           and added new function sicl_server_new_channel that handles the
2535           incoming New Channel packet.  Added also new sending function
2536           silc_server_send_new_channel to send New Channel Payload.
2537
2538         * Added new function silc_server_notify to process incoming notify
2539           packet to the server/router. Server may then relay the notify
2540           to clients if needed.
2541
2542         * Added new function silc_server_new_channel_user to process incoming
2543           New Channel User packet.  Router will redistribute the packet and
2544           send JOIN notify to its local clients and locally connected servers
2545           if needed.  Normal server will send JOIN notify to its local client
2546           on same channel when received this packet.  Added also corresponding
2547           sending function silc_server_send_new_channel_user to sent the
2548           payload.
2549
2550         * Added boolean route argument to send_notif_to_channel and
2551           packet_send_to_channel functions to attempt to route the packet
2552           if it is TRUE and send only locally if it is FALSE.
2553
2554 Tue Nov 21 19:49:31 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2555
2556         * silc_server_replace_id now broadcasts the received replace ID
2557           packet if it is not broadcast packet already. The router must
2558           broadcast to inform other routers about changed ID.
2559
2560         * Added backpointer to server's router into SilcServer context in
2561           silcd/server_internal.h.
2562
2563         * Fixed silc_server_packet_broadcast to send correct broadcast
2564           packets.
2565
2566         * The channel key is now distributed to the local client as soon
2567           as it is received from the router (in router environment) so that
2568           no other packet may be sent for the channel until client has 
2569           received the key.
2570
2571         * silc_server_remove_channel_user now broadcasts the received
2572           Remove Channel User packet if it is not broadcast packet already.
2573           The router must broadcast to inform other routers about removed
2574           channel user.
2575
2576         * Added users field into SilcPacketContext that is a reference count
2577           of the context.  One can increase the reference count by calling
2578           silc_packet_context_dup which is now changed to just increase the
2579           reference count instead of duplicating the data.  The reference
2580           count is decresed by calling silc_packet_context_free that will
2581           free the data after the reference count hits zero.
2582
2583           For now on the packet context and everything allocated into it
2584           (including the raw packet from network) must be freed by calling
2585           the new silc_packet_context_free function.  Added also new function
2586           silc_packet_context_alloc that must be used now to allocate the
2587           context.  This also means that if a routine is asynchronous from
2588           silc_[client/server]_packet_parse_type the packet context must
2589           be duplicated by calling silc_packet_context_dup.  Otherwise it
2590           gets free'd after silc_[client/server]_packet_parse_type returns.
2591           Also, one must remember that if packet is duplicated then its 
2592           reference count must be decresed by calling the free function as
2593           many times as it was duplicated.
2594
2595         * Changed SilcBuffer field from protocol contexts to SilcPacketContext
2596           from both client and server.
2597
2598 Mon Nov 20 23:47:03 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2599
2600         * Made joining to a channel working in router environment.
2601
2602         * Cleaned up JOIN command on server side and create function
2603           silc_server_command_join_channel internal routine to make the
2604           joining happen.
2605
2606 Thu Nov  9 21:12:39 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2607
2608         * Changed silc_command_pending list to SilcDList.  Also, added
2609           `ident' field to SilcServerCommandPending structure to identify
2610           the reply and to call correct callback.
2611
2612           Added silc_server_command_pending_check function to replace the
2613           corresnponding macro.  The silc_command_pending list is not
2614           extern anymore.
2615
2616         * Added silc_command_set_ident into lib/silccore/silccommand.[ch]
2617           to set identifier to previously allocated Command Payload.  It
2618           is used to set identifier for command when resending Command
2619           Payload.
2620
2621         * Added silc_command_payload_encode_payload to encode Command
2622           Payload buffer from SilcCommandPayload structure.
2623
2624         * Added silc_argument_payload_encode_payload to encode Argument
2625           payload buffer from SilcArgumentPayload structure.
2626
2627 Wed Nov  8 21:03:28 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2628
2629         * Changed WHOIS command to support router connection on server side.
2630           The whois request is always sent to router unless the server is
2631           standalone server.  After server has received the reply from the
2632           router will it send the reply to the client.
2633
2634         * Added silc_server_packet_broadcast into silcd/server.[ch] to
2635           broadcast received broadcast packet.  The function is used only
2636           by router.  The broadcast packet is always sent to the router's
2637           primary route.
2638
2639         * Added silc_id_render function in lib/silcutil/silcutil.[ch] to
2640           render given ID to printable string, for log files for example.
2641
2642 Tue Nov  7 22:14:19 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2643
2644         * Made basic router to router connections working.  At least they
2645           can now connect to each other but nothing really works the way
2646           they are supposed - yet.
2647
2648         * Added new initiator token to RouterConnection configuration
2649           file in silcd/serverconfig.[ch].  It is used to tell whether we
2650           are the initiator to the remote router or whether we'll expect
2651           the other end to connect.
2652
2653         * Moved registering of listener task to silc_server_init, hence
2654           the server starts listenning as soon as it is run, even if it
2655           does not have connections to other routers.  Let's see how well
2656           this will work.
2657
2658         * Changed default connection retry timeouts for more suitable in
2659           silcd/server.h.
2660
2661         * Removed cipher and such arguments from silc_idlist_add_client
2662           and silc_idlist_add_server prototypes from silcd/idlist.[ch].
2663           Added new function silc_idlist_add_data to add the keys and stuff
2664           to any ID entry.
2665
2666         * Added SilcIDListData structure and added it to SilcClientEntry
2667           and SilcServerEntry as their first field in the structure.  This
2668           way we can explicitly cast the ID entries to the SilcIDListData
2669           structure and get common data for the entries.  In past, we had
2670           to first check what type of connection it is and then cast it to
2671           correct ID entry type.  Now, we can directly cast the opaque
2672           pointer to the SilcIDListData (no matter what ID entry it actually
2673           is) and get the data needed.
2674
2675 Mon Nov  6 21:56:12 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2676
2677         * Wow, found a bug in scheduler.  The scheduler uninitialized itself
2678           in some circumstances even if threre were timeout tasks, though not
2679           IO tasks, but tasks anyway.  Now fixed.
2680
2681         * Defined SilcServerConnection structure to hold connection specific
2682           stuff about directly connected servers and routers.  The definition
2683           is currently in silcd/server_internal.h.  I thought about having
2684           a bit more important role fro this struct but for now it is used
2685           only when connecting to other server (or router actually).
2686
2687         * Added connecting retry support in server when connecting to
2688           router(s).  The retry feature implement exponential backoff
2689           algorithm.  Also, added SilcServerParams structure to hold default
2690           parameters for server.  For now, it include these retry settings
2691           and are hard coded.  After server is moded to be as Silc Server
2692           Library this structure will be more important.
2693
2694 Sun Nov  5 22:28:44 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2695
2696         * Changed client librarys channel->clients table to SilcList and
2697           changed code accordingly.
2698
2699 Thu Nov  2 16:28:01 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2700
2701         * Changed client's channel table to SilcList and changed code 
2702           accordingly.  Also changed SilcChannelClientEntry to include back-
2703           pointer to the channel so that client entry can use that structure
2704           as list as well and we have fast cross-reference to the channel.
2705           This change dramatically decreased the complexity of channel
2706           handling with client entry and vice versa (removed one extra
2707           loop when searching for channel entry from many functions).
2708
2709         * Changed server->sim from table to SilcDList and changed code
2710           accordingly.
2711
2712         * NAMES command can now be used from user interface.  It will show
2713           the user list on the channel, neatly.
2714
2715         * Added realname pointer to SilcClientEntry in lib/silcclient/idlist.h.
2716           Code now saves realname of the user if it becomes available.
2717
2718         * Renamed configure.in to configure.in.pre and made ./prepare
2719           script to automatically add correct version string to
2720           configure.in which it creates from configure.in.pre.
2721
2722 Wed Nov  1 17:21:26 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2723
2724         * NAMES command reply now shows users mode with the nickname when
2725           joining to channel.
2726
2727         * Moved silc_client_ch[u]mode[_char] functions from 
2728           silc/clientutil.[ch] to lib/silcclient/client.[ch].  Though, that
2729           place sucks, they are utility functions and should be in some
2730           other file.
2731
2732         * Fixed some unsigned int's to unsigned short's.  Patch by cras.
2733
2734         * Fixed contrib/getopt*.[ch] to not require config.h.  Patch by
2735           cras.
2736
2737 Tue Oct 31 20:10:37 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2738
2739         * Updated README.
2740
2741         * Added TRQ (efficient deque and list library) into lib/trq.  This is
2742           a very good list library that is currently used in the SILC.  Defined
2743           SilcList API over the library because I didn't like the API very
2744           much.  See lib/trq/silclist.h for the API and examples of how to
2745           use the API.  Fixed various places in the code to use the new
2746           SilcList API. The SilcList is meant for lists that has a structure
2747           already defined as a list.  It is not suitable to add just some
2748           context to the list (in TRQ, the context is the list actually).
2749
2750           So, I defined SilcDList that can be used for the purpose where 
2751           predefined list structure does not exit.  This can be used as
2752           such list.  Now some context just can be added to the SilcDList.
2753           Currently this list is not used in the SILC just yet, though there
2754           are a lot places where this can replace dynamically allocated
2755           tables and I will fix these places, later, to use SilcDList.
2756           See lib/trq/silcdlist.h for SilcDList (they are all inline functions,
2757           and use TRQ internally).
2758
2759           Also fixed some annoying warning messages that the original TRQ
2760           code generated.  Also minor changes to TRQ's Makefile.in.
2761
2762         * Added support for querying by Client ID to both WHOIS and 
2763           IDENTIFY commands into server, as required by the protocol.
2764
2765         * Removed method function pointers from SilcBuffer structure. They
2766           weren't used to anything and just increased the context size for
2767           no good reason.  This change also made silc_buffer_alloc and
2768           silc_buffer_free functions inline functions.
2769
2770         * Disabled command flooding detection support until it's fixed so 
2771           that it accepts commands in but does not execute them more than once
2772           in two seconds.
2773
2774         * Added silc_net_localhost(), to return local hostname, into
2775           lib/silcutil/silcnet.[ch].  Also added client->hostname pointer
2776           that must be initialized before calling silc_client_init.
2777
2778         * Added new function: silc_server_send_notify_on_channels to send
2779           notify messages to all channels client has joined.  It is assured
2780           that the message is sent only once per client.
2781
2782         * Moved silc_log_format (from lib/silcutil/silclog.[ch] into
2783           lib/silcutil/silcutil.[ch] as silc_format function.  The new 
2784           function is generic and is used by server as well, not only by
2785           the logging routines.
2786
2787         * Added new SKE status type: SILC_SKE_STATUS_BAD_VERSION to indicate
2788           the provided version string was not acceptable.  Added new function:
2789           silc_ske_check_version into lib/silcske/silcske.h.  The function
2790           must be implemented by the application (client or server) and it
2791           does not reside in the SKE library.  The function checks the version
2792           string remote end sent.
2793
2794         * Added back pointers (to opaque context and to SilcSocketConnection) 
2795           into SilcPacketContext structure into lib/silccore/silcpacket.h.
2796
2797         * Added silc_packet_context_dup into lib/silccore/silcpacket.[ch] to
2798           duplicate packet context structure.
2799
2800         * Changed `notify' client operation to send same arguments as client
2801           receives from server except for ID's.  ID's are mapped to correct
2802           ID entry and that is returned.  Also, if channel entry is not sent
2803           by server but the notify is for channel the channel entry is sent
2804           to application (otherwise application doesn't know that it is for
2805           channel (library gets it from packet's Destination ID)).
2806
2807         * Added silc_client_remove_from_channels into client library to 
2808           remove a client from all channels it has joined to.  Used when 
2809           received SIGNOFF notify from server.  Added also new function
2810           silc_client_replace_from_channels to replace old ID entry with
2811           new ID entry on all channels.  Used when received NICK_CHANGE
2812           notify from server.
2813
2814         * Fixed ID Cache list handling in silc_idlist_get_client in 
2815           lib/silcclient/idlist.c.  Also, added silc_idlist_get_client_by_id
2816           to get (or query) client by ID.
2817
2818         * Updated TODO list.
2819
2820         * Added connection authentication status message defined by the
2821           protocol: SILC_CONN_AUTH_OK and SILC_CONN_AUTH_FAILED and added the
2822           support for these into the code in client and server side.
2823
2824         * Added generic function silc_client_send_command to send any command
2825           with variable argument list.  Application should use this function
2826           to send commands if the command functions provided by the library
2827           does not suite for the application's user interface needs.
2828
2829         * Added new `failure' client operation.  Application is notified about
2830           received failure packet if client is executing a protocol.  In this
2831           case the protocol's execution has failed.
2832
2833         * Added SKE's end notify to send the SKE_SUCCESS notify message that
2834           is required by the protocol.
2835
2836         * Added SILC_PROTOCOL_STATE_FAILURE to indicate received failure
2837           packet from remote.  SILC_PROTOCOL_STATE_ERROR indicates local
2838           error at our end.
2839
2840         * Added status flag to SilcSKE object to indicate realtime status
2841           of the SKE protocol.
2842
2843         * Application receives now exactly same command reply arguments as
2844           the library receives from server.  However, if ID is received the
2845           corresponding ID entry is returned to the application (eg. Client
2846           ID is mapped to correct SilcClientEntry entry and that is returned).
2847           Changed command_reply client operation due to this change.
2848
2849         * Changed all ID's in commands and in command replys as ID Payloads.
2850           Change affected both client and server side codes.
2851
2852           All ID's sent in SILC network (with execption of ID's in SILC
2853           Packet header) are sent in ID Payload to support variable length
2854           ID's.
2855
2856         * Server now notifies nick changes and notifies all clients on
2857           the channels about the new nickname (about the new Client ID,
2858           actually).
2859
2860         * Implemented CMODE command to change channel modes. Supports all
2861           channel modes defined by the protocol specs except ban and invite
2862           lists. (Also, private channel key mode is supported but support for
2863           setting private channel key in client is missing, thus, this mode
2864           has no effect on client side (except that server requires that the
2865           client uses private channel key and normal channel traffic does not
2866           work anymore)).
2867
2868           Also, invite mode works per se, but INVITE command does not work
2869           yet correctly, so you can set channel as invite only channel but
2870           inviting clients to the channel does not work (it is yet to be
2871           thought what's the best way to do it).
2872
2873         * Added new command SILC_COMMAND_CUMODE to change user mode on the
2874           channel.  Defined user modes: CHANNEL_FOUNDER and CHANNEL_OPERATOR.
2875           Implemented CUMODE command to change user's mode on the channel.
2876           Supports all modes defined by the protocol specs.
2877
2878         * Added NAMES command reply to return users modes on the channel.
2879
2880         * Removed unnecessary and slow ciphers from lib/silccrypt.
2881
2882         * Set SO_KEEPALIVE option to connection sockets by default.
2883
2884         * Added new command reply status: SILC_STATUS_USER_NOT_ON_CHANNEL.
2885
2886         * Added notify types: MOTD, CMODE_CHANGE and CUMODE_CHANGE.  Also,
2887           redefined the Notify Payload into protocol specs.
2888
2889         * Added silc_id_payload_parse_id to get ID directly from raw
2890           ID payload data.
2891
2892 Mon Oct  9 20:57:02 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2893
2894         * Changed SILC_COMMAND_IDENTIFY in protocol specification to 
2895           accept searching by Client ID as well.
2896
2897         * Added support for LEAVE and SIGNOFF notify types in client library.
2898
2899         * Added silc_id_payload_parse_data into lib/silccore/silcpayload.[ch]
2900           to parse ID Payload from raw data.
2901
2902 Sun Oct  8 19:33:08 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2903
2904         * Added flags parameter into silc_ske_assemble_security_properties
2905           function in lib/silcske/silcske.[ch].
2906
2907         * Changed notify client operation to fit better for notify messages
2908           sent by server.  The notify payload received from server is now
2909           passed to the application (after parsing it to SilcNotifyPayload).
2910           It is application's responsibility to retrieve the arguments
2911           from the payload and show the message the way it wants.  The message
2912           sent by server is implementation specific.
2913
2914         * Changed public keys to comply with the protocol specification.
2915           Old public keys are not supported anymore and are not compatible.
2916
2917         * Removed nickname from Channel Payload as the latest draft removed
2918           it.  The client must resolve the nickname from the NAMES command
2919           reply received when it joined the channel.
2920
2921           Also, changed all channel_xxxx_payload to channel_payload_xxxx.
2922
2923 Sat Oct  7 21:55:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2924
2925         * Fixed some errors in protocol specification drafts.
2926
2927         * Created lib/silccore/silcnotify.c to implement Notify Payload
2928           encoding and decoding, lib/silccore/silcpayload.[ch] to implement
2929           generic payloads described by protocol specifications.  The file
2930           includes implementations for ID Payload and Argument Payload.
2931
2932         * Changed Command Payload implementation to use the new Argument
2933           Payload.  Changed command_xxxx_payload to command_payload_xxxx
2934           to comply with SILC coding conventions.
2935
2936         * Added suppport for Argument Payload handling in Notify Payload
2937           implementation as protocol requires it.  Added the new support
2938           into server and client lib as well.
2939
2940 Thu Oct  5 21:16:28 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2941
2942         * Added support for multiple nicknames on same channel.  [n] is
2943           added locally to the nickname if there are more than one same
2944           nicknames on the channel.
2945
2946         * Server now sends all nicknames that matched WHOIS request.
2947           Client also shows the list received from server.
2948
2949         * Added TOPIC command to client side.  User can now set and show
2950           current topic on channel.
2951
2952         * Added MOTD command to client and server.  Also, server sends the
2953           motd when client connects to the server.
2954
2955         * Changed version strings to comply ISO 8601.
2956
2957 Wed Oct  4 23:29:06 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2958
2959         * Fixed protocol error handling in client library.  It should now
2960           cope even if the SKE fails for some reason.
2961
2962         * Made new protocol specification drafts for submitting to IETF.
2963
2964         * Implemented TOPIC command to server in silcd/command.c.
2965
2966         * Added two new notify types into lib/silccore/silcnotify.h:
2967           SILC_NOTIFY_TYPE_NICK_CHANGE and SILC_NOTIFY_TYPE_TOPIC_SET to
2968           notify nickname change and topic setting/change on a channel.
2969
2970         * API change of command_reply operation in client library.  The
2971           application gets now the status type received from server as well.
2972
2973 Sat Sep 30 16:57:42 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2974
2975         * Removed the function just added to lib/silcutil/silcschedule.[ch].
2976
2977         * Cras fixed and optimized the packet handling even further and
2978           it should work now.  Minor change to the prototype of function
2979           silc_packet_receive_process in lib/silccore/silcpacket.[ch].
2980
2981 Sat Sep 30 08:48:47 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2982
2983         * Added new function into lib/silcutil/silcschedule.[ch]:
2984           silc_schedule_with_fd to select() a specified fd.  The function
2985           returns after timeout expires or data arrives or goes.  The
2986           function is used by packet routines to wait that all data is
2987           received from network.
2988
2989         * Fixed data reading from network in lib/silccore/silcpacket.c.
2990           The code now assures that all data is read from the fd and then
2991           continues packet processing.  This was a bug fix since the code
2992           used to drop some data in some circumstances.
2993
2994         * Added new function into lib/silcclient/client.[ch]:
2995           silc_client_start_key_exchange to start key exchange after
2996           connection has been established to server.  The code internally
2997           now uses this funtion but its main purpose was to provide it
2998           for applications that perform their own connecting.  After
2999           application has created a connection it merely calls this
3000           function to start the key exchange between client and server.
3001           The library takes care of everything else after that.
3002
3003           Updated also lib/silcclient/README to explain the usage of
3004           this new function.
3005
3006         * Do not send to application information that connection has
3007           been established.  Application gets notified it by connect
3008           operation anyway.
3009
3010 Thu Sep 28 23:40:19 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3011
3012         * Applied cras's patch to add silc_schedule_one function.  The
3013           function runs scheduler once and returns.
3014
3015         * Fixed the scheduler after cras messed it up.  The timeout
3016           handling works now as it's supposed to work.
3017
3018         * Added into lib/silccore/ silcnotify.h to include notify
3019           message types support.  Changed silc_server_send_notify*
3020           functions, in server.[ch], to support those new notify types.
3021           Added the support for the notify types into client library,
3022           as well.  Added new notify client operation into ops.h in
3023           lib/silcclient/.
3024
3025         * Changed silc_server_packet_send_to_channel to send normal
3026           packets instead of just channel message packets.  The function
3027           is now used to send the notify packets to channels.  It is not
3028           used to send channel message packets anymore, as server never
3029           sends them anymore.
3030
3031         * Added explicit casting into lib/silcutil/silcbuffmt.c to few
3032           va_arg()s as it seems to require it nowadays.  I guess, if SILC
3033           is compiled with older va_arg() the new code should work anyway.
3034
3035 Wed Sep 13 18:10:14 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3036
3037         * Splitted core library.  Core library (lib/silccore) includes
3038           now only SILC protocol specific core (and common) components.
3039           Created new utility library (lib/silcutil) that includes more
3040           generic purpose stuff.  The stuff for util library was taken
3041           from the old core library.  This was minor and easy split.
3042
3043         * Created SILC Client Library (lib/silcclient) that includes
3044           implementation of the SILC client without user interface.  This
3045           was major move from silc/ directory.  The code has been changed
3046           so that it is transparent towards the user interface.  The
3047           silc/ directory includes now the same user interface as before
3048           and it uses the new client library.  Read lib/silcclient/README.
3049           Basicly, the client library performs everything else related
3050           to SILC except user interface handling.  Also, configuration
3051           files are considered to be part of user interface and library
3052           does not handle them.
3053
3054           This change also changed a lot of structures, function naming etc.
3055           Most important change was that SilcClientWindow object was
3056           renamed to SilcClientConnection in the client library.  Created
3057           also new file lib/silcclient/ops.h.  Also added new files
3058           silc/local_command.[ch] and silc/client_ops.[ch].
3059
3060           All these changes were made to make it easier for user interface
3061           designers to create what ever user interface for the SILC client
3062           they want.
3063
3064           It is also expected that the server will be moved to lib
3065           directory as well and SILC Server Library will be created;
3066           sometimes in the future.
3067
3068         * Removed Local commands from lib/silccore/silccommand.h as
3069           they are application specific and new client library does not
3070           handle any of those anymore.
3071
3072         * Several functions moved to lib/silcutil/silcutilc.[ch] from
3073           old client implementation in silc/.
3074
3075         * Added support for callback functions in SILC_LOG_* macros.
3076           Application can now set its own callbacks that will be called
3077           instead of using the default functions that will always print
3078           the debug messages to stderr (or stdout).  Also, debugging can
3079           now be disabled by setting silc_debug to FALSE and re-enabled by
3080           setting it to TRUE.  Note, that logging will still work even
3081           if debugging is disabled.
3082
3083           New functions in lib/silcutil/silclog.[ch]: silc_log_set_callbacks,
3084           silc_log_reset_callbacks, silc_log_set_debug_callbacks and
3085           silc_log_reset_debug_callbacks.
3086
3087         * To enable debugging in silc client one must give now -d
3088           option on command line.
3089
3090         * Changed silc_schedule_init to automatically allocate task queues
3091           if they are not allocated before calling it.
3092
3093 Thu Sep  7 10:49:33 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3094
3095         * Added GMP 3.1 into math library.
3096
3097 Sun Aug 20 21:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3098
3099         * Added SILC_PACKET_REMOVE_CHANNEL_USER to remove a client from
3100           a channel in SILC network.  The packet is used by servers and
3101           routers to notify other routers that user has left a channel.
3102           This little feature was missing until now.  Added the feature
3103           to protocol specification as well.
3104
3105           Added functions: silc_server_send_remove_channel_user and
3106           silc_server_remove_channel_user into server.[ch].
3107
3108         * Added SILC_PACKET_REKEY and SILC_PACKET_REKEY_DONE into
3109           lib/silccore/silcpacket.h.  However, they are not implemented
3110           yet.
3111
3112 Sat Aug 19 23:04:16 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3113
3114         * Fixed joining to a channel and sending channel messages
3115           between server and router.  The channel message sending should
3116           now work inside a cell.
3117
3118 Tue Jul 25 20:46:13 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3119
3120         * Fixed the private message sending between server and router.
3121           The private message sending should now work inside a cell.
3122
3123         * Added silc_server_replace_id into server.[ch] to replace
3124           existing ID in the SILC network.
3125
3126         * Added silc_idlist_find_server_by, silc_idlist_replace_client_id
3127           and silc_idlist_replace_server_id into idlist.[ch] in server.
3128
3129 Mon Jul 24 18:33:31 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3130
3131         * Fixed the server to server connections.  Server can again now
3132           connect to router.  Router to router connections probably does
3133           not work just yet.
3134
3135 Thu Jul 20 13:15:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3136
3137         * Added dynamic protocol registering support.  Now protocols can
3138           registered and unregistered on the fly.  Patch by cras.
3139
3140 Wed Jul 19 19:08:46 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3141
3142         * Added lib/contrib directory to hold routines that some platforms
3143           don't have but are needed by SILC.
3144
3145         * Added getopt.c, getopt1.c and getopt.h from GNU C library
3146           into lin/contrib to provide getopt() and getopt_long() for
3147           those who don't have it.
3148
3149 Tue Jul 18 20:41:20 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3150
3151         * Added AWAY command to client.  When away message is set and
3152           client receives a private message packet the client automatically
3153           replies to the sender with the away message.
3154
3155         * Fixed a bug in lib/silcmath/mpbin.c: silc_mp_mp2bin.  This
3156           bug seemed to be the cause of recent problems when compiling
3157           with gcc-2.95.
3158
3159         * Added version detection support to SKE protocol specification
3160           and added the new changes to the SKE implementation as well.
3161           There were other minor changes in the SKE protocol as well.
3162
3163           Many changes in lib/silcske/silcske.[ch] and in
3164           lib/silcske/payload.[ch].
3165
3166         * Added ^U functionality, clear input line.  Patch from cras.
3167
3168 Mon Jul 17 23:33:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3169
3170         * Mainly small bugfixes on core library.  Fixed some debugging
3171           logging and buffer overflow in silclog.c.
3172
3173         * Updated config.sub and config.guess on the distribution tree.
3174
3175 Sat Jul 15 15:33:48 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3176
3177         * Added command lagging support in server. Client may execute
3178           commands now only once in two seconds.
3179
3180 Thu Jul 13 22:10:21 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3181
3182         * Optimized packet reception. MAC computation and checking is now
3183           also more optimized.  A lot previously duplicated code is now
3184           used as generic by both client and server.
3185
3186         * Fixed key pair generation in clientutil.c
3187
3188 Wed Jul 12 18:28:07 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3189
3190         * Added into lib/silccore/silcbufutil.[ch] new function;
3191           silc_buffer_realloc.
3192
3193         * Moved generic packet sending/encryption functions to 
3194           lib/silccore/silcpacket.[ch] from client and server.  Some
3195           rewriting of the functions.
3196
3197         * Moved all generic packet reception/decryption functions to
3198           lib/silccore/silcpacket.[ch] from client and server.  The
3199           packet processing is now much cleaner in both client and server.
3200           These were major changes in both client and server.
3201
3202         * Created many common functions in server to do packet sending.
3203           Previously code were duplicated a lot, this has been removed
3204           with these changes.
3205
3206 Tue Jul 11 20:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3207
3208         * Rewrote major parts of the ID cache system.  Don't know 
3209           whether it is better now or not but at least the API is more
3210           cleaner now.
3211
3212         * Major rewrite on ID cache stuff on client because of the ID
3213           cache API changes.  Added idlist.c to client.
3214
3215         * Also major rewrite on ID cache stuff on server as well.
3216           Major rewrite of idlist.[ch]. SilcXXXList's are now named
3217           SilcXXXEntry's.  We won't keep anymore idlist specific pointers
3218           in hand, instead they are all put into the ID cache system now.
3219           All server_idlist_* routines uses ID cache now instead of
3220           traversing its own lists (those lists does not exist anymore).
3221           SilcIDList though still exists.  Also, SilcXXXEntry's are
3222           now pointers.
3223
3224 Sun Jul  9 15:19:24 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3225
3226         * Finally made the SKE implementation compliant to the protocol
3227           specification.  All mp integers are now binary encoded as
3228           opposed being HEX encoded.
3229
3230         * Added lib/silcmath/mpbin.[ch].  Encoding mp intergers to and
3231           from binary data.
3232
3233         * Added into lib/silccore/silcutil.[ch] PEM encoding/decoding
3234           functions: silc_[encode/decode]_pem.  Also added function
3235           silc_encode_pem_file to PEM encode with newlines ('\n') for
3236           saving into a file.
3237
3238         * SILC public keys are now encoded either PEM or binary.  Same
3239           option is for private keys as well.  By default private keys
3240           are binary encoded and public keys PEM encoded.  Silly HEX
3241           encoding were removed.
3242
3243         * Added into lib/silccrypt/silchash.[ch] silc_hash_fingerprint
3244           function to create fingerprints.
3245
3246         * Fixed a bug in SHA1; does not change the original data anymore.
3247
3248         * Partly implemented INFO command on client and server side.
3249           Fixed CLEAR command.  Changes to SERVER command; show current
3250           server(s) when giving command without arguments.  Added
3251           VERSION command to client.
3252
3253         * Added check to server that unregistered connections cannot
3254           execute commands (unless it is specificly allowed).
3255
3256 Thu Jul  6 18:12:24 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3257
3258         * Fixed screen refresh.
3259
3260         * Fixed channel joining bug from client.  On some circumstances
3261           client tried to join to a channel it had already joined.
3262
3263         * Added public key verification process into client's protocol.c.
3264           The client now verifies the public key from user and saves
3265           it into ~./silc/serverkeys/ directory. 
3266
3267           Added into: clientutil.[ch]: silc_client_verify_server_key.
3268
3269         * Changed SKE protocol's silc_ske_initiator_finish function
3270           to accept callback function that verifies the received public
3271           key.  Removed old silc_ske_verify_public_key function.
3272
3273 Wed Jul  5 19:19:02 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3274
3275         * Added into silcpkcs[ch]: silc_pkcs_public_key[_data]_set and
3276           silc_pkcs_private_key[_data]_set.
3277
3278         * Made the password and public authentication more cleaner in
3279           server's protocol.c.
3280
3281         * Removed historic and obsolete protocol `channel_auth' from
3282           both client and server.
3283
3284         * Removed wrong way of sending command status messages from
3285           server to client in server's command.c.  The old way violated
3286           protocol specification.  
3287
3288           Changes to silccore/silccommand.[ch]: removed
3289           silc_command_encode_status_payload -> not needed anymore,
3290           changed silc_command_encode_payload_va to accept extra
3291           argument on variable argument list.  The argument type must
3292           now be provided to the function.  Also, added new function:
3293           silc_command_encode_reply_payload_va which is same as
3294           normal command_encode_payload_va except command status type
3295           is provided as extra argument.
3296
3297 Tue Jul  4 18:26:39 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3298
3299         * Added ~./silc directory handling.  The directory includes the
3300           public and private keys for the client.
3301
3302           Added silc_client_check_silc_dir, silc_client_create_identifier
3303           and silc_client_load_keys.
3304
3305         * Implemented SILC protocol compliant public key.  Added public
3306           and private key saving to and loading from files.
3307
3308           Added into silcpkcs.[ch]: silc_pkcs_encode_identifier,
3309           silc_pkcs_public_key_encode[_data], silc_pkcs_public_key_decode,
3310           silc_pkcs_private_key_encode[_data], silc_pkcs_private_key_decode,
3311           silc_pkcs_public_key_alloc, silc_pkcs_public_key_free,
3312           silc_pkcs_private_key_alloc and silc_pkcs_private_key_free.
3313
3314           Implemented: silc_pkcs_save_[public/private]_key[_data] and
3315           silc_pkcs_load_[public/private]_key.
3316
3317 Mon Jul  3 18:51:27 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3318
3319         * Added silc_server_get_route (route.[ch]) to get connection
3320           data for the fastest route for given ID.
3321
3322         * Implemented INVITE command on client and server.  The command
3323           were re-defined in the SILC Protocol Specification and the
3324           implementation now complies with the specification.
3325
3326         * Implemented PING command on client and server.
3327
3328         * Implemented NAMES command on client and server.  The server side
3329           supports currently only normal server not router server yet.
3330           Some changes to NAMES definition in SILC protocol specification.
3331
3332 Sun Jul  2 18:23:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3333
3334         * Implemented LEAVE command on client and server.
3335
3336         * Previously deprecated SILC_PACKET_FORWARDED flag is now in use 
3337           again.  This change was made to the protocol as well.  Server
3338           should not violate the protocol specification anymore.
3339
3340 Fri Jun 30 14:03:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3341
3342         * Added SOCKS4 and SOCKS5 support to SILC client.  SOCKS5
3343           was tested.  SOCKS4 was not but should work anyway.