*
* $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
#endif
#include <stdio.h>
+#include <string.h>
#include "epan/packet_info.h"
#include <epan/tap.h>
+#include <epan/stat_cmd_args.h>
#include "register.h"
-#include <string.h>
typedef const char* bootp_info_value_t;
g_hash_table_foreach( sp->hash, (GHFunc)dhcp_reset_hash, NULL);
}
static int
-dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri)
+dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
{
dhcpstat_t *sp=psp;
- bootp_info_value_t value=pri;
+ const bootp_info_value_t value=pri;
dhcp_message_type_t *sc;
if (sp==NULL)
/* When called, this function will create a new instance of tap-boopstat.
*/
static void
-dhcpstat_init(char *optarg)
+dhcpstat_init(const char *optarg, void* userdata _U_)
{
dhcpstat_t *sp;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
if (!strncmp (optarg, "bootp,stat,", 11)){
/* 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_ethereal_tap("bootp,stat,", dhcpstat_init);
+ register_stat_cmd_arg("bootp,stat,", dhcpstat_init,NULL);
}