* Copyright (c) 2010, Oracle America, Inc.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
* * Neither the name of the "Oracle America, Inc." nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <rpcsvc/nis_tags.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 : THIS FILE IS NOT GENERATED WITH RPCGEN ! SO YOU HAVE TO
* ADD ALL THE CHANGES ON nis_*.x FILES HERE AGAIN !
* I have removed all the Solaris internal structs and variables,
* because they are not supported, Sun changed them between various
* releases and they shouldn't be used in user programs.
#define NIS_MAXSTRINGLEN 255
#define NIS_MAXNAMELEN 1024
#define NIS_MAXATTRNAME 32
#define NIS_MAXATTRVAL 2048
#define NIS_MAXCOLUMNS 64
#define NIS_MAXREPLICAS 128
typedef struct nis_attr nis_attr;
typedef enum zotypes zotypes;
typedef enum nstype nstype;
typedef struct oar_mask oar_mask;
typedef struct endpoint endpoint;
typedef struct nis_server nis_server;
nis_server *do_servers_val;
typedef struct directory_obj directory_obj;
typedef struct entry_col entry_col;
typedef struct entry_obj entry_obj;
nis_name *gr_members_val;
typedef struct group_obj group_obj;
typedef struct link_obj link_obj;
typedef struct table_col table_col;
typedef struct table_obj table_obj;
struct directory_obj di_data;
struct group_obj gr_data;
struct table_obj ta_data;
struct entry_obj en_data;
typedef struct objdata objdata;
typedef struct nis_oid nis_oid;
typedef struct nis_object nis_object;
#endif /* if __nis_object_h */
typedef enum nis_error nis_error;
typedef struct nis_result nis_result;
nis_object *ns_object_val;
typedef struct ns_request ns_request;
nis_server *ibr_cbhost_val;
typedef struct ib_request ib_request;
typedef struct ping_args ping_args;
typedef enum log_entry_t log_entry_t;
typedef struct log_entry log_entry;
log_entry *lr_entries_val;
typedef struct log_result log_result;
typedef struct cp_result cp_result;
typedef struct nis_tag nis_tag;
typedef struct nis_taglist nis_taglist;
nis_server *da_cbhost_val;
typedef struct dump_args dump_args;
typedef struct fd_args fd_args;
typedef struct fd_result fd_result;
/* Generic client creating flags */
/* Testing Access rights for objects */
#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 compatibility, 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 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 +\
#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