diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-08-04 10:17:24 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-08-04 10:17:24 +0000 |
commit | 358e1944db58c5f369004518c63c0a5447194902 (patch) | |
tree | bad6ffb30d14d56f3219c6091bbf647960dbf3d4 /smb.h | |
parent | ddfdc5bfb137e2db7e4d10f860a66f08b3718f5d (diff) |
Use "val_to_str()" to convert TRANSACT2 transaction codes to strings.
(This fixes an incorrect string for TRANS2_GET_DFS_REFERRAL, which has
the code 0x10 according to the current SNIA CIFS draft spec; I've seen
those in packet captures.)
Create entries in the transaction hash tables only for requests, not for
replies; this means a reply might not have an entry in the table, if the
request didn't appear in the capture, so handle that case.
Make the "last_transact2_command" field of a "smb_request_val" structure
an "int", so it can be given the value -1, which is different from all
the valid 16-bit unsigned values, to indicate that we couldn't get the
transaction code from the request (e.g., because it's too short).
Show the first Setup word in a TRANSACT2 request as the transaction
code, as that's what it is.
"dirn" is a Boolean, so
if (dirn == 1) {
...
}
if (dirn == 0) {
...
}
is equivalent to
if (dirn == 1) {
...
} else {
...
}
and the latter is a bit clearer, so use it.
Distinguish between a TRANSACTION or TRANSACT2 reply where we didn't see
the request and one where we saw the request but didn't see the request
path for TRANSACTION or the request code for TRANSACT2.
Use "g_strdup()" rather than "g_malloc()" followed by "strcpy()".
svn path=/trunk/; revision=3819
Diffstat (limited to 'smb.h')
-rw-r--r-- | smb.h | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -2,7 +2,7 @@ * Defines for smb packet dissection * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * - * $Id: smb.h,v 1.7 2001/08/02 09:30:09 guy Exp $ + * $Id: smb.h,v 1.8 2001/08/04 10:17:24 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -628,7 +628,7 @@ #define SMB_LMapi_UserPasswordSet 0x0073 struct smb_request_val { - guint16 last_transact2_command; + int last_transact2_command; gchar *last_transact_command; guint16 last_lanman_cmd; gchar *last_param_descrip; /* Keep these descriptors around */ @@ -644,9 +644,4 @@ struct smb_info { int unicode; }; - #endif - - - - |