2000-03-08 22:14:30 +00:00
/*
2002-07-15 10:35:28 +00:00
Unix SMB / Netbios implementation .
Version 3.0
2000-03-08 22:14:30 +00: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 19:25:36 +00:00
the Free Software Foundation ; either version 3 of the License , or
2000-03-08 22:14:30 +00: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 00:52:41 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2002-07-15 10:35:28 +00:00
2000-03-08 22:14:30 +00: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 01:13:16 +00: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 19:25:48 +00:00
# define MAX_MSDFS_JUNCTIONS 256
2000-03-08 22:14:30 +00:00
2009-11-21 21:36:01 +01:00
struct client_dfs_referral {
2015-04-30 19:22:21 -07:00
uint32_t proximity ;
uint32_t ttl ;
2007-12-07 12:02:44 -08:00
char * dfspath ;
2009-11-21 21:36:01 +01:00
} ;
2005-02-23 17:29:28 +00:00
2005-08-02 23:24:32 +00:00
struct referral {
2007-09-11 18:31:29 +00:00
char * alternate_path ; /* contains the path referred */
2015-04-30 19:22:21 -07:00
uint32_t proximity ;
uint32_t ttl ; /* how long should client cache referral */
2000-03-08 22:14:30 +00:00
} ;
2005-08-02 23:24:32 +00:00
struct junction_map {
2007-09-11 18:31:29 +00:00
char * service_name ;
char * volume_name ;
2008-06-22 13:06:35 +02:00
const char * comment ;
2005-08-02 23:24:32 +00:00
int referral_count ;
struct referral * referral_list ;
2000-03-08 22:14:30 +00:00
} ;
2005-08-02 23:24:32 +00:00
struct dfs_path {
2007-09-11 18:31:29 +00:00
char * hostname ;
char * servicename ;
char * reqpath ;
2007-10-18 17:40:25 -07:00
bool posix_path ;
2000-03-09 21:45:16 +00:00
} ;
2000-03-08 22:14:30 +00:00
# endif /* _MSDFS_H */