*
* $Id$
*
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
/* When called, this function will create a new instance of tap-boopstat.
*/
static void
-dhcpstat_init(const char *optarg)
+dhcpstat_init(const char *optarg, void* userdata _U_)
{
dhcpstat_t *sp;
const char *filter=NULL;
sp = g_malloc( sizeof(dhcpstat_t) );
sp->hash = g_hash_table_new( g_str_hash, g_str_equal);
if(filter){
- sp->filter=g_malloc(strlen(filter)+1);
- strcpy(sp->filter,filter);
+ sp->filter=g_strdup(filter);
} else {
sp->filter=NULL;
}
/* error, we failed to attach to the tap. clean up */
g_free(sp->filter);
g_free(sp);
- fprintf(stderr, "tethereal: Couldn't register dhcp,stat tap: %s\n",
+ fprintf(stderr, "tshark: Couldn't register dhcp,stat tap: %s\n",
error_string->str);
g_string_free(error_string, TRUE);
exit(1);
void
register_tap_listener_gtkdhcpstat(void)
{
- register_stat_cmd_arg("bootp,stat,", dhcpstat_init);
+ register_stat_cmd_arg("bootp,stat,", dhcpstat_init,NULL);
}