auth/common.h File Reference

Digest Authentication Module

More...

#include "../../parser/msg_parser.h"

Include dependency graph for auth/common.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MESSAGE_400   "Bad Request"
#define MESSAGE_500   "Server Internal Error"

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.h.


Define Documentation

#define MESSAGE_400   "Bad Request"

Definition at line 35 of file auth/common.h.

#define MESSAGE_500   "Server Internal Error"

Definition at line 36 of file auth/common.h.


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.


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