auth_diameter/authorize.h

Go to the documentation of this file.
00001 /* 
00002  * $Id: authorize.h 4518 2008-07-28 15:39:28Z henningw $
00003  *
00004  * Digest Authentication - Diameter support
00005  *
00006  * Copyright (C) 2001-2003 FhG Fokus
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  * 
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  * History:
00025  * -------
00026  *  
00027  *  
00028  */
00029 
00030 #ifndef DIAMETER_AUTHORIZE_H
00031 #define DIAMETER_AUTHORIZE_H
00032 
00033 #include "diameter_msg.h"
00034 #include "../../parser/digest/digest_parser.h"
00035 #include "../../parser/hf.h"
00036 #include "../../pvar.h"
00037 #include "../../str.h"
00038 #include "../auth/api.h"
00039 #include "defs.h"
00040 
00041 int get_uri(struct sip_msg* m, str** uri);
00042 
00043 int get_realm(struct sip_msg* m, int hftype, struct sip_uri* u);
00044 
00045 auth_result_t diam_pre_auth(struct sip_msg* m, str* realm, int hftype, 
00046                   struct hdr_field** h);
00047 
00048 int find_credentials(struct sip_msg* m, str* realm, int hftype, 
00049                   struct hdr_field** h);
00050 
00051 int authorize(struct sip_msg* msg, pv_elem_t* realm, int hftype);
00052 
00053 int diameter_authorize(struct hdr_field* cred, str* p_method, 
00054                struct sip_uri uri,  struct sip_uri ruri,
00055                unsigned int m_id, rd_buf_t *response);
00056 
00057 int srv_response(struct sip_msg* msg, rd_buf_t* rb, int hftype);
00058 
00059 int send_resp(struct sip_msg* _m, int _code, str* _reason,
00060                char* _hdr, int _hdr_len);
00061 
00062 #endif /* DIAMETER_AUTHORIZE_H */
00063  

Generated on Thu May 17 12:00:25 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6