auth_diameter/authorize.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include "../../mem/mem.h"
#include "../../mem/shm_mem.h"
#include "../../dprint.h"
#include "../../str.h"
#include "../../ut.h"
#include "../../parser/digest/digest.h"
#include "../../parser/parse_uri.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_to.h"
#include "../../data_lump_rpl.h"
#include "diameter_msg.h"
#include "auth_diameter.h"
#include "defs.h"
#include "../auth/api.h"
#include "authorize.h"
#include "tcp_comm.h"

Include dependency graph for auth_diameter/authorize.c:

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 *hdr, str *p_method, struct sip_uri uri, struct sip_uri ruri, unsigned int m_id, rd_buf_t *rb)
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)

Variables

static str dia_400_err = str_init(MESSAGE_400)
static str dia_401_err = str_init(MESSAGE_401)
static str dia_403_err = str_init("Forbidden")
static str dia_407_err = str_init(MESSAGE_407)
static str dia_500_err = str_init(MESSAGE_500)


Function Documentation

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 hdr,
str p_method,
struct sip_uri  uri,
struct sip_uri  ruri,
unsigned int  m_id,
rd_buf_t rb 
)

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.

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 737 of file auth_diameter/authorize.c.

References add_lump_rpl(), LM_ERR, LUMP_RPL_HDR, sl_binds::send_reply, and slb.

int srv_response ( struct sip_msg msg,
rd_buf_t rb,
int  hftype 
)


Variable Documentation

str dia_400_err = str_init(MESSAGE_400) [static]

Definition at line 68 of file auth_diameter/authorize.c.

str dia_401_err = str_init(MESSAGE_401) [static]

Definition at line 65 of file auth_diameter/authorize.c.

str dia_403_err = str_init("Forbidden") [static]

Definition at line 66 of file auth_diameter/authorize.c.

str dia_407_err = str_init(MESSAGE_407) [static]

Definition at line 67 of file auth_diameter/authorize.c.

str dia_500_err = str_init(MESSAGE_500) [static]

Definition at line 69 of file auth_diameter/authorize.c.


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