71
73
* Defines a structure to configure a network device
72
* @ifname : network device name
74
* @link : lxc.network.link, name of bridge or host iface to attach if any
75
* @name : lxc.network.name, name of iface on the container side
73
76
* @flags : flag of the network device (IFF_UP, ... )
74
77
* @ipv4 : a list of ipv4 addresses to be set on the network device
75
78
* @ipv6 : a list of ipv6 addresses to be set on the network device
77
80
struct lxc_netdev {
83
88
struct lxc_list ipv4;
84
89
struct lxc_list ipv6;
85
struct lxc_list route4;
86
struct lxc_list route6;
90
* Defines the kind of the network to use
91
* @type : the type of the network virtualization
92
* @phys : phys configuration type
93
* @veth : veth configuration type
94
* @macvlan : macvlan configuration type
98
struct lxc_list netdev;
113
* Defines the global container configuration
114
* @rootfs : the root directory to run the container
115
* @mount : the list of mount points
116
* @network : the network configuration
117
* @utsname : the container utsname
124
struct utsname *utsname;
125
struct lxc_list cgroup;
126
struct lxc_list networks;
130
104
* Defines a structure containing a pty information for
131
105
* virtualizing a tty
132
106
* @name : the path name of the slave pty side
128
* Defines the global container configuration
129
* @rootfs : the root directory to run the container
130
* @mount : the list of mount points
131
* @network : the network configuration
132
* @utsname : the container utsname
139
struct utsname *utsname;
140
struct lxc_list cgroup;
141
struct lxc_list network;
142
struct lxc_list mount_list;
143
struct lxc_tty_info tty_info;
144
char console[MAXPATHLEN];
154
148
* Initialize the lxc configuration structure
156
150
extern int lxc_conf_init(struct lxc_conf *conf);
159
* Configure the external resources for the container
161
extern int lxc_configure(const char *name, struct lxc_conf *conf);
164
* Remove the resources created by the configuration
166
extern int lxc_unconfigure(const char *name);
168
extern int conf_create_network(const char *name, pid_t pid);
170
extern int conf_destroy_network(const char *name);
172
extern int lxc_create_tty(const char *name, struct lxc_tty_info *tty_info);
152
extern int lxc_create_network(struct lxc_list *networks);
153
extern int lxc_assign_network(struct lxc_list *networks, pid_t pid);
155
extern int lxc_create_tty(const char *name, struct lxc_conf *conf);
173
156
extern void lxc_delete_tty(struct lxc_tty_info *tty_info);
176
159
* Configure the container from inside
178
extern int lxc_setup(const char *name, const char *tty,
179
const struct lxc_tty_info *tty_info);
164
extern int lxc_setup(const char *name, struct lxc_conf *lxc_conf);
181
166
extern int conf_has(const char *name, const char *info);