]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Add functions to set mode cfg identifier
authorClavister OpenSource <opensource@clavister.com>
Wed, 28 Dec 2011 23:05:04 +0000 (00:05 +0100)
committerClavister OpenSource <opensource@clavister.com>
Tue, 20 Mar 2012 16:31:32 +0000 (17:31 +0100)
src/libcharon/encoding/payloads/cp_payload.c [changed mode: 0644->0755]
src/libcharon/encoding/payloads/cp_payload.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index c8cffa3..40f6ae4
@@ -269,6 +269,17 @@ METHOD(cp_payload_t, get_config_type, config_type_t,
        return this->cfg_type;
 }
 
+METHOD(cp_payload_t, get_identifier, u_int16_t,
+                        private_cp_payload_t *this)
+{
+       return this->identifier;
+}
+METHOD(cp_payload_t, set_identifier, void,
+                        private_cp_payload_t *this, u_int16_t identifier)
+{
+       this->identifier = identifier;
+}
+
 METHOD2(payload_t, cp_payload_t, destroy, void,
        private_cp_payload_t *this)
 {
@@ -299,6 +310,8 @@ cp_payload_t *cp_payload_create_type(payload_type_t type, config_type_t cfg_type
                        .create_attribute_enumerator = _create_attribute_enumerator,
                        .add_attribute = _add_attribute,
                        .get_type = _get_config_type,
+                       .get_identifier = _get_identifier,
+                       .set_identifier = _set_identifier,
                        .destroy = _destroy,
                },
                .next_payload = NO_PAYLOAD,
old mode 100644 (file)
new mode 100755 (executable)
index 0e3cf53..5eb1e06
@@ -77,6 +77,20 @@ struct cp_payload_t {
         */
        config_type_t (*get_type) (cp_payload_t *this);
 
+       /**
+        * Set the configuration payload identifier (IKEv1 only).
+        *
+        @param identifier      identifier to set
+        */
+       void (*set_identifier) (cp_payload_t *this, u_int16_t identifier);
+
+       /**
+        * Get the configuration payload identifier (IKEv1 only).
+        *
+        * @return                      identifier
+        */
+       u_int16_t (*get_identifier) (cp_payload_t *this);
+
        /**
         * Destroys an cp_payload_t object.
         */