aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/jail.h
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2011-03-29 17:47:25 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2011-03-29 17:47:25 +0000
commit097055e26d9459c7def70856aab62b77d627511d (patch)
tree304753d7f5287660a242996801bd5664ee945d3a /sys/sys/jail.h
parentf77057db0888d2ca3b038c9775188bc83ebcc297 (diff)
downloadsrc-097055e26d9459c7def70856aab62b77d627511d.tar.gz
src-097055e26d9459c7def70856aab62b77d627511d.zip
Add racct. It's an API to keep per-process, per-jail, per-loginclass
and per-loginclass resource accounting information, to be used by the new resource limits code. It's connected to the build, but the code that actually calls the new functions will come later. Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
Notes
Notes: svn path=/head/; revision=220137
Diffstat (limited to 'sys/sys/jail.h')
-rw-r--r--sys/sys/jail.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index 85c629a0a129..b83ac1b8a3c9 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -135,6 +135,8 @@ MALLOC_DECLARE(M_PRISON);
#define HOSTUUIDLEN 64
+struct racct;
+
/*
* This structure describes a prison. It is pointed to by all struct
* ucreds's of the inmates. pr_ref keeps track of them and is used to
@@ -166,7 +168,8 @@ struct prison {
int pr_ip6s; /* (p) number of v6 IPs */
struct in_addr *pr_ip4; /* (p) v4 IPs of jail */
struct in6_addr *pr_ip6; /* (p) v6 IPs of jail */
- void *pr_sparep[4];
+ struct racct *pr_racct; /* (c) resource accounting */
+ void *pr_sparep[3];
int pr_childcount; /* (a) number of child jails */
int pr_childmax; /* (p) maximum child jails */
unsigned pr_allow; /* (p) PR_ALLOW_* flags */
@@ -380,6 +383,8 @@ int prison_if(struct ucred *cred, struct sockaddr *sa);
char *prison_name(struct prison *, struct prison *);
int prison_priv_check(struct ucred *cred, int priv);
int sysctl_jail_param(SYSCTL_HANDLER_ARGS);
+void prison_racct_foreach(void (*callback)(struct racct *racct,
+ void *arg2, void *arg3), void *arg2, void *arg3);
#endif /* _KERNEL */
#endif /* !_SYS_JAIL_H_ */