#include "diameter_msg.h"#include "../../parser/digest/digest_parser.h"#include "../../parser/hf.h"#include "../../pvar.h"#include "../../str.h"#include "../auth/api.h"#include "defs.h"


Go to the source code of this file.
Functions | |
| int | authorize (struct sip_msg *msg, pv_elem_t *realm, int hftype) |
| auth_result_t | diam_pre_auth (struct sip_msg *m, str *realm, int hftype, struct hdr_field **h) |
| int | diameter_authorize (struct hdr_field *cred, str *p_method, struct sip_uri uri, struct sip_uri ruri, unsigned int m_id, rd_buf_t *response) |
| int | find_credentials (struct sip_msg *m, str *realm, int hftype, struct hdr_field **h) |
| int | get_realm (struct sip_msg *m, int hftype, struct sip_uri *u) |
| int | get_uri (struct sip_msg *m, str **uri) |
| int | send_resp (struct sip_msg *_m, int _code, str *_reason, char *_hdr, int _hdr_len) |
| Create a response with given code and reason phrase. | |
| int | srv_response (struct sip_msg *msg, rd_buf_t *rb, int hftype) |
Definition at line 282 of file auth_diameter/authorize.c.
References AUTH_ERROR, AUTHORIZED, diam_pre_auth(), diameter_authorize(), auth_body::digest, DO_AUTHORIZATION, domain, sip_msg::first_line, get_uri(), sip_uri::host, sip_msg::id, _str::len, LM_DBG, LM_ERR, mark_authorized_cred(), NO_CREDENTIALS, NULL, parse_sip_msg_uri(), parse_uri(), hdr_field::parsed, sip_msg::parsed_uri, sip_msg::parsed_uri_ok, pv_printf_s(), rb, dig_cred::realm, msg_start::request, _str::s, send_resp(), srv_response(), and msg_start::u.
| auth_result_t diam_pre_auth | ( | struct sip_msg * | m, | |
| str * | realm, | |||
| int | hftype, | |||
| struct hdr_field ** | h | |||
| ) |
Definition at line 233 of file auth_diameter/authorize.c.
References AUTHORIZED, DO_AUTHORIZATION, ERROR, find_credentials(), get_realm(), sip_uri::host, _str::len, LM_ERR, METHOD_ACK, METHOD_CANCEL, NO_CREDENTIALS, and send_resp().
Referenced by authorize().
| int diameter_authorize | ( | struct hdr_field * | cred, | |
| str * | p_method, | |||
| struct sip_uri | uri, | |||
| struct sip_uri | ruri, | |||
| unsigned int | m_id, | |||
| rd_buf_t * | response | |||
| ) |
Definition at line 377 of file auth_diameter/authorize.c.
References AA_REQUEST, AAA_APP_NASREQ, AAA_CONN_CLOSED, AAA_ERR_SUCCESS, AAA_ERROR, AAA_NO_CONNECTION, AAA_TIMEOUT, AAAAddAVPToMessage(), AAABuildMsgBuffer(), AAACreateAVP(), AAAFreeAVP(), AAAFreeMessage(), AAAGetLastAVP(), AAAInMessage(), AAAPrintMessage(), ad_malloc, AVP_Destination_Realm, AVP_DUPLICATE_DATA, AVP_FREE_DATA, AVP_Method, AVP_Resource, AVP_Response, AVP_Service_Type, AVP_SIP_MSGID, AVP_User_Name, _message_t::avpList, hdr_field::body, _message_t::buf, diameter_client_host, diameter_client_port, username::domain, sip_uri::host, init_mytcp(), _str::len, LM_DBG, LM_ERR, LM_NOTICE, sip_uri::method, NULL, hdr_field::parsed, pkg_free, sip_uri::port, dig_cred::realm, _str::s, SERVICE_LEN, SIP_AUTHENTICATION, sockfd, tcp_send_recv(), username::user, sip_uri::user, dig_cred::username, and username::whole.
Referenced by authorize().
Definition at line 151 of file auth_diameter/authorize.c.
References sip_msg::authorization, HDR_AUTHORIZATION_F, HDR_AUTHORIZATION_T, HDR_PROXYAUTH_F, HDR_PROXYAUTH_T, HDR_T2F, sip_msg::last_header, _str::len, LM_ERR, parse_credentials(), parse_headers(), hdr_field::parsed, sip_msg::proxy_auth, _str::s, and hdr_field::type.
Definition at line 107 of file auth_diameter/authorize.c.
References get_from, get_to, HDR_AUTHORIZATION_T, HDR_TO_F, _str::len, LM_ERR, parse_from_header(), parse_headers(), parse_uri(), REQ_LINE, _str::s, and sip_msg::to.
Definition at line 74 of file auth_diameter/authorize.c.
References get_from, get_to, HDR_TO_F, LM_ERR, parse_from_header(), parse_headers(), REQ_LINE, and sip_msg::to.
Referenced by authorize().
Create a response with given code and reason phrase.
Create a response with given code and reason phrase Optionally add new headers specified in _hdr
| _m | SIP message | |
| _code | response code | |
| _reason | reason string | |
| _hdr | header to add | |
| _hdr_len | header length |
Definition at line 96 of file auth/common.c.
References add_lump_rpl(), LM_ERR, LUMP_RPL_HDR, sl_binds::send_reply, and slb.
Referenced by authorize(), challenge(), diam_pre_auth(), pre_auth(), and srv_response().
Definition at line 676 of file auth_diameter/authorize.c.
References AAA_AUTHORIZED, AAA_CHALENGE, AAA_NOT_AUTHORIZED, AAA_SRVERR, ad_malloc, rd_buf::chall, rd_buf::chall_len, HDR_AUTHORIZATION_T, LM_ERR, NULL, pkg_free, PROXY_AUTH_CHALLENGE, PROXY_AUTH_CHALLENGE_LEN, rd_buf::ret_code, send_resp(), WWW_AUTH_CHALLENGE, and WWW_AUTH_CHALLENGE_LEN.
Referenced by authorize().
1.5.6