Definition in file vserver.h.
#include <sys/types.h>
#include <stdint.h>
Include dependency graph for vserver.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _vx_info |
Context information. More... | |
struct | _vx_stat |
Context statistics. More... | |
struct | _vx_flags |
Context/migration flags. More... | |
struct | _vx_uname |
Virtual system information data. More... | |
struct | _vx_wait |
Wait results. More... | |
struct | _vx_sched |
Scheduler values. More... | |
struct | _vx_sched_info |
Scheduler information. More... | |
struct | _vx_limit |
Resource limits. More... | |
struct | _vx_limit_stat |
Resource limit accounting. More... | |
struct | _dx_limit |
Disk limit values. More... | |
struct | _ix_attr |
Inode attributes. More... | |
struct | _nx_info |
Network context information. More... | |
struct | _nx_addr |
Network address information. More... | |
struct | _nx_flags |
Network context flags. More... | |
struct | _nx_sock_stat |
Accounting data. More... | |
Defines | |
#define | LIBVSERVER_API_MAJOR 2 |
#define | LIBVSERVER_API_MINOR 0 |
#define | CAP_CHOWN 0 |
#define | CAP_DAC_OVERRIDE 1 |
#define | CAP_DAC_READ_SEARCH 2 |
#define | CAP_FOWNER 3 |
#define | CAP_FSETID 4 |
#define | CAP_KILL 5 |
#define | CAP_SETGID 6 |
#define | CAP_SETUID 7 |
#define | CAP_SETPCAP 8 |
#define | CAP_LINUX_IMMUTABLE 9 |
#define | CAP_NET_BIND_SERVICE 10 |
#define | CAP_NET_BROADCAST 11 |
#define | CAP_NET_ADMIN 12 |
#define | CAP_NET_RAW 13 |
#define | CAP_IPC_LOCK 14 |
#define | CAP_IPC_OWNER 15 |
#define | CAP_SYS_MODULE 16 |
#define | CAP_SYS_RAWIO 17 |
#define | CAP_SYS_CHROOT 18 |
#define | CAP_SYS_PTRACE 19 |
#define | CAP_SYS_PACCT 20 |
#define | CAP_SYS_ADMIN 21 |
#define | CAP_SYS_BOOT 22 |
#define | CAP_SYS_NICE 23 |
#define | CAP_SYS_RESOURCE 24 |
#define | CAP_SYS_TIME 25 |
#define | CAP_SYS_TTY_CONFIG 26 |
#define | CAP_MKNOD 27 |
#define | CAP_LEASE 28 |
#define | CAP_AUDIT_WRITE 29 |
#define | CAP_AUDIT_CONTROL 30 |
#define | CAP_CONTEXT 31 |
#define | VXC_SET_UTSNAME 0x00000001 |
#define | VXC_SET_RLIMIT 0x00000002 |
#define | VXC_RAW_ICMP 0x00000100 |
#define | VXC_SYSLOG 0x00001000 |
#define | VXC_SECURE_MOUNT 0x00010000 |
#define | VXC_SECURE_REMOUNT 0x00020000 |
#define | VXC_BINARY_MOUNT 0x00040000 |
#define | VXC_QUOTA_CTL 0x00100000 |
#define | VXC_ADMIN_MAPPER 0x00200000 |
#define | VXC_ADMIN_CLOOP 0x00400000 |
#define | VXF_INFO_SCHED 0x00000002 |
#define | VXF_INFO_NPROC 0x00000004 |
#define | VXF_INFO_PRIVATE 0x00000008 |
#define | VXF_INFO_INIT 0x00000010 |
#define | VXF_INFO_HIDE 0x00000020 |
#define | VXF_INFO_ULIMIT 0x00000040 |
#define | VXF_INFO_NSPACE 0x00000080 |
#define | VXF_SCHED_HARD 0x00000100 |
#define | VXF_SCHED_PRIO 0x00000200 |
#define | VXF_SCHED_PAUSE 0x00000400 |
#define | VXF_VIRT_MEM 0x00010000 |
#define | VXF_VIRT_UPTIME 0x00020000 |
#define | VXF_VIRT_CPU 0x00040000 |
#define | VXF_VIRT_LOAD 0x00080000 |
#define | VXF_VIRT_TIME 0x00100000 |
#define | VXF_HIDE_MOUNT 0x01000000 |
#define | VXF_HIDE_NETIF 0x02000000 |
#define | VXF_HIDE_VINFO 0x04000000 |
#define | VXF_STATE_SETUP (1ULL<<32) |
#define | VXF_STATE_INIT (1ULL<<33) |
#define | VXF_STATE_ADMIN (1ULL<<34) |
#define | VXF_SC_HELPER (1ULL<<36) |
#define | VXF_REBOOT_KILL (1ULL<<37) |
#define | VXF_PERSISTENT (1ULL<<38) |
#define | VXF_FORK_RSS (1ULL<<48) |
#define | VXF_PROLIFIC (1ULL<<49) |
#define | VXF_IGNEG_NICE (1ULL<<52) |
#define | VXM_SET_INIT 0x00000001 |
#define | VXM_SET_REAPER 0x00000002 |
#define | VHIN_CONTEXT 0 |
#define | VHIN_SYSNAME 1 |
#define | VHIN_NODENAME 2 |
#define | VHIN_RELEASE 3 |
#define | VHIN_VERSION 4 |
#define | VHIN_MACHINE 5 |
#define | VHIN_DOMAINNAME 6 |
#define | VXSM_FILL_RATE 0x0001 |
#define | VXSM_INTERVAL 0x0002 |
#define | VXSM_FILL_RATE2 0x0004 |
#define | VXSM_INTERVAL2 0x0008 |
#define | VXSM_TOKENS 0x0010 |
#define | VXSM_TOKENS_MIN 0x0020 |
#define | VXSM_TOKENS_MAX 0x0040 |
#define | VXSM_PRIO_BIAS 0x0100 |
#define | VXSM_IDLE_TIME 0x0200 |
#define | VXSM_FORCE 0x0400 |
#define | VXSM_CPU_ID 0x1000 |
#define | VXSM_BUCKET_ID 0x2000 |
#define | VXSM_MSEC 0x4000 |
#define | VXSM_V3_MASK 0x0173 |
#define | VXSM_SET_MASK 0x01FF |
#define | CRLIM_UNSET (0ULL) |
#define | CRLIM_INFINITY (~0ULL) |
#define | CRLIM_KEEP (~1ULL) |
#define | VLIMIT_NSOCK 16 |
#define | VLIMIT_OPENFD 17 |
#define | VLIMIT_ANON 18 |
#define | VLIMIT_SHMEM 19 |
#define | VLIMIT_SEMARY 20 |
#define | VLIMIT_NSEMS 21 |
#define | VLIMIT_DENTRY 22 |
#define | VLIMIT_MAPPED 23 |
#define | CDLIM_UNSET ((uint32_t)0UL) |
#define | CDLIM_INFINITY ((uint32_t)~0UL) |
#define | CDLIM_KEEP ((uint32_t)~1UL) |
#define | IATTR_TAG 0x01000000 |
#define | IATTR_ADMIN 0x00000001 |
#define | IATTR_WATCH 0x00000002 |
#define | IATTR_HIDE 0x00000004 |
#define | IATTR_FLAGS 0x00000007 |
#define | IATTR_BARRIER 0x00010000 |
#define | IATTR_IUNLINK 0x00020000 |
#define | IATTR_IMMUTABLE 0x00040000 |
#define | CLONE_VM 0x00000100 |
#define | CLONE_FS 0x00000200 |
#define | CLONE_FILES 0x00000400 |
#define | CLONE_SIGHAND 0x00000800 |
#define | CLONE_PTRACE 0x00002000 |
#define | CLONE_VFORK 0x00004000 |
#define | CLONE_PARENT 0x00008000 |
#define | CLONE_THREAD 0x00010000 |
#define | CLONE_NEWNS 0x00020000 |
#define | CLONE_SYSVSEM 0x00040000 |
#define | CLONE_SETTLS 0x00080000 |
#define | CLONE_PARENT_SETTID 0x00100000 |
#define | CLONE_CHILD_CLEARTID 0x00200000 |
#define | CLONE_DETACHED 0x00400000 |
#define | CLONE_UNTRACED 0x00800000 |
#define | CLONE_CHILD_SETTID 0x01000000 |
#define | CLONE_STOPPED 0x02000000 |
#define | CLONE_NEWUTS 0x04000000 |
#define | CLONE_NEWIPC 0x08000000 |
#define | CLONE_KTHREAD 0x10000000 |
#define | NXF_INFO_PRIVATE 0x00000008 |
#define | NXF_STATE_SETUP (1ULL<<32) |
#define | NXF_STATE_ADMIN (1ULL<<34) |
#define | NXF_SC_HELPER (1ULL<<36) |
#define | NXF_PERSISTENT (1ULL<<38) |
#define | NXA_TYPE_IPV4 1 |
#define | NXA_TYPE_IPV6 2 |
#define | NXA_MOD_BCAST (1<<8) |
#define | NXA_TYPE_ANY ((uint16_t)-1) |
#define | VXA_SOCK_UNSPEC 0 |
#define | VXA_SOCK_UNIX 1 |
#define | VXA_SOCK_INET 2 |
#define | VXA_SOCK_INET6 3 |
#define | VXA_SOCK_PACKET 4 |
#define | VXA_SOCK_OTHER 5 |
#define | NXA_SOCK_UNSPEC VXA_SOCK_UNSPEC |
#define | NXA_SOCK_UNIX VXA_SOCK_UNIX |
#define | NXA_SOCK_INET VXA_SOCK_INET |
#define | NXA_SOCK_INET6 VXA_SOCK_INET6 |
#define | NXA_SOCK_PACKET VXA_SOCK_PACKET |
#define | NXA_SOCK_OTHER VXA_SOCK_OTHER |
Typedefs | |
typedef uint32_t | xid_t |
typedef _vx_info | vx_info_t |
Context information. | |
typedef _vx_stat | vx_stat_t |
Context statistics. | |
typedef _vx_flags | vx_flags_t |
Context/migration flags. | |
typedef _vx_uname | vx_uname_t |
Virtual system information data. | |
typedef _vx_wait | vx_wait_t |
Wait results. | |
typedef _vx_sched | vx_sched_t |
Scheduler values. | |
typedef _vx_sched_info | vx_sched_info_t |
Scheduler information. | |
typedef _vx_limit | vx_limit_t |
Resource limits. | |
typedef _vx_limit_stat | vx_limit_stat_t |
Resource limit accounting. | |
typedef _dx_limit | dx_limit_t |
Disk limit values. | |
typedef _ix_attr | ix_attr_t |
Inode attributes. | |
typedef uint32_t | nid_t |
typedef _nx_info | nx_info_t |
Network context information. | |
typedef _nx_addr | nx_addr_t |
Network address information. | |
typedef _nx_flags | nx_flags_t |
Network context flags. | |
typedef _nx_sock_stat | nx_sock_stat_t |
Accounting data. | |
Functions | |
int | vserver (uint32_t cmd, uint32_t id, void *data) |
Main vserver syscall interface. | |
int | clone (int flags, void *child_stack) |
Clone system call. | |
int | vs_get_version (void) |
Get vserver version of running kernel. | |
int | vs_get_config (void) |
Get vserver configuration of running kernel. | |
int | vx_create (xid_t xid, vx_flags_t *data) |
Create a new context. | |
int | vx_migrate (xid_t xid, vx_flags_t *data) |
Migrate to an existing context. | |
int | vx_task_xid (pid_t pid) |
Get the context ID of a process. | |
int | vx_info (xid_t xid, vx_info_t *data) |
Get context information. | |
int | vx_stat (xid_t xid, vx_stat_t *data) |
Get context statistics. | |
int | vx_bcaps_set (xid_t xid, vx_flags_t *data) |
Set system capabilities. | |
int | vx_bcaps_get (xid_t xid, vx_flags_t *data) |
Get system capabilities. | |
int | vx_ccaps_set (xid_t xid, vx_flags_t *data) |
Set context capabilities. | |
int | vx_ccaps_get (xid_t xid, vx_flags_t *data) |
Get context capabilities. | |
int | vx_flags_set (xid_t xid, vx_flags_t *data) |
Set context flags. | |
int | vx_flags_get (xid_t xid, vx_flags_t *data) |
Get context flags. | |
int | vx_uname_set (xid_t xid, vx_uname_t *data) |
Set virtual system information. | |
int | vx_uname_get (xid_t xid, vx_uname_t *data) |
Get virtual system information. | |
int | vx_kill (xid_t xid, pid_t pid, int sig) |
Kill one or more processes. | |
int | vx_wait (xid_t xid, vx_wait_t *data) |
Wait for context death. | |
int | vx_sched_set (xid_t xid, vx_sched_t *data) |
Set scheduler values. | |
int | vx_sched_get (xid_t xid, vx_sched_t *data) |
Get scheduler values. | |
int | vx_sched_info (xid_t xid, vx_sched_info_t *data) |
Get scheduler information. | |
int | vx_limit_mask_get (vx_limit_t *data) |
Get resource limits mask. | |
int | vx_limit_set (xid_t xid, vx_limit_t *data) |
Set resource limit. | |
int | vx_limit_get (xid_t xid, vx_limit_t *data) |
Get resource limits. | |
int | vx_limit_stat (xid_t xid, vx_limit_stat_t *data) |
Get resource limit accounting data. | |
int | vx_limit_reset (xid_t xid) |
Reset resource limit accounting data. | |
int | dx_limit_add (xid_t xid, dx_limit_t *data) |
Add disk limit entry. | |
int | dx_limit_remove (xid_t xid, dx_limit_t *data) |
Remove disk limit. | |
int | dx_limit_set (xid_t xid, dx_limit_t *data) |
Set disk limit values. | |
int | dx_limit_get (xid_t xid, dx_limit_t *data) |
Get disk limit values. | |
int | ix_attr_set (ix_attr_t *data) |
Set inode attributes. | |
int | ix_attr_get (ix_attr_t *data) |
Get inode attributes. | |
int | ns_clone (int flags, void *child_stack) |
Clone the current namespace (FS/IPC/UTS). | |
int | ns_enter (xid_t xid, uint64_t mask) |
Enter namespace. | |
int | ns_set (xid_t xid, uint64_t mask) |
Set namespace. | |
int | nx_create (nid_t nid, nx_flags_t *data) |
Create network context. | |
int | nx_migrate (nid_t nid) |
Migrate to an existing network context. | |
int | nx_task_nid (pid_t pid) |
Get the network context ID of a process. | |
int | nx_info (nid_t nid, nx_info_t *data) |
Get network context information. | |
int | nx_addr_add (nid_t nid, nx_addr_t *data) |
Add network context addresses. | |
int | nx_addr_remove (nid_t nid, nx_addr_t *data) |
Remove network context addresses. | |
int | nx_flags_set (nid_t nid, nx_flags_t *data) |
Set network context flags. | |
int | nx_flags_get (nid_t nid, nx_flags_t *data) |
Get network context flags. | |
int | nx_caps_set (nid_t nid, nx_flags_t *data) |
Set network context capabilities. | |
int | nx_caps_get (nid_t nid, nx_flags_t *data) |
Get network context capabilities. | |
int | nx_sock_stat (nid_t nid, nx_sock_stat_t *data) |
Get network socket accounting data. |
int vserver | ( | uint32_t | cmd, | |
uint32_t | id, | |||
void * | data | |||
) |
Main vserver syscall interface.
cmd | Command number | |
id | Context ID (sometimes process id) | |
data | Data structures |
Referenced by dx_limit_add(), dx_limit_get(), dx_limit_remove(), dx_limit_set(), ix_attr_get(), ix_attr_set(), ns_enter(), ns_set(), nx_addr_add(), nx_addr_remove(), nx_caps_get(), nx_caps_set(), nx_create(), nx_flags_get(), nx_flags_set(), nx_info(), nx_migrate(), nx_sock_stat(), nx_task_nid(), vs_get_config(), vs_get_version(), vx_bcaps_get(), vx_bcaps_set(), vx_ccaps_get(), vx_ccaps_set(), vx_create(), vx_flags_get(), vx_flags_set(), vx_info(), vx_kill(), vx_limit_get(), vx_limit_mask_get(), vx_limit_reset(), vx_limit_set(), vx_limit_stat(), vx_migrate(), vx_sched_get(), vx_sched_info(), vx_sched_set(), vx_stat(), vx_task_xid(), vx_uname_get(), vx_uname_set(), and vx_wait().
int clone | ( | int | flags, | |
void * | child_stack | |||
) |
Clone system call.
flags | Clone flags | |
child_stack | Child stack |
Referenced by ns_clone().
int vs_get_version | ( | void | ) |
int vs_get_config | ( | void | ) |