xref: /netbsd-src/usr.sbin/ypserv/common/ypdef.h (revision 07ce40632e7aec9e3c738f3250b39f23d21c5437)
1*07ce4063Ssnj /*	$NetBSD: ypdef.h,v 1.5 2009/10/20 00:51:14 snj Exp $	*/
260aa689cSthorpej 
360aa689cSthorpej /*
460aa689cSthorpej  * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
560aa689cSthorpej  * All rights reserved.
660aa689cSthorpej  *
760aa689cSthorpej  * Redistribution and use in source and binary forms, with or without
860aa689cSthorpej  * modification, are permitted provided that the following conditions
960aa689cSthorpej  * are met:
1060aa689cSthorpej  * 1. Redistributions of source code must retain the above copyright
1160aa689cSthorpej  *    notice, this list of conditions and the following disclaimer.
1260aa689cSthorpej  * 2. Redistributions in binary form must reproduce the above copyright
1360aa689cSthorpej  *    notice, this list of conditions and the following disclaimer in the
1460aa689cSthorpej  *    documentation and/or other materials provided with the distribution.
1560aa689cSthorpej  *
1660aa689cSthorpej  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1760aa689cSthorpej  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1860aa689cSthorpej  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1960aa689cSthorpej  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2060aa689cSthorpej  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2160aa689cSthorpej  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2260aa689cSthorpej  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2360aa689cSthorpej  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2460aa689cSthorpej  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2560aa689cSthorpej  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2660aa689cSthorpej  * SUCH DAMAGE.
2760aa689cSthorpej  */
2860aa689cSthorpej 
2960aa689cSthorpej #ifndef _YPDEF_H_
3060aa689cSthorpej #define _YPDEF_H_
3160aa689cSthorpej 
3260aa689cSthorpej struct ypresp_xfr {
3360aa689cSthorpej 	unsigned int transid;
3460aa689cSthorpej 	int xfrstat;
3560aa689cSthorpej };
3660aa689cSthorpej 
375c90fa67Swiz bool_t	xdr_ypresp_xfr(XDR *, struct ypresp_xfr *);
3860aa689cSthorpej 
3960aa689cSthorpej #define YP_DB_PATH "/var/yp"
4060aa689cSthorpej #define YP_LAST_KEY        "YP_LAST_MODIFIED"
4160aa689cSthorpej #define YP_LAST_LEN	   (sizeof(YP_LAST_KEY)-1)
4260aa689cSthorpej #define YP_INPUT_KEY       "YP_INPUT_FILE"
4360aa689cSthorpej #define YP_INPUT_LEN	   (sizeof(YP_INPUT_KEY)-1)
4460aa689cSthorpej #define YP_OUTPUT_KEY      "YP_OUTPUT_FILE"
4560aa689cSthorpej #define YP_OUTPUT_LEN	   (sizeof(YP_OUTPUT_KEY)-1)
4660aa689cSthorpej #define YP_MASTER_KEY      "YP_MASTER_NAME"
4760aa689cSthorpej #define YP_MASTER_LEN	   (sizeof(YP_MASTER_KEY)-1)
4860aa689cSthorpej #define YP_DOMAIN_KEY      "YP_DOMAIN_NAME"
4960aa689cSthorpej #define YP_DOMAIN_LEN	   (sizeof(YP_DOMAIN_KEY)-1)
5060aa689cSthorpej #define YP_INTERDOMAIN_KEY "YP_INTERDOMAIN"
5160aa689cSthorpej #define YP_INTERDOMAIN_LEN (sizeof(YP_INTERDOMAIN_KEY)-1)
5260aa689cSthorpej #define YP_SECURE_KEY      "YP_SECURE"
5360aa689cSthorpej #define YP_SECURE_LEN      (sizeof(YP_SECURE_KEY)-1)
5460aa689cSthorpej 
5560aa689cSthorpej #define MAX_LAST_LEN 10
5660aa689cSthorpej #define MAX_MASTER_LEN 255
5760aa689cSthorpej #define YP_HOSTNAME "hosts.byname"
5860aa689cSthorpej #define YP_HOSTADDR "hosts.byaddr"
5960aa689cSthorpej 
6060aa689cSthorpej #ifndef TRUE
6160aa689cSthorpej #define TRUE 1
6260aa689cSthorpej #endif
6360aa689cSthorpej 
6460aa689cSthorpej #ifndef FALSE
6560aa689cSthorpej #define FALSE 0
6660aa689cSthorpej #endif
6760aa689cSthorpej 
6860aa689cSthorpej #define YPXFR_PROC	"/usr/sbin/ypxfr"
6960aa689cSthorpej 
7060aa689cSthorpej #endif /* !_YPDEF_H_ */
71