/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <assert.h>
#include <fcntl.h>
#include <libnvpair.h>
#include "libshare.h"
#include "libshare_impl.h"
int
{
return (SA_NOT_SUPPORTED);
}
void
{
}
/*
* Add share to cache
*
* INPUTS:
* share : pointer to nvlist containing share properties
*
* RETURNS:
* SA_OK : share added successfully
* SA_DUPLICATE_NAME : share with same name already exists in cache
* SA_INVALID_SHARE :
* SA_NOT_IMPLEMENTED: routine not implemented
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* Update a share in the cache
*
* INPUTS:
* share : pointer to nvlist containing share properties
*
* RETURNS:
* SA_OK : share added successfully
* SA_INVALID_SHARE :
* SA_SHARE_NOT_FOUND: share is not in cache
* SA_NOT_IMPLEMENTED: routine not implemented
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* Remove share from cache
*
* INPUTS:
* sh_name : name of share to remove
*
* RETURNS:
* SA_OK : share was removed successfully
* SA_SHARE_NOT_FOUND: share not found in cache
* SA_NOT_IMPLEMENTED: routine not implemented
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* remove all entries from the cache
*
* RETURNS:
* SA_OK :
* SA_NOT_IMPLEMENTED: routine not implemented
*/
int
sacache_flush(void)
{
return (SA_NOT_SUPPORTED);
}
/*
* find share in cache
*
* INPUTS:
* sh_name : name of share, cannot be NULL
* sh_path : path or dataset, can be NULL
* proto : protocol type
* share : place holder for returned share
*
* OUTPUTS
* share : pointer to found share, NULL if not found
*
* RETURNS:
* SA_OK : share found and returned in 'share'
* SA_SHARE_NOT_FOUND: share not found in cache
* SA_NOT_IMPLEMENTED: routine not implemented
*
* NOTES
* Search the cache for a share that matches input parameters.
* If 'sh_path' is non NULL, search entire cache, otherwise only search
* 'proto' must be one of SA_PROT_NFS, SA_PROT_SMB or SA_PROT_ANY
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* routine to prepare for retrieving shares from the cache.
*
* INPUTS:
* sh_path : path or dataset, can be NULL
* proto : protocol type of share to retrieve
* hdl : place holder for returned find handle
*
* OUTPUTS
* share : pointer to newly allocated handle
*
* RETURNS:
* SA_OK : init was successful, returned hdl is valid
* SA_NO_MEMORY: memory allocation error
* SA_NOT_IMPLEMENTED: routine not implemented
*
* NOTES
* If 'sh_path' is non NULL, search entire cache, otherwise only search
* The returned 'hdl' is passed to subsequent calls to
* sacache_share_find_get() and must be freed by calling
* sacache_share_find_fini()
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* routine to retrieve shares from the cache.
*
* INPUTS:
* hdl : find handle returned from previous call to
* sacache_share_find_init.
* share : place holder for returned share
*
* OUTPUTS
* share : pointer to newly allocated share
*
* RETURNS:
* SA_OK : share was returned successfully.
* SA_NO_MEMORY: memory allocation error
* SA_NOT_IMPLEMENTED: routine not implemented
*
* NOTES
* 'proto' must be one of SA_PROT_NFS, SA_PROT_SMB or SA_PROT_ANY.
* It is the responsibility of the caller to free the share memory
* by calling sa_share_free().
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* routine to cleanup after retrieving shares from the cache.
*
* INPUTS:
* hdl : find handle returned from previous call to
* sacache_share_find_init.
*
* RETURNS:
* SA_OK : hdl was cleaned up successfully.
* SA_NO_MEMORY: memory allocation error
* SA_NOT_IMPLEMENTED: routine not implemented
*
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* routine to prepare for retrieving shares from the cache by dataset name.
*
* INPUTS:
* sh_path : dataset name
* proto : protocol type of share to retrieve
* hdl : place holder for returned find handle
*
* OUTPUTS
* share : pointer to newly allocated handle
*
* RETURNS:
* SA_OK : init was successful, returned hdl is valid
* SA_NO_MEMORY: memory allocation error
* SA_NOT_IMPLEMENTED: routine not implemented
*
* NOTES
* The returned 'hdl' is passed to subsequent calls to
* sacache_share_ds_find_get() and must be freed by calling
* sacache_share_ds_find_fini()
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* routine to retrieve shares from the cache.
*
* INPUTS:
* hdl : find handle returned from previous call to
* sacache_share_ds_find_init.
* share : place holder for returned share
*
* OUTPUTS
* share : pointer to newly allocated share
*
* RETURNS:
* SA_OK : share was returned successfully.
* SA_NO_MEMORY: memory allocation error
* SA_NOT_IMPLEMENTED: routine not implemented
*
* NOTES
* It is the responsibility of the caller to free the share memory
* by calling sa_share_free().
*/
int
{
return (SA_NOT_SUPPORTED);
}
/*
* routine to cleanup after retrieving shares from the cache.
*
* INPUTS:
* hdl : find handle returned from previous call to
* sacache_share_ds_find_init.
*
* RETURNS:
* SA_OK : hdl was cleaned up successfully.
* SA_NO_MEMORY: memory allocation error
* SA_NOT_IMPLEMENTED: routine not implemented
*
*/
int
{
return (SA_NOT_SUPPORTED);
}
int
{
return (SA_NOT_SUPPORTED);
}