]> git.proxmox.com Git - mirror_lxc.git/blob - doc/api-extensions.md
f071237e06bde2210546db37e28ac739b8d56b46
[mirror_lxc.git] / doc / api-extensions.md
1 # API extensions
2
3 The changes below were introduced to the LXC API after the 3.0 API was finalized.
4
5 They are all backward compatible and can be detected by client tools by
6 called the `lxc_has_api_extension` function.
7
8 ## lxc\_log
9
10 This introduces a way to initialize a logging instance from the API for a given
11 container.
12
13 ## lxc\_config\_item\_is\_supported
14
15 This introduces the `lxc_config_item_is_supported` function. It allows users to
16 check whether their LXC instance supports a given configuration key.
17
18 ## console\_log
19
20 This adds support to container's console log. The console log is implemented as
21 an efficient ringbuffer.
22
23 ## reboot2
24
25 This adds `reboot2()` as a new API extension. This function properly waits
26 until a reboot succeeded. It takes a timeout argument. When set to `> 0`
27 `reboot2()` will block until the timeout is reached, if timeout is set to zero
28 `reboot2()` will not block, if set to -1 `reboot2()` will block indefinitly.
29
30 ## mount\_injection
31
32 This adds support for injecting and removing mounts into/from a running
33 containers. Two new API functions `mount()` and `umount()` are added. They
34 mirror the current mount and umount API of the kernel.