#include "../../proxy.h"
#include "../../str.h"
#include "../../parser/parse_uri.h"
#include "../../dprint.h"
#include "../../ut.h"
#include "../../ip_addr.h"
#include "../../error.h"
#include "../../forward.h"
#include "../../mem/mem.h"
#include "../../parser/msg_parser.h"


Go to the source code of this file.
Functions | |
| static enum sip_protos | get_proto (enum sip_protos force_proto, enum sip_protos proto) |
| Protocol choosing helper function. | |
| static struct proxy_l * | uri2proxy (str *uri, int forced_proto) |
| Convert a URI into a proxy structure. | |
| static struct socket_info * | uri2sock (struct sip_msg *msg, str *uri, union sockaddr_union *to_su, int proto) |
| Convert a URI into a socket_info. | |
| static int | uri2su (str *uri, union sockaddr_union *to_su, int proto) |
| Convert a URI into socket address. | |
Definition in file modules/tm/ut.h.
| static enum sip_protos get_proto | ( | enum sip_protos | force_proto, | |
| enum sip_protos | proto | |||
| ) | [inline, static] |
Protocol choosing helper function.
Choose a protocol depeding on the value of the input variables The forced_proto takes precedence if != PROTO_NONE
| force_proto | forced protocol | |
| proto | protocol |
Definition at line 65 of file modules/tm/ut.h.
References LM_ERR, PROTO_NONE, PROTO_SCTP, PROTO_TCP, PROTO_TLS, and PROTO_UDP.
Referenced by uri2proxy().
Convert a URI into a proxy structure.
Convert a URI into a proxy structure. Parse URI, choose a protocol and return a new proxy structure, allocated in pkg_memory.
| uri | input URI | |
| forced_proto | force a protocol |
Definition at line 117 of file modules/tm/ut.h.
References get_proto(), sip_uri::host, _str::len, LM_ERR, mk_proxy(), parse_uri(), sip_uri::port_no, sip_uri::proto, PROTO_NONE, PROTO_TLS, _str::s, SIPS_URI_T, sip_uri::type, and ZSW.
Referenced by ac_sl_msg(), add_uac(), t_relay_to(), and uri2su().
| static struct socket_info* uri2sock | ( | struct sip_msg * | msg, | |
| str * | uri, | |||
| union sockaddr_union * | to_su, | |||
| int | proto | |||
| ) | [static, read] |
Convert a URI into a socket_info.
Convert a URI into a socket_info for sending.
| msg | SIP message | |
| uri | input URI | |
| to_su | socket address | |
| proto | protocol |
Definition at line 184 of file modules/tm/ut.h.
References E_NO_SOCKET, get_send_socket(), LM_ERR, sockaddr_union::s, ser_error, and uri2su().
Referenced by get_hfblock(), and t_uac().
| static int uri2su | ( | str * | uri, | |
| union sockaddr_union * | to_su, | |||
| int | proto | |||
| ) | [inline, static] |
Convert a URI into socket address.
Convert a URI into a socket address. Create a temporary proxy.
| uri | input URI | |
| to_su | target structure | |
| proto | protocol |
Definition at line 152 of file modules/tm/ut.h.
References proxy_l::addr_idx, E_BAD_ADDRESS, free_proxy(), proxy_l::host, hostent2su(), LM_ERR, pkg_free, proxy_l::port, proxy_l::proto, proxy, ser_error, SIP_PORT, and uri2proxy().
Referenced by t_uac(), and uri2sock().
1.5.6