Fix [-Wmissing-prototypes]
[metze/wireshark/wip.git] / epan / dissectors / packet-bt-dht.c
1 /******************************************************************************************************/
2 /* packet-bt-dht.c
3  * Routines for BT-DHT dissection
4  * Copyright 2011, Xiao Xiangquan <xiaoxiangquan@gmail.com>
5  *
6  * $Id$
7  *
8  * A plugin for BT-DHT packet:
9  *
10  * Wireshark - Network traffic analyzer
11  * By Gerald Combs <gerald@wireshark.org>
12  * Copyright 1999 Gerald Combs
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27  */
28
29 #include "config.h"
30
31 #include <stdlib.h>
32
33 #include <epan/packet.h>
34 #include <epan/conversation.h>
35 #include <epan/prefs.h>
36 #include <epan/wmem/wmem.h>
37
38 void proto_register_bt_dht(void);
39 void proto_reg_handoff_bt_dht(void);
40
41 /* Specifications: BEP-0005
42  * http://www.bittorrent.org/beps/bep_0005.html
43  */
44
45 static int proto_bt_dht = -1;
46 static dissector_handle_t bt_dht_handle;
47
48 static gboolean  bt_dht_enable_heuristic_dissection = FALSE; /* disabled by default since heuristic is weak */
49
50 /* fields */
51 static int hf_bencoded_int = -1;
52 static int hf_bencoded_string = -1;
53 static int hf_bencoded_list = -1;
54 static int hf_bencoded_dict = -1;
55 static int hf_bencoded_dict_entry = -1;
56
57 static int hf_bt_dht_error = -1;
58 static int hf_bt_dht_peers = -1;
59 static int hf_bt_dht_peer = -1;
60 static int hf_bt_dht_nodes = -1;
61 static int hf_bt_dht_node = -1;
62 static int hf_bt_dht_id = -1;
63
64 static int hf_ip = -1;
65 static int hf_port = -1;
66 static int hf_truncated_data = -1;
67
68 /* tree types */
69 static gint ett_bt_dht = -1;
70 static gint ett_bencoded_list = -1;
71 static gint ett_bencoded_dict = -1;
72 static gint ett_bencoded_dict_entry = -1;
73 static gint ett_bt_dht_error = -1;
74 static gint ett_bt_dht_peers = -1;
75 static gint ett_bt_dht_nodes = -1;
76
77 /* some keys use short name in packet */
78 static const value_string short_key_name_value_string[] = {
79   { 'y', "Message type" },
80   { 'q', "Request type" },
81   { 'e', "Error" },
82   { 't', "Transaction ID" },
83   { 'v', "Version" },
84   { 'a', "Request arguments" },
85   { 'r', "Response values" },
86   { 0, NULL }
87 };
88
89 /* some values use short name in packet */
90 static const value_string short_val_name_value_string[] = {
91   { 'q', "Request" },
92   { 'r', "Response" },
93   { 'e', "Error" },
94   { 0, NULL }
95 };
96
97 static const char dict_str[] = "Dictionary...";
98 static const char list_str[] = "List...";
99
100
101 static inline int
102 bencoded_string_length(tvbuff_t *tvb, guint *offset_ptr)
103 {
104   guint offset, start, len;
105
106   offset = *offset_ptr;
107   start = offset;
108
109   while(tvb_get_guint8(tvb, offset) != ':')
110     ++offset;
111
112   len = atoi(tvb_get_string(wmem_packet_scope(), tvb, start, offset-start));
113   ++offset; /* skip the ':' */
114
115   *offset_ptr = offset;
116   return len;
117 }
118
119
120 /*
121  * dissect a bencoded string from tvb, start at offset. it's like "5:abcde"
122  * *result will be the decoded value
123  */
124
125 static int
126 dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, guint offset, char **result, gboolean tohex, const char *label )
127 {
128   guint string_len;
129   string_len = bencoded_string_length(tvb, &offset);
130
131   /* fill the return data */
132   if( tohex )
133     *result = tvb_bytes_to_str(tvb, offset, string_len );
134   else
135     *result = tvb_get_string( wmem_packet_scope(), tvb, offset, string_len );
136
137   proto_tree_add_string_format( tree, hf_bencoded_string, tvb, offset, string_len, *result, "%s: %s", label, *result );
138   offset += string_len;
139   return offset;
140 }
141
142 /*
143  * dissect a bencoded integer from tvb, start at offset. it's like "i5673e"
144  * *result will be the decoded value
145  */
146 static int
147 dissect_bencoded_int(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, guint offset, char **result, const char *label )
148 {
149   guint start_offset;
150
151   /* we have confirmed that the first byte is 'i' */
152   offset += 1;
153   start_offset = offset;
154
155   while( tvb_get_guint8(tvb,offset)!='e' )
156     offset += 1;
157
158   *result = tvb_get_string( wmem_packet_scope(), tvb, start_offset, offset-start_offset);
159   proto_tree_add_string_format( tree, hf_bencoded_int, tvb, start_offset, offset-start_offset, *result,
160     "%s: %s", label, *result );
161
162   offset += 1;
163   return offset;
164 }
165
166 /* pre definition of dissect_bencoded_dict(), which is needed by dissect_bencoded_list() */
167 static int dissect_bencoded_dict(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const char *label );
168
169 /* dissect a bencoded list from tvb, start at offset. it's like "lXXXe", "X" is any bencoded thing */
170 static int
171 dissect_bencoded_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const char *label  )
172 {
173   proto_item *ti;
174   proto_tree *sub_tree;
175   guint       one_byte;
176   char       *result;
177
178   ti = proto_tree_add_none_format( tree, hf_bencoded_list, tvb, offset, 0, "%s: list...", label );
179   sub_tree = proto_item_add_subtree( ti, ett_bencoded_list);
180
181   /* skip the 'l' */
182   offset += 1;
183
184   while( (one_byte=tvb_get_guint8(tvb,offset)) != 'e' )
185   {
186     switch( one_byte )
187     {
188     /* a integer */
189     case 'i':
190       offset = dissect_bencoded_int( tvb, pinfo, sub_tree, offset, &result, "Integer" );
191       break;
192     /* a sub-list */
193     case 'l':
194       offset = dissect_bencoded_list( tvb, pinfo, sub_tree, offset, "Sub-list" );
195       break;
196     /* a dictionary */
197     case 'd':
198       offset = dissect_bencoded_dict( tvb, pinfo, sub_tree, offset, "Sub-dict" );
199       break;
200     /* a string */
201     default:
202       offset = dissect_bencoded_string( tvb, pinfo, sub_tree, offset, &result, FALSE, "String" );
203       break;
204     }
205   }
206   offset += 1;
207   return offset;
208 }
209
210 /* dissect a bt dht error from tvb, start at offset. it's like "li201e9:error msge" */
211 static int
212 dissect_bt_dht_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, char **result, const char *label )
213 {
214   proto_item *ti;
215   proto_tree *sub_tree;
216   char       *error_no, *error_msg;
217
218   error_no  = NULL;
219   error_msg = NULL;
220
221   ti       = proto_tree_add_item( tree, hf_bt_dht_error, tvb, offset, 0, ENC_NA );
222   sub_tree = proto_item_add_subtree( ti, ett_bt_dht_error);
223
224   /* we have confirmed that the first byte is 'l' */
225   offset += 1;
226
227   /* dissect bt-dht error number and message */
228   offset = dissect_bencoded_int( tvb, pinfo, sub_tree, offset, &error_no, "Error ID" );
229   offset = dissect_bencoded_string( tvb, pinfo, sub_tree, offset, &error_msg, FALSE, "Error Message" );
230
231   proto_item_set_text( ti, "%s: error %s, %s", label, error_no, error_msg );
232   col_append_fstr( pinfo->cinfo, COL_INFO, "error_no=%s error_msg=%s ", error_no, error_msg );
233   *result = wmem_strdup_printf(wmem_packet_scope(), "error %s, %s", error_no, error_msg );
234
235   return offset;
236 }
237
238 /* dissect a bt dht values list from tvb, start at offset. it's like "l6:....6:....e" */
239 static int
240 dissect_bt_dht_values(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, char **result, const char *label )
241 {
242   proto_item *ti;
243   proto_tree *sub_tree;
244   proto_item *value_ti;
245   proto_tree *value_tree;
246
247   guint       peer_index;
248   guint       string_len;
249
250   ti = proto_tree_add_item( tree, hf_bt_dht_peers, tvb, offset, 0, ENC_NA );
251   sub_tree = proto_item_add_subtree( ti, ett_bt_dht_peers);
252
253   peer_index = 0;
254   /* we has confirmed that the first byte is 'l' */
255   offset += 1;
256
257   /* dissect bt-dht values */
258   while( tvb_get_guint8(tvb,offset)!='e' )
259   {
260     string_len = bencoded_string_length(tvb, &offset);
261
262     /* 4 bytes ip, 2 bytes port */
263     for( ; string_len>=6; string_len-=6, offset+=6 )
264     {
265       peer_index += 1;
266
267       value_ti = proto_tree_add_item( sub_tree, hf_bt_dht_peer, tvb, offset, 6, ENC_NA );
268       proto_item_append_text(value_ti, " %d", peer_index);
269       value_tree = proto_item_add_subtree( value_ti, ett_bt_dht_peers);
270
271       proto_tree_add_item( value_tree, hf_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
272       proto_item_append_text(value_ti, " (IP/Port: %s", tvb_ip_to_str(tvb, offset));
273       proto_tree_add_item( value_tree, hf_port, tvb, offset+4, 2, ENC_BIG_ENDIAN);
274       proto_item_append_text(value_ti, ":%u)", tvb_get_ntohs( tvb, offset+4 ));
275
276     }
277     /* truncated data */
278     if( string_len>0 )
279     {
280       proto_tree_add_item( tree, hf_truncated_data, tvb, offset, string_len, ENC_NA );
281       offset += string_len;
282     }
283   }
284
285   if (tvb_get_guint8(tvb,offset)=='e') /* list ending delimiter */
286     offset++;
287
288   proto_item_set_text( ti, "%s: %d peers", label, peer_index );
289   col_append_fstr( pinfo->cinfo, COL_INFO, "reply=%d peers ", peer_index );
290   *result = wmem_strdup_printf(wmem_packet_scope(), "%d peers", peer_index);
291
292   return offset;
293 }
294
295 static int
296 dissect_bt_dht_nodes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, char **result, const char *label )
297 {
298   proto_item *ti;
299   proto_tree *sub_tree;
300   proto_item *node_ti;
301   proto_tree *node_tree;
302
303   guint       node_index;
304   guint       string_len;
305
306   string_len = bencoded_string_length(tvb, &offset);
307
308   ti = proto_tree_add_item( tree, hf_bt_dht_nodes, tvb, offset, string_len, ENC_NA );
309   sub_tree = proto_item_add_subtree( ti, ett_bt_dht_nodes);
310   node_index = 0;
311
312   /* 20 bytes id, 4 bytes ip, 2 bytes port */
313   for( ; string_len>=26; string_len-=26, offset+=26 )
314   {
315     node_index += 1;
316
317
318     node_ti = proto_tree_add_item( sub_tree, hf_bt_dht_node, tvb, offset, 26, ENC_NA);
319     proto_item_append_text(node_ti, " %d", node_index);
320     node_tree = proto_item_add_subtree( node_ti, ett_bt_dht_peers);
321
322     proto_tree_add_item( node_tree, hf_bt_dht_id, tvb, offset, 20, ENC_NA);
323     proto_item_append_text(node_ti, " (id: %s", tvb_bytes_to_str(tvb, offset, 20));
324     proto_tree_add_item( node_tree, hf_ip, tvb, offset+20, 4, ENC_BIG_ENDIAN);
325     proto_item_append_text(node_ti, ", IP/Port: %s", tvb_ip_to_str(tvb, offset+20));
326     proto_tree_add_item( node_tree, hf_port, tvb, offset+24, 2, ENC_BIG_ENDIAN);
327     proto_item_append_text(node_ti, ":%u)", tvb_get_ntohs( tvb, offset+24 ));
328   }
329   if( string_len>0 )
330   {
331     proto_tree_add_item( tree, hf_truncated_data, tvb, offset, string_len, ENC_NA );
332     offset += string_len;
333   }
334   proto_item_set_text( ti, "%s: %d nodes", label, node_index );
335   col_append_fstr( pinfo->cinfo, COL_INFO, "reply=%d nodes ", node_index );
336   *result = wmem_strdup_printf(wmem_packet_scope(), "%d", node_index);
337
338   return offset;
339 }
340
341 static int
342 dissect_bencoded_dict_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset )
343 {
344   proto_item *ti;
345   proto_tree *sub_tree;
346   gboolean    tohex;
347   char       *key, *val;
348   guint       orig_offset = offset;
349
350   key = NULL;
351   val = NULL;
352
353   ti       = proto_tree_add_item( tree, hf_bencoded_dict_entry, tvb, offset, 0, ENC_NA );
354   sub_tree = proto_item_add_subtree( ti, ett_bencoded_dict_entry);
355
356   /* dissect the key, it must be a string */
357   offset   = dissect_bencoded_string( tvb, pinfo, sub_tree, offset, &key, FALSE, "Key" );
358
359   /* If it is a dict, then just do recursion */
360   switch( tvb_get_guint8(tvb,offset) )
361   {
362   case 'd':
363     offset = dissect_bencoded_dict( tvb, pinfo, sub_tree, offset, "Value" );
364     val    = (char*)dict_str;
365     break;
366   case 'l':
367     if( strcmp(key,"e")==0 )
368       offset = dissect_bt_dht_error( tvb, pinfo, sub_tree, offset, &val, "Value" );
369     else if( strcmp(key,"values")==0 )
370       offset = dissect_bt_dht_values( tvb, pinfo, sub_tree, offset, &val, "Value" );
371     /* other unfamiliar lists */
372     else
373     {
374       offset = dissect_bencoded_list( tvb, pinfo, sub_tree, offset, "Value" );
375       val = (char*)list_str;
376     }
377     break;
378   case 'i':
379     offset = dissect_bencoded_int( tvb, pinfo, sub_tree, offset, &val, "Value" );
380     break;
381   /* it's a string */
382   default:
383     /* special process */
384     if( strcmp(key,"nodes")==0 )
385     {
386       offset = dissect_bt_dht_nodes( tvb, pinfo, sub_tree, offset, &val, "Value" );
387     }
388     else if( strcmp(key,"ip")==0 )
389     {
390       /*
391        * Not found in BEP 0005 but explained by
392        * http://www.rasterbar.com/products/libtorrent/dht_sec.html
393        */
394
395       int len, old_offset;
396       old_offset = offset;
397       len = bencoded_string_length(tvb, &offset);
398
399       if(len == 4) {
400         proto_tree_add_item(sub_tree, hf_ip, tvb, offset, len, ENC_BIG_ENDIAN);
401         val = (char*)tvb_ip_to_str(tvb, offset);
402         offset += len;
403       }
404       else {
405         offset = dissect_bencoded_string( tvb, pinfo, sub_tree, old_offset, &val, TRUE, "Value" );
406       }
407     }
408     else
409     {
410       /* some need to return hex string */
411       tohex = strcmp(key,"id")==0 || strcmp(key,"target")==0
412            || strcmp(key,"info_hash")==0 || strcmp(key,"t")==0
413            || strcmp(key,"v")==0 || strcmp(key,"token")==0;
414       offset = dissect_bencoded_string( tvb, pinfo, sub_tree, offset, &val, tohex, "Value" );
415     }
416   }
417
418   if( strlen(key)==1 )
419     key = (char*)val_to_str_const( key[0], short_key_name_value_string, key );
420   if( strlen(val)==1 )
421     val = (char*)val_to_str_const( val[0], short_val_name_value_string, val );
422
423   proto_item_set_text( ti, "%s: %s", key, val );
424   proto_item_set_len( ti, offset-orig_offset );
425
426   if( strcmp(key,"message_type")==0 || strcmp(key,"request_type")==0 )
427     col_append_fstr(pinfo->cinfo, COL_INFO, "%s=%s ", key, val);
428
429   return offset;
430 }
431
432 /* dict = d...e */
433 static int
434 dissect_bencoded_dict(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const char *label )
435 {
436   proto_item *ti;
437   proto_tree *sub_tree;
438   guint       orig_offset = offset;
439
440   if(offset == 0)
441   {
442     ti = proto_tree_add_item(tree, proto_bt_dht, tvb, 0, -1, ENC_NA);
443     sub_tree = proto_item_add_subtree(ti, ett_bt_dht);
444   }
445   else
446   {
447     ti = proto_tree_add_none_format( tree, hf_bencoded_dict, tvb, offset, -1, "%s: Dictionary...", label );
448     sub_tree = proto_item_add_subtree( ti, ett_bencoded_dict);
449   }
450
451   /* skip the first char('d') */
452   offset += 1;
453
454   while( tvb_get_guint8(tvb,offset)!='e' )
455     offset = dissect_bencoded_dict_entry( tvb, pinfo, sub_tree, offset );
456
457   offset += 1;
458   proto_item_set_len( ti, offset-orig_offset );
459
460   return offset;
461 }
462
463 static int
464 dissect_bt_dht(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
465 {
466   col_set_str(pinfo->cinfo, COL_PROTOCOL, "BT-DHT");
467   col_clear(pinfo->cinfo, COL_INFO);
468
469   return dissect_bencoded_dict(tvb, pinfo, tree, 0, "BitTorrent DHT Protocol");
470 }
471
472 static
473 gboolean dissect_bt_dht_heur (tvbuff_t *tvb, packet_info *pinfo,
474                                         proto_tree *tree, void *data _U_)
475 {
476   /* try dissecting */
477   /* Assume dictionary (d) is followed by a one char long (1:) key string. */
478   if(tvb_memeql(tvb, 0, "d1:", 3) == 0)
479   {
480     int i;
481     guint8 key = tvb_get_guint8(tvb, 3);
482
483     /* Iterate through possible keys to improve heuristics. */
484     for(i=0; short_key_name_value_string[i].value != 0; i++)
485     {
486       if(short_key_name_value_string[i].value == key)
487       {
488         conversation_t *conversation;
489
490         conversation = find_or_create_conversation(pinfo);
491         conversation_set_dissector(conversation, bt_dht_handle);
492
493         dissect_bt_dht(tvb, pinfo, tree, NULL);
494         return TRUE;
495       }
496     }
497   }
498   return FALSE;
499 }
500
501 void
502 proto_register_bt_dht(void)
503 {
504   static hf_register_info hf[] = {
505     { &hf_bencoded_string,
506       { "String", "bt-dht.bencoded.string",
507         FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
508     },
509     { &hf_bencoded_list,
510       { "List", "bt-dht.bencoded.list",
511         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
512     },
513     { &hf_bencoded_int,
514       { "Int", "bt-dht.bencoded.int",
515         FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
516     },
517     { &hf_bencoded_dict,
518       { "Dictionary", "bt-dht.bencoded.dict",
519         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
520     },
521     { &hf_bencoded_dict_entry,
522       { "Dictionary Entry", "bt-dht.bencoded.dict_entry",
523         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
524     },
525     { &hf_bt_dht_error,
526       { "Error", "bt-dht.error",
527         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
528     },
529     { &hf_bt_dht_peer,
530       { "Peer", "bt-dht.peer",
531         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
532     },
533     { &hf_bt_dht_peers,
534       { "Peers", "bt-dht.peers",
535         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
536     },
537     { &hf_bt_dht_node,
538       { "Node", "bt-dht.node",
539         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
540     },
541     { &hf_bt_dht_nodes,
542       { "Nodes", "bt-dht.nodes",
543         FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
544     },
545     { &hf_bt_dht_id,
546       { "ID", "bt-dht.id",
547         FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
548     },
549     { &hf_ip,
550       { "IP", "bt-dht.ip",
551         FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }
552     },
553     { &hf_port,
554       { "Port", "bt-dht.port",
555         FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
556     },
557     { &hf_truncated_data,
558       { "Truncated data", "bt-dht.truncated_data",
559         FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
560     }
561   };
562
563   /* Setup protocol subtree array */
564   static gint *ett[] = {
565     &ett_bt_dht,
566     &ett_bencoded_list,
567     &ett_bencoded_dict,
568     &ett_bt_dht_error,
569     &ett_bt_dht_peers,
570     &ett_bt_dht_nodes,
571     &ett_bencoded_dict_entry
572   };
573
574   module_t *bt_dht_module;
575
576   proto_bt_dht = proto_register_protocol (
577     "BitTorrent DHT Protocol",  /* name */
578     "BT-DHT",                   /* short name */
579     "bt-dht"                    /* abbrev */
580   );
581
582   bt_dht_module = prefs_register_protocol(proto_bt_dht, proto_reg_handoff_bt_dht);
583   prefs_register_bool_preference(bt_dht_module, "enable", "Enable BT-DHT heuristic dissection",
584                                  "Enable BT-DHT heuristic dissection (default is disabled)",
585                                  &bt_dht_enable_heuristic_dissection);
586
587   proto_register_field_array(proto_bt_dht, hf, array_length(hf));
588   proto_register_subtree_array(ett, array_length(ett));
589 }
590
591 void
592 proto_reg_handoff_bt_dht(void)
593 {
594   static gboolean prefs_initialized = FALSE;
595
596   /* "Decode As" is always available;
597    *  Heuristic dissection in disabled by default since the heuristic is quite weak.
598    *  XXX - Still too weak?
599    */
600   if (!prefs_initialized) {
601     heur_dissector_add("udp", dissect_bt_dht_heur, proto_bt_dht);
602
603     bt_dht_handle = new_create_dissector_handle(dissect_bt_dht, proto_bt_dht);
604     dissector_add_handle("udp.port", bt_dht_handle);   /* for "decode_as" */
605
606     prefs_initialized = TRUE;
607   }
608
609   heur_dissector_set_enabled("udp", dissect_bt_dht_heur, proto_bt_dht, bt_dht_enable_heuristic_dissection);
610 }
611
612 /*
613  * Editor modelines
614  *
615  * Local Variables:
616  * c-basic-offset: 2
617  * tab-width: 8
618  * indent-tabs-mode: nil
619  * End:
620  *
621  * ex: set shiftwidth=2 tabstop=8 expandtab:
622  * :indentSize=2:tabSize=8:noTabs=true:
623  */