4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
39 * Enable compilation for either XFN1 (pre-2.6) or XFN2 environment.
42 #define XFN1(x) /* cstyle */, x
44 #define _fn_ctx_handle_from_initial_with_uid(uid, auth, status) \
45 fn_ctx_handle_from_initial(status)
52 * FNS file system reference and address types. Each (char *) array is indexed
53 * using the corresponding enumeration.
55 extern const char *reftypes
[];
59 NUM_REFTYPES
/* Not a ref type, but rather a count of them */
62 extern const char *addrtypes
[];
68 NUM_ADDRTYPES
/* Not an addr type, but rather a count of them */
73 * Initialization for FNS. Return 0 on success.
79 * Allocate a new composite name. On error, log an error message and
82 extern FN_composite_name_t
*
83 new_cname(const char *);
86 * Return the type of a reference, or NUM_REFTYPES if the type is unknown.
89 reftype(const FN_ref_t
*);
92 * Return the type of an address, or NUM_ADDRTYPES if the type is unknown.
95 addrtype(const FN_ref_addr_t
*);
98 * Determine whether two identifiers match.
101 ident_equal(const FN_identifier_t
*, const FN_identifier_t
*);
104 * Determine whether an identifier and a string match.
107 ident_str_equal(const FN_identifier_t
*, const char *);
110 * Syslog an error message and status info (with detail level DETAIL)
111 * if "verbose" is set.
115 logstat(const FN_status_t
*, const char *msg1
, const char *msg2
);
118 * Determine whether an error is potentially transient.
121 transient(const FN_status_t
*);
124 * Log a memory allocation failure if "verbose" is true.
127 log_mem_failure(void);
130 _fn_ctx_handle_from_initial_with_uid(uid_t
, unsigned int, FN_status_t
*);
132 extern FN_string_t
*empty_string
;
133 extern FN_composite_name_t
*empty_cname
;
134 extern FN_composite_name_t
*slash_cname
; /* "/" */
141 #endif /* _NS_FNUTILS_H */