vm: replace vnode v_pages with a v_pagecache_list list_t
[unleashed.git] / usr / src / cmd / ypcmd / ypsym.h
blob51de4c0bc40eeadc1fc1df725500d4e95d2f5ea0
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
30 * Portions of this source code were derived from Berkeley 4.3 BSD
31 * under license from the Regents of the University of California.
34 #ifndef __YPSYM_H
35 #define __YPSYM_H
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
42 * This contains symbol and structure definitions for modules in the YP server
45 #include <ndbm.h> /* Pull this in first */
46 #define DATUM
47 #include <stdio.h>
48 #include <errno.h>
49 #include <signal.h>
50 #include <rpc/rpc.h>
51 #include <dirent.h>
52 #include <sys/stat.h>
53 #include <sys/wait.h>
54 #include <rpcsvc/yp_prot.h>
55 #include "ypv1_prot.h"
56 #include <rpcsvc/ypclnt.h>
58 typedef void (*PFV)();
59 typedef int (*PFI)();
60 typedef unsigned int (*PFU)();
61 typedef long int (*PFLI)();
62 typedef unsigned long int (*PFULI)();
63 typedef short int (*PFSI)();
64 typedef unsigned short int (*PFUSI)();
66 #ifndef TRUE
67 #define TRUE 1
68 #endif
70 #ifndef FALSE
71 #define FALSE 0
72 #endif
75 * Size of lock hash table
77 * It's for a hash table, hence better if it is prime.
78 * It's also the max number of maps and map locks, used
79 * for initializing shared memory: need to be big enough
80 * (until dynamic shared memory allocation is implemented ?).
82 #define MAXHASH 1009
84 /* Maximum length of a yp map name in the system v filesystem */
85 #define MAXALIASLEN 8
87 #define YPINTERTRY_TIME 10 /* Secs between tries for peer bind */
88 #define YPTOTAL_TIME 30 /* Total secs until timeout */
89 #define YPNOPORT ((unsigned short) 0) /* Out-of-range port value */
91 /* External refs to yp server data structures */
93 extern bool ypinitialization_done;
94 extern struct timeval ypintertry;
95 extern struct timeval yptimeout;
96 extern char myhostname[];
97 extern bool silent;
98 #ifdef MINUS_C_OPTION
99 extern bool multiflag;
100 #endif
102 /* External ref to logging func */
103 extern void logprintf(char *format, ...);
105 /* External refs for /var/yp/securenets support */
106 extern void get_secure_nets(char *daemon_name);
108 /* External refs to yp server-only functions */
109 extern bool ypcheck_map_existence(char *pname);
110 extern bool ypget_map_master(char **owner, DBM *fdb);
111 extern DBM *ypset_current_map(char *map, char *domain, uint_t *error);
112 extern void ypclr_current_map(void);
113 extern bool_t ypmkfilename(char *domain, char *map, char *path);
114 extern int yplist_maps();
115 extern bool yp_map_access(SVCXPRT *transp, uint_t *error, DBM *fdb);
116 extern bool ypget_map_order(char *map, char *domain, uint_t *order);
118 extern bool ypcheck_domain();
119 extern datum dbm_do_nextkey();
120 extern void ypclr_current_map(void);
122 extern void ypdomain(SVCXPRT *transp, bool always_respond);
123 extern void ypmatch(SVCXPRT *transp, struct svc_req *rqstp);
124 extern void ypfirst(SVCXPRT *transp);
125 extern void ypnext(SVCXPRT *transp);
126 extern void ypxfr(SVCXPRT *transp, int prog);
127 extern void ypall(SVCXPRT *transp);
128 extern void ypmaster(SVCXPRT *transp);
129 extern void yporder(SVCXPRT *transp);
130 extern void ypmaplist(SVCXPRT *transp);
131 extern void ypoldmatch(SVCXPRT *transp, struct svc_req *rqstp);
132 extern void ypoldfirst(SVCXPRT *transp);
133 extern void ypoldnext(SVCXPRT *transp);
134 extern void ypoldpoll(SVCXPRT *transp);
135 extern void ypoldpush(SVCXPRT *transp);
136 extern void ypoldpull(SVCXPRT *transp);
137 extern void ypoldget(SVCXPRT *transp);
138 extern int yp_matchdns(DBM *, struct ypreq_key *, struct ypresp_val *);
139 extern int yp_oldmatchdns(DBM *fdb,
140 struct yprequest *req, struct ypresponse *resp);
142 extern bool _xdr_ypreqeust(XDR *xdrs, struct yprequest *ps);
143 extern bool _xdr_ypresponse(XDR *xdrs, struct ypresponse *ps);
145 extern void setup_resolv(bool *fwding, int *child, CLIENT **client,
146 char *tp_type, long prognum);
147 extern int resolv_req(bool *fwding, CLIENT **client, int *pid,
148 char *tp, SVCXPRT *xprt, struct ypreq_key *req,
149 char *map);
152 /* definitions for reading files of lists */
154 struct listofnames
156 struct listofnames *nextname;
157 char *name;
159 typedef struct listofnames listofnames;
162 * XXX- NAME_MAX can't be defined in <limits.h> in a POSIX conformant system
163 * (under conditions which apply to Sun systems). Removal of this define
164 * caused yp to break (and only yp!). Hence, NAME_MAX is defined here
165 * *exactly* as it was in <limits.h>. I suspect this may not be the
166 * desired value. I suspect the desired value is either:
167 * - the maxumum name length for any file system type, or
168 * - should be _POSIX_NAME_MAX which is the minimum-maximum name
169 * length in a POSIX conformant system (which just happens to
170 * be 14), or
171 * - should be gotten by pathconf() or fpathconf().
172 * XXX- I leave this to the owners of yp!
174 #define NAME_MAX 14 /* s5 file system maximum name length */
176 #ifdef __cplusplus
178 #endif
180 #endif /* __YPSYM_H */