126206Swpaul%/* 226206Swpaul% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 326206Swpaul% * unrestricted use provided that this legend is included on all tape 426206Swpaul% * media and as a part of the software program in whole or part. Users 526206Swpaul% * may copy or modify Sun RPC without charge, but are not authorized 626206Swpaul% * to license or distribute it to anyone else except as part of a product or 726206Swpaul% * program developed by the user or with the express written consent of 826206Swpaul% * Sun Microsystems, Inc. 926206Swpaul% * 1026206Swpaul% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 1126206Swpaul% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 1226206Swpaul% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 1326206Swpaul% * 1426206Swpaul% * Sun RPC is provided with no support and without any obligation on the 1526206Swpaul% * part of Sun Microsystems, Inc. to assist in its use, correction, 1626206Swpaul% * modification or enhancement. 1726206Swpaul% * 1826206Swpaul% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 1926206Swpaul% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 2026206Swpaul% * OR ANY PART THEREOF. 2126206Swpaul% * 2226206Swpaul% * In no event will Sun Microsystems, Inc. be liable for any lost revenue 2326206Swpaul% * or profits or other special, indirect and consequential damages, even if 2426206Swpaul% * Sun has been advised of the possibility of such damages. 2526206Swpaul% * 2626206Swpaul% * Sun Microsystems, Inc. 2726206Swpaul% * 2550 Garcia Avenue 2826206Swpaul% * Mountain View, California 94043 2926206Swpaul% */ 3026206Swpaul 3126206Swpaul#ifndef RPC_HDR 32114629Sobrien%#include <sys/cdefs.h> 33114629Sobrien%__FBSDID("$FreeBSD$"); 3426206Swpaul#endif 3526206Swpaul 3626206Swpaul/* 3726206Swpaul * From 4.1 : @(#)nis.x 1.61 Copyright 1989 Sun Microsystems 3826206Swpaul * 3926206Swpaul * RPC Language Protocol description file for NIS Plus 4026206Swpaul * This version : 1.61 4126206Swpaul * Last Modified : 3/19/91 4226206Swpaul */ 4326206Swpaul#ifdef RPC_HDR 4426206Swpaul%/* 4526206Swpaul% * nis.h 4626206Swpaul% * 4726206Swpaul% * This file is the main include file for NIS clients. It contains 4826206Swpaul% * both the client library function defines and the various data 4926206Swpaul% * structures used by the NIS service. It includes the file nis_tags.h 5026206Swpaul% * which defines the tag values. This allows the tags to change without 5126206Swpaul% * having to change the nis.x file. 5226206Swpaul% * 5326206Swpaul% * NOTE : DO NOT EDIT THIS FILE! It is automatically generated when 5426206Swpaul% * rpcgen is run on the nis.x file. Note that there is a 5526206Swpaul% * simple sed script to remove some unneeded lines. (See the 5626206Swpaul% * Makefile target nis.h) 5726206Swpaul% * 5826206Swpaul% */ 5926206Swpaul%#include <rpcsvc/nis_tags.h> 6026206Swpaul#endif 6126206Swpaul 6226206Swpaul/* This gets stuffed into the source files. */ 6326206Swpaul#if RPC_HDR 6426206Swpaul%#include <rpc/xdr.h> 6526206Swpaul#endif 6626206Swpaul/* 6726206Swpaul * This is just pointless. 6826206Swpaul */ 6926206Swpaul#ifdef SUN_STUPIDITY 7026206Swpaul#if RPC_SVC 7126206Swpaul%#include "nis_svc.h" 7226206Swpaul#endif 7326206Swpaul#endif 7426206Swpaul 7526206Swpaul/* Include the RPC Language description of NIS objects */ 7626206Swpaul#include "nis_object.x" 7726206Swpaul 7826206Swpaul/* Errors that can be returned by the service */ 7926206Swpaulenum nis_error { 8026206Swpaul NIS_SUCCESS = 0, /* A-ok, let's rock n roll */ 8126206Swpaul NIS_S_SUCCESS = 1, /* Name found (maybe) */ 8226206Swpaul NIS_NOTFOUND = 2, /* Name definitely not found */ 8326206Swpaul NIS_S_NOTFOUND = 3, /* Name maybe not found */ 8426206Swpaul NIS_CACHEEXPIRED = 4, /* Name exists but cache out of date */ 8526206Swpaul NIS_NAMEUNREACHABLE = 5, /* Can't get there from here */ 8626206Swpaul NIS_UNKNOWNOBJ = 6, /* Object type is bogus */ 8726206Swpaul NIS_TRYAGAIN = 7, /* I'm busy, call back */ 8826206Swpaul NIS_SYSTEMERROR = 8, /* Out of band failure */ 8926206Swpaul NIS_CHAINBROKEN = 9, /* First/Next warning */ 9026206Swpaul NIS_PERMISSION = 10, /* Not enough permission to access */ 9126206Swpaul NIS_NOTOWNER = 11, /* You don't own it, sorry */ 9226206Swpaul NIS_NOT_ME = 12, /* I don't serve this name */ 9326206Swpaul NIS_NOMEMORY = 13, /* Outta VM! Help! */ 9426206Swpaul NIS_NAMEEXISTS = 14, /* Can't create over another name */ 9526206Swpaul NIS_NOTMASTER = 15, /* I'm justa secondaray, don't ask me */ 9626206Swpaul NIS_INVALIDOBJ = 16, /* Object is broken somehow */ 9726206Swpaul NIS_BADNAME = 17, /* Unparsable name */ 9826206Swpaul NIS_NOCALLBACK = 18, /* Couldn't talk to call back proc */ 9926206Swpaul NIS_CBRESULTS = 19, /* Results being called back to you */ 10026206Swpaul NIS_NOSUCHNAME = 20, /* Name unknown */ 10126206Swpaul NIS_NOTUNIQUE = 21, /* Value is not uniques (entry) */ 10226206Swpaul NIS_IBMODERROR = 22, /* Inf. Base. Modify error. */ 10326206Swpaul NIS_NOSUCHTABLE = 23, /* Name for table was wrong */ 10426206Swpaul NIS_TYPEMISMATCH = 24, /* Entry and table type mismatch */ 10526206Swpaul NIS_LINKNAMEERROR = 25, /* Link points to bogus name */ 10626206Swpaul NIS_PARTIAL = 26, /* Partial success, found table */ 10726206Swpaul NIS_TOOMANYATTRS = 27, /* Too many attributes */ 10826206Swpaul NIS_RPCERROR = 28, /* RPC error encountered */ 10926206Swpaul NIS_BADATTRIBUTE = 29, /* Bad or invalid attribute */ 11026206Swpaul NIS_NOTSEARCHABLE = 30, /* Non-searchable object searched */ 11126206Swpaul NIS_CBERROR = 31, /* Error during callback (svc crash) */ 11226206Swpaul NIS_FOREIGNNS = 32, /* Foreign Namespace */ 11326206Swpaul NIS_BADOBJECT = 33, /* Malformed object structure */ 11426206Swpaul NIS_NOTSAMEOBJ = 34, /* Object swapped during deletion */ 11526206Swpaul NIS_MODFAIL = 35, /* Failure during a Modify. */ 11626206Swpaul NIS_BADREQUEST = 36, /* Illegal query for table */ 11726206Swpaul NIS_NOTEMPTY = 37, /* Attempt to remove a non-empty tbl */ 11826206Swpaul NIS_COLDSTART_ERR = 38, /* Error accesing the cold start file */ 11926206Swpaul NIS_RESYNC = 39, /* Transaction log too far out of date */ 12026206Swpaul NIS_FAIL = 40, /* NIS operation failed. */ 12126206Swpaul NIS_UNAVAIL = 41, /* NIS+ service is unavailable (client) */ 12226206Swpaul NIS_RES2BIG = 42, /* NIS+ result too big for datagram */ 12326206Swpaul NIS_SRVAUTH = 43, /* NIS+ server wasn't authenticated. */ 12426206Swpaul NIS_CLNTAUTH = 44, /* NIS+ Client wasn't authenticated. */ 12526206Swpaul NIS_NOFILESPACE = 45, /* NIS+ server ran out of disk space */ 12626206Swpaul NIS_NOPROC = 46, /* NIS+ server couldn't create new proc */ 12726206Swpaul NIS_DUMPLATER = 47 /* NIS+ server already has dump child */ 12826206Swpaul}; 12926206Swpaul 13026206Swpaul 13126206Swpaul/* 13226206Swpaul * Structure definitions for the parameters and results of the actual 13326206Swpaul * NIS RPC calls. 13426206Swpaul * 13526206Swpaul * This is the standard result (in the protocol) of most of the nis 13626206Swpaul * requests. 13726206Swpaul */ 13826206Swpaul 13926206Swpaulstruct nis_result { 14026206Swpaul nis_error status; /* Status of the response */ 14126206Swpaul nis_object objects<>; /* objects found */ 14226206Swpaul netobj cookie; /* Cookie Data */ 14326206Swpaul u_long zticks; /* server ticks */ 14426206Swpaul u_long dticks; /* DBM ticks. */ 14526206Swpaul u_long aticks; /* Cache (accel) ticks */ 14626206Swpaul u_long cticks; /* Client ticks */ 14726206Swpaul}; 14826206Swpaul 14926206Swpaul/* 15026206Swpaul * A Name Service request 15126206Swpaul * This request is used to access the name space, ns_name is the name 15226206Swpaul * of the object within the namespace and the object is it's value, for 15326206Swpaul * add/modify, a copy of the original for remove. 15426206Swpaul */ 15526206Swpaul 15626206Swpaulstruct ns_request { 15726206Swpaul nis_name ns_name; /* Name in the NIS name space */ 15826206Swpaul nis_object ns_object<1>; /* Optional Object (add/remove) */ 15926206Swpaul}; 16026206Swpaul 16126206Swpaul/* 16226206Swpaul * An information base request 16326206Swpaul * This request includes the NIS name of the table we wish to search, the 16426206Swpaul * search criteria in the form of attribute/value pairs and an optional 16526206Swpaul * callback program number. If the callback program number is provided 16626206Swpaul * the server will send back objects one at a time, otherwise it will 16726206Swpaul * return them all in the response. 16826206Swpaul */ 16926206Swpaul 17026206Swpaulstruct ib_request { 17126206Swpaul nis_name ibr_name; /* The name of the Table */ 17226206Swpaul nis_attr ibr_srch<>; /* The search critereia */ 17326206Swpaul u_long ibr_flags; /* Optional flags */ 17426206Swpaul nis_object ibr_obj<1>; /* optional object (add/modify) */ 17526206Swpaul nis_server ibr_cbhost<1>; /* Optional callback info */ 17626206Swpaul u_long ibr_bufsize; /* Optional first/next bufsize */ 17726206Swpaul netobj ibr_cookie; /* The first/next cookie */ 17826206Swpaul}; 17926206Swpaul 18026206Swpaul/* 18126206Swpaul * This argument to the PING call notifies the replicas that something in 18226206Swpaul * a directory has changed and this is it's timestamp. The replica will use 18326206Swpaul * the timestamp to determine if its resync operation was successful. 18426206Swpaul */ 18526206Swpaulstruct ping_args { 18626206Swpaul nis_name dir; /* Directory that had the change */ 18726206Swpaul u_long stamp; /* timestamp of the transaction */ 18826206Swpaul}; 18926206Swpaul 19026206Swpaul/* 19126206Swpaul * These are the type of entries that are stored in the transaction log, 19226206Swpaul * note that modifications will appear as two entries, for names, they have 193108533Sschweikh * an "OLD" entry followed by a "NEW" entry. For entries in tables, there 19426206Swpaul * is a remove followed by an add. It is done this way so that we can read 19526206Swpaul * the log backwards to back out transactions and forwards to propogate 19626206Swpaul * updated. 19726206Swpaul */ 19826206Swpaulenum log_entry_t { 19926206Swpaul LOG_NOP = 0, 20026206Swpaul ADD_NAME = 1, /* Name Added to name space */ 20126206Swpaul REM_NAME = 2, /* Name removed from name space */ 20226206Swpaul MOD_NAME_OLD = 3, /* Name was modified in the name space */ 20326206Swpaul MOD_NAME_NEW = 4, /* Name was modified in the name space */ 20426206Swpaul ADD_IBASE = 5, /* Entry added to information base */ 20526206Swpaul REM_IBASE = 6, /* Entry removed from information base */ 20626206Swpaul MOD_IBASE = 7, /* Entry was modified in information base */ 20726206Swpaul UPD_STAMP = 8 /* Update timestamp (used as fenceposts) */ 20826206Swpaul}; 20926206Swpaul 21026206Swpaul/* 21126206Swpaul * This result is returned from the name service when it is requested to 21226206Swpaul * dump logged entries from its transaction log. Information base updates 21326206Swpaul * will have the name of the information base in the le_name field and 21426206Swpaul * a canonical set of attribute/value pairs to fully specify the entry's 21526206Swpaul * 'name'. 21626206Swpaul */ 21726206Swpaulstruct log_entry { 21826206Swpaul u_long le_time; /* Time in seconds */ 21926206Swpaul log_entry_t le_type; /* Type of log entry */ 22026206Swpaul nis_name le_princp; /* Principal making the change */ 22126206Swpaul nis_name le_name; /* Name of table/dir involved */ 22226206Swpaul nis_attr le_attrs<>; /* List of AV pairs. */ 22326206Swpaul nis_object le_object; /* Actual object value */ 22426206Swpaul}; 22526206Swpaul 22626206Swpaulstruct log_result { 22726206Swpaul nis_error lr_status; /* The status itself */ 22826206Swpaul netobj lr_cookie; /* Used by the dump callback */ 22926206Swpaul log_entry lr_entries<>; /* zero or more entries */ 23026206Swpaul}; 23126206Swpaul 23226206Swpaulstruct cp_result { 23326206Swpaul nis_error cp_status; /* Status of the checkpoint */ 23426206Swpaul u_long cp_zticks; /* Service 'ticks' */ 23526206Swpaul u_long cp_dticks; /* Database 'ticks' */ 23626206Swpaul}; 23726206Swpaul 23826206Swpaul/* 23926206Swpaul * This structure defines a generic NIS tag list. The taglist contains 24026206Swpaul * zero or tags, each of which is a type and a value. (u_long). 24126206Swpaul * These are used to report statistics (see tag definitions below) 24226206Swpaul * and to set or reset state variables. 24326206Swpaul */ 24426206Swpaulstruct nis_tag { 24526206Swpaul u_long tag_type; /* Statistic tag (may vary) */ 24626206Swpaul string tag_val<1024>; /* Statistic value may also vary */ 24726206Swpaul}; 24826206Swpaul 24926206Swpaulstruct nis_taglist { 25026206Swpaul nis_tag tags<>; /* List of tags */ 25126206Swpaul}; 25226206Swpaul 25326206Swpaulstruct dump_args { 25426206Swpaul nis_name da_dir; /* Directory to dump */ 25526206Swpaul u_long da_time; /* From this timestamp */ 25626206Swpaul nis_server da_cbhost<1>; /* Callback to use. */ 25726206Swpaul}; 25826206Swpaul 25926206Swpaulstruct fd_args { 26026206Swpaul nis_name dir_name; /* The directory we're looking for */ 26126206Swpaul nis_name requester; /* Host principal name for signature */ 26226206Swpaul}; 26326206Swpaul 26426206Swpaulstruct fd_result { 26526206Swpaul nis_error status; /* Status returned by function */ 26626206Swpaul nis_name source; /* Source of this answer */ 26726206Swpaul opaque dir_data<>; /* Directory Data (XDR'ed) */ 26826206Swpaul opaque signature<>; /* Signature of the source */ 26926206Swpaul}; 27026206Swpaul 27126206Swpaul 27226206Swpaul/* 27326206Swpaul * What's going on here? Well, it's like this. When the service 27426206Swpaul * is being compiled it wants to have the service definition specific 27526206Swpaul * info included, and when the client is being compiled it wants that 27626206Swpaul * info. This includes the appropriate file which was generated by 27726206Swpaul * make in the protocols directory (probably /usr/include/rpcsvc). 27826206Swpaul * 27972089Sasmodai * Uhm... guys? With RPC, you aren't supposed to have separate 28026206Swpaul * server-specific and client-specific header files. You have one header 28126206Swpaul * file that's suitable for both. If your code doesn't work using just 28226206Swpaul * the one header file, I submit to you that it's broken. 28326206Swpaul * -Bill 28426206Swpaul */ 28526206Swpaul#ifdef SUN_STUPIDITY 28626206Swpaul#ifdef RPC_SVC 28726206Swpaul%#include "nis_svc.h" 28826206Swpaul#endif 28926206Swpaul#ifdef RPC_CLNT 29026206Swpaul%#include "nis_clnt.h" 29126206Swpaul#endif 29226206Swpaul#endif 29326206Swpaul 29426206Swpaulprogram NIS_PROG { 29526206Swpaul 29626206Swpaul /* RPC Language description of the NIS+ protocol */ 29726206Swpaul version NIS_VERSION { 29826206Swpaul /* The name service functions */ 29926206Swpaul nis_result NIS_LOOKUP(ns_request) = 1; 30026206Swpaul nis_result NIS_ADD(ns_request) = 2; 30126206Swpaul nis_result NIS_MODIFY(ns_request) = 3; 30226206Swpaul nis_result NIS_REMOVE(ns_request) = 4; 30326206Swpaul 30426206Swpaul /* The information base functions */ 30526206Swpaul nis_result NIS_IBLIST(ib_request) = 5; 30626206Swpaul nis_result NIS_IBADD(ib_request) = 6; 30726206Swpaul nis_result NIS_IBMODIFY(ib_request) = 7; 30826206Swpaul nis_result NIS_IBREMOVE(ib_request) = 8; 30926206Swpaul nis_result NIS_IBFIRST(ib_request) = 9; 31026206Swpaul nis_result NIS_IBNEXT(ib_request) = 10; 31126206Swpaul 31226206Swpaul /* NIS Administrative functions */ 31326206Swpaul fd_result NIS_FINDDIRECTORY(fd_args) = 12; 31426206Swpaul 31526206Swpaul /* If fetch and optionally reset statistics */ 31626206Swpaul nis_taglist NIS_STATUS(nis_taglist) = 14; 31726206Swpaul 31826206Swpaul /* Dump changes to directory since time in da_time */ 31926206Swpaul log_result NIS_DUMPLOG(dump_args) = 15; 32026206Swpaul 32126206Swpaul /* Dump contents of directory named */ 32226206Swpaul log_result NIS_DUMP(dump_args) = 16; 32326206Swpaul 32426206Swpaul /* Check status of callback thread */ 32526206Swpaul bool NIS_CALLBACK(netobj) = 17; 32626206Swpaul 32726206Swpaul /* Return last update time for named dir */ 32826206Swpaul u_long NIS_CPTIME(nis_name) = 18; 32926206Swpaul 33026206Swpaul /* Checkpoint directory or table named */ 33126206Swpaul cp_result NIS_CHECKPOINT(nis_name) = 19; 33226206Swpaul 33326206Swpaul /* Send 'status changed' ping to replicates */ 33426206Swpaul void NIS_PING(ping_args) = 20; 33526206Swpaul 33626206Swpaul /* Modify server behaviour (such as debugging) */ 33726206Swpaul nis_taglist NIS_SERVSTATE(nis_taglist) = 21; 33826206Swpaul 33926206Swpaul /* Create a Directory */ 34026206Swpaul nis_error NIS_MKDIR(nis_name) = 22; 34126206Swpaul 34226206Swpaul /* Remove a Directory */ 34326206Swpaul nis_error NIS_RMDIR(nis_name) = 23; 34426206Swpaul 34526206Swpaul /* Update public keys of a directory object */ 34626206Swpaul nis_error NIS_UPDKEYS(nis_name) = 24; 34726206Swpaul } = 3; 34826206Swpaul} = 100300; 34926206Swpaul 35026206Swpaul/* 35126206Swpaul * Included below are the defines that become part of nis.h, 35226206Swpaul * they are technically not part of the protocol, but do define 35326206Swpaul * key aspects of the implementation and are therefore useful 35426206Swpaul * in building a conforming server or client. 35526206Swpaul */ 35626206Swpaul#if RPC_HDR 35726206Swpaul%/* 35826206Swpaul% * Generic "hash" datastructures, used by all types of hashed data. 35926206Swpaul% */ 36026206Swpaul%struct nis_hash_data { 36126206Swpaul% nis_name name; /* NIS name of hashed item */ 36226206Swpaul% int keychain; /* It's hash key (for pop) */ 36326206Swpaul% struct nis_hash_data *next; /* Hash collision pointer */ 36426206Swpaul% struct nis_hash_data *prv_item; /* A serial, doubly linked list */ 36526206Swpaul% struct nis_hash_data *nxt_item; /* of items in the hash table */ 36626206Swpaul%}; 36726206Swpaul%typedef struct nis_hash_data NIS_HASH_ITEM; 36826206Swpaul% 36926206Swpaul%struct nis_hash_table { 37026206Swpaul% NIS_HASH_ITEM *keys[64]; /* A hash table of items */ 37126206Swpaul% NIS_HASH_ITEM *first; /* The first "item" in serial list */ 37226206Swpaul%}; 37326206Swpaul%typedef struct nis_hash_table NIS_HASH_TABLE; 37426206Swpaul% 37526206Swpaul%/* Structure for storing dynamically allocated static data */ 37626206Swpaul%struct nis_sdata { 37726206Swpaul% void *buf; /* Memory allocation pointer */ 37826206Swpaul% u_long size; /* Buffer size */ 37926206Swpaul%}; 38026206Swpaul% 38126206Swpaul%/* Generic client creating flags */ 38226206Swpaul%#define ZMH_VC 1 38326206Swpaul%#define ZMH_DG 2 38426206Swpaul%#define ZMH_AUTH 4 38526206Swpaul% 38626206Swpaul%/* Testing Access rights for objects */ 38726206Swpaul% 38826206Swpaul%#define NIS_READ_ACC 1 38926206Swpaul%#define NIS_MODIFY_ACC 2 39026206Swpaul%#define NIS_CREATE_ACC 4 39126206Swpaul%#define NIS_DESTROY_ACC 8 39226206Swpaul%/* Test macros. a == access rights, m == desired rights. */ 39326206Swpaul%#define WORLD(a, m) (((a) & (m)) != 0) 39426206Swpaul%#define GROUP(a, m) (((a) & ((m) << 8)) != 0) 39526206Swpaul%#define OWNER(a, m) (((a) & ((m) << 16)) != 0) 39626206Swpaul%#define NOBODY(a, m) (((a) & ((m) << 24)) != 0) 39726206Swpaul% 39826206Swpaul%#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype) 39926206Swpaul%#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights) 40026206Swpaul%#define WORLD_DEFAULT (NIS_READ_ACC) 40126206Swpaul%#define GROUP_DEFAULT (NIS_READ_ACC << 8) 40226206Swpaul%#define OWNER_DEFAULT ((NIS_READ_ACC +\ 40326206Swpaul NIS_MODIFY_ACC +\ 40426206Swpaul NIS_CREATE_ACC +\ 40526206Swpaul NIS_DESTROY_ACC) << 16) 40626206Swpaul%#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) 40726206Swpaul% 40826206Swpaul%/* Result manipulation defines ... */ 40926206Swpaul%#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len) 41026206Swpaul%#define NIS_RES_OBJECT(x) ((x)->objects.objects_val) 41126206Swpaul%#define NIS_RES_COOKIE(x) ((x)->cookie) 41226206Swpaul%#define NIS_RES_STATUS(x) ((x)->status) 41326206Swpaul% 41426206Swpaul%/* These defines make getting at the variant part of the object easier. */ 41526206Swpaul%#define TA_data zo_data.objdata_u.ta_data 41626206Swpaul%#define EN_data zo_data.objdata_u.en_data 41726206Swpaul%#define DI_data zo_data.objdata_u.di_data 41826206Swpaul%#define LI_data zo_data.objdata_u.li_data 41926206Swpaul%#define GR_data zo_data.objdata_u.gr_data 42026206Swpaul% 42126206Swpaul%#define __type_of(o) ((o)->zo_data.zo_type) 42226206Swpaul% 42326206Swpaul%/* Declarations for the internal subroutines in nislib.c */ 42426206Swpaul%enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME}; 42526206Swpaul%typedef enum name_pos name_pos; 42626206Swpaul% 42726206Swpaul%/* 42826206Swpaul% * Defines for getting at column data in entry objects. Because RPCGEN 42926206Swpaul% * generates some rather wordy structures, we create some defines that 43026206Swpaul% * collapse the needed keystrokes to access a particular value using 43126206Swpaul% * these definitions they take an nis_object *, and an int and return 43226206Swpaul% * a u_char * for Value, and an int for length. 43326206Swpaul% */ 43426206Swpaul%#define ENTRY_VAL(obj, col) \ 43526206Swpaul (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val 43626206Swpaul%#define ENTRY_LEN(obj, col) \ 43726206Swpaul (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len 43826206Swpaul% 43926206Swpaul%#ifdef __cplusplus 44026206Swpaul%} 44126206Swpaul%#endif 44226206Swpaul% 44326206Swpaul%/* Prototypes, and extern declarations for the NIS library functions. */ 44426206Swpaul%#include <rpcsvc/nislib.h> 44526206Swpaul%#endif /* __NIS_RPCGEN_H */ 44626206Swpaul%/* EDIT_START */ 44726206Swpaul% 44826206Swpaul%/* 44926206Swpaul% * nis_3.h 45026206Swpaul% * 45126206Swpaul% * This file contains definitions that are only of interest to the actual 45226206Swpaul% * service daemon and client stubs. Normal users of NIS will not include 45326206Swpaul% * this file. 45426206Swpaul% * 45526206Swpaul% * NOTE : This include file is automatically created by a combination 45626206Swpaul% * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead 45726206Swpaul% * and then remake this file. 45826206Swpaul% */ 45926206Swpaul%#ifndef __nis_3_h 46026206Swpaul%#define __nis_3_h 46126206Swpaul%#ifdef __cplusplus 46226206Swpaul%extern "C" { 46326206Swpaul%#endif 46426206Swpaul#endif 465