diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-11-30 12:58:57 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-11-30 12:58:57 +0000 |
commit | f603933427d874a34e0627ffb2998bd2da8650cf (patch) | |
tree | 0e206071da5ef581f614ca9ca4b0693fc1b437a4 /Source/charon/encoding/parser.c | |
parent | bc7883029a873f00c307e4ebe4f6f7e3f6620978 (diff) | |
download | strongswan-f603933427d874a34e0627ffb2998bd2da8650cf.tar.bz2 strongswan-f603933427d874a34e0627ffb2998bd2da8650cf.tar.xz |
code of message_t cleaned and added more logs
Diffstat (limited to 'Source/charon/encoding/parser.c')
-rw-r--r-- | Source/charon/encoding/parser.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/charon/encoding/parser.c b/Source/charon/encoding/parser.c index e3fbd468b..59b38ee0b 100644 --- a/Source/charon/encoding/parser.c +++ b/Source/charon/encoding/parser.c @@ -904,6 +904,15 @@ static status_t parse_payload(private_parser_t *this, payload_type_t payload_typ } /** + * Implementation of parser_t.get_remaining_byte_count. + */ +static int get_remaining_byte_count (private_parser_t *this) +{ + int count = (this->input_roof - this->byte_pos); + return count; +} + +/** * Implementation of parser_t.reset_context. */ static void reset_context (private_parser_t *this) @@ -932,6 +941,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 = (void(*)(parser_t*)) reset_context; + this->public.get_remaining_byte_count = (int (*) (parser_t *))get_remaining_byte_count; this->public.destroy = (void(*)(parser_t*)) destroy; |