- parser succesfully parses sa payload
This commit is contained in:
@@ -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,
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user