[−][src]Crate lxc_sys2
Native bindings for lxc library.
Examples
use std::ffi::CString; fn main() { let name = CString::new("playground").unwrap(); let configpath = CString::new("/path/to/config").unwrap(); let c = unsafe { lxc_sys2::lxc_container_new( name.as_ptr(), configpath.as_ptr(), ) }; let c_defined = unsafe { ((*c).is_defined)(c) }; println!( "Container {:?} is defined: {}", name, c_defined ) }
Versioning
Version lxc-sys2:1.0.0
correspondents to lxc:1.0.0
. In case the bindings
had a bug a new version lxc-sys2:1.0.0-1
will be released which still
correspondents to lxc:1.0.0
including the patch to fix the binding
related bug.
Structs
bdev_specs | |
lxc_attach_command_t | Representation of a command to run in a container. |
lxc_attach_options_t | LXC attach options for \ref lxc_container |
lxc_container | An LXC container. |
lxc_lock | |
lxc_snapshot | An LXC container snapshot. |
Enums
lxc_attach_env_policy_t | LXC environment policy |
Constants
LXC_ATTACH_DEFAULT | Mask of flags to apply by default |
LXC_ATTACH_DROP_CAPABILITIES | Drop capabilities |
LXC_ATTACH_LSM | All Linux Security Module flags |
LXC_ATTACH_LSM_EXEC | Execute under a Linux Security Module |
LXC_ATTACH_LSM_NOW | FIXME: unknown |
LXC_ATTACH_MOVE_TO_CGROUP | Move to cgroup |
LXC_ATTACH_REMOUNT_PROC_SYS | Remount /proc filesystem |
LXC_ATTACH_SET_PERSONALITY | Set personality |
LXC_CLONE_KEEPBDEVTYPE | Use the same bdev type |
LXC_CLONE_KEEPMACADDR | Do not change the MAC address on network interfaces |
LXC_CLONE_KEEPNAME | Do not edit the rootfs to change the hostname |
LXC_CLONE_MAXFLAGS | Number of |
LXC_CLONE_MAYBE_SNAPSHOT | Snapshot only if bdev supports it, else copy |
LXC_CLONE_SNAPSHOT | Snapshot the original filesystem(s) |
LXC_CREATE_MAXFLAGS | Number of |
LXC_CREATE_QUIET | Redirect |
Functions
list_active_containers⚠ | Get a list of active containers for a given lxcpath. |
list_all_containers⚠ | Get a complete list of all containers for a given lxcpath. |
list_defined_containers⚠ | Get a list of defined containers in a lxcpath. |
lxc_attach_run_command⚠ | Run a command in the container. |
lxc_attach_run_shell⚠ | Run a shell command in the container. |
lxc_container_get⚠ | Add a reference to the specified container. |
lxc_container_new⚠ | Create a new container. |
lxc_container_put⚠ | Drop a reference to the specified container. |
lxc_get_global_config_item⚠ | Get the value for a global config key |
lxc_get_version⚠ | Determine version of LXC. |
lxc_get_wait_states⚠ | Obtain a list of all container states. |
Type Definitions
lxc_attach_exec_t | LXC attach function type. |