vboxfs_prov.h revision 99eccc8f34de2d4b6af556ba2f5f0c756af237c7
/* $Id$ */
/** @file
* VirtualBox File System for Solaris Guests, provider header.
* Portions contributed by: Ronald.
*/
/*
* Copyright (C) 2009-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___VBoxFS_prov_Solaris_h
#define ___VBoxFS_prov_Solaris_h
#ifdef __cplusplus
extern "C" {
#endif
/*
* These are the provider interfaces used by sffs to access the underlying
* shared file system.
*/
#define SFPROV_VERSION 1
/*
* Initialization and termination.
* sfprov_connect() is called once before any other interfaces and returns
* a handle used in further calls. The argument should be SFPROV_VERSION
* from above. On failure it returns a NULL pointer.
*
* sfprov_disconnect() must only be called after all sf file systems have been
* unmounted.
*/
typedef struct sfp_connection sfp_connection_t;
extern sfp_connection_t *sfprov_connect(int);
extern void sfprov_disconnect(sfp_connection_t *);
/*
* Mount / Unmount a shared folder.
*
* sfprov_mount() takes as input the connection pointer and the name of
* the shared folder. On success, it returns zero and supplies an
* sfp_mount_t handle. On failure it returns any relevant errno value.
*
* sfprov_unmount() unmounts the mounted file system. It returns 0 on
* success and any relevant errno on failure.
*/
typedef struct sfp_mount sfp_mount_t;
extern int sfprov_unmount(sfp_mount_t *);
/*
* query information about a mounted file system
*/
/*
*
* generally means that the host file didn't exist.
*/
typedef struct sfp_file sfp_file_t;
/*
*/
typedef struct sffs_stat {
} sffs_stat_t;
/*
*/
extern int sfprov_trunc(sfp_mount_t *, char *);
/*
* Symbolic link operations
*/
extern int sfprov_set_show_symlinks(void);
sffs_stat_t *stat);
/*
* Read directory entries.
*/
/*
* a singly linked list of buffers, each containing an array of stat's+dirent's.
* sf_len is length of the sf_entries array, in bytes.
*/
typedef struct sffs_dirents {
struct sffs_dirents *sf_next;
struct sffs_dirent {
} sf_entries[1];
#define SFFS_DIRENTS_SIZE 8192
#ifdef __cplusplus
}
#endif
#endif /* !___VBoxFS_prov_Solaris_h */