parse_methods.h File Reference

Method parser. More...

#include "../str.h"

Include dependency graph for parse_methods.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ALL_METHODS   (0xFFFFFFFF)

Functions

char * parse_method (char *start, char *end, unsigned int *method)
int parse_methods (str *_body, unsigned int *_methods)


Detailed Description

Method parser.

Definition in file parse_methods.h.


Define Documentation

#define ALL_METHODS   (0xFFFFFFFF)

Definition at line 34 of file parse_methods.h.

Referenced by dbrow2info(), and pack_ci().


Function Documentation

char* parse_method ( char *  start,
char *  end,
unsigned int *  method 
)

Parse comma separated list of methods pointed by _body and assign their enum bits to _methods.

Returns:
1 on success, 0 on failure.
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.
Returns:
pointer to next char if parse succeeded, NULL otherwise

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.

Returns:
0 on success, -1 on failure

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().


Generated on Thu May 24 00:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6