Update a URL.
[obnox/wireshark/wip.git] / smb.h
diff --git a/smb.h b/smb.h
index c08b21c9a5c135a19aa3dc6a072826efa9cd8285..8663fb5e434612721e70ac69a1395ee38c2e1c26 100644 (file)
--- a/smb.h
+++ b/smb.h
@@ -2,7 +2,7 @@
  * Defines for smb packet dissection
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  *
- * $Id: smb.h,v 1.43 2002/08/21 21:31:54 tpot Exp $
+ * $Id: smb.h,v 1.54 2003/12/18 00:18:55 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef _SMB_H
 #define _SMB_H
 
+extern gboolean sid_name_snooping;
+
 /* SMB command codes, from the SNIA CIFS spec. */
+extern const value_string smb_cmd_vals[];
+extern const value_string trans2_cmd_vals[];
+extern const value_string nt_cmd_vals[];
 
 #define SMB_COM_CREATE_DIRECTORY               0x00
 #define SMB_COM_DELETE_DIRECTORY               0x01
 #define SMBE_badformat 11          /* Invalid format */
 #define SMBE_badaccess 12          /* Invalid open mode */
 #define SMBE_baddata 13            /* Invalid data (only from ioctl call) */
-#define SMBE_res 14 
+#define SMBE_res 14
 #define SMBE_baddrive 15           /* Invalid drive */
 #define SMBE_remcd 16              /* Attempt to delete current directory */
 #define SMBE_diffdevice 17         /* rename/move across different filesystems */
 #define SMBE_eas_didnt_fit 275     /* Extended attributes didn't fit */
 #define SMBE_eas_nsup 282          /* Extended attributes not supported */
 #define SMBE_notify_buf_small 1022 /* Buffer too small to return change notify. */
+#define SMBE_serverunavailable 1722/* Server unavailable */
 #define SMBE_unknownipc 2142
 #define SMBE_noipc 66              /* don't support ipc */
 
 #define SMBE_smbcmd 64             /* Unrecognised command */
 #define SMBE_srverror 65           /* smb server internal error */
 #define SMBE_filespecs 67          /* fid and pathname invalid combination */
-#define SMBE_badlink 68 
+#define SMBE_badlink 68
 #define SMBE_badpermits 69         /* Access specified for a file is not valid */
-#define SMBE_badpid 70 
+#define SMBE_badpid 70
 #define SMBE_setattrmode 71        /* attribute mode invalid */
 #define SMBE_paused 81             /* Message server paused */
 #define SMBE_msgoff 82             /* Not receiving messages */
 #define SMBE_useMPX 250            /* temporarily unable to use raw mode, use MPX mode */
 #define SMBE_useSTD 251            /* temporarily unable to use raw mode, use standard mode */
 #define SMBE_contMPX 252           /* resume MPX mode */
-#define SMBE_badPW 253             /* Check this out ... */ 
+#define SMBE_badPW 253             /* Check this out ... */
 #define SMBE_nosupport 0xFFFF
 #define SMBE_unknownsmb 22         /* from NT 3.5 response */
 
 #define SMBE_sharebufexc 36 /* A sharing buffer has been exceeded */
 #define SMBE_diskfull 39
 
+/* the information we need to keep around for NT transatcion commands */
+typedef struct {
+       int subcmd;
+} smb_nt_transact_info_t;
+
+/* the information we need to keep around for transaction2 commands */
+typedef struct {
+       int subcmd;
+       int info_level;
+       gboolean resume_keys; /* if "return resume" keys set in T2 FIND_FIRST request */
+} smb_transact2_info_t;
+
 /*
  * The information we need to save about a request in order to show the
  * frame number of the request in the dissection of the reply.
 #define SMB_SIF_TID_IS_IPC     0x0001
 typedef struct {
        guint32 frame_req, frame_res;
-       nstime_t req_time;              
+       nstime_t req_time;
        guint16 flags;
-       int cmd;
+       guint8 cmd;
        void *extra_info;
 } smb_saved_info_t;
 
@@ -271,14 +289,14 @@ typedef struct conv_tables {
        /* these two tables are used to match requests with responses */
        GHashTable *unmatched;
        GHashTable *matched;
-       /* this tables is used by DCERPC over SMB reassembly*/
-       GHashTable *dcerpc_fid_to_frame;
+
        /* This table is used to track TID->services for a conversation */
        GHashTable *tid_service;
+        gboolean raw_ntlmssp;   /* Do extended security exc use raw ntlmssp */
 } conv_tables_t;
 
 typedef struct smb_info {
-  int cmd;
+  guint8 cmd;
   int tid, pid, uid, mid;
   gboolean unicode;            /* Are strings in this SMB Unicode? */
   gboolean request;            /* Is this a request? */
@@ -308,7 +326,6 @@ extern int dissect_ipc_state(tvbuff_t *tvb, proto_tree *parent_tree,
     int offset, gboolean setstate);
 
 extern gboolean smb_dcerpc_reassembly;
-extern GHashTable *dcerpc_fragment_table;
 
 /*
  * NT and DOS error codes used by other dissectors.