#include <netdb.h>
#include "ip_addr.h"
#include "str.h"
#include "resolve.h"


Go to the source code of this file.
Data Structures | |
| struct | proxy_l |
Defines | |
| #define | PROXY_SHM_FLAG (1<<0) |
Functions | |
| struct proxy_l * | add_proxy (str *name, unsigned short port, unsigned short proto) |
| Add a proxy to beginning of the global list, if not already there. | |
| void | free_hostent (struct hostent *dst) |
| Free a hostent structure in pkg memory. | |
| void | free_proxy (struct proxy_l *p) |
| Free proxy in pkg memory. | |
| void | free_shm_hostent (struct hostent *dst) |
| Frees a hostent structure in shared memory. | |
| void | free_shm_proxy (struct proxy_l *p) |
| Free proxy in shared memory. | |
| int | hostent_cpy (struct hostent *dst, struct hostent *src) |
| Copies a hostent structure. | |
| int | hostent_shm_cpy (struct hostent *dst, struct hostent *src) |
| Copies a hostent structure in shared memory. | |
| struct proxy_l * | mk_proxy (str *name, unsigned short port, unsigned short proto, int is_sips) |
| Create a new proxy, but don't add it to the global list. | |
| struct proxy_l * | mk_proxy_from_ip (struct ip_addr *ip, unsigned short port, unsigned short proto) |
| Create a new proxy, but don't add it to the global list. | |
| struct proxy_l * | mk_shm_proxy (str *name, unsigned short port, unsigned short proto, int is_sips) |
| Create a new proxy, but don't add it to the global list. | |
Variables | |
| struct proxy_l * | proxies |
Definition in file proxy.h.
| #define PROXY_SHM_FLAG (1<<0) |
Add a proxy to beginning of the global list, if not already there.
| name | proxy name | |
| port | proxy port | |
| proto | proxy protocol |
Definition at line 250 of file proxy.c.
References find_proxy(), mk_proxy(), and proxy_l::next.
Referenced by fix_actions().
| void free_hostent | ( | struct hostent * | dst | ) |
Free a hostent structure in pkg memory.
| dst | freed hostent |
Definition at line 224 of file proxy.c.
References pkg_free.
Referenced by free_proxy(), and get_next_su().
| void free_proxy | ( | struct proxy_l * | p | ) |
Free proxy in pkg memory.
Definition at line 365 of file proxy.c.
References free_dns_res(), free_hostent(), and proxy_l::host.
Referenced by ac_sl_msg(), add_uac(), do_action(), t_relay_to(), trace_send_duplicate(), and uri2su().
| void free_shm_hostent | ( | struct hostent * | dst | ) |
Frees a hostent structure in shared memory.
| dst | freed hostent |
Definition at line 127 of file proxy.c.
References shm_free.
Referenced by free_shm_proxy(), get_next_su(), and shm_clone_proxy().
| void free_shm_proxy | ( | struct proxy_l * | p | ) |
Free proxy in shared memory.
Definition at line 377 of file proxy.c.
References free_dns_res(), free_shm_hostent(), and proxy_l::host.
Referenced by conf_destroy(), and update_proxy().
| int hostent_cpy | ( | struct hostent * | dst, | |
| struct hostent * | src | |||
| ) |
Copies a hostent structure.
| dst | destination | |
| src | source |
Definition at line 140 of file proxy.c.
References E_OUT_OF_MEM, len, LM_CRIT, pkg_free, pkg_malloc, and ser_error.
Referenced by get_next_su(), and mk_proxy().
| int hostent_shm_cpy | ( | struct hostent * | dst, | |
| struct hostent * | src | |||
| ) |
Copies a hostent structure in shared memory.
| dst | destination | |
| src | source |
Definition at line 95 of file proxy.c.
References NULL, and shm_malloc().
Referenced by get_next_su(), mk_shm_proxy(), and shm_clone_proxy().
| struct proxy_l* mk_proxy | ( | str * | name, | |
| unsigned short | port, | |||
| unsigned short | proto, | |||
| int | is_sips | |||
| ) | [read] |
Create a new proxy, but don't add it to the global list.
Create a new proxy in private memory, but don't add it to the global list. This also uses SRV for lookup if possible & port==0 (quick hack).
| name | proxy hostname | |
| port | proxy port | |
| proto | proxy protocol | |
| is_sips | set to 1 if you use SIPS |
Definition at line 279 of file proxy.c.
References disable_dns_failover, proxy_l::dn, E_BAD_ADDRESS, E_OUT_OF_MEM, free_dns_res(), proxy_l::host, hostent_cpy(), _str::len, LM_CRIT, LM_DBG, proxy_l::name, pkg_free, pkg_malloc, proxy_l::port, proxy_l::proto, _str::s, ser_error, and sip_resolvehost().
Referenced by add_proxy(), do_action(), fixup_phostport2proxy(), trace_send_duplicate(), and uri2proxy().
| struct proxy_l* mk_proxy_from_ip | ( | struct ip_addr * | ip, | |
| unsigned short | port, | |||
| unsigned short | proto | |||
| ) | [read] |
Create a new proxy, but don't add it to the global list.
Create a new proxy in private memory, but don't add it to the global list. This also uses SRV for lookup if possible & port==0 (quick hack).
| ip | proxy name as IP address | |
| port | proxy port | |
| proto | proxy protocol |
Definition at line 327 of file proxy.c.
References ip_addr::addr, ip_addr::af, proxy_l::host, ip_addr::len, LM_CRIT, pkg_free, pkg_malloc, proxy_l::port, proxy_l::proto, and ip_addr::u.
| struct proxy_l* mk_shm_proxy | ( | str * | name, | |
| unsigned short | port, | |||
| unsigned short | proto, | |||
| int | is_sips | |||
| ) | [read] |
Create a new proxy, but don't add it to the global list.
Create a new proxy in shared memory, but don't add it to the global list. This also uses SRV for lookup if possible & port==0 (quick hack).
| name | proxy hostname | |
| port | proxy port | |
| proto | proxy protocol | |
| is_sips | set to 1 if you use SIPS |
Definition at line 399 of file proxy.c.
References disable_dns_failover, proxy_l::dn, E_BAD_ADDRESS, E_OUT_OF_MEM, free_dns_res(), proxy_l::host, hostent_shm_cpy(), _str::len, LM_CRIT, LM_DBG, proxy_l::name, proxy_l::port, proxy_l::proto, _str::s, ser_error, shm_free, shm_malloc(), and sip_resolvehost().
Referenced by update_proxy().
1.5.6