summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip/sip_transport.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-18 00:33:02 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-18 00:33:02 +0000
commit65035358b4b7f51b4183a0937e9e93ff130d7525 (patch)
treed38d458e390fd2ac04e91f90bac5b856f4089c4c /pjsip/include/pjsip/sip_transport.h
parentcbb6c140cf6e47e65b31b93009cfe39916933009 (diff)
More intelligent PJSUA-LIB in selecting the appropriate address for Contact header
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@611 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip/sip_transport.h')
-rw-r--r--pjsip/include/pjsip/sip_transport.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h
index 002061cf..2f8f679f 100644
--- a/pjsip/include/pjsip/sip_transport.h
+++ b/pjsip/include/pjsip/sip_transport.h
@@ -62,7 +62,9 @@ enum pjsip_transport_flags_e
{
PJSIP_TRANSPORT_RELIABLE = 1, /**< Transport is reliable. */
PJSIP_TRANSPORT_SECURE = 2, /**< Transport is secure. */
- PJSIP_TRANSPORT_DATAGRAM = 4, /**< Datagram based transport. */
+ PJSIP_TRANSPORT_DATAGRAM = 4, /**< Datagram based transport.
+ (it's also assumed to be
+ connectionless) */
};
/**
@@ -786,6 +788,30 @@ PJ_DECL(pj_status_t) pjsip_tpmgr_create( pj_pool_t *pool,
/**
+ * Find out the appropriate local address info (IP address and port) to
+ * advertise in Contact header based on the remote address to be
+ * contacted. The local address info would be the address name of the
+ * transport or listener which will be used to send the request.
+ *
+ * In this implementation, it will only select the transport based on
+ * the transport type in the request.
+ *
+ * @param tpmgr The transport manager.
+ * @param pool Pool to allocate memory for the IP address.
+ * @param h Destination address to contact.
+ * @param ip_addr Pointer to receive the IP address.
+ * @param port Pointer to receive the port number.
+ *
+ * @return PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_find_local_addr( pjsip_tpmgr *tpmgr,
+ pj_pool_t *pool,
+ pjsip_transport_type_e type,
+ pj_str_t *ip_addr,
+ int *port);
+
+
+/**
* Destroy transport manager.
*/
PJ_DECL(pj_status_t) pjsip_tpmgr_destroy(pjsip_tpmgr *mgr);