http://bugs.ethereal.com/bugzilla/show_bug.cgi?id=377
[obnox/wireshark/wip.git] / tap-wspstat.c
index 8fe193e53870a939b0a0d7954b2379898bd6c689..1e77dd465730c492856ceb1beeaaa45a7a4403aa 100644 (file)
  *
  */
 
-/* With MSVC and a libethereal.dll this file needs to import some variables 
-   in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */   
-#define _NEED_VAR_IMPORT_
-
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 #include <string.h>
 #include "epan/packet_info.h"
 #include <epan/tap.h>
+#include <epan/stat_cmd_args.h>
 #include "register.h"
 #include "epan/value_string.h"
 #include <epan/dissectors/packet-wsp.h>
 
 /* used to keep track of the stats for a specific PDU type*/
 typedef struct _wsp_pdu_t {
-       gchar           *type;
+       const gchar     *type;
        guint32          packets;
 } wsp_pdu_t;
 /* used to keep track of RTT statistics */
 typedef struct _wsp_status_code_t {
-       gchar           *name;
+       const gchar     *name;
        guint32          packets;
 } wsp_status_code_t;
 /* used to keep track of the statictics for an entire program interface */
@@ -217,10 +214,10 @@ wspstat_draw(void *psp)
  * new instance for the wsp tap.
  */
 static void
-wspstat_init(char *optarg)
+wspstat_init(const char *optarg)
 {
        wspstat_t *sp;
-       char *filter=NULL;
+       const char *filter=NULL;
        guint32 i;
        GString *error_string;
        wsp_status_code_t *sc;
@@ -284,5 +281,5 @@ wspstat_init(char *optarg)
 void 
 register_tap_listener_wspstat(void)
 {
-       register_ethereal_tap("wsp,stat,", wspstat_init);
+       register_stat_cmd_arg("wsp,stat,", wspstat_init);
 }