HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)

n
nis_objects(3N) nis_objects(3N)
All object types define a structure that contains data specific to that type of object. The simplest are
private objects which are defined to contain a variable length array of octets. Only the owner of the object
is expected to understand the contents of a private object. The following section describe the other five
object types in more significant detail.
Directory Objects
The first type of object is the directory object. This object’s variant part is defined as follows:
enum nstype {
UNKNOWN = 0,
NIS = 1,
SUNYP = 2,
DNS = 4,
X500 = 5,
DNANS = 6,
XCHS = 7,
}
typedef enum nstype nstype;
struct oar_mask {
u_long oa_rights;
zotypes oa_otype;
}
typedef struct oar_mask oar_mask;
struct endpoint {
char *uaddr;
char *family;
char *proto;
}
typedef struct endpoint endpoint;
struct nis_server {
nis_name name;
struct {
u_int ep_len;
endpoint *ep_val;
} ep;
u_long key_type;
netobj pkey;
}
typedef struct nis_server nis_server;
struct directory_obj {
nis_name do_name;
nstype do_type;
struct {
u_int do_servers_len;
nis_server *do_servers_val;
} do_servers;
u_long do_ttl;
struct {
u_int do_armask_len;
oar_mask *do_armask_val;
} do_armask;
}
typedef struct directory_obj directory_obj;
The main structure contains five primary members:
do_name, do_type, do_servers, do_ttl, and
do_armask. The information in the do_servers structure is sufficient for the client library to create a
network connection with the named server for the directory.
The do_name member contains the name of the directory or domain represented in a format that is
understandable by the type of nameservice serving that domain. In the case of NIS+ domains, this is the
same as the name that can be composed using the zo_name and zo_domain members. For other name
services, this name will be a name that they understand. For example, if this were a directory object
Section 3670 Hewlett-Packard Company 3 HP-UX 11i Version 2: September 2004