xref: /original-bsd/sbin/mount_portal/portald.h (revision b4971bb3)
1 /*
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  * All rights reserved.
5  *
6  * This code is derived from software donated to Berkeley by
7  * Jan-Simon Pendry.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)portald.h	8.1 (Berkeley) 06/05/93
12  *
13  * $Id: portald.h,v 1.1 1992/05/25 21:43:09 jsp Exp jsp $
14  */
15 
16 #include <sys/cdefs.h>
17 #include <miscfs/portal/portal.h>
18 
19 /*
20  * Meta-chars in an RE.  Paths in the config file containing
21  * any of these characters will be matched using regexec, other
22  * paths will be prefix-matched.
23  */
24 #define RE_CHARS ".|()[]*+?\\^$"
25 
26 typedef struct qelem qelem;
27 
28 struct qelem {
29 	qelem *q_forw;
30 	qelem *q_back;
31 };
32 
33 typedef struct provider provider;
34 struct provider {
35 	char *pr_match;
36 	int (*pr_func) __P((struct portal_cred *,
37 				char *key, char **v, int so, int *fdp));
38 };
39 extern provider providers[];
40 
41 /*
42  * Portal providers
43  */
44 extern int portal_exec __P((struct portal_cred *,
45 				char *key, char **v, int so, int *fdp));
46 extern int portal_file __P((struct portal_cred *,
47 				char *key, char **v, int so, int *fdp));
48 extern int portal_tcp __P((struct portal_cred *,
49 				char *key, char **v, int so, int *fdp));
50 
51 /*
52  * Global functions
53  */
54 extern void activate __P((qelem *q, int so));
55 extern char **conf_match __P((qelem *q, char *key));
56 extern void conf_read __P((qelem *q, char *conf));
57