smbfs_node.c revision 02d09e03eb27f3a2dc299de704e45dae5173f43f
/*
* Copyright (c) 2000-2001 Boris Popov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Boris Popov.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: smbfs_node.c,v 1.54.52.1 2005/05/27 02:35:28 lindak Exp $
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/sysmacros.h>
#include <netsmb/smb_osdep.h>
#include <netsmb/smb_conn.h>
#include <netsmb/smb_subr.h>
#include <smbfs/smbfs_node.h>
#include <smbfs/smbfs_subr.h>
/*
* Lack of inode numbers leads us to the problem of generating them.
* with inode numbers generated from the incremented by one counter.
* However this way will require too much kernel memory, gives all
* sorts of locking and consistency problems, not to mentinon counter
* overflows. So, I'm decided to use a hash function to generate
* pseudo random (and [often?] unique) inode numbers.
*/
/* Magic constants for name hashing. */
static inline uint32_t
{
uint32_t v;
v *= FNV_32_PRIME;
}
return (v);
}
/*
* Compute the hash of the full (remote) path name
* using the three parts supplied separately.
*/
{
uint32_t v;
return (v);
}
/*
* Like smbfs_gethash, but optimized a little by
* starting with the directory hash.
*/
{
char sep;
/* Start with directory hash */
/* separator (maybe) */
if (sep)
/* Now hash this component. */
return (ino);
}
/*
* Allocate and copy a string of passed length.
* The passed length does NOT include the null.
*/
char *
{
char *cp;
return (cp);
}
/*
* Free string from smbfs_name_alloc(). Again,
* the passed length does NOT include the null.
*/
void
{
}
/*
* smbfs_nget()
*
* Find or create a node under some directory node.
*/
int
{
char sep;
/* Don't expect "" or "." or ".." here anymore. */
return (EINVAL);
}
/* Find or create the node. */
/*
* We should have np now, because we passed
* fap != NULL to smbfs_node_findcreate.
*/
/*
* Files in an XATTR dir are also XATTR.
*/
}
/* BSD symlink hack removed (smb_symmagic) */
return (0);
}
/*
* smbfs_attrcache_enter, smbfs_attrcache_lookup replaced by
* code more closely resembling NFS. See smbfs_client.c
*/
/*
* Update the local notion of the mtime of some directory.
* See comments re. r_mtime in smbfs_node.h
*/
void
{
/*
* Now that we keep the client's notion of mtime
* separately from the server, this is easy.
*/
/*
* Invalidate the cache, so that we go to the wire
* to check that the server doesn't have a better
* timestamp next time we care.
*/
}
void
{
/* smbfs_attrcache_rm_locked(np); */
}
/* See smbfs_node.h */
void
{
}