1 |
/* |
/* |
2 |
* Cisco 7200 (Predator) simulation platform. |
* Cisco router simulation platform. |
3 |
* Copyright (c) 2006 Christophe Fillot (cf@utc.fr) |
* Copyright (c) 2006 Christophe Fillot (cf@utc.fr) |
4 |
* |
* |
5 |
* Mini-parser. |
* Mini-parser. |
84 |
} |
} |
85 |
|
|
86 |
/* Add a character to temporary token (resize if necessary) */ |
/* Add a character to temporary token (resize if necessary) */ |
87 |
static int tmp_token_add_char(parser_context_t *ctx,u_char c) |
static int tmp_token_add_char(parser_context_t *ctx,char c) |
88 |
{ |
{ |
89 |
size_t new_size; |
size_t new_size; |
90 |
char *new_str; |
char *new_str; |
196 |
} |
} |
197 |
|
|
198 |
/* Send a buffer to the tokenizer */ |
/* Send a buffer to the tokenizer */ |
199 |
int parser_scan_buffer(parser_context_t *ctx,u_char *buf,size_t buf_size) |
int parser_scan_buffer(parser_context_t *ctx,char *buf,size_t buf_size) |
200 |
{ |
{ |
201 |
int i,type; |
int i,type; |
202 |
u_char c; |
u_char c; |