Wireshark-dev: [Wireshark-dev] Why stats_tree_register is expecting "const guint8 *" and not "c

From: wsgd <wsgd@xxxxxxx>
Date: Sat, 25 Apr 2009 13:23:33 +0200
Hello all,

Into http://www.wireshark.org/docs/wsdg_html_chunked/ChDissectStats.html,
we have the exemple :
static void register_foo_stat_trees(void) {
 stats_tree_register("foo","foo","Foo/Packet Types",
     foo_stats_tree_packet, foo_stats_tree_init, NULL );
}

When I call it (in a C++ file), I have the following error :
Impossible to convert parameter 1 from 'const char [4]' to 'const guint8 *'

Into epan/stats_tree.h, we have :
extern void stats_tree_register(const guint8* tapname,
                             const guint8* abbr,
                             const guint8* name,
                             stat_tree_packet_cb packet,
                             stat_tree_init_cb init,
                             stat_tree_cleanup_cb cleanup);

Why is it guint8 and not a char type ?


Thanks,
Olivier

--
Wireshark Generic Dissector http://wsgd.free.fr