1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23 /* All Rights Reserved */ 24 25 26 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ 27 28 /* 29 * lssmbmsg.h: The listener checks that a message is an SMB 30 * (MS-NET) message by checking that the first byte 31 * of the message contains 0xff and the next three 32 * contain "SMB". 33 */ 34 35 #define SMBIDSTR "SMB" 36 #define SMBIDSZ 3 37 38 /* 39 * SMB command codes 40 */ 41 42 #define FSPnil -1 /* no command currently in progress */ 43 #define FSPillegal -2 /* illegal command being handled */ 44 #define FSPnop 0xff /* no-op for testing */ 45 #define FSPmkdir 0x00 /* create directory */ 46 #define FSPrmdir 0x01 /* delete directory */ 47 #define FSPopen 0x02 /* open file */ 48 #define FSPcreate 0x03 /* create file */ 49 #define FSPclose 0x04 /* close file */ 50 #define FSPflush 0x05 /* flush file */ 51 #define FSPdelete 0x06 /* delete file */ 52 #define FSPmv 0x07 /* rename file */ 53 #define FSPgetatr 0x08 /* get file attributes */ 54 #define FSPsetatr 0x09 /* set file attributes */ 55 #define FSPread 0x0a /* read from file */ 56 #define FSPwrite 0x0b /* write to file */ 57 #define FSPlock 0x0c /* lock byte range */ 58 #define FSPunlock 0x0d /* unlock byte range */ 59 #define FSPmktmp 0x0e /* make temporary file */ 60 #define FSPmknew 0x0f /* make new file */ 61 #define FSPchkpth 0x10 /* check directory path */ 62 #define FSPexit 0x11 /* process exit */ 63 #define FSPlseek 0x12 /* seek in file; return position */ 64 #define FSPtcon 0x70 /* tree connect */ 65 #define FSPtdis 0x71 /* tree disconnect */ 66 #define FSPnegprot 0x72 /* negotiate protocol */ 67 #define FSPdskattr 0x80 /* get disk attributes */ 68 #define FSPsearch 0x81 /* search directory */ 69 #define FSPsplopen 0xc0 /* open print spool file */ 70 #define FSPsplclose 0xc2 /* close print spool file */ 71 #define FSPsplwr 0xc1 /* write to print spool file */ 72 #define FSPsplretq 0xc3 /* return print queue */ 73 74 /* 75 * Indexes into SMB message 76 */ 77 78 #define FSP_IDF 0 79 #define FSP_COM 4 80 #define FSP_RCLS 5 81 #define FSP_REH 6 82 #define FSP_ERR 7 83 #define FSP_REB 9 84 #define FSP_RES 10 85 #define FSP_PID 26 86 #define FSP_UID 28 87 #define FSP_TID 24 88 #define FSP_MID 30 89 #define FSP_WCNT 32 90 #define FSP_PARMS 33 91 #define FSP_BCNT FSP_PARMS + 4 92 #define FSP_DATA FSP_BCNT + 4 93 94