vshost-util-vserver

Build script and sources for util-vserver.
git clone https://ccx.te2000.cz/git/vshost-util-vserver
Log | Files | Refs

limit_cmd.h (801B)


      1 #ifndef _VX_LIMIT_CMD_H
      2 #define _VX_LIMIT_CMD_H
      3 
      4 
      5 /*  rlimit vserver commands */
      6 
      7 #define VCMD_get_rlimit		VC_CMD(RLIMIT, 1, 0)
      8 #define VCMD_set_rlimit		VC_CMD(RLIMIT, 2, 0)
      9 #define VCMD_get_rlimit_mask	VC_CMD(RLIMIT, 3, 0)
     10 #define VCMD_reset_hits		VC_CMD(RLIMIT, 7, 0)
     11 #define VCMD_reset_minmax	VC_CMD(RLIMIT, 9, 0)
     12 
     13 struct	vcmd_ctx_rlimit_v0 {
     14 	uint32_t id;
     15 	uint64_t minimum;
     16 	uint64_t softlimit;
     17 	uint64_t maximum;
     18 };
     19 
     20 struct	vcmd_ctx_rlimit_mask_v0 {
     21 	uint32_t minimum;
     22 	uint32_t softlimit;
     23 	uint32_t maximum;
     24 };
     25 
     26 #define VCMD_rlimit_stat	VC_CMD(VSTAT, 1, 0)
     27 
     28 struct	vcmd_rlimit_stat_v0 {
     29 	uint32_t id;
     30 	uint32_t hits;
     31 	uint64_t value;
     32 	uint64_t minimum;
     33 	uint64_t maximum;
     34 };
     35 
     36 #define CRLIM_UNSET		(0ULL)
     37 #define CRLIM_INFINITY		(~0ULL)
     38 #define CRLIM_KEEP		(~1ULL)
     39 
     40 #endif	/* _VX_LIMIT_CMD_H */