summaryrefslogtreecommitdiff
path: root/src/libcharon/encoding/message.h
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
commit568905f488e63e28778f87ac0e38d845f45bae79 (patch)
treed9969a147e36413583ff4bc75542d34c955f8823 /src/libcharon/encoding/message.h
parentf73fba54dc8b30c6482e1e8abf15bbf455592fcd (diff)
downloadvyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.tar.gz
vyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.zip
Imported Upstream version 4.5.1
Diffstat (limited to 'src/libcharon/encoding/message.h')
-rw-r--r--src/libcharon/encoding/message.h41
1 files changed, 39 insertions, 2 deletions
diff --git a/src/libcharon/encoding/message.h b/src/libcharon/encoding/message.h
index 8c1cbcd09..51197308c 100644
--- a/src/libcharon/encoding/message.h
+++ b/src/libcharon/encoding/message.h
@@ -154,6 +154,26 @@ struct message_t {
bool (*get_request) (message_t *this);
/**
+ * Set the version flag in the IKE header.
+ */
+ void (*set_version_flag)(message_t *this);
+
+ /**
+ * Get a reserved bit in the IKE header.
+ *
+ * @param nr reserved bit to get in IKE header, 0-4
+ * @return TRUE if bit is set
+ */
+ bool (*get_reserved_header_bit)(message_t *this, u_int nr);
+
+ /**
+ * Set a reserved bit in the IKE header.
+ *
+ * @param nr reserved bit to set in IKE header, 0-4
+ */
+ void (*set_reserved_header_bit)(message_t *this, u_int nr);
+
+ /**
* Append a payload to the message.
*
* If the payload must be encrypted is not specified here. Encryption
@@ -181,6 +201,11 @@ struct message_t {
chunk_t data);
/**
+ * Disable automatic payload sorting for this message.
+ */
+ void (*disable_sort)(message_t *this);
+
+ /**
* Parses header of message.
*
* Begins parisng of a message created via message_create_from_packet().
@@ -206,8 +231,6 @@ struct message_t {
* @param aead aead transform to verify/decrypt message
* @return
* - SUCCESS if parsing successful
- * - NOT_SUPPORTED if ciritcal unknown payloads found
- * - NOT_SUPPORTED if message type is not supported!
* - PARSE_ERROR if message parsing failed
* - VERIFY_ERROR if message verification failed (bad syntax)
* - FAILED if integrity check failed
@@ -235,6 +258,13 @@ struct message_t {
status_t (*generate) (message_t *this, aead_t *aead, packet_t **packet);
/**
+ * Check if the message has already been encoded using generate().
+ *
+ * @return TRUE if message has been encoded
+ */
+ bool (*is_encoded)(message_t *this);
+
+ /**
* Gets the source host informations.
*
* @warning Returned host_t object is not getting cloned,
@@ -282,6 +312,13 @@ struct message_t {
enumerator_t * (*create_payload_enumerator) (message_t *this);
/**
+ * Remove the payload at the current enumerator position.
+ *
+ * @param enumerator enumerator created by create_payload_enumerator()
+ */
+ void (*remove_payload_at)(message_t *this, enumerator_t *enumerator);
+
+ /**
* Find a payload of a specific type.
*
* Returns the first occurance.