4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1999 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _NFS_NFSLOG_CONFIG_H
28 #define _NFS_NFSLOG_CONFIG_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * Internal configuration file API for NFS logging.
35 * Warning: This code is likely to change drastically in future releases.
46 #define MAX_LINESZ 4096
48 #define NFSL_CONFIG_FILE_PATH "/etc/nfs/nfslog.conf"
49 #define DEFAULTTAG "global"
50 #define DEFAULTRAWTAG "global-raw"
51 #define DEFAULTDIR "/var/nfs"
52 #define BUFFERPATH "nfslog_workbuffer"
53 #define FHPATH "fhtable"
54 #define LOGPATH "nfslog"
56 enum translog_format
{
57 TRANSLOG_BASIC
, TRANSLOG_EXTENDED
61 * This struct is used to get or set the logging state for a filesystem.
62 * Using a single struct like this is okay for for releases where it's
63 * private, but it's questionable as a
64 * public API, because of extensibility and binary compatibility issues.
66 * Relative paths are interpreted relative to the root of the exported
69 typedef struct nfsl_config
{
71 char *nc_name
; /* tag or "global" */
77 enum translog_format nc_logformat
;
78 void *nc_elfcookie
; /* for rpclogfile processing */
79 void *nc_transcookie
; /* for logfile processing */
80 struct nfsl_config
*nc_next
;
83 #define NC_UPDATED 0x001 /* set when an existing entry is */
84 /* modified after detecting changes */
85 /* in the configuration file. */
86 /* Not set on creation of entry. */
88 #define NC_NOTAG_PRINTED 0x002 /* 'missing tag' syslogged */
90 extern boolean_t nfsl_errs_to_syslog
;
92 extern int nfsl_getconfig_list(nfsl_config_t
**listpp
);
93 extern int nfsl_checkconfig_list(nfsl_config_t
**listpp
, boolean_t
*);
94 extern void nfsl_freeconfig_list(nfsl_config_t
**listpp
);
95 extern nfsl_config_t
*nfsl_findconfig(nfsl_config_t
*, char *, int *);
97 extern void nfsl_printconfig_list(nfsl_config_t
*config
);
104 #endif /* _NFS_NFSLOG_CONFIG_H */