summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/addr_resolv.h
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/include/pj/addr_resolv.h')
-rw-r--r--pjlib/include/pj/addr_resolv.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/pjlib/include/pj/addr_resolv.h b/pjlib/include/pj/addr_resolv.h
index ae10337..41eacc8 100644
--- a/pjlib/include/pj/addr_resolv.h
+++ b/pjlib/include/pj/addr_resolv.h
@@ -1,4 +1,4 @@
-/* $Id: addr_resolv.h 3553 2011-05-05 06:14:19Z nanang $ */
+/* $Id: addr_resolv.h 4218 2012-08-07 02:18:15Z bennylp $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -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.
*