diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-06-01 11:37:30 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-06-01 11:37:30 +0000 |
commit | 0a523ff1658aad0f96d7c325f3ae4327f1020d9e (patch) | |
tree | 553eb783e6d967e48af337c75bf95256c377591d /pjmedia/include | |
parent | 4d82c2e0f6790422e6e319ad80983e1e002fca85 (diff) |
Added options in pjmedia UDP transport to disable source address checking
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@483 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/transport_udp.h | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/pjmedia/include/pjmedia/transport_udp.h b/pjmedia/include/pjmedia/transport_udp.h index a84da98c..e0b25ed6 100644 --- a/pjmedia/include/pjmedia/transport_udp.h +++ b/pjmedia/include/pjmedia/transport_udp.h @@ -29,25 +29,64 @@ /** - * Create UDP stream transport. + * Options that can be specified when creating UDP transport. + */ +enum pjmedia_transport_udp_options +{ + /** + * Normally the UDP 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_UDP_NO_SRC_ADDR_CHECKING = 1, +}; + + +/** + * Create an RTP and RTCP sockets and bind RTP the socket to the specified + * port to create media transport. + * + * @param endpt The media endpoint instance. + * @param name Optional name to be assigned to the transport. + * @param port UDP port number for the RTP socket. The RTCP port number + * will be set to one above RTP port. + * @param options Options, bitmask of #pjmedia_transport_udp_options. + * @param p_tp Pointer to receive the transport instance. + * + * @return PJ_SUCCESS on success. */ PJ_DECL(pj_status_t) pjmedia_transport_udp_create(pjmedia_endpt *endpt, const char *name, int port, + unsigned options, pjmedia_transport **p_tp); /** - * Create UDP stream transport from existing socket info. + * Create UDP stream transport from existing sockets. Use this function when + * the sockets have previously been created. + * + * @param endpt The media endpoint instance. + * @param name Optional name to be assigned to the transport. + * @param si Media socket info containing the RTP and RTCP sockets. + * @param options Options, bitmask of #pjmedia_transport_udp_options. + * @param p_tp Pointer to receive the transport instance. + * + * @return PJ_SUCCESS on success. */ PJ_DECL(pj_status_t) pjmedia_transport_udp_attach(pjmedia_endpt *endpt, const char *name, const pjmedia_sock_info *si, + unsigned options, pjmedia_transport **p_tp); /** - * Close UDP transport. + * Close UDP transport. Application can also use the "destroy" member of + * media transport interface to close the UDP transport. */ PJ_DECL(pj_status_t) pjmedia_transport_udp_close(pjmedia_transport *tp); |