Searched defs:handler (Results 1 - 12 of 12) sorted by relevance

/lxc/src/lxc/
H A Drtnl.c35 extern int rtnetlink_open(struct rtnl_handler *handler) argument
37 return netlink_open(&handler->nlh, NETLINK_ROUTE);
40 extern int rtnetlink_close(struct rtnl_handler *handler) argument
42 return netlink_close(&handler->nlh);
45 extern int rtnetlink_rcv(struct rtnl_handler *handler, struct rtnlmsg *rtnlmsg) argument
47 return netlink_rcv(&handler->nlh, (struct nlmsg *)&rtnlmsg->nlmsghdr);
50 extern int rtnetlink_send(struct rtnl_handler *handler, struct rtnlmsg *rtnlmsg) argument
53 return netlink_send(&handler->nlh, (struct nlmsg *)&rtnlmsg->nlmsghdr);
56 extern int rtnetlink_transaction(struct rtnl_handler *handler, argument
59 return netlink_transaction(&handler
[all...]
H A Dexecute.c42 static int execute_start(struct lxc_handler *handler, void* data) argument
55 if (!handler->conf->rootfs.path) {
73 if (!handler->conf->rootfs.path) {
75 argv[i++] = (char *)handler->name;
77 argv[i++] = (char *)handler->lxcpath;
101 static int execute_post_start(struct lxc_handler *handler, void* data) argument
104 NOTICE("'%s' started with pid '%d'", my_args->argv[0], handler->pid);
H A Dsync.c87 int lxc_sync_barrier_parent(struct lxc_handler *handler, int sequence) argument
89 return __sync_barrier(handler->sv[0], sequence);
92 int lxc_sync_barrier_child(struct lxc_handler *handler, int sequence) argument
94 return __sync_barrier(handler->sv[1], sequence);
97 int lxc_sync_wake_parent(struct lxc_handler *handler, int sequence) argument
99 return __sync_wake(handler->sv[0], sequence);
102 int lxc_sync_wait_parent(struct lxc_handler *handler, int sequence) argument
104 return __sync_wait(handler->sv[0], sequence);
107 int lxc_sync_wait_child(struct lxc_handler *handler, int sequence) argument
109 return __sync_wait(handler
112 lxc_sync_wake_child(struct lxc_handler *handler, int sequence) argument
117 lxc_sync_init(struct lxc_handler *handler) argument
133 lxc_sync_fini_child(struct lxc_handler *handler) argument
141 lxc_sync_fini_parent(struct lxc_handler *handler) argument
149 lxc_sync_fini(struct lxc_handler *handler) argument
[all...]
H A Dgenl.c37 struct nl_handler handler; local
61 ret = netlink_open(&handler, NETLINK_GENERIC);
70 ret = netlink_transaction(&handler, (struct nlmsg *)&request->nlmsghdr,
99 netlink_close(&handler);
106 extern int genetlink_open(struct genl_handler *handler, const char *family) argument
109 handler->family = genetlink_resolve_family(family);
110 if (handler->family < 0)
111 return handler->family;
113 ret = netlink_open(&handler->nlh, NETLINK_GENERIC);
118 extern int genetlink_close(struct genl_handler *handler) argument
123 genetlink_rcv(struct genl_handler *handler, struct genlmsg *genlmsg) argument
128 genetlink_send(struct genl_handler *handler, struct genlmsg *genlmsg) argument
134 genetlink_transaction(struct genl_handler *handler, struct genlmsg *request, struct genlmsg *answer) argument
[all...]
H A Dmainloop.c44 struct mainloop_handler *handler; local
57 handler =
60 /* If the handler returns a positive value, exit
62 if (handler->callback(handler->fd, events[i].events,
63 handler->data, descr) > 0)
79 struct mainloop_handler *handler; local
82 handler = malloc(sizeof(*handler));
83 if (!handler)
111 struct mainloop_handler *handler; local
[all...]
H A Dlxcutmp.c129 struct lxc_handler *handler; member in struct:lxc_utmp
142 static int utmp_get_ntasks(struct lxc_handler *handler);
248 struct lxc_handler *handler = utmp_data->handler; local
251 handler->pid) > MAXPATHLEN) {
260 handler->pid) > MAXPATHLEN) {
279 DEBUG("utmp handler - run level is %c/%c",
290 static int utmp_get_ntasks(struct lxc_handler *handler) argument
294 ntasks = cgroup_nrtasks(handler);
307 struct lxc_handler *handler)
306 lxc_utmp_mainloop_add(struct lxc_epoll_descr *descr, struct lxc_handler *handler) argument
399 struct lxc_handler *handler = utmp_data->handler; local
[all...]
H A Dnl.c173 extern int netlink_rcv(struct nl_handler *handler, struct nlmsg *answer) argument
195 ret = recvmsg(handler->fd, &msg, 0);
212 extern int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg) argument
232 ret = sendmsg(handler->fd, &msg, 0);
242 extern int netlink_transaction(struct nl_handler *handler, argument
247 ret = netlink_send(handler, request);
251 ret = netlink_rcv(handler, answer);
263 extern int netlink_open(struct nl_handler *handler, int protocol) argument
270 memset(handler, 0, sizeof(*handler));
317 netlink_close(struct nl_handler *handler) argument
[all...]
H A Dcommands.c403 struct lxc_handler *handler)
405 struct lxc_cmd_rsp rsp = { .data = INT_TO_PTR(handler->pid) };
433 struct lxc_handler *handler)
435 struct lxc_cmd_rsp rsp = { .data = INT_TO_PTR(handler->clone_flags) };
483 struct lxc_handler *handler)
491 path = cgroup_get_cgroup(handler, req->data);
532 struct lxc_handler *handler)
539 cilen = lxc_get_config_item(handler->conf, req->data, NULL, 0);
544 if (lxc_get_config_item(handler->conf, req->data, cidata, cilen + 1) != cilen)
591 struct lxc_handler *handler)
402 lxc_cmd_get_init_pid_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
432 lxc_cmd_get_clone_flags_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
482 lxc_cmd_get_cgroup_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
531 lxc_cmd_get_config_item_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
590 lxc_cmd_get_state_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
636 lxc_cmd_stop_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
683 lxc_cmd_console_winch_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
742 lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
794 lxc_cmd_get_name_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
832 lxc_cmd_get_lxcpath_callback(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
846 lxc_cmd_process(int fd, struct lxc_cmd_req *req, struct lxc_handler *handler) argument
871 lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler, struct lxc_epoll_descr *descr) argument
884 struct lxc_handler *handler = data; local
980 lxc_cmd_init(const char *name, struct lxc_handler *handler, const char *lxcpath) argument
1016 lxc_cmd_mainloop_add(const char *name, struct lxc_epoll_descr *descr, struct lxc_handler *handler) argument
[all...]
H A Dcriu.c81 struct lxc_handler *handler; member in struct:criu_opts
275 * the handler the restore task created.
286 p = cgroup_get_cgroup(opts->handler, controllers[0]);
782 struct lxc_handler *handler; local
799 handler = lxc_init(c->name, c->lxc_conf, c->config_path);
800 if (!handler)
803 if (!cgroup_init(handler)) {
808 if (!cgroup_create(handler)) {
818 resolve_clone_flags(handler);
871 os.handler
[all...]
H A Dstart.c82 static void lxc_destroy_container_on_signal(struct lxc_handler *handler,
273 DEBUG("Set SIGCHLD handler with file descriptor: %d.", fd);
330 int lxc_set_state(const char *name, struct lxc_handler *handler, lxc_state_t state) argument
332 handler->state = state;
333 lxc_monitor_send_state(name, state, handler->lxcpath);
337 int lxc_poll(const char *name, struct lxc_handler *handler) argument
339 int sigfd = handler->sigfd;
340 int pid = handler->pid;
349 ERROR("Failed to add signal handler with file descriptor %d to LXC mainloop.", sigfd);
353 if (lxc_console_mainloop_add(&descr, handler
388 struct lxc_handler *handler; local
495 lxc_fini(const char *name, struct lxc_handler *handler) argument
576 lxc_abort(const char *name, struct lxc_handler *handler) argument
705 struct lxc_handler *handler = data; local
997 recv_ttys_from_child(struct lxc_handler *handler) argument
1024 resolve_clone_flags(struct lxc_handler *handler) argument
1056 lxc_spawn(struct lxc_handler *handler) argument
1303 struct lxc_handler *handler; local
1432 start(struct lxc_handler *handler, void* data) argument
1443 post_start(struct lxc_handler *handler, void* data) argument
1467 lxc_destroy_container_on_signal(struct lxc_handler *handler, const char *name) argument
[all...]
H A Dconf.c644 static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_handler *handler) argument
763 if (!cgroup_mount(conf->rootfs.path ? conf->rootfs.mount : "", handler, cg_flags)) {
2641 static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2650 if (handler->conf->reboot)
2725 err = lxc_bridge_attach(handler->lxcpath, handler->name, netdev->link, veth1);
2741 err = run_script(handler->name, "net", netdev->upscript, "up",
2760 static int shutdown_veth(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2771 err = run_script(handler->name, "net", netdev->downscript,
2779 static int instantiate_macvlan(struct lxc_handler *handler, struc argument
2830 shutdown_macvlan(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2845 instantiate_vlan(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2897 shutdown_vlan(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2902 instantiate_phys(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2926 shutdown_phys(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2939 instantiate_none(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2945 instantiate_empty(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2958 shutdown_empty(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2971 shutdown_none(struct lxc_handler *handler, struct lxc_netdev *netdev) argument
2976 lxc_requests_empty_network(struct lxc_handler *handler) argument
3000 lxc_create_network(struct lxc_handler *handler) argument
3030 lxc_delete_network(struct lxc_handler *handler) argument
3489 lxc_find_gateway_addresses(struct lxc_handler *handler) argument
3937 send_ttys_to_parent(struct lxc_handler *handler) argument
3966 lxc_setup(struct lxc_handler *handler) argument
[all...]
/lxc/src/lxc/cgroups/
H A Dcgroup.c60 bool cgroup_init(struct lxc_handler *handler) argument
62 if (handler->cgroup_data) {
63 ERROR("cgroup_init called on already inited handler");
68 INFO("cgroup driver %s initing for %s", ops->name, handler->name);
69 handler->cgroup_data = ops->init(handler->name);
71 return handler->cgroup_data != NULL;
74 void cgroup_destroy(struct lxc_handler *handler) argument
77 ops->destroy(handler->cgroup_data, handler
83 cgroup_create(struct lxc_handler *handler) argument
94 cgroup_enter(struct lxc_handler *handler) argument
101 cgroup_create_legacy(struct lxc_handler *handler) argument
108 cgroup_get_cgroup(struct lxc_handler *handler, const char *subsystem) argument
115 cgroup_escape(struct lxc_handler *handler) argument
138 cgroup_unfreeze(struct lxc_handler *handler) argument
145 cgroup_setup_limits(struct lxc_handler *handler, bool with_devices) argument
153 cgroup_chown(struct lxc_handler *handler) argument
160 cgroup_mount(const char *root, struct lxc_handler *handler, int type) argument
168 cgroup_nrtasks(struct lxc_handler *handler) argument
[all...]

Completed in 49 milliseconds