⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nis.x

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 X
📖 第 1 页 / 共 2 页
字号:
	nis_error	cp_status;	/* Status of the checkpoint 	*/	u_long		cp_zticks;	/* Service 'ticks' 	    	*/	u_long		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_long).  * These are used to report statistics (see tag definitions below) * and to set or reset state variables. */struct nis_tag {	u_long	tag_type;	/* Statistic tag (may vary) 	 */	string	tag_val<1024>;	/* Statistic value may also vary */};struct nis_taglist {	nis_tag tags<>;		/* List of tags */};struct dump_args {	nis_name	da_dir;		/* Directory to dump 	*/	u_long		da_time;	/* From this timestamp	*/	nis_server	da_cbhost<1>;	/* Callback to use.	*/};struct fd_args {	nis_name	dir_name;  /* The directory we're looking for */	nis_name	requester; /* Host principal name for signature */};struct fd_result {	nis_error	status;		/* Status returned by function	*/	nis_name	source;		/* Source of this answer   	*/	opaque		dir_data<>;	/* Directory Data (XDR'ed) 	*/ 	opaque		signature<>;	/* Signature of the source 	*/};/*  * 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 * make in the protocols directory (probably /usr/include/rpcsvc). * * Uhm... guys? With RPC, you aren't supposed to have seperate * server-specific and client-specific header files. You have one header * file that's suitable for both. If your code doesn't work using just * the one header file, I submit to you that it's broken. *							-Bill */#ifdef SUN_STUPIDITY#ifdef RPC_SVC%#include "nis_svc.h"#endif#ifdef RPC_CLNT%#include "nis_clnt.h"#endif#endifprogram  NIS_PROG {	/* RPC Language description of the NIS+ protocol */	version NIS_VERSION {		/* The name service functions */		nis_result  NIS_LOOKUP(ns_request) = 1;		nis_result  NIS_ADD(ns_request) = 2;		nis_result  NIS_MODIFY(ns_request) = 3;		nis_result  NIS_REMOVE(ns_request) = 4;		/* The information base functions */		nis_result  NIS_IBLIST(ib_request) = 5;		nis_result  NIS_IBADD(ib_request) = 6;		nis_result  NIS_IBMODIFY(ib_request) = 7;		nis_result  NIS_IBREMOVE(ib_request) = 8;		nis_result  NIS_IBFIRST(ib_request) = 9;		nis_result  NIS_IBNEXT(ib_request) = 10;		/* NIS Administrative functions */		fd_result   NIS_FINDDIRECTORY(fd_args) = 12;		/* If fetch and optionally reset statistics */		nis_taglist  NIS_STATUS(nis_taglist) = 14;				/* Dump changes to directory since time in da_time */		log_result  NIS_DUMPLOG(dump_args) = 15;				/* Dump contents of directory named */		log_result  NIS_DUMP(dump_args) = 16;		/* Check status of callback thread */		bool	    NIS_CALLBACK(netobj) = 17;		/* Return last update time for named dir */		u_long      NIS_CPTIME(nis_name) = 18;		/* Checkpoint directory or table named */		cp_result   NIS_CHECKPOINT(nis_name) = 19;		/* Send 'status changed' ping to replicates */		void	    NIS_PING(ping_args) = 20;			/* Modify server behaviour (such as debugging) */		nis_taglist NIS_SERVSTATE(nis_taglist) = 21;			/* Create a Directory */		nis_error   NIS_MKDIR(nis_name) = 22;			/* Remove a Directory */		nis_error   NIS_RMDIR(nis_name) = 23;				/* Update public keys of a directory object */		nis_error   NIS_UPDKEYS(nis_name) = 24;	} = 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 {%	nis_name		name;	   /* NIS name of hashed item      */%	int			keychain;  /* It's hash key (for pop)      */%	struct nis_hash_data	*next;	   /* Hash collision pointer       */%	struct nis_hash_data	*prv_item; /* A serial, doubly linked list */%	struct nis_hash_data	*nxt_item; /* of items in the hash table   */%};%typedef struct nis_hash_data NIS_HASH_ITEM;%%struct nis_hash_table {%	NIS_HASH_ITEM	*keys[64];	/* A hash table of items           */%	NIS_HASH_ITEM	*first;		/* The first "item" in serial list */%};%typedef struct nis_hash_table NIS_HASH_TABLE;%%/* Structure for storing dynamically allocated static data */%struct nis_sdata {%	void	*buf;	/* Memory allocation pointer 	*/%	u_long	size;	/* Buffer size			*/%};%%/* Generic client creating flags */%#define ZMH_VC		1%#define ZMH_DG		2%#define ZMH_AUTH	4%%/* 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 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 OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype)%#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights)%#define WORLD_DEFAULT (NIS_READ_ACC)%#define GROUP_DEFAULT (NIS_READ_ACC << 8)%#define OWNER_DEFAULT ((NIS_READ_ACC +\			 NIS_MODIFY_ACC +\			 NIS_CREATE_ACC +\			 NIS_DESTROY_ACC) << 16)%#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT)%%/* Result manipulation defines ... */%#define NIS_RES_NUMOBJ(x)	((x)->objects.objects_len)%#define NIS_RES_OBJECT(x)	((x)->objects.objects_val)%#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. */%#define TA_data zo_data.objdata_u.ta_data%#define EN_data zo_data.objdata_u.en_data%#define DI_data zo_data.objdata_u.di_data%#define LI_data zo_data.objdata_u.li_data%#define GR_data zo_data.objdata_u.gr_data%%#define __type_of(o) ((o)->zo_data.zo_type)%%/* Declarations for the internal subroutines in nislib.c */%enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME};%typedef enum name_pos name_pos;%%/*% * 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.% */%#define ENTRY_VAL(obj, col) \	(obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val%#define ENTRY_LEN(obj, col) \	(obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len%%#ifdef __cplusplus%}%#endif%%/* Prototypes, and extern declarations for the NIS library functions. */%#include <rpcsvc/nislib.h>%#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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -