svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
libreparse(3lib)
libreparse(3LIB) Interface Libraries libreparse(3LIB)
NAME
libreparse - reparse point library
SYNOPSIS
cc [ flag... ] file... -lreparse [ library... ]
#include <sys/fs_reparse.h>
#include <rp_plugin.h>
DESCRIPTION
The functions in this library perform operations related to "reparse
points", which are the basis of Microsoft DFS referrals and NFS refer‐
rals support on Oracle Solaris SMB and NFS file servers. A service
which offers namespace redirection can provide "plugins", libraries
which provide creation and interpretation services for reparse points.
INTERFACES
The shared object libreparse.so.1 provides the following public inter‐
faces. See intro(3) for additional information on shared object inter‐
faces.
tab(); lw(2.75i) lw(2.75i) reparse_addreparse_create
reparse_deletereparse_deref reparse_freereparse_init
reparse_parsereparse_remove reparse_unparsereparse_validate rp_plug‐
in_init
The shared object "plugins" must each provide a versioned ops table of
the form:
typedef struct reparse_plugin_ops {
int rpo_version; /* version number */
int (*rpo_init)(void);
void (*rpo_fini)(void);
char *(*rpo_svc_types)(void);
boolean_t (*rpo_supports_svc)(const char *);
char *(*rpo_form)(const char *, const char *, char *,
size_t *);
int (*rpo_deref)(const char *, const char *, char *,
size_t *);
} reparse_plugin_ops_t
For example,
reparse_plugin_ops_t reparse_plugin_ops = {
REPARSE_PLUGIN_V1,
nfs_init,
nfs_fini,
nfs_svc_types,
nfs_supports_svc,
nfs_form,
nfs_deref
};
The version 1 ops table supports the following operations:
int (*rpo_init)(void);
This is a one-time initialization function that will be called by
libreparse.so upon loading the plugin prior to any other opera‐
tions. This provides the plugin with an opportunity to perform ser‐
vice specific initialization. This function must return zero on
success or non-zero errno values to indicate an error.
void (*rpo_fini)(void);
This is a one-time termination function that will be called by
libreparse.so prior closing the plugin. Once called, libreparse.so
will not call any other operations on the plugin.
char *(*rpo_svc_types)(void);
Returns a pointer to a string containing a list of comma separated
svc_types. svc_type names are case-insensitive and white space in
the returned string is irrelevant and must be ignored by parsers.
boolean_t (*rpo_supports_svc)(const char *svc_type);
This function will return true if the plugin supports the specified
service type, otherwise it must return false.
int *(*rpo_form)(const char *svc_type, const char *string, char *buf,
size_t *bufsize);
Formats a string with the appropriate service-specific syntax to
create a reparse point of the given svc_type, using the string from
the reparse_add(3REPARSE) call as part of the string. The caller
specifies the size of the buffer provided via *bufsize; the routine
will fail with EOVERFLOW if the results will not fit in the buffer,
in which case, *bufsize will contain the number of bytes needed to
hold the results.
int (*rpo_deref)(const char *svc_type, const char *svc_data, char *buf,
size_t *bufsize);
Accepts the service-specific item from the reparse point and
returns the service-specific data requested. The caller specifies
the size of the buffer provided via *bufsize; the routine will fail
with EOVERFLOW if the results will not fit in the buffer, in which
case, *bufsize will contain the number of bytes needed to hold the
results.
FILES
/usr/lib/libreparse.so.1
shared object
/usr/lib/64/libreparse.so.1
64-bit shared object
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/library _ Interface StabilityCommit‐
ted _ MT-LevelSafe
SEE ALSO
reparse_add(3REPARSE), intro(3), attributes(7)
Oracle Solaris 11.4 23 Aug 2019 libreparse(3LIB)