VFS Question: Is there more vfs_ops ...( difference between vfs.c/vfs-wrap.c )

Mike Gerdts Michael.Gerdts at alcatel.com
Tue May 14 09:09:02 GMT 2002


On Tue, 2002-05-14 at 11:28, troutb at abclabs.com wrote:
> Whats the difference between vfs.c & vfs-wrap.c ... the code doesn't have
> many  comments.

vfs.c has all the handling for the VFS plugin mechanism, as well as
various utility functions.

vfs-wrap.c is the "default module".  If no VFS module exists that
provides the functions defined in vfs-wrap.c, then vfs-wrap's functions
are called.

> 
> Why would I put code into vfs-wrap.c ... wouldn't future upgrades go easier
> if it was a vfs modules?

non-bugfix changes that you make would most likely go into your own vfs
module.

> Or does that limit the cmds & funtions you have?

For code in a VFS module to be called, it must either be one of the
defined functions in vfs_ops, or it must be called from one of those
functions.

> Can I get the workstation that made the connection?

Every vfs call has a connection_struct as its first argument.  A quick
look at include/smb.h reveals that one of the items in that struct is:

    char client_address[18]; /* String version of client IP address. */

Mike





More information about the samba-technical mailing list