Date: Fri, 23 Jun 2006 07:48:29 GMT From: Alex Lyashkov <als@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 99855 for review Message-ID: <200606230748.k5N7mTsU070226@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99855 Change 99855 by als@als_head on 2006/06/23 07:47:41 whitespace fixes. Affected files ... .. //depot/projects/jail2/sys/sys/jail2.h#2 edit Differences ... ==== //depot/projects/jail2/sys/sys/jail2.h#2 (text+ko) ==== @@ -63,45 +63,45 @@ #define J_STATS 7 /* contexts limits */ -#define J_SETMEMLIMIT 1 +#define J_SETMEMLIMIT 1 /* int limit */ -#define J_SETPROCLIMIT 2 +#define J_SETPROCLIMIT 2 /* int limit */ -#define J_SETVROOT 4 +#define J_SETVROOT 4 /* set as vroot dev */ -#define J_SETUSEDSPACE 5 +#define J_SETUSEDSPACE 5 /* int space in k */ -#define J_SETFILELIMIT 6 +#define J_SETFILELIMIT 6 /* int limit */ -#define J_SETRSSLIMIT 7 +#define J_SETRSSLIMIT 7 /* int RSS limit */ #define J_SETTCPSOCKETSLIMIT 8 /* int TCP established sockets limit */ #define J_SETUDPSOCKETSLIMIT 9 /* int UDP established sockets limit */ -#define J_CPUHARDLIMIT 10 +#define J_CPUHARDLIMIT 10 /* int cpu time limit - max 1024 */ -#define J_CPUSOFTLIMIT 11 +#define J_CPUSOFTLIMIT 11 /* int cpu time limit - max 1024 */ -#define J_MSQLIMIT 14 +#define J_MSQLIMIT 14 /* int message query count limit */ -#define J_SEMLIMIT 15 +#define J_SEMLIMIT 15 /* int semaphore count limit */ -#define J_SHMLIMIT 16 +#define J_SHMLIMIT 16 /* int shared memory segments count limit */ /* network stuf */ -#define J_VNETDEV_CREATE 1 -#define J_VNETDEV_REMOVE 2 +#define J_VNETDEV_CREATE 1 +#define J_VNETDEV_REMOVE 2 /* only if not have task */ -#define J_ADDMASKIPV4 5 -#define J_RMIPV4 6 +#define J_ADDMASKIPV4 5 +#define J_RMIPV4 6 /* attach vnetdev to host netdev */ -#define J_VNETDEV_ATTACH 7 +#define J_VNETDEV_ATTACH 7 /* detach vnetdev from host netdev */ -#define J_VNETDEV_DETACH 8 +#define J_VNETDEV_DETACH 8 /* set vnetdev shaper speed */ #define J_VNETDEV_SET_TXSPEED 10 @@ -111,155 +111,18 @@ #define J_VNETDEV_UNSET_FLAGS 12 /* disk stuff */ -#define J_VROOT 1 +#define J_VROOT 1 /* char *path - set root dir */ -#define J_SETINODE_ID 2 +#define J_SETINODE_ID 2 /* char *path, uint32_t prison_id */ -#define J_INODEUSAGE 12 +#define J_INODEUSAGE 3 /* int inode count used in context */ -#define J_INODELIMIT 13 +#define J_INODELIMIT 4 /* int inodes count limit for context */ -#define J_SETDISKQUOTE 3 +#define J_SETDISKQUOTE 5 /* int limit */ -#define JAIL2_COMMAND(class, cmd) (((class)<<24) | (cmd)) -#define JAIL2_CLASS(fcmd) (((fcmd)>>24) & 0xFF) -#define JAIL2_CMD(fcmd) ((fcmd) & 0xFFF) - -#ifdef _KERNEL - -struct thread; -int jail2_common(struct thread *td, struct jail_2 *j); -int jail2_network(struct thread *td, struct jail_2 *j); -int jail2_resource(struct thread *td, struct jail_2 *j); - -#endif /* !_KERNEL */ -#endif /* !_SYS_JAIL2_H_ */ -#ifndef _SYS_JAIL2_H_ -#define _SYS_JAIL2_H_ - -struct jail_2 { - uint32_t version; /* vsersion always 2*/ - uint32_t ctx_id; /* prision id */ - uint32_t cmd; /* jail2 command */ - void *data; /* pointer to command data */ -}; - -struct jail2_stats_v1 { - uint32_t flags; - /* Task & CPU */ - uint32_t taskcount; - uint32_t cpulow; - uint32_t cpuhigh; - uint32_t cpuusage; - /* IPC */ - uint32_t msq_count; /* (a) total message count */ - uint32_t msq_limit; /* (a) limits message count in jail */ - uint32_t sem_count; /* (a) total semaphore count */ - uint32_t sem_limit; /* (a) limits semaphore count in jail */ - uint32_t shm_count; /* (a) total shared segments count */ - uint32_t shm_limit; /* (a) limits shared segments count in jail */ - /* disk */ - uint32_t diskblocks; - uint32_t disklimit; - uint32_t inodecount; - uint32_t inodelimit; - /* file */ - uint32_t fdcount; - uint32_t fdlimit; -}; - -#define JAIL2_STATS_VER 1 -struct jail2_stats { - uint32_t version; - uint32_t id; - struct jail2_stats_v1 v1; -}; - - -/* jail2 commands category */ -#define J_COMMON 0x1 -#define J_NETWORK 0x2 -#define J_RESOURCE 0x3 -#define J_DISK 0x4 - -/* common staff */ -/* create context */ -#define J_CREATE 1 -/* destroy context */ -#define J_DESTROY 2 -/* allow execute programs in context */ -#define J_START 3 -/* destroy all programs and disallow execute programs in context */ -#define J_STOP 4 -/* migrate process to context */ -#define J_ENTER 5 -/* set flags for context */ -#define J_SETFLAGS 6 -/* get detaled statistic about context */ -#define J_STATS 7 - -/* contexts limits */ -#define J_SETMEMLIMIT 1 -/* int limit */ -#define J_SETPROCLIMIT 2 -/* int limit */ -#define J_SETVROOT 4 -/* set as vroot dev */ -#define J_SETUSEDSPACE 5 -/* int space in k */ -#define J_SETFILELIMIT 6 -/* int limit */ -#define J_SETRSSLIMIT 7 -/* int RSS limit */ -#define J_SETTCPSOCKETSLIMIT 8 -/* int TCP established sockets limit */ -#define J_SETUDPSOCKETSLIMIT 9 -/* int UDP established sockets limit */ -#define J_CPUHARDLIMIT 10 -/* int cpu time limit - max 1024 */ -#define J_CPUSOFTLIMIT 11 -/* int cpu time limit - max 1024 */ -#define J_MSQLIMIT 14 -/* int message query count limit */ -#define J_SEMLIMIT 15 -/* int semaphore count limit */ -#define J_SHMLIMIT 16 -/* int shared memory segments count limit */ - -/* network stuf */ -#define J_VNETDEV_CREATE 1 -#define J_VNETDEV_REMOVE 2 - -/* only if not have task */ -#define J_ADDMASKIPV4 5 -#define J_RMIPV4 6 - -/* attach vnetdev to host netdev */ -#define J_VNETDEV_ATTACH 7 -/* detach vnetdev from host netdev */ -#define J_VNETDEV_DETACH 8 - -/* set vnetdev shaper speed */ -#define J_VNETDEV_SET_TXSPEED 10 -/* set specified option flags */ -#define J_VNETDEV_SET_FLAGS 11 -/* unset specified option flags */ -#define J_VNETDEV_UNSET_FLAGS 12 - -/* disk stuff */ -#define J_VROOT 1 -/* char *path - set root dir */ -#define J_SETINODE_ID 2 -/* char *path, uint32_t prison_id */ -#define J_INODEUSAGE 12 -/* int inode count used in context */ -#define J_INODELIMIT 13 -/* int inodes count limit for context */ -#define J_SETDISKQUOTE 3 -/* int limit */ - -#define JAIL2_COMMAND(class, cmd) (((class)<<24) | (cmd)) +#define JAIL2_COMMAND(class, cmd) (((class)<<24) | (cmd)) #define JAIL2_CLASS(fcmd) (((fcmd)>>24) & 0xFF) #define JAIL2_CMD(fcmd) ((fcmd) & 0xFFF)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606230748.k5N7mTsU070226>