summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2008-09-11 18:43:59 +0000
committerNanang Izzuddin <nanang@teluu.com>2008-09-11 18:43:59 +0000
commit6a8bb2b1cd06a7e85d5cd9544bd8f7ea754610e1 (patch)
tree09f27a402520d969b6fdf5e76f17a013afa3c6bc /pjmedia/include
parent0413bbf70ebb13b2c17168bcf75eb12b271b4efd (diff)
Ticket #616: Updated ICE transport to have a default option to switch RTP transmission to source address if remote doesn't use ICE.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2276 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/transport_ice.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/transport_ice.h b/pjmedia/include/pjmedia/transport_ice.h
index c3d07400..9c96cf3f 100644
--- a/pjmedia/include/pjmedia/transport_ice.h
+++ b/pjmedia/include/pjmedia/transport_ice.h
@@ -62,6 +62,23 @@ typedef struct pjmedia_ice_cb
/**
+ * Options that can be specified when creating ICE transport.
+ */
+enum pjmedia_transport_ice_options
+{
+ /**
+ * Normally when remote doesn't use ICE, the ICE transport will
+ * continuously check the source address of incoming packets to see
+ * if it is different than the configured remote address, and switch
+ * the remote address to the source address of the packet if they
+ * are different after several packets are received.
+ * Specifying this option will disable this feature.
+ */
+ PJMEDIA_ICE_NO_SRC_ADDR_CHECKING = 1
+};
+
+
+/**
* Create the Interactive Connectivity Establishment (ICE) media transport
* using the specified configuration. When STUN or TURN (or both) is used,
* the creation operation will complete asynchronously, when STUN resolution
@@ -94,6 +111,29 @@ PJ_DECL(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt,
const pjmedia_ice_cb *cb,
pjmedia_transport **p_tp);
+
+/**
+ * The same as @pjmedia_ice_create with additional \a options param.
+ *
+ * @param endpt The media endpoint.
+ * @param name Optional name to identify this ICE media transport
+ * for logging purposes.
+ * @param comp_cnt Number of components to be created.
+ * @param cfg Pointer to configuration settings.
+ * @param cb Optional structure containing ICE specific callbacks.
+ * @param options Options, see #pjmedia_transport_ice_options.
+ * @param p_tp Pointer to receive the media transport instance.
+ *
+ * @return PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_create2(pjmedia_endpt *endpt,
+ const char *name,
+ unsigned comp_cnt,
+ const pj_ice_strans_cfg *cfg,
+ const pjmedia_ice_cb *cb,
+ unsigned options,
+ pjmedia_transport **p_tp);
+
PJ_END_DECL