parse_sst.h File Reference

SST parser. More...

#include "msg_parser.h"
#include "hf.h"

Include dependency graph for parse_sst.h:

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

Go to the source code of this file.

Data Structures

struct  session_expires

Defines

#define PARSE_SST_H   1

Enumerations

enum  parse_sst_result {
  parse_sst_success, parse_sst_header_not_found, parse_sst_no_value, parse_sst_out_of_mem,
  parse_sst_parse_error
}
enum  sst_refresher { sst_refresher_unspecified, sst_refresher_uac, sst_refresher_uas }

Functions

void free_session_expires (struct session_expires *)
struct session_expiresmalloc_session_expires (void)
enum parse_sst_result parse_min_se (struct sip_msg *msg, unsigned *min_se)
 Parses the (should be only one instance) single instance of the "Min-SE" header in the msg.
enum parse_sst_result parse_session_expires (struct sip_msg *msg, struct session_expires *se)
 Parses the (should be only one instance) single instance of the "Session-Expires" or "x" header in the msg.


Detailed Description

SST parser.

Definition in file parse_sst.h.


Define Documentation

#define PARSE_SST_H   1

Definition at line 34 of file parse_sst.h.


Enumeration Type Documentation

Enumerator:
parse_sst_success 
parse_sst_header_not_found 
parse_sst_no_value 
parse_sst_out_of_mem 
parse_sst_parse_error 

Definition at line 61 of file parse_sst.h.

Indicate the "refresher=" value of the Session-Expires header.

Enumerator:
sst_refresher_unspecified 
sst_refresher_uac 
sst_refresher_uas 

Definition at line 44 of file parse_sst.h.


Function Documentation

void free_session_expires ( struct session_expires  ) 

Deallocates memory previously allocated via malloc_session_expires().

Definition at line 73 of file parse_sst.c.

References pkg_free.

Referenced by clean_hdr_field().

struct session_expires* malloc_session_expires ( void   )  [read]

Allocate a zeroed-out struct session_expires.

Definition at line 62 of file parse_sst.c.

References pkg_malloc.

Referenced by parse_session_expires_body().

enum parse_sst_result parse_min_se ( struct sip_msg msg,
unsigned *  min_se 
)

Parses the (should be only one instance) single instance of the "Min-SE" header in the msg.

Note:
The header is not automatically parsed in parse_headers() so you'll have to call this function to get the information.
Parameters:
msg the sip message to examine
min_se the place to store the Min-SE value, if provided; note that result is also available in (unsigned)msg->min_se->parsed
Returns:
parse_sst_result

enum parse_sst_result parse_session_expires ( struct sip_msg msg,
struct session_expires se 
)

Parses the (should be only one instance) single instance of the "Session-Expires" or "x" header in the msg.

Note:
The header is not automatically parsed in parse_headers()[1] so you'll have to call this function to get the information.
Because of time constraints, this function is coded assuming there is NO WHITESPACE in any of the body -- note that the augBNF for the Session-Expires body allows sep whitespace between tokens: delta-seconds SWS ";" SWS "refresher" SWS "=" SWS ( "uac" / "uas" )

Note[1]: it looks like only the frequently-used headers are automatically parsed in parse_headers() (indicated by a parse_<name> function of the form "char* parse_<name>(char *buf, char *end, foo*) and a struct foo with a member called "error").

Parameters:
msg the sip message to examine
se the place to store session-expires information into, if provided; note that result is also available in *((struct session_expires *)msg->session_expires->parsed)
Returns:
parse_sst_result

Definition at line 175 of file parse_sst.c.

References parse_session_expires_body(), parse_sst_header_not_found, parse_sst_success, hdr_field::parsed, and sip_msg::session_expires.

Referenced by parse_msg_for_sst_info(), and sst_check_min().


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