/*
#ident	"@(#)smail/src:RELEASE-3_2_0_112:lookup.h,v 1.4 2000/09/03 16:26:31 woods Exp"
 */

/*
 *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
 *    Copyright (C) 1992  Ronald S. Karr
 * 
 * See the file COPYING, distributed with smail, for restriction
 * and warranty information.
 */

/*
 * lookup.:
 *	Interface file for lookup.c
 */

/* macros used in communicating with functions in lookup.c */
#define DB_FAIL		(-1)		/* unrecoverable failure */
#define DB_AGAIN	(-2)		/* retry operation at a later time */
#define DB_NOMATCH	(-3)		/* no match was found */
#define DB_SUCCEED	0		/* operation was successful */
#define FILE_SUCCEED	0		/* operation on file was successful */
#define FILE_FAIL	(-4)		/* unrecoverable database failure */
#define FILE_AGAIN	(-5)		/* try using database later */
#define FILE_NOMATCH	(-6)		/* no such file */

/* external functions defined in lookup.c */
extern int open_database __P((char *, char *, int, unsigned int, struct stat *, char **, char **));
extern void close_database __P((char *));
extern int lookup_database __P((char *, char *, char **, char **));
extern int match_ip __P((char *, char *, int, int, char **));
extern int match_ip_net __P((char *, char *));
extern char *flip_inet_addr __P((char *));
