Add 64 bit display output support to sysctl plus convenient macros.
[dragonfly.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: src/sys/sys/jail.h,v 1.8.2.2 2000/11/01 17:58:06 rwatson Exp $
10  * $DragonFly: src/sys/sys/jail.h,v 1.2 2003/06/17 04:28:58 dillon Exp $
11  *
12  */
13
14 #ifndef _SYS_JAIL_H_
15 #define _SYS_JAIL_H_
16
17 struct jail {
18         u_int32_t       version;
19         char            *path;
20         char            *hostname;
21         u_int32_t       ip_number;
22 };
23
24 #ifndef _KERNEL
25
26 int jail __P((struct jail *));
27
28 #else /* _KERNEL */
29
30 #ifdef MALLOC_DECLARE
31 MALLOC_DECLARE(M_PRISON);
32 #endif
33
34 /*
35  * This structure describes a prison.  It is pointed to by all struct
36  * proc's of the inmates.  pr_ref keeps track of them and is used to
37  * delete the struture when the last inmate is dead.
38  */
39
40 struct prison {
41         int             pr_ref;
42         char            pr_host[MAXHOSTNAMELEN];
43         u_int32_t       pr_ip;
44         void            *pr_linux;
45 };
46
47 /*
48  * Sysctl-set variables that determine global jail policy
49  */
50 extern int      jail_set_hostname_allowed;
51 extern int      jail_socket_unixiproute_only;
52 extern int      jail_sysvipc_allowed;
53
54 #endif /* !_KERNEL */
55 #endif /* !_SYS_JAIL_H_ */