summaryrefslogtreecommitdiff
path: root/src/dumm/dumm.h
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-11-28 12:11:49 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-11-28 12:11:49 +0000
commit7b8b352039efd78338a7bf451a0550644ec8a8da (patch)
tree62e0548df49dfb3ddacc8cac4309fa10f7b42610 /src/dumm/dumm.h
parent9587b8e553eda7b1b6fd48c77ebe4592e1e3532a (diff)
downloadvyos-strongswan-7b8b352039efd78338a7bf451a0550644ec8a8da.tar.gz
vyos-strongswan-7b8b352039efd78338a7bf451a0550644ec8a8da.zip
New upstream version.
Diffstat (limited to 'src/dumm/dumm.h')
-rw-r--r--src/dumm/dumm.h41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/dumm/dumm.h b/src/dumm/dumm.h
index 54c3fbc03..4bd20808c 100644
--- a/src/dumm/dumm.h
+++ b/src/dumm/dumm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Tobias Brunner
+ * Copyright (C) 2008-2009 Tobias Brunner
* Copyright (C) 2007 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -83,12 +83,47 @@ struct dumm_t {
void (*delete_bridge) (dumm_t *this, bridge_t *bridge);
/**
+ * Add an overlay to all guests.
+ *
+ * Directories named after the guests are created, if they do not exist
+ * in the given overlay directory.
+ *
+ * If adding the overlay on at lest one guest fails, FALSE is returned and
+ * the overlay is again removed from all guests.
+ *
+ * @param dir dir to the overlay
+ * @return FALSE, on failure
+ */
+ bool (*add_overlay)(dumm_t *this, char *dir);
+
+ /**
+ * Removes an overlay from all guests.
+ *
+ * @param dir dir to the overlay
+ * @return FALSE, if the overlay was not found on any guest
+ */
+ bool (*del_overlay)(dumm_t *this, char *dir);
+
+ /**
+ * Remove the latest overlay from all guests.
+ *
+ * @return FALSE, if no overlay was found on any guest
+ */
+ bool (*pop_overlay)(dumm_t *this);
+
+ /**
* Loads a template, create a new one if it does not exist.
*
- * @param name dir to the template, NULL to close
+ * This is basically a wrapper around add/del_overlay to simplify working
+ * with overlays. Templates are located in a predefined directory, so that
+ * only a name for the template has to be specified here. Only one template
+ * can be loaded at any one time (but other overlays can be added on top or
+ * below a template).
+ *
+ * @param name name of the template to load, NULL to unload
* @return FALSE if load/create failed
*/
- bool (*load_template)(dumm_t *this, char *dir);
+ bool (*load_template)(dumm_t *this, char *name);
/**
* Create an enumerator over all available templates.