2000-03-09 01:14:30 +03:00
/*
2002-07-15 14:35:28 +04:00
Unix SMB / Netbios implementation .
Version 3.0
2000-03-09 01:14:30 +03:00
MSDfs services for Samba
Copyright ( C ) Shirish Kalele 2000
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-09 23:25:36 +04:00
the Free Software Foundation ; either version 3 of the License , or
2000-03-09 01:14:30 +03:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 04:52:41 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2002-07-15 14:35:28 +04:00
2000-03-09 01:14:30 +03:00
*/
# ifndef _MSDFS_H
# define _MSDFS_H
# define REFERRAL_TTL 600
/* Flags used in trans2 Get Referral reply */
# define DFSREF_REFERRAL_SERVER 0x1
# define DFSREF_STORAGE_SERVER 0x2
2000-05-16 05:13:16 +04:00
/* Referral sizes */
# define VERSION2_REFERRAL_SIZE 0x16
# define VERSION3_REFERRAL_SIZE 0x22
# define REFERRAL_HEADER_SIZE 0x08
/* Maximum number of referrals for each Dfs volume */
# define MAX_REFERRAL_COUNT 256
2005-06-28 23:25:48 +04:00
# define MAX_MSDFS_JUNCTIONS 256
2000-03-09 01:14:30 +03:00
2009-11-21 23:36:01 +03:00
struct client_dfs_referral {
2015-05-01 05:22:21 +03:00
uint32_t proximity ;
uint32_t ttl ;
2007-12-07 23:02:44 +03:00
char * dfspath ;
2009-11-21 23:36:01 +03:00
} ;
2005-02-23 20:29:28 +03:00
2005-08-03 03:24:32 +04:00
struct referral {
2007-09-11 22:31:29 +04:00
char * alternate_path ; /* contains the path referred */
2015-05-01 05:22:21 +03:00
uint32_t proximity ;
uint32_t ttl ; /* how long should client cache referral */
2000-03-09 01:14:30 +03:00
} ;
2005-08-03 03:24:32 +04:00
struct junction_map {
2007-09-11 22:31:29 +04:00
char * service_name ;
char * volume_name ;
2008-06-22 15:06:35 +04:00
const char * comment ;
2019-12-13 20:52:31 +03:00
size_t referral_count ;
2005-08-03 03:24:32 +04:00
struct referral * referral_list ;
2000-03-09 01:14:30 +03:00
} ;
# endif /* _MSDFS_H */