2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * db_entry_c.x
2N/A *
2N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A%#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A/*
2N/A * Some manifest constants, chosen to maximize flexibility without
2N/A * plugging the wire full of data.
2N/A */
2N/A
2N/A#if RPC_HDR
2N/A%#ifndef _DB_NIS_H
2N/A%#define _DB_NIS_H
2N/A
2N/A%#include <rpcsvc/nis.h>
2N/A#endif /* RPC_HDR */
2N/A
2N/A#ifdef USINGC
2N/Aenum db_status {DB_SUCCESS, DB_NOTFOUND, DB_NOTUNIQUE,
2N/A DB_BADTABLE, DB_BADQUERY, DB_BADOBJECT,
2N/A DB_MEMORY_LIMIT, DB_STORAGE_LIMIT, DB_INTERNAL_ERROR};
2N/A
2N/Aenum db_action {DB_LOOKUP, DB_REMOVE, DB_ADD, DB_FIRST, DB_NEXT,
2N/A DB_ALL, DB_RESET_NEXT, DB_ADD_NOLOG,
2N/A DB_ADD_NOSYNC, DB_REMOVE_NOSYNC };
2N/A#endif /* USINGC */
2N/A
2N/A/* Make alias to NIS definition */
2N/A
2N/Atypedef entry_obj entry_object;
2N/Atypedef entry_object * entry_object_p;
2N/A
2N/Atypedef nis_name db_stringname;
2N/Atypedef nis_attr db_attrname; /* What the database knows it as */
2N/A
2N/A
2N/A/* nis_dba.x ----------------------------- */
2N/A
2N/A/*
2N/A * Structure definitions for the parameters and results of the actual
2N/A * NIS DBA calls
2N/A *
2N/A * This is the standard result (in the protocol) of most of the nis
2N/A * requests.
2N/A */
2N/A
2N/A/*typedef long db_next_desc;*/
2N/A
2N/Atypedef opaque db_next_desc<>; /* opaque string */
2N/A
2N/Astruct db_result {
2N/A db_status status; /* The status itself */
2N/A db_next_desc nextinfo; /* for first/next sequence */
2N/A entry_object_p objects<>; /* And the objects found */
2N/A long ticks; /* for statistics */
2N/A};
2N/A
2N/Astruct db_request {
2N/A db_stringname table_name;
2N/A db_attrname attrs<NIS_MAXCOLUMNS>;
2N/A entry_object * obj; /* only used for addition */
2N/A};
2N/A
2N/A#ifndef USINGC
2N/A%#ifdef __cplusplus
2N/A%extern "C" entry_object * new_entry( entry_object*);
2N/A%extern "C" bool_t copy_entry ( entry_object*, entry_object*);
2N/A%extern "C" void free_entry (entry_object*);
2N/A%extern "C" bool_t sameEntry(entry_object *, entry_object *);
2N/A%#elif __STDC__
2N/A%extern entry_object * new_entry( entry_object*);
2N/A%extern bool_t copy_entry ( entry_object*, entry_object*);
2N/A%extern void free_entry (entry_object*);
2N/A%extern bool_t sameEntry(entry_object *, entry_object *);
2N/A%#endif
2N/A#else
2N/A#if RPC_HDR
2N/A%extern void print_entry();
2N/A%extern char copy_entry();
2N/A%extern void free_entry();
2N/A%extern void new_entry();
2N/A#endif /* RPC_HDR */
2N/A#endif /* USINGC */
2N/A
2N/A#if RPC_HDR
2N/A%#endif /* _DB_NIS_H */
2N/A#endif /* RPC_HDR */