1255708Sjhb/*-
2255708Sjhb * Copyright (c) 2013 Advanced Computing Technologies LLC
3255708Sjhb * Written by: John H. Baldwin <jhb@FreeBSD.org>
4255708Sjhb * All rights reserved.
5255708Sjhb *
6255708Sjhb * Redistribution and use in source and binary forms, with or without
7255708Sjhb * modification, are permitted provided that the following conditions
8255708Sjhb * are met:
9255708Sjhb * 1. Redistributions of source code must retain the above copyright
10255708Sjhb *    notice, this list of conditions and the following disclaimer.
11255708Sjhb * 2. Redistributions in binary form must reproduce the above copyright
12255708Sjhb *    notice, this list of conditions and the following disclaimer in the
13255708Sjhb *    documentation and/or other materials provided with the distribution.
14255708Sjhb *
15255708Sjhb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16255708Sjhb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17255708Sjhb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18255708Sjhb * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19255708Sjhb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20255708Sjhb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21255708Sjhb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22255708Sjhb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23255708Sjhb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24255708Sjhb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25255708Sjhb * SUCH DAMAGE.
26255708Sjhb *
27255708Sjhb * $FreeBSD$
28255708Sjhb */
29255708Sjhb
30255708Sjhb#ifndef	_SYS_PROCCTL_H_
31255708Sjhb#define	_SYS_PROCCTL_H_
32255708Sjhb
33255708Sjhb#define	PROC_SPROTECT		1	/* set protected state */
34255708Sjhb
35255708Sjhb/* Operations for PROC_SPROTECT (passed in integer arg). */
36255708Sjhb#define	PPROT_OP(x)	((x) & 0xf)
37255708Sjhb#define	PPROT_SET	1
38255708Sjhb#define	PPROT_CLEAR	2
39255708Sjhb
40255708Sjhb/* Flags for PROC_SPROTECT (ORed in with operation). */
41255708Sjhb#define	PPROT_FLAGS(x)	((x) & ~0xf)
42255708Sjhb#define	PPROT_DESCEND	0x10
43255708Sjhb#define	PPROT_INHERIT	0x20
44255708Sjhb
45255708Sjhb#ifndef _KERNEL
46255708Sjhb#include <sys/types.h>
47255708Sjhb#include <sys/wait.h>
48255708Sjhb
49255708Sjhb__BEGIN_DECLS
50255708Sjhbint	procctl(idtype_t, id_t, int, void *);
51255708Sjhb__END_DECLS
52255708Sjhb
53255708Sjhb#endif
54255708Sjhb
55255708Sjhb#endif /* !_SYS_PROCCTL_H_ */
56