2 Unix SMB/CIFS implementation.
3 SMB parameters and setup, plus a whole lot more.
5 Copyright (C) Andrew Tridgell 1992-2000
6 Copyright (C) John H Terpstra 1996-2002
7 Copyright (C) Luke Kenneth Casson Leighton 1996-2000
8 Copyright (C) Paul Ashton 1998-2000
9 Copyright (C) Simo Sorce 2001-2002
10 Copyright (C) Martin Pool 2002
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 #define _BOOL /* So we don't typedef BOOL again in vfs.h */
39 /* string manipulation flags - see clistr.c and srvstr.c */
40 #define STR_TERMINATE 1
44 #define STR_NOALIGN 16
45 #define STR_NO_RANGE_CHECK 32
46 #define STR_LEN8BIT 64
47 #define STR_TERMINATE_ASCII 128 /* only terminate if ascii */
48 #define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
57 #ifndef LOCKING_VERSION
58 #define LOCKING_VERSION 4
59 #endif /* LOCKING_VERSION */
62 #define SIGNAL_CAST (RETSIGTYPE (*)(int))
70 * Loopback command offsets.
73 #define OPBRK_CMD_LEN_OFFSET 0
74 #define OPBRK_CMD_PORT_OFFSET 4
75 #define OPBRK_CMD_HEADER_LEN 6
77 #define OPBRK_MESSAGE_CMD_OFFSET 0
80 #define OPLOCK_BREAK_CMD 0x1
81 #define KERNEL_OPLOCK_BREAK_CMD 0x2
82 #define LEVEL_II_OPLOCK_BREAK_CMD 0x3
83 #define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4
85 #define CMD_REPLY 0x8000
87 #include "smb_macros.h"
89 #include "rpc_secdes.h"
93 #define SAFE_NETBIOS_CHARS ". -_"
95 /* generic iconv conversion structure */
97 size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft,
98 char **outbuf, size_t *outbytesleft);
99 size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft,
100 char **outbuf, size_t *outbytesleft);
101 size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft,
102 char **outbuf, size_t *outbytesleft);
103 void *cd_direct, *cd_pull, *cd_push;
106 #endif /* _REWRITE_H */