aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/charon/parser.c')
-rw-r--r--Source/charon/parser.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/charon/parser.c b/Source/charon/parser.c
index a1be3a833..c30092302 100644
--- a/Source/charon/parser.c
+++ b/Source/charon/parser.c
@@ -778,6 +778,16 @@ static status_t parse_payload(private_parser_t *this, payload_type_t payload_typ
}
/**
+ * implementation of parser_t.reset_context
+ */
+static status_t reset_context (private_parser_t *this)
+{
+ this->byte_pos = this->input;
+ this->bit_pos = 0;
+ return SUCCESS;
+}
+
+/**
* implementation of parser_t.destroy
*/
static status_t destroy(private_parser_t *this)
@@ -811,6 +821,7 @@ parser_t *parser_create(chunk_t data)
}
this->public.parse_payload = (status_t(*)(parser_t*,payload_type_t,payload_t**)) parse_payload;
+ this->public.reset_context = (status_t(*)(parser_t*)) reset_context;
this->public.destroy = (status_t(*)(parser_t*)) destroy;