/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NFS_LOG_H
#define _NFS_LOG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definition of dummy program for logging special non-nfs reqs
*/
/*
* Version of the on disk log file
*/
/*
* Contents of the on disk log file header
*
* Note: This is the structure for older version 1 buffers, and does not
* adequately support large buffer files, as the offset is 32 bit. Newer
* buffer files are written using version 2 buffer header (below) which
* has a 64 bit offset. However, because existing buffers continue to use
* the old header format, the daemon xdr code can read and write either format.
* This definition below is not explicitely used anywhere in the code,
* but is implicitely used by the daemon xdr code. For that reason, it
* is kept here for information purpose only.
*/
struct nfslog_buffer_header_1 {
};
/*
* For the current version 2, which supports largefiles
*/
struct nfslog_buffer_header_2 {
};
/* bh_flags values */
/*
* For each record written to the log file, this struct is used
* as the logical header; it will be XDR encoded to be written to the file.
*
* Note: if the buffer file becomes large enough, the rh_rec_id may
* wrap around. This situation is appropriately handled by the daemon however.
*/
struct nfslog_record_header {
};
/*
* For each record written to the log file, this is the logical
* structure of the record; it will be XDR encoded and written to
* the file.
*/
struct nfslog_request_record {
};
/*
* From this point forward, the definitions represent the arguments
* and results of each possible RPC that can be logged. These
* may have been trimmed in content from the real RPC arguments
* and results to save space.
*/
struct nfslog_sharefsargs {
int sh_flags;
char *sh_path;
};
struct nfslog_getfhargs {
char *gfh_path;
};
struct nfslog_diropargs {
char *da_name;
};
struct nfslog_drok {
};
struct nfslog_diropres {
union {
};
struct nfslog_rrok {
};
struct nfslog_rdresult {
union {
};
struct nfslog_writeargs {
};
struct nfslog_writeresult {
union {
};
struct nfslog_sattr {
};
struct nfslog_createargs {
};
struct nfslog_setattrargs {
};
struct nfslog_rdlnres {
union {
char *rl_ok;
};
struct nfslog_rnmargs {
};
struct nfslog_linkargs {
};
struct nfslog_symlinkargs {
char *sla_tnm;
};
struct nfslog_rddirargs {
};
struct nfslog_rdok {
};
struct nfslog_rddirres {
union {
};
struct nfslog_diropargs3 {
char *name;
};
struct nfslog_LOOKUP3res {
union {
};
struct nfslog_createhow3 {
union {
};
struct nfslog_CREATE3args {
};
struct nfslog_CREATE3resok {
};
struct nfslog_CREATE3res {
union {
};
struct nfslog_SETATTR3args {
};
struct nfslog_READLINK3res {
union {
char *data;
};
struct nfslog_READ3args {
};
struct nfslog_READ3resok {
};
struct nfslog_READ3res {
union {
};
struct nfslog_WRITE3args {
};
struct nfslog_WRITE3resok {
};
struct nfslog_WRITE3res {
union {
};
struct nfslog_MKDIR3args {
};
struct nfslog_MKDIR3res {
union {
};
struct nfslog_SYMLINK3args {
char *symlink_data;
};
struct nfslog_SYMLINK3res {
union {
};
struct nfslog_MKNOD3args {
};
struct nfslog_MKNOD3res {
union {
};
struct nfslog_REMOVE3args {
};
struct nfslog_RMDIR3args {
};
struct nfslog_RENAME3args {
};
struct nfslog_LINK3args {
};
struct nfslog_READDIRPLUS3args {
};
struct nfslog_entryplus3 {
char *name;
};
struct nfslog_dirlistplus3 {
};
struct nfslog_READDIRPLUS3resok {
};
struct nfslog_READDIRPLUS3res {
union {
};
struct nfslog_COMMIT3args {
};
/* the xdr functions */
#ifndef _KERNEL
#else /* !_KERNEL */
unsigned int, unsigned int);
#endif /* !_KERNEL */
#ifdef _KERNEL
/*
* Used to direct nfslog_write_record() on its behavior of
* writing log entries
*/
/* Sizes of the various memory allocations for encoding records */
/*
* Functions used for interaction with nfs logging
*/
extern void nfslog_init();
extern int nfslog_setup(struct exportinfo *);
extern void nfslog_disable(struct exportinfo *);
/*PRINTFLIKE2*/
extern void nfslog_dprint(const int, const char *fmt, ...)
__KPRINTFLIKE(2);
extern void *nfslog_record_alloc(struct exportinfo *, int,
void **, int);
extern void nfslog_record_free(void *, void *, size_t);
unsigned int);
extern struct log_buffer *nfslog_buffer_list;
/*
* Logging debug macro; expands to nothing for non-debug kernels.
*/
#ifndef DEBUG
#define LOGGING_DPRINT(x)
#else
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif /* _NFS_LOG_H */