nis.x 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
*/
/*
* RPC Language Protocol description file for NIS Plus
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* ident "%Z%%M% %I% %E% SMI"
*
* From 4.1 : @(#)nis.x 1.61 Copyright 1989 Sun Microsystems
*/
#ifdef RPC_HDR
%/*
% * nis.h
% *
% * This file is the main include file for NIS clients. It contains
% * both the client library function defines and the various data
% * structures used by the NIS service. It includes the file nis_tags.h
% * which defines the tag values. This allows the tags to change without
% * having to change the nis.x file.
% *
% * NOTE : DO NOT EDIT THIS FILE! It is automatically generated when
% * rpcgen is run on the nis.x file. Note that there is a
% * simple sed script to remove some unneeded lines. (See the
% * Makefile target nis.h)
% *
% */
%#include <rpcsvc/nis_tags.h>
#endif
/* This gets stuffed into the source files. */
#if RPC_HDR
#endif
%#ifndef xdr_uint32_t
%#define xdr_uint32_t xdr_u_int
%#endif
%#ifndef xdr_uint_t
%#define xdr_uint_t xdr_u_int
%#endif
#endif
#if RPC_SVC
%#include "nis_svc.h"
#endif
/* Include the RPC Language description of NIS objects */
#include "nis_object.x"
/* Errors that can be returned by the service */
enum nis_error {
NIS_SUCCESS = 0, /* A-ok, let's rock n roll */
};
/*
* Structure definitions for the parameters and results of the actual
* NIS RPC calls.
*
* This is the standard result (in the protocol) of most of the nis
* requests.
*/
struct nis_result {
};
/*
* A Name Service request
* This request is used to access the name space, ns_name is the name
* of the object within the namespace and the object is it's value, for
*/
struct ns_request {
};
/*
* An information base request
* This request includes the NIS name of the table we wish to search, the
* callback program number. If the callback program number is provided
* the server will send back objects one at a time, otherwise it will
* return them all in the response.
*/
struct ib_request {
};
/*
* This argument to the PING call notifies the replicas that something in
* a directory has changed and this is it's timestamp. The replica will use
* the timestamp to determine if its resync operation was successful.
*/
struct ping_args {
};
/*
* These are the type of entries that are stored in the transaction log,
* note that modifications will appear as two entries, for names, they have
* a "OLD" entry followed by a "NEW" entry. For entries in tables, there
* is a remove followed by an add. It is done this way so that we can read
* the log backwards to back out transactions and forwards to propogate
* updated.
*/
enum log_entry_t {
LOG_NOP = 0,
};
/*
* This result is returned from the name service when it is requested to
* dump logged entries from its transaction log. Information base updates
* will have the name of the information base in the le_name field and
* 'name'.
*/
struct log_entry {
};
struct log_result {
};
struct cp_result {
};
/*
* This structure defines a generic NIS tag list. The taglist contains
* zero or tags, each of which is a type and a value. (u_int).
* These are used to report statistics (see tag definitions below)
* and to set or reset state variables.
*/
struct nis_tag {
};
struct nis_taglist {
};
struct dump_args {
};
struct fd_args {
};
struct fd_result {
};
%/*
% * Structures used for server binding.
% */
struct nis_bound_endpoint {
int generation;
int rank;
int hostnum;
int epnum;
};
typedef struct nis_bound_endpoint nis_bound_endpoint;
struct nis_bound_directory {
int generation;
int min_rank; /* minimum rank of bound endpoints */
int optimal_rank; /* best possible rank of all endpoints */
};
typedef struct nis_bound_directory nis_bound_directory;
struct nis_active_endpoint {
int rank;
int uaddr_generation;
int cbep_generation;
};
typedef struct nis_active_endpoint nis_active_endpoint;
%/* defines for nis_bound_endpoint.flags */
%#define NIS_BOUND 0x1
%#define NIS_TRANSIENT_ERRORS 0x2
/*
* What's going on here? Well, it's like this. When the service
* is being compiled it wants to have the service definition specific
* info included, and when the client is being compiled it wants that
* info. This includes the appropriate file which was generated by
*/
#ifdef RPC_SVC
%#include "nis_svc.h"
#endif
#ifdef RPC_CLNT
%#include "nis_clnt.h"
#endif
/* RPC Language description of the NIS+ protocol */
/* The name service functions */
/* The information base functions */
/* NIS Administrative functions */
/* If fetch and optionally reset statistics */
/* Dump changes to directory since time in da_time */
/* Dump contents of directory named */
/* Check status of callback thread */
/* Return last update time for named dir */
/* Checkpoint directory or table named */
/* Send 'status changed' ping to replicates */
/* Modify server behaviour (such as debugging) */
/* Create a Directory */
/* Remove a Directory */
/* Update public keys of a directory object */
} = 3;
} = 100300;
/*
* Included below are the defines that become part of nis.h,
* they are technically not part of the protocol, but do define
* key aspects of the implementation and are therefore useful
* in building a conforming server or client.
*/
#if RPC_HDR
%/*
% * Generic "hash" datastructures, used by all types of hashed data.
% */
%struct nis_hash_data {
% int keychain; /* It's hash key (for pop) */
%};
%typedef struct nis_hash_data NIS_HASH_ITEM;
%
%struct nis_hash_table {
%};
%typedef struct nis_hash_table NIS_HASH_TABLE;
%
%/* Structure for storing dynamically allocated static data */
%struct nis_sdata {
% void *buf; /* Memory allocation pointer */
%};
%
%/* Generic client creating flags */
%#define ZMH_VC 1
%#define ZMH_DG 2
%#define ZMH_AUTH 4
%#define ZMH_NOFALLBACK 8
%
%/* Testing Access rights for objects */
%
%#define NIS_READ_ACC 1
%#define NIS_MODIFY_ACC 2
%#define NIS_CREATE_ACC 4
%#define NIS_DESTROY_ACC 8
%/* Test macros. a == access rights, m == desired rights. */
%#define NIS_WORLD(a, m) (((a) & (m)) != 0)
%#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0)
%#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0)
%#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0)
%/*
% * EOL Alert - The following non-prefixed test macros are
% * here for backward compatability, and will be not be present
% * in future releases - use the NIS_*() macros above.
% */
%#define WORLD(a, m) (((a) & (m)) != 0)
%#define GROUP(a, m) (((a) & ((m) << 8)) != 0)
%#define OWNER(a, m) (((a) & ((m) << 16)) != 0)
%#define NOBODY(a, m) (((a) & ((m) << 24)) != 0)
%
%#define WORLD_DEFAULT (NIS_READ_ACC)
%#define OWNER_DEFAULT ((NIS_READ_ACC +\
% NIS_MODIFY_ACC +\
% NIS_CREATE_ACC +\
% NIS_DESTROY_ACC) << 16)
%
%/* Result manipulation defines ... */
%#define NIS_RES_COOKIE(x) ((x)->cookie)
%#define NIS_RES_STATUS(x) ((x)->status)
%
%/* These defines make getting at the variant part of the object easier. */
%
%
%/* Declarations for the internal subroutines in nislib.c */
%
%/*
% * Defines for getting at column data in entry objects. Because RPCGEN
% * generates some rather wordy structures, we create some defines that
% * collapse the needed keystrokes to access a particular value using
% * these definitions they take an nis_object *, and an int and return
% * a u_char * for Value, and an int for length.
% */
%
%
%
%#ifdef __cplusplus
%}
%#endif
%
%/* Prototypes, and extern declarations for the NIS library functions. */
%#endif /* __NIS_RPCGEN_H */
%/* EDIT_START */
%
%/*
% * nis_3.h
% *
% * This file contains definitions that are only of interest to the actual
% * service daemon and client stubs. Normal users of NIS will not include
% * this file.
% *
% * NOTE : This include file is automatically created by a combination
% * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead
% * and then remake this file.
% */
%#ifndef __nis_3_h
%#define __nis_3_h
%#ifdef __cplusplus
%extern "C" {
%#endif
#endif