ypxfr_extern.h revision 93979
1300779Struckman/* 2300779Struckman * Copyright (c) 1995 3300779Struckman * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4300779Struckman * 5300779Struckman * Redistribution and use in source and binary forms, with or without 6300779Struckman * modification, are permitted provided that the following conditions 7300779Struckman * are met: 8300779Struckman * 1. Redistributions of source code must retain the above copyright 9300779Struckman * notice, this list of conditions and the following disclaimer. 10300779Struckman * 2. Redistributions in binary form must reproduce the above copyright 11300779Struckman * notice, this list of conditions and the following disclaimer in the 12300779Struckman * documentation and/or other materials provided with the distribution. 13300779Struckman * 3. All advertising materials mentioning features or use of this software 14300779Struckman * must display the following acknowledgement: 15300779Struckman * This product includes software developed by Bill Paul. 16300779Struckman * 4. Neither the name of the author nor the names of any co-contributors 17300779Struckman * may be used to endorse or promote products derived from this software 18300779Struckman * without specific prior written permission. 19300779Struckman * 20300779Struckman * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 21300779Struckman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22300779Struckman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23300779Struckman * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE 24300779Struckman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25300779Struckman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26300779Struckman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27300779Struckman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28300779Struckman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29300779Struckman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30300779Struckman * SUCH DAMAGE. 31300779Struckman * 32300779Struckman * $FreeBSD: head/libexec/ypxfr/ypxfr_extern.h 93979 2002-04-06 19:08:02Z des $ 33300779Struckman */ 34300779Struckman#include <sys/types.h> 35300779Struckman#include <limits.h> 36300779Struckman#include <paths.h> 37300779Struckman#include <db.h> 38300779Struckman#include <rpcsvc/yp.h> 39300779Struckman 40300779Struckmanextern HASHINFO openinfo; 41300779Struckmanextern BTREEINFO openinfo_b; 42300779Struckman 43300779Struckman#ifndef _PATH_YP 44300779Struckman#define _PATH_YP "/var/yp/" 45300779Struckman#endif 46300779Struckman 47300779Struckmanextern char *yp_dir; 48300779Struckmanextern int debug; 49300779Struckmanextern enum ypstat yp_errno; 50300779Struckmanextern void yp_error(const char *, ...); 51300779Struckmanextern int _yp_check(char **); 52300779Struckmanextern const char *ypxfrerr_string(ypxfrstat); 53300779Struckmanextern DB *yp_open_db_rw(const char *, const char *, const int); 54300779Struckmanextern void yp_init_dbs(void); 55300779Struckmanextern int yp_put_record(DB *, DBT *, DBT *, int); 56300779Struckmanextern int yp_get_record(const char *, const char *, const DBT *, DBT *, int); 57300779Struckmanextern int ypxfr_get_map(char *, char *, char *, int (*)(int, char *, int, char *, int, char*)); 58300779Struckmanextern char *ypxfr_get_master(char *, char *, char *, const int); 59300779Struckmanextern unsigned long ypxfr_get_order(char *, char *, char *, const int); 60300779Struckmanextern int ypxfr_match(char *, char *, char *, char *, unsigned long); 61300779Struckmanextern char *ypxfxerr_string(ypxfrstat); 62300779Struckmanextern int ypxfrd_get_map(char *, char *, char *, char *); 63300779Struckman