00001 #ifndef ICD_SCRIPT_H 00002 #define ICD_SCRIPT_H 00003 00012 #include <sys/types.h> 00013 #include <unistd.h> 00014 #include <glib.h> 00015 00016 #include "icd_iap.h" 00017 00027 typedef void (*icd_script_cb_fn) (const pid_t pid, const gint exit_value, 00028 gpointer user_data); 00029 00035 gboolean icd_script_notify_pid (const pid_t pid, const gint exit_value); 00036 00040 void icd_script_cancel (const pid_t pid); 00041 00051 pid_t icd_script_pre_up (const gchar *iap_id, 00052 const gchar *iap_type, 00053 const struct icd_iap_env *env, 00054 icd_script_cb_fn cb, 00055 gpointer user_data); 00056 00067 pid_t icd_script_post_up (const gchar *iface, 00068 const gchar *iap_id, 00069 const gchar *iap_type, 00070 const struct icd_iap_env *env, 00071 icd_script_cb_fn cb, 00072 gpointer user_data); 00073 00085 pid_t icd_script_pre_down (const gchar *iface, 00086 const gchar *iap_id, 00087 const gchar *iap_type, 00088 const gboolean remove_proxies, 00089 const struct icd_iap_env *env, 00090 icd_script_cb_fn cb, 00091 gpointer user_data); 00092 00103 pid_t icd_script_post_down (const gchar *iface, 00104 const gchar *iap_id, 00105 const gchar *iap_type, 00106 const struct icd_iap_env *env, 00107 icd_script_cb_fn cb, 00108 gpointer user_data); 00109 00110 void icd_script_add_env_vars (struct icd_iap *iap, gchar **env_vars); 00111 00114 #endif