monitor.h revision f2363e38d07db2ad4796b5580b95e3665ed34a88
1516N/A/*
581N/A * lxc: linux Container library
581N/A *
581N/A * (C) Copyright IBM Corp. 2007, 2008
581N/A *
581N/A * Authors:
581N/A * Daniel Lezcano <daniel.lezcano at free.fr>
581N/A *
581N/A * This library is free software; you can redistribute it and/or
581N/A * modify it under the terms of the GNU Lesser General Public
581N/A * License as published by the Free Software Foundation; either
581N/A * version 2.1 of the License, or (at your option) any later version.
581N/A *
581N/A * This library is distributed in the hope that it will be useful,
581N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of
581N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
581N/A * Lesser General Public License for more details.
581N/A *
581N/A * You should have received a copy of the GNU Lesser General Public
581N/A * License along with this library; if not, write to the Free Software
581N/A * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
581N/A */
1899N/A#ifndef __monitor_h
3158N/A#define __monitor_h
1899N/A
581N/A#include <sys/param.h>
581N/A#include <sys/un.h>
581N/A
817N/A#include "conf.h"
1715N/A
581N/Atypedef enum {
3130N/A lxc_msg_state,
742N/A lxc_msg_priority,
581N/A} lxc_msg_type_t;
581N/A
817N/Astruct lxc_msg {
1020N/A lxc_msg_type_t type;
1117N/A char name[NAME_MAX+1];
738N/A int value;
742N/A};
1117N/A
581N/Aextern int lxc_monitor_open(const char *lxcpath);
2028N/Aextern int lxc_monitor_sock_name(const char *lxcpath, struct sockaddr_un *addr);
1507N/Aextern int lxc_monitor_fifo_name(const char *lxcpath, char *fifo_path,
1507N/A size_t fifo_path_sz, int do_mkdirp);
3130N/Aextern void lxc_monitor_send_state(const char *name, lxc_state_t state,
1507N/A const char *lxcpath);
1968N/Aextern int lxc_monitord_spawn(const char *lxcpath);
1507N/A
2992N/A#endif
2992N/A