2 Unix SMB/Netbios implementation.
4 MSDfs services for Samba
5 Copyright (C) Shirish Kalele 2000
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #define REFERRAL_TTL 600
28 /* Flags used in trans2 Get Referral reply */
29 #define DFSREF_REFERRAL_SERVER 0x1
30 #define DFSREF_STORAGE_SERVER 0x2
33 #define VERSION2_REFERRAL_SIZE 0x16
34 #define VERSION3_REFERRAL_SIZE 0x22
35 #define REFERRAL_HEADER_SIZE 0x08
37 /* Maximum number of referrals for each Dfs volume */
38 #define MAX_REFERRAL_COUNT 256
39 #define MAX_MSDFS_JUNCTIONS 256
41 typedef struct _client_referral
{
45 } CLIENT_DFS_REFERRAL
;
48 pstring alternate_path
; /* contains the path referred */
50 uint32 ttl
; /* how long should client cache referral */
58 struct referral
* referral_list
;
68 #define init_dfsroot(conn, inbuf, outbuf) \
69 { if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \
70 DEBUG(2,("Serving %s as a Dfs root\n", \
71 lp_servicename(SNUM(conn)) )); \
72 SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS \
73 | SVAL(outbuf, smb_vwv2)); \