summaryrefslogtreecommitdiff
path: root/src/libcharon/sa/trap_manager.h
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2018-06-04 09:59:21 +0200
committerYves-Alexis Perez <corsac@debian.org>2018-06-04 09:59:21 +0200
commit51a71ee15c1bcf0e82f363a16898f571e211f9c3 (patch)
tree2a03e117d072c55cfe2863d26b73e64d933e7ad8 /src/libcharon/sa/trap_manager.h
parent7793611ee71b576dd9c66dee327349fa64e38740 (diff)
downloadvyos-strongswan-51a71ee15c1bcf0e82f363a16898f571e211f9c3.tar.gz
vyos-strongswan-51a71ee15c1bcf0e82f363a16898f571e211f9c3.zip
New upstream version 5.6.3
Diffstat (limited to 'src/libcharon/sa/trap_manager.h')
-rw-r--r--src/libcharon/sa/trap_manager.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/libcharon/sa/trap_manager.h b/src/libcharon/sa/trap_manager.h
index 083ea3dbf..1b67ff82f 100644
--- a/src/libcharon/sa/trap_manager.h
+++ b/src/libcharon/sa/trap_manager.h
@@ -1,6 +1,7 @@
/*
+ * Copyright (C) 2013-2017 Tobias Brunner
* Copyright (C) 2009 Martin Willi
- * Hochschule fuer Technik Rapperswil
+ * HSR Hochschule fuer Technik Rapperswil
*
* 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
@@ -37,19 +38,21 @@ struct trap_manager_t {
*
* @param peer peer configuration to initiate on trap
* @param child child configuration to install as a trap
- * @param reqid optional reqid to use
- * @return reqid of installed CHILD_SA, 0 if failed
+ * @return TRUE if successfully installed
*/
- uint32_t (*install)(trap_manager_t *this, peer_cfg_t *peer,
- child_cfg_t *child, uint32_t reqid);
+ bool (*install)(trap_manager_t *this, peer_cfg_t *peer, child_cfg_t *child);
/**
* Uninstall a trap policy.
*
- * @param id reqid of CHILD_SA to uninstall, returned by install()
+ * If no peer configuration name is given the first matching child
+ * configuration is uninstalled.
+ *
+ * @param peer peer configuration name or NULL
+ * @param child child configuration name
* @return TRUE if uninstalled successfully
*/
- bool (*uninstall)(trap_manager_t *this, uint32_t reqid);
+ bool (*uninstall)(trap_manager_t *this, char *peer, char *child);
/**
* Create an enumerator over all installed traps.
@@ -59,14 +62,6 @@ struct trap_manager_t {
enumerator_t* (*create_enumerator)(trap_manager_t *this);
/**
- * Find the reqid of a child config installed as a trap.
- *
- * @param child CHILD_SA config to get the reqid for
- * @return reqid of trap, 0 if not found
- */
- uint32_t (*find_reqid)(trap_manager_t *this, child_cfg_t *child);
-
- /**
* Acquire an SA triggered by an installed trap.
*
* @param reqid requid of the triggering CHILD_SA