BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

sip_parser.h File Reference

SIP Message Parser. More...

#include <pjsip/sip_msg.h>
#include <pjlib-util/scanner.h>
#include <pj/list.h>

Data Structures

struct  pjsip_parser_err_report
 
struct  pjsip_parse_ctx
 
struct  pjsip_parser_const_t
 

Macros

#define PJSIP_MIN_CONTENT_LENGTH   0
 
#define PJSIP_MAX_CONTENT_LENGTH   PJ_MAXINT32
 
#define PJSIP_MIN_PORT   0
 
#define PJSIP_MAX_PORT   PJ_MAXUINT16
 
#define PJSIP_MIN_TTL   0
 
#define PJSIP_MAX_TTL   PJ_MAXUINT8
 
#define PJSIP_MIN_STATUS_CODE   100
 
#define PJSIP_MAX_STATUS_CODE   999
 
#define PJSIP_MIN_Q1000   0
 
#define PJSIP_MAX_Q1000   PJ_MAXINT32 / 1000
 
#define PJSIP_MIN_EXPIRES   0
 
#define PJSIP_MAX_EXPIRES   ((pj_uint32_t)0xFFFFFFFFUL)
 
#define PJSIP_MIN_CSEQ   0
 
#define PJSIP_MAX_CSEQ   PJ_MAXINT32
 
#define PJSIP_MIN_RETRY_AFTER   0
 
#define PJSIP_MAX_RETRY_AFTER   PJ_MAXINT32
 

Typedefs

typedef pjsip_hdr *() pjsip_parse_hdr_func(pjsip_parse_ctx *context)
 
typedef void *() pjsip_parse_uri_func(pj_scanner *scanner, pj_pool_t *pool, pj_bool_t parse_params)
 

Enumerations

enum  { PJSIP_PARSE_URI_AS_NAMEADDR = 1 , PJSIP_PARSE_URI_IN_FROM_TO_HDR = 2 }
 
enum  { PJSIP_PARSE_REMOVE_QUOTE = 1 }
 

Functions

pj_status_t pjsip_register_hdr_parser (const char *hname, const char *hshortname, pjsip_parse_hdr_func *fptr)
 
pj_status_t pjsip_unregister_hdr_parser (const char *hname, const char *hshortname, pjsip_parse_hdr_func *fptr)
 
pj_status_t pjsip_register_uri_parser (char *scheme, pjsip_parse_uri_func *func)
 
pj_status_t pjsip_unregister_uri_parser (const char *scheme, pjsip_parse_uri_func *func)
 
pjsip_uripjsip_parse_uri (pj_pool_t *pool, char *buf, pj_size_t size, unsigned options)
 
pj_status_t pjsip_parse_status_line (char *buf, pj_size_t size, pjsip_status_line *status_line)
 
pjsip_msgpjsip_parse_msg (pj_pool_t *pool, char *buf, pj_size_t size, pjsip_parser_err_report *err_list)
 
pjsip_msgpjsip_parse_rdata (char *buf, pj_size_t size, pjsip_rx_data *rdata)
 
pj_status_t pjsip_find_msg (const char *buf, pj_size_t size, pj_bool_t is_datagram, pj_size_t *msg_size)
 
void * pjsip_parse_hdr (pj_pool_t *pool, const pj_str_t *hname, char *line, pj_size_t size, int *parsed_len)
 
pj_status_t pjsip_parse_headers (pj_pool_t *pool, char *input, pj_size_t size, pjsip_hdr *hlist, unsigned options)
 
const pjsip_parser_const_tpjsip_parser_const (void)
 
void pjsip_parse_param_imp (pj_scanner *scanner, pj_pool_t *pool, pj_str_t *pname, pj_str_t *pvalue, unsigned opt)
 
void pjsip_parse_uri_param_imp (pj_scanner *scanner, pj_pool_t *pool, pj_str_t *pname, pj_str_t *pvalue, unsigned opt)
 
void pjsip_concat_param_imp (pj_str_t *param, pj_pool_t *pool, const pj_str_t *pname, const pj_str_t *pvalue, int sepchar)
 
void pjsip_parse_end_hdr_imp (pj_scanner *scanner)
 
void pjsip_parse_generic_array_hdr_imp (pjsip_generic_array_hdr *hdr, pj_scanner *scanner)
 

Variables

int PJSIP_SYN_ERR_EXCEPTION
 
int PJSIP_EINVAL_ERR_EXCEPTION
 

Function Documentation

◆ pjsip_parser_const()

const pjsip_parser_const_t * pjsip_parser_const ( void  )

Get parser constants.

◆ pjsip_parse_param_imp()

void pjsip_parse_param_imp ( pj_scanner scanner,
pj_pool_t pool,
pj_str_t pname,
pj_str_t pvalue,
unsigned  opt 
)

Internal: parse parameter in header (matching the character as token)

◆ pjsip_parse_uri_param_imp()

void pjsip_parse_uri_param_imp ( pj_scanner scanner,
pj_pool_t pool,
pj_str_t pname,
pj_str_t pvalue,
unsigned  opt 
)

Internal: parse parameter in URL (matching the character as paramchar)

◆ pjsip_concat_param_imp()

void pjsip_concat_param_imp ( pj_str_t param,
pj_pool_t pool,
const pj_str_t pname,
const pj_str_t pvalue,
int  sepchar 
)

Internal: concatenate parameter

◆ pjsip_parse_end_hdr_imp()

void pjsip_parse_end_hdr_imp ( pj_scanner scanner)

Internal

◆ pjsip_parse_generic_array_hdr_imp()

void pjsip_parse_generic_array_hdr_imp ( pjsip_generic_array_hdr hdr,
pj_scanner scanner 
)

Parse generic array header

References PJ_END_DECL.

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.