da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
2c2961f8403049d948b9f3e6c35d6488b6b7e1aajose borrego * SMB requests.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Magic 0xFF 'S' 'M' 'B'
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_com a byte, the "first" command
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Error a 4-byte union, ignored in a request
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_flg a one byte set of eight flags
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_flg2 a two byte set of 16 flags
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * . twelve reserved bytes, have a role
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * in connectionless transports (IPX, UDP?)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_tid a 16-bit tree ID, a mount point sorta,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 0xFFFF is this command does not have
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * or require a tree context
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_pid a 16-bit process ID
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_uid a 16-bit user ID, specific to this "session"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and mapped to a system (bona-fide) UID
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_mid a 16-bit multiplex ID, used to differentiate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * multiple simultaneous requests from the same
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * process (pid) (ref RPC "xid")
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Chained (AndX) commands (0 or more)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_wct a byte, number of 16-bit words containing
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * command parameters, min 2 for chained command
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * andx_com a byte, the "next" command, 0xFF for none
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * . an unused byte
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * andx_off a 16-bit offset, byte displacement from &Magic
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to the smb_wct field of the "next" command,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ignore if andx_com is 0xFF, s/b 0 if no next
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_vwv[] 0 or more 16-bit (sorta) parameters for
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * "this" command (i.e. smb_com if this is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * first parameters, or the andx_com of the just
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * previous block.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_bcc a 16-bit count of smb_data[] bytes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_data[] 0 or more bytes, format specific to commands
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * padding[] Optional padding
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Last command
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_wct a byte, number of 16-bit words containing
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * command parameters, min 0 for chained command
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_vwv[] 0 or more 16-bit (sorta) parameters for
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * "this" command (i.e. smb_com if this is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * first parameters, or the andx_com of the just
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * previous block.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_bcc a 16-bit count of smb_data[] bytes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_data[] 0 or more bytes, format specific to commands
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Magic 0xFF 'S' 'M' 'B'
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_com a byte, the "first" command, corresponds
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to request
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Error a 4-byte union, coding depends on dialect in use
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * for "DOS" errors
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * a byte for error class
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * an unused byte
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * a 16-bit word for error code
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * for "NT" errors
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * a 32-bit error code which
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * is a packed class and specifier
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * for "OS/2" errors
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * I don't know
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The error information is specific to the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * last command in the reply chain.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_flg a one byte set of eight flags, 0x80 bit set
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * indicating this message is a reply
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_flg2 a two byte set of 16 flags
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * . twelve reserved bytes, have a role
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * in connectionless transports (IPX, UDP?)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_tid a 16-bit tree ID, a mount point sorta,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * should be the same as the request
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_pid a 16-bit process ID, MUST BE the same as request
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_uid a 16-bit user ID, specific to this "session"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and mapped to a system (bona-fide) UID,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * should be the same as request
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_mid a 16-bit multiplex ID, used to differentiate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * multiple simultaneous requests from the same
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * process (pid) (ref RPC "xid"), MUST BE the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * same as request
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * padding[] Optional padding
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Chained (AndX) commands (0 or more)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_wct a byte, number of 16-bit words containing
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * command parameters, min 2 for chained command,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * andx_com a byte, the "next" command, 0xFF for none,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * corresponds to request, if this is the chained
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * command that had an error set to 0xFF
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * . an unused byte
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * andx_off a 16-bit offset, byte displacement from &Magic
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to the smb_wct field of the "next" command,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ignore if andx_com is 0xFF, s/b 0 if no next
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_vwv[] 0 or more 16-bit (sorta) parameters for
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * "this" command (i.e. smb_com if this is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * first parameters, or the andx_com of the just
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * previous block. Empty if an error.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_bcc a 16-bit count of smb_data[] bytes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_data[] 0 or more bytes, format specific to commands
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * empty if an error.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Last command
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_wct a byte, number of 16-bit words containing
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * command parameters, min 0 for chained command
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_vwv[] 0 or more 16-bit (sorta) parameters for
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * "this" command (i.e. smb_com if this is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * first parameters, or the andx_com of the just
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * previous block, empty if an error.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_bcc a 16-bit count of smb_data[] bytes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smb_data[] 0 or more bytes, format specific to commands,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * empty if an error.
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic int is_andx_com(unsigned char);
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic int smbsr_check_result(struct smb_request *, int, int);
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Rossstatic void smb1_tq_work(void *);
8622ec4569457733001d4982ef7f5b44427069beGordon Rossstatic const smb_disp_entry_t const
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbCreateDirectory", SMB_SDT_OPS(create_directory), /* 0x00 000 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbDeleteDirectory", SMB_SDT_OPS(delete_directory), /* 0x01 001 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbCreate", SMB_SDT_OPS(create), /* 0x03 003 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbClose", SMB_SDT_OPS(close), /* 0x04 004 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbFlush", SMB_SDT_OPS(flush), /* 0x05 005 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbDelete", SMB_SDT_OPS(delete), /* 0x06 006 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbRename", SMB_SDT_OPS(rename), /* 0x07 007 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbQueryInformation", SMB_SDT_OPS(query_information), /* 0x08 008 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbSetInformation", SMB_SDT_OPS(set_information), /* 0x09 009 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbWrite", SMB_SDT_OPS(write), /* 0x0B 011 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbLockByteRange", SMB_SDT_OPS(lock_byte_range), /* 0x0C 012 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbUnlockByteRange", SMB_SDT_OPS(unlock_byte_range), /* 0x0D 013 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbCreateTemporary", SMB_SDT_OPS(create_temporary), /* 0x0E 014 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbCreateNew", SMB_SDT_OPS(create_new), /* 0x0F 015 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbCheckDirectory", SMB_SDT_OPS(check_directory), /* 0x10 016 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbProcessExit", SMB_SDT_OPS(process_exit), /* 0x11 017 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbLockAndRead", SMB_SDT_OPS(lock_and_read), /* 0x13 019 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbWriteAndUnlock", SMB_SDT_OPS(write_and_unlock), /* 0x14 020 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x15, 0 }, /* 0x15 021 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x16, 0 }, /* 0x16 022 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x17, 0 }, /* 0x17 023 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x18, 0 }, /* 0x18 024 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x19, 0 }, /* 0x19 025 */
380bdfdf3b87cbfda20ccdf5d4fa7c129623622bGordon Ross { "SmbReadRaw", SMB_SDT_OPS(invalid), 0x1A, 0 }, /* 0x1A 026 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x1B, 0 }, /* 0x1B 027 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x1C, 0 }, /* 0x1C 028 */
380bdfdf3b87cbfda20ccdf5d4fa7c129623622bGordon Ross { "SmbWriteRaw", SMB_SDT_OPS(invalid), 0x1D, 0 }, /* 0x1D 029 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x1E, 0 }, /* 0x1E 030 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x1F, 0 }, /* 0x1F 031 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x20, 0 }, /* 0x20 032 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x21, 0 }, /* 0x21 033 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbSetInformation2", SMB_SDT_OPS(set_information2), /* 0x22 034 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbQueryInformation2",
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbLockingX", SMB_SDT_OPS(locking_andx), /* 0x24 036 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTransaction", SMB_SDT_OPS(transaction), /* 0x25 037 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTransactionSecondary",
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright SMB_SDT_OPS(transaction_secondary), /* 0x26 038 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbIoctl", SMB_SDT_OPS(ioctl), /* 0x27 039 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x28, 0 }, /* 0x28 040 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x29, 0 }, /* 0x29 041 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x2A, 0 }, /* 0x2A 042 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright 0x2B, LANMAN1_0, SDDF_SUPPRESS_TID | SDDF_SUPPRESS_UID },
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbWriteAndClose", SMB_SDT_OPS(write_and_close), /* 0x2C 044 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbOpenX", SMB_SDT_OPS(open_andx), /* 0x2D 045 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbReadX", SMB_SDT_OPS(read_andx), /* 0x2E 046 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbWriteX", SMB_SDT_OPS(write_andx), /* 0x2F 047 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x30, 0 }, /* 0x30 048 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbCloseAndTreeDisconnect",
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright SMB_SDT_OPS(close_and_tree_disconnect), /* 0x31 049 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTransaction2", SMB_SDT_OPS(transaction2), /* 0x32 050 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTransaction2Secondary",
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright SMB_SDT_OPS(transaction2_secondary), /* 0x33 051 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbFindClose2", SMB_SDT_OPS(find_close2), /* 0x34 052 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x35, 0 }, /* 0x35 053 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x36, 0 }, /* 0x36 054 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x37, 0 }, /* 0x37 055 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x38, 0 }, /* 0x38 056 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x39, 0 }, /* 0x39 057 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x3A, 0 }, /* 0x3A 058 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x3B, 0 }, /* 0x3B 059 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x3C, 0 }, /* 0x3C 060 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x3D, 0 }, /* 0x3D 061 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x3E, 0 }, /* 0x3E 062 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x3F, 0 }, /* 0x3F 063 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x40, 0 }, /* 0x40 064 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x47, 0 }, /* 0x47 065 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x48, 0 }, /* 0x48 066 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x49, 0 }, /* 0x49 067 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x44, 0 }, /* 0x44 068 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x45, 0 }, /* 0x45 069 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x46, 0 }, /* 0x46 070 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x47, 0 }, /* 0x47 071 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x48, 0 }, /* 0x48 072 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x49, 0 }, /* 0x49 073 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x4A, 0 }, /* 0x4A 074 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x4B, 0 }, /* 0x4B 075 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x4C, 0 }, /* 0x4C 076 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x4D, 0 }, /* 0x4D 077 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x4E, 0 }, /* 0x4E 078 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x4F, 0 }, /* 0x4F 079 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x50, 0 }, /* 0x50 080 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x51, 0 }, /* 0x51 081 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x52, 0 }, /* 0x52 082 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x53, 0 }, /* 0x53 083 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x54, 0 }, /* 0x54 084 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x55, 0 }, /* 0x55 085 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x56, 0 }, /* 0x56 086 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x57, 0 }, /* 0x57 087 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x58, 0 }, /* 0x58 088 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x59, 0 }, /* 0x59 089 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x5A, 0 }, /* 0x5A 090 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x5B, 0 }, /* 0x5B 091 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x5C, 0 }, /* 0x5C 092 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x5D, 0 }, /* 0x5D 093 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x5E, 0 }, /* 0x5E 094 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x5F, 0 }, /* 0x5F 095 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x60, 0 }, /* 0x60 096 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x61, 0 }, /* 0x61 097 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x62, 0 }, /* 0x62 098 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x63, 0 }, /* 0x63 099 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x64, 0 }, /* 0x64 100 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x65, 0 }, /* 0x65 101 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x66, 0 }, /* 0x66 102 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x67, 0 }, /* 0x67 103 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x68, 0 }, /* 0x68 104 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x69, 0 }, /* 0x69 105 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x6A, 0 }, /* 0x6A 106 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x6B, 0 }, /* 0x6B 107 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x6C, 0 }, /* 0x6C 108 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x6D, 0 }, /* 0x6D 109 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x6E, 0 }, /* 0x6E 110 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x6F, 0 }, /* 0x6F 111 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTreeConnect", SMB_SDT_OPS(tree_connect), /* 0x70 112 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright 0x70, PC_NETWORK_PROGRAM_1_0, SDDF_SUPPRESS_TID },
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTreeDisconnect", SMB_SDT_OPS(tree_disconnect), /* 0x71 113 */
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * NB: Negotiate gets special handling via
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * smb_initial_request_handler. After that,
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * another Negotiate is an invalid request.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross { "SmbNegotiate", SMB_SDT_OPS(invalid), /* 0x72 114 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbSessionSetupX", SMB_SDT_OPS(session_setup_andx), /* 0x73 115 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright 0x73, LANMAN1_0, SDDF_SUPPRESS_TID | SDDF_SUPPRESS_UID },
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbLogoffX", SMB_SDT_OPS(logoff_andx), /* 0x74 116 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbTreeConnectX", SMB_SDT_OPS(tree_connect_andx), /* 0x75 117 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x76, 0, 0 }, /* 0x76 118 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x77, 0, 0 }, /* 0x77 119 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x78, 0, 0 }, /* 0x78 120 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x79, 0, 0 }, /* 0x79 121 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x7A, 0, 0 }, /* 0x7A 122 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x7B, 0, 0 }, /* 0x7B 123 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x7C, 0, 0 }, /* 0x7C 124 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x7D, 0, 0 }, /* 0x7D 125 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x7E, 0, 0 }, /* 0x7E 126 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x7F, 0, 0 }, /* 0x7F 127 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbQueryInformationDisk",
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright SMB_SDT_OPS(query_information_disk), /* 0x80 128 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbSearch", SMB_SDT_OPS(search), /* 0x81 129 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbFindUnique", SMB_SDT_OPS(find_unique), /* 0x83 131 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbFindClose", SMB_SDT_OPS(find_close), /* 0x84 132 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x85, 0, 0 }, /* 0x85 133 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x86, 0, 0 }, /* 0x86 134 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x87, 0, 0 }, /* 0x87 135 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x88, 0, 0 }, /* 0x88 136 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x89, 0, 0 }, /* 0x89 137 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x8A, 0, 0 }, /* 0x8A 138 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x8B, 0, 0 }, /* 0x8B 139 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x8C, 0, 0 }, /* 0x8C 140 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x8D, 0, 0 }, /* 0x8D 141 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x8E, 0, 0 }, /* 0x8E 142 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x8F, 0, 0 }, /* 0x8F 143 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x90, 0, 0 }, /* 0x90 144 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x91, 0, 0 }, /* 0x91 145 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x92, 0, 0 }, /* 0x92 146 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x93, 0, 0 }, /* 0x93 147 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x94, 0, 0 }, /* 0x94 148 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x95, 0, 0 }, /* 0x95 149 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x96, 0, 0 }, /* 0x96 150 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x97, 0, 0 }, /* 0x97 151 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x98, 0, 0 }, /* 0x98 152 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x99, 0, 0 }, /* 0x99 153 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x9A, 0, 0 }, /* 0x9A 154 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x9B, 0, 0 }, /* 0x9B 155 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x9C, 0, 0 }, /* 0x9C 156 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x9D, 0, 0 }, /* 0x9D 157 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x9E, 0, 0 }, /* 0x9E 158 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0x9F, 0, 0 }, /* 0x9F 159 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbNtTransact", SMB_SDT_OPS(nt_transact), /* 0xA0 160 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbNtTransactSecondary",
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright SMB_SDT_OPS(nt_transact_secondary), /* 0xA1 161 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbNtCreateX", SMB_SDT_OPS(nt_create_andx), /* 0xA2 162 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xA3, 0, 0 }, /* 0xA3 163 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbNtCancel", SMB_SDT_OPS(nt_cancel), /* 0xA4 164 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbNtRename", SMB_SDT_OPS(nt_rename), /* 0xA5 165 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xA6, 0, 0 }, /* 0xA6 166 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xA7, 0, 0 }, /* 0xA7 167 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xA8, 0, 0 }, /* 0xA8 168 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xA9, 0, 0 }, /* 0xA9 169 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xAA, 0, 0 }, /* 0xAA 170 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xAB, 0, 0 }, /* 0xAB 171 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xAC, 0, 0 }, /* 0xAC 172 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xAD, 0, 0 }, /* 0xAD 173 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xAE, 0, 0 }, /* 0xAE 174 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xAF, 0, 0 }, /* 0xAF 175 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB0, 0, 0 }, /* 0xB0 176 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB1, 0, 0 }, /* 0xB1 177 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB2, 0, 0 }, /* 0xB2 178 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB3, 0, 0 }, /* 0xB3 179 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB4, 0, 0 }, /* 0xB4 180 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB5, 0, 0 }, /* 0xB5 181 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB6, 0, 0 }, /* 0xB6 182 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB7, 0, 0 }, /* 0xB7 183 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB8, 0, 0 }, /* 0xB8 184 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xB9, 0, 0 }, /* 0xB9 185 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xBA, 0, 0 }, /* 0xBA 186 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xBB, 0, 0 }, /* 0xBB 187 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xBC, 0, 0 }, /* 0xBC 188 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xBD, 0, 0 }, /* 0xBD 189 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xBE, 0, 0 }, /* 0xBE 190 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xBF, 0, 0 }, /* 0xBF 191 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbOpenPrintFile", SMB_SDT_OPS(open_print_file), /* 0xC0 192 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbWritePrintFile", SMB_SDT_OPS(write_print_file), /* 0xC1 193 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbClosePrintFile", SMB_SDT_OPS(close_print_file), /* 0xC2 194 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "SmbGetPrintQueue", SMB_SDT_OPS(get_print_queue), /* 0xC3 195 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xC4, 0, 0 }, /* 0xC4 196 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xC5, 0, 0 }, /* 0xC5 197 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xC6, 0, 0 }, /* 0xC6 198 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xC7, 0, 0 }, /* 0xC7 199 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xC8, 0, 0 }, /* 0xC8 200 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xC9, 0, 0 }, /* 0xC9 201 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xCA, 0, 0 }, /* 0xCA 202 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xCB, 0, 0 }, /* 0xCB 203 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xCC, 0, 0 }, /* 0xCC 204 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xCD, 0, 0 }, /* 0xCD 205 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xCE, 0, 0 }, /* 0xCE 206 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xCF, 0, 0 }, /* 0xCF 207 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD0, 0, 0 }, /* 0xD0 208 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD1, 0, 0 }, /* 0xD1 209 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD2, 0, 0 }, /* 0xD2 210 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD3, 0, 0 }, /* 0xD3 211 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD4, 0, 0 }, /* 0xD4 212 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD5, 0, 0 }, /* 0xD5 213 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD6, 0, 0 }, /* 0xD6 214 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD7, 0, 0 }, /* 0xD7 215 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD8, 0, 0 }, /* 0xD8 216 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xD9, 0, 0 }, /* 0xD9 217 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xDA, 0, 0 }, /* 0xDA 218 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xDB, 0, 0 }, /* 0xDB 219 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xDC, 0, 0 }, /* 0xDC 220 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xDD, 0, 0 }, /* 0xDD 221 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xDE, 0, 0 }, /* 0xDE 222 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xDF, 0, 0 }, /* 0xDF 223 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE0, 0, 0 }, /* 0xE0 224 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE1, 0, 0 }, /* 0xE1 225 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE2, 0, 0 }, /* 0xE2 226 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE3, 0, 0 }, /* 0xE3 227 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE4, 0, 0 }, /* 0xE4 228 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE5, 0, 0 }, /* 0xE5 229 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE6, 0, 0 }, /* 0xE6 230 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE7, 0, 0 }, /* 0xE7 231 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE8, 0, 0 }, /* 0xE8 232 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xE9, 0, 0 }, /* 0xE9 233 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xEA, 0, 0 }, /* 0xEA 234 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xEB, 0, 0 }, /* 0xEB 235 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xEC, 0, 0 }, /* 0xEC 236 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xED, 0, 0 }, /* 0xED 237 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xEE, 0, 0 }, /* 0xEE 238 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xEF, 0, 0 }, /* 0xEF 239 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF0, 0, 0 }, /* 0xF0 240 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF1, 0, 0 }, /* 0xF1 241 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF2, 0, 0 }, /* 0xF2 242 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF3, 0, 0 }, /* 0xF3 243 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF4, 0, 0 }, /* 0xF4 244 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF5, 0, 0 }, /* 0xF5 245 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF6, 0, 0 }, /* 0xF6 246 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF7, 0, 0 }, /* 0xF7 247 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF8, 0, 0 }, /* 0xF8 248 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xF9, 0, 0 }, /* 0xF9 249 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xFA, 0, 0 }, /* 0xFA 250 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xFB, 0, 0 }, /* 0xFB 251 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xFC, 0, 0 }, /* 0xFC 252 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xFD, 0, 0 }, /* 0xFD 253 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xFE, 0, 0 }, /* 0xFE 254 */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright { "Invalid", SMB_SDT_OPS(invalid), 0xFF, 0, 0 } /* 0xFF 255 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smbsr_cleanup
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If any user/tree/file is used by given request then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the reference count for that resource has been incremented.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This function decrements the reference count and close
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the resource if it's needed.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Mark this request so we know that we've already cleaned it up.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A request should only get cleaned up once so multiple calls to
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * smbsr_cleanup for the same request indicate a bug.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * This is the SMB1 handler for new smb requests, called from
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * smb_session_reader after SMB negotiate is done. For most SMB
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * requests, we just enqueue them for the smb_session_worker to
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * execute via the task queue, so they can block for resources
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * without stopping the reader thread. A few protocol messages
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * are special cases and are handled directly here in the reader
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * thread so they don't wait for taskq scheduling. Later, a few
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * MORE things could be handled here, such as REPLY messages
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * (oplock break reply) and things like "NT_cancel".
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * This function must either enqueue the new request for
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * execution via the task queue, or execute it directly
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * and then free it. If this returns non-zero, the caller
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * will drop the session.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross if (sr->session->signing.flags & SMB_SIGNING_ENABLED) {
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross sr->sr_seqnum = sr->session->signing.seqnum + 1;
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Submit the request to the task queue, which calls
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * smb1_tq_work when the workload permits.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross smb_srqueue_waitq_enter(sr->session->s_srqueue);
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross (void) taskq_dispatch(sr->sr_server->sv_worker_pool,
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * SMB1 requests that have been cancelled
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * have no reply. Just free it.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * smb1sr_work
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * In most cases, this should free the request before return.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Exceptions are when a dispatch function returns SDRC_SR_KEPT.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* temporary until we identify a user */
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Decode the SMB header.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * The reply "header" is filled in now even though it will,
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * most likely, be rewritten under reply_ready below. We
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * could reserve the space but this is convenient in case
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * the dialect dispatcher has to send a special reply (like
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * TRANSACT).
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Ensure that the 32-bit error code flag is turned off.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Clients seem to set it in transact requests and they may
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * get confused if we return success or a 16-bit SMB code.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross if ((session->signing.flags & SMB_SIGNING_CHECK) != 0) {
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross if ((sr->smb_flg2 & SMB_FLAGS2_SMB_SECURITY_SIGNATURE) == 0 ||
3db3f65c6274eb042354801a308c8e9bc4994553amw if (smb_mbc_decodef(&sr->command, "b", &sr->smb_wct) != 0) {
3db3f65c6274eb042354801a308c8e9bc4994553amw if (smb_mbc_decodef(&sr->command, "#.w", sr->smb_wct*2, &sr->smb_bcc)) {
2c2961f8403049d948b9f3e6c35d6488b6b7e1aajose borrego * Ignore smb_bcc if CAP_LARGE_READX/CAP_LARGE_WRITEX
2c2961f8403049d948b9f3e6c35d6488b6b7e1aajose borrego * and this is SmbReadX/SmbWriteX since this enables
2c2961f8403049d948b9f3e6c35d6488b6b7e1aajose borrego * large reads/write and bcc is only 16-bits.
584e0fcee1dbe52e794c1fa7ff42406f88479aa4Gordon Ross max_bytes = sr->command.max_bytes - sr->command.chain_offset;
1fb4a876cbadf3a151ab8a149be6956199e83e22Gordon Ross /* Allow > BCC */
584e0fcee1dbe52e794c1fa7ff42406f88479aa4Gordon Ross /* BCC is bogus. Will fail later. */
584e0fcee1dbe52e794c1fa7ff42406f88479aa4Gordon Ross /* ordinary case */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* Store pointers for later */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* Peek ahead and don't disturb vwv */
3db3f65c6274eb042354801a308c8e9bc4994553amw if (smb_mbc_peek(&sr->smb_vwv, sr->smb_vwv.chain_offset, "b.w",
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Setup UID and TID information (if required). Both functions
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * will set the sr credentials. In domain mode, the user and
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * tree credentials should be the same. In share mode, the
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * tree credentials (defined in the share definition) should
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * override the user credentials.
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb if (!(sdd->sdt_flags & SDDF_SUPPRESS_UID) && (sr->uid_user == NULL)) {
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States sr->uid_user = smb_session_lookup_uid(session, sr->smb_uid);
b89a8333f5e1f75ec0c269b22524bd2eccb972banatalie li - Sun Microsystems - Irvine United States sr->user_cr = smb_user_getcred(sr->uid_user);
3b13a1ef7511135ec0c75b5f94de8075454efd79Thomas Keiser if (!(sdd->sdt_flags & SDDF_SUPPRESS_TID) && (sr->tid_tree == NULL)) {
3b13a1ef7511135ec0c75b5f94de8075454efd79Thomas Keiser sr->tid_tree = smb_session_lookup_tree(session, sr->smb_tid);
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States if (sdrc != SDRC_SR_KEPT) {
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States (*sdd->sdt_post_op)(sr);
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States smbsr_cleanup(sr);
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States }
8622ec4569457733001d4982ef7f5b44427069beGordon Ross smb_latency_add_sample(&sds->sdt_lat, gethrtime() - sr->sr_time_start);
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright (int64_t)(sr->reply.chain_offset - sr->sr_txb));
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjb switch (sdrc) {
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross /* will free sr */
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross /* Do NOT free sr */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * If there's no AndX command, we're done.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Otherwise, we have to back-patch the AndXCommand and AndXOffset
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * and continue processing.
3db3f65c6274eb042354801a308c8e9bc4994553amw (void) smb_mbc_poke(&sr->reply, sr->andx_prev_wct + 1, "b.w",
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw sr->command.chain_offset = sr->orig_request_hdr + sr->andx_off;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb if (sr->smb_rcls == 0 && sr->smb_reh == 0 && sr->smb_err == 0)
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States smb_rwx_rwenter(&session->s_lock, RW_WRITER);
59229f98006fc8ee5e568078d81b6ce572071e0bjose borrego session->s_state = SMB_SESSION_STATE_DISCONNECTED;
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States smb_rwx_rwexit(&session->s_lock);
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Rosssmbsr_encode_result(struct smb_request *sr, int wct, int bcc,
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross const char *fmt, ...)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (0);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwsmbsr_check_result(struct smb_request *sr, int wct, int bcc)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mbuf *m;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw while (m != 0) {
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* reply wct & vwv seem ok, consider data now */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
3db3f65c6274eb042354801a308c8e9bc4994553amw (void) smb_mbc_peek(&sr->reply, offset, "bb", &temp, &temp1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (-1);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (0);
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Rosssmbsr_decode_vwv(struct smb_request *sr, const char *fmt, ...)
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Rosssmbsr_decode_data(struct smb_request *sr, const char *fmt, ...)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb return (rc);
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright return (sr->smb_data.chain_offset < sr->smb_data.max_bytes);
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Report a request processing status (error or warning).
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wrightsmbsr_status(smb_request_t *sr, DWORD status, uint16_t errcls, uint16_t errcode)
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * This function is SMB1 specific. While adding SMB2 support,
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * calls to this function have been removed from common code.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * In case we missed any, check for SMB2 callers here, and
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * vector into a wrapper function that we can watch for...
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * (and track down with dtrace:)
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross if (status != 0 && errcls == 0 && errcode == 0) {
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * Setup a request processing error. This function can be used to
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * report 32-bit status codes or DOS errors. Set the status code
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * to 0 (NT_STATUS_SUCCESS) to explicitly report a DOS error,
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * regardless of the client capabilities.
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * If status is non-zero and the client supports 32-bit status
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * codes, report the status. Otherwise, report the DOS error.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw sr->r_xa = smb_xa_find(sr->session, sr->smb_pid, sr->smb_mid);
3b13a1ef7511135ec0c75b5f94de8075454efd79Thomas Keiser sr->fid_ofile = smb_ofile_lookup_by_fid(sr, sr->smb_fid);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw switch (com) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (0);
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * Invalid command stubs.
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * The Read/Write Block Multiplexed (mpx) protocol is used to maximize
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * performance when reading/writing a large block of data: it can be
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * used in parallel with other client/server operations. The mpx sub-
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * protocol is not supported because we support only connection oriented
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * transports and NT supports mpx only over connectionless transports.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * smb_dispatch_stats_init
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Initializes dispatch statistics.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross ksr = ((smbsrv_kstats_t *)sv->sv_ksp->ks_data)->ks_reqs1;
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright (void) strlcpy(ksr->kr_name, smb_disp_table[i].sdt_name,
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * smb_dispatch_stats_fini
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Frees and destroyes the resources used for statistics.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright for (i = 0; i < SMB_COM_NUM; i++)
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright if ((first < SMB_COM_NUM) && (last < SMB_COM_NUM)) {