guy 2001/08/04 05:17:26 CDT
Modified files:
. packet-smb.c smb.h
Log:
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()".
Revision Changes Path
1.92 +111 -89 ethereal/packet-smb.c
1.8 +2 -7 ethereal/smb.h