log.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 (c) 1992-2001 by Sun Microsystems, Inc.
* All rights reserved.
*
* Definitions for this server's log implementation. This is server
* dependent and may change from implementation to implementation.
*/
#ifndef _RPC_NISD_LOG_H
#define _RPC_NISD_LOG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* old_stamp_item is used to keep track of the timestamps for all the
* directories that have been removed from the transaction log.
*/
struct old_stamp_item {
int stamped;
};
typedef struct old_stamp_item old_stamp_item;
struct stamp_item {
};
typedef struct stamp_item stamp_item;
/*
* The update log is mapped into memory from the file "trans.log".
* This mapping is accomplished by the nis_main function when it starts.
* When the directory checkpoints, it may truncate the log by making a
* copy of it.
*/
struct log_upd {
};
struct log_hdr {
};
#define LOG_UPD_MAGIC 0x5552223
/* Tune these */
/* XXX these need to be tuned */
#define LOG_STABLE 1
#define LOG_CHECKPOINT 2
#define LOG_UPDATE 3
#define LOG_RESYNC 4
#define BACKUP_LOG ".BACKUP_LOG"
/*
* Flags used for __log_resync() routine. These flags are mainly used
* to check if msync() should be called or not. msync() is used to flush
* the current mmap area to the the disk. nislog program should never
* call msync().
*/
#define FNISD 0 /* called from nisd */
/*
* This macro returns the next longword aligned address.
*/
/*
* This macro defines the linear XID size of a transaction update
* in the file. The "end address" of the log, and the log size in bytes.
*/
(u)->lu_size + \
/* Function prototypes */
#ifdef __STDC__
extern char *__make_name(log_entry *);
extern int __log_resync(log_hdr *, int);
#else
extern char *__make_name();
extern int __log_resync();
extern bool_t xdr_log_entry();
#endif
/* global data */
#ifdef __cplusplus
}
#endif
#endif /* _RPC_NISD_LOG_H */