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