auth/common.c File Reference

Digest Authentication Module

More...

#include <string.h>
#include "../../dprint.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_to.h"
#include "../../parser/parse_uri.h"
#include "../../data_lump_rpl.h"
#include "auth_mod.h"
#include "common.h"

Include dependency graph for auth/common.c:

Go to the source code of this file.

Functions

int get_realm (struct sip_msg *_m, hdr_types_t _hftype, struct sip_uri **_u)
 Return parsed To or From, host part of the parsed uri is realm.
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.


Detailed Description

Digest Authentication Module

Definition in file auth/common.c.


Function Documentation

int get_realm ( struct sip_msg _m,
hdr_types_t  _hftype,
struct sip_uri **  _u 
)

Return parsed To or From, host part of the parsed uri is realm.

Parameters:
_m SIP message
_hftype header field type
_u SIP URI
Returns:
0 on success, negative on failure

Definition at line 54 of file auth/common.c.

References HDR_AUTHORIZATION_T, HDR_TO_F, _str::len, LM_ERR, sip_uri::method, NULL, parse_from_header(), parse_from_uri(), parse_headers(), parse_to_uri(), REQ_LINE, _str::s, and sip_msg::to.

Referenced by challenge(), diam_pre_auth(), and pre_auth().

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.

Create a response with given code and reason phrase Optionally add new headers specified in _hdr

Parameters:
_m SIP message
_code response code
_reason reason string
_hdr header to add
_hdr_len header length
Returns:
1 if reply could be sended, -1 on failure

Definition at line 96 of file auth/common.c.

Referenced by authorize(), challenge(), diam_pre_auth(), pre_auth(), and srv_response().


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