Ignore:
Timestamp:
Jun 1, 2006 11:37:30 AM (18 years ago)
Author:
bennylp
Message:

Added options in pjmedia UDP transport to disable source address checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/transport_udp.h

    r452 r483  
    3030 
    3131/** 
    32  * Create UDP stream transport. 
     32 * Options that can be specified when creating UDP transport. 
     33 */ 
     34enum pjmedia_transport_udp_options 
     35{ 
     36    /** 
     37     * Normally the UDP transport will continuously check the source address 
     38     * of incoming packets to see if it is different than the configured 
     39     * remote address, and switch the remote address to the source address 
     40     * of the packet if they are different after several packets are 
     41     * received. 
     42     * Specifying this option will disable this feature. 
     43     */ 
     44    PJMEDIA_UDP_NO_SRC_ADDR_CHECKING = 1, 
     45}; 
     46 
     47 
     48/** 
     49 * Create an RTP and RTCP sockets and bind RTP the socket to the specified 
     50 * port to create media transport. 
     51 * 
     52 * @param endpt     The media endpoint instance. 
     53 * @param name      Optional name to be assigned to the transport. 
     54 * @param port      UDP port number for the RTP socket. The RTCP port number 
     55 *                  will be set to one above RTP port. 
     56 * @param options   Options, bitmask of #pjmedia_transport_udp_options. 
     57 * @param p_tp      Pointer to receive the transport instance. 
     58 * 
     59 * @return          PJ_SUCCESS on success. 
    3360 */ 
    3461PJ_DECL(pj_status_t) pjmedia_transport_udp_create(pjmedia_endpt *endpt, 
    3562                                                  const char *name, 
    3663                                                  int port, 
     64                                                  unsigned options, 
    3765                                                  pjmedia_transport **p_tp); 
    3866 
    3967 
    4068/** 
    41  * Create UDP stream transport from existing socket info. 
     69 * Create UDP stream transport from existing sockets. Use this function when 
     70 * the sockets have previously been created. 
     71 * 
     72 * @param endpt     The media endpoint instance. 
     73 * @param name      Optional name to be assigned to the transport. 
     74 * @param si        Media socket info containing the RTP and RTCP sockets. 
     75 * @param options   Options, bitmask of #pjmedia_transport_udp_options. 
     76 * @param p_tp      Pointer to receive the transport instance. 
     77 * 
     78 * @return          PJ_SUCCESS on success. 
    4279 */ 
    4380PJ_DECL(pj_status_t) pjmedia_transport_udp_attach(pjmedia_endpt *endpt, 
    4481                                                  const char *name, 
    4582                                                  const pjmedia_sock_info *si, 
     83                                                  unsigned options, 
    4684                                                  pjmedia_transport **p_tp); 
    4785 
    4886 
    4987/** 
    50  * Close UDP transport. 
     88 * Close UDP transport. Application can also use the "destroy" member of 
     89 * media transport interface to close the UDP transport. 
    5190 */ 
    5291PJ_DECL(pj_status_t) pjmedia_transport_udp_close(pjmedia_transport *tp); 
Note: See TracChangeset for help on using the changeset viewer.