]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/sys/jail.h
This commit was generated by cvs2svn to compensate for changes in r69180,
[FreeBSD/FreeBSD.git] / sys / sys / jail.h
1 /*
2  * ----------------------------------------------------------------------------
3  * "THE BEER-WARE LICENSE" (Revision 42):
4  * <phk@FreeBSD.org> wrote this file.  As long as you retain this notice you
5  * can do whatever you want with this stuff. If we meet some day, and you think
6  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7  * ----------------------------------------------------------------------------
8  *
9  * $FreeBSD$
10  *
11  */
12
13 #ifndef _SYS_JAIL_H_
14 #define _SYS_JAIL_H_
15
16 struct jail {
17         u_int32_t       version;
18         char            *path;
19         char            *hostname;
20         u_int32_t       ip_number;
21 };
22
23 #ifndef _KERNEL
24
25 int jail __P((struct jail *));
26
27 #else /* _KERNEL */
28
29 #ifdef MALLOC_DECLARE
30 MALLOC_DECLARE(M_PRISON);
31 #endif
32
33 /*
34  * This structure describes a prison.  It is pointed to by all struct
35  * proc's of the inmates.  pr_ref keeps track of them and is used to
36  * delete the struture when the last inmate is dead.
37  */
38
39 struct prison {
40         int             pr_ref;
41         char            pr_host[MAXHOSTNAMELEN];
42         u_int32_t       pr_ip;
43         void            *pr_linux;
44 };
45
46 /*
47  * Sysctl-set variables that determine global jail policy
48  */
49 extern int      jail_set_hostname_allowed;
50 extern int      jail_socket_unixiproute_only;
51 extern int      jail_sysvipc_allowed;
52
53 #endif /* !_KERNEL */
54 #endif /* !_SYS_JAIL_H_ */