Help w/fd_ops for SMB

Juan Lang juan_lang at yahoo.com
Sun Dec 14 01:20:23 CST 2003


--- Alexandre Julliard <julliard at winehq.com> wrote:
> Frankly, I think the current SMB file support
> belongs in the kernel,
> and from Wine they should be accessed as normal
> files. The current
> approach is going to prevent a lot of interesting
> optimizations, since
> we need to special case all file operations instead
> of going straight
> to the kernel.

Perhaps.  You mean, extend smbfs in some way?  My goal
goes beyond file support.  I want to provide a network
neighborhood browser for wine.  I suppose the entire
NetBIOS namespace could be loaded in the kernel and
loadable by Wine.. dynamically, of course, no need to
populate it until it's requested.  Even so, more than
file read/write semantics are needed, or some creative
special devices would be needed on each remote node
for RAP and named pipes.

I've already tweaked the SMB code (locally) to
dynamically load winsock/netapi32.  The SMBs I need to
send can't be sent using any other public/documented
APIs, unfortunately.  I've implemented NetServerEnum
and NetShareEnum using them, and I think it's a short
step until opening a remote named pipe is possible,
too.  It all benefits from the NetBIOS name lookup
suff I added to Netbios()--if a name is resolvable via
Netbios(), then you'll be able to call NetShareEnum on
it, open a named pipe on it, etc.  (Since RPC is
typically layered on named pipes, the 'R' in Wine's
RPC might start to mean something too.)

So, I think I have a submittable patch here, except
that the current file stuff won't be able to poll if
the connection is using Netbios().  I know I'm
extending the current hack, perhaps in a direction you
don't want it to go.

To wrap up, I'm curious:
- is the current wineserver polling that valuable,
that I should try to find a way around the Netbios()
interface to maintain it?  (A private API is the only
solution I know for now.  If someone has decent
documentation on the TDI interfaces to NetBIOS or SMB
I'd be interested in seeing it.)
- should I submit what I have here for further review?
 
- should I mothball what I have in favor of a
different approach?

Thanks for your time,
--Juan

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/



More information about the wine-devel mailing list