!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Nickolay Kudasov 2014 BSD-style (see the file LICENSE)nickolay.kudasov@gmail.comSafe(Collect flags in a single integer value.(c) Nickolay Kudasov 2014 BSD-style (see the file LICENSE)nickolay.kudasov@gmail.comSafe#2Representation of a command to run in a container.The program to run (passed to execvp).The argvD of that program, including the program itself as the first element.LXC attach options for .NOTE: for stdin, stdout and stderr descriptors dup2() will be used before calling  exec_function, (assuming not 0, 1 and 2S are specified) and the original fds are closed before passing control over. Any  O_CLOEXEC! flag will be removed after that.Any combination of  flags.JThe namespaces to attach to (CLONE_NEW... flags). | Initial personality (Nothing to autodetect).This may be ignored if lxc( is compiled without personality support Inital current directory, Nothing to use cwd.~If the current directory does not exist in the container, the root directory will be used instead because of kernel defaults. The user-id to run as.NOTE: Set to -1; for default behaviour (init uid for userns containers or 0" (super-user) if detection fails). The group-id to run as.NOTE: Set to -1; for default behaviour (init gid for userns containers or 0" (super-user) if detection fails). Environment policy.@Extra environment variables to set in the container environment.ZNames of environment variables in existing environment to retain in container environment.stdin file descriptor.stdout file descriptor.stderr file descriptor. Flags for .Move to cgroup. On by default.!Drop capabilities. On by default.Set personality. On by default5Execute under a Linux Security Module. On by default.)Remount /proc filesystem. Off by default.FIXME: unknown. Off by default."Mask of flags to apply by default. All Linux Security Module flags.LXC environment policy.Retain the environment.Clear the environment.exec function to use for .See ' and (."Convert  to internal representation.#Convert  to bit flag.$Default attach options to use.% Allocate lxc_attach_options_t" structure in a temporary storage.& Allocate lxc_attach_command_t" structure in a temporary storage.'Run a command in the container.(%Run a shell command in the container.(  !"#$%&'((  !"#$%&'(( !"# $%&'(    !"#$%&'((c) Nickolay Kudasov 2014 BSD-style (see the file LICENSE)nickolay.kudasov@gmail.comNone7Cg*5Specifications for how to create a new backing store.,Filesystem type.-Filesystem size in bytes..ZFS root path./LVM Volume Group name.0LVM Logical Volume name.1LVM thin pool to use, if any.2Directory path.3Container state.4Container is stopped.5Container is starting.6Container is running.7Container is stopping.8Container is aborting.9Container is freezing.:Container is frozen.;Container is thawed.<!Container is in some other state.=Container object.?Container name.@Container config path.AAn LXC container snapshot.CName of snapshot.D$Full path to snapshots comment file.ETime snapshot was created.F Full path to LXCPATH for snapshot.G Options for  operation.H Redirect stdin to  /dev/zero and stdout and stderr to  /dev/null.I Number of  LXC_CREATE* flags.J Options for  operation.K.Do not edit the rootfs to change the hostname.L4Do not change the MAC address on network interfaces.M$Snapshot the original filesystem(s).NUse the same bdev type.O-Snapshot only if bdev supports it, else copy.P Number of  LXC_CLONE_* flags.QLXC error structure.SError message.T Error number.U%LXC container-related computations. U ~  (,  ) .Run U a computations using .Run U a computation for a given =.#for the whole computation a single  lxc_containerY structure will be allocated; it will be automatically freed at the end of computation.Pretty print LXC error message.Turn J into a bit flag.Turn G into a bit flag.Allocate a new  lxc_container.Marshal = to  lxc_container using temporary storage.%Parse state as string representation.%Get string representation of a state.Marshal Haskell ** into C structure using temporary storage.the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.*Whether container wishes to be daemonized.Get last container's error. Determine if /var/lib/lxc/$name/config exists.True if container is defined, else False."Determine if container is running.True on success, else False.Determine state of container.Freeze running container.True on success, else False.Thaw a frozen container.True on success, else False.4Determine process ID of the containers init process.3Load the specified configuration for the container.Start the container.Stop the container.True on success, else False.GDetermine if the container wants to run disconnected from the terminal.PDetermine whether container wishes all file descriptors to be closed on startup. Return current config file name./Wait for container to reach a particular state. A timeout of -1 means wait forever. A timeout 0 means do not wait.%Set a key/value configuration option.Delete the container.True on success, else False.@NOTE: Container must be stopped and have no dependent snapshots.Save configuaration to a file.Rename a container.+Request the container reboot by sending it SIGINT.True$ if reboot request successful, else False.-Request the container shutdown by sending it SIGPWR.8Completely clear the containers in-memory configuration.$Retrieve the value of a config item.;Retrieve the value of a config item from running container.7Retrieve a list of config item keys given a key prefix.$Obtain a list of network interfaces.-Determine the list of container IP addresses.@Retrieve the specified cgroup subsystem value for the container.;Set the specified cgroup subsystem value for the container.Clear a configuration item. Analog of .9Determine full path to the containers configuration file.fEach container can have a custom configuration path. However by default it will be set to either the LXCPATH2 configure variable, or the lxcpath value in the LXC_GLOBAL_CONF configuration file (i.e. /etc/lxc/lxc.conf).9The value for a specific container can be changed using .7Set the full path to the containers configuration file.Copy a stopped container.)Allocate a console tty for the container.The returned file descriptor is used to keep the tty allocated. The caller should call close(2) on the returned file descriptor when no longer required so that it may be allocated by another caller.Allocate and run a console tty.JCreate a sub-process attached to a container and run a function inside it.9Run a program inside a container and wait for it to exit.Create a container snapshot.6Assuming default paths, snapshots will be created as /var/lib/lxc/<c>/snaps/snap<n> where <c># represents the container name and <n>, represents the zero-based snapshot number.%Obtain a list of container snapshots.+Create a new container based on a snapshot.}The restored container will be a copy (not snapshot) of the snapshot, and restored in the lxcpath of the original container.WARNING: If new name is the same as the current container name, the container will be destroyed. However, this will fail if the snapshot is overlay-based, since the snapshots will pin the original container.NOTE:+ As an example, if the container exists as /var/lib/lxc/c1, snapname might be "snap0" (representing /var/lib/lxc/c1/snaps/snap0). If new name is c2, then snap0 will be copied to /var/lib/lxc/c2.Destroy the specified snapshot.2Determine if the caller may control the container.Falsem if there is a control socket for the container monitor and the caller may not access it, otherwise returns True.&Add specified device to the container.+Remove specified device from the container.Create a container.+Add a reference to the specified container.,Drop a reference to the specified container. Just False on success,  Just TrueJ if reference was successfully dropped and container has been freed, and Nothing on error.&Obtain a list of all container states.&Get the value for a global config key.Determine version of LXC..Get a list of defined containers in a lxcpath.4Get a list of active containers for a given lxcpath.:Get a complete list of all containers for a given lxcpath.Close log file.)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.Full path to alternate configuration file, or Nothing' to use the default configuration file.True on success, else False.Use lxcinit rather than  /sbin/init.#Array of arguments to pass to init.True on success, else False.Value for the daemonize bit.True+ if container wants to be daemonised, else False.Value for the  close_all_fds bit.True+ if container wants to be daemonised, else False.State to wait for.Timeout in seconds.True' if state reached within timeout, else False.Name of option to set. Value to set.True on success, else False.+Full path to file to save configuration in.True on success, else False.&New name to be used for the container.True on success, else False.)Seconds to wait before returning false. (-1 to wait forever, 0 to avoid waiting).True2 if the container was shutdown successfully, else False.Name of option to get. The item or Nothing on error.Name of option to get. The item or Nothing on error. Key prefix. List of keys.#Network interface name to consider.Network family (for example "inet", "inet6").1IPv6 scope id (ignored if family is not "inet6").A list of network interfaces.cgroup subsystem to retrieve.cgroup subsystem value or Nothing on error.cgroup subsystem to consider. Value to set.True on success, else False.Name of option to clear.True on success, else False. Full path to configuration file.True on success, else False.New name for the container. If Nothing<, the same name is used and a new lxcpath MUST be specified.1lxcpath in which to create the new container. If Nothing0, the original container's lxcpath will be used. Additional J' flags to change the cloning behaviour.Optionally force the cloned bdevtype to a specified plugin. By default the original is used (subject to snapshot requirements).IInformation about how to create the new storage (i.e. fstype and fsdata).>In case of a block device backing store, an optional size. If Nothing, the original backing store's size will be used if possible. Note this only applies to the rootfs. For any other filesystems, the original size will be duplicated.6Additional arguments to pass to the clone hook script."Newly-allocated copy of container c, or Nothing on error.+Terminal number to attempt to allocate, or Nothing% to allocate the first available tty.Tuple  fd,ttynum, masterfd where fd is file descriptor number, ttynum is terminal number and masterfd; is file descriptor refering to the master side of the pty.(Terminal number to attempt to allocate, Nothing( to allocate the first available tty or Just 0 to allocate the console.#File descriptor to read input from.#File descriptor to write output to.)File descriptor to write error output to.The escape character (1 == 'a', 2 == 'b', ...).True on success, else False.Function to run.Data to pass to exec function.Attach options./Process ID of process running inside container c that is running exec function, or Nothing on error.Attach options.-Full path inside container of program to run.&Array of arguments to pass to program. waitpid(2)/ status of exited process that ran program, or Nothing on error.;Full path to file containing a description of the snapshot.Nothing) on error, or zero-based snapshot number.Name of snapshot.*Name to be used for the restored snapshot.True on success, else False.Name of snapshot.True on success, else False.Full path of the device.$Alternate path in the container (or Nothing to use source path).True on success, else False.Full path of the device.$Alternate path in the container (or Nothing to use source path).True on success, else False.TTemplate to execute to instantiate the root filesystem and adjust the configuration.Backing store type to use (if Nothing, dir type will be used by default).RAdditional parameters for the backing store (for example LVM volume group to use).G flags. Note: LXC 1.0 supports only  CreateQuiet option."Arguments to pass to the template.True on success. False otherwise.The name of the config key.3String representing the current value for the key. Nothing on error.lxcpath under which to look.List of  name, container pairs.Full LXCPATH path to consider.List of  name, container pairs.Full LXCPATH path to consider.List of  name, container pairs.)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ϧnmlkjihg~f}e|d{czbyax`w_v^u]t\s[rZqYpXoUVWQRSTJKLMNOPGHIABCDEF=>?@3456789:;<*+,-./012))*+,-./0123 456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Nickolay Kudasov 2014 BSD-style (see the file LICENSE)nickolay.kudasov@gmail.comSafe&  !"#$'(& $ !'("#(c) Nickolay Kudasov 2014 BSD-style (see the file LICENSE)nickolay.kudasov@gmail.comNonef*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUfU=>?@ABCDEF*+,-./0123456789:;<JKLMNOPGHIQRST(c) Nickolay Kudasov 2014 BSD-style (see the file LICENSE)nickolay.kudasov@gmail.comNone  !"#$'(*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU        !"#$%%&'()*+,-.//0123456789:;<=>?@AABCDDEFGHIJKLMNOPQRSSTUVVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~lxc_LNxMGZ40uDA7soDlmk3NY6System.LXC.Internal.UtilsSystem.LXC.AttachOptions!System.LXC.Internal.AttachOptionsSystem.LXC.Internal.ContainerSystem.LXC.Containerattach System.LXCmkFlags AttachCommand attachProgram attachArgv AttachOptions attachFlagsattachNamespacesattachPersonalityattachInitialCWD attachUID attachGIDattachEnvPolicyattachExtraEnvVarsattachExtraKeepEnv attachStdinFDattachStdoutFDattachStderrFD AttachFlagAttachMoveToCGroupAttachDropCapabilitiesAttachSetPersonality AttachLSMExecAttachRemountProcSys AttachLSMNow AttachDefault AttachLSMAttachEnvPolicy AttachKeepEnvAttachClearEnv AttachExecFngetAttachExecFnfromAttachEnvPolicyfromAttachFlagdefaultAttachOptionswithC'lxc_attach_options_twithC'lxc_attach_command_tattachRunCommandattachRunShellField BDevSpecs bdevFSType bdevFSSizebdevZFSRootPathbdevLVMVolumeGroupNamebdevLVMLogicalVolumeNamebdevLVMThinPool bdevDirectoryContainerStateContainerStoppedContainerStartingContainerRunningContainerStoppingContainerAbortingContainerFreezingContainerFrozenContainerThawedContainerOtherState Container containerNamecontainerConfigPathSnapshot snapshotNamesnapshotCommentPathnamesnapshotTimestampsnapshotLXCPath CreateOption CreateQuietCreateMaxFlags CloneOption CloneKeepNameCloneKeepMacAddr CloneSnapshotCloneKeepBDevTypeCloneMaybeSnapshot CloneMaxFlagsLXCErrorlxcErrorString lxcErrorNumLXCrunLXCSnapshotFreeFnContainerAttachRunWaitFnContainerAttachFnContainerConsoleFnContainerConsoleGetFDFnContainerSnapshotListFnContainerSnapshotFnContainerWaitFnContainerGetIPsFnContainerGetInterfacesFnContainerSetItemFnContainerGetItemFnContainerGetRunningConfigItemFnContainerClearConfigFnContainerShutdownFnContainerStartFnContainerBoolBoolFnContainerStringBoolFnContainerProcessIDFnContainerStringFnContainerBoolFnContainerCloneFnContainerCreateFnmkFreeFnmkAttachRunWaitFn mkAttachFn mkConsoleFnmkConsoleGetFDFnmkSnapshotListFn mkSnapshotFnmkWaitFn mkGetIPsFnmkGetInterfacesFn mkSetItemFn mkGetItemFnmkGetRunningConfigItemFnmkClearConfigFn mkShutdownFn mkStartFn mkBoolBoolFnmkStringBoolFn mkProcessIDFn mkStringFnmkBoolFn mkCloneFn mkCreateFnlxc withContainerprettyLXCError cloneFlag createFlagnewC'lxc_containerpeekC'lxc_containerwithC'lxc_container parseState printStatewithC'bdev_specsmkFnboolFn stringBoolFn boolBoolFn getItemFn setItemFn setItemFn' getDaemonize getLastError isDefined isRunningstatefreezeunfreezeinitPID loadConfigstartstop wantDaemonizewantCloseAllFDsconfigFileNamewait setConfigItemdestroy saveConfigrenamerebootshutdown clearConfig getConfigItemgetRunningConfigItemgetKeys getInterfacesgetIPs getCGroupItem setCGroupItemclearConfigItem getConfigPath setConfigPathclone consoleGetFDconsole attachRunWaitsnapshotpeekC'lxc_snapshot snapshotListsnapshotRestoresnapshotDestroy mayControl addDeviceNoderemoveDeviceNodecreategetRefdropRef getWaitStatesgetGlobalConfigItem getVersionlistContainersFnlistDefinedContainerslistActiveContainerslistAllContainerslogClosetrans_3eG64VdP2vzGjP6wJiCp5XControl.Monad.Trans.ReaderReaderTbaseGHC.BaseStringGHC.PtrPtrbindi_FmgIuciJmZi2nI92FSobelBindings.LXC.ContainerC'lxc_containerghc-prim GHC.TypesIO