diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-08-07 02:18:15 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-08-07 02:18:15 +0000 |
commit | ed7f9eba764e5fb47f7bc881bd96ceeb359bb3cc (patch) | |
tree | 76d7643b5b7725d63a0c85694394d4d4ca6e34d4 /pjlib/include | |
parent | 3c0866d754867d94b8d3160d61e01b6b362d1ccb (diff) |
Fixed #1412: Account specific NAT settings: STUN, ICE, and TURN
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4218 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include')
-rw-r--r-- | pjlib/include/pj/addr_resolv.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pjlib/include/pj/addr_resolv.h b/pjlib/include/pj/addr_resolv.h index 096dde14..7e89936c 100644 --- a/pjlib/include/pj/addr_resolv.h +++ b/pjlib/include/pj/addr_resolv.h @@ -117,6 +117,31 @@ PJ_DECL(pj_status_t) pj_gethostip(int af, pj_sockaddr *addr); /** + * Get the interface IP address to send data to the specified destination. + * + * @param af The desired address family to query. Valid values + * are pj_AF_INET() or pj_AF_INET6(). + * @param dst The destination host. + * @param itf_addr On successful resolution, the address family and address + * part of this socket address will be filled up with the host + * IP address, in network byte order. Other parts of the socket + * address should be ignored. + * @param allow_resolve If \a dst may contain hostname (instead of IP + * address), specify whether hostname resolution should + * be performed. If not, default interface address will + * be returned. + * @param p_dst_addr If not NULL, it will be filled with the IP address of + * the destination host. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pj_getipinterface(int af, + const pj_str_t *dst, + pj_sockaddr *itf_addr, + pj_bool_t allow_resolve, + pj_sockaddr *p_dst_addr); + +/** * Get the IP address of the default interface. Default interface is the * interface of the default route. * |