]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
task: Add optional post_process() method
authorTobias Brunner <tobias@strongswan.org>
Thu, 22 Aug 2019 12:22:48 +0000 (14:22 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 29 Jun 2022 08:28:50 +0000 (10:28 +0200)
This will allows tasks to do some work after a message has been
processed.

src/libcharon/sa/task.h

index b356ec0671a12f112b2ab34b02a7e2bf69b95c64..cc53e442549019b7370e5dc17dc83f6c586a8837 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2018 Tobias Brunner
+ * Copyright (C) 2007-2019 Tobias Brunner
  * Copyright (C) 2006 Martin Willi
  *
  * Copyright (C) secunet Security Networks AG
@@ -184,6 +184,18 @@ struct task_t {
         */
        status_t (*pre_process) (task_t *this, message_t *message);
 
+       /**
+        * Called after a message has been processed (optional to implement).
+        *
+        * @param message               processed message
+        * @return
+        *                                              - SUCCESS if task completed
+        *                                              - NEED_MORE if another call to build/process needed
+        *                                              - Anything else will result in the destruction of
+        *                                                the IKE_SA
+        */
+       status_t (*post_process) (task_t *this, message_t *message);
+
        /**
         * Get the type of the task implementation.
         */