cmpapi.h File Reference

comparison functions More...

#include <string.h>
#include "str.h"

Include dependency graph for cmpapi.h:

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

Go to the source code of this file.

Defines

#define cmp_strz(a, b)   strcmp((a), (b))
#define cmpi_strz(a, b)   strcasecmp((a), (b))

Functions

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_uri_str (str *s1, str *s2)
int cmpi_str (str *s1, str *s2)


Detailed Description

comparison functions

Definition in file cmpapi.h.


Define Documentation

#define cmp_strz ( a,
 )     strcmp((a), (b))

Comparison functions

  • return:
    • < 0 - less
    • ==0 - equal
    • > 0 - greater cmp_str* - for strings does case sensitive comparison cmpi_str* - for strings does case insensitive comparison

Definition at line 45 of file cmpapi.h.

#define cmpi_strz ( a,
 )     strcasecmp((a), (b))

Definition at line 46 of file cmpapi.h.


Function Documentation

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_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