cmpapi.c File Reference

comparison functions More...

#include "parser/parse_uri.h"
#include "parser/parse_param.h"
#include "cmpapi.h"

Include dependency graph for cmpapi.c:

Go to the source code of this file.

Functions

int cmp_aor (struct sip_uri *uri1, struct sip_uri *uri2)
int cmp_aor_str (str *s1, str *s2)
int cmp_hdrname_str (str *s1, str *s2)
int cmp_hdrname_strzn (str *s1, char *s2, size_t n)
int cmp_str (str *s1, str *s2)
int cmp_str_params (str *s1, str *s2)
int cmp_uri (struct sip_uri *uri1, struct sip_uri *uri2)
int cmp_uri_str (str *s1, str *s2)
int cmpi_str (str *s1, str *s2)


Detailed Description

comparison functions

Definition in file cmpapi.c.


Function Documentation

int cmp_aor ( struct sip_uri uri1,
struct sip_uri uri2 
)

Compare SIP AoR

  • match user, host and port (if port missing, assume 5060) return:
    • 0: match
    • >0: no match
    • <0: error

Definition at line 202 of file cmpapi.c.

References cmp_str(), cmpi_str(), sip_uri::host, _str::len, sip_uri::port, sip_uri::port_no, and sip_uri::user.

Referenced by cmp_aor_str().

int cmp_aor_str ( str s1,
str s2 
)

return:

  • 0: match
  • >0: no match
  • <0: error

Definition at line 228 of file cmpapi.c.

References cmp_aor(), _str::len, parse_uri(), and _str::s.

Referenced by w_cmp_aor().

int cmp_hdrname_str ( str s1,
str s2 
)

Definition at line 78 of file cmpapi.c.

References cmpi_str().

Referenced by add_hf_helper(), get_autenticate_hdr(), get_sock_hdr(), is_present_hf_f(), and remove_hf_f().

int cmp_hdrname_strzn ( str s1,
char *  s2,
size_t  n 
)

int cmp_str ( str s1,
str s2 
)

Definition at line 32 of file cmpapi.c.

References _str::len, len, and _str::s.

Referenced by cmp_aor(), cmp_str_f(), and cmp_uri().

int cmp_str_params ( str s1,
str s2 
)

Definition at line 92 of file cmpapi.c.

References param::body, CLASS_ANY, _str::len, param::name, param::next, NULL, parse_params(), and _str::s.

Referenced by cmp_uri().

int cmp_uri ( struct sip_uri uri1,
struct sip_uri uri2 
)

Compare SIP URI as per RFC3261, 19.1.4 return:

  • 0: match
  • >0: no match
  • <0: error

Definition at line 129 of file cmpapi.c.

References cmp_str(), cmp_str_params(), cmpi_str(), sip_uri::host, _str::len, sip_uri::maddr, sip_uri::method, sip_uri::params, sip_uri::passwd, sip_uri::port, sip_uri::ttl, sip_uri::type, sip_uri::user, and sip_uri::user_param.

Referenced by cmp_uri_str().

int cmp_uri_str ( str s1,
str s2 
)

return:

  • 0: match
  • >0: no match
  • <0: error

Definition at line 181 of file cmpapi.c.

References cmp_uri(), _str::len, parse_uri(), and _str::s.

Referenced by w_cmp_uri().

int cmpi_str ( str s1,
str s2 
)

Definition at line 55 of file cmpapi.c.

References _str::len, len, and _str::s.

Referenced by cmp_aor(), cmp_hdrname_str(), cmp_hdrname_strzn(), cmp_istr_f(), and cmp_uri().


Generated on Mon May 21 18:00:37 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6