xref: /netbsd/usr.sbin/ypserv/common/ypdef.h (revision c4a72b64)
1 /*	$NetBSD: ypdef.h,v 1.4 2002/07/06 21:39:25 wiz Exp $	*/
2 
3 /*
4  * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  * 3. All advertising materials mentioning features or use of this software
16  *    must display the following acknowledgement:
17  *	This product includes software developed by Mats O Jansson.
18  * 4. The name of the author may not be used to endorse or promote products
19  *    derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
22  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
25  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  */
33 
34 #ifndef _YPDEF_H_
35 #define _YPDEF_H_
36 
37 struct ypresp_xfr {
38 	unsigned int transid;
39 	int xfrstat;
40 };
41 
42 bool_t	xdr_ypresp_xfr(XDR *, struct ypresp_xfr *);
43 
44 #define YP_DB_PATH "/var/yp"
45 #define YP_LAST_KEY        "YP_LAST_MODIFIED"
46 #define YP_LAST_LEN	   (sizeof(YP_LAST_KEY)-1)
47 #define YP_INPUT_KEY       "YP_INPUT_FILE"
48 #define YP_INPUT_LEN	   (sizeof(YP_INPUT_KEY)-1)
49 #define YP_OUTPUT_KEY      "YP_OUTPUT_FILE"
50 #define YP_OUTPUT_LEN	   (sizeof(YP_OUTPUT_KEY)-1)
51 #define YP_MASTER_KEY      "YP_MASTER_NAME"
52 #define YP_MASTER_LEN	   (sizeof(YP_MASTER_KEY)-1)
53 #define YP_DOMAIN_KEY      "YP_DOMAIN_NAME"
54 #define YP_DOMAIN_LEN	   (sizeof(YP_DOMAIN_KEY)-1)
55 #define YP_INTERDOMAIN_KEY "YP_INTERDOMAIN"
56 #define YP_INTERDOMAIN_LEN (sizeof(YP_INTERDOMAIN_KEY)-1)
57 #define YP_SECURE_KEY      "YP_SECURE"
58 #define YP_SECURE_LEN      (sizeof(YP_SECURE_KEY)-1)
59 
60 #define MAX_LAST_LEN 10
61 #define MAX_MASTER_LEN 255
62 #define YP_HOSTNAME "hosts.byname"
63 #define YP_HOSTADDR "hosts.byaddr"
64 
65 #ifndef TRUE
66 #define TRUE 1
67 #endif
68 
69 #ifndef FALSE
70 #define FALSE 0
71 #endif
72 
73 #define YPXFR_PROC	"/usr/sbin/ypxfr"
74 
75 #endif /* !_YPDEF_H_ */
76