diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-11-26 05:36:18 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-11-26 05:36:18 +0000 |
commit | ba8b2066cba86e67f73ba5554669e7d0563408ac (patch) | |
tree | dfa2f71e4ba78885c0ac3fba3cd02c9a60bf17de /pjlib/include/pj/addr_resolv.h | |
parent | 105f3b267a6fd6ea2059fe0d84ec92821a62c7af (diff) |
Fixed pj_gethostip() returns 0.0.0.0. Also how it returns the first interface if else fails
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1599 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/addr_resolv.h')
-rw-r--r-- | pjlib/include/pj/addr_resolv.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pjlib/include/pj/addr_resolv.h b/pjlib/include/pj/addr_resolv.h index e69abcf8..b066bc95 100644 --- a/pjlib/include/pj/addr_resolv.h +++ b/pjlib/include/pj/addr_resolv.h @@ -106,6 +106,18 @@ PJ_DECL(pj_status_t) pj_gethostip(pj_in_addr *ip_addr); /** + * Get the IP address of the default interface. Default interface is the + * interface of the default route. + * + * @param ip_addr On successful resolution, this will be filled up with + * the IP address, in network byte order. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pj_getdefaultipinterface(pj_in_addr *ip_addr); + + +/** * This function translates the name of a service location (for example, * a host name) and returns a set of addresses and associated information * to be used in creating a socket with which to address the specified |