tls_domain.c File Reference

Kamailio TLS support :: Domains

Module: Kamailio TLS support. More...

#include "tls_server.h"
#include "tls_domain.h"
#include <stdlib.h>

Include dependency graph for tls_domain.c:

Go to the source code of this file.

Functions

struct tls_domaintls_find_client_domain (struct ip_addr *ip, unsigned short port)
 find client domain with given ip and port, return default domain if virtual domain not found
struct tls_domaintls_find_client_domain_name (str name)
 find client domain with given name, return 0 if name based virtual domain not found
struct tls_domaintls_find_server_domain (struct ip_addr *ip, unsigned short port)
 find server domain with given ip and port it will only return server domains which do not have a server_name defined (as to those will be swtiched in the servername callback function). If IP:port with empty server_name is not found in the list it will return the default server domain
void tls_free_domains (void)
 clean up
int tls_new_client_domain (struct ip_addr *ip, unsigned short port)
 create a new client domain (identified by a socket)
int tls_new_client_domain_name (char *s, int len)
 create a new client domain (identified by a string)
struct tls_domaintls_new_domain (int type)
 allocate memory and set default values for TLS domain structure
int tls_new_server_domain (struct ip_addr *ip, unsigned short port)
 create a new server domain (identified by a socket)

Variables

struct tls_domaintls_client_domains = NULL
struct tls_domaintls_default_client_domain = NULL
struct tls_domaintls_default_server_domain = NULL
struct tls_domaintls_server_domains = NULL


Detailed Description

Kamailio TLS support :: Domains

Module: Kamailio TLS support.

Definition in file tls_domain.c.


Function Documentation

struct tls_domain* tls_find_client_domain ( struct ip_addr ip,
unsigned short  port 
) [read]

find client domain with given ip and port, return default domain if virtual domain not found

Definition at line 106 of file tls_domain.c.

References tls_domain::addr, ip_addr_cmp, _str::len, LM_DBG, tls_domain::name, tls_domain::next, and tls_domain::port.

Referenced by tls_tcpconn_init().

struct tls_domain* tls_find_client_domain_name ( str  name  )  [read]

find client domain with given name, return 0 if name based virtual domain not found

Definition at line 126 of file tls_domain.c.

References _str::len, LM_DBG, tls_domain::name, tls_domain::next, and _str::s.

Referenced by tls_tcpconn_init().

struct tls_domain* tls_find_server_domain ( struct ip_addr ip,
unsigned short  port 
) [read]

find server domain with given ip and port it will only return server domains which do not have a server_name defined (as to those will be swtiched in the servername callback function). If IP:port with empty server_name is not found in the list it will return the default server domain

Returns:
default domain if virtual domain not found

Definition at line 51 of file tls_domain.c.

References tls_domain::addr, ip_addr_cmp, LM_DBG, tls_domain::next, NULL, OPENSSL_NO_TLSEXT, and tls_domain::port.

Referenced by tls_tcpconn_init().

void tls_free_domains ( void   ) 

clean up

Definition at line 270 of file tls_domain.c.

References tls_domain::name, tls_domain::next, pkg_free, and _str::s.

Referenced by destroy_tls().

int tls_new_client_domain ( struct ip_addr ip,
unsigned short  port 
)

create a new client domain (identified by a socket)

Definition at line 187 of file tls_domain.c.

References tls_domain::addr, LM_ERR, tls_domain::next, NULL, tls_domain::port, TLS_DOMAIN_CLI, and tls_new_domain().

int tls_new_client_domain_name ( char *  s,
int  len 
)

create a new client domain (identified by a string)

Definition at line 211 of file tls_domain.c.

References _str::len, LM_ERR, tls_domain::name, tls_domain::next, NULL, pkg_free, pkg_malloc, _str::s, TLS_DOMAIN_CLI, TLS_DOMAIN_NAME, and tls_new_domain().

struct tls_domain* tls_new_domain ( int  type  )  [read]

int tls_new_server_domain ( struct ip_addr ip,
unsigned short  port 
)

create a new server domain (identified by a socket)

Definition at line 145 of file tls_domain.c.

References tls_domain::addr, ip_addr2a(), ip_addr_cmp, LM_DBG, LM_ERR, LM_WARN, tls_domain::next, NULL, tls_domain::port, TLS_DOMAIN_SRV, and tls_new_domain().


Variable Documentation

Definition at line 37 of file tls_domain.c.

Referenced by destroy_tls(), and init_tls().

Definition at line 39 of file tls_domain.c.

Referenced by destroy_tls(), init_tls(), and pre_init_tls().

Definition at line 38 of file tls_domain.c.

Referenced by destroy_tls(), init_tls(), and pre_init_tls().

Definition at line 36 of file tls_domain.c.

Referenced by destroy_tls(), and init_tls().


Generated on Thu May 24 20:00:44 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6