opensips/modules/enum/enum.h

Wed, 10 Feb 2010 21:21:24 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 10 Feb 2010 21:21:24 +0100
changeset 17
733187d496d0
parent 12
a3ac912f2857
permissions
-rw-r--r--

Introduce authentication credential logic into the LCR module.
This logic is meant to complement that of changeset 18, adding
additional authentication flexibility to the UAC module.

     1 /*
     2  * $Id: enum.h 5901 2009-07-21 07:45:05Z bogdan_iancu $
     3  *
     4  * Header file for Enum and E164 related functions
     5  *
     6  * Copyright (C) 2002-2008 Juha Heinanen
     7  *
     8  * This file is part of opensips, a free SIP server.
     9  *
    10  * opensips is free software; you can redistribute it and/or modify
    11  * it under the terms of the GNU General Public License as published by
    12  * the Free Software Foundation; either version 2 of the License, or
    13  * (at your option) any later version
    14  *
    15  * opensips is distributed in the hope that it will be useful,
    16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    18  * GNU General Public License for more details.
    19  *
    20  * You should have received a copy of the GNU General Public License 
    21  * along with this program; if not, write to the Free Software 
    22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    23  */
    26 #ifndef ENUM_H
    27 #define ENUM_H
    30 #include "../../parser/msg_parser.h"
    33 #define MAX_DOMAIN_SIZE 256
    34 #define MAX_COMPONENT_SIZE 32  /* separator, apex, ... This simplifies checks */
    37 /*
    38  * Check if from user is an e164 number and has a naptr record
    39  */
    40 int is_from_user_enum_0(struct sip_msg* _msg, char* _str1, char* _str2);
    41 int is_from_user_enum_1(struct sip_msg* _msg, char* _suffix, char* _str2);
    42 int is_from_user_enum_2(struct sip_msg* _msg, char* _suffix, char* _service);
    44 /*
    45  * do source number destination routing.
    46  * that is, make the ruri based on the from number
    47  * this is like source ip policy routing
    48  */
    49 int enum_pv_query_1(struct sip_msg* _msg, char* _sp);
    50 int enum_pv_query_2(struct sip_msg* _msg, char* _sp, char* _suffix);
    51 int enum_pv_query_3(struct sip_msg* _msg, char* _sp, char* _suffix,
    52 		    char* _service);
    54 /*
    55  * Make enum query and if query succeeds, replace current uri with the
    56  * result of the query
    57  */
    58 int enum_query_0(struct sip_msg* _msg, char* _str1, char* _str2);
    59 int enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
    60 int enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
    62 /*
    63  * Infrastructure ENUM versions.
    64  */
    65 int i_enum_query_0(struct sip_msg* _msg, char* _str1, char* _str2);
    66 int i_enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
    67 int i_enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
    69 /*
    70  * Make ISN query and if query succeeds, replace current uri with the
    71  * result of the query
    72  */
    73 int isn_query_0(struct sip_msg* _msg, char* _str1, char* _str2);
    74 int isn_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
    75 int isn_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
    78 #endif /* ENUM_H */

mercurial