From Harald Welte:
[obnox/wireshark/wip.git] / tap-smbsids.c
index 8da279bb558942d7d2a1d6fc60585dddf472ac25..2955bcfbed1157d04e025437f5c6a947594ab2d9 100644 (file)
@@ -3,8 +3,8 @@
  *
  * $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
 #include <string.h>
 #include "epan/packet_info.h"
 #include <epan/dissectors/packet-smb-sidsnooping.h>
-#include "stat.h"
-#include "register.h"
 #include <epan/tap.h>
+#include <epan/stat_cmd_args.h>
 #include "epan/value_string.h"
-#include "smb.h"
+#include <epan/dissectors/packet-smb.h>
 
 
 static int
@@ -48,7 +47,7 @@ smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, c
        return 1;
 }
 
-static void 
+static void
 enum_sids(gpointer key _U_, gpointer value, gpointer userdata _U_)
 {
        sid_name *sn=(sid_name *)value;
@@ -69,23 +68,23 @@ smbsids_draw(void *pss _U_)
 
 
 static void
-smbsids_init(const char *optarg _U_)
+smbsids_init(const char *optarg _U_, void* userdata _U_)
 {
        GString *error_string;
 
        if(!sid_name_snooping){
                fprintf(stderr,"The -z smb,sids function needs SMB/SID-Snooping to be enabled.\n");
-               fprintf(stderr,"Either enable Edit/Preferences/Protocols/SMB/Snoop SID name mappings  in ethereal\n");
+               fprintf(stderr,"Either enable Edit/Preferences/Protocols/SMB/Snoop SID name mappings  in wireshark\n");
                fprintf(stderr,"or override the preference file by specifying\n");
                fprintf(stderr,"  -o \"smb.sid_name_snooping=TRUE\"\n");
-               fprintf(stderr,"on the tethereal command line.\n");
+               fprintf(stderr,"on the tshark command line.\n");
                exit(1);
        }
 
 
-       error_string=register_tap_listener("smb", NULL, NULL, NULL, smbsids_packet, smbsids_draw);
+       error_string=register_tap_listener("smb", NULL, NULL, 0, NULL, smbsids_packet, smbsids_draw);
        if(error_string){
-               fprintf(stderr, "tethereal: Couldn't register smb,sids tap:%s\n",
+               fprintf(stderr, "tshark: Couldn't register smb,sids tap:%s\n",
                    error_string->str);
                g_string_free(error_string, TRUE);
                exit(1);
@@ -96,6 +95,6 @@ smbsids_init(const char *optarg _U_)
 void
 register_tap_listener_smbsids(void)
 {
-       register_stat_cmd_arg("smb,sids", smbsids_init);
+       register_stat_cmd_arg("smb,sids", smbsids_init,NULL);
 }