📄 nis.x
字号:
%/*% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for% * unrestricted use provided that this legend is included on all tape% * media and as a part of the software program in whole or part. Users% * may copy or modify Sun RPC without charge, but are not authorized% * to license or distribute it to anyone else except as part of a product or% * program developed by the user or with the express written consent of% * Sun Microsystems, Inc.% *% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.% *% * Sun RPC is provided with no support and without any obligation on the% * part of Sun Microsystems, Inc. to assist in its use, correction,% * modification or enhancement.% *% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC% * OR ANY PART THEREOF.% *% * In no event will Sun Microsystems, Inc. be liable for any lost revenue% * or profits or other special, indirect and consequential damages, even if% * Sun has been advised of the possibility of such damages.% *% * Sun Microsystems, Inc.% * 2550 Garcia Avenue% * Mountain View, California 94043% */#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%#include <rpc/xdr.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 */ NIS_S_SUCCESS = 1, /* Name found (maybe) */ NIS_NOTFOUND = 2, /* Name definitely not found */ NIS_S_NOTFOUND = 3, /* Name maybe not found */ NIS_CACHEEXPIRED = 4, /* Name exists but cache out of date */ NIS_NAMEUNREACHABLE = 5, /* Can't get there from here */ NIS_UNKNOWNOBJ = 6, /* Object type is bogus */ NIS_TRYAGAIN = 7, /* I'm busy, call back */ NIS_SYSTEMERROR = 8, /* Generic system error */ NIS_CHAINBROKEN = 9, /* First/Next warning */ NIS_PERMISSION = 10, /* Not enough permission to access */ NIS_NOTOWNER = 11, /* You don't own it, sorry */ NIS_NOT_ME = 12, /* I don't serve this name */ NIS_NOMEMORY = 13, /* Outta VM! Help! */ NIS_NAMEEXISTS = 14, /* Can't create over another name */ NIS_NOTMASTER = 15, /* I'm justa secondaray, don't ask me */ NIS_INVALIDOBJ = 16, /* Object is broken somehow */ NIS_BADNAME = 17, /* Unparsable name */ NIS_NOCALLBACK = 18, /* Couldn't talk to call back proc */ NIS_CBRESULTS = 19, /* Results being called back to you */ NIS_NOSUCHNAME = 20, /* Name unknown */ NIS_NOTUNIQUE = 21, /* Value is not uniques (entry) */ NIS_IBMODERROR = 22, /* Inf. Base. Modify error. */ NIS_NOSUCHTABLE = 23, /* Name for table was wrong */ NIS_TYPEMISMATCH = 24, /* Entry and table type mismatch */ NIS_LINKNAMEERROR = 25, /* Link points to bogus name */ NIS_PARTIAL = 26, /* Partial success, found table */ NIS_TOOMANYATTRS = 27, /* Too many attributes */ NIS_RPCERROR = 28, /* RPC error encountered */ NIS_BADATTRIBUTE = 29, /* Bad or invalid attribute */ NIS_NOTSEARCHABLE = 30, /* Non-searchable object searched */ NIS_CBERROR = 31, /* Error during callback (svc crash) */ NIS_FOREIGNNS = 32, /* Foreign Namespace */ NIS_BADOBJECT = 33, /* Malformed object structure */ NIS_NOTSAMEOBJ = 34, /* Object swapped during deletion */ NIS_MODFAIL = 35, /* Failure during a Modify. */ NIS_BADREQUEST = 36, /* Illegal query for table */ NIS_NOTEMPTY = 37, /* Attempt to remove a non-empty tbl */ NIS_COLDSTART_ERR = 38, /* Error accesing the cold start file */ NIS_RESYNC = 39, /* Transaction log too far out of date */ NIS_FAIL = 40, /* NIS operation failed. */ NIS_UNAVAIL = 41, /* NIS+ service is unavailable (client) */ NIS_RES2BIG = 42, /* NIS+ result too big for datagram */ NIS_SRVAUTH = 43, /* NIS+ server wasn't authenticated. */ NIS_CLNTAUTH = 44, /* NIS+ Client wasn't authenticated. */ NIS_NOFILESPACE = 45, /* NIS+ server ran out of disk space */ NIS_NOPROC = 46, /* NIS+ server couldn't create new proc */ NIS_DUMPLATER = 47 /* NIS+ server already has dump child */};/* * 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 { nis_error status; /* Status of the response */ nis_object objects<>; /* objects found */ netobj cookie; /* Cookie Data */ uint32_t zticks; /* server ticks */ uint32_t dticks; /* DBM ticks. */ uint32_t aticks; /* Cache (accel) ticks */ uint32_t cticks; /* Client ticks */};/* * 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 * add/modify, a copy of the original for remove. */struct ns_request { nis_name ns_name; /* Name in the NIS name space */ nis_object ns_object<1>; /* Optional Object (add/remove) */};/* * An information base request * This request includes the NIS name of the table we wish to search, the * search criteria in the form of attribute/value pairs and an optional * 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 { nis_name ibr_name; /* The name of the Table */ nis_attr ibr_srch<>; /* The search critereia */ uint32_t ibr_flags; /* Optional flags */ nis_object ibr_obj<1>; /* optional object (add/modify) */ nis_server ibr_cbhost<1>; /* Optional callback info */ u_int ibr_bufsize; /* Optional first/next bufsize */ netobj ibr_cookie; /* The first/next cookie */};/* * 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 { nis_name dir; /* Directory that had the change */ uint32_t stamp; /* timestamp of the transaction */};/* * 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, ADD_NAME = 1, /* Name Added to name space */ REM_NAME = 2, /* Name removed from name space */ MOD_NAME_OLD = 3, /* Name was modified in the name space */ MOD_NAME_NEW = 4, /* Name was modified in the name space */ ADD_IBASE = 5, /* Entry added to information base */ REM_IBASE = 6, /* Entry removed from information base */ MOD_IBASE = 7, /* Entry was modified in information base */ UPD_STAMP = 8 /* Update timestamp (used as fenceposts) */};/* * 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 * a canonical set of attribute/value pairs to fully specify the entry's * 'name'. */struct log_entry { uint32_t le_time; /* Time in seconds */ log_entry_t le_type; /* Type of log entry */ nis_name le_princp; /* Principal making the change */ nis_name le_name; /* Name of table/dir involved */ nis_attr le_attrs<>; /* List of AV pairs. */ nis_object le_object; /* Actual object value */};struct log_result { nis_error lr_status; /* The status itself */ netobj lr_cookie; /* Used by the dump callback */ log_entry lr_entries<>; /* zero or more entries */};struct cp_result { nis_error cp_status; /* Status of the checkpoint */ uint32_t cp_zticks; /* Service 'ticks' */ uint32_t cp_dticks; /* Database 'ticks' */};/* * 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 { uint32_t tag_type; /* Statistic tag (may vary) */ string tag_val<>; /* Statistic value may also vary */};struct nis_taglist { nis_tag tags<>; /* List of tags */};struct dump_args { nis_name da_dir; /* Directory to dump */ uint32_t da_time; /* From this timestamp */ nis_server da_cbhost<1>; /* Callback to use. */};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -