aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/payloads/fragment_payload.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-12-20 16:04:38 +0100
committerTobias Brunner <tobias@strongswan.org>2012-12-24 12:29:30 +0100
commit07df944c9c21539f686831fd27585caa12effe02 (patch)
tree8e52991e0e8fa55688d0904f343c10c0e41bec21 /src/libcharon/encoding/payloads/fragment_payload.h
parentc4daac2c0b99ac9851310a196305ce18a97fcc51 (diff)
downloadstrongswan-07df944c9c21539f686831fd27585caa12effe02.tar.bz2
strongswan-07df944c9c21539f686831fd27585caa12effe02.tar.xz
Add support to create IKE fragments
All fragments currently use the same fragment ID (1) as that's what other implementations are doing.
Diffstat (limited to 'src/libcharon/encoding/payloads/fragment_payload.h')
-rw-r--r--src/libcharon/encoding/payloads/fragment_payload.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libcharon/encoding/payloads/fragment_payload.h b/src/libcharon/encoding/payloads/fragment_payload.h
index 60358abb9..a49cf32dd 100644
--- a/src/libcharon/encoding/payloads/fragment_payload.h
+++ b/src/libcharon/encoding/payloads/fragment_payload.h
@@ -78,4 +78,17 @@ struct fragment_payload_t {
*/
fragment_payload_t *fragment_payload_create();
+/**
+ * Creates a fragment payload from the given data. All fragments currently
+ * have the same fragment ID (1), which seems what other implementations are
+ * doing.
+ *
+ * @param num fragment number (first one should be 1)
+ * @param last TRUE to indicate that this is the last fragment
+ * @param data fragment data (gets cloned)
+ * @return fragment_payload_t object
+ */
+fragment_payload_t *fragment_payload_create_from_data(u_int8_t num, bool last,
+ chunk_t data);
+
#endif /** FRAGMENT_PAYLOAD_H_ @}*/