- parser succesfully parses sa payload

This commit is contained in:
Martin Willi
2005-11-14 17:29:22 +00:00
parent a14dffd1cc
commit 6c55be346a
6 changed files with 501 additions and 171 deletions
+2 -2
View File
@@ -174,11 +174,11 @@ enum encoding_type_e{
*
* When generating it must be changed from host to network order.
* The value is read from the associated data struct.
* The current write position is moved 32 bit forward afterwards.
* The current write position is moved 8 bit forward afterwards.
*
* When parsing it must be changed from network to host order.
* The value is written to the associated data struct.
* The current read pointer is moved 32 bit forward afterwards.
* The current read pointer is moved 8 bit forward afterwards.
*/
SPI_SIZE,
/**
+9
View File
@@ -25,6 +25,7 @@
#include "payload.h"
#include "ike_header.h"
#include "sa_payload.h"
@@ -67,6 +68,14 @@ payload_t *payload_create(payload_type_t type)
{
case HEADER:
return (payload_t*)ike_header_create();
case SECURITY_ASSOCIATION:
return (payload_t*)sa_payload_create();
case PROPOSAL_SUBSTRUCTURE:
return (payload_t*)proposal_substructure_create();
case TRANSFORM_SUBSTRUCTURE:
return (payload_t*)transform_substructure_create();
case TRANSFORM_ATTRIBUTE:
return (payload_t*)transform_attribute_create();
default:
return NULL;
}