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