When is network browsing supported again?
Stef Bon
stefbon at gmail.com
Wed Oct 23 09:54:23 MDT 2013
2013/10/23 Stef Bon <stefbon at gmail.com>
>
> When using calls simular to calls found in source3/client/client.c (I want
> to use these in my new fuse fs, enabling the async interface) the struct
> cli_state is used.
>
> I know this is the connection to the server. Is this connection
> established automatically? For example in the cmd_stat, the most important
> calls are:
>
> cli_resolve_path
>
> and
>
> cli_posix_stat
>
> Do these calls create a connection if it is not there yet or do I have to
> program this?
>
Maybe a bit explanation:
I have the path:
Network/Windows Network/TESTGROUP/TESTSERVER/public
I have entries and inodes, which are required to for the fuse fs to work.
An inode points to a an workspace object, which on hist turn points to a
resource. A resource can be anything. A workgroup is a resource, a server
is one, and a share, but also a partition on a harddisk, a cdrom, and a ftp
server.
(in my fs).
Every resource has two identifiers:
. a group id, like RESOURCE_GROUP_SMB and RESOURCE_GROUP_FTP
. a type, like SMB_TYPE_SERVER, SMB_TYPE_SHARE, and CDROM_TYPE_FS and
CDROM_TYPE_AUDIO etcetera.
Now this general resource points to data which is specific for the
resource, like:
/* workgroup */
struct net_smb_workgroup_struct {
char name[128];
unsigned char useridbase;
struct timespec detect_time;
struct timespec refresh_time;
struct network_struct *network;
};
/* server */
struct net_smb_server_struct {
char name[128];
char workgroup[128];
char ipv4address[32];
struct timespec detect_time;
struct timespec refresh_time;
struct network_struct *network;
};
/* share */
struct net_smb_share_struct {
char name[128];
char server[128];
char workgroup[128];
char ipv4address[32];
struct timespec detect_time;
struct timespec refresh_time;
struct network_struct *network;
int typedata;
void *data;
};
Now with my fs I do not need a list of servers like SMBCSRV, cause I have
something like that, see above.
But what to do when a client enters the share public? A connection to the
right server has to be setup. So something containing the struct cli_state.
Is this good thinking?
Thanks in advance.
Stef Bon
More information about the samba-technical
mailing list