return NULL;
}
+METHOD(id_payload_t, get_encoded, chunk_t,
+ private_id_payload_t *this)
+{
+ u_int16_t port = htons(this->port);
+ return chunk_cat("cccc", chunk_from_thing(this->id_type),
+ chunk_from_thing(this->protocol_id),
+ chunk_from_thing(port), this->id_data);
+}
+
METHOD2(payload_t, id_payload_t, destroy, void,
private_id_payload_t *this)
{
.destroy = _destroy,
},
.get_identification = _get_identification,
+ .get_encoded = _get_encoded,
.get_ts = _get_ts,
.destroy = _destroy,
},
*/
traffic_selector_t* (*get_ts)(id_payload_t *this);
+ /**
+ * Get encoded payload without fixed payload header (used for IKEv1).
+ *
+ * @return encoded payload (gets allocated)
+ */
+ chunk_t (*get_encoded)(id_payload_t *this);
+
/**
* Destroys an id_payload_t object.
*/