2008-11-03 04:22:46 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
2008-04-27 14:30:06 +00:00
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
2008-06-26 18:31:52 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2008-04-27 14:30:06 +00:00
|
|
|
*
|
2012-06-05 16:09:05 +00:00
|
|
|
* Copyright (C) 2008 - 2012 Red Hat, Inc.
|
2008-04-27 14:30:06 +00:00
|
|
|
*/
|
|
|
|
|
2014-06-15 08:05:28 +00:00
|
|
|
#define NMD_SCRIPT_DIR_DEFAULT NMCONFDIR "/dispatcher.d"
|
|
|
|
#define NMD_SCRIPT_DIR_PRE_UP NMD_SCRIPT_DIR_DEFAULT "/pre-up.d"
|
|
|
|
#define NMD_SCRIPT_DIR_PRE_DOWN NMD_SCRIPT_DIR_DEFAULT "/pre-down.d"
|
2015-07-14 16:17:33 +00:00
|
|
|
#define NMD_SCRIPT_DIR_NO_WAIT NMD_SCRIPT_DIR_DEFAULT "/no-wait.d"
|
2014-05-14 20:50:33 +00:00
|
|
|
|
2014-07-25 21:10:22 +00:00
|
|
|
#define NM_DISPATCHER_DBUS_SERVICE "org.freedesktop.nm_dispatcher"
|
|
|
|
#define NM_DISPATCHER_DBUS_INTERFACE "org.freedesktop.nm_dispatcher"
|
|
|
|
#define NM_DISPATCHER_DBUS_PATH "/org/freedesktop/nm_dispatcher"
|
2008-04-27 14:30:06 +00:00
|
|
|
|
|
|
|
#define NMD_CONNECTION_PROPS_PATH "path"
|
2014-12-16 19:08:38 +00:00
|
|
|
#define NMD_CONNECTION_PROPS_FILENAME "filename"
|
2014-12-18 14:13:57 +00:00
|
|
|
#define NMD_CONNECTION_PROPS_EXTERNAL "external"
|
2008-04-27 14:30:06 +00:00
|
|
|
|
|
|
|
#define NMD_DEVICE_PROPS_INTERFACE "interface"
|
|
|
|
#define NMD_DEVICE_PROPS_IP_INTERFACE "ip-interface"
|
|
|
|
#define NMD_DEVICE_PROPS_TYPE "type"
|
|
|
|
#define NMD_DEVICE_PROPS_STATE "state"
|
|
|
|
#define NMD_DEVICE_PROPS_PATH "path"
|
|
|
|
|
2014-06-02 19:07:46 +00:00
|
|
|
/* Actions */
|
|
|
|
#define NMD_ACTION_HOSTNAME "hostname"
|
|
|
|
#define NMD_ACTION_PRE_UP "pre-up"
|
|
|
|
#define NMD_ACTION_UP "up"
|
|
|
|
#define NMD_ACTION_PRE_DOWN "pre-down"
|
|
|
|
#define NMD_ACTION_DOWN "down"
|
|
|
|
#define NMD_ACTION_VPN_PRE_UP "vpn-pre-up"
|
|
|
|
#define NMD_ACTION_VPN_UP "vpn-up"
|
|
|
|
#define NMD_ACTION_VPN_PRE_DOWN "vpn-pre-down"
|
|
|
|
#define NMD_ACTION_VPN_DOWN "vpn-down"
|
|
|
|
#define NMD_ACTION_DHCP4_CHANGE "dhcp4-change"
|
|
|
|
#define NMD_ACTION_DHCP6_CHANGE "dhcp6-change"
|
2016-07-19 15:05:35 +00:00
|
|
|
#define NMD_ACTION_CONNECTIVITY_CHANGE "connectivity-change"
|
2014-06-02 19:07:46 +00:00
|
|
|
|
2012-06-05 16:09:05 +00:00
|
|
|
typedef enum {
|
|
|
|
DISPATCH_RESULT_UNKNOWN = 0,
|
|
|
|
DISPATCH_RESULT_SUCCESS = 1,
|
|
|
|
DISPATCH_RESULT_EXEC_FAILED = 2,
|
|
|
|
DISPATCH_RESULT_FAILED = 3,
|
|
|
|
DISPATCH_RESULT_TIMEOUT = 4,
|
|
|
|
} DispatchResult;
|
|
|
|
|