aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/payloads/fragment_payload.h
diff options
context:
space:
mode:
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_ @}*/