|
| int | vc_syscall (uint32_t cmd, xid_t xid, void *data) |
| | The generic vserver syscallThis function executes the generic vserver syscall. It uses the correct syscallnumber (which may differ between the different architectures). More...
|
| |
| int | vc_get_version () |
| | Returns the version of the current kernel API. More...
|
| |
| vc_vci_t | vc_get_vci () |
| | Returns the kernel configuration bits. More...
|
| |
| xid_t | vc_new_s_context (xid_t ctx, unsigned int remove_cap, unsigned int flags) |
| | Moves current process into a contextPuts current process into context ctx, removes the capabilities given in remove_cap and sets flags. More...
|
| |
| int | vc_set_ipv4root (uint32_t bcast, size_t nb, struct vc_ip_mask_pair const *ips) |
| | Sets the ipv4root information. More...
|
| |
| xid_t | vc_ctx_create (xid_t xid, struct vc_ctx_flags *flags) |
| | Creates a context without starting it.This functions initializes a new context. When already in a freshly created context, this old context will be discarded. More...
|
| |
| int | vc_ctx_migrate (xid_t xid, uint_least64_t flags) |
| | Moves the current process into the specified context. More...
|
| |
| int | vc_ctx_stat (xid_t xid, struct vc_ctx_stat *stat) |
| | Get some statistics about a context. More...
|
| |
| int | vc_virt_stat (xid_t xid, struct vc_virt_stat *stat) |
| | Get more statistics about a context. More...
|
| |
| int | vc_ctx_kill (xid_t ctx, pid_t pid, int sig) |
| | Sends a signal to a context/pidSpecial values for pid are: More...
|
| |
| xid_t | vc_get_task_xid (pid_t pid) |
| | Returns the context of the given process. More...
|
| |
|
int | vc_wait_exit (xid_t xid) |
| | Waits for the end of a context.
|
| |
| int | vc_get_rlimit (xid_t xid, int resource, struct vc_rlimit *lim) |
| | Returns the limits of resource. More...
|
| |
| int | vc_set_rlimit (xid_t xid, int resource, struct vc_rlimit const *lim) |
| | Sets the limits of resource. More...
|
| |
| int | vc_rlimit_stat (xid_t xid, int resource, struct vc_rlimit_stat *stat) |
| | Returns the current stats of resource. More...
|
| |
| int | vc_reset_minmax (xid_t xid) |
| | Resets the minimum and maximum observed values of all resources. More...
|
| |
| int | vc_get_iattr (char const *filename, xid_t *xid, uint_least32_t *flags, uint_least32_t *mask) |
| | Returns information about attributes and assigned context of a file.This function returns the VC_IATTR_XXX flags and about the assigned context of a file. To request an information, the appropriate bit in mask must be set and the corresponding parameter (xid or flags) must not be NULL. More...
|
| |
| xid_t | vc_getfilecontext (char const *filename) |
| | Returns the context of filename This function calls vc_get_iattr() with appropriate arguments to determine the context of filename. In error-case or when no context is assigned, VC_NOCTX will be returned. To differ between both cases, errno must be examined. More...
|
| |
Functions which are calling the vserver syscall directly.
| int vc_get_iattr |
( |
char const * |
filename, |
|
|
xid_t * |
xid, |
|
|
uint_least32_t * |
flags, |
|
|
uint_least32_t * |
mask |
|
) |
| |
Returns information about attributes and assigned context of a file.This function returns the VC_IATTR_XXX flags and about the assigned context of a file. To request an information, the appropriate bit in mask must be set and the corresponding parameter (xid or flags) must not be NULL.
E.g. to receive the assigned context, the VC_IATTR_XID bit must be set in mask, and xid must point to valid memory.
Possible flags are VC_IATTR_ADMIN, VC_IATTR_WATCH , VC_IATTR_HIDE, VC_IATTR_BARRIER, VC_IATTR_IUNLINK and VC_IATTR_IMMUTABLE.
- Parameters
-
| filename | The name of the file whose attributes shall be determined. |
| xid | When non-zero and the VC_IATTR_XID bit is set in mask, the assigned context of filename will be stored there. |
| flags | When non-zero, a bitmask of current attributes will be stored there. These attributes must be requested explicitly by setting the appropriate bit in mask |
| mask | Points to a bitmask which tells which attributes shall be determined. On return, it will masquerade the attributes which were determined. |
- Precondition
- mask!=0 && !((*mask&VC_IATTR_XID) && xid==0) && !((*mask&~VC_IATTR_XID) && flags==0)