Implemented limited payload parsing for IKEv1 SA payloads
[strongswan.git] / src / libcharon / encoding / payloads / proposal_substructure.h
index d0ba1fd..86ccd5b 100644 (file)
@@ -37,9 +37,7 @@ typedef struct proposal_substructure_t proposal_substructure_t;
 #define PROPOSAL_SUBSTRUCTURE_HEADER_LENGTH 8
 
 /**
 #define PROPOSAL_SUBSTRUCTURE_HEADER_LENGTH 8
 
 /**
- * Class representing an IKEv2-PROPOSAL SUBSTRUCTURE.
- *
- * The PROPOSAL SUBSTRUCTURE format is described in RFC section 3.3.1.
+ * Class representing an IKEv1/IKEv2 proposal substructure.
  */
 struct proposal_substructure_t {
 
  */
 struct proposal_substructure_t {
 
@@ -126,17 +124,19 @@ struct proposal_substructure_t {
 /**
  * Creates an empty proposal_substructure_t object
  *
 /**
  * Creates an empty proposal_substructure_t object
  *
- * @return proposal_substructure_t object
+ * @param type         PROPOSAL_SUBSTRUCTURE or PROPOSAL_SUBSTRUCTURE_V1
+ * @return                     proposal_substructure_t object
  */
  */
-proposal_substructure_t *proposal_substructure_create(void);
+proposal_substructure_t *proposal_substructure_create(payload_type_t type);
 
 /**
  * Creates a proposal_substructure_t from a proposal_t.
  *
 
 /**
  * Creates a proposal_substructure_t from a proposal_t.
  *
+ * @param type         PROPOSAL_SUBSTRUCTURE or PROPOSAL_SUBSTRUCTURE_V1
  * @param proposal             proposal to build a substruct out of it
  * @return                             proposal_substructure_t object
  */
 proposal_substructure_t *proposal_substructure_create_from_proposal(
  * @param proposal             proposal to build a substruct out of it
  * @return                             proposal_substructure_t object
  */
 proposal_substructure_t *proposal_substructure_create_from_proposal(
-                                                                                                               proposal_t *proposal);
+                                                                       payload_type_t type, proposal_t *proposal);
 
 #endif /** PROPOSAL_SUBSTRUCTURE_H_ @}*/
 
 #endif /** PROPOSAL_SUBSTRUCTURE_H_ @}*/