#include <strings.h>
#include "../dprint.h"
#include "../trim.h"
#include "../core_stats.h"
#include "parse_methods.h"
#include "msg_parser.h"

Go to the source code of this file.
Functions | |
| static int | method_char (char _c) |
| char * | parse_method (char *start, char *end, unsigned int *method) |
| int | parse_methods (str *_body, unsigned int *_methods) |
Definition in file parse_methods.c.
| static int method_char | ( | char | _c | ) | [inline, static] |
Check if argument is valid RFC3261 token character.
Definition at line 46 of file parse_methods.c.
Referenced by parse_method().
| char* parse_method | ( | char * | start, | |
| char * | end, | |||
| unsigned int * | method | |||
| ) |
Parse a method pointed by start, end is the last character to check (if NULL assume that start is a zero terminated string) => assign enum bit to method.
Definition at line 62 of file parse_methods.c.
References len, LM_ERR, max, METHOD_ACK, METHOD_BYE, METHOD_CANCEL, method_char(), METHOD_INFO, METHOD_INVITE, METHOD_MESSAGE, METHOD_NOTIFY, METHOD_OPTIONS, METHOD_OTHER, METHOD_PRACK, METHOD_PUBLISH, METHOD_REFER, METHOD_REGISTER, METHOD_SUBSCRIBE, METHOD_UNDEF, METHOD_UPDATE, NULL, and update_stat.
Referenced by parse_cseq(), parse_first_line(), and parse_methods().
| int parse_methods | ( | str * | _body, | |
| unsigned int * | _methods | |||
| ) |
Parse comma separated list of methods pointed by _body and assign their enum bits to _methods.
Definition at line 351 of file parse_methods.c.
References _str::len, LM_DBG, LM_ERR, sip_uri::method, NULL, parse_method(), _str::s, and trim_leading().
Referenced by check_message_support(), encode_header(), fixup_method(), pack_ci(), and parse_allow().
1.5.6