Some linux-cifs-client ideas
idra at samba.org
Mon Aug 23 20:02:14 GMT 2004
On Mon, 2004-08-23 at 21:48, Anthony Liguori wrote:
> On Mon, 2004-08-23 at 14:35, Juan Lang wrote:
> > This is probably somewhat OT, but:
> > Anthony wrote:
> > > In Windows, at least, network neighborhood is
> > > implemented through a shell extension. It's not a
> > > real file system (AFAIK) as far as non shell-aware
> > > applications are concerned.
> > Not entirely true. The workgroup, server, and share
> > browsing are done through a shell extension, but when
> > opening a file or directory, NtCreateFile (and its
> > Win32 equivalent, CreateFile) can handle UNC path
> > names. The parameters to NtCreateFile map really
> > easily to the NT_CREATE_ANDX SMB, in fact.
> My understanding is that portions of the UNC path name are handled in
> different SMBs. Namely the username is sent during the SessionSetupAndX
> and the path (\\host\share) are sent during the TreeConnectAndX. I'm
> sure there's a bunch of other ways to do it. I'm not aware of a single
> SMB that will take all that information in an open (although it wouldn't
> surprise me).
> What I was actually referring to though was that there's no Win32 file
> system API that will allow you to enumerate the shares or hosts in a
> network. For instance, you cannot open say C:\shares to see the list of
> available shares. Instead this is a virtual concept in the windows
> I'm suggesting that since this is already done as a part of gnome-vfs
> perhaps it's better not to add it to the kernel. Just my .02 cents...
But the windows kernel let you indirectly do that.
If you call \\server\share\file you actually get that opened. The kernel
support that. We would probably equally need a shell to browse the
I'm not proposing to make the kernel browse the network, but if you try
to cd in /cifs/netwroks/workgroup/server/share and these workgroup
server and share really exist and are accessible then it creates that
filesystem hierarchy and cache it so that following access can continue
long this path.
We may also think of deleting a server/share path portion after some
time the last user disconnects ...
Simo Sorce - idra at samba.org
Samba Team - http://www.samba.org
Italian Site - http://samba.xsec.it
More information about the samba-technical