db_nis.h revision 18c2aff776a775d34a4c9893a4c72e0434d68e36
/*
* 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 by Sun Microsystems, Inc.
*/
#ifndef __DB_NIS_H
#define __DB_NIS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
struct nis_table {
char *col_name;
};
/*
* This is a description of the nis+ table that we use to store
* our file system in. Note that some of the entries are
* treated as a "union", and their meaning is overloaded depending
* on the type of object being stored.
*/
static struct nis_table nis_data_table[] = {
#define DTAB_NAME 0 /* name of the object */
{ "name", TA_SEARCHABLE, 0},
{ "directory", TA_SEARCHABLE, 0},
{ "version", 0, 0},
{ "xid", 0, 0},
{ "type", TA_SEARCHABLE, 0},
{ "id", TA_SEARCHABLE, 0},
{ "user", TA_SEARCHABLE, 0},
{ "group", TA_SEARCHABLE, 0},
{ "permission", 0, 0},
{ "nlinks", 0, 0},
{ "props", 0, 0},
{ "ss0", TA_SEARCHABLE, 0},
{ "ss1", TA_SEARCHABLE, 0},
{ "ss2", TA_SEARCHABLE, 0},
{ "sn0", 0, 0},
{ "sn1", 0, 0},
};
#define DTABLE_VERSION 1
/*
* The volume specific definitions
*/
/*
* The symlink specific definitions
*/
/*
* The link specific definitions
*/
/*
* The names we use in the database for each type of object.
*/
#define DTAB_TYPE_VOL "volume"
#define DTAB_TYPE_DIR "dir"
#define DTAB_TYPE_LNK "link"
#define DTAB_TYPE_SLNK "symlink"
static struct nis_table nis_control_table[] = {
#define CTAB_NAME 0
{ "name", TA_SEARCHABLE, 0},
#define CTAB_XID 1
{ "xid", 0, 0},
#define CTAB_ID 2
{ "id", 0, 0},
#define CTAB_LOCK 3
{ "lock", 0, 0},
};
#define CTAB_NAME_VAL "control"
#define CTAB_LOCK_LOCKED "locked"
#define CTAB_LOCK_UNLOCKED "unlocked"
#define DTABTYPE "volume"
#define CTABTYPE "control"
#define NISSEP '|'
#ifdef __cplusplus
}
#endif
#endif /* __DB_NIS_H */