updates.
[website.git] / docs / toolkit / manual / command_reply_args.html
1
2 <html>
3 <head>
4  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-a" />
5  <meta http-equiv="Content-Language" content="en" />
6  <meta name="description" content="SILC Secure Internet Live Conferencing" />
7  <meta name="keywords" content="SILC, secure, chat, protocol, cipher, encrypt, SKE" />
8  <meta content="INDEX, FOLLOW" name="ROBOTS" />
9  <style type="text/css">
10   <!--
11   body { color: #000000; background: #f0f0f0; font-family: Helvetica, Arial, Sans-serif; }
12   a:link { text-decoration: none; color: #2f488f; }
13   a:visited { text-decoration: none;color: #2f488f; }
14   a:active { text-decoration: none; color: #2f488f; }
15   -->
16  </style>
17 </head>
18
19 <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
20
21 <table border="0" cellspacing="0" cellpadding="6" width="100%">
22  <tr valign="top" bgcolor="#dddddd">
23   <td><small>Copyright &copy; 2001 - 2007 SILC Project<br />
24     <a href="http://silcnet.org">SILC Project Website</a></small></td>
25   <td align="right"><small>
26    <a href="index.html">SILC Toolkit Reference Manual</a><br />
27    <a href="toolkit_index.html">Index</a></small></td>
28    </small></td>
29  </tr>
30 </table>
31 <table border="0" cellspacing="0" cellpadding="0" width="100%">
32 <tr bgcolor="#444444"><td><img src="space.gif" width="1" height="1"border="0" alt="" ></td></tr>
33 </table>
34
35 <table cellpadding="0" cellspacing="0" border="0">
36  <tr valign="top">
37
38   <td width="200" bgcolor="#f0f0f0">
39    <img src="space.gif" width="1" height="1" border="0" alt="">
40    <table width="100%" cellpadding="2" cellspacing="2" border="0">
41     <tr valign="top"><td>
42 <br />
43 <small>
44 <!-- Template file for the big index that appears in the Toolkit reference
45 manual on the left side.  With this file it is possible to add other than
46 automatically generated links to that list. -->
47
48 <a href="index.html"><img src="box.gif" border="0" alt="">SILC Toolkit Reference Manual</a><br />
49
50
51 <a href=silccryptlib.html><img src=box.gif border=0 alt=>SILC Crypto Library</a><br />
52 &nbsp;&nbsp;&nbsp; <a href=silcrng_intro.html><img src=box2.gif border=0 alt=>Introduction to SILC RNG</a><br />
53 &nbsp;&nbsp;&nbsp; <a href=silcrng.html><img src=box2.gif border=0 alt=>SILC RNG Interface</a><br />
54 &nbsp;&nbsp;&nbsp; <a href=silccipher.html><img src=box2.gif border=0 alt=>SILC Cipher API</a><br />
55 &nbsp;&nbsp;&nbsp; <a href=silcpkcs.html><img src=box2.gif border=0 alt=>SILC PKCS API</a><br />
56 &nbsp;&nbsp;&nbsp; <a href=silcpk.html><img src=box2.gif border=0 alt=>SILC Public Key API</a><br />
57 &nbsp;&nbsp;&nbsp; <a href=silcpkcs1.html><img src=box2.gif border=0 alt=>SILC PKCS #1 API</a><br />
58 &nbsp;&nbsp;&nbsp; <a href=silchash.html><img src=box2.gif border=0 alt=>SILC Hash Interface</a><br />
59 &nbsp;&nbsp;&nbsp; <a href=silchmac.html><img src=box2.gif border=0 alt=>SILC HMAC Interface</a><br />
60 <a href=silccorelib.html><img src=box.gif border=0 alt=>SILC Core Library</a><br />
61 &nbsp;&nbsp;&nbsp; <a href=silcauth.html><img src=box2.gif border=0 alt=>SILC Authentication Interface</a><br />
62 &nbsp;&nbsp;&nbsp; <a href=silcmessage.html><img src=box2.gif border=0 alt=>SILC Message Interface</a><br />
63 &nbsp;&nbsp;&nbsp; <a href=silcchannel.html><img src=box2.gif border=0 alt=>SILC Channel Interface</a><br />
64 &nbsp;&nbsp;&nbsp; <a href=silccommand.html><img src=box2.gif border=0 alt=>SILC Command Interface</a><br />
65 &nbsp;&nbsp;&nbsp; <a href=silcnotify.html><img src=box2.gif border=0 alt=>SILC Notify Interface</a><br />
66 &nbsp;&nbsp;&nbsp; <a href=silcstatus.html><img src=box2.gif border=0 alt=>SILC Status Types</a><br />
67 &nbsp;&nbsp;&nbsp; <a href=silcmode.html><img src=box2.gif border=0 alt=>SILC Modes</a><br />
68 &nbsp;&nbsp;&nbsp; <a href=silcid.html><img src=box2.gif border=0 alt=>SILC ID Interface</a><br />
69 &nbsp;&nbsp;&nbsp; <a href=silcargument.html><img src=box2.gif border=0 alt=>SILC Argument Interface</a><br />
70 &nbsp;&nbsp;&nbsp; <a href=silcattrs.html><img src=box2.gif border=0 alt=>SILC Attributes Interface</a><br />
71 &nbsp;&nbsp;&nbsp; <a href=silcpacket.html><img src=box2.gif border=0 alt=>Packet Engine Interface</a><br />
72 &nbsp;&nbsp;&nbsp; <a href=silcpubkey.html><img src=box2.gif border=0 alt=>SILC Public Key Payload Interface</a><br />
73 <a href=silcskelib.html><img src=box.gif border=0 alt=>SILC Key Exchange Library</a><br />
74 &nbsp;&nbsp;&nbsp; <a href=silcske.html><img src=box2.gif border=0 alt=>SILC SKE Interface</a><br />
75 &nbsp;&nbsp;&nbsp; <a href=silcconnauth.html><img src=box2.gif border=0 alt=>SILC Connection Authentication Interface</a><br />
76 <a href=silcvcardlib.html><img src=box.gif border=0 alt=>SILC VCard Library</a><br />
77 &nbsp;&nbsp;&nbsp; <a href=silcvcard.html><img src=box2.gif border=0 alt=>SILC VCard Interface</a><br />
78 <a href=silcmathlib.html><img src=box.gif border=0 alt=>SILC Math Library</a><br />
79 &nbsp;&nbsp;&nbsp; <a href=silcmp.html><img src=box2.gif border=0 alt=>SILC MP Interface</a><br />
80 &nbsp;&nbsp;&nbsp; <a href=silcmath.html><img src=box2.gif border=0 alt=>SILC Math Interface</a><br />
81 <a href=silcclientlib.html><img src=box.gif border=0 alt=>SILC Client Library</a><br />
82 &nbsp;&nbsp;&nbsp; <a href=silcclient_using.html><img src=box2.gif border=0 alt=>Using SILC Client Library Tutorial</a><br />
83 &nbsp;&nbsp;&nbsp; <a href=command_reply_args.html><img src=box2.gif border=0 alt=>Arguments for <b>command_reply</b> Client Operation</a><br />
84 &nbsp;&nbsp;&nbsp; <a href=silcstatus_args.html><img src=box2.gif border=0 alt=>SilcStatus Error Arguments in <b>command_reply</b> Client Operation</a><br />
85 &nbsp;&nbsp;&nbsp; <a href=notifyargs.html><img src=box2.gif border=0 alt=>Arguments for <b>notify</b> Client Operation</a><br />
86 &nbsp;&nbsp;&nbsp; <a href=silcclient_unicode.html><img src=box2.gif border=0 alt=>Unicode and UTF-8 Strings in Client Library</a><br />
87 &nbsp;&nbsp;&nbsp; <a href=silcclient.html><img src=box2.gif border=0 alt=>Client Library Interface Reference</a><br />
88 &nbsp;&nbsp;&nbsp; <a href=silcclient_entry.html><img src=box2.gif border=0 alt=>Client Entry Interface Reference</a><br />
89 <a href=silcasn1lib.html><img src=box.gif border=0 alt=>SILC ASN.1 Library</a><br />
90 &nbsp;&nbsp;&nbsp; <a href=silcasn1.html><img src=box2.gif border=0 alt=>SILC ASN.1 Interface</a><br />
91 &nbsp;&nbsp;&nbsp; <a href=silcber.html><img src=box2.gif border=0 alt=>SILC BER interface</a><br />
92 <a href=silchttplib.html><img src=box.gif border=0 alt=>SILC HTTP Library</a><br />
93 &nbsp;&nbsp;&nbsp; <a href=silchttpserver.html><img src=box2.gif border=0 alt=>SILC HTTP Server Interface</a><br />
94 &nbsp;&nbsp;&nbsp; <a href=silchttpphp.html><img src=box2.gif border=0 alt=>SILC HTTP PHP Translator</a><br />
95 <a href=silcutillib.html><img src=box.gif border=0 alt=>SILC Utility Library</a><br />
96 &nbsp;&nbsp;&nbsp; <a href=silctypes.html><img src=box2.gif border=0 alt=>Basic Types and Definitions</a><br />
97 &nbsp;&nbsp;&nbsp; <a href=silcbuffer.html><img src=box2.gif border=0 alt=>Data Buffer Interface</a><br />
98 &nbsp;&nbsp;&nbsp; <a href=silcbuffmt.html><img src=box2.gif border=0 alt=>Data Buffer Format Interface</a><br />
99 &nbsp;&nbsp;&nbsp; <a href=silchashtable.html><img src=box2.gif border=0 alt=>Hash Table Interface</a><br />
100 &nbsp;&nbsp;&nbsp; <a href=silcmemory.html><img src=box2.gif border=0 alt=>Memory Allocation Interface</a><br />
101 &nbsp;&nbsp;&nbsp; <a href=silcstack.html><img src=box2.gif border=0 alt=>Data Stack (memory pool) Interface</a><br />
102 &nbsp;&nbsp;&nbsp; <a href=silcfsm.html><img src=box2.gif border=0 alt=>Finite State Machine Interface</a><br />
103 &nbsp;&nbsp;&nbsp; <a href=silcthread.html><img src=box2.gif border=0 alt=>Thread Interface</a><br />
104 &nbsp;&nbsp;&nbsp; <a href=silcmutex.html><img src=box2.gif border=0 alt=>Mutual Exclusion Lock Interface</a><br />
105 &nbsp;&nbsp;&nbsp; <a href=silccond.html><img src=box2.gif border=0 alt=>Condition Variable Interface</a><br />
106 &nbsp;&nbsp;&nbsp; <a href=silcatomic.html><img src=box2.gif border=0 alt=>Atomic Operations Interface</a><br />
107 &nbsp;&nbsp;&nbsp; <a href=silcnet.html><img src=box2.gif border=0 alt=>Network (TCP and UDP) Interface</a><br />
108 &nbsp;&nbsp;&nbsp; <a href=silcschedule.html><img src=box2.gif border=0 alt=>Scheduler Interface</a><br />
109 &nbsp;&nbsp;&nbsp; <a href=silcasync.html><img src=box2.gif border=0 alt=>Asynchronous Operation Interface</a><br />
110 &nbsp;&nbsp;&nbsp; <a href=silcstream.html><img src=box2.gif border=0 alt=>Abstract Stream Interface</a><br />
111 &nbsp;&nbsp;&nbsp; <a href=silcsocketstream.html><img src=box2.gif border=0 alt=>Socket Stream Interface</a><br />
112 &nbsp;&nbsp;&nbsp; <a href=silcfdstream.html><img src=box2.gif border=0 alt=>File Descriptor Stream Interface</a><br />
113 &nbsp;&nbsp;&nbsp; <a href=silcfileutil.html><img src=box2.gif border=0 alt=>File Utility Functions</a><br />
114 &nbsp;&nbsp;&nbsp; <a href=silcstrutil.html><img src=box2.gif border=0 alt=>String Utility Interface</a><br />
115 &nbsp;&nbsp;&nbsp; <a href=silcsnprintf.html><img src=box2.gif border=0 alt=>Snprintf Interface</a><br />
116 &nbsp;&nbsp;&nbsp; <a href=silcutf8.html><img src=box2.gif border=0 alt=>UTF-8 String Interface</a><br />
117 &nbsp;&nbsp;&nbsp; <a href=silcstringprep.html><img src=box2.gif border=0 alt=>Stringprep Interface</a><br />
118 &nbsp;&nbsp;&nbsp; <a href=silcutil.html><img src=box2.gif border=0 alt=>Utility Functions</a><br />
119 &nbsp;&nbsp;&nbsp; <a href=silclist.html><img src=box2.gif border=0 alt=>List Interface</a><br />
120 &nbsp;&nbsp;&nbsp; <a href=silcdlist.html><img src=box2.gif border=0 alt=>Dynamic List Interface</a><br />
121 &nbsp;&nbsp;&nbsp; <a href=silcmime.html><img src=box2.gif border=0 alt=>MIME Interface</a><br />
122 &nbsp;&nbsp;&nbsp; <a href=silctime.html><img src=box2.gif border=0 alt=>Time Utility Functions</a><br />
123 &nbsp;&nbsp;&nbsp; <a href=silclog.html><img src=box2.gif border=0 alt=>Logging Interface</a><br />
124 &nbsp;&nbsp;&nbsp; <a href=silcconfig.html><img src=box2.gif border=0 alt=>Config File Interface</a><br />
125 <a href=silcskrlib.html><img src=box.gif border=0 alt=>SILC Key Repository Library</a><br />
126 &nbsp;&nbsp;&nbsp; <a href=silcskr.html><img src=box2.gif border=0 alt=>SILC SKR Interface</a><br />
127 <a href=silcaputillib.html><img src=box.gif border=0 alt=>SILC Application Utility Library</a><br />
128 &nbsp;&nbsp;&nbsp; <a href=silcapputil.html><img src=box2.gif border=0 alt=>SILC Application Utilities</a><br />
129 &nbsp;&nbsp;&nbsp; <a href=silcidcache.html><img src=box2.gif border=0 alt=>SILC ID Cache Interface</a><br />
130 <a href=silcsftplib.html><img src=box.gif border=0 alt=>SILC SFTP Library</a><br />
131 &nbsp;&nbsp;&nbsp; <a href=silcsftp.html><img src=box2.gif border=0 alt=>SILC SFTP Interface</a><br />
132 &nbsp;&nbsp;&nbsp; <a href=silcsftp_fs.html><img src=box2.gif border=0 alt=>SFTP Filesystems Interface</a><br />
133
134 <br />
135 <b>Resource Links</b>
136 <br />
137 <a href="http://silcnet.org"><img src="box.gif" border="0" alt="">SILC Project Website</a><br />
138 <a href="http://silcnet.org/support/documentation/"><img src="box.gif" border="0" alt="">SILC Protocol Documentation</a><br />
139 <a href="http://silcnet.org/support/documentation/wp/"><img src="box.gif" border="0" alt="">SILC White Paper</a><br />
140 <a href="http://silcnet.org/support/faq/"><img src="box.gif" border="0" alt="">SILC FAQs</a><br />
141
142 </small>
143 <br /><br /><br /><br />
144     </td></tr>
145    </table>
146   </td>
147
148   <td bgcolor="#cccccc" background="dot.gif">
149    <img src="space.gif" width="1" height="1" border="0" alt=""></td>
150
151   <td width="720" bgcolor="#ffffff">
152    <img src="space.gif" width="1" height="1" border="0" alt="">
153    <table cellpadding="2" cellspacing="6" width="100%">
154     <tr><td valign="top">
155 <br />
156 <big><b>Command Reply Arguments</b></big>
157
158 <br />&nbsp;<br />
159 The SILC Client Library 'command_reply client operation (which is part of the
160 <a href="silcclient-SilcClientOperations.html">
161 SilcClientOperation</a> callback functions) returns command replies
162 from the SILC Server for commands that the client has earlier sent to the
163 server.  The 'command_reply' client operation implementation has a variable
164 argument list to deliver <a href="silccommand-SilcCommand.html">SilcCommand</a>
165 specific arguments to the application.  This document describes these
166 arguments for all command replies to help SILC client software developers
167 to process them.
168
169 <br />&nbsp;<br />
170 <b>NOTE: </b>The following list of command reply arguments are sent when
171 the command was executed successfully.  If an error occurred, the
172 `command_reply' client operation's 'success' argument is FALSE, and the
173 'status' argument includes the error status.  In this case the arguments
174 returned are dependent of the 'status' argument.  See all
175 <a href="silcstatus_args.html">SilcStatus error arguments</a> for these
176 arguments.
177
178 <br />&nbsp;<br />&nbsp;<br />
179 <b>command_reply Client Library operation</b>
180
181 <br />&nbsp;<br />
182 The 'command_reply' client operation callback function prototype is as follows:
183
184 <br />&nbsp;<br />
185 <tt>
186 &nbsp;&nbsp;
187 void (*command_reply)(SilcClient client, SilcClientConnection conn,<br />
188                       SilcCommand command, SilcStatus status,<br />
189                       SilcStatus error, va_list ap);
190 </tt>
191
192 <br />&nbsp;<br />
193 The first argument 'client' is the SILC Client Library context, the 'conn'
194 is the context for the connection to the remote server, the 'cmd_payload'
195 is the raw SilcCommandPayload and application usually ignores it, the
196 'success' boolean value indicates whether the earlier command was a success
197 or not, the 'command' is the command reply enumeration, and the 'status'
198 indicates the status of the command reply.  If 'success' is FALSE then
199 'status' includes error status (see <a href="silcstatus_args.html">SilcStatus
200 error arguments</a>).
201
202 <br />&nbsp;<br />
203 Rest of the arguments are 'command' specific and implementation should
204 handle them by the SilcCommand for example in a <tt>switch</tt> statement.
205 The commands are defined in lib/silccore/silccomand.h header file.  A short
206 example:
207
208 <br />&nbsp;<br />
209 <tt>
210 &nbsp;&nbsp;switch(type)<br />
211 &nbsp;&nbsp;&nbsp;&nbsp;{<br />
212 &nbsp;&nbsp;&nbsp;&nbsp;case SILC_COMMAND_WHOIS:<br />
213 &nbsp;&nbsp;&nbsp;&nbsp;...<br />
214 &nbsp;&nbsp;&nbsp;&nbsp;break;<br />
215 &nbsp;&nbsp;&nbsp;&nbsp;case SILC_COMMAND_WHOWAS:<br />
216 &nbsp;&nbsp;&nbsp;&nbsp;...<br />
217 &nbsp;&nbsp;&nbsp;&nbsp;break;<br />
218 &nbsp;&nbsp;&nbsp;&nbsp;case SILC_COMMAND_NICK:<br />
219 &nbsp;&nbsp;&nbsp;&nbsp;...<br />
220 &nbsp;&nbsp;&nbsp;&nbsp;break;<br />
221 &nbsp;&nbsp;&nbsp;&nbsp;...<br />
222 &nbsp;&nbsp;&nbsp;&nbsp;}
223 </tt>
224
225 <br />&nbsp;<br />&nbsp;<br />
226 <b>Arguments</b>
227
228 <br />&nbsp;<br />
229 The following table describes all commands and arguments that the client
230 library sends in the 'command_reply' client operation to the application.
231 By default all arguments that the library sends to application are valid
232 pointers.  However, it is possible that some pointers may be NULL.  If
233 this is the case it is separately mentioned that the argument may be NULL.
234 In this case application must ignore that argument.
235
236 <br />&nbsp;<br />
237 The 'command_reply' arguments for successful SilcCommand replies are as
238 follows:
239
240 <br />&nbsp;<br />
241 <table border="1" width="100%" cellpadding="3" cellspacing="0">
242
243 <tr>
244 <td><small>Name</td>
245 <td><small>Description</td>
246 <td width="50%"><small>Variable Arguments</td>
247 </tr>
248
249 <tr>
250 <td><small>SILC_COMMAND_WHOIS</td>
251 <td><small>
252 Returns information about user. The following pointers may be NULL: 'channels',
253 'fingerprint', 'channel_usermodes' and 'attrs'.  If 'fingerprint' is valid its
254 length is 20 bytes. If 'channels' is valid each entry in the list is
255 SilcChannelPayload.  If the `channel_usermodes' is valid then the table
256 has as many entries as there are entries in the `channels' list, and the
257 first entry in the table is the user mode on the first channel in the
258 `channels' list.  The `channel_usermodes' is the table of the user's modes
259 on the joined channels.  The 'attr' is the Requested Attributes that may
260 have been returned by the client and it can be parsed by traversing the
261 SilcDList and using silc_attribute_get_attribute function.  Each entry in
262 the list is SilcAttribute.
263 </td>
264 <td width="50%"><small>SilcClientEntry client_entry, char *nickname,
265 char *username, char *realname, SilcDList channels, SilcUInt32 usermode,
266 SilcUInt32 idletime, unsigned char *fingerprint, SilcUInt32 *channel_usermodes,
267 SilcDList attrs
268 </td>
269 </tr>
270
271 <tr>
272 <td><small>SILC_COMMAND_WHOWAS</td>
273 <td><small>
274 Returns history information about user. The 'client_entry' and 'realname'
275 may be NULL.
276 </td>
277 <td width="50%"><small>SilcClientEntry client_entry, char *nickname,
278 char *username, char *realname
279 </td>
280 </tr>
281
282 <tr>
283 <td><small>SILC_COMMAND_IDENTIFY</td>
284 <td><small>
285 Returns information about user, channel or server.  This is similar to
286 WHOIS command but does not return so much information and can be used to
287 get information about channels and servers too.  Application should ignore
288 this command reply.  The 'name' and 'info' may be NULL.
289 </td>
290 <td width="50%"><small>void *entry, char *name, char *info
291 </td>
292 </tr>
293
294 <tr>
295 <td><small>SILC_COMMAND_NICK</td>
296 <td><small>
297 Returns the new Client ID and new nickname inside the SilcClientEntry.
298 The `old_client_id' is the old Client ID used by the client before the
299 nickname was changed.  The `nickname' is the new nickname.  Note that,
300 when user changes nickname SILC_NOTIFY_TYPE_NICK_CHANGE is not delivered
301 to application.  Instead this SILC_COMMAND_NICK command reply is delivered.
302 </td>
303 <td width="50%"><small>SilcClientEntry local_entry, char *nickname,
304 const SilcClientID *old_client_id
305 </td>
306 </tr>
307
308 <tr>
309 <td><small>SILC_COMMAND_LIST</td>
310 <td><small>
311 Returns the list of channel in the SILC network. Each call of command reply
312 returns one channel. This means that the command reply is called multiple
313 times to return list of channels.  The 'channel', 'channel_name' and
314 'channel_topic' may be NULL.  However, the 'channel' and 'channel_name'
315 are NULL only if there are no channels in the network.  In this case
316 this reply is called once with all arguments set to NULL.  Application
317 must be able to handle this situation correctly.
318 </td>
319 <td width="50%"><small>SilcChannelEntry channel, char *channel_name,
320 char *channel_topic, SilcUInt32 user_count
321 </td>
322 </tr>
323
324 <tr>
325 <td><small>SILC_COMMAND_TOPIC</td>
326 <td><small>
327 Returns the topic of the channel.
328 </td>
329 <td width="50%"><small>SilcChannelEntry channel, char *topic
330 </td>
331 </tr>
332
333 <tr>
334 <td><small>SILC_COMMAND_INVITE</td>
335 <td><small>
336 Returns the invite list of the channel.  Called also even if invite list
337 was not modified but SILC_COMMAND_INVITE command was used to invite a user
338 into a channel.  In this case the invite list is not returned by the
339 server and 'invite_list' is NULL.  The 'invite_list' is SilcArgumenPayload
340 which contains one or more arguments, each is one invite list entry.  The
341 entries can be retrieved with silc_argument_get_first_arg,
342 silc_argument_get_next_arg, silc_argument_get_arg_type and
343 silc_argument_get_decoded functions.
344 </td>
345 <td width="50%"><small>SilcChannelEntry channel,
346 SilcArgumentPayload invite_list
347 </td>
348 </tr>
349
350 <tr>
351 <td><small>SILC_COMMAND_KILL</td>
352 <td><small>
353 Called after killing a client.  Returns the client that was killed.
354 The `client_entry' may be NULL.  The `client_entry' will become invalid
355 after the command reply has returned from application.  The
356 SILC_NOTIFY_TYPE_KILLED will not be delivered for clients that you killed.
357 </td>
358 <td width="50%"><small>SilcClientEntry client_entry
359 </td>
360 </tr>
361
362 <tr>
363 <td><small>SILC_COMMAND_INFO</td>
364 <td><small>
365 Returns information about the server user is connected to.
366 </td>
367 <td width="50%"><small>SilcServerEntry server, char *server_name,
368 char *server_info
369 </td>
370 </tr>
371
372 <tr>
373 <td><small>SILC_COMMAND_STATS</td>
374 <td><small>
375 Returns network statistics from the server.  The `stats' structure contains
376 the statistics returned by the server.
377 </td>
378 <td width="50%"><small>SilcClientStats *stats
379 </td>
380 </tr>
381
382 <tr>
383 <td><small>SILC_COMMAND_PING</td>
384 <td><small>
385 Returns reply to earlier ping.  There is no arguments to this reply.
386 </td>
387 <td width="50%"><small>none
388 </td>
389 </tr>
390
391 <tr>
392 <td><small>SILC_COMMAND_OPER</td>
393 <td><small>
394 Returns reply to earlier SILC_COMMAND_OPER command.  There is no arguments
395 to this reply.
396 </td>
397 <td width="50%"><small>none
398 </td>
399 </tr>
400
401 <tr>
402 <td><small>SILC_COMMAND_JOIN</td>
403 <td><small>
404 Reply received when user joined a channel.  The `channel_mode' contains
405 the current channel mode.  The `user_list' is the user list on the channel
406 and may be traversed with silc_hash_table_get function.  Each entry in the
407 `user_list' is SilcChannelUser structure, which contains the SilcClientEntry
408 and the client's mode on the channel.  The library will free the list.
409 The `topic' is the current topic on channel or NULL if no topic is set.
410 The `cipher' is the encryption algorithm used on channel or NULL if it is
411 not available.  The `hmac' is the HMAC algorithm used on channel or NULL if
412 it is not available.  The `founder_key' is the channel founder's public key
413 or NULL if founder public key has not been set.  The `channel_pubkeys' is
414 a list of channel public keys (for authentication on joining) or NULL if
415 they have not been set.  Each entry in the list is SilcArgumentDecodedList
416 each containing one channel SilcPublicKey.  The library will free the list.
417 </td>
418 <td width="50%"><small>char *channel_name, SilcChannelEntry channel,
419 SilcUInt32 channel_mode, SilcHashTableList *user_list, char *topic,
420 char *cipher, char *hmac, SilcPublicKey founder_key,
421 SilcDList channel_pubkeys, SilcUint32 user_limit
422 </td>
423 </tr>
424
425 <tr>
426 <td><small>SILC_COMMAND_MOTD</td>
427 <td><small>
428 Returns the Message of the Day from the server.  The 'motd' may be NULL.
429 </td>
430 <td width="50%"><small>char *motd
431 </td>
432 </tr>
433
434 <tr>
435 <td><small>SILC_COMMAND_UMODE</td>
436 <td><small>
437 Returns the user mode after changing it.
438 </td>
439 <td width="50%"><small>SilcUInt32 user_mode
440 </td>
441 </tr>
442
443 <tr>
444 <td><small>SILC_COMMAND_CMODE</td>
445 <td><small>
446 Returns channel's mode after changing it.  Optionally may also return
447 founder's public key when it was set.  It may also return the channel
448 public key list when the list was altered.  The 'founder_key' and
449 'channel_pubkeys' arguments may be NULL.  The 'channel_pubkeys' is a list
450 of SilcArgumentDecodedList contexts which each contain one channel public
451 key.  The library will automatically free the list.
452 </td>
453 <td width="50%"><small>SilcChannelEntry channel, SilcUInt32 mode,
454 SilcPublicKey founder_key, SilcDList channel_pubkeys, SilcUint32 user_limit
455 </td>
456 </tr>
457
458 <tr>
459 <td><small>SILC_COMMAND_CUMODE</td>
460 <td><small>
461 Returns user's mode on channel after changing it.
462 </td>
463 <td width="50%"><small>SilcUInt32 mode, SilcChannelEntry channel,
464 SilcClientEntry target_client
465 </td>
466 </tr>
467
468 <tr>
469 <td><small>SILC_COMMAND_KICK</td>
470 <td><small>
471 Called after kicking a client.  Returns the client that was kicked from
472 the 'channel'.
473 </td>
474 <td width="50%"><small>SilcChannelEntry channel, SilcClientEntry client_entry
475 </td>
476 </tr>
477
478 <tr>
479 <td><small>SILC_COMMAND_BAN</td>
480 <td><small>
481 Returns channel's ban list.  The 'ban_list' may be NULL.  The construction
482 of that list is equivalent to invite list.  See description of
483 SILC_COMMAND_INVITE command reply.
484 </td>
485 <td width="50%"><small>SilcChannelEntry channel, SilcArgumentPayload ban_list
486 </td>
487 </tr>
488
489 <tr>
490 <td><small>SILC_COMMAND_DETACH</td>
491 <td><small>
492 Called after being detached from the SILC network.  The command reply delivers
493 the detachment data buffer `detach_data' that the application should save
494 for example into a file.  The data will be needed when resuming back to
495 the network.  When resuming the data is saved into SilcClientConnectionParams
496 structure and given as argument to silc_client_connect_to_server or
497 silc_client_key_exchange functions.
498 </td>
499 <td width="50%"><small>SilcBuffer detach_data
500 </td>
501 </tr>
502
503 <tr>
504 <td><small>SILC_COMMAND_WATCH</td>
505 <td><small>
506 Called after modifying the watch list in the server.  There is no arguments
507 to this reply.
508 </td>
509 <td width="50%"><small>none
510 </td>
511 </tr>
512
513 <tr>
514 <td><small>SILC_COMMAND_SILCOPER</td>
515 <td><small>
516 Returns reply to earlier SILC_COMMAND_SILCOPER command.  There is no
517 arguments to this reply.
518 </td>
519 <td width="50%"><small>none
520 </td>
521 </tr>
522
523 <tr>
524 <td><small>SILC_COMMAND_LEAVE</td>
525 <td><small>
526 Called after leaving the channel.  Note that the `channel' will become
527 invalid after command_reply client operation returns.
528 </td>
529 <td width="50%"><small>SilcChannelEntry channel
530 </td>
531 </tr>
532
533 <tr>
534 <td><small>SILC_COMMAND_USERS</td>
535 <td><small>
536 Returns list of users in channel.  The `user_list' may be traversed with
537 silc_hash_table_get function.  Each entry in the `user_list' is
538 SilcChannelUser structure, which contains the SilcClientEntry and the
539 client's mode on the channel.
540 </td>
541 <td width="50%"><small>SilcChannelEntry channel, SilcHashTableList *user_list
542 </td>
543 </tr>
544
545 <tr>
546 <td><small>SILC_COMMAND_GETKEY</td>
547 <td><small>
548 Returns public key of client or server.  The 'public_key' may be NULL.
549 The 'entry_type' is used to check what type of pointer the entry' is.  For
550 SILC_ID_CLIENT SilcClientEntry and for SILC_ID_SERVER SilcServerEntry.
551 </td>
552 <td width="50%"><small>SilcIdType entry_type, void *entry,
553 SilcPublicKey public_key
554 </td>
555 </tr>
556
557 <tr>
558 <td><small>SILC_COMMAND_SERVICE</td>
559 <td><small>
560 Returns the service list in the server, or information on the accepted
561 and authenticated service.  The 'service_list' maybe NULL if server does
562 not support any services.  It is NULL also when 'name' is not NULL.  The
563 'service_list' is a comma separated list of services the server supports.
564 The 'name' MAY be NULL also.  The 'name' is the requested service, and it is
565 non-NULL only if server accepted and authenticated client's request.
566 </td>
567 <td width="50%"><small>const char *server_list, const char *service_name
568 </td>
569 </tr>
570
571 </table>
572
573 <br />&nbsp;<br />
574 SILC protocol defines some additional commands but command replies to
575 those commands are not delivered to the application.  Only the command
576 replies listed above are delivered to application.
577 <br /><br /><br /><br />
578     </td></tr>
579    </table>
580   </td>
581
582   <td bgcolor="#cccccc" background="dot.gif">
583    <img src="space.gif" width="1" height="1" border="0" alt=""></td>
584
585   <td width="180" bgcolor="#f0f0f0">
586     <img src="space.gif" width="1" height="1" border="0" alt="">
587     <table width="100%" cellpadding="4" cellspacing="0">
588     <tr valign="top"><td>
589 <br />
590 <font face="Helvetica,Arial,Sans-serif" size="1">
591 </font>
592
593 <br /><br /><br /><br />
594     </td></tr>
595     </table>
596   </td>
597 </tr>
598 </table>
599
600 <table border="0" cellspacing="0" cellpadding="0" width="100%">
601 <tr bgcolor="#444444"><td><img src="space.gif" width="1" height="1"border="0" alt="" ></td></tr>
602 </table>
603 <table border="0" cellspacing="0" cellpadding="6" width="100%">
604  <tr valign="top" bgcolor="#dddddd">
605   <td><small>Copyright &copy; 2001 - 2007 SILC Project<br />
606     <a href="http://silcnet.org">SILC Project Website</a></small></td>
607   <td align="right"><small>
608    <a href="index.html">SILC Toolkit Reference Manual</a><br />
609    <a href="toolkit_index.html">Index</a></small></td>
610    </small></td>
611  </tr>
612 </table>
613
614 </body>
615 </html>