aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/collections/array.h
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2015-12-07 10:29:57 +0100
committerMartin Willi <martin@strongswan.org>2015-12-07 10:29:57 +0100
commitbb723f97c746c1412c9fd81536bf6520fd6ec79f (patch)
tree67e583fbf35dda7bb7c12e0562e16ab20c833b7f /src/libstrongswan/collections/array.h
parent84a3077e780e7b25bf536da42a583bdc18448362 (diff)
parent1a8a420c1c1be781c5c5aa2d7d95599d2fbd35e8 (diff)
downloadstrongswan-bb723f97c746c1412c9fd81536bf6520fd6ec79f.tar.bz2
strongswan-bb723f97c746c1412c9fd81536bf6520fd6ec79f.tar.xz
Merge branch 'vici-undo-on-unload'
Undo start actions when unloading connections, and add some misc fixes and extensions to vici connection handling.
Diffstat (limited to 'src/libstrongswan/collections/array.h')
-rw-r--r--src/libstrongswan/collections/array.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libstrongswan/collections/array.h b/src/libstrongswan/collections/array.h
index 0659c70bd..c3be1a15d 100644
--- a/src/libstrongswan/collections/array.h
+++ b/src/libstrongswan/collections/array.h
@@ -139,6 +139,21 @@ void array_insert(array_t *array, int idx, void *data);
void array_insert_create(array_t **array, int idx, void *ptr);
/**
+ * Create a value based array if it does not exist, insert value.
+ *
+ * This is a convenience function to insert a value and implicitly
+ * create a value based array if array is NULL. Array is set the the newly
+ * created array, if any.
+ *
+ * @param array pointer to array reference, potentially NULL
+ * @param esize element size of this array
+ * @param idx index to insert item at
+ * @param val pointer to value to insert
+ */
+void array_insert_create_value(array_t **array, u_int esize,
+ int idx, void *val);
+
+/**
* Insert all items from an enumerator to an array.
*
* @param array array to add items to