Update to V9.0.0 (2009-12)
[obnox/wireshark/wip.git] / tap-smbsids.c
index 7a4dd61e5db012ab4d7a7e9f4ead5f3055004fca..0a43eed399e0acf47e4129f6882aed669689427d 100644 (file)
@@ -1,10 +1,10 @@
 /* tap-smbsids.c
  * smbstat   2003 Ronnie Sahlberg
  *
- * $Id: tap-smbsids.c,v 1.1 2003/06/09 10:08:40 sahlberg Exp $
+ * $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 "packet-smb-sidsnooping.h"
+#include <epan/dissectors/packet-smb-sidsnooping.h>
 #include "register.h"
-#include "tap.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
-smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *psi _U_)
+smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *psi _U_)
 {
        return 1;
 }
@@ -68,23 +69,23 @@ smbsids_draw(void *pss _U_)
 
 
 static void
-smbsids_init(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);
@@ -95,6 +96,6 @@ smbsids_init(char *optarg _U_)
 void
 register_tap_listener_smbsids(void)
 {
-       register_ethereal_tap("smb,sids", smbsids_init);
+       register_stat_cmd_arg("smb,sids", smbsids_init,NULL);
 }