2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _RP_PLUGIN_H
2N/A#define _RP_PLUGIN_H
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <sys/types.h>
2N/A
2N/A#define RP_LIB_DIR "/usr/lib/reparse"
2N/A#define RP_PLUGIN_V1 1
2N/A
2N/A/*
2N/A * some error codes
2N/A */
2N/A#define RP_OK 0
2N/A#define RP_NO_PLUGIN ENOENT
2N/A#define RP_NO_MEMORY ENOMEM
2N/A#define RP_NO_PLUGIN_DIR ENOTDIR
2N/A#define RP_INVALID_PROTOCOL EINVAL
2N/A
2N/Aextern int rp_plugin_init(void);
2N/A
2N/Atypedef struct rp_plugin_ops {
2N/A int rpo_version;
2N/A int (*rpo_init)(void);
2N/A int (*rpo_fini)(void);
2N/A char *(*rpo_svc_types)(void);
2N/A boolean_t (*rpo_supports_svc)(const char *);
2N/A int (*rpo_form)(const char *, const char *, char *, size_t *);
2N/A int (*rpo_deref)(const char *, const char *, char *, size_t *);
2N/A} rp_plugin_ops_t;
2N/A
2N/Atypedef struct rp_proto_plugin {
2N/A struct rp_proto_plugin *plugin_next;
2N/A rp_plugin_ops_t *plugin_ops;
2N/A void *plugin_handle;
2N/A} rp_proto_plugin_t;
2N/A
2N/Atypedef struct rp_proto_handle {
2N/A int rp_num_proto;
2N/A rp_plugin_ops_t **rp_ops;
2N/A} rp_proto_handle_t;
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _RP_PLUGIN_H */